/* Vivo 公式サイト。配色はストア画像（tool/compose_store_images.py）とアプリ（lib/Utility/app_const.dart）に合わせる */
:root {
  --cream: #fffbf3;
  --peach: #fceccd;
  --navy: #444c8e;
  --rose: #a84a7f;
  --rose-dark: #8c3a68;
  --ink: #2a2c3a;
  --muted: #5d6070;
  --card: #ffffff;
  --line: #eadfce;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(68, 76, 142, 0.10);
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.7;
  line-break: strict; /* 行頭の「ー」・小書きかなを禁止 */
}
* { box-sizing: border-box; }
/* 内容の短いページでもフッターを画面の下端に置く */
body { margin: 0; background: var(--cream); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--rose); }
a:hover { color: var(--rose-dark); }
h1, h2, h3 { color: var(--navy); line-height: 1.35; margin: 0; }
/* 見出し用の丸ゴシック（@font-face は日本語のページだけに出力。他の言語は本文と同じ端末の標準フォント。SITE-016） */
h1, h2, h3, .brand, .footer-name { font-family: "Vivo Heading", var(--font-body); font-weight: 700; }
p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
/* 日本語は文節の切れ目（ビルド時に BudouX で入れた <wbr>）でだけ改行する */
:lang(ja) :is(h1, h2, h3, .lead, .flow li, .practice-list span, .section-head p, .faq summary, .faq details p, .contact-card p, .quiz-hint) { word-break: keep-all; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; }

/* ヘッダー */
.site-header { background: rgba(255, 251, 243, 0.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 22px; }
.brand img { border-radius: 10px; }
.main-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.main-nav > a { color: var(--ink); text-decoration: none; }
.main-nav > a:hover, .main-nav > a[aria-current] { color: var(--rose); }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 190px; }
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-menu li a:hover { background: var(--cream); }
.lang-menu li a[aria-current] { font-weight: 700; color: var(--rose); }
/* ≡ のメニュー（スマホの幅だけ。SITE-007）。言語の切り替えと同じく details で開閉する */
.nav-menu { display: none; position: relative; }
.nav-menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: var(--navy); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { color: var(--rose); border-color: var(--rose); }
.nav-menu-list { position: absolute; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 210px; }
.nav-menu-list a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
.nav-menu-list a:hover { background: var(--cream); }
.nav-menu-list a[aria-current] { color: var(--rose); }

