/* Notley Piano.
   A dark stage, like a concert hall with the lights down: ebony surfaces, ivory text, a felt-red accent and brass for Premium.
   Everything blends: no boxed navigation, no outlines around sections. Song covers carry the colour.
   Sheet music sits on warm paper, the one bright surface, because that is what you read music from. */
:root {
  --bg: #111214; --bg2: #0B0C0E; --card: #1A1B1F; --card2: #232429; --card3: #2C2E34; --line: #2B2D33;
  --text: #F3F0E8; --mute: #A3A099; --faint: #6F6D69;
  --accent: #E2475E; --accent-hi: #EE5D72; --accent-soft: rgb(226 71 94 / .14);
  --brass: #D5B06B; --brass-soft: rgb(213 176 107 / .14);
  --good: #3CC48A; --good-soft: rgb(60 196 138 / .14); --bad: #EF5B5B; --bad-soft: rgb(239 91 91 / .14);
  --paper: #F8F5EE; --ink: #1C1C1F;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --r: 8px; --side: 104px;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html.locked { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: #FFF; }
.ico { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--mute); }
.fine { font-size: 13px; color: var(--mute); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2F3137; border-radius: 10px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: #FFF; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: scale(.98); }
.btn.soft { background: var(--card2); color: var(--text); }
.btn.soft:hover { background: var(--card3); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px #3A3C43; }
.btn.ghost:hover { background: var(--card); }
.btn.brass { background: var(--brass); color: #1B160C; }
.btn.brass:hover { background: #E2C07F; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .ico { width: 18px; height: 18px; }
.btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--text); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--text); }
.brand .mark { width: 32px; height: 32px; border-radius: 8px; background: var(--text); color: var(--bg); display: grid; place-items: center; flex: none; }
.brand .mark svg { width: 19px; height: 19px; }
.brand em { font-style: normal; font-weight: 400; color: var(--mute); }

/* ---------- Song cards ---------- */
.row { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 15vw, 200px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; }
.row::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; }
.scard, .ccard { display: flex; flex-direction: column; gap: 3px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; scroll-snap-align: start; min-width: 0; color: var(--text); text-decoration: none; }
.cover { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--card); margin-bottom: 8px; }
.cover svg { width: 100%; height: 100%; display: block; transition: transform .35s ease; }
.scard:hover .cover svg { transform: scale(1.04); }
.hov { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: rgb(0 0 0 / .35); color: #FFF; opacity: 0; transition: opacity .2s; }
.hov svg { width: 44px !important; height: 44px !important; padding: 12px; border-radius: 50%; background: rgb(0 0 0 / .55); transform: none !important; }
.scard:hover .hov, .scard:focus-visible .hov { opacity: 1; }
.scard.locked .hov svg { display: none; }
.ctag { position: absolute; z-index: 1; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgb(12 13 15 / .7); color: #FFF; display: grid; place-items: center; }
.ctag svg { width: 18px !important; height: 18px !important; transform: none !important; }
.cprog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(0 0 0 / .45); }
.cprog i { display: block; height: 100%; background: var(--accent); }
.lv { display: flex; gap: 4px; height: 6px; align-items: center; }
.lv i { width: 6px; height: 6px; border-radius: 50%; background: #3A3C43; }
.lv i.on { background: var(--good); }
.lv i.on:nth-child(2) { background: var(--brass); } .lv i.on:nth-child(3) { background: var(--accent); }
.ctitle { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ctitle b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctitle .lk { width: 13px; height: 13px; color: var(--mute); flex: none; display: inline-flex; }
.ctitle .lk svg { width: 100%; height: 100%; }
.ctitle .done { color: var(--good); font-weight: 700; font-size: 13px; }
.csub { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard.locked .cover svg { filter: saturate(.75) brightness(.85); }
/* Sheet-music cards: a little page with the real score on it */
.cover.sheetcv { background: var(--paper); container-type: inline-size; }
.sthumb { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 9% 6% 0; color: var(--ink); transition: transform .35s ease; transform-origin: 50% 0; }
.sthumb b { flex: none; font: 700 7.4cqw/1.15 Georgia, "Times New Roman", serif; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sthumb small { flex: none; font: italic 4.4cqw Georgia, serif; color: #6F6B63; text-align: center; margin: 1.5cqw 0 3cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover .sthumb svg.score { width: 100%; height: auto; flex: none; margin: 0; transition: none; }
.scard:hover .cover .sthumb svg.score { transform: none; }
.scard:hover .sthumb { transform: scale(1.03); }
.scard.locked .cover .sthumb svg { filter: none; }
.scard.locked .sthumb { opacity: .8; }
.cover.sheetcv::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.ccard .ckeys { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r); background: linear-gradient(160deg, #24262C, #17181B); margin-bottom: 8px; padding: 9%; }
.ccard .ckeys svg { width: 100%; height: auto; }
.ccard b { font-size: 16px; font-weight: 700; }
.ccard:hover .ckeys { background: linear-gradient(160deg, #2C2E35, #1B1C20); }
.empty { color: var(--mute); padding: 20px 0; }

/* ---------- Landing ---------- */
.land { max-width: 1240px; margin: 0 auto; padding: 18px max(24px, env(safe-area-inset-right)) 48px max(24px, env(safe-area-inset-left)); }
.land-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.land-top nav { display: flex; gap: 10px; align-items: center; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; padding: 64px 0 72px; }
.hero h1 { font-size: clamp(42px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.04em; font-weight: 750; }
.hero p { font-size: 19px; color: var(--mute); margin-top: 20px; max-width: 34ch; }
.hero .acts { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.collage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; transform: rotate(-4deg); }
.collage .scard:nth-child(3n+2) { transform: translateY(28px); }
.collage .scard { pointer-events: auto; }
.lrow { margin-top: 44px; }
.lrow-head, .shead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lrow-head h2, .shead h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 700; }
.shead .ctl { display: flex; gap: 6px; align-items: center; }
.shead a, .shead .more { color: var(--accent-hi); text-decoration: none; font-size: 15px; font-weight: 500; background: none; border: 0; cursor: pointer; }
.rowctl { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--card2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.rowctl:hover { background: var(--card3); }
.rowctl svg { width: 16px; height: 16px; }
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 80px; }
.feats h2 { font-size: 20px; font-weight: 700; margin: 14px 0 6px; }
.feats p { color: var(--mute); max-width: 36ch; }
.feats .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--accent-hi); }
.feats .fi svg { width: 24px; height: 24px; }
.land-foot { margin-top: 80px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.land-foot a { color: var(--mute); text-decoration: none; } .land-foot a:hover { color: var(--text); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 40px; padding: 28px 0 40px; } .collage { transform: none; } .feats { grid-template-columns: 1fr; margin-top: 48px; } }
@media (max-width: 560px) { .land-top nav .btn:not(.ghost) { display: none; } .brand { white-space: nowrap; } .land { padding-inline: 16px; } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; padding: 22px 0 18px; background: var(--bg2); }
.side .mark-only { display: grid; place-items: center; margin-bottom: 26px; text-decoration: none; }
.side .mark-only .mark { width: 38px; height: 38px; border-radius: 10px; background: var(--text); color: var(--bg2); display: grid; place-items: center; }
.side .mark-only .mark svg { width: 22px; height: 22px; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav.bottom { margin-top: auto; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px; text-decoration: none; color: var(--mute); font-size: 12px; font-weight: 500; transition: color .15s; }
.tab .ico { width: 26px; height: 26px; }
.tab:hover { color: var(--text); }
/* the active tab gets a small ivory key at the edge, like a key held down */
.tab[aria-current="page"] { color: var(--accent-hi); }
.tab[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 34px; margin-top: -17px; border-radius: 0 3px 3px 0; background: var(--accent-hi); }
.tab.prem { color: var(--brass); }
.tab.prem[aria-current="page"] { color: var(--brass); } .tab.prem[aria-current="page"]::before { background: var(--brass); }
.main { min-width: 0; padding: 34px clamp(20px, 3.4vw, 48px) 72px; }
.panel { max-width: 1400px; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.phead h1, .phead .ptitle { font-size: 34px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 750; }
.phead p { color: var(--mute); margin-top: 6px; font-size: 17px; }
.sec { margin-top: 44px; }
.mtop { display: none; }
.show-m { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chips button, .chip { min-height: 36px; padding: 0 15px; border-radius: 999px; border: 0; background: var(--card2); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chips button:hover, .chip:hover { background: var(--card3); }
.chips button[aria-pressed="true"], .chip.on { background: var(--text); color: var(--bg); }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; padding-bottom: 78px; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
  .side { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgb(11 12 14 / .96); backdrop-filter: blur(12px); }
  .side .mark-only { display: none; }
  .nav { flex-direction: row; flex: 5; gap: 0; } .nav.bottom { flex: 2; margin: 0; }
  .tab { flex: 1; padding: 6px 2px; font-size: 11px; gap: 3px; } .tab .ico { width: 23px; height: 23px; }
  .tab[aria-current="page"]::before { left: 50%; top: -6px; width: 28px; height: 3px; margin: 0 0 0 -14px; border-radius: 0 0 3px 3px; }
  .main { padding: 20px 16px 32px; }
  .phead .ptitle { font-size: 28px; }
  .row { grid-auto-columns: 42vw; gap: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .hide-m { display: none !important; }
  .show-m { display: inline; }
}

/* Home */
.hi h2 { font-size: 34px; letter-spacing: -0.03em; font-weight: 750; line-height: 1.1; }
.hi p { color: var(--mute); font-size: 18px; margin-top: 4px; font-weight: 500; }
.herorow { display: grid; grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.hcard { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 236px; padding: 22px; border-radius: 12px; overflow: hidden; text-decoration: none; color: #FFF;
  background: radial-gradient(120% 140% at 85% 0%, #5A1E2A 0%, transparent 55%), linear-gradient(135deg, #2A1A1F 0%, #15161A 70%); }
.hcard .keysart { position: absolute; right: -10px; top: 22px; width: 58%; opacity: .95; transform: rotate(-8deg); }
.hcard small { color: #E8C9CF; font-size: 13px; font-weight: 600; }
.hcard b { font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; margin-top: 4px; max-width: 14ch; }
.hcard span.m { color: #D4CFC6; margin-top: 6px; font-size: 14px; }
.hcard .go { position: absolute; right: 18px; bottom: 18px; }
.mini { display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border-radius: 12px; background: var(--card); text-decoration: none; color: var(--text); min-height: 236px; }
.mini:hover, .hcard:hover { filter: brightness(1.08); }
.mini .ico { width: 30px; height: 30px; color: var(--accent-hi); }
.mini b { font-size: 18px; } .mini span { color: var(--mute); font-size: 14px; }
@media (max-width: 1100px) { .herorow { grid-template-columns: 1fr 1fr; } .hcard { grid-column: 1 / -1; } }
@media (max-width: 760px) { .herorow { grid-template-columns: 1fr; } .mini { display: none; } .hcard { min-height: 200px; } }

/* Practice */
.drills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pz { display: flex; flex-direction: column; text-align: left; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text); }
.pz-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 12px; margin-bottom: 10px; color: #FFF; overflow: hidden; }
.pz-art svg { width: 54px; height: 54px; position: relative; }
#card-ear .pz-art { background: radial-gradient(90% 120% at 20% 0%, #4B3A7A, transparent 60%), linear-gradient(135deg, #2B2347, #16151F); }
#card-theory .pz-art { background: radial-gradient(90% 120% at 20% 0%, #1F5A57, transparent 60%), linear-gradient(135deg, #17363A, #131719); }
#card-notes .pz-art { background: radial-gradient(90% 120% at 20% 0%, #6B4A1C, transparent 60%), linear-gradient(135deg, #3A2A16, #17140F); }
.pz:hover .pz-art { filter: brightness(1.12); }
.pz-main { display: flex; flex-direction: column; }
.pz-name { font-weight: 700; font-size: 18px; }
.pz-desc { color: var(--mute); font-size: 14px; }
.pz-state { align-self: flex-start; margin-top: 10px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #FFF; }
.pz-state.going { background: var(--card2); color: var(--text); }
.pz-state.done { background: var(--good-soft); color: var(--good); }
.lvltag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--card2); color: var(--mute); vertical-align: 3px; }
.lvltag:empty { display: none; }
.lvltag.lv-easy { color: var(--good); } .lvltag.lv-hard { color: var(--accent-hi); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--card2); border: 0; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.pill .ico { width: 17px; height: 17px; color: #F28C38; }
.pill.cold .ico { color: var(--faint); }
.sharecard { margin-top: 30px; background: var(--card); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.sharecard h2 { font-size: 19px; font-weight: 700; }
.result { font: 500 15px/1.6 var(--font); background: var(--bg); border-radius: var(--r); padding: 14px 16px; white-space: pre-wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.copied { font-size: 13px; color: var(--good); font-weight: 600; min-height: 18px; }
.copybox { width: 100%; min-height: 110px; border-radius: var(--r); border: 0; background: var(--bg); padding: 10px; }
.next { display: flex; justify-content: space-between; color: var(--mute); font-size: 14px; }
.next b { color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .drills { grid-template-columns: 1fr; } .pz { display: grid; grid-template-columns: 96px 1fr; gap: 0 14px; align-items: center; } .pz-art { margin: 0; aspect-ratio: 1; grid-row: span 2; } .pz-art svg { width: 36px; height: 36px; } .pz-state { margin-top: 6px; } }

/* Full-screen views (drills, song learner, sheet music) */
.screen { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: auto; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.sin { max-width: 680px; margin-inline: auto; min-height: 100%; display: flex; flex-direction: column; padding: 8px 18px 22px; }
.sbar { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.sbar .x { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--card2); display: grid; place-items: center; cursor: pointer; color: var(--text); flex: none; }
.sbar .x:hover { background: var(--card3); }
.sbar .x .ico { width: 20px; height: 20px; }
.sbar h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sbar .grow { flex: 1; }
.prog { font-weight: 600; color: var(--mute); font-variant-numeric: tabular-nums; }
.howto { font-size: 16px; color: var(--mute); text-align: center; }
.picker { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; }
.picker h3 { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; }
.picker > p { color: var(--mute); margin-bottom: 8px; }
.lvls { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.lvl { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 18px; background: var(--card); border: 0; border-radius: 12px; cursor: pointer; }
.lvl:hover { background: var(--card2); }
.lvl.last { box-shadow: inset 0 0 0 2px var(--accent); }
.lvl-main { flex: 1; display: flex; flex-direction: column; }
.lvl-main b { font-weight: 700; font-size: 18px; }
.lvl-main span { color: var(--mute); font-size: 14px; }
.lvl-dot { display: flex; gap: 3px; align-items: flex-end; }
.lvl-dot i { width: 6px; border-radius: 2px; background: #3A3C43; }
.lvl-dot i:nth-child(1) { height: 8px; } .lvl-dot i:nth-child(2) { height: 14px; } .lvl-dot i:nth-child(3) { height: 20px; }
.lvl-dot i.on { background: var(--accent-hi); }
.quiz { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-block: 12px; }
.dots { display: flex; justify-content: center; gap: 5px; }
.dots i { width: 22px; height: 5px; border-radius: 3px; background: #33353B; }
.dots i.now { background: var(--text); } .dots i.ok { background: var(--good); } .dots i.no { background: var(--bad); }
.bigplay { align-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 140px; height: 140px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: #FFF; font-weight: 600; font-size: 14px; box-shadow: 0 0 0 10px var(--accent-soft); }
.bigplay:hover { background: var(--accent-hi); }
.bigplay .ico { width: 46px; height: 46px; }
.qcard { align-self: center; padding: 22px 34px; border-radius: 14px; background: var(--card); }
.qcard b { font-size: 46px; font-weight: 750; letter-spacing: -0.02em; }
.qdiagram { align-self: center; width: 100%; max-width: 440px; }
.qdiagram svg { width: 100%; height: auto; display: block; }
.qdiagram .staff { background: var(--paper); border-radius: 12px; padding: 8px; }
.kbd .wk { fill: #FFFFFF; stroke: #0B0C0E; stroke-width: 1.2; } .kbd .bk { fill: #1B1C20; }
.kbd .wk.on { fill: #F6C8D0; } .kbd .bk.on { fill: var(--accent); }
.kdot { fill: var(--accent); } .klbl { fill: #8A877F; font: 600 11px var(--font); }
.staff .sl { stroke: var(--ink); stroke-width: 1.2; } .staff .nh { fill: var(--ink); } .staff .stem { stroke: var(--ink); stroke-width: 1.6; }
.staff .clef { fill: #6A6760; font: 600 13px var(--font); }
.answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.answers.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .answers.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .answers.wide { grid-template-columns: 1fr; }
.ans { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 4px; border-radius: 12px; background: var(--card); border: 0; cursor: pointer; }
.ans:hover { background: var(--card2); }
.ans b { font-weight: 600; font-size: 15px; text-align: center; }
.ans small { font-size: 12px; color: var(--faint); }
.ans:disabled { cursor: default; opacity: .4; }
.ans.right { background: var(--good); color: #0B1A12; opacity: 1; } .ans.right small { color: #0B1A12; }
.ans.wrong { background: var(--bad); color: #FFF; opacity: 1; } .ans.wrong small { color: #FFF; }
.fb { text-align: center; font-weight: 600; min-height: 22px; }
.fb.good { color: var(--good); } .fb.bad { color: var(--bad); }
.solved { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding-block: 20px; }
.solved h2 { font-size: 32px; font-weight: 750; letter-spacing: -0.02em; }
.scorebig b { font-size: 96px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.scorebig span { font-size: 28px; color: var(--faint); margin-left: 4px; font-weight: 600; }
.squares { display: flex; gap: 5px; }
.squares i { width: 18px; height: 18px; border-radius: 4px; }
.squares i.ok { background: var(--good); } .squares i.no { background: var(--bad); }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 440px; }
.st { padding: 14px 8px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border-radius: 12px; }
.st span { font-size: 13px; color: var(--mute); }
.st b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 440px; }

/* Song learner */
.phrases { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pchip { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--card2); font-size: 14px; font-weight: 600; cursor: pointer; }
.pchip.on { background: var(--text); color: var(--bg); }
.pchip.done:not(.on) { color: var(--good); }
.nstrip { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.nstrip .n { min-width: 32px; padding: 7px 8px; border-radius: 8px; background: var(--card); font-weight: 700; font-size: 14px; text-align: center; color: var(--mute); }
.nstrip .n.past { color: var(--good); background: var(--good-soft); }
.nstrip .n.now { background: var(--accent); color: #FFF; }
.sgmsg { text-align: center; color: var(--mute); min-height: 22px; }
.pkeys { position: relative; width: 100%; height: 200px; user-select: none; -webkit-user-select: none; touch-action: manipulation; background: #050506; border-radius: 10px; border-top: 12px solid #050506; box-shadow: 0 20px 40px rgb(0 0 0 / .4); }
.pk { position: absolute; top: 0; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pk.w { height: 100%; background: linear-gradient(#FFFFFF 88%, #E9E6DF); border-right: 1px solid #C9C6BE; border-radius: 0 0 6px 6px; z-index: 1; padding-bottom: 8px; }
.pk.b { height: 60%; background: linear-gradient(#2A2B30, #111214 85%); border-radius: 0 0 4px 4px; z-index: 2; padding-bottom: 6px; box-shadow: 0 2px 3px rgb(0 0 0 / .5); }
.pk .kc { font-size: 11px; font-weight: 600; color: #9A978F; }
.pk .kn { font-size: 16px; font-weight: 800; color: #FFF; }
.pk.next { background: var(--accent) !important; }
.pk.next .kc { display: none; }
.pk.hit, .pk.play { background: var(--good) !important; }
.pk.miss { background: var(--bad) !important; }
.sgtools, .sgdone { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Sheet music viewer */
.sheetbar { position: sticky; top: 0; z-index: 2; background: rgb(17 18 20 / .94); backdrop-filter: blur(10px); }
.sheetbar .in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.sheetbar .t { flex: 1; min-width: 180px; }
.sheetbar .t b { display: block; font-size: 18px; font-weight: 700; }
.sheetbar .t span { color: var(--mute); font-size: 14px; }
.sheetbar .ctls { display: flex; gap: 8px; flex-wrap: wrap; }
.paperwrap { max-width: 980px; margin: 8px auto 40px; padding: 0 18px; }
.paper { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 38px clamp(18px, 5vw, 56px) 46px; box-shadow: 0 30px 60px rgb(0 0 0 / .45); }
.paper h2 { font: 700 30px/1.15 Georgia, "Times New Roman", serif; text-align: center; letter-spacing: -0.01em; }
.paper .by { display: flex; justify-content: space-between; color: #5D5A54; font: italic 14px Georgia, serif; margin: 10px 0 18px; }
.score { display: block; margin-bottom: 8px; overflow: visible; }
.score .sl { stroke: #3A3A3A; stroke-width: .9; } .score .clef { fill: var(--ink); } .score .head { fill: var(--ink); } .score .head.open { fill: var(--paper); stroke: var(--ink); stroke-width: 1.7; }
.score .stem { stroke: var(--ink); stroke-width: 1.25; } .score .beam, .score .flag { fill: var(--ink); } .score .ledger { stroke: var(--ink); stroke-width: 1.1; }
.score .bar { stroke: var(--ink); stroke-width: 1.1; } .score .barthick { fill: var(--ink); } .score .tie { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.score .dot { fill: var(--ink); } .score .acc { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.score .ts { font: 700 25px Georgia, "Times New Roman", serif; fill: var(--ink); } .score .mnum { font: italic 10px Georgia, serif; fill: #77736B; }
.score .nname { font: 700 10px var(--font); fill: #9E1B32; }
.score .nt.on .head { fill: #C8203A; } .score .nt.on .head.open { stroke: #C8203A; fill: #F7D2D8; } .score .nt.on .stem { stroke: #C8203A; } .score .nt.on .nname { fill: #C8203A; }

/* Chords tab */
.rootpick { background: #050506; border-radius: 10px; padding: 12px 12px 0; max-width: 560px; }
.rootpick svg { width: 100%; height: auto; display: block; cursor: pointer; }
.rootpick .w { fill: #FFFFFF; stroke: #050506; stroke-width: 1.5; } .rootpick .b { fill: #1E1F23; }
.rootpick .w.sel, .rootpick .b.sel { fill: var(--accent); }
.rootpick .w:hover:not(.sel) { fill: #F3D9DE; } .rootpick .b:hover:not(.sel) { fill: #4A2A31; }
.rootpick text { font: 600 12px var(--font); fill: #8A877F; pointer-events: none; }
.rootpick text.b { fill: #FFFFFF; font-size: 10px; } .rootpick text.sel { fill: #FFFFFF; }
.types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.types button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--card2); cursor: pointer; font-size: 14px; font-weight: 600; }
.types button:hover { background: var(--card3); }
.types button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chordhead { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.chordhead h2 { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.chordhead p { color: var(--mute); font-size: 17px; }
.chordnotes { display: flex; gap: 8px; margin: 18px 0 6px; flex-wrap: wrap; }
.chordnotes span { min-width: 54px; padding: 10px 12px; text-align: center; background: var(--card); border-radius: 10px; font-weight: 700; font-size: 20px; }
.chordnotes span small { display: block; font-size: 11px; font-weight: 500; color: var(--mute); }
.invs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 22px; }
.inv { background: var(--card); border-radius: 12px; padding: 18px; }
.inv h3 { font-size: 17px; font-weight: 700; }
.inv p { color: var(--mute); font-size: 14px; margin: 2px 0 12px; }
.inv .row2 { margin-top: 14px; }
.pkbd { width: 100%; height: auto; display: block; }
.pkbd .wk { fill: #FFFFFF; stroke: #0B0C0E; stroke-width: 1.1; } .pkbd .bk { fill: #1B1C20; }
.pkbd .wk.on { fill: #F6C8D0; } .pkbd .bk.on { fill: #C0495C; }
.pkbd .wk.root, .pkbd .bk.root { fill: var(--accent); }
.pkbd .nl { font: 700 11px var(--font); fill: #1C1C1F; } .pkbd .nl.b, .pkbd .nl.r { fill: #FFFFFF; } .pkbd .nl.b { font-size: 8px; }
.pkbd .fg { font: 600 11px var(--font); fill: var(--mute); }
.about { color: var(--mute); margin-top: 22px; max-width: 64ch; }

/* Account and Premium */
.kv { max-width: 620px; background: var(--card); border-radius: 12px; padding: 4px 20px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--mute); }
.kv b { font-weight: 600; }
.fields { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin-top: 12px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--mute); }
.field input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--card2); color: var(--text); }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.okmsg { color: var(--good); font-weight: 600; margin-top: 10px; min-height: 0; }
.subh { font-size: 20px; font-weight: 700; margin: 40px 0 12px; }
.plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; max-width: 900px; }
.plan > div { padding: 28px; border-radius: 16px; background: var(--card); }
.plan .prem { background: radial-gradient(120% 120% at 100% 0%, rgb(213 176 107 / .22), transparent 55%), var(--card); box-shadow: inset 0 0 0 1px rgb(213 176 107 / .45); }
.plan h2 { font-size: 20px; font-weight: 700; }
.plan .prem h2 { color: var(--brass); }
.plan .price { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; margin: 10px 0 4px; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--mute); letter-spacing: 0; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 18px 0 24px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "✓"; color: var(--mute); font-weight: 700; }
.plan .prem li::before { color: var(--brass); }
.premcovers { display: flex; margin: 0 0 20px; }
.premcovers span { width: 54px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; margin-right: -14px; box-shadow: 0 0 0 3px #22201C; }
.premcovers svg { width: 100%; height: 100%; display: block; }
@media (max-width: 760px) { .plan { grid-template-columns: 1fr; } }

/* Dialogs */
dialog { border: 0; padding: 0; background: var(--card); color: var(--text); width: min(460px, calc(100% - 24px)); border-radius: 18px; box-shadow: 0 30px 80px rgb(0 0 0 / .6); }
dialog::backdrop { background: rgb(0 0 0 / .7); backdrop-filter: blur(3px); }
.dlg { position: relative; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.dlg h2 { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; padding-right: 30px; }
.dlg p { color: var(--mute); }
.dlg .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--card2); cursor: pointer; color: var(--mute); display: grid; place-items: center; }
.dlg .x:hover { color: var(--text); }
.dlg .x .ico { width: 18px; height: 18px; }
.dlg .acts { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; align-items: center; }
.dlg .lockhead { display: flex; align-items: center; gap: 8px; color: var(--brass); font-weight: 700; font-size: 14px; }
.dlg .lockhead svg { width: 16px; height: 16px; }
.dlg .art { margin: -28px -28px 6px; height: 150px; overflow: hidden; border-radius: 18px 18px 0 0; position: relative; }
.dlg .art svg { width: 100%; height: 100%; display: block; }
.dlg .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--card)); }
.dlg .artrow { display: flex; height: 100%; } .dlg .artrow span { flex: 1; } .dlg .artrow svg { height: 100%; width: 100%; }
.err { color: var(--bad); font-size: 14px; }

/* Stats dialog */
.big4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.big4 div { padding: 10px 6px; background: var(--card2); border-radius: 10px; }
.big4 b { display: block; font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; }
.big4 span { font-size: 12px; color: var(--mute); }
.chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 110px; }
.chart .bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.chart .bar i { width: 100%; max-width: 16px; background: var(--accent); border-radius: 3px 3px 1px 1px; }
.chart .bar.empty i { background: #33353B; }
.chart .bar span { font-size: 10px; color: var(--faint); }
.trow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* Public pages */
.pub { max-width: 1040px; margin: 0 auto; padding: 18px max(24px, env(safe-area-inset-right)) 48px max(24px, env(safe-area-inset-left)); }
.crumbs { font-size: 14px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.crumbs a { color: var(--mute); text-decoration: none; } .crumbs a:hover { color: var(--text); }
.pagehead { display: flex; gap: 28px; align-items: flex-end; padding: 18px 0 26px; }
.pagehead .pcover { width: 168px; flex: none; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.pagehead .pcover svg { width: 100%; height: 100%; display: block; }
.pagehead h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
.pagehead p { color: var(--mute); margin-top: 8px; font-size: 17px; }
.prose { display: flex; flex-direction: column; gap: 12px; max-width: 68ch; margin-top: 24px; }
.prose h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-top: 10px; }
.prose p, .prose li { color: var(--mute); }
.prose ul { padding-left: 20px; }
.prose a { color: var(--text); }
.gate { margin: 32px 0; padding: 26px 28px; border-radius: 16px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: radial-gradient(120% 160% at 100% 0%, #4A1A25, transparent 60%), var(--card); }
.gate b { font-size: 20px; display: block; }
.gate p { color: var(--mute); max-width: 50ch; margin-top: 2px; }
.pubsheet { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 26px clamp(14px, 4vw, 40px) 22px; margin-top: 8px; box-shadow: 0 24px 50px rgb(0 0 0 / .4); }
.pubsheet .cap { font: italic 14px Georgia, serif; color: #5D5A54; margin-bottom: 8px; }
.notes-t { width: 100%; max-width: 600px; border-collapse: collapse; margin-top: 8px; }
.notes-t th, .notes-t td { text-align: left; padding: 11px 6px; border-bottom: 1px solid var(--line); }
.notes-t th { font-size: 13px; font-weight: 600; color: var(--mute); }
.notes-t td b { font-size: 18px; }
.keytable { border-collapse: collapse; width: 100%; font-size: 14px; }
.keytable th, .keytable td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.keytable a { text-decoration: none; font-weight: 600; color: var(--text); } .keytable a:hover { color: var(--accent-hi); }
.keytable th { color: var(--mute); font-weight: 600; }
.tbl-wrap { overflow-x: auto; background: var(--card); border-radius: 12px; padding: 6px 12px; }
.pubkeys { max-width: 460px; margin-top: 18px; background: #050506; border-radius: 10px; padding: 12px; }
.songsheet .ph p { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ln { display: inline-flex; flex-direction: column; align-items: center; min-width: 36px; padding: 7px 7px 5px; border-radius: 8px; background: var(--card); font-weight: 700; font-size: 18px; line-height: 1; }
.ln small { font-size: 10px; font-weight: 500; color: var(--mute); min-height: 10px; margin-top: 3px; }
@media (max-width: 640px) { .pagehead { flex-direction: column; align-items: flex-start; gap: 16px; } .pagehead .pcover { width: 120px; } }
.ping { animation: ping .35s ease; }
@keyframes ping { 40% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
