@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

/* Colors live in design-tokens.css. This file expects that sheet first. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--mn-font-sans);
  color: var(--mn-ink);
  background: var(--mn-surface-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mn-green-700); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--mn-line); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font-weight: 700; text-decoration: none; color: var(--mn-ink); white-space: nowrap; }
.brand span { color: var(--mn-green-600); }
.variants { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.variants a { text-decoration: none; color: var(--mn-ink-soft); padding: 6px 12px; border-radius: 999px; font-size: .92rem; white-space: nowrap; }
.variants a:hover { background: var(--mn-green-50); }
.variants a.on { background: var(--mn-ink); color: #fff; }

/* Segmented control */
.seg { display: inline-flex; background: #eef3f1; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: .88rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--mn-ink-soft); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--mn-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 600; }

/* Type */
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--mn-green-700); background: var(--mn-green-50); padding: 4px 10px; border-radius: 999px; }
h1 { font-family: var(--mn-font-display); font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.1; margin: .35em 0 .3em; letter-spacing: -.01em; }
h2 { font-family: var(--mn-font-display); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; margin: 0 0 .4em; }
h3 { margin: 0 0 .3em; font-size: 1.1rem; }
.lead { font-size: 1.15rem; color: var(--mn-ink-soft); max-width: 720px; margin: 0; }
.muted { color: var(--mn-muted); }
.hero { padding: 48px 24px 28px; }
section { margin-bottom: 40px; }

