/* つばさ先生のパソコン教室 — 共通スタイル
   ブランド仕様: 00_common/design.md（白ベース・5色・グラデーション禁止・ライト固定）
   目玉は index の「放課後の時間割」1か所だけ。ほかは罫線と余白で静かに組む */

:root {
  color-scheme: light;

  --bg:         #FFFFFF;
  --bg-alt:     #F5F8FA;
  --primary:    #0089AC;
  --primary-lt: #3EA6B2;
  --pink:       #D2B9BB;
  --navy:       #002A49;
  --accent:     #FBBC04;

  --text-main:  #1a1a1a;
  --text-sub:   #555555;

  --rule:       #E5E7EB;
  --radius:     14px;
  --radius-sm:  8px;

  --font-body:  "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-voice: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --gutter:     clamp(26px, 7vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.95;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 0.2em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* ---------- 骨組み ---------- */
.container {
  max-width: 780px; margin: 0 auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.container-wide {
  max-width: 1040px; margin: 0 auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}

.block { padding-top: 88px; padding-bottom: 88px; }
.block-alt { background: var(--bg-alt); }
@media (max-width: 768px) { .block { padding-top: 60px; padding-bottom: 60px; } }

/* ---------- 文字 ---------- */
h1, h2, h3 { color: var(--navy); font-weight: 700; letter-spacing: 0.04em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 1.95rem); line-height: 1.5; margin-bottom: 28px; }
h3 { font-size: 1.12rem; line-height: 1.6; margin-bottom: 10px; }

p { color: var(--text-sub); margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--navy); font-weight: 700; }

