:root {
  --bg: #0f0b17;
  --bg2: #150f20;
  --panel: #18121f;
  --panel2: #1f1829;
  --line: rgba(255, 255, 255, 0.08);
  --ink: #f6f1fd;
  --muted: #a99fbb;
  --dim: #6f6582;
  --sun1: #ffb547;
  --sun2: #ff7a3d;
  --sun3: #ff4f8b;
  --sun4: #9b5cff;
  --good: #3ee08f;
  --gold: #ffcc33;
  --f0: #e9eef7;
  --f1: #4fc3ff;
  --f2: #3ee08f;
  --f3: #ffcc33;
  --f4: #ff5c8a;
  --r: 18px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); font-size: 16px; line-height: 1.5;
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(255, 79, 139, 0.16), transparent 60%),
    radial-gradient(900px 500px at 5% -5%, rgba(255, 138, 61, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: #ffb38a; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
h2 { font-size: 19px; font-weight: 700; }
p { margin: 0.5em 0; }
b { font-weight: 700; }
button { font-family: inherit; }

/* ---------- header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 18px;
  padding-block: 10px; padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px));
  background: rgba(15, 11, 23, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; white-space: nowrap; }
.brand b { background: linear-gradient(90deg, var(--sun1), var(--sun3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pick {
  width: 30px; height: 34px; display: grid; place-items: center; font-weight: 800; color: #1a0f1f;
  background: linear-gradient(160deg, var(--sun1), var(--sun3)); border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
  box-shadow: 0 4px 16px rgba(255, 90, 120, 0.4);
}
.nav { display: flex; gap: 4px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; white-space: nowrap; transition: 0.15s; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav a.on { color: #1a0f1f; background: linear-gradient(90deg, var(--sun1), var(--sun2)); }
.level-switch { display: flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.level-switch button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.level-switch button.on { background: #fff; color: #1a0f1f; }

/* ---------- layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding-block: 26px 90px; padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }
body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.by-ear { color: #ddd3ea; background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 12px 14px; margin: 4px 0 0; }
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.card + .card { margin-top: 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid2 .card + .card { margin-top: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--sun2); margin-bottom: 6px; }
.page-h { margin-bottom: 22px; max-width: 760px; }
.page-h p { color: var(--muted); font-size: 18px; }
.hint { color: var(--muted); font-size: 14px; }
.pill { font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.hn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 138, 61, 0.15); color: var(--sun1); font-size: 14px; margin-right: 6px; vertical-align: 2px; }
.next-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05);
  color: var(--ink); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { border: 0; color: #1a0f1f; background: linear-gradient(90deg, var(--sun1), var(--sun2) 60%, var(--sun3)); box-shadow: 0 6px 22px rgba(255, 110, 80, 0.32); }
.btn.primary:hover { box-shadow: 0 8px 28px rgba(255, 110, 80, 0.5); }
.btn.on { outline: 2px solid var(--sun1); outline-offset: 2px; }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 24px; font-size: 17px; }
.btn .ico { font-size: 0.85em; }
.ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-l { font-size: 12px; color: var(--muted); padding: 0 8px 0 10px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 9px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--ink); color: #1a0f1f; }
.tog { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); color: var(--muted); padding: 7px 13px 7px 8px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; }
.tog .sw { width: 30px; height: 18px; border-radius: 999px; background: #3a3247; position: relative; transition: 0.15s; }
.tog .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #8d83a0; transition: 0.15s; }
.tog.on { color: var(--ink); }
.tog.on .sw { background: var(--good); }
.tog.on .sw::after { left: 14px; background: #fff; }
select { font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
label.sel { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; }

.stars i { font-style: normal; color: #3a3247; font-size: 16px; letter-spacing: 1px; }
.stars i.on { color: var(--gold); text-shadow: 0 0 10px rgba(255, 204, 51, 0.5); }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 600; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.lg b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #0f0b18; font-size: 12px; }
.lg.f0 b { background: var(--f0); } .lg.f1 b { background: var(--f1); } .lg.f2 b { background: var(--f2); } .lg.f3 b { background: var(--f3); } .lg.f4 b { background: var(--f4); }

/* ---------- home ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding: 36px 0 26px; overflow: hidden; }
.sun {
  position: absolute; right: -40px; top: -10px; width: 440px; height: 440px; border-radius: 50%;
  background: linear-gradient(180deg, #ffd166 0%, #ff8a3d 45%, #ff4f8b 75%, #9b5cff 100%);
  --stripes: linear-gradient(180deg, #000 0 54%, transparent 54% 57%, #000 57% 65%, transparent 65% 69%, #000 69% 76%, transparent 76% 81%, #000 81% 87%, transparent 87% 93%, #000 93%);
  -webkit-mask-image: var(--stripes); mask-image: var(--stripes);
  opacity: 0.8; filter: drop-shadow(0 0 60px rgba(255, 90, 120, 0.35));
}
.hero-text { position: relative; max-width: 720px; }
.title {
  font-size: clamp(46px, 8vw, 92px); line-height: 0.95; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(95deg, #fff 0%, #ffe1c2 30%, var(--sun1) 55%, var(--sun3) 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(255, 120, 90, 0.18);
}
.sub { font-size: clamp(17px, 2vw, 21px); color: #d9cfe8; max-width: 600px; margin: 16px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); color: #e6dcf4; background: rgba(15, 11, 23, 0.55); backdrop-filter: blur(6px); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-hw { padding: 0; overflow: hidden; }
.hero-hw-cap { padding: 12px 18px 14px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.parts { margin-top: 34px; }
.parts h2 { font-size: 24px; margin-bottom: 14px; }
.part-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.part-card { position: relative; display: block; padding: 16px 16px 14px; border-radius: var(--r); background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: 0.15s; }
.part-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.part-card .pn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, var(--sun1), var(--sun3)); color: #1a0f1f; font-weight: 800; margin-bottom: 8px; }
.part-card b { display: block; font-size: 18px; }
.part-card small { color: var(--sun1); font-weight: 700; }
.part-card p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.step-part { margin: 12px 0 2px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: var(--sun2); }
.step-part:first-child { margin-top: 0; }
.tab-barnum { fill: var(--dim); font-size: 12px; font-weight: 600; }
.tab-note .tech, .tab-mark .tech { fill: #ffd9a8; font-size: 12px; font-weight: 800; paint-order: stroke; stroke: #17121f; stroke-width: 3px; stroke-linejoin: round; }
.tab-note .bend, .tab-mark .bend { fill: none; stroke: #ffd9a8; stroke-width: 2; }
.levels { margin-top: 34px; }
.levels h2, .mission h2 { font-size: 24px; margin-bottom: 14px; }
.level-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.level-card { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; color: var(--ink); background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 2px solid var(--line); border-radius: var(--r); padding: 18px 20px 12px; cursor: pointer; transition: 0.15s; font: inherit; }
.level-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.level-card.on { border-color: var(--sun2); box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.15); }
.lc-top { display: flex; align-items: baseline; justify-content: space-between; }
.lc-top b { font-size: 22px; }
.lc-top span { color: var(--sun1); font-weight: 700; font-size: 14px; }
.level-card p { color: var(--muted); font-size: 15px; min-height: 66px; }
.lc-mini { margin: 4px -8px 0; pointer-events: none; }
.mission { margin-top: 34px; }
.mission-h { display: flex; justify-content: space-between; align-items: baseline; }
.total { font-weight: 800; font-size: 20px; color: var(--gold); }
.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pstep { display: flex; align-items: center; gap: 12px; padding: 14px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: 0.15s; }
.pstep:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.pstep .n { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: rgba(255, 138, 61, 0.14); color: var(--sun1); }
.pstep .t { flex: 1; font-weight: 700; line-height: 1.2; }
.pstep small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; margin-top: 2px; }
.pstep .mark { color: var(--good); font-weight: 800; }
.pstep.boss { background: linear-gradient(135deg, rgba(255, 138, 61, 0.22), rgba(155, 92, 255, 0.22)); grid-column: span 1; }
.pstep.boss .n { background: var(--gold); color: #1a0f1f; }
.source { margin-top: 30px; color: var(--muted); }
.source b { color: var(--ink); }

/* ---------- fretboard ---------- */
.fb-host { width: 100%; }
.fb { width: 100%; height: auto; max-height: 300px; display: block; margin: 0 auto; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.fb-zone { fill: rgba(255, 138, 61, 0.07); stroke: rgba(255, 138, 61, 0.4); stroke-dasharray: 6 6; }
.fb-inlay { fill: #e8dfcc; opacity: 0.75; }
.fb-nums text { fill: var(--dim); font-size: 14px; font-weight: 600; }
.fb-nums text.on { fill: var(--sun1); font-weight: 800; }
.fb-sname { fill: var(--muted); font-size: 15px; font-weight: 700; }
.fb-hits rect { cursor: pointer; }
.fb-hits rect:hover { fill: rgba(255, 255, 255, 0.06); }
.fb-mark .dot { stroke: rgba(0, 0, 0, 0.45); stroke-width: 2; }
.fb-mark .halo { fill: none; stroke-width: 3; opacity: 0; }
.fb-mark .num { font-size: 17px; font-weight: 800; fill: #0f0b18; pointer-events: none; }
.fb-mark .ord { font-size: 11px; font-weight: 700; fill: var(--muted); }
.fb-mark.f0 .dot { fill: #0f0b18; stroke: var(--f0); stroke-width: 3; } .fb-mark.f0 .num { fill: var(--f0); }
.fb-mark.f1 .dot { fill: var(--f1); } .fb-mark.f1 .halo { stroke: var(--f1); }
.fb-mark.f2 .dot { fill: var(--f2); } .fb-mark.f2 .halo { stroke: var(--f2); }
.fb-mark.f3 .dot { fill: var(--f3); } .fb-mark.f3 .halo { stroke: var(--f3); }
.fb-mark.f4 .dot { fill: var(--f4); } .fb-mark.f4 .halo { stroke: var(--f4); }
.fb-mark.f0 .halo { stroke: var(--f0); }
.fb-mark.now .halo { opacity: 1; animation: halo 0.9s ease-out infinite; }
.fb-mark.now .dot { filter: url(#fbGlow); }
.fb-mark.next .halo { opacity: 0.6; stroke-dasharray: 4 5; }
@keyframes halo { 0% { r: 17; opacity: 1; } 100% { r: 30; opacity: 0; } }
.fb-ping { fill: none; stroke: #fff; stroke-width: 3; animation: ping 0.65s ease-out forwards; }
.fb-ping.hit { stroke: var(--good); }
.fb-ping.guide { stroke: var(--sun1); }
@keyframes ping { from { r: 14; opacity: 1; } to { r: 34; opacity: 0; } }
.fb-string.buzz { animation: buzz 0.35s linear; }
@keyframes buzz { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-1.2px); } 75% { transform: translateY(1.2px); } }
.fb-tip rect { fill: #fff; } .fb-tip text { fill: #1a0f1f; font-weight: 800; font-size: 15px; }

/* ---------- tab ---------- */
.tab-host, .mini-tab { min-width: 0; }
.tab { width: 100%; height: auto; display: block; overflow: visible; }
.tab-line { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.4; }
.tab-bar { stroke: rgba(255, 255, 255, 0.45); stroke-width: 2; }
.tab-t { fill: var(--dim); font-weight: 800; font-size: 15px; }
.tab-s { fill: var(--dim); font-size: 12px; font-weight: 700; }
.tab-chord { fill: #ffbe78; font-weight: 700; font-size: 15px; }
.tab-count { fill: var(--dim); font-size: 13px; font-weight: 600; }
.tab-count.beat { fill: var(--ink); font-size: 16px; font-weight: 800; }
.tab-cursor { fill: var(--sun1); filter: drop-shadow(0 0 6px rgba(255, 138, 61, 0.9)); }
.tab-note { cursor: pointer; }
.tab-note .box { fill: #120e1a; stroke-width: 2.5; }
.tab-note .fret { font-weight: 800; font-size: 17px; fill: var(--ink); }
.tab-note .fret.small { font-size: 14px; }
.tab-note .fret.tiny { font-size: 12.5px; letter-spacing: -0.03em; }
.tab.narrow .tab-chord { font-size: 13px; }
.tab.narrow .tab-count { font-size: 10.5px; }
.tab.narrow .tab-count.beat { font-size: 14px; }
.tab.narrow .tab-note .fret { font-size: 15px; }
.tab.narrow .tab-note .fret.small { font-size: 13.5px; }
.tab.narrow .tab-note .fret.tiny { font-size: 12px; }
.tab.narrow .tab-barnum { font-size: 11px; }
.tab.narrow .tab-note .tech, .tab.narrow .tab-mark .tech { font-size: 11px; }
.tab-note .tail { opacity: 0.35; }
.tab-note .vib { fill: none; stroke-width: 2; }
.tab-note.f0 .box { stroke: var(--f0); } .tab-note.f0 .tail { fill: var(--f0); } .tab-note.f0 .vib { stroke: var(--f0); }
.tab-note.f1 .box { stroke: var(--f1); } .tab-note.f1 .tail { fill: var(--f1); } .tab-note.f1 .vib { stroke: var(--f1); }
.tab-note.f2 .box { stroke: var(--f2); } .tab-note.f2 .tail { fill: var(--f2); } .tab-note.f2 .vib { stroke: var(--f2); }
.tab-note.f3 .box { stroke: var(--f3); } .tab-note.f3 .tail { fill: var(--f3); } .tab-note.f3 .vib { stroke: var(--f3); }
.tab-note.f4 .box { stroke: var(--f4); } .tab-note.f4 .tail { fill: var(--f4); } .tab-note.f4 .vib { stroke: var(--f4); }
.tab-note.now .box { fill: currentColor; }
.tab-note.f0.now .box { fill: var(--f0); } .tab-note.f1.now .box { fill: var(--f1); } .tab-note.f2.now .box { fill: var(--f2); } .tab-note.f3.now .box { fill: var(--f3); } .tab-note.f4.now .box { fill: var(--f4); }
.tab-note.now .fret { fill: #0f0b18; }
.yourturn { text-align: center; font-weight: 800; color: var(--good); font-size: 20px; height: 0; overflow: hidden; opacity: 0; transition: 0.2s; }
.yourturn.show { height: 32px; opacity: 1; }

/* ---------- learn ---------- */
.learn { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.steps { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 6px; }
.step-pill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: var(--muted); text-decoration: none; border: 1px solid transparent; font-weight: 600; }
.step-pill:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.step-pill.on { background: var(--panel2); border-color: var(--line); color: var(--ink); }
.step-pill .n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, 0.06); font-weight: 800; font-size: 14px; }
.step-pill.on .n { background: linear-gradient(135deg, var(--sun1), var(--sun3)); color: #1a0f1f; }
.step-pill .t { flex: 1; line-height: 1.2; }
.step-pill .stars i { font-size: 12px; }
.step-pill.boss .n { background: var(--gold); color: #1a0f1f; }
.step-head { margin-bottom: 18px; }
.step-head .say { font-size: 19px; color: #e1d8ee; max-width: 760px; }
.how { color: #ddd3ea; font-size: 16px; margin-top: 12px; padding: 12px 14px; background: rgba(255, 255, 255, 0.035); border-radius: 12px; border-left: 3px solid var(--sun2); }
.tipbox { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 18px; border-radius: var(--r); background: linear-gradient(90deg, rgba(255, 204, 51, 0.1), rgba(255, 204, 51, 0.03)); border: 1px solid rgba(255, 204, 51, 0.25); }
.tipbox span { font-size: 22px; }
.tipbox p { margin: 0; color: #f3e6bf; }
.try .hint { margin-bottom: 0; }
.watch { margin-top: 18px; }

/* ---------- Aiden's video ---------- */
.watch-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.wv { min-width: 0; }
.wv-box { aspect-ratio: 9 / 16; width: 100%; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.wv-box iframe, .wv-box video { display: block; width: 100%; height: 100%; border: 0; }
.wv-box video { object-fit: contain; background: #000; }
.wv-note { margin-top: 8px; text-align: center; font-weight: 700; font-size: 14px; color: var(--gold); }
.wv-msg { margin-top: 10px; padding: 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px dashed rgba(255, 255, 255, 0.16); color: var(--muted); font-size: 15px; }
.wv-msg p { margin: 0 0 12px; }
.wv-box[hidden] + .wv-note + .wv-msg { margin-top: 0; }
.watch-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.watch-side .hint { margin: 0; }
.w-tab { min-height: 120px; }
.w-rep { flex-wrap: wrap; }
.seg button.now:not(.on) { color: var(--ink); box-shadow: inset 0 0 0 2px var(--sun1); }
.wv-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wv-links .btn small { color: var(--muted); font-weight: 600; margin-left: 4px; }
/* no player on this page (the claude.ai copy): links to the same moments on YouTube */
.watch.no-video .watch-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.watch.no-video .wv { width: auto; margin: 0; }
.watch.no-video #wCtl, .watch.no-video #wRep, .watch.no-video .w-tab { display: none; }

/* ---------- highway ---------- */
canvas.hw { width: 100%; display: block; border-radius: 14px; }
canvas.hw.compact { height: 220px; }
canvas.hw.demo { height: 250px; border-radius: 0; }
canvas.hw.big { height: 400px; touch-action: pan-y; }
.hw-card { padding: 10px; }

/* ---------- the bar map under Riff Hero ---------- */
.p-hook { --pc: #ffb547; } .p-chorus { --pc: #ff6f9c; } .p-solo { --pc: #a77bff; } .p-riff { --pc: #4fc3ff; }
.barmap { padding: 12px 4px 2px; }
.bm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bm-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 700; }
.bm-key i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; background: var(--pc); vertical-align: -1px; }
.btn.small { padding: 7px 14px; font-size: 14px; min-height: 40px; }
.bm-bars { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 5px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.bm-bar { position: relative; min-height: 48px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.045); color: var(--muted); font: inherit; padding: 3px 0 8px; cursor: pointer; display: grid; place-items: center; align-content: center; line-height: 1.1; transition: background 0.12s, opacity 0.12s; -webkit-tap-highlight-color: transparent; }
.bm-bar::after { content: ''; position: absolute; left: 5px; right: 5px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--pc); opacity: 0.85; }
.bm-bar.split::after { background: linear-gradient(90deg, #ffb547 50%, #ff6f9c 50%); }
.bm-bar b { font-size: 16px; font-weight: 800; color: var(--ink); }
.bm-bar small { font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; max-width: 100%; }
.bm-bar:hover { background: rgba(255, 255, 255, 0.09); }
.bm-bar.out { opacity: 0.4; }
.bm-bar.loop { background: rgba(255, 138, 61, 0.16); border-color: rgba(255, 138, 61, 0.65); opacity: 1; }
.bm-bar.pend { background: rgba(255, 255, 255, 0.18); }
.bm-bar.arm { outline: 2px dashed var(--sun1); outline-offset: 1px; }
.bm-bar.now { background: linear-gradient(180deg, var(--sun1), var(--sun2)); border-color: transparent; opacity: 1; box-shadow: 0 0 16px rgba(255, 138, 61, 0.55); }
.bm-bar.now b, .bm-bar.now small { color: #1a0f1f; }
.bm-help { margin: 10px 2px 2px; font-size: 13.5px; color: var(--muted); }
.bm-help b { color: var(--sun1); }

/* ---------- play ---------- */
.play-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hud { display: flex; gap: 10px; }
.hud > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 16px; min-width: 84px; text-align: center; }
.hud small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.hud b { font-size: 24px; font-weight: 800; }
.controls .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.controls .row + .row { margin-top: 12px; justify-content: flex-start; }
.modes { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- gear ---------- */
.tuner-face { display: grid; justify-items: center; padding: 10px 0 6px; }
.tn-note { font-size: 72px; font-weight: 800; line-height: 1; color: var(--ink); transition: color 0.15s; }
.tn-meter { position: relative; width: min(340px, 100%); height: 120px; overflow: hidden; }
.tn-scale { position: absolute; left: 50%; bottom: 0; width: 300px; height: 150px; transform: translateX(-50%); }
.tn-scale i { position: absolute; left: 50%; bottom: 0; width: 2px; height: 120px; transform-origin: 50% 100%; }
.tn-scale i::before { content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 16px; background: var(--dim); border-radius: 2px; }
.tn-scale i.mid::before { height: 26px; background: var(--good); width: 3px; }
.tn-scale i:nth-child(1) { transform: rotate(-80deg); } .tn-scale i:nth-child(2) { transform: rotate(-64deg); } .tn-scale i:nth-child(3) { transform: rotate(-48deg); }
.tn-scale i:nth-child(4) { transform: rotate(-32deg); } .tn-scale i:nth-child(5) { transform: rotate(-16deg); } .tn-scale i:nth-child(6) { transform: rotate(0deg); }
.tn-scale i:nth-child(7) { transform: rotate(16deg); } .tn-scale i:nth-child(8) { transform: rotate(32deg); } .tn-scale i:nth-child(9) { transform: rotate(48deg); }
.tn-scale i:nth-child(10) { transform: rotate(64deg); } .tn-scale i:nth-child(11) { transform: rotate(80deg); }
.tn-needle { position: absolute; left: calc(50% - 2px); bottom: 0; width: 4px; height: 110px; background: linear-gradient(var(--sun1), var(--sun3)); border-radius: 4px; transform-origin: 50% 100%; transition: transform 0.12s; }
.tn-needle::after { content: ''; position: absolute; left: -8px; bottom: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); }
.tn-read { color: var(--muted); margin-top: 12px; text-align: center; min-height: 24px; font-weight: 600; }
.tuner-face.good .tn-note, .tuner-face.good .tn-read { color: var(--good); }
.tuner-face.good .tn-needle { background: var(--good); }
.tn-strings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.tn-strings button { position: relative; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--ink); border-radius: 12px; padding: 8px 4px; cursor: pointer; display: grid; justify-items: center; }
.tn-strings button b { font-size: 22px; }
.tn-strings button small { color: var(--muted); font-size: 10.5px; line-height: 1.2; text-align: center; }
.tn-strings button.sel { border-color: var(--sun1); background: rgba(255, 138, 61, 0.12); }
.tn-strings .ok { position: absolute; top: 3px; right: 6px; color: var(--good); font-weight: 800; display: none; }
.tn-strings button.done .ok { display: block; }
.knobs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.knobs li { display: flex; gap: 14px; align-items: flex-start; }
.kn { flex: none; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); display: grid; place-items: center; font-size: 20px; }
.knobs p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.handpic { display: grid; place-items: center; margin-top: 8px; }
.hand { width: min(320px, 100%); height: auto; }
.mini-tab { margin: 10px 0 4px; }
.fb-host.small { margin-top: 8px; }

/* ---------- sheet ---------- */
.sheet-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.meta { color: var(--muted); }
.paper { background: #fffdf8; color: #1b1622; border-radius: var(--r); padding: 18px 18px 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.sheet-svg { width: 100%; height: auto; display: block; }
.sheet-svg .vf-now path, .sheet-svg .vf-now text, .sheet-svg .vf-now rect { fill: #ff5a1f !important; stroke: #ff5a1f !important; }
.paper-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #4a4255; border-top: 1px solid #ece6dc; padding-top: 10px; margin-top: 4px; }
.paper-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.sheet-help { margin-top: 18px; }
.sheet-help p { color: var(--muted); }

/* ---------- tips ---------- */
.tips .ctl { margin-top: 10px; }
.tips p { color: #d6cce4; }
.plan { margin: 8px 0; padding-left: 20px; color: #d6cce4; }
.plan li { margin: 4px 0; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 50;
  background: #241c30; color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.15); padding: 12px 20px; border-radius: 16px;
  font-weight: 600; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); transition: 0.25s; max-width: min(92vw, 640px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.good { border-color: rgba(62, 224, 143, 0.5); }
#toast.gold { border-color: rgba(255, 204, 51, 0.7); background: linear-gradient(90deg, #3a2a10, #2b1d34); font-size: 18px; }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .learn { grid-template-columns: minmax(0, 1fr); }
  /* the steps as a grid of numbered buttons: all of them in sight, no sideways scrolling */
  .steps { position: static; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
  .steps .step-part { display: none; }
  .step-pill { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 2px 5px; min-height: 50px; border-color: var(--line); background: rgba(255, 255, 255, 0.03); }
  .step-pill .t { display: none; }
  .step-pill .stars i { font-size: 9px; letter-spacing: 0; }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .part-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 8px; }
  .nav { order: 3; width: 100%; margin: 0; overflow: visible; justify-content: space-between; gap: 2px; }
  .nav a { flex: 1 1 auto; text-align: center; padding: 9px 4px; font-size: 14px; min-height: 40px; display: grid; place-items: center; }
  .level-switch { margin-left: auto; }
  .level-switch button { min-height: 40px; }
  .tab-host { margin-inline: -8px; }
  .steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bm-bars { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
  .bm-bar small { display: none; }
  .bm-bar { min-height: 44px; }
  .paper { padding: 10px 6px 10px; }
  .seg button { min-height: 40px; }
  .tog { min-height: 40px; }
  .page { padding-block: 18px 80px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .grid2, .level-cards { grid-template-columns: minmax(0, 1fr); }
  .sun { width: 220px; height: 220px; right: -70px; top: -40px; opacity: 0.3; }
  .card { padding: 16px; }
  .seg { flex-wrap: wrap; }
  .seg button { padding: 6px 7px; }
  .seg-l { padding: 0 4px 0 8px; }
  canvas.hw.big { height: 320px; }
  .hud > div { min-width: 64px; padding: 6px 10px; }
  .tn-strings { grid-template-columns: repeat(3, 1fr); }
  .path { grid-template-columns: minmax(0, 1fr); }
  /* the video as big as fits with its tab under it on one screen */
  .watch-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wv { width: min(100%, 330px); margin-inline: auto; }
  .wv { width: min(100%, 330px, max(230px, calc((100svh - 330px) * 0.5625))); }
  .watch-side .w-tab { order: -1; }
}

@media (max-width: 400px) {
  .top { gap: 6px; }
  .brand { font-size: 16px; gap: 7px; }
  .pick { width: 26px; height: 30px; }
  .level-switch button { padding: 6px 10px; font-size: 14px; }
  .nav a { font-size: 13.5px; padding-inline: 2px; }
}

/* ---------- print: only the sheet ---------- */
@media print {
  @page { size: landscape; margin: 12mm; }
  body { background: #fff; color: #000; }
  .top, .ctl, .sheet-help, #toast, .nav { display: none !important; }
  .page { padding: 0; max-width: none; }
  .sheet-top h1 { color: #000; font-size: 26px; }
  .meta, .eyebrow { color: #333; }
  .paper { box-shadow: none; padding: 0; }
  .sheet-svg { min-width: 0; }
}