.card { background: #fff; border: 1px solid var(--mn-line); border-radius: 20px; padding: 24px; box-shadow: var(--mn-shadow-soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--mn-line); background: #fff; color: var(--mn-ink); font: inherit; font-weight: 600; font-size: .95rem; padding: 10px 16px; border-radius: 12px; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--mn-green-500); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--mn-ink); color: #fff; border-color: var(--mn-ink); }
.btn.primary:hover { background: #1e3a31; }
.btn.green { background: var(--mn-green-500); color: #fff; border-color: var(--mn-green-500); }

/* Pattern dots ⚪⚫ */
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 14px; height: 14px; border-radius: 50%; display: block; border: 2px solid var(--mn-ink); }
.dots i.w { background: #fff; }
.dots i.b { background: var(--mn-ink); }
.dots.lg i { width: 22px; height: 22px; border-width: 2.5px; }

/* Role legend */
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; color: var(--mn-ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* Keyboard */
.kb { width: 100%; height: auto; display: block; user-select: none; }
.key { transition: fill .25s var(--mn-ease); }
.key-w { fill: #fff; stroke: #c3d1cb; stroke-width: 1; }
.key-b { fill: #1b2622; }
.key-w:hover { fill: #f2f8f5; }
.key-b:hover { fill: #2c3a35; }
.key-name { font-size: 12px; fill: #9aaba4; text-anchor: middle; font-family: var(--mn-font-sans); pointer-events: none; }
.key-w.hl-r { fill: var(--c-r-soft); } .key-b.hl-r { fill: var(--c-r); }
.key-w.hl-t { fill: var(--c-t-soft); } .key-b.hl-t { fill: var(--c-t); }
.key-w.hl-f { fill: var(--c-f-soft); } .key-b.hl-f { fill: var(--c-f); }
.key-w.hl-s { fill: var(--c-s-soft); } .key-b.hl-s { fill: var(--c-s); }
.key-w.step { fill: #e6f0ec; } .key-b.step { fill: #4b5d56; }
.marker { pointer-events: none; animation: pop .35s var(--mn-ease); }
.marker circle { stroke: #fff; stroke-width: 2.5; }
.marker text { fill: #fff; font-weight: 700; text-anchor: middle; font-family: var(--mn-font-sans); }
.marker .finger { fill: var(--mn-muted); font-weight: 600; font-size: 11px; }
.m-r circle { fill: var(--c-r); } .m-t circle { fill: var(--c-t); } .m-f circle { fill: var(--c-f); } .m-s circle { fill: var(--c-s); }
@keyframes pop { from { opacity: 0; transform-box: fill-box; } to { opacity: 1; } }

.chord-name-big { font-family: var(--mn-font-display); font-size: 3rem; font-weight: 700; line-height: 1; }
.notes-row { display: flex; gap: 8px; flex-wrap: wrap; }
.note-chip { padding: 4px 12px; border-radius: 999px; font-weight: 700; color: #fff; font-size: 1rem; }
.note-chip.r { background: var(--c-r); } .note-chip.t { background: var(--c-t); } .note-chip.f { background: var(--c-f); } .note-chip.s { background: var(--c-s); }

footer.note { padding: 30px 24px 60px; color: var(--mn-muted); font-size: .9rem; }

@media (max-width: 720px) {
  .topbar-in { gap: 10px; }
  .brand { display: none; }
  .hero { padding-top: 32px; }
  .card { padding: 18px; border-radius: 16px; }
}

/* Hub */
.variants-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s var(--mn-ease), box-shadow .2s; }
.vcard:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(15,31,26,.10); }
.thumb { height: 170px; border-radius: 14px; background: var(--mn-surface-2); display: grid; place-items: center; margin-bottom: 16px; }
.vcard h3 { font-size: 1.25rem; }
.vcard .tag { font-size: .78rem; font-weight: 700; color: var(--mn-green-700); text-transform: uppercase; letter-spacing: .06em; }
.vcard p { margin: 6px 0; color: var(--mn-ink-soft); font-size: .95rem; }
.vcard .go { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--mn-green-700); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hub-note { margin-top: 18px; }

/* Home: audio → piano notes */
.notes-panel { margin-top: 28px; display: grid; gap: 14px; }
.notes-track { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.notes-track legend { font-weight: 600; font-size: .95rem; width: 100%; padding: 0; }
.notes-track label { display: inline-flex; gap: 6px; align-items: center; }
.notes-solo { width: 100%; }
.notes-track-warn { margin: 0; color: var(--mn-ink-soft); }
.notes-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.notes-drop { border: 2.5px dashed #b9d8cb; border-radius: 20px; padding: 44px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; transition: .2s; }
.notes-drop-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--mn-green-50); display: grid; place-items: center; font-size: 1.8rem; color: var(--mn-green-600); }
.notes-drop-title { font-size: 1.35rem; font-weight: 700; }
.notes-drop-or, .notes-drop-limits { color: var(--mn-muted); font-size: .88rem; }
.notes-free { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--mn-green-700); background: var(--mn-green-50); border-radius: 999px; padding: 3px 10px; }
.notes-panel[data-state="drag"] .notes-drop { border-color: var(--mn-green-500); background: var(--mn-green-50); }
.notes-file-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.notes-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--mn-surface-2); border: 1px solid var(--mn-line); border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.notes-chip small { color: var(--mn-muted); font-weight: 500; }
.notes-another { background: none; border: 0; font: inherit; color: var(--mn-green-700); font-weight: 600; cursor: pointer; padding: 0; }
.notes-reading { margin: 0; color: var(--mn-muted); }
.notes-download { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 100%; }
.notes-split { display: inline-flex; position: relative; max-width: 100%; }
.notes-split-main { border-radius: 12px 0 0 12px; }
.notes-split-more { border-radius: 0 12px 12px 0; border-left: 1px solid rgba(255,255,255,.25); padding: 10px 12px; flex: none; }
.notes-menu { position: absolute; top: calc(100% + 8px); left: 0; width: min(330px, calc(100vw - 48px)); background: #fff; border: 1px solid var(--mn-line); border-radius: 16px; box-shadow: 0 18px 50px rgba(15,31,26,.16); padding: 6px; z-index: 5; }
.notes-menu[hidden] { display: none; }
.notes-menu button { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.notes-menu button:hover { background: var(--mn-surface-2); }
.notes-menu b { display: block; }
.notes-menu small { color: var(--mn-muted); }
.notes-menu hr { border: 0; border-top: 1px solid var(--mn-line); margin: 4px 6px; }
.notes-midi-hint { margin: 0; color: var(--mn-muted); font-size: .88rem; }
.notes-panel[data-state="empty"] .notes-file-row,
.notes-panel[data-state="empty"] .notes-busy,
.notes-panel[data-state="empty"] .notes-summary,
.notes-panel[data-state="empty"] .notes-clipped,
.notes-panel[data-state="empty"] .notes-player,
.notes-panel[data-state="empty"] .notes-kb-wrap,
.notes-panel[data-state="empty"] .notes-roll,
.notes-panel[data-state="empty"] .falling-notes,
.notes-panel[data-state="empty"] .notes-download,
.notes-panel[data-state="drag"] .notes-file-row,
.notes-panel[data-state="drag"] .notes-busy,
.notes-panel[data-state="drag"] .notes-summary,
.notes-panel[data-state="drag"] .notes-clipped,
.notes-panel[data-state="drag"] .notes-player,
.notes-panel[data-state="drag"] .notes-kb-wrap,
.notes-panel[data-state="drag"] .notes-roll,
.notes-panel[data-state="drag"] .falling-notes,
.notes-panel[data-state="drag"] .notes-download,
.notes-panel[data-state="loading"] .notes-drop,
.notes-panel[data-state="loading"] .notes-another,
.notes-panel[data-state="loading"] .notes-summary,
.notes-panel[data-state="loading"] .notes-clipped,
.notes-panel[data-state="loading"] .notes-player,
.notes-panel[data-state="loading"] .notes-kb-wrap,
.notes-panel[data-state="loading"] .notes-roll,
.notes-panel[data-state="loading"] .falling-notes,
.notes-panel[data-state="loading"] .notes-download,
.notes-panel[data-state="result"] .notes-drop,
.notes-panel[data-state="result"] .notes-busy { display: none; }
@media (max-width: 640px) {
  .notes-drop { padding: 28px 16px; }
  .notes-drop-title { font-size: 1.15rem; }
  .notes-split { display: flex; width: 100%; }
  .notes-split-main { flex: 1; justify-content: center; min-width: 0; }
  .notes-menu { width: 100%; }
}
.notes-status { margin: 0; font-weight: 600; color: var(--mn-ink-soft); }
.notes-status.bad { color: #b91c1c; }
.notes-summary, .notes-clipped { margin: 0; font-weight: 600; }
.notes-clipped { color: var(--mn-ink-soft); }
.notes-player { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.notes-player input[type="range"] { flex: 1; min-width: 120px; }
.notes-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.notes-speed { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.notes-speed select { font: inherit; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--mn-line); background: #fff; }
.notes-busy { display: flex; align-items: center; gap: 10px; }
.notes-lottie { width: calc(var(--animation-loading-height) * 400 / 160); height: var(--animation-loading-height); flex: none; overflow: hidden; }
.notes-lottie[hidden] { display: none; }
.notes-lottie svg { width: 100%; height: 100%; display: block; }
.notes-busy.is-lottie .notes-busy-bar { display: none; }
.notes-busy-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--mn-green-100); overflow: hidden; position: relative; }
.notes-busy-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; background: var(--mn-green-500); animation: notes-busy 1s ease-in-out infinite; }
@keyframes notes-busy { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.notes-kb-wrap { overflow-x: auto; border-radius: 14px; background: var(--mn-surface-2); padding: 10px; }
.notes-kb-wrap .kb { min-width: 480px; }
.falling-notes { width: 100%; height: auto; display: block; min-width: 480px; margin-bottom: 6px; }
.falling-notes[hidden] { display: none; }
.falling-notes .hit { stroke: var(--c-r); stroke-width: 2; }
.falling-notes .bar { fill: var(--c-r); opacity: .8; }
.falling-notes .bar.on { opacity: 1; }
.falling-notes .bar-label { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; font-family: var(--mn-font-sans, sans-serif); pointer-events: none; }
.notes-sheet { margin: 8px auto 40px; }
.notes-sheet-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 14px; }
.notes-sheet-tools label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.notes-sheet-body h2 { margin-bottom: .2em; }
.sheet-meta { margin: 0 0 12px; color: var(--mn-ink-soft); }
.sheet-line { font-size: 1.35rem; font-weight: 700; margin: 0 0 8px; letter-spacing: .01em; }
.sheet-kb { display: flex; align-items: flex-start; height: 78px; margin: 8px 0 16px; }
.sheet-kb i { position: relative; display: block; box-sizing: border-box; }
.sheet-kb i.w { width: 16px; height: 58px; background: #fff; border: 1px solid #111; }
.sheet-kb i.b { width: 10px; height: 34px; background: #1b2622; margin: 0 -5px; z-index: 1; border: 0; }
.sheet-kb b { position: absolute; left: 0; bottom: -16px; font-style: normal; font-size: 10px; font-weight: 700; color: #111; white-space: nowrap; }
@media print {
  body.printing-notes > *:not(.notes-sheet) { display: none !important; }
  body.printing-notes .notes-sheet { display: block !important; margin: 0; }
  body.printing-notes .notes-sheet-tools { display: none !important; }
}
.notes-practice { margin: 36px 0 10px; }
.notes-practice h2 { margin-bottom: .2em; }
.notes-practice .lead { font-size: 1.05rem; }
.lang-select { border: 0; background: #eef3f1; border-radius: 999px; padding: 6px 10px; font: inherit; color: var(--mn-ink); }
#trainer { scroll-margin-top: 76px; }
/* Patterns page only: theory and the quiz are two tabs, not one long page. */
.pattern-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.pattern-tab { border: 1px solid var(--mn-line); background: #fff; border-radius: 14px; padding: 12px 16px; font: inherit; font-weight: 700; cursor: pointer; color: var(--mn-ink-soft); }
.pattern-tab.on { background: var(--mn-ink); color: #fff; border-color: var(--mn-ink); }
[data-pattern-panel][hidden] { display: none !important; }

/* Patterns */
.words { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; max-width: 760px; }
.word { border-radius: 20px; padding: 20px 22px; color: #fff; }
.word.cfg { background: linear-gradient(135deg, #0e9f6e, #15c39a); }
.word.dea { background: linear-gradient(135deg, #b45309, #f59e0b); }
.word .big { font-size: 3rem; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.word .big small { font-size: 1.6rem; opacity: .55; letter-spacing: 0; font-weight: 600; }
.word p { margin: 8px 0 0; opacity: .92; font-size: .95rem; }
.hl1 { color: var(--mn-green-600); } .hl2 { color: #d97706; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.steps .card h3 { display: flex; align-items: center; gap: 10px; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--mn-ink); color: #fff; display: inline-grid; place-items: center; font-size: .9rem; flex: none; }
.alpha { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.alpha span { width: 38px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; border: 1px solid var(--mn-line); color: var(--mn-muted); }
.alpha span.on { background: var(--mn-ink); color: #fff; border-color: var(--mn-ink); }
.sheet-scroll { overflow-x: auto; padding-bottom: 6px; }
.sheet { display: grid; grid-template-columns: 84px 1fr 1fr 1fr 1.25fr; grid-template-rows: auto 1fr 1fr; gap: 10px; min-width: 820px; }
.colh { font-weight: 700; text-align: center; padding: 6px 4px; font-size: .95rem; }
.colh small { display: block; font-weight: 500; color: var(--mn-muted); font-size: .8rem; }
.rowh { display: flex; align-items: center; justify-content: center; font-weight: 700; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.05rem; letter-spacing: .05em; }
.cross { grid-column: 2 / 4; grid-row: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; position: relative; }
.swap-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: var(--mn-ink); color: #fff; display: grid; place-items: center; font-size: 1.5rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 2; pointer-events: none; }
.cell { border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; border: 2px solid transparent; transition: opacity .25s, transform .25s, box-shadow .25s; min-height: 132px; }
.cell.p-www { background: #ecfdf5; border-color: #a7f3d0; }
.cell.p-wbw { background: #fffbeb; border-color: #fde68a; }
.cell.p-bwb { background: #eef2f6; border-color: #cbd5e1; }
.cell.odd { background: #fff; border: 2px dashed var(--mn-line); align-items: stretch; }
.cell.dim { opacity: .5; }
.cell.glow { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.08); }
.cell .cap { font-size: .8rem; color: var(--mn-muted); text-align: center; line-height: 1.3; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.cbtn { border: 0; background: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; min-width: 52px; padding: 8px 10px; border-radius: 10px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.cbtn:hover { transform: translateY(-1px); }
.cbtn.on { background: var(--mn-ink); color: #fff; }
.odd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.odd-row .cbtn { min-width: 64px; }
.sheet-note { margin-top: 14px; color: var(--mn-ink-soft); }
.stage { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.stage .sub { font-weight: 600; color: var(--mn-muted); margin-top: 4px; }
.explain { margin: 18px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.explain li { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; }
.explain .num { width: 22px; height: 22px; font-size: .75rem; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-top { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; margin: 18px 0; }
.q-chord { font-family: var(--mn-font-display); font-size: 5rem; font-weight: 700; text-align: center; line-height: 1; padding: 18px 0; border-radius: 20px; background: var(--mn-surface-2); }
.q-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.q-opt { border: 2px solid var(--mn-line); background: #fff; border-radius: 14px; padding: 14px 8px; cursor: pointer; display: grid; gap: 8px; justify-items: center; font: inherit; font-size: .85rem; color: var(--mn-ink-soft); }
.q-opt:hover { border-color: var(--mn-ink); }
.q-opt.right { border-color: var(--c-r); background: #ecfdf5; }
.q-opt.wrong { border-color: #ef4444; background: #fef2f2; }
.fb { min-height: 28px; font-weight: 600; }
.fb.ok { color: var(--mn-green-700); } .fb.bad { color: #b91c1c; }
.score { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--mn-muted); }

/* Hops */
.types { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.type { border: 2px solid var(--mn-line); background: #fff; border-radius: 16px; padding: 14px; cursor: pointer; text-align: left; font: inherit; color: var(--mn-ink); }
.type:hover { transform: translateY(-2px); }
.type.on { border-color: var(--mn-ink); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.type .f { font-size: 1.7rem; font-weight: 800; }
.type .n { font-weight: 700; }
.type .d { font-size: .82rem; color: var(--mn-muted); line-height: 1.35; margin-top: 4px; }
.t4 { color: var(--c-t); } .t3 { color: var(--c-f); } .t7 { color: var(--c-s); }
.stage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.formula { font-size: 1.6rem; font-weight: 800; color: var(--mn-ink-soft); }
.hint { font-size: .95rem; color: var(--mn-muted); }
.arc { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.arc.draw { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw .5s var(--mn-ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.arc-label circle { stroke: #fff; stroke-width: 3; }
.arc-label text { fill: #fff; font-weight: 800; font-size: 18px; text-anchor: middle; font-family: var(--mn-font-sans); }
.count circle { fill: var(--mn-ink); }
.count text { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; font-family: var(--mn-font-sans); }
.frame path { fill: none; stroke: var(--c-f); stroke-width: 2.5; }
.frame text { fill: var(--c-f); font-weight: 700; font-size: 14px; font-family: var(--mn-font-sans); }
.marker.slide { transition: transform .5s var(--mn-ease); }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tip .ill { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.tip p { margin: 0; font-size: .92rem; color: var(--mn-ink-soft); }
.count-demo { display: flex; gap: 3px; margin: 6px 0 10px; }
.count-demo span { flex: 1; height: 46px; border-radius: 6px; border: 1px solid var(--mn-line); display: grid; place-items: end center; padding-bottom: 4px; font-size: .75rem; font-weight: 700; }
.count-demo span.b { background: var(--mn-ink); color: #fff; height: 32px; border-color: var(--mn-ink); }
.count-demo span.end { background: var(--c-t-soft); }
.count-demo span.st { background: var(--c-r-soft); }

/* Clock — stage is wider than the patterns stage */
.clock-stage { grid-template-columns: minmax(300px, 460px) 1fr; align-items: center; }
#clock { width: 100%; height: auto; display: block; user-select: none; }
.node { cursor: pointer; }
.node circle { transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.node:hover circle { transform: scale(1.1); }
.node.w circle { fill: #fff; stroke: #b8c8c1; stroke-width: 1.5; }
.node.b circle { fill: #1b2622; }
.node text { font-weight: 700; text-anchor: middle; font-family: var(--mn-font-sans); pointer-events: none; }
.node.w text { fill: var(--mn-ink); } .node.b text { fill: #fff; }
.poly { fill: rgba(16,185,129,.10); stroke: var(--mn-ink); stroke-width: 2.5; stroke-linejoin: round; }
.ring { fill: none; stroke-width: 6; }
.oarc { fill: none; stroke-width: 4; stroke-linecap: round; }
.olabel { font-weight: 800; font-size: 17px; text-anchor: middle; font-family: var(--mn-font-sans); }
.center-name { font-family: var(--mn-font-display); font-weight: 700; font-size: 46px; text-anchor: middle; fill: var(--mn-ink); }
.center-sub { font-size: 13px; text-anchor: middle; fill: var(--mn-muted); font-family: var(--mn-font-sans); letter-spacing: .06em; text-transform: uppercase; }
.ticks line { stroke: #dfe8e4; stroke-width: 1; }
.panel .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.rot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.mn { margin-top: 22px; display: grid; gap: 10px; }
.mn div { display: flex; gap: 12px; align-items: center; background: var(--mn-surface-2); border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.kbd { display: inline-block; border: 1px solid var(--mn-line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: .8rem; background: #fff; }

/* Chart */
.chart-groups { display: grid; gap: 16px; margin-bottom: 18px; }
.chart-groups h2 { font-family: var(--mn-font-sans); font-size: 1rem; margin: 0; }

.site-legal { padding: 28px 24px 48px; color: var(--mn-muted); font-size: .85rem; }
.policy { max-width: 760px; padding-top: 36px; padding-bottom: 12px; }
.policy h2 { margin-top: 1.5em; }
.policy table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 12px 0 4px; }
.policy th, .policy td { border-bottom: 1px solid var(--mn-line); text-align: left; vertical-align: top; padding: 8px 12px 8px 0; }
.policy code { font-size: .9em; }

@media (max-width: 900px) {
  .variants-grid, .types { grid-template-columns: 1fr 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .words, .steps, .stage, .quiz-top, .clock-stage { grid-template-columns: 1fr; }
  .q-opts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) { .tips, .variants-grid, .types { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .arc.draw { animation: none; stroke-dashoffset: 0; }
  .vcard, .marker.slide { transition: none; }
}
html.app-embed .topbar,
html.app-embed footer,
html.app-embed .footer { display: none; }
