/* Music symbols (♩ ♪ ♫ ♬) from Noto Music, everything else from the Garamonds */
@font-face{font-family:'IvorySym';font-display:swap;src:url(https://fonts.gstatic.com/s/notomusic/v22/pe0rMIiSN5pO63htf1sxEkW7I9tAcVwob5A.woff2) format('woff2'),local('Apple Symbols'),local('Segoe UI Symbol');unicode-range:U+2669-266C;size-adjust:150%}
:root {
  --bg: #0b0a09;
  --bg2: #12100e;
  --panel: rgba(255, 248, 235, 0.028);
  --panel-solid: #15120f;
  --line: rgba(201, 169, 107, 0.14);
  --line2: rgba(201, 169, 107, 0.26);
  --text: #efe6d2;
  --muted: #a89f8d;
  --dim: #6f685c;
  --violet: #c9a96b;
  --violet2: #8c6d3f;
  --cyan: #e2cfa0;
  --pink: #c08a8a;
  --amber: #d1a85a;
  --green: #8fae8b;
  --red: #c2665e;
  --R: #d9bf86;
  --L: #9fb4c7;
  --gold: #c9a96b;
  --ivory: #efe6d2;
  --paper: #f4eddd;
  --ink: #1d1813;
  --radius: 6px;
  --nav: 220px;
  --dock: 170px;
  --font: 'IvorySym', 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --display: 'IvorySym', 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --music: 'Noto Music', 'Bravura Text', 'Apple Symbols', serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
#app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--nav) 1fr; height: 100vh; }

/* ---------- Nav ---------- */
#nav { display: flex; flex-direction: column; padding: 22px 14px; min-height: 0; overflow: hidden; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(16, 14, 12, .85), rgba(11, 10, 9, .85)); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; padding: 4px 10px 22px; }
.brand .logo { width: 32px; height: 32px; filter: drop-shadow(0 0 12px rgba(201, 169, 107, .5)); }
#nav nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: none; min-height: 0; flex: 1 1 auto; }
.nav-group { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.28); padding: 12px 12px 4px; font-weight: 600; }
.nav-group:first-child { padding-top: 2px; }
#nav a[data-view] { display: flex; align-items: center; gap: 12px; padding: 7.5px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 14.5px; transition: .2s; position: relative; }
#nav a[data-view] svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#nav a[data-view]:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
#nav a.active { color: var(--text); background: linear-gradient(90deg, rgba(201, 169, 107, .18), rgba(159, 180, 199, .06)); }
#nav a.active::before { content: ''; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: linear-gradient(var(--violet), var(--cyan)); }
.nav-foot { margin-top: 8px; }
.nav-foot .legal { font-size: 11px; line-height: 1.4; color: var(--muted, #8a8174); padding: 8px 12px 2px; opacity: .8; }
.nav-foot .legal a { display: inline; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Main ---------- */
main { display: grid; grid-template-rows: 64px 1fr auto; min-width: 0; height: 100vh; }
#top { display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(11, 10, 9, .45); backdrop-filter: blur(10px); }
#crumb { font-weight: 600; color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
#crumb b { color: var(--text); }
.top-right { display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pill.ghost { cursor: default; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.pill.on .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(143, 174, 139, .7); animation: pulse 2s infinite; }
.pill.on { border-color: rgba(143, 174, 139, .35); }
.pill.warn .dot { background: var(--amber); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(143, 174, 139, .6); } 70% { box-shadow: 0 0 0 9px rgba(143, 174, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 174, 139, 0); } }
#levelPill .xpbar { width: 70px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
#levelPill .xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width .8s cubic-bezier(.2, .9, .3, 1); }
#view { overflow: auto; padding: 26px 28px 30px; position: relative; scroll-behavior: smooth; }
#view::-webkit-scrollbar, .staff-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
#view::-webkit-scrollbar-thumb, .staff-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 8px; }
.view-enter { animation: viewIn .45s cubic-bezier(.2, .9, .3, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Dock / Piano ---------- */
#dock { position: relative; height: var(--dock); padding: 0 18px 12px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(11, 10, 9, .3), rgba(11, 10, 9, .95)); transition: height .35s; }
#dock.hidden { height: 0; padding: 0; overflow: hidden; border: 0; }
#dockInfo { height: 26px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 0 4px; }
#chordName { font-weight: 800; color: var(--text); font-size: 14px; }
#piano { position: relative; height: calc(100% - 26px); user-select: none; touch-action: none; }
.piano { position: relative; }
.key { position: absolute; top: 0; border-radius: 0 0 7px 7px; cursor: pointer; transition: background .08s, transform .08s, box-shadow .15s; }
.key.white { height: 100%; background: linear-gradient(180deg, #ece3cf 0%, #f7f1e4 70%, #e2d7bf 100%); border: 1px solid #a89a7e; border-top: 0; z-index: 1; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .08); }
.key.black { height: 62%; background: linear-gradient(180deg, #2b2621, #0c0a09 85%, #3a332c); z-index: 2; border-radius: 0 0 5px 5px; box-shadow: 0 3px 5px rgba(0, 0, 0, .5), inset 0 -4px 0 rgba(255, 255, 255, .06); }
.key .lbl { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; font-size: 10px; color: #8b7e66; font-weight: 600; pointer-events: none; }
.key .lbl.q { color: #8c7a5b; font-family: var(--mono); font-size: 10px; }
.key.black .lbl.q { color: #c9b48a; }
.key .finger { position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; }
.key.black .finger { bottom: 10px; width: 20px; height: 20px; font-size: 12px; }
.key.hint-next .finger, .key.hint-soon .finger { opacity: 1; }
.key.hint-next.hand-R .finger { background: var(--R); color: #16120c; box-shadow: 0 0 16px var(--R); }
.key.hint-next.hand-L .finger { background: var(--L); color: #1d1612; box-shadow: 0 0 16px var(--L); }
.key.hint-soon .finger { background: transparent; border: 1.5px solid currentColor; color: #a89f8d; transform: translateX(-50%) scale(.85); }
.key.white.hint-next.hand-R { background: linear-gradient(180deg, #f3e3bd, #e8cf98); }
.key.white.hint-next.hand-L { background: linear-gradient(180deg, #e3ebf2, #ccd9e5); }
.key.black.hint-next.hand-R { background: linear-gradient(180deg, #4a3d26, #2c2416); }
.key.black.hint-next.hand-L { background: linear-gradient(180deg, #33404d, #1f2830); }
.key.down.white { background: linear-gradient(180deg, #e2cfa0, #c9a96b); transform: translateY(2px); }
.key.down.black { background: linear-gradient(180deg, #8c6d3f, #5e4a2c); transform: translateY(1px); }
.key.demo.white { background: linear-gradient(180deg, #cfe0c6, #a9c4a1); }
.key.demo.black { background: linear-gradient(180deg, #5f7f5b, #3e5a3b); }
.key .glow { position: absolute; left: -30%; right: -30%; top: -60px; height: 60px; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 100%, rgba(201, 169, 107, calc(.4 + var(--vel, .7) * .6)), transparent 70%); }
.key.down .glow { opacity: 1; }
.key.flash-good { animation: fgood .45s; }
.key.flash-bad { animation: fbad .45s; }
@keyframes fgood { 0% { box-shadow: 0 0 0 0 rgba(143, 174, 139, .9), 0 0 30px rgba(143, 174, 139, .8); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes fbad { 0%, 100% { filter: none; } 30% { filter: hue-rotate(140deg) saturate(3); box-shadow: 0 0 24px rgba(181, 84, 78, .9); } }

/* ---------- Generic UI ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(12px); }
.card h3 { font-size: 15px; margin-bottom: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.grid { display: grid; gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { border: 0; background: linear-gradient(135deg, #b08d57, #7f95a8); color: white; box-shadow: 0 8px 28px -8px rgba(176, 141, 87, .7); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.big { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 42px; padding: 0; }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg button { border: 0; background: none; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: rgba(255, 255, 255, .12); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 9px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.chip.R { color: var(--R); border-color: rgba(217, 191, 134, .35); }
.chip.L { color: var(--L); border-color: rgba(192, 138, 138, .3); }
.kbd { font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); }
.stars { color: var(--amber); letter-spacing: 1px; }
.stars .off { color: rgba(255, 255, 255, .15); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 0 0 4px rgba(201, 169, 107, .4); cursor: pointer; }
select { background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); border-radius: 10px; height: 36px; padding: 0 10px; }
select option { background: var(--panel-solid); }
.toggle { position: relative; width: 44px; height: 26px; border-radius: 13px; background: rgba(255, 255, 255, .12); cursor: pointer; flex: none; transition: .2s; border: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: .2s; }
.toggle.on { background: linear-gradient(135deg, #b08d57, #7f95a8); }
.toggle.on::after { left: 21px; }
.sec-title { display: flex; align-items: end; justify-content: space-between; margin: 6px 0 14px; }
.sec-title h2 { font-size: 22px; }

/* ---------- Home ---------- */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 34px 36px; background: radial-gradient(1200px 400px at 0% 0%, rgba(176, 141, 87, .35), transparent 60%), radial-gradient(800px 400px at 100% 100%, rgba(6, 182, 212, .25), transparent 60%), var(--panel); border: 1px solid var(--line); }
.hero h1 { font-size: 38px; font-weight: 800; line-height: 1.1; }
.hero h1 .grad { background: linear-gradient(90deg, #e2cfa0, #e2cfa0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 560px; font-size: 15.5px; line-height: 1.55; margin: 12px 0 22px; }
.hero .rank { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); margin-bottom: 10px; }
.hero-orb { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); width: 220px; height: 220px; }
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.plan-item { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); margin-bottom: 9px; cursor: pointer; transition: .15s; }
.plan-item:hover { background: rgba(255, 255, 255, .06); transform: translateX(3px); }
.plan-item .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: rgba(201, 169, 107, .14); flex: none; }
.plan-item .t { font-weight: 700; font-size: 14.5px; }
.plan-item .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.plan-item .why { margin-left: auto; font-size: 11.5px; color: var(--violet); font-weight: 600; text-align: right; max-width: 160px; }
.plan-item.done { opacity: .5; }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick a { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: .2s; display: block; }
.quick a:hover { transform: translateY(-3px); border-color: var(--line2); background: rgba(255, 255, 255, .06); }
.quick a .e { font-size: 26px; }
.quick a b { display: block; margin-top: 8px; }
.quick a span { font-size: 12.5px; color: var(--muted); }
.connect-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(90deg, rgba(209, 168, 90, .12), rgba(209, 168, 90, .02)); border: 1px solid rgba(209, 168, 90, .25); margin-top: 16px; }

/* ---------- Library ---------- */
.lib-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ex-card { position: relative; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: .18s; overflow: hidden; }
.ex-card:hover { transform: translateY(-3px); border-color: rgba(201, 169, 107, .4); box-shadow: 0 14px 30px -14px rgba(176, 141, 87, .5); }
.ex-card .k { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.ex-card .k small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.ex-card .notes { font-size: 12px; color: var(--muted); margin: 6px 0 10px; font-weight: 500; min-height: 16px; }
.ex-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.ex-card .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.ex-card .due { position: absolute; top: 12px; right: 12px; font-size: 10.5px; padding: 3px 7px; border-radius: 6px; background: rgba(201, 169, 107, .18); color: var(--violet); font-weight: 700; }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; margin: 24px 0 10px; }

/* ---------- Practice ---------- */
.prac { display: grid; grid-template-rows: auto auto 1fr; gap: 14px; height: 100%; }
.prac-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.prac-head h1 { font-size: 28px; font-weight: 800; }
.prac-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.prac-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.bpm { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.bpm b { font-family: var(--mono); font-size: 16px; min-width: 34px; text-align: right; }
.bpm input { width: 110px; }
.staff-wrap { position: relative; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)); padding: 8px 0; min-height: 120px; }
.staff-scroll { overflow-x: auto; overflow-y: hidden; padding: 0 0 4px; }
.staff-svg { display: block; }
.st-line { stroke: rgba(40, 32, 24, .28); stroke-width: 1; }
.st-bar { stroke: rgba(40, 32, 24, .28); stroke-width: 1; }
.brace { stroke: rgba(40, 32, 24, .45); fill: none; stroke-width: 2; }
.clef { font-family: var(--music); fill: #1a1612; }
.clef.treble { font-size: 40px; }
.clef.bass { font-size: 34px; }
.acc { font-family: var(--music); font-size: 17px; fill: #1a1612; text-anchor: middle; }
.ledger { stroke: rgba(40, 32, 24, .5); stroke-width: 1.2; }
.nt .head { fill: #1a1612; transition: fill .2s; }
.nt .stem { stroke: #1a1612; stroke-width: 1.3; }
.nt .fing { font-size: 12px; font-weight: 800; text-anchor: middle; font-family: var(--font); }
.nt.hand-R .fing { fill: var(--R); }
.nt.hand-L .fing { fill: var(--L); }
.nt.cur .head { fill: #f1dca6; filter: drop-shadow(0 0 6px #d1a85a); }
.nt.cur .stem { stroke: #f1dca6; }
.nt.ok .head, .nt.ok .stem { fill: var(--green); stroke: var(--green); }
.nt.late .head, .nt.late .stem, .nt.early .head, .nt.early .stem { fill: var(--amber); stroke: var(--amber); }
.nt.miss .head, .nt.miss .stem { fill: var(--red); stroke: var(--red); }
.nt.shake { animation: shake .35s; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.st-cursor { fill: rgba(253, 230, 138, .06); stroke: rgba(253, 230, 138, .25); transition: x .18s cubic-bezier(.2, .9, .3, 1); }
.prac-body { display: grid; grid-template-columns: 1fr 300px; gap: 14px; min-height: 0; }
.live { display: flex; flex-direction: column; gap: 12px; }
.livebar { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi { flex: 1; min-width: 110px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.kpi span { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi b { display: block; font-size: 24px; font-weight: 800; font-family: var(--mono); margin-top: 2px; }
.tipbox { font-size: 13.5px; line-height: 1.55; color: #d9cfb8; }
.tipbox b { color: var(--text); }
.beat { display: flex; gap: 6px; }
.beat i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background .05s; }
.beat i.on { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.beat i.on.acc { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.countin { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; font-weight: 800; pointer-events: none; color: white; text-shadow: 0 0 40px rgba(201, 169, 107, .8); }
.timing-strip { position: relative; height: 54px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); overflow: hidden; }
.timing-strip .center { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 2px; background: rgba(255, 255, 255, .25); }
.timing-strip .lab { position: absolute; top: 4px; font-size: 10px; color: var(--dim); font-weight: 700; }
.timing-strip .dotp { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; animation: fadeDot 3s forwards; }
@keyframes fadeDot { to { opacity: 0; transform: scale(.4); } }
.judge-pop { position: absolute; font-weight: 800; font-size: 20px; pointer-events: none; animation: pop .8s forwards; z-index: 5; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px) scale(.7); } 20% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-30px) scale(1); } }

/* ---------- Results modal ---------- */
#modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(6, 5, 4, .72); backdrop-filter: blur(8px); animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { width: min(980px, 94vw); max-height: 92vh; overflow: auto; border-radius: 26px; background: linear-gradient(180deg, #1a1613, #0f0d0b); border: 1px solid var(--line2); padding: 28px; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8); animation: rise .45s cubic-bezier(.2, .9, .3, 1); }
@keyframes rise { from { transform: translateY(30px) scale(.97); opacity: 0; } }
.res-top { display: flex; gap: 24px; align-items: center; }
.res-score { width: 132px; height: 132px; flex: none; position: relative; }
.res-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.res-score .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 34px; }
.res-score .num small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.res-stars { font-size: 34px; letter-spacing: 4px; }
.res-stars span { display: inline-block; opacity: .15; transform: scale(.6); transition: .4s cubic-bezier(.3, 1.6, .5, 1); }
.res-stars span.lit { opacity: 1; transform: scale(1); color: var(--amber); text-shadow: 0 0 24px rgba(209, 168, 90, .8); }
.res-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 22px 0; }
.res-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.insight { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); margin-bottom: 8px; }
.insight .i { font-size: 20px; }
.insight b { font-size: 14px; }
.insight p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.insight.warn { border-color: rgba(209, 168, 90, .25); }
.insight.good { border-color: rgba(143, 174, 139, .25); }
.chart { width: 100%; height: 190px; display: block; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.res-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.rank-badge { font-size: 92px; font-weight: 900; line-height: 1; background: linear-gradient(135deg, #f1dca6, #c08a8a 50%, #c9a96b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(192, 138, 138, .5)); }

/* ---------- Rain ---------- */
.rain-wrap { position: relative; height: 100%; min-height: 420px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(800px 500px at 50% 120%, rgba(176, 141, 87, .25), transparent), #0b0a09; }
#rainCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rain-hud { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: start; pointer-events: none; }
.rain-hud .score { font-family: var(--mono); font-size: 30px; font-weight: 700; }
.rain-hud .combo { text-align: right; }
.rain-hud .combo b { font-size: 34px; font-weight: 900; font-family: var(--mono); background: linear-gradient(90deg, #f1dca6, #c08a8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rain-hud .mult { font-size: 12px; color: var(--amber); font-weight: 800; }
.rain-menu { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 7, 6, .6); backdrop-filter: blur(4px); }
.rain-menu .card { width: min(560px, 90%); }
.view-full { height: 100%; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Studio ---------- */
.studio { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.chord-big { font-size: 76px; font-weight: 900; letter-spacing: -0.04em; min-height: 92px; background: linear-gradient(90deg, #fff, #e2cfa0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.keybars .row { display: grid; grid-template-columns: 90px 1fr 46px; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.keybars .bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.keybars .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); border-radius: 6px; transition: width .4s; }
#rollCanvas { width: 100%; height: 220px; display: block; border-radius: 14px; background: rgba(0, 0, 0, .25); }

/* ---------- Progress ---------- */
.wheel-wrap { display: grid; grid-template-columns: 460px 1fr; gap: 16px; }
.wheel svg { width: 100%; height: auto; }
.wheel .seg-path { cursor: pointer; transition: opacity .2s, filter .2s; stroke: #0b0a09; stroke-width: 2; }
.wheel .seg-path:hover { filter: brightness(1.4); }
.wheel text { font-weight: 800; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: rgba(255, 255, 255, .05); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ach { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); display: flex; gap: 12px; align-items: center; }
.ach .e { font-size: 26px; filter: grayscale(1) opacity(.3); }
.ach.got .e { filter: none; }
.ach.got { border-color: rgba(209, 168, 90, .3); background: linear-gradient(135deg, rgba(209, 168, 90, .08), transparent); }
.ach b { font-size: 13px; display: block; }
.ach span { font-size: 11.5px; color: var(--muted); }
table.runs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.runs td, table.runs th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.runs th { color: var(--dim); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Setup ---------- */
.steps { counter-reset: s; display: grid; gap: 12px; }
.stepc { position: relative; padding: 18px 18px 18px 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.stepc::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #b08d57, #7f95a8); }
.stepc b { font-size: 15px; }
.stepc p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.stepc.ok { border-color: rgba(143, 174, 139, .35); }
.stepc.ok::before { content: '✓'; background: var(--green); color: #1f2a1c; }
.monitor { font-family: var(--mono); font-size: 12.5px; height: 160px; overflow: auto; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); color: #e2cfa0; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setrow:last-child { border: 0; }
.setrow b { font-size: 14px; }
.setrow p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); max-width: 560px; line-height: 1.45; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 22px; top: 76px; z-index: 70; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: center; min-width: 260px; max-width: 360px; padding: 14px 16px; border-radius: 16px; background: rgba(24, 20, 16, .96); border: 1px solid var(--line2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); backdrop-filter: blur(12px); animation: toastIn .5s cubic-bezier(.2, 1.4, .4, 1); }
.toast.out { animation: toastOut .4s forwards; }
.toast .e { font-size: 28px; }
.toast b { display: block; font-size: 14px; }
.toast span { font-size: 12.5px; color: var(--muted); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ---------- Echo ---------- */
.echo-stage { display: grid; place-items: center; text-align: center; padding: 30px 10px; }
.echo-orb { width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 700; position: relative; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .3), transparent 40%), linear-gradient(135deg, #8c6d3f, #8c6d3f); box-shadow: 0 0 80px -10px rgba(140, 109, 63, .8); transition: transform .1s; }
.echo-orb.listen { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .3), transparent 40%), linear-gradient(135deg, #a0524b, #c9a96b); box-shadow: 0 0 80px -10px rgba(192, 138, 138, .8); }
.echo-orb.pulse { transform: scale(1.06); }
.echo-dots { display: flex; gap: 8px; margin: 22px 0; min-height: 18px; }
.echo-dots i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .12); transition: .2s; }
.echo-dots i.ok { background: var(--green); box-shadow: 0 0 14px var(--green); }
.echo-dots i.bad { background: var(--red); }

@media (max-width: 1100px) {
  :root { --nav: 72px; }
  .brand span, #nav a span, .nav-group { display: none; }
  .home-grid, .studio, .wheel-wrap, .res-grid, .prac-body { grid-template-columns: 1fr; }
  .hero-orb { display: none; }
  .res-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-height: 760px) { :root { --dock: 130px; } }
#view > *, .prac > *, .prac-body > *, .grid > *, .live > * { min-width: 0; }
.staff-wrap { overflow: hidden; }
.prac-head > div:first-child { flex: 1 1 240px; }
.prac-controls { margin-left: 0; }

/* ---------- Sight-Reading Dojo ---------- */
.sr { display: grid; gap: 16px; }
.sr-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.sr-grades { display: flex; gap: 6px; flex-wrap: wrap; }
.sr-grades button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; font: inherit; min-width: 74px; transition: .2s; }
.sr-grades button b { font-size: 15px; color: var(--text); }
.sr-grades button span { font-size: 11px; white-space: nowrap; }
.sr-grades button.on { border-color: rgba(201,169,107,.7); background: linear-gradient(135deg, rgba(201,169,107,.22), rgba(159,180,199,.08)); color: var(--text); }
.sr-grades button.locked { opacity: .45; }
.sr-grades button.locked b::after { content: ' 🔒'; font-size: 11px; }
.sr-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chk { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 14px; cursor: pointer; }
.sr-sheet { position: relative; background: radial-gradient(120% 140% at 50% 0%, rgba(201,169,107,.07), rgba(0,0,0,0) 60%), rgba(243,236,220,.7); }
.sr-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.sr-meta b { color: var(--text); font-size: 16px; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.tag.ai { border-color: rgba(201,169,107,.45); color: #e2cfa0; background: rgba(201,169,107,.1); }
.sr-host { width: 100%; overflow: hidden; min-height: 180px; }
.sr-svg { display: block; }
.sr-svg .head.hollow { fill: none !important; stroke: #1a1612; stroke-width: 1.9; }
.sr-svg .nt.ok .head.hollow { stroke: var(--green); }
.sr-svg .nt.miss .head.hollow { stroke: var(--red); }
.sr-svg .nt.late .head.hollow, .sr-svg .nt.early .head.hollow { stroke: var(--amber); }
.sr-svg .nt.cur .head.hollow { stroke: #f1dca6; }
.sr-svg .dot, .sr-svg .flag { fill: #1a1612; }
.sr-svg .beam { stroke: #1a1612; stroke-width: 4.5; }
.sr-svg .rest { fill: #1a1612; }
.sr-svg .restg { font-family: var(--music); font-size: 38px; fill: #1a1612; }
.sr-svg .nt.ok .beam, .sr-svg .nt.ok .flag, .sr-svg .nt.ok .dot { stroke: var(--green); fill: var(--green); }
.sr-svg .nt.miss .beam, .sr-svg .nt.miss .flag, .sr-svg .nt.miss .dot { stroke: var(--red); fill: var(--red); }
.sr-svg .nt.cur .beam, .sr-svg .nt.cur .flag { stroke: #f1dca6; fill: #f1dca6; }
.sr-svg .nt.wrong { animation: shake .35s; }
.sr-svg .nt.wrong .head { fill: var(--red); }
.sr-svg .tsig { font-family: var(--font); font-weight: 900; font-size: 22px; fill: #1a1612; text-anchor: middle; }
.sr-svg .chordsym { font-family: var(--font); font-weight: 700; font-size: 13px; fill: #c9a96b; }
.sr-svg .barnum { font-size: 10px; fill: rgba(220,224,255,.4); }
.sr-svg .st-final { fill: rgba(220,224,255,.6); }
.sr-svg .clef.sr.treble { font-size: 44px; }
.sr-svg .clef.sr.bass { font-size: 37px; }
.sr-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; font-weight: 900; color: rgba(255,255,255,.85); pointer-events: none; text-shadow: 0 0 40px rgba(201,169,107,.8); }
.sr-count:empty { display: none; }
.sr-count.pop { animation: srpop .5s ease-out; }
@keyframes srpop { from { transform: scale(1.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sr-bottom { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.sr-res { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.sr-score { display: flex; flex-direction: column; margin-right: 12px; }
.sr-score b { font-size: 40px; font-weight: 900; background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.sr-score span { font-size: 13px; color: var(--muted); }
.sr-kv { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.sr-kv b { font-size: 16px; color: var(--text); }
.sr-tip { flex-basis: 100%; font-size: 14px; color: #e2cfa0; }
@media (max-width: 1100px) { .sr-bottom { grid-template-columns: 1fr; } }

/* ---------- AI accompanist (Studio) ---------- */
.acc-card { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.acc-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.acc-head p { margin: 4px 0 0; font-size: 13.5px; max-width: 760px; }
.acc-body { display: grid; grid-template-columns: 170px 1fr; gap: 10px 24px; margin-top: 14px; align-items: center; }
.acc-chord { grid-row: span 2; text-align: center; padding: 14px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, rgba(143,174,139,.14), rgba(0,0,0,0) 70%), rgba(255,255,255,.03); border: 1px solid var(--line); }
.acc-chord #accSym { font-size: 42px; font-weight: 900; line-height: 1.1; background: linear-gradient(90deg, #8fae8b, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acc-chord #accSym.pop { animation: srpop .35s ease-out; }
.acc-chord span { color: var(--muted); font-weight: 700; font-size: 14px; }
.acc-beats { display: flex; gap: 8px; justify-content: center; margin-top: 10px; min-height: 10px; }
.acc-beats i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.12); }
.acc-beats i.on { background: #8fae8b; box-shadow: 0 0 12px #8fae8b; }
.acc-ctl { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.acc-ctl label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.acc-hist { display: flex; gap: 10px; flex-wrap: wrap; font-weight: 800; font-size: 15px; color: #d6e4cf; min-height: 24px; }
.quick.q4 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Guided workouts ---------- */
.wo { display: grid; gap: 16px; }
.wo-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }
.wo-hero h1 { margin: 0 0 6px; font-size: 28px; }
.wo-hero p { margin: 0; max-width: 620px; }
.wo-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.wo > *, .wo-card > *, .sr > *, .sr-bottom > * { min-width: 0; }
.wo-card { text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: .25s; }
.wo-card:hover { transform: translateY(-4px); border-color: rgba(201,169,107,.5); box-shadow: 0 18px 50px -20px rgba(124,58,237,.6); }
.wo-card h2 { margin: 4px 0 0; font-size: 22px; }
.wo-card p { margin: 0; font-size: 13.5px; flex: 1; }
.wo-ic { font-size: 34px; }
.wo-ic.big { font-size: 64px; }
.wo-steps { display: flex; gap: 3px; margin-top: 10px; }
.wo-steps span { height: 26px; border-radius: 6px; background: linear-gradient(135deg, rgba(201,169,107,.25), rgba(159,180,199,.12)); font-size: 9.5px; color: rgba(255,255,255,.7); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 6px 4px 0; min-width: 0; }
.wo-go { margin-top: 12px; font-weight: 800; color: #e2cfa0; }
.wo-bar { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: center; padding: 14px 18px; position: sticky; top: 0; z-index: 5; transition: box-shadow .3s, border-color .3s; }
.wo-bar.due { border-color: rgba(209,168,90,.6); box-shadow: 0 0 0 1px rgba(209,168,90,.3), 0 0 40px -10px rgba(209,168,90,.6); }
.wo-bar.flash { border-color: rgba(143,174,139,.7); }
.wo-left { display: flex; gap: 14px; align-items: center; min-width: 0; }
.wo-left b { font-size: 17px; }
.wo-left .muted { font-size: 13px; }
.wo-num { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #0b0a09; }
.wo-right { display: flex; gap: 8px; align-items: center; }
.wo-time { position: relative; width: 52px; height: 44px; display: grid; place-items: center; }
.wo-time svg { position: absolute; width: 44px; height: 44px; transform: rotate(-90deg); }
.wo-time circle { fill: none; stroke-width: 3.5; }
.wo-time .bg { stroke: rgba(255,255,255,.08); }
.wo-time .fg { stroke: var(--cyan); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.wo-time span { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.wo-track { grid-column: 1 / -1; display: flex; gap: 4px; }
.wo-track i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.wo-track i.done { background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.wo-track i em { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.wo-child.wo-in { animation: woin .45s ease-out; }
@keyframes woin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wo-done { text-align: center; padding: 40px; }
.wo-done h1 { margin: 6px 0; }
.wo-sum { display: grid; gap: 6px; max-width: 520px; margin: 20px auto 0; text-align: left; }
.wo-sum div { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.03); color: var(--muted); }
.wo-sum div.ok { color: var(--text); }
.wo-sum div.ok span { color: var(--green); }
.wo-sum em { font-style: normal; color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .wo-pick { grid-template-columns: 1fr; } }

/* ---------- tour ---------- */
.modal-card.tour { width: min(560px, 94vw); text-align: center; padding: 36px 36px 26px; }
.tour-ic { font-size: 56px; }
.tour h2 { margin: 8px 0 10px; font-size: 26px; }
.tour p { color: var(--muted); line-height: 1.6; font-size: 15px; margin: 0 auto; max-width: 460px; }
.tour-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tour-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.15); }
.tour-dots i.on { background: var(--violet); width: 22px; border-radius: 4px; }
.skills { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.skill { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: .2s; }
.skill:hover { border-color: var(--line2); transform: translateY(-2px); }
.skill .e { font-size: 22px; }
.skill b { font-size: 20px; margin-top: 4px; }
.skill span { font-size: 12.5px; color: var(--text); font-weight: 600; }
.skill em { font-style: normal; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) { .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ottava text { font-family: var(--font); font-style: italic; font-weight: 800; font-size: 11px; fill: #e2cfa0; }
.ottava line { stroke: #e2cfa0; stroke-width: 1; stroke-dasharray: 4 3; }
.hand-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-right: 4px; color: #0b0a09; }
.hand-tag.R { background: var(--R); }
.hand-tag.L { background: var(--L); }
.hand-rep { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.hand-rep .hr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 13.5px; }
.hand-rep .hr b { font-size: 16px; }
.hand-rep .hr em { flex-basis: 100%; font-style: normal; color: var(--muted); font-size: 12.5px; }

/* ---------- Songbook ---------- */
.sb { display: grid; gap: 16px; }
.sb > * { min-width: 0; }
.sb-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }
.sb-hero h1 { margin: 0 0 6px; font-size: 28px; }
.sb-hero p { margin: 0; max-width: 700px; font-size: 14px; line-height: 1.55; }
.sb-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sb-filters input { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); padding: 0 14px; font: inherit; min-width: 220px; }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.sb-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: .2s; min-width: 0; }
.sb-item:hover { border-color: var(--line2); transform: translateY(-2px); background: rgba(255,255,255,.05); }
.sb-ic { font-size: 22px; text-align: center; }
.sb-t { min-width: 0; display: flex; flex-direction: column; }
.sb-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.sb-t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-m { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sb-m em { font-style: normal; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: rgba(201,169,107,.15); color: #e2cfa0; }
.sb-m em.g5, .sb-m em.g6 { background: rgba(244,114,182,.15); color: #ead2cf; }
.sb-m i { font-style: normal; font-weight: 800; color: var(--green); }

/* =====================================================================
   Salon theme: a polished black grand under candlelight. Ebony, ivory,
   a thread of gold leaf, Garamond type, ink on paper for the music.
   ===================================================================== */
html { font-size-adjust: 0.46; }
html, body { background: var(--bg); font-size: 16px; }
body { letter-spacing: 0.005em; font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: 0.01em; }
h1 { font-size: 40px; line-height: 1.05; }
h2 { font-size: 26px; }
.card h3 { font-family: var(--display); font-size: 19px; color: var(--ivory); font-weight: 500; letter-spacing: .02em; }
::selection { background: rgba(201, 169, 107, .35); }
input[type=range] { accent-color: var(--gold); }
input[type=checkbox] { accent-color: var(--gold); }
select, input[type=number], input[type=text], input:not([type]) { background: rgba(255, 248, 235, .04); border: 1px solid var(--line2); border-radius: 4px; color: var(--text); padding: 5px 8px; }
select option { background: #15120f; }

/* nav: the fallboard */
#nav { background: linear-gradient(180deg, rgba(20, 17, 14, .92), rgba(9, 8, 7, .96)); border-right: 1px solid rgba(201, 169, 107, .16); backdrop-filter: none; }
.brand { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 32px; letter-spacing: 0.01em; color: var(--ivory); padding: 2px 10px 20px; }
.brand .logo { width: 34px; height: 34px; filter: none; }
.nav-group { font-family: var(--display); font-style: italic; text-transform: none; letter-spacing: .04em; font-size: 15px; color: rgba(201, 169, 107, .55); font-weight: 500; padding: 14px 12px 3px; }
#nav a[data-view] { font-size: 16.5px; font-weight: 400; color: #b7ad9a; border-radius: 3px; padding: 6px 12px; }
#nav a[data-view] svg { width: 16px; height: 16px; stroke-width: 1.4; opacity: .75; }
#nav a[data-view]:hover { color: var(--ivory); background: rgba(255, 248, 235, .035); }
#nav a.active { color: var(--ivory); background: none; }
#nav a.active svg { opacity: 1; stroke: var(--gold); }
#nav a.active::before { left: -14px; top: 9px; bottom: 9px; width: 2px; border-radius: 0; background: var(--gold); }

/* top bar */
#top { background: transparent; border-bottom: 1px solid rgba(201, 169, 107, .12); backdrop-filter: none; }
#crumb { font-family: var(--display); font-size: 19px; font-weight: 500; color: var(--muted); }
#crumb b { font-weight: 600; color: var(--ivory); }
#crumb a:hover { color: var(--gold); }
.pill { border-radius: 3px; background: transparent; font-weight: 500; font-size: 14px; border-color: var(--line2); }
.pill.on { border-color: rgba(143, 174, 139, .45); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(143, 174, 139, .5); } 70% { box-shadow: 0 0 0 7px rgba(143, 174, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 174, 139, 0); } }
#levelPill .xpbar { background: rgba(201, 169, 107, .14); height: 3px; }
#levelPill .xpbar i { background: var(--gold); }

/* panels: lacquered ebony with a hairline of gold */
.card { background: linear-gradient(180deg, rgba(255, 248, 235, .038), rgba(255, 248, 235, .012) 60%); border: 1px solid rgba(201, 169, 107, .15); border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255, 250, 240, .05), 0 18px 40px -28px rgba(0, 0, 0, .9); backdrop-filter: none; }
.stat { border-radius: 4px; background: rgba(255, 248, 235, .022); border-color: rgba(201, 169, 107, .12); }
.stat b, .sr-score b { font-family: var(--display); font-weight: 600; }
.sr-score b { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--gold); font-size: 46px; }
.muted { color: var(--muted); }
.tag { border-radius: 2px !important; font-family: var(--font); font-style: italic; letter-spacing: .02em; }

/* buttons: ivory keys and ebony keys */
.btn { border-radius: 3px; border: 1px solid var(--line2); background: transparent; font-weight: 500; font-size: 15.5px; letter-spacing: .02em; height: 40px; color: var(--ivory); }
.btn:hover { background: rgba(255, 248, 235, .05); border-color: rgba(201, 169, 107, .5); transform: none; }
.btn.primary { background: linear-gradient(180deg, #f6efe0, #e7dcc5); color: #17130f; border: 1px solid #d8c9a6; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 22px -14px rgba(0, 0, 0, .9); font-weight: 600; }
.btn.primary:hover { filter: none; background: linear-gradient(180deg, #fffaf0, #efe5cf); }
.btn.big { height: 48px; font-size: 17px; border-radius: 3px; }
.btn.sm { height: 30px; font-size: 14px; border-radius: 3px; }
.seg { border-radius: 3px; background: transparent; border: 1px solid var(--line2); padding: 2px; }
.seg button { border-radius: 2px; font-weight: 500; font-size: 15px; color: var(--muted); height: 32px; }
.seg button.on { background: rgba(201, 169, 107, .14); color: var(--ivory); box-shadow: inset 0 -1px 0 var(--gold); }
.chk { font-size: 15px; }

/* the keyboard: ivory and ebony */
#dock { background: linear-gradient(180deg, #14110e, #080706); border-top: 1px solid rgba(201, 169, 107, .22); }
#dockInfo { font-family: var(--display); font-size: 15px; font-weight: 500; }
#chordName { font-family: var(--display); font-size: 18px; color: var(--gold); }
.key.white { background: linear-gradient(180deg, #e6dcc6 0%, #f7f1e4 62%, #e2d7bf 100%); border: 1px solid #a89a7e; box-shadow: inset 0 -5px 0 rgba(90, 70, 40, .12); }
.key.black { background: linear-gradient(180deg, #2b2621 0%, #0c0a09 78%, #3a332c 100%); box-shadow: 0 3px 5px rgba(0, 0, 0, .6), inset 0 -3px 0 rgba(255, 245, 225, .07), inset 1px 0 0 rgba(255, 245, 225, .05); }
.key .lbl { color: #8b7e66; font-family: var(--font); }
.key.down.white { background: linear-gradient(180deg, #e9d6a6, #d8bd82); }
.key.down.black { background: linear-gradient(180deg, #6b5634, #3d3020); }
.key .glow { background: radial-gradient(ellipse at 50% 100%, rgba(214, 182, 120, calc(.15 + var(--vel, .7) * .3)), transparent 70%); }
.key.hint-next.hand-R .finger { background: var(--R); color: #1d160c; box-shadow: none; }
.key.hint-next.hand-L .finger { background: var(--L); color: #0f161c; box-shadow: none; }
.key .finger { font-family: var(--display); font-weight: 700; font-size: 15px; }

/* music on paper: every staff sits on cream manuscript, in ink */
.staff-wrap, .sr-sheet, #nstaff { background: linear-gradient(180deg, #f6f0e2, #efe6d2) !important; border: 1px solid #d9ccae !important; border-radius: 3px !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 22px 40px -24px rgba(0, 0, 0, .95) !important; color: var(--ink); }
.sr-sheet .sr-meta { color: #6b5f4d; }
.sr-sheet .sr-meta b { color: var(--ink); }
.sr-sheet .tag { background: rgba(29, 24, 19, .06) !important; color: #5c4f3d !important; border-color: rgba(29, 24, 19, .15) !important; }
.st-line, .st-bar { stroke: rgba(29, 24, 19, .55); }
.st-final { fill: var(--ink); }
.brace { stroke: rgba(29, 24, 19, .6); }
.clef, .acc { fill: var(--ink); }
.ledger { stroke: rgba(29, 24, 19, .6); }
.nt .head { fill: var(--ink); }
.nt .stem { stroke: var(--ink); }
.staff-svg .beam { stroke: var(--ink); stroke-width: 4.5; stroke-linecap: butt; }
.staff-svg .flag, .staff-svg .tuplet-g { fill: var(--ink); }
.staff-svg .nt.cur .flag { fill: #b07d22; }
.staff-svg .nt.ok .flag { fill: #4c7a47; }
.staff-svg .nt.miss .flag { fill: var(--red); }
.staff-svg .nt.late .flag, .staff-svg .nt.early .flag { fill: var(--amber); }
.nt.hand-R .fing { fill: #8a6526; }
.nt.hand-L .fing { fill: #3d5a74; }
.nt .fing { font-family: var(--display); font-size: 13px; font-weight: 700; }
.nt .fing.ai { font-style: italic; font-weight: 500; opacity: .85; }
.nt.cur .head { fill: #b07d22; filter: drop-shadow(0 0 4px rgba(214, 160, 60, .7)); }
.nt.cur .stem { stroke: #b07d22; }
.nt.ok .head, .nt.ok .stem { fill: #4c7a47; stroke: #4c7a47; }
.nt.late .head, .nt.late .stem, .nt.early .head, .nt.early .stem { fill: #b9822a; stroke: #b9822a; }
.nt.miss .head, .nt.miss .stem { fill: #a33a32; stroke: #a33a32; }
.sr-svg .head.hollow { stroke: var(--ink); }
.sr-svg .nt.ok .head.hollow { stroke: #4c7a47; }
.sr-svg .nt.miss .head.hollow { stroke: #a33a32; }
.sr-svg .nt.cur .head.hollow { stroke: #b07d22; }
.sr-svg .dot, .sr-svg .flag, .sr-svg .rest, .sr-svg .restg { fill: var(--ink); }
.sr-svg .beam { stroke: var(--ink); }
.sr-svg .nt.ok .beam, .sr-svg .nt.ok .flag, .sr-svg .nt.ok .dot { stroke: #4c7a47; fill: #4c7a47; }
.sr-svg .nt.miss .beam, .sr-svg .nt.miss .flag, .sr-svg .nt.miss .dot { stroke: #a33a32; fill: #a33a32; }
.sr-svg .nt.cur .beam, .sr-svg .nt.cur .flag { stroke: #b07d22; fill: #b07d22; }
.sr-svg .nt.wrong .head { fill: #a33a32; }
.sr-svg .tsig { font-family: var(--display); font-weight: 700; font-size: 24px; fill: var(--ink); }
.sr-svg .chordsym { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 15px; fill: #8a6526; }
.sr-svg .barnum, .barnum { font-family: var(--display); font-style: normal; font-size: 11px; letter-spacing: .02em; fill: #9a8d76; }
.sr-count { color: rgba(29, 24, 19, .75); text-shadow: none; font-family: var(--display); font-weight: 500; }
.ottava, .ottava text { fill: #6b5f4d; stroke: #6b5f4d; }

/* score engraver extras */
.sc-svg .tie { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.sc-svg .tuplet { font-family: var(--display); font-style: italic; font-size: 12px; fill: #6b5f4d; text-anchor: middle; }
.sc-svg .sc-bar { fill: transparent; cursor: pointer; }
.sc-svg .sc-bar:hover { fill: rgba(176, 125, 34, .06); }
.sc-svg .nt.other { opacity: .28; }

/* ---------- Étude Studio ---------- */
.et { display: grid; gap: 18px; }
.et-hero { display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.et-hero > div:first-child { flex: 1 1 420px; }
.et-hero p { max-width: 640px; font-size: 17px; line-height: 1.5; margin: 8px 0 0; }
.et-hero-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 300px; }
.et-hero-side .dim { font-size: 14px; font-style: italic; }
.et-h { font-size: 24px; margin-top: 8px; }
.et-h .dim { font-family: var(--font); font-style: italic; font-size: 15px; }
.et-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.et-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid rgba(201, 169, 107, .13); border-radius: 4px; background: rgba(255, 248, 235, .02); transition: .2s; min-width: 0; }
.et-item:hover { border-color: rgba(201, 169, 107, .45); background: rgba(255, 248, 235, .045); }
.et-no { font-family: var(--display); font-size: 28px; font-weight: 500; color: var(--gold); text-align: center; line-height: 1; }
.et-t { min-width: 0; display: flex; flex-direction: column; }
.et-t b { font-family: var(--display); font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.et-t span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.et-m { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.et-m em { font-style: normal; color: var(--gold); letter-spacing: 1px; font-size: 10px; }
.et-best, .et-tempo { font-style: normal; color: var(--green); font-weight: 600; }
.et-tempo { color: var(--muted); font-weight: 400; }
.et-drills { display: grid; gap: 12px; }
.et-drill-key { display: flex; gap: 10px; align-items: center; }
.et-note { font-size: 15px; font-style: italic; margin: 2px 0 0; }
.et-note a, .et a.inl, .card p a { color: var(--gold); border-bottom: 1px solid rgba(201, 169, 107, .35); }
.et-head { display: grid; gap: 12px; }
.et-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.et-title b { font-family: var(--display); font-size: 30px; font-weight: 600; }
.et-title .dim { font-style: italic; font-size: 15px; margin-top: 2px; }
.et-tags .tag { display: inline-block; padding: 3px 10px; border: 1px solid var(--line2); color: var(--muted); font-size: 13px; }
.et-ctl { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.et-sec { display: flex; gap: 6px; align-items: center; }
.et-sec input { width: 58px; }
.et-tempo b { min-width: 40px; display: inline-block; }
.et-go { justify-content: flex-end; }
.et-map { padding: 12px 16px; }
.et-map-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; font-style: italic; }
.et-bars { display: flex; flex-wrap: wrap; gap: 3px; }
.et-bars button { width: 30px; height: 24px; border: 1px solid rgba(201, 169, 107, .16); background: rgba(255, 248, 235, .02); border-radius: 2px; font-size: 12px; color: var(--muted); cursor: pointer; font-family: var(--display); }
.et-bars button.g { background: rgba(143, 174, 139, .28); color: var(--ivory); }
.et-bars button.y { background: rgba(209, 168, 90, .3); color: var(--ivory); }
.et-bars button.r { background: rgba(194, 102, 94, .32); color: var(--ivory); }
.et-bars button.sel { border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); color: var(--ivory); }
.et-ladder { font-style: normal; color: var(--muted); }
.et-ladder i { font-style: normal; display: inline-block; margin-left: 4px; padding: 0 5px; border-bottom: 2px solid rgba(201, 169, 107, .18); font-size: 13px; }
.et-ladder i.on { border-color: var(--gold); color: var(--ivory); }
.et-sheet { padding: 14px 10px; }
.et-host { max-height: 62vh; overflow-y: auto !important; scroll-behavior: smooth; }
.et-side { display: grid; gap: 12px; align-content: start; }
.et-side b { font-family: var(--display); font-size: 19px; font-weight: 600; }
.et-side p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; }
.et-hist svg polyline { stroke: var(--gold); }
.et-meter { display: inline-block; width: 70px; height: 4px; background: rgba(255, 248, 235, .1); vertical-align: middle; margin-right: 4px; }
.et-meter i { display: block; height: 100%; }
.sr-tip { font-style: italic; color: #e2d3ad; line-height: 1.5; }
.sr-tip > div + div { margin-top: 4px; }
.coach canvas { width: 100%; height: 190px; display: block; background: linear-gradient(180deg, rgba(255, 248, 235, .02), rgba(255, 248, 235, 0)); border: 1px solid rgba(201, 169, 107, .1); border-radius: 3px; }
.coach-live { display: flex; gap: 28px; margin-top: 10px; }
.coach-hist { display: grid; gap: 4px; font-size: 14.5px; margin-top: 8px; }
@media (max-width: 900px) { .et-grid { grid-template-columns: 1fr; } }
/* home in the salon */
.hero { border-radius: var(--radius); background: linear-gradient(115deg, rgba(255, 248, 235, .05), rgba(255, 248, 235, .01) 55%), var(--panel); border: 1px solid rgba(201, 169, 107, .18); padding: 40px 40px 36px; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: 50px; line-height: 1.04; letter-spacing: .005em; }
.hero h1 .grad { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--gold); font-style: italic; }
.hero p { font-size: 18px; line-height: 1.55; max-width: 600px; }
.hero .rank { font-family: var(--display); font-style: italic; text-transform: none; letter-spacing: .03em; font-size: 17px; font-weight: 500; color: var(--gold); }
.hero-orb { width: 210px; height: 210px; right: 56px; }
.connect-banner { border-radius: var(--radius); background: rgba(255, 248, 235, .025); border: 1px solid rgba(201, 169, 107, .18); }
.connect-banner b { font-family: var(--display); font-size: 20px; font-weight: 600; }
.cb-ic { font-family: var(--music); font-size: 34px; color: var(--gold); width: 36px; text-align: center; }
.plan-item { border-radius: 4px; background: rgba(255, 248, 235, .02); border-color: rgba(201, 169, 107, .12); }
.plan-item:hover { transform: none; border-color: rgba(201, 169, 107, .4); background: rgba(255, 248, 235, .04); }
.plan-item .ic { border-radius: 50%; background: none; border: 1px solid rgba(201, 169, 107, .35); font-family: var(--display); font-size: 16px; color: var(--gold); width: 40px; height: 40px; }
.plan-item .t { font-family: var(--display); font-size: 20px; font-weight: 600; }
.plan-item .s { font-size: 14.5px; font-style: italic; }
.plan-item .why { font-style: italic; font-size: 14px; font-weight: 400; color: var(--gold); }
.daily { display: flex; gap: 16px; align-items: center; border-color: rgba(201, 169, 107, .3) !important; }
.daily-ic { font-size: 22px; color: var(--gold); width: 40px; height: 40px; border: 1px solid rgba(201, 169, 107, .4); border-radius: 50%; display: grid; place-items: center; }
.daily-k { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--gold); }
.daily-t { font-family: var(--display); font-size: 21px; font-weight: 600; }
.daily-go { font-family: var(--display); font-size: 20px; color: var(--ivory); border-bottom: 1px solid var(--gold); }
.quick a { border-radius: 4px; background: rgba(255, 248, 235, .02); border-color: rgba(201, 169, 107, .13); }
.quick a:hover { transform: none; border-color: rgba(201, 169, 107, .45); }
.quick a .e { font-family: var(--display); font-size: 20px; color: var(--gold); font-style: italic; }
.quick a b { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 4px; }
.quick a span { font-size: 14.5px; font-style: italic; }
.sec-title h2 { font-family: var(--display); font-weight: 500; }
#nav a[data-view] { padding: 4.5px 12px; font-size: 16px; }
.nav-group { padding: 10px 12px 1px; }
.brand { padding-bottom: 12px; }

.modal-card { border-radius: var(--radius); border-color: rgba(201, 169, 107, .25); }
.modal-card h2, .modal-card h1 { font-family: var(--display); font-weight: 500; }
.toast { border-radius: 4px; border-color: rgba(201, 169, 107, .3); backdrop-filter: none; }
.toast b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.toast span { font-size: 14px; font-style: italic; }
.sr-score { line-height: 1; gap: 4px; }
.sr-score b { line-height: .95; }
.sr-score span { font-style: italic; font-size: 15px; }
.sr-kv span { font-size: 14px; font-style: italic; }
.sr-kv b { font-size: 18px; font-weight: 600; }

/* calm circles instead of glossy orbs */
.echo-orb, .echo-orb.listen { background: radial-gradient(circle at 50% 50%, rgba(201, 169, 107, .06), transparent 70%); border: 1px solid rgba(201, 169, 107, .45); box-shadow: inset 0 0 0 10px rgba(201, 169, 107, .04); color: var(--ivory); font-family: var(--display); font-style: italic; font-size: 22px; font-weight: 500; }
.echo-orb.listen { border-color: var(--ivory); box-shadow: inset 0 0 0 10px rgba(239, 230, 210, .06), 0 0 40px -12px rgba(239, 230, 210, .4); }
.rain-ic { font-family: var(--music); font-size: 40px; color: var(--gold); }
.sb-item { border-radius: 4px; background: rgba(255, 248, 235, .02); border-color: rgba(201, 169, 107, .13); }
.sb-item:hover { transform: none; border-color: rgba(201, 169, 107, .45); }
.sb-ic { font-family: var(--display); font-style: italic; font-size: 14px; color: var(--gold); }
.sb-t b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.sb-t span { font-style: italic; font-size: 13.5px; }
.sb-m { font-size: 13px; }
.sb-m em, .sb-m em.g5, .sb-m em.g6 { font-weight: 500; font-style: italic; background: none; border: 0; border-bottom: 1px solid rgba(201, 169, 107, .35); border-radius: 0; color: var(--gold); padding: 0 2px; }
.wo-card .wo-ic, .wo-ic { font-family: var(--display); font-size: 28px; color: var(--gold); }

/* workout routine as a programme list */
.wo-list{list-style:none;margin:14px 0 18px;padding:12px 0 0;border-top:1px solid rgba(201,169,107,.18);display:grid;gap:5px;font-size:15px;color:var(--text)}
.wo-list li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px dotted rgba(201,169,107,.14);padding-bottom:4px}
.wo-list i{color:var(--muted);font-style:italic}

/* engraving glyphs (Bravura outlines): ink on paper */
path.gl { fill: #1a1612; stroke: none; }
path.gl.other, .other path.gl { fill: rgba(26,22,18,.35); }

/* number entry beside sliders */
input.rnum { width: 4.6em; padding: 3px 6px; margin-left: 6px; background: transparent; color: inherit; border: 1px solid rgba(201, 170, 110, .35); border-radius: 4px; font: inherit; font-variant-numeric: tabular-nums; text-align: right; }
input.rnum:focus { outline: none; border-color: var(--gold, #c9aa6e); }
.nb-hide { display: none !important; }
.rnum-unit { margin-left: -5px; color: var(--muted); }

/* ---------- 13-inch laptops (about 1440×800 of browser window) ---------- */
@media (max-width: 1600px) and (max-height: 920px) {
  :root { --dock: 124px; --nav: 196px; }
  #view { padding-top: 16px !important; }
  .hero { padding: 26px 30px 24px; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 16px; margin: 8px 0 16px; }
  .hero-orb { width: 170px; height: 170px; }
  .card { padding: 16px 18px; }
  .et-head { gap: 8px; }
  .et-ctl { gap: 8px 12px; }
  .et-head h1, .prac-head h1 { font-size: 30px; margin: 0; }
  .prac-head { margin-bottom: 8px; }
  .et-go { margin-top: -46px; pointer-events: none; }
  .et-go > * { pointer-events: auto; }
  .et-map { padding: 8px 14px; }
  .et-map-h { margin-bottom: 4px; }
  #dockInfo { height: 20px; font-size: 13px; }
  #piano { height: calc(100% - 20px); }
  #nav a[data-view] { padding-top: 5px; padding-bottom: 5px; }
  main { grid-template-rows: 54px 1fr auto; }
}
@media (max-height: 760px) { :root { --dock: 104px; } }
.save-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px !important; margin-bottom: 14px; }
.save-note p { margin: 4px 0 0; font-size: 14px; }
.res-actions .btn small.keyhint { display: block; font-size: 11.5px; font-style: italic; opacity: .7; font-weight: 400; margin-top: 2px; }
.keyhint-note { font-size: 12.5px; text-align: right; margin: 6px 0 0; }
/* Sources page */
.sources { display: grid; gap: 18px; max-width: 1100px; }
.sources p { color: var(--muted); line-height: 1.55; margin: 0; }
.src-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.src-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 8px 0; border-bottom: 1px solid rgba(201, 169, 107, .22); }
.src-table td { padding: 10px 12px 10px 0; vertical-align: top; border-bottom: 1px solid rgba(201, 169, 107, .08); line-height: 1.45; }
.src-table td:first-child { width: 27%; } .src-table td:nth-child(2) { width: 13%; } .src-table td:last-child { width: 22%; }
.src-table a, .src-foot a { color: var(--gold, #c9a96b); }
.src-foot { font-size: 13px; padding: 0 4px 24px; }
/* buttons never wrap or spill: labels stay on one line, controls keep their width */
.seg button, .btn, .pill { white-space: nowrap; }
.seg { flex-shrink: 0; }
.setrow > div:first-child { flex: 1 1 auto; min-width: 0; }
.setrow > :not(:first-child) { flex-shrink: 0; }
.btn[aria-busy] { opacity: .55; pointer-events: none; }
/* results popups fit a 13-inch laptop screen without scrolling */
@media (max-height: 920px) {
  .modal-card.res { padding: 18px 22px; max-height: 97vh; }
  .modal-card.res .res-top { gap: 18px; }
  .modal-card.res .res-score { width: 92px; height: 92px; }
  .modal-card.res .res-score .num { font-size: 24px; }
  .modal-card.res h2 { font-size: 22px !important; margin: 2px 0 2px !important; }
  .modal-card.res .res-stars { font-size: 24px; line-height: 1.1; }
  .modal-card.res #xpNum { font-size: 28px !important; }
  .modal-card.res .res-kpis { margin: 12px 0 8px; gap: 8px; }
  .modal-card.res .kpi { padding: 7px 12px; }
  .modal-card.res .kpi b { font-size: 19px; }
  .modal-card.res .hand-rep { margin: 6px 0 2px; gap: 8px; }
  .modal-card.res .hand-rep .hr { padding: 6px 12px; }
  .modal-card.res .hand-rep .hr em { flex-basis: auto; }
  .modal-card.res .res-grid { gap: 12px; margin-top: 8px; }
  .modal-card.res .res-grid > .card { padding: 10px 14px !important; }
  .modal-card.res .res-grid h3 { font-size: 16px; margin-bottom: 2px !important; }
  .modal-card.res .chart { height: 128px; }
  .modal-card.res .insight { padding: 7px 12px; margin-bottom: 6px; gap: 10px; }
  .modal-card.res .insight p { font-size: 12.5px; line-height: 1.35; }
  .modal-card.res .res-actions { margin-top: 10px; }
  .modal-card.res .btn { height: auto; min-height: 40px; padding-top: 5px; padding-bottom: 5px; }
}
.rain-how { margin: 0 0 10px; padding-left: 20px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.rain-how li { margin-bottom: 4px; } .rain-how b { font-weight: 600; }
.syncdot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); flex: none; transition: background .04s, box-shadow .04s; }
.syncdot.on { background: var(--ivory); box-shadow: 0 0 14px rgba(255, 248, 235, .6); }
.syncdot.on.acc { background: var(--gold); box-shadow: 0 0 16px rgba(201, 169, 107, .75); }
.et-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.et-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.et-legend .lg-ok { background: #4c7a47; } .et-legend .lg-amber { background: #b9822a; } .et-legend .lg-miss { background: #a33a32; }

/* Favourite stars on list cards */
.fav { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; padding: 4px; border: 0; background: none; cursor: pointer; color: rgba(201, 169, 107, .38); opacity: 0; transition: opacity .15s, color .15s, transform .15s; z-index: 2; border-radius: 50%; }
.fav svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.ex-card:hover .fav, .et-item:hover .fav, .sb-item:hover .fav, .fav:focus-visible { opacity: 1; }
.fav:hover { color: var(--violet); transform: scale(1.12); }
.fav.on { opacity: 1; color: #c9a96b; }
.fav.on svg { fill: currentColor; }
.et-item, .sb-item { position: relative; padding-right: 36px; }
.ex-card .due { right: 38px; }
.group-title.starred, .et-h.starred { color: #c9a96b; }
@media (hover: none) { .fav { opacity: 1; } }
/* piano-key hint on buttons a key also presses (A0 restarts, C8 next bars) */
.btn[data-key]::after { content: attr(data-key); font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0; padding: 1px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .55; line-height: 1.3; }
/* another Ivory tab is in use: this one is paused */
#passiveNote { display: none; }
body.passive #passiveNote { display: block; position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 1000; max-width: 560px; padding: 12px 18px; border: 1px solid rgba(201, 169, 107, .5); background: #15120e; color: var(--ivory); font-size: 15px; text-align: center; border-radius: 3px; box-shadow: 0 18px 40px -18px #000; cursor: pointer; }
/* Étude Studio: rhythm timeline and runs chart */
.rp { flex: 1 1 100%; min-width: 0; margin-top: 4px; }
.rp-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.rp-h b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.rp-scroll { overflow-x: auto; margin: 4px 0; }
.rp-scroll svg { display: block; }
.rp-l { fill: #8a8274; font-size: 11px; font-family: var(--mono); }
.rp-f { font-size: 14px; color: var(--muted); }
.rp-f b { color: var(--ivory); font-weight: 600; }
/* metronome volume in the top bar */
.mvol-wrap { position: relative; display: inline-flex; }
.mvol-pop { position: absolute; top: 44px; right: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 12px 14px; white-space: nowrap; background: #15120e; border: 1px solid var(--line2); box-shadow: 0 18px 40px -18px #000; }
.mvol-pop[hidden] { display: none; }
.mvol-pop label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mvol-pop input[type=range] { width: 140px; }

/* exercise help: a spotlight on the real control and a small card beside it */
.help-pill { font-family: var(--display); font-size: 17px; width: 36px; padding: 0; justify-content: center; }
.help-ov { position: fixed; inset: 0; z-index: 1200; animation: helpIn .2s ease; }
.help-ov.dim { background: rgba(8, 7, 6, .62); }
.help-ov.out { opacity: 0; transition: opacity .18s; }
.help-spot { position: absolute; border-radius: 10px; border: 1px solid rgba(201, 169, 107, .75); box-shadow: 0 0 0 9999px rgba(8, 7, 6, .62), 0 0 24px rgba(201, 169, 107, .25) inset; pointer-events: none; transition: left .3s cubic-bezier(.2, .9, .3, 1), top .3s cubic-bezier(.2, .9, .3, 1), width .3s, height .3s; }
.help-card { position: absolute; width: min(360px, 92vw); padding: 18px 20px 14px; border-radius: 14px; background: linear-gradient(180deg, #1c1814, #100e0c); border: 1px solid var(--line2); box-shadow: 0 24px 70px -12px rgba(0, 0, 0, .85); transition: left .3s cubic-bezier(.2, .9, .3, 1), top .3s cubic-bezier(.2, .9, .3, 1); }
.help-card .help-k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.help-card h3 { font-family: var(--display); font-size: 22px; font-weight: 500; margin: 4px 0 6px; }
.help-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 15px; }
.help-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.help-btns { display: flex; gap: 6px; }
@keyframes helpIn { from { opacity: 0; } to { opacity: 1; } }

/* metric explanations on hover */
.mtip { cursor: help; }
.mtip > span { text-decoration: underline dotted rgba(201, 169, 107, .55); text-underline-offset: 3px; }
.mtip-pop { position: fixed; z-index: 1300; max-width: 320px; padding: 10px 13px; border-radius: 10px; background: #1b1713; border: 1px solid var(--line2); color: var(--text); font-size: 13.5px; line-height: 1.5; box-shadow: 0 18px 50px -10px rgba(0, 0, 0, .85); pointer-events: none; }

/* legendary achievements */
.ach-legend { border-color: rgba(201, 169, 107, .32); background: linear-gradient(180deg, rgba(201, 169, 107, .06), rgba(201, 169, 107, .015)); }
.ach.legend { border-color: rgba(201, 169, 107, .22); flex-wrap: nowrap; }
.ach.legend > div:last-child { flex: 1; min-width: 0; }
.ach.legend.got { border-color: var(--gold); box-shadow: 0 0 22px -6px rgba(201, 169, 107, .55) inset; }
.ach.legend.got b { color: var(--cyan); }
.ach-bar { display: block; height: 3px; margin-top: 7px; border-radius: 2px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.ach-bar > div { display: block; height: 100%; background: linear-gradient(90deg, var(--violet2), var(--gold)); }
.ach-pct { display: block; font-style: normal; font-size: 11px; color: var(--dim); margin-top: 3px; }
.src-terms p { margin: 0 0 10px; }
