@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/Inter-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/Inter-Bold.ttf") format("truetype"); }

:root {
  --bg: #0B0D10; --text: #F2F4F7; --dim: #8A93A0; --accent: #3DE0FF;
  --card: #151a20; --line: #262d36; --ok: #4ade80; --bad: #ff7a7a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 640px; margin: 0 auto; padding: 8px 18px 40px; }
.top { max-width: 640px; margin: 0 auto; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 10px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.back { color: var(--dim); text-decoration: none; }
h1 { font-size: 32px; line-height: 1.15; margin: 12px 0; font-weight: 700; }
h2 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
h3 { font-size: 16px; margin: 18px 0 6px; font-weight: 600; }
.lead { font-size: 19px; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 16px 0; }
.note { color: var(--dim); border-top: 1px solid var(--line); padding-top: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px;
  background: #1d242c; color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  font: 600 16px "Inter", system-ui, sans-serif; cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary, .btn.big { background: var(--accent); color: #05161b; border-color: var(--accent); }
.btn.big { min-height: 60px; font-size: 20px; padding: 14px 28px; width: 100%; }
.btn.danger { border-color: #6b2f2f; color: var(--bad); }
.btn.note { min-width: 0; padding: 8px; font-size: 18px; }
.btn.ok { background: #12351f; border-color: var(--ok); color: var(--ok); }
.btn.bad { background: #3a1818; border-color: var(--bad); color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 38px; }
.cta { margin: 20px 0 8px; }
.seq { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0; counter-reset: s; }
.seq li { min-width: 46px; text-align: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--dim); font-weight: 600; }
.seq li.learned { color: var(--ok); border-color: #1f5c36; }
.seq li.current { color: #05161b; background: var(--accent); border-color: var(--accent); }
.stats { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 10px; }
.stats li { flex: 1; background: #10151a; border-radius: 12px; padding: 12px 8px; text-align: center; }
.stats span { display: block; font-size: 26px; font-weight: 700; color: var(--accent); }
.stats small { color: var(--dim); font-size: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.plain { padding-left: 0; list-style: none; }
.plain li { padding: 4px 0; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.feedback { min-height: 28px; font-weight: 600; margin: 6px 0; }
.count { font-weight: 600; }
.confirm { border: 1px solid #6b2f2f; border-radius: 12px; padding: 12px; margin: 10px 0; background: #1c1212; }
textarea { width: 100%; background: #0f1318; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 13px/1.4 ui-monospace, Consolas, monospace; margin: 6px 0 10px; }
input[type=text], select { width: 100%; background: #0f1318; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 16px; font-family: inherit; line-height: 1.4; margin: 6px 0 10px; min-height: 44px; }
input[type=text]:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#sync-code, #sync-link { font: 13px/1.4 ui-monospace, Consolas, monospace; }
.song-box { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.foot { text-align: center; color: var(--dim); padding: 24px 18px 40px; font-size: 14px; }
.faq dt { font-weight: 600; margin-top: 12px; }
.faq dd { margin: 4px 0 0; color: #cfd5de; }

@media (prefers-reduced-motion: no-preference) { .btn { transition: border-color .15s, background .15s; } }
@media (min-width: 520px) { .hero h1 { font-size: 46px; } .grid { grid-template-columns: repeat(6, 1fr); } }
.center { text-align: center; }

/* ---- nav, banners, session steps, optional modes, chart ---- */
.nav { display: flex; gap: 6px; }
.nav a { color: var(--dim); text-decoration: none; padding: 12px 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--text); }
.banner { background: #14232b; border: 1px solid #1e5766; border-radius: 14px; padding: 14px; margin: 8px 0 12px; }
.banner p { margin: 0 0 6px; }
.confirm-card { border-color: var(--accent); }
.done-banner { background: #12351f; border: 1px solid #1f5c36; color: #b9f3cd; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 8px 4px; background: #10151a; color: var(--text); border: 1px solid var(--line); border-radius: 12px; font: 600 14px "Inter", system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
.step b { font-size: 16px; color: var(--accent); }
.step small { color: var(--dim); font-weight: 400; font-size: 12px; }
.step.active { border-color: var(--accent); background: #0f2229; }
.step.done b { color: var(--ok); }
.step:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt-list { display: grid; gap: 8px; margin: 10px 0; }
.btn.opt { flex-direction: column; align-items: flex-start; text-align: left; padding: 12px 16px; gap: 2px; width: 100%; }
.btn.opt b { font-size: 16px; }
.btn.opt small { color: var(--dim); font-weight: 400; font-size: 13px; }
.review li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.chart { margin: 6px 0 10px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 128px; border-bottom: 1px solid var(--line); }
.barcol { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; max-width: 30px; background: var(--accent); border-radius: 4px 4px 0 0; }
.barlbl { font-size: 11px; color: var(--text); }
.bardate { font-size: 10px; color: var(--dim); margin-top: 2px; position: relative; top: 16px; height: 0; white-space: nowrap; }
.chart { padding-bottom: 20px; }
.tbl caption { text-align: left; }
.card .count { margin: 6px 0; }
