/* AI塾 新HP — DESIGN.md に従う。値は token から選ぶ。 */
:root {
  --bg: #FAFAF7;
  --text: #1E2230;
  --muted: #565B6B;
  --main: #314BA8;
  --accent: #B83E59;
  --line: #D9DCE5;
  --band: #EEF0F8;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 20px;
  --s5: 32px;
  --s6: 52px;
  --s7: 84px;

  --r: 8px;
  --font-body: "BIZ UDPGothic", "Yu Gothic", "Meiryo", sans-serif;
  --font-head: "BIZ UDPMincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.85;
  word-break: normal;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--main); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--s4); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.5; }
h2 { color: var(--main); font-size: 28px; margin-bottom: var(--s4); }
h3 { color: var(--text); font-size: 22px; }

/* ヘッダー */
.site-head { padding: var(--s4) 0 var(--s4); }
.site-head .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 44px; color: var(--main); text-decoration: none; line-height: 1.3; }
.site-head nav a { font-size: 16px; }

/* 最初の画面 */
.hero { padding-bottom: var(--s6); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 40% 50%; }
.hero-body { position: relative; z-index: 1; padding: 0 var(--s4); max-width: 1040px; margin: 0 auto; }
.hero-title { font-size: 36px; line-height: 1.5; color: var(--text); margin-top: var(--s4); }
.hero-lead { font-size: 18px; line-height: 1.85; margin-top: var(--s4); }
.nav-biz { display: inline-block; padding: var(--s3) var(--s4); border: 1px solid var(--main); border-radius: var(--r); font-size: 16px; font-weight: 700; text-decoration: none; }
.btn-sub { display: inline-block; margin-top: var(--s4); padding: var(--s3) var(--s5); border: 2px solid var(--main); border-radius: var(--r); color: var(--main); font-weight: 700; font-size: 18px; text-decoration: none; }
.prose-p { max-width: 36em; }
.site-head { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-head nav { display: flex; gap: var(--s3); align-items: center; }
.head-line { display: none; padding: var(--s3) var(--s4); background: var(--accent); color: #fff; border-radius: var(--r); font-size: 16px; font-weight: 700; text-decoration: none; }
.biz-band { background: var(--band); padding: var(--s5) 0; }
.biz-band h2 { margin-bottom: var(--s3); }
.biz-grid { display: grid; gap: var(--s4); align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s4); }
.cta-row .btn { margin-top: 0; }
.btn { border: 2px solid var(--accent); text-align: center; }
.btn.btn-mail { background: transparent; color: var(--main); border-color: var(--main); }
.cta-row .btn { flex: 1 1 280px; max-width: 340px; }
.ph { display: inline-block; }
h1, h2, h3 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
.asks { list-style: none; border-top: 1px solid var(--line); }
.asks li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: 20px; }
@media (min-width: 860px) {
  .head-line { display: inline-block; }
  .biz-grid { grid-template-columns: 7fr 5fr; }
}
@media (max-width: 859px) {
  .site-head { position: static; }
  .site-head nav .nav-biz:not(.nav-back) { display: none; }
  .nav-back { padding: var(--s2) var(--s3); }
}
.steps dt { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--main); margin-top: var(--s4); }
.steps dd { margin-top: var(--s1); }
.bar { display: none; }
body { padding-bottom: 0; }
@media (max-width: 859px) {
  body { padding-bottom: 72px; }
  .bar { display: flex; gap: var(--s2); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: var(--s2) var(--s4); background: var(--bg); border-top: 1px solid var(--line); }
  .bar a { flex: 1; text-align: center; padding: var(--s3) var(--s2); border-radius: var(--r); font-weight: 700; font-size: 18px; text-decoration: none; min-height: 48px; line-height: 1.4; }
  .bar-line { background: var(--accent); color: #fff; }
  .bar-tel { border: 2px solid var(--main); color: var(--main); }
}
.facts { list-style: none; margin-top: var(--s5); border-top: 1px solid var(--line); }
.facts li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.facts b { font-weight: 700; margin-right: var(--s3); }

.btn {
  display: inline-block;
  margin-top: var(--s4);
  padding: var(--s4) var(--s5);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  border-radius: var(--r);
  line-height: 1.4;
}
.btn:hover { filter: brightness(0.92); }
.note { color: var(--muted); font-size: 16px; margin-top: var(--s3); }

/* セクション共通 */
section.block { border-top: 1px solid var(--line); padding: var(--s6) 0; }

/* 授業の内容 */
.course { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.course:first-of-type { border-top: 0; padding-top: 0; }
.course-head .for { color: var(--muted); font-size: 16px; margin-top: var(--s2); }
.lessons { margin-top: var(--s4); }
.lessons dt { font-weight: 700; margin-top: var(--s4); }
.lessons dt:first-child { margin-top: 0; }
.lessons dt .t { display: block; font-family: var(--font-head); font-size: 20px; color: var(--main); }
.lessons dd { margin-top: var(--s1); }

/* 教室と場所 */
.access-grid { display: grid; gap: var(--s5); }
.access-grid figure figcaption { font-size: 16px; color: var(--muted); margin-top: var(--s2); }
.access-text p + p { margin-top: var(--s3); }
.addr { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.6; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photos figure:last-child img { object-position: 30% 50%; }
.flow { margin-top: var(--s5); }

/* 予約 */
.reserve-grid { display: grid; gap: var(--s5); }
.open { font-family: var(--font-head); font-weight: 700; font-size: 24px; line-height: 1.6; }
.tel { font-family: var(--font-head); font-weight: 700; font-size: 36px; line-height: 1.3; }
.tel a { color: var(--text); text-decoration: none; }
.qr { width: 160px; height: 160px; margin-top: var(--s4); }

/* 法人ページ */
.page-title { font-size: 34px; color: var(--main); margin: var(--s5) 0 var(--s4); }
.lead { font-size: 20px; max-width: 34em; }
.prose p { max-width: 36em; }
.prose p + p { margin-top: var(--s3); }
.contact-line { font-size: 22px; font-family: var(--font-head); font-weight: 700; line-height: 1.8; }
.contact-line a { color: var(--text); }

/* フッター */
.site-foot { border-top: 1px solid var(--line); padding: var(--s5) 0 var(--s6); color: var(--muted); font-size: 16px; }
.site-foot p + p { margin-top: var(--s2); }

@media (min-width: 860px) {
  body { font-size: 18px; }
  h2 { font-size: 32px; }
  .hero { padding-bottom: var(--s6); }
  .hero-grid { display: grid; grid-template-columns: 5fr 7fr; max-width: 1040px; margin: 0 auto; padding: 0 var(--s4); align-items: start; }
  .hero-photo { grid-column: 2; grid-row: 1; }
  .hero-photo img { aspect-ratio: 4 / 3; }
  .hero-body { grid-column: 1; grid-row: 1; padding: var(--s6) 0 0 0; margin: 0; max-width: none; }
  .hero-title { font-size: 44px; margin-top: 0; }
  .hero-text { position: relative; z-index: 1; }
  .course { display: grid; grid-template-columns: 4fr 8fr; gap: var(--s5); }
  .lessons { margin-top: 0; }
  .access-grid { grid-template-columns: 5fr 7fr; align-items: start; }
  .reserve-grid { grid-template-columns: 7fr 5fr; align-items: start; }
  .qr { margin-top: 0; }
  section.block { padding: var(--s7) 0; }
}
.nw { white-space: nowrap; font-size: 22px; }

.steps + p { margin-top: var(--s5); }
@media (min-width: 860px) { .hero-body { padding-right: var(--s5); } }

.sn { display: block; }
.lessons dd .ph, .for .ph { display: block; }
.note.key { font-size: 18px; color: var(--text); }
.biz-photo { width: 100%; max-width: 560px; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: var(--s4); }
@media (max-width: 859px) { .qr-box { display: none; } }
@media (min-width: 860px) {
  .prose { display: grid; grid-template-columns: 4fr 8fr; column-gap: var(--s5); align-items: start; }
  .prose > h2 { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  .prose > :not(h2) { grid-column: 2; }
  .biz-photo { max-width: 100%; }
}
.sys-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--main); margin-top: var(--s5); }
.asks.sys { margin-top: var(--s2); }
.asks.sys li { font-size: 18px; }
.doc > * { max-width: 760px; }
.doc h2 { font-size: 22px; margin: var(--s6) 0 var(--s3); }
.doc p + p, .doc ul + p { margin-top: var(--s3); }
.doc ul { margin: var(--s2) 0 0 var(--s4); }
.doc li { margin-top: var(--s2); }

/* 塾長・講師 */
.person { padding: var(--s5) 0; border-top: 1px solid var(--line); display: grid; gap: var(--s4); }
.person:first-of-type { border-top: 0; padding-top: var(--s4); }
.person figure img { width: 200px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.role { color: var(--muted); font-size: 16px; }
.person h3 { font-size: 26px; margin-bottom: var(--s3); }
.msg { margin-bottom: var(--s4); max-width: 36em; }
.career { list-style: none; border-top: 1px solid var(--line); }
.career li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.career .ph { display: block; }
.sub-t { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--main); margin-top: var(--s5); margin-bottom: var(--s2); }
.person .note { margin-top: var(--s4); }
@media (min-width: 860px) { .person { grid-template-columns: 4fr 8fr; gap: var(--s5); } .person figure img { width: 100%; max-width: 280px; } }

#access { padding-bottom: var(--s6); }

.nl { font-size: 16px; font-weight: 700; text-decoration: none; color: var(--text); padding: var(--s2) var(--s1); }
.nl:hover { color: var(--main); }
.site-head nav { flex-wrap: wrap; }
@media (max-width: 859px) { .site-head nav { width: 100%; gap: var(--s4); } .site-head .wrap { gap: var(--s1); } }
.pname { font-size: 26px; color: var(--text); margin-bottom: var(--s4); }
.greet p + p, .greet ol + p { margin-top: var(--s3); }
.acts { margin: var(--s3) 0 0 var(--s4); }
.acts li { margin-top: var(--s2); }
.acts .ph { display: inline; }
.motto { font-family: var(--font-head); font-weight: 700; font-size: 22px; margin-top: var(--s5) !important; }
.sign { text-align: right; margin-top: var(--s4) !important; color: var(--muted); font-size: 16px; }
.person-body .btn-sub { margin-top: var(--s4); }

.motto { text-align: center; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); max-width: 560px; margin-top: var(--s4); }
.pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.pair figcaption { margin-top: var(--s2); }
.pair .role, .pair .pn { display: block; }
.pair .pn { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.5; }

.sn.go { font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--main); line-height: 1.6; }
.lead .sn.go { font-size: 26px; margin-bottom: var(--s2); }