.lede { font-size: 1.05rem; max-width: 34em; }
.note { font-size: 0.9rem; }
.prose { max-width: 36em; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  max-width: 1040px; margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  color: var(--navy); text-decoration: none; font-weight: 700;
  font-size: 1.05rem; line-height: 1.35; white-space: nowrap;
}
.logo .logo-sub { display: block; font-size: 0.7rem; font-weight: 400; color: var(--primary); letter-spacing: 0.06em; }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a.nav-link { font-size: 0.9rem; color: var(--text-sub); text-decoration: none; }
.site-header nav a.nav-link:hover,
.site-header nav a.nav-link[aria-current="page"] { color: var(--navy); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.btn-sm {
  background: var(--accent); color: var(--navy); font-weight: 700; font-size: 0.88rem;
  padding: 12px 18px; border-radius: var(--radius-sm); text-decoration: none; white-space: nowrap;
}
.btn-sm:hover { color: var(--navy); background: #FFCB2E; }
@media (max-width: 768px) {
  .site-header nav a.nav-link { display: none; }
  .logo { font-size: 0.92rem; }
  .logo .logo-sub { font-size: 0.64rem; }
}

/* ---------- ボタン ---------- */
.btn-primary {
  display: inline-block; padding: 18px 40px;
  background: var(--accent); color: var(--navy);
  font-weight: 700; font-size: 1.05rem; letter-spacing: 0.06em;
  border-radius: var(--radius-sm); text-decoration: none;
  box-shadow: 0 3px 0 #D9A100;
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-primary:hover { color: var(--navy); transform: translateY(1px); box-shadow: 0 2px 0 #D9A100; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 0 0 #D9A100; }
.btn-text {
  display: inline-block; padding: 14px 4px;
  color: var(--primary); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px;
}
.btn-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.btn-note { font-size: 0.9rem; color: var(--text-sub); margin-top: 14px; margin-bottom: 0; }

/* ---------- ヒーロー ---------- */
.hero { padding-top: 72px; padding-bottom: 80px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
  gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3rem); line-height: 1.42; letter-spacing: 0.05em;
  margin-bottom: 28px;
}
.hero .lede { margin-bottom: 36px; }
.hero-photo { margin: 0; max-width: 340px; justify-self: end; }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  border-radius: var(--radius);
}
.hero-photo figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--text-sub); line-height: 1.7; }
.hero-photo figcaption b { display: block; color: var(--navy); font-size: 1rem; }
@media (max-width: 768px) {
  .hero { padding-top: 44px; padding-bottom: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { justify-self: stretch; max-width: none; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
  .hero-photo img { width: 96px; height: 96px; aspect-ratio: auto; border-radius: 50%; object-position: 50% 18%; }
  .hero-photo figcaption { margin-top: 0; }
}

/* ---------- 悩み ---------- */
.worry-list { list-style: none; border-top: 1px solid var(--rule); max-width: 36em; }
.worry-list li {
  position: relative; padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--rule); color: var(--text-main);
}
.worry-list li::before {
  content: ""; position: absolute; left: 4px; top: 30px;
  width: 14px; height: 3px; background: var(--primary-lt); border-radius: 2px;
}
.worry-after { margin-top: 28px; color: var(--navy); font-weight: 700; }

/* ---------- 放課後の時間割（目玉） ---------- */
.timetable-intro { max-width: 34em; }
.timetable {
  --row: 26px;
  margin-top: 40px; max-width: 820px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 14px;
}
.tt-head {
  font-weight: 700; color: var(--navy); font-size: 1rem;
  padding-bottom: 12px; border-bottom: 2px solid var(--navy);
}
.tt-head span { display: block; font-weight: 400; font-size: 0.82rem; color: var(--text-sub); }
.tt-head-empty { border-bottom-color: transparent; }

.tt-times, .tt-col {
  position: relative;
  display: grid; grid-template-rows: repeat(18, var(--row));
  padding-top: 10px;
}
.tt-col {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Cline x1='0' y1='0' x2='10' y2='0' stroke='%23E5E7EB' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% calc(var(--row) * 4);
  background-position: 0 10px;
  background-repeat: repeat-y;
}
.tt-times span {
  font-size: 0.8rem; color: var(--text-sub); line-height: 1;
  font-variant-numeric: tabular-nums; transform: translateY(-0.5em);
}

.tt-block {
  margin: 2px 0; border-radius: 6px;
  padding: 6px 12px; line-height: 1.45; font-size: 0.95rem;
  display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden;
}
.tt-block b { font-weight: 700; }
.tt-block small { font-size: 0.84rem; }
.tt-before .tt-block { background: var(--navy); color: #fff; }
.tt-before .tt-block small { color: #fff; opacity: 0.85; }
.tt-col .tt-block.tt-lesson { background: var(--bg-alt); color: var(--text-sub); border: 1px solid var(--rule); justify-content: center; }
.tt-quick { display: flex; flex-direction: column; gap: 2px; margin: 2px 0; }
.tt-after .tt-quick .tt-block { flex: 1; margin: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; font-size: 0.84rem; line-height: 1.2; }
.tt-after .tt-block { background: var(--primary); color: #fff; justify-content: center; padding-top: 2px; padding-bottom: 2px; }
.tt-after .tt-free {
  background: rgba(210, 185, 187, 0.32); color: var(--navy);
  border: 2px solid var(--pink); justify-content: center; align-items: center; text-align: center;
  font-size: 1rem; line-height: 1.7;
}
.tt-after .tt-free small { color: var(--navy); font-size: 0.82rem; }
.tt-overflow {
  grid-row: 18; align-self: start;
  font-size: 0.82rem; color: var(--navy); font-weight: 700; line-height: 1.4;
  border-top: 2px dashed var(--navy); padding-top: 6px;
}

.tt-caption { margin-top: 20px; font-size: 0.88rem; max-width: 820px; }

/* 動きは1か所だけ: 「今」の列が上から順に積み上がる */
.js .tt-before .tt-block { opacity: 0; transform: translateY(-6px); }
.js .timetable.is-shown .tt-before .tt-block { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s ease; }
.js .timetable.is-shown .tt-before .tt-block:nth-child(2) { transition-delay: 0.25s; }
.js .timetable.is-shown .tt-before .tt-block:nth-child(3) { transition-delay: 0.6s; }
.js .timetable.is-shown .tt-before .tt-block:nth-child(4) { transition-delay: 0.95s; }
.js .tt-before .tt-overflow { opacity: 0; }
.js .timetable.is-shown .tt-before .tt-overflow { opacity: 1; transition: opacity 0.45s ease 1.4s; }
@media (prefers-reduced-motion: reduce) {
  .js .tt-before .tt-block, .js .tt-before .tt-overflow { opacity: 1; transform: none; transition: none !important; }
}

@media (max-width: 560px) {
  .timetable { --row: 24px; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr); column-gap: 8px; }
  .tt-block { padding: 4px 7px; font-size: 0.78rem; }
  .tt-block small { font-size: 0.72rem; }
  .tt-after .tt-free { font-size: 0.88rem; }
  .tt-times span { font-size: 0.72rem; }
  .tt-after .tt-quick .tt-block { font-size: 0.72rem; gap: 4px; padding: 0 6px; }
}

/* 実例 */
.cases { margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.case { border-top: 3px solid var(--primary); padding-top: 20px; }
.case .change { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.case p { font-size: 0.94rem; }
.case .quote { font-family: var(--font-voice); color: var(--navy); font-weight: 500; font-size: 1rem; line-height: 1.9; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- 学びの進み方（階段） ---------- */
.stairs {
  --rise: 56px;
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start;
  margin-top: 48px;
}
.stair { counter-increment: step; position: relative; border-top: 3px solid var(--navy); padding: 0 24px 0 0; }
.stair:nth-child(1) { margin-top: calc(var(--rise) * 2); }
.stair:nth-child(2) { margin-top: var(--rise); }
.stair + .stair { padding-left: 24px; }
.stair + .stair::after {
  content: ""; position: absolute; left: 0; top: -3px;
  height: calc(var(--rise) + 3px); border-left: 3px solid var(--navy);
}
.stair::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700;
  margin: -20px 0 14px;
}
.stair + .stair::before { position: relative; z-index: 1; }
.stair .verb { font-size: 0.92rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.stair h3 { font-size: 1.05rem; }
.stair p { font-size: 0.92rem; margin-bottom: 0.6em; }
.stair .price { color: var(--navy); font-weight: 700; font-size: 0.95rem; }
.stair .or { display: block; font-size: 0.85rem; color: var(--text-sub); margin: 14px 0; }
.stairs-note { margin-top: 36px; font-size: 0.92rem; max-width: 40em; }
@media (max-width: 860px) {
  .stairs { grid-template-columns: 1fr; margin-top: 36px; padding-left: 18px; }
  .stair:nth-child(n), .stair + .stair { margin-top: 0; border-top: none; border-left: 3px solid var(--navy); padding: 0 0 36px 32px; }
  .stair:last-child { padding-bottom: 0; border-left-color: transparent; }
  .stair + .stair::after { display: none; }
  .stair::before, .stair + .stair::before { position: absolute; left: -20px; top: 0; margin: 0; }
  .stair-body { padding-top: 4px; }
}

/* ---------- 受講生の声 ---------- */
.voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; margin-top: 12px; }
.voice { border-top: 1px solid var(--rule); padding-top: 28px; }
.voice-quote {
  font-family: var(--font-voice); font-weight: 500;
  color: var(--navy); font-size: 1.12rem; line-height: 2; letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.voice-who { display: grid; grid-template-columns: 128px 1fr; gap: 20px; align-items: center; }
.voice-who img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; }
.voice-who p { font-size: 0.86rem; line-height: 1.7; margin: 0; }
.voice-who.no-photo { grid-template-columns: 1fr; }
.voices-sub { font-size: 1.05rem; color: var(--navy); margin-top: 64px; }
.voice-who .name { color: var(--text-main); font-weight: 700; font-size: 0.92rem; }
@media (max-width: 768px) { .voices { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 480px) { .voice-who { grid-template-columns: 1fr; gap: 14px; } .voice-who img { justify-self: center; } }

/* ---------- 料金表 ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.price-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; border-top: 2px solid var(--navy); }
.price-table th, .price-table td { padding: 18px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.price-table th { color: var(--navy); font-weight: 700; min-width: 11em; }
.price-table td { color: var(--text-sub); }
.price-table td.amount { color: var(--navy); font-weight: 700; white-space: nowrap; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .price-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--rule); padding: 14px 0; }
  .price-table th, .price-table td { border: none; padding: 2px 0; }
  .price-table th { min-width: 0; }
  .price-table td.amount { text-align: right; }
  .price-table td:last-child:not(.amount) { grid-column: 1 / -1; font-size: 0.88rem; }
}

/* ---------- 講師 ---------- */
.profile { display: grid; grid-template-columns: 160px 1fr; gap: 40px; align-items: start; }
.profile img { width: 160px; aspect-ratio: 1; object-fit: cover; object-position: 50% 18%; border-radius: 50%; }
.facts { list-style: none; border-top: 1px solid var(--rule); margin-bottom: 24px; }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--text-main); font-size: 0.96rem; }
@media (max-width: 768px) {
  .profile { grid-template-columns: 1fr; gap: 24px; }
  .profile img { width: 112px; justify-self: center; }
}

/* ---------- よくある質問 ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 44px 20px 0; position: relative;
  color: var(--navy); font-weight: 700; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--primary); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 22px; font-size: 0.96rem; max-width: 36em; }

/* ---------- 最後の相談 ---------- */
.cta-end { background: var(--bg-alt); border-top: 4px solid var(--navy); }
.cta-end h2 { margin-bottom: 20px; }
.cta-end .btn-row { margin-top: 32px; }

/* ---------- フッター ---------- */
footer { border-top: 1px solid var(--rule); padding: 40px 0 48px; font-size: 0.88rem; color: var(--text-sub); }
footer .inner { max-width: 1040px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
footer nav a { color: var(--text-sub); text-decoration: none; padding: 4px 0; }
footer nav a:hover { color: var(--navy); text-decoration: underline; }

/* ---------- 下層ページ ---------- */
.page-head { padding-top: 64px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.5; }
.page-head + .block { padding-top: 40px; }

.course { border-top: 2px solid var(--navy); padding-top: 28px; margin-top: 56px; }
.course:first-of-type { margin-top: 40px; }
.course h2 { font-size: 1.35rem; margin-bottom: 6px; }
.course .fee { color: var(--navy); font-weight: 700; font-size: 1.35rem; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.course .fee span { font-size: 0.88rem; font-weight: 400; color: var(--text-sub); }
.course h3 { font-size: 0.98rem; margin-top: 24px; margin-bottom: 6px; }
.course p, .course li { font-size: 0.95rem; }
.course ul { padding-left: 1.3em; color: var(--text-sub); margin-bottom: 1em; }
.course .for { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 16px 20px; }
.sessions { list-style: none; counter-reset: s; padding-left: 0 !important; border-top: 1px solid var(--rule); }
.sessions li { counter-increment: s; display: grid; grid-template-columns: 4em 1fr; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sessions li::before { content: counter(s) "回目"; color: var(--navy); font-weight: 700; }

.legal-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; border-top: 2px solid var(--navy); }
.legal-table th, .legal-table td { border-bottom: 1px solid var(--rule); padding: 16px 14px; text-align: left; vertical-align: top; color: var(--text-sub); }
.legal-table th { color: var(--navy); font-weight: 700; width: 30%; }
@media (max-width: 768px) {
  .legal-table th, .legal-table td { display: block; width: 100%; padding-left: 0; padding-right: 0; }
  .legal-table th { border-bottom: none; padding-bottom: 0; }
}
.policy h2 { font-size: 1.15rem; margin-top: 40px; margin-bottom: 12px; }
.policy ul { padding-left: 1.4em; color: var(--text-sub); margin-bottom: 1.2em; }

/* ---------- ハンバーガーメニュー（スマホ幅） ---------- */
.nav-links { display: contents; }
.nav-toggle { display: none; }
@media (max-width: 768px) {
  .site-header nav { gap: 10px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 48px; height: 48px; padding: 0; cursor: pointer;
    background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--rule);
    padding: 4px var(--gutter) 12px; box-shadow: 0 8px 16px rgba(0, 42, 73, 0.08);
  }
  .site-header.open .nav-links { display: flex; }
  .site-header nav .nav-links a.nav-link {
    display: block; padding: 14px 0; font-size: 1rem; color: var(--navy);
    border-bottom: 1px solid var(--rule);
  }
  .site-header nav .nav-links a.nav-link:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .nav-toggle span { transition: none; } }