/* セクション共通 */
section { padding: 72px 0; }
section[id] { scroll-margin-top: 64px; } /* メニューから移動したとき、固定ヘッダーに見出しが隠れないようにする */
section h2 { font-size: 28px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.eyebrow { color: var(--rose); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.shot { display: block; filter: drop-shadow(0 10px 24px rgba(68, 76, 142, 0.18)); }

/* ファーストビュー */
.hero { background: linear-gradient(180deg, var(--cream), var(--peach)); padding: 56px 0 72px; }
.hero-row { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-text { flex: 1 1 400px; display: flex; flex-direction: column; gap: 18px; }
.hero-text h1 { font-size: 42px; }
/* h1 の中の小見出し。以前の <p class="eyebrow"> と同じ見た目にする（間隔は .hero-text の gap と同じ 18px） */
.hero-text h1 .eyebrow { display: block; margin-bottom: 18px; font-family: var(--font-body); line-height: 1.7; text-wrap: wrap; }
.lead { font-size: 18px; }
.note { font-size: 14px; color: var(--muted); }
.hero-image { flex: 1 1 520px; position: relative; }
/* ファーストビューの文字は、開いた時点ですべて表示する（SITE-012）。記号は止めて置く（SITE-013） */
.hero { overflow: hidden; }
.hero-sym { position: absolute; z-index: 2; font-size: 34px; font-weight: 700; line-height: 1; pointer-events: none; text-shadow: 0 4px 12px rgba(68, 76, 142, 0.18); opacity: 0.9; rotate: -6deg; }
.hero-sym.s1 { top: 2%; left: 4%; color: var(--rose); }
.hero-sym.s2 { top: 10%; right: 2%; color: var(--navy); font-size: 28px; animation-delay: -2s; }
.hero-sym.s3 { bottom: 26%; left: -2%; color: var(--navy); font-size: 30px; animation-delay: -4s; }
.hero-sym.s4 { bottom: -4%; left: 30%; color: var(--rose); font-size: 26px; animation-delay: -1s; }
.hero-sym.s5 { top: 46%; right: -1%; color: var(--rose); font-size: 24px; animation-delay: -5s; }
/* 「1問試す」を置くときは、カードを少し細くして周りに余白を作り、記号をカードの前面・外周（角と左右の余白）に置く。
   pointer-events: none なので、記号がカードの端に掛かっても鍵盤は押せる */
.has-quiz .quiz-card.hero-quiz { max-width: 500px; }
/* 説明文の下のスマホの画面（和音の音符カード） */
.hero-phone { max-width: 440px; }
.hero-phone .shot { width: 100%; }
.has-quiz .hero-sym { z-index: 4; font-size: 38px; }
.has-quiz .hero-sym.s1 { top: -10px; left: 2px; left: max(2px, calc(50% - 280px)); }
.has-quiz .hero-sym.s2 { top: 8px; right: 2px; right: max(2px, calc(50% - 284px)); font-size: 32px; }
.has-quiz .hero-sym.s3 { top: 54%; bottom: auto; left: -6px; left: max(-6px, calc(50% - 292px)); font-size: 34px; }
.has-quiz .hero-sym.s4 { bottom: -26px; left: 22%; font-size: 30px; }
.has-quiz .hero-sym.s5 { top: 66%; right: -4px; right: max(-4px, calc(50% - 290px)); font-size: 30px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: none; } }

/* 1問試す（日本語のみ） */
/* 日本語のトップでは、端末の画像の代わりにファーストビューの右側に置く。上端のラベルで体験できる部品だと示す */
.quiz-card.hero-quiz { position: relative; z-index: 3; max-width: 560px; margin: 16px auto 0; animation: appear 0.9s cubic-bezier(.2, .7, .2, 1) 0.15s both; }
.quiz-badge { position: absolute; top: 0; left: 50%; translate: -50% -50%; background: var(--rose); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; padding: 6px 18px; border-radius: 999px; box-shadow: 0 6px 16px rgba(168, 74, 127, 0.35); white-space: nowrap; }
.quiz-card { max-width: 640px; margin: 0 auto; background: var(--card); border-radius: 24px; border: 1px solid rgba(68, 76, 142, 0.10); box-shadow: 0 24px 60px rgba(68, 76, 142, 0.22), 0 2px 6px rgba(68, 76, 142, 0.06); padding: 34px 24px 20px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quiz-head h2 { font-size: 22px; }
.quiz-hint { color: var(--muted); font-size: 15px; }
.quiz-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.quiz-progress li { width: 14px; height: 14px; border-radius: 50%; background: var(--line); transition: background 0.3s, transform 0.3s; }
.quiz-progress li.on { background: var(--rose); transform: scale(1.2); }
.quiz-stage { position: relative; }
.quiz-staff { display: block; width: 100%; height: auto; overflow: visible; }
.staff-lines line, .quiz-note .ledger { stroke: var(--ink); stroke-width: 1.6; }
.quiz-note .head { fill: var(--ink); transition: fill 0.2s; }
.quiz-note.correct .head { fill: var(--rose); }
.quiz-note.enter { animation: note-in 0.45s cubic-bezier(.2, .8, .2, 1.2); }
.quiz-note.shake { animation: shake 0.4s; }
.quiz-ring { fill: none; stroke: var(--rose); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.quiz-ring.go { animation: ring 0.6s ease-out; }
.quiz-pop { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.spark { position: absolute; font-size: 18px; font-weight: 700; line-height: 1; translate: -50% -50%; animation: spark 1s cubic-bezier(.15, .7, .3, 1) forwards; }
.spark.c0 { color: var(--rose); }
.spark.c1 { color: var(--navy); }
.spark.c2 { color: #e9a23b; }
.quiz-keys { position: relative; display: flex; height: 132px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.key { border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.key.white { flex: 1; background: #fff; border: 1.5px solid #2a2c3a; border-left-width: 0; border-radius: 0 0 8px 8px; box-shadow: inset 0 -6px 0 #ece8f3; transition: background 0.15s; }
.key.white:first-of-type { border-left-width: 1.5px; }
.key.black { position: absolute; top: 0; width: 7.5%; height: 60%; background: #2a2c3a; border-radius: 0 0 6px 6px; z-index: 1; box-shadow: inset 0 -5px 0 #555a70; translate: -50% 0; }
/* 黒鍵の位置（8つの白鍵の境目。ド♯・レ♯・ファ♯・ソ♯・ラ♯） */
.key.black:nth-child(2) { left: 12.5%; }
.key.black:nth-child(4) { left: 25%; }
.key.black:nth-child(7) { left: 50%; }
.key.black:nth-child(9) { left: 62.5%; }
.key.black:nth-child(11) { left: 75%; }
.key.white:active { background: #f1eef8; }
.key.white.hit { animation: hit-white 0.6s; }
.key.black.hit { animation: hit-black 0.6s; }
.key.miss { animation: miss 0.45s; }
.key:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; z-index: 2; }
.quiz-status { min-height: 1.7em; text-align: center; font-weight: 700; color: var(--rose); }
.quiz-card.done .quiz-status { animation: rise 0.4s both; }
/* 5問正解の後: ストアのバッジと「最初からもう一度」（SITE-015。quiz.js） */
.quiz-finish { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: rise 0.4s both; }
.quiz-finish[hidden] { display: none; }
.quiz-finish .badges { justify-content: center; }
.quiz-retry { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.quiz-retry:hover { border-color: var(--rose); color: var(--rose); }
@keyframes note-in { from { opacity: 0; translate: 40px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 4px 0; } }
@keyframes ring { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(2.6); } }
@keyframes spark { from { opacity: 1; transform: translate(0, 0) scale(0.6) rotate(0); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(var(--rot)); } }
@keyframes hit-white { 0% { background: #f6d9e8; } 100% { background: #fff; } }
@keyframes hit-black { 0% { background: var(--rose); } 100% { background: #2a2c3a; } }
@keyframes miss { 0%, 100% { translate: 0 0; } 25% { translate: 0 3px; background-color: #f3c9c9; } }
.key.black.miss { animation-name: miss-black; }
@keyframes miss-black { 0%, 100% { translate: -50% 0; } 25% { translate: -50% 3px; } }

/* 数字で見る Vivo。カードにせず地の上に置く（SITE-008） */
.stats { padding: 8px 0 32px; }
.stat-list { list-style: none; margin: 0 auto; padding: 0; max-width: 880px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { color: var(--rose); font-family: "Vivo Heading", var(--font-body); font-weight: 700; line-height: 1.1; }
.stat-num { font-size: 44px; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 18px; margin-left: 2px; }
.stat-label { color: var(--muted); font-size: 14px; }

/* 流れる五線の帯（区切り。模様は static/staff-band.svg を横に繰り返す） */
.staff-band { height: 80px; margin: 24px 0; background: url("/static/staff-band.svg") repeat-x 0 0 / 480px 80px; animation: staff-flow 60s linear infinite; }
@keyframes staff-flow { to { background-position-x: -1440px; } }

/* スクロールで現れる（トップのファーストビューより下の、欄の見出し・特徴・カードの群だけ。SITE-012）。
   JavaScript が動くときだけ隠しておき、画面に入ったら .is-in で表示する（site.js の revealTargets と同じ要素）。
   学習記事・サポートなど読むためのページは、最初から表示する */
.js .hero ~ section :is(.section-head, .problems h2, .flow, .stat-list, .groups, .feature, .fit-col, .learn-list, .download .wrap) {
  opacity: 0; transform: translateY(12px); transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.js .hero ~ section :is(.section-head, .problems h2, .flow, .stat-list, .groups, .feature, .fit-col, .learn-list, .download .wrap).is-in { opacity: 1; transform: none; }

/* 動きを減らす設定の端末では、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .hero-quiz, .quiz-note.enter, .quiz-note.shake, .quiz-ring.go, .key.hit, .key.miss, .staff-band { animation: none; }
  .js .hero ~ section :is(.section-head, .problems h2, .flow, .stat-list, .groups, .feature, .fit-col, .learn-list, .download .wrap) { opacity: 1; transform: none; transition: none; }
}
/* バッジどうしの余白は、Apple・Google のガイドラインどおりバッジの高さの1/4（12px）以上にする（Google Play の画像は上下に約7px の透明な余白がある） */
.badges { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 12px; }
.badges img { height: 48px; width: auto; display: block; }
/* Google Play の PNG は周囲に透明の余白があるため、見た目の高さが App Store（48px）とそろうように大きくして余白を打ち消す */
.badges .badge-play img { height: 64px; margin: -8px 0; }
.badge-text { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 10px; background: #000; color: #fff; text-decoration: none; font-weight: 700; }
.badge-text:hover { color: #fff; opacity: 0.85; }

/* 1回の練習の流れ（下の数字の欄と続けて見せるため、下の余白を詰める） */
.problems { padding-bottom: 40px; }
.problems .wrap { display: flex; flex-direction: column; gap: 20px; align-items: center; }
/* 1回の練習の流れ: 番号付きの手順（番号は CSS のカウンターで丸の中に出す）。カードにせず地の上に置く（SITE-008） */
.flow { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 12px; counter-reset: flow; text-align: left; }
.flow li { counter-increment: flow; display: flex; align-items: flex-start; gap: 14px; padding: 4px 0; font-size: 17px; }
.flow li::before { content: counter(flow); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--rose); color: #fff; font-weight: 700; font-size: 15px; line-height: 1; margin-top: 1px; }

/* 9種類の練習 */
.practices { background: #fff; }
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.group { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.group h3 { font-size: 20px; margin-bottom: 10px; color: var(--rose); }
.practice-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.practice-list li { display: flex; align-items: flex-start; gap: 12px; }
.practice-list strong { display: block; color: var(--navy); }
.practice-list .icon { flex: none; width: 40px; height: 40px; padding: 7px; border-radius: 12px; background: #fff; color: var(--rose); box-shadow: 0 2px 8px rgba(168, 74, 127, 0.15); }

/* 特徴 */
.features { padding: 96px 0; }
.features .wrap { display: flex; flex-direction: column; gap: 80px; }
.feature { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.feature.reverse { flex-direction: row-reverse; }
.feature-image { flex: 1 1 480px; }
.feature-text { flex: 1 1 340px; display: flex; flex-direction: column; gap: 12px; }
.feature-text h2 { font-size: 26px; }
.feature-image .shot { margin-inline: auto; }

/* 設定・おすすめ */
.fit { background: linear-gradient(180deg, var(--cream), var(--peach)); }
.fit-stack { display: flex; flex-direction: column; gap: 24px; }
.fit-col { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
/* 設定の欄: 左に文字、右に画面写真（幅が足りないときは縦に並ぶ） */
.fit-settings { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px 40px; }
.fit-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; }
.fit-settings .shot { flex: 1 1 360px; min-width: 0; max-width: 520px; margin-inline: auto; }
/* おすすめの欄: パソコンの幅では2列にする */
.checks.checks-cols { display: block; columns: 2 320px; column-gap: 40px; }
.checks-cols li { break-inside: avoid; margin-bottom: 10px; }
.fit-col h2 { font-size: 22px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px; border-left: 3px solid var(--rose); border-bottom: 3px solid var(--rose); transform: rotate(-45deg); }

/* ダウンロード: 体験クイズと同じ強さの影のカードにし、ページの締めとして目立たせる（SITE-008） */
.download { padding: 88px 0 96px; }
.download .wrap { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.download .wrap.narrow { background: var(--card); border-radius: 28px; border: 1px solid rgba(68, 76, 142, 0.10); box-shadow: 0 24px 60px rgba(68, 76, 142, 0.18), 0 2px 6px rgba(68, 76, 142, 0.06); padding: 48px 32px; }
.download h2 { font-size: 30px; }
.download .badges { justify-content: center; }
.download-icon { border-radius: 22px; box-shadow: var(--shadow); }

/* サポート */
.wrap.page { padding: 48px 24px 72px; display: flex; flex-direction: column; gap: 32px; }
.page h1 { font-size: 34px; }
.contact-card { background: #fff; border: 2px solid var(--rose); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.contact-card h2, .faq h2 { font-size: 24px; }
.contact-mail { font-size: 20px; font-weight: 700; }
.hint { color: var(--muted); font-size: 14px; }
.faq { padding: 0; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 24px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; min-height: 44px; color: var(--navy); }
.faq details p { padding: 16px 0 20px; border-top: 1px dashed var(--line); }

.legal-links { display: flex; flex-direction: column; gap: 10px; }
.legal-links h2 { font-size: 24px; }
.legal-links ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* 規約類 */
.legal article { display: flex; flex-direction: column; gap: 14px; }
.legal article h1 { font-size: 32px; }
.legal article h2 { font-size: 21px; margin-top: 24px; scroll-margin-top: 72px; }
.legal article h3 { font-size: 17px; margin-top: 8px; }
.legal article ul, .legal article ol { margin: 0; padding-left: 1.5em; display: flex; flex-direction: column; gap: 6px; }
.legal-date { color: var(--muted); font-size: 14px; }
.legal-langs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.legal-langs a, .legal-langs span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; }
.legal-langs span { border-color: var(--rose); color: var(--rose); font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--cream); color: var(--navy); }
.table-wrap tr:last-child td { border-bottom: 0; }

/* 学習ページ（TASK-080） */
.learn-lead { color: var(--muted); font-size: 17px; }
.learn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.learn-list a { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.learn-list a:hover { border-color: var(--rose); }
.learn-list strong { color: var(--navy); font-size: 18px; }
.learn-list span { color: var(--muted); font-size: 15px; }
.learn-home { background: #fff; }
.learn-support { display: flex; flex-direction: column; gap: 14px; }
.learn-support h2, .related h2 { font-size: 24px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; }
.article { display: flex; flex-direction: column; gap: 16px; }
.article-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.article-head h1 { font-size: 32px; }
.article-date { color: var(--muted); font-size: 14px; }
.article h2 { font-size: 24px; margin-top: 32px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.article h3 { font-size: 19px; margin-top: 12px; }
.article ul, .article ol { margin: 0; padding-left: 1.5em; display: flex; flex-direction: column; gap: 6px; }
.article strong { color: var(--navy); }
.article .point { background: #fff; border-left: 4px solid var(--rose); border-radius: 0 12px 12px 0; padding: 14px 18px; }
.figure { margin: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.figure.diagram .diagram-box { position: relative; display: block; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.figure.diagram img { display: block; max-width: 100%; height: auto; }
.figure.shot img { filter: drop-shadow(0 10px 24px rgba(68, 76, 142, 0.18)); }
.figure figcaption { color: var(--muted); font-size: 14px; text-align: center; }
.table-wrap.compact table { min-width: 0; }
.table-wrap td.num, .table-wrap th.num { white-space: nowrap; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--rose); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.app-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; background: #fff; border: 2px solid var(--rose); border-radius: var(--radius); padding: 24px; }
.app-cta > img { border-radius: 16px; }
.app-cta-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.app-cta-title { font-weight: 700; color: var(--navy); font-size: 18px; }
.related { padding: 0; display: flex; flex-direction: column; gap: 14px; }

/* フッター */
.site-footer { background: var(--navy); color: #eef0fb; padding: 40px 0; }
.site-footer a { color: #ffd9ec; }
.site-footer a:hover { color: #fff; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; font-size: 14px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-name { font-size: 20px; font-weight: 700; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-note, .copyright { width: 100%; color: #c9cce6; font-size: 13px; }

/* タブレット以下: 特徴は「見出し・本文 → 画像」の縦並び */
@media (max-width: 960px) {
  .feature, .feature.reverse { flex-direction: column; gap: 20px; }
  .feature-image, .feature-text { flex: none; width: 100%; }
  .feature-text { order: -1; }
  .features .wrap { gap: 56px; }
}

/* スマホ */
@media (max-width: 720px) {
  section { padding: 48px 0; }
  .problems { padding-bottom: 24px; }
  .features { padding: 64px 0; }
  .download { padding: 56px 0 64px; }
  .download .wrap.narrow { margin-inline: 16px; padding: 36px 16px; border-radius: 22px; }
  .download h2 { font-size: 24px; }
  .fit-col { padding: 22px 18px; }
  .wrap { padding: 0 16px; }
  .wrap.page { padding: 32px 16px 56px; }
  /* スマホの幅では、ヘッダーのリンクを ≡ のメニューにまとめる（SITE-007） */
  .main-nav { gap: 8px; }
  .main-nav > a { display: none; }
  .nav-menu { display: block; }
  .hero { padding: 32px 0 48px; }
  .hero-text h1 { font-size: 30px; }
  .lead { font-size: 16px; }
  /* スマホでは画面写真をストアのバッジ・注記の後ろに回し、バッジを最初の画面に残す（SITE-017）。バッジは（.badges の既定どおり）横に並べる（SITE-006） */
  .hero-phone { order: 1; max-width: none; }
  .hero-sym { font-size: 24px; }
  .has-quiz .quiz-card.hero-quiz { max-width: calc(100% - 24px); }
  .has-quiz .quiz-head h2 { font-size: 18px; }
  .has-quiz .quiz-progress { gap: 5px; }
  .has-quiz .quiz-progress li { width: 12px; height: 12px; }
  .has-quiz .hero-sym { font-size: 26px; }
  .has-quiz .hero-sym.s1 { top: -6px; left: -4px; }
  .has-quiz .hero-sym.s2 { top: 12px; right: -6px; }
  .has-quiz .hero-sym.s3 { left: -10px; }
  .has-quiz .hero-sym.s4 { bottom: -34px; }
  .has-quiz .hero-sym.s5 { right: -8px; }
  .quiz-card { padding: 28px 14px 14px; border-radius: 20px; }
  .quiz-head h2 { font-size: 19px; }
  .quiz-keys { height: 116px; }
  .stat-list { grid-template-columns: repeat(2, 1fr); gap: 12px 0; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat-num { font-size: 36px; }
  .staff-band { height: 60px; background-size: 360px 60px; margin: 16px 0; }
  section h2 { font-size: 23px; }
  .article-head h1 { font-size: 26px; }
  .article h2 { font-size: 21px; }
}

/* ---- 4択の問題（耳で1問・調号・音程。動きは quiz.js） ---- */
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { min-height: 52px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--navy); font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform 0.1s, box-shadow 0.1s, background 0.2s; -webkit-tap-highlight-color: transparent; }
.choice:hover:not(:disabled) { border-color: var(--rose); }
.choice:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.choice:disabled { opacity: 0.45; cursor: default; }
.choice.right { background: var(--rose); border-color: var(--rose); color: #fff; box-shadow: 0 3px 0 var(--rose-dark); opacity: 1; }
.choice.wrong-choice { animation: shake 0.4s; }
.choice:focus-visible, .ear-play:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.quiz-signs.enter { animation: rise 0.4s both; }
.quiz-choice .quiz-staff { margin-bottom: 4px; }
/* 耳で1問: 大きな再生ボタン */
.ear-play { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px auto 14px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--navy); font-weight: 700; -webkit-tap-highlight-color: transparent; }
.ear-icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 30px; padding-left: 6px; box-shadow: 0 10px 24px rgba(168, 74, 127, 0.35); transition: transform 0.15s; }
.ear-play:hover .ear-icon { transform: scale(1.05); }
.ear-play:active .ear-icon { transform: scale(0.95); }
.ear-play:not(.played) .ear-icon { animation: breathe 2.4s ease-in-out infinite; }
.ear-play.pulse .ear-icon { animation: ear-pulse 0.6s ease-out; }
@keyframes breathe { 0%, 100% { box-shadow: 0 10px 24px rgba(168, 74, 127, 0.35), 0 0 0 0 rgba(168, 74, 127, 0.35); } 50% { box-shadow: 0 10px 24px rgba(168, 74, 127, 0.35), 0 0 0 14px rgba(168, 74, 127, 0); } }
@keyframes ear-pulse { 0% { transform: scale(0.92); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.feature-quiz { max-width: 520px; margin: 18px auto 0; }
.article-quiz { margin: 8px 0 0; padding-top: 18px; }
.article-quiz .quiz-card { max-width: 600px; }

/* ---- 学習記事の一覧: 記事の譜例を小さく添える ---- */
.learn-list a { flex-direction: row; align-items: center; gap: 18px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.learn-thumb { flex: none; width: 132px; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.learn-text { display: flex; flex-direction: column; gap: 4px; }

/* ---- 練習の分野のタブ（スマホのみ表示。パソコンは3列をすべて並べる） ---- */
.group-tabs { display: none; }

/* ---- ダウンロード欄の QR コード（パソコンのみ） ---- */
.qr-block { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; padding: 20px 28px; background: var(--cream); border-radius: var(--radius); }
.qr-title { font-weight: 700; color: var(--navy); }
.qr-list { display: flex; gap: 28px; }
.qr-list figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.qr-list img { width: 132px; height: 132px; image-rendering: pixelated; }
@media (hover: none), (max-width: 720px) { .qr-block { display: none; } }

/* ---- 追いかけるダウンロードボタン（トップはファーストビュー、学習記事は記事の見出しを過ぎると現れる: site.js） ---- */
.sticky-cta { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; background: var(--rose); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 12px 30px rgba(168, 74, 127, 0.4); transform: translateY(140%); opacity: 0; transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), opacity 0.35s; }
.sticky-cta::before { content: "♪"; }
.sticky-cta.show { transform: none; opacity: 1; }
.sticky-cta:hover { color: #fff; background: var(--rose-dark); }

/* ---- よくある質問: ＋/− の印と、開くときの動き ---- */
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--peach); color: var(--rose); font-size: 20px; font-weight: 700; line-height: 1; transition: transform 0.25s, background 0.25s; }
.faq details[open] summary::after { content: "−"; background: var(--rose); color: #fff; transform: rotate(180deg); }
.faq details[open] > p { animation: rise 0.3s both; }
.faq details { transition: border-color 0.2s, box-shadow 0.2s; }
.faq details:hover, .faq details[open] { border-color: #e7c3d6; box-shadow: var(--shadow); }

/* ---- 細かな手触り: マウスを乗せると浮く・押すと沈む ---- */
@media (hover: hover) {
  .group { transition: transform 0.25s, box-shadow 0.25s; }
  .group:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(68, 76, 142, 0.12); }
  .learn-list a:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(68, 76, 142, 0.14); }
  .practice-list .icon { transition: transform 0.25s; }
  .group:hover .practice-list .icon { transform: rotate(-6deg) scale(1.06); }
}
.badges a { transition: transform 0.15s, filter 0.15s; }
.badges a:hover { transform: translateY(-2px); filter: brightness(1.1); }
.badges a:active { transform: translateY(1px); }

/* ---- スマホ ---- */
@media (max-width: 720px) {
  .group-tabs { display: flex; gap: 6px; padding: 5px; margin: 0 auto 16px; max-width: 420px; background: var(--peach); border-radius: 999px; }
  .group-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; transition: background 0.2s, color 0.2s; }
  .group-tabs button[aria-selected="true"] { background: var(--rose); color: #fff; box-shadow: 0 4px 12px rgba(168, 74, 127, 0.3); }
  .groups.has-tabs .group.tab-hidden { display: none; }
  .groups.has-tabs .group { animation: rise 0.35s both; }
  .sticky-cta { left: 16px; right: 16px; bottom: 12px; justify-content: center; padding: 15px 20px; }
  .learn-list a { gap: 12px; padding: 14px 16px; }
  .learn-thumb { width: 88px; }
  .choice { font-size: 16px; min-height: 48px; }
  .feature-quiz { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
  .ear-play .ear-icon, .ear-play.pulse .ear-icon, .choice.wrong-choice, .quiz-signs.enter,
  .faq details[open] > p, .groups.has-tabs .group { animation: none; }
}


/* ---- 学習ページの譜例を押して音を聴く（diagram-sound.js。ボタンの位置は build_website.py の learn_figure） ---- */
.diagram-spots { position: absolute; inset: 8px; }
.diagram-spot { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.2s; }
.diagram-spot:hover { background: rgba(168, 74, 127, 0.07); }
.diagram-spot:focus-visible { outline: 2px solid var(--rose); outline-offset: -2px; }
.diagram-spot.playing { background: rgba(168, 74, 127, 0.13); animation: spot-pulse 0.5s ease-out; }
@keyframes spot-pulse { from { box-shadow: inset 0 0 0 3px rgba(168, 74, 127, 0.5); } to { box-shadow: inset 0 0 0 3px rgba(168, 74, 127, 0); } }
.diagram-hint { position: absolute; top: -12px; right: 12px; z-index: 1; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; box-shadow: 0 4px 10px rgba(168, 74, 127, 0.3); pointer-events: none; white-space: nowrap; }
.figure.playable { margin-top: 18px; }

/* ---- 譜読みの確認問題の段階（ト音記号・ヘ音記号・加線の音） ---- */
.quiz-levels { display: flex; gap: 6px; padding: 5px; background: var(--peach); border-radius: 999px; align-self: flex-start; flex-wrap: wrap; }
.quiz-levels button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--navy); cursor: pointer; transition: background 0.2s, color 0.2s; }
.quiz-levels button[aria-pressed="true"] { background: var(--rose); color: #fff; box-shadow: 0 4px 12px rgba(168, 74, 127, 0.3); }

/* 学習記事の区切りの五線の帯は、本文の幅いっぱいにする */
.learn .staff-band { margin: 32px 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .diagram-spot.playing { animation: none; }
}