@media (min-width: 860px) { html { scroll-padding-top: 120px; } }

.site-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.site-foot p + p { margin-top: 0; }
.site-foot p:last-child { flex-basis: 100%; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }

.site-foot .wrap { align-items: baseline; }
.site-foot .wrap::before { content: ""; order: 50; flex-basis: 100%; border-top: 1px solid var(--line); margin-top: var(--s2); }
.site-foot p:first-child { order: 98; margin-top: var(--s2); }
.site-foot p:last-child { order: 99; flex-basis: auto; margin: var(--s2) 0 0 auto; padding-top: 0; border-top: 0; }

.faq-h { font-size: 24px; margin: var(--s6) 0 var(--s3); }
.faq-h:first-of-type { margin-top: var(--s4); }
.faq { border-top: 1px solid var(--line); max-width: 760px; }
.faq dt { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--main); padding-top: var(--s4); }
.faq dd { padding: var(--s2) 0 var(--s4); border-bottom: 1px solid var(--line); }
.faq-end { margin-top: var(--s6); }
.faq-link { margin-top: var(--s4); }

.site-head .wrap { align-items: center; }
.site-head nav { gap: var(--s4); }
.site-head nav .nav-biz { margin-left: var(--s2); }
@media (max-width: 859px) { .site-head nav { gap: var(--s3); } .nl { font-size: 15px; padding: var(--s2) 0; } }

.site-foot p:first-child { order: 0; margin-top: 0; }
.site-foot p:last-child { order: 0; }
.site-foot p.op { order: 98; margin-top: var(--s2); }
.site-foot p.cp { order: 99; margin: var(--s2) 0 0 auto; }
