/* Guitar Pilot web — one stylesheet for every app page.
   Tokens and components follow design/*.html exactly. */
:root {
  --bg: #f4f7fe; --surface: #ffffff; --tint: #e8effe; --tint-2: #d6e2fc; --line: #d8e0f1;
  --ink: #0b1f4b; --navy: #042f6e; --navy-2: #0f3a86; --text: #1d2b4f; --muted: #5f6d8c;
  --blue: #2a56f4; --blue-dark: #1e44cc; --sky: #7fb2ff; --amber: #f5b843; --amber-text: #c68a1f; --amber-ink: #3d2a05;
  --danger: #e0426f;
  --display: "Baloo 2", "Trebuchet MS", sans-serif; --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --r-card: 22px; --r-tile: 16px; --r-pill: 999px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.eyebrow { font-family: var(--display); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tab-nums { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Frame: phone = full screen; desktop = 560px column on the glow ---- */
.shell { min-height: 100%; position: relative; }
.shell::before { content: ""; position: fixed; inset: 0; background: radial-gradient(55% 45% at 75% 10%, rgba(127,178,255,0.30), transparent 70%), radial-gradient(45% 45% at 15% 80%, rgba(42,86,244,0.10), transparent 70%); pointer-events: none; }
.brandbar { display: none; }
.col { position: relative; width: 100%; max-width: 560px; margin-inline: auto; padding: max(14px, env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; align-content: start; min-height: 100dvh; }
.col.with-tabs { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 720px) {
  .brandbar { position: relative; display: flex; align-items: center; width: min(560px, 100% - 40px); margin: 0 auto; padding: 22px 0 6px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
  .brandbar .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: 0.75rem; margin-right: 8px; }
  .col { padding-top: 10px; min-height: 0; }
}

/* ---- Buttons ---- */
.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 1.05rem; padding: 1rem 1.4rem; border-radius: var(--r-pill); border: 0; cursor: pointer; background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(42,86,244,0.28); transition: background 0.15s, transform 0.15s, opacity 0.15s; text-decoration: none; }
.btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn[disabled], .btn.busy { opacity: 0.45; box-shadow: none; transform: none; cursor: default; pointer-events: none; }
.btn-ghost { background: var(--tint); color: var(--navy); box-shadow: none; }
.btn-ghost:hover { background: var(--tint-2); }
.link { background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 12px; cursor: pointer; width: 100%; text-align: center; display: block; }
.link:hover { color: var(--blue); }
.round { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--navy); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(4,47,110,0.08); flex: 0 0 38px; }
.round svg { width: 16px; height: 16px; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 18px; height: 18px; }

/* ---- Cards / fields ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; }
.field { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 4px 18px; transition: border-color 0.15s; }
.field:focus-within { border-color: var(--blue); }
.field input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.15rem; font-weight: 600; color: var(--ink); padding: 14px 0; }
.field input::placeholder { color: #a3aec7; font-weight: 400; }
.hint { margin-top: 10px; font-size: 0.85rem; color: var(--muted); text-align: center; }
.error { background: #fff0f3; color: #b3243f; border: 1px solid #f7c6d0; border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; }
.notice { background: #fff4de; color: #8a5a0a; border: 1px solid #fbe3b2; border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; }
.grow { flex: 1; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.9rem; box-shadow: 0 10px 24px rgba(0,0,0,0.25); z-index: 30; max-width: calc(100% - 40px); text-align: center; }

/* ---- Floating tab bar ---- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: min(360px, 100% - 24px); height: 66px; background: var(--navy); border-radius: 26px; display: flex; align-items: center; padding: 0 8px; box-shadow: 0 16px 40px rgba(4,47,110,0.28); z-index: 5; }
.tab { position: relative; flex: 1; height: 52px; border: 0; background: transparent; color: #9fb3d9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; border-radius: 16px; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em; padding: 0; }
.tab svg { width: 21px; height: 21px; }
.tab.on { color: #fff; }
.tab.on::before { content: ""; position: absolute; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,0.1); z-index: -1; }

/* ---- Header (Home) ---- */
.head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 0.85rem; }
.head h1 { font-size: 1.35rem; font-weight: 800; }
.head p { color: var(--muted); font-size: 0.9rem; }
.head .sp { flex: 1; }
.page-title { font-size: 1.6rem; font-weight: 800; }

/* ---- Hero card ---- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: var(--r-card); padding: 20px 20px 18px; min-height: 148px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.06); }
.hero::before { width: 240px; height: 240px; right: -90px; top: -110px; }
.hero::after { width: 180px; height: 180px; left: -70px; bottom: -100px; }
.hero > * { position: relative; }
.hero .eyebrow { color: var(--amber); }
.hero h2 { color: #fff; font-size: 1.5rem; font-weight: 800; }
.hero p { color: #b9c9ea; font-size: 0.95rem; }
.hero .play { position: absolute; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; background: var(--amber); color: var(--navy); display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: 0 8px 18px rgba(245,184,67,0.35); }
.hero .play svg { width: 18px; height: 18px; margin-left: 3px; }

/* ---- Paste bar ---- */
.paste { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 6px 6px 16px; box-shadow: 0 8px 24px rgba(4,47,110,0.07); }
.paste svg { width: 18px; height: 18px; color: var(--blue); flex: 0 0 18px; }
.paste input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 0.98rem; color: var(--text); outline: none; }
.paste input::placeholder { color: #95a1bd; }
.paste button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; flex: 0 0 42px; }
.paste button svg { width: 18px; height: 18px; color: #fff; }

/* ---- Quick tiles ---- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.tile .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--blue); flex: 0 0 38px; }
.tile .ic svg { width: 19px; height: 19px; }
.tile.amber .ic { background: #fff4de; color: var(--amber-text); }
.tile.saved { color: var(--amber-text); background: #fff4de; border-color: #fbe3b2; }
.tile svg { width: 18px; height: 18px; }

/* ---- Sections / song rows ---- */
.sec { display: grid; gap: 12px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; }
.sec-h h2 { font-size: 1.2rem; font-weight: 800; }
.sec-h a { color: var(--blue); font-weight: 700; font-size: 0.9rem; }
.list { display: grid; gap: 10px; }
.song { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); cursor: pointer; }
.song .thumb { width: 64px; height: 48px; border-radius: 10px; background: var(--navy-2); flex: 0 0 64px; display: grid; place-items: center; color: rgba(255,255,255,0.8); overflow: hidden; position: relative; }
.song .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.song .thumb svg { width: 18px; height: 18px; }
.song .meta { flex: 1; min-width: 0; }
.song b { display: block; font-size: 0.98rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song span { display: block; font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .heart { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: #b9c5e0; cursor: pointer; display: grid; place-items: center; flex: 0 0 36px; }
.song .heart.on { color: var(--danger); }
.song .heart svg { width: 18px; height: 18px; }
.first { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); cursor: pointer; }
.first .thumb { width: 84px; height: 62px; border-radius: 12px; background: var(--navy-2); flex: 0 0 84px; display: grid; place-items: center; color: #fff; overflow: hidden; }
.first .thumb img { width: 100%; height: 100%; object-fit: cover; }
.first .eyebrow { color: var(--blue); }
.first b { display: block; font-family: var(--display); font-size: 1.1rem; color: var(--ink); margin-top: 2px; }
.first span { display: block; font-size: 0.85rem; color: var(--muted); }
.first .go { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; flex: 0 0 40px; }
.first .go svg { width: 16px; height: 16px; }
.empty { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 10px 0 0; }
.empty svg { width: 28px; height: 28px; color: #b9c5e0; display: block; margin: 0 auto 6px; }

/* ---- Discover ---- */
.chips-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips-row::-webkit-scrollbar { display: none; }
.chipbtn { flex: 0 0 auto; font-weight: 700; font-size: 0.85rem; padding: 9px 16px; border-radius: var(--r-pill); background: var(--surface); color: var(--navy); border: 1px solid var(--line); }
.chipbtn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 12px; min-width: 0; }
.dcard .thumb { height: 84px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; color: rgba(4,47,110,0.35); overflow: hidden; }
.dcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcard b { display: block; margin-top: 8px; font-size: 0.92rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard span { display: block; font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; margin-top: 6px; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--tint); color: var(--navy); }
.badge.easy { background: #e3f6ea; color: #1f8a4c; } .badge.medium { background: #fff4de; color: var(--amber-text); } .badge.hard { background: #fde8ec; color: #b3243f; }
.sotd { position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: var(--r-card); padding: 20px; display: block; }
.sotd::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.06); right: -80px; top: -100px; }
.sotd > * { position: relative; }
.sotd .eyebrow { color: var(--amber); display: flex; align-items: center; gap: 6px; }
.sotd h2 { color: #fff; font-size: 1.35rem; margin-top: 4px; }
.sotd p { color: #b9c9ea; font-size: 0.9rem; }
.sotd .play { position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--amber); color: var(--navy); display: grid; place-items: center; }
.sotd .play svg { width: 16px; height: 16px; margin-left: 2px; }
.searchbar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 8px 8px 16px; }
.searchbar svg { width: 18px; height: 18px; color: var(--muted); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 0.98rem; color: var(--text); }
.filters { display: flex; gap: 8px; }

/* ---- Settings ---- */
.profile { position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: var(--r-card); padding: 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; border: 0; width: 100%; text-align: left; }
.profile .avatar { background: var(--amber); color: var(--navy); width: 48px; height: 48px; }
.profile b { display: block; font-family: var(--display); font-size: 1.1rem; }
.profile span { display: block; color: #9fb3d9; font-size: 0.8rem; }
.plan { display: flex; align-items: center; gap: 14px; }
.plan .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--blue); flex: 0 0 44px; }
.plan .ic.pro { background: #fff4de; color: var(--amber-text); }
.plan .ic svg { width: 22px; height: 22px; }
.plan b { display: block; font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.plan span { display: block; color: var(--muted); font-size: 0.85rem; }
.plan .sp { flex: 1; }
.plan .btn { width: auto; padding: 0.55rem 1rem; font-size: 0.85rem; box-shadow: none; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); color: var(--blue); display: grid; place-items: center; flex: 0 0 34px; }
.row .ic svg { width: 17px; height: 17px; }
.row .lbl { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.row .val { color: var(--muted); font-size: 0.9rem; }
.row input { width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent; font-weight: 600; color: var(--ink); padding: 4px 0; outline: 0; }
.row input:focus { border-color: var(--blue); }
.row .mini { width: auto; padding: 0.4rem 0.9rem; font-size: 0.85rem; box-shadow: none; }
.row.danger .lbl, .row.danger .ic { color: #b3243f; }
.row.danger .ic { background: #fde8ec; }
.sec-title { font-family: var(--display); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* ---- Onboarding ---- */
.ob { display: flex; flex-direction: column; min-height: calc(100dvh - 40px); }
@media (min-width: 720px) { .ob { min-height: min(820px, 100dvh - 120px); background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 30px 80px rgba(4,47,110,0.16); padding: 18px 24px 22px; margin-inline: -20px; } }
.ob .top { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; }
.ob .back { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tint); color: var(--navy); display: grid; place-items: center; cursor: pointer; visibility: hidden; text-decoration: none; }
.ob .back.show { visibility: visible; }
.ob .progress { flex: 1; height: 6px; border-radius: 3px; background: var(--tint-2); overflow: hidden; }
.ob .progress i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.ob .title { font-size: clamp(1.7rem, 6vw, 1.9rem); font-weight: 800; }
.ob .title .hl { color: var(--blue); }
.ob .sub { color: var(--muted); margin-top: 10px; font-size: 1rem; }
.ob form { display: flex; flex-direction: column; flex: 1; }
.opts { display: grid; gap: 10px; margin-top: 22px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.opt .radio { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b9c5e0; display: grid; place-items: center; }
.opt .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); transform: scale(0); transition: transform 0.15s; }
.opt.multi .radio { border-radius: 7px; }
.opt.multi .radio::after { border-radius: 2px; }
.opt.sel { border-color: var(--blue); background: #f2f6ff; }
.opt.sel .radio { border-color: var(--blue); }
.opt.sel .radio::after { transform: scale(1); }
.opt b { display: block; color: var(--ink); font-weight: 700; }
.opt span { display: block; color: var(--muted); font-size: 0.9rem; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tag { border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; padding: 10px 16px; border-radius: var(--r-pill); cursor: pointer; transition: all 0.15s; }
.tag.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.tag[disabled] { opacity: 0.4; cursor: default; }
.counter { margin-top: 14px; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-top: 12px; }
.quote .stars { color: var(--amber); font-size: 0.95rem; letter-spacing: 0.12em; margin-bottom: 6px; }
.quote p { font-size: 1rem; color: var(--text); font-style: italic; }
.quote b { display: block; margin-top: 8px; color: var(--muted); font-size: 0.85rem; font-style: normal; }
.brows { margin-top: 30px; display: grid; gap: 18px; }
.brows div { display: grid; gap: 7px; }
.brows span { font-weight: 600; color: var(--ink); font-size: 0.95rem; display: flex; justify-content: space-between; }
.brows span em { color: var(--muted); font-style: normal; font-size: 0.85rem; }
.brows .track { height: 8px; background: var(--tint-2); border-radius: 4px; overflow: hidden; }
.brows .track i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 4px; transition: width 0.9s ease; }
.plan-card { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 4px 16px; }
.prow { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow .k { flex: 0 0 88px; font-family: var(--display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.prow .v { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); font-size: 0.95rem; line-height: 1.3; }

/* Welcome reel */
.reel { margin-top: 14px; }
.stage { position: relative; height: 232px; }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; pointer-events: none; }
.scene.on { opacity: 1; }
.dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.dots i { display: block; width: 7px; height: 7px; border-radius: 4px; background: var(--tint-2); transition: width 0.3s ease, background 0.3s ease; }
.dots i.on { width: 20px; background: var(--blue); }
.rhero { position: relative; height: 100%; }
.rhero .rcard { position: absolute; inset: 0 0 26px 0; background: var(--navy); border-radius: var(--r-card); padding: 20px 22px; color: #fff; display: flex; flex-direction: column; }
.pill { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 13px; border-radius: 14px; background: rgba(255,255,255,0.11); font-size: 0.78rem; }
.pill .url { flex: 1; min-width: 0; color: rgba(255,255,255,0.72); white-space: nowrap; overflow: hidden; font-weight: 600; }
.pill .st { display: flex; align-items: center; gap: 5px; color: var(--amber); font-family: var(--display); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.06em; }
.pill .spin { width: 10px; height: 10px; border: 2px solid rgba(245,184,67,0.35); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rhero .lbl { margin: 16px 0 11px; font-family: var(--display); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.13em; color: rgba(255,255,255,0.5); }
.rtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rtile { height: 48px; border-radius: 14px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.62); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.15rem; transition: transform 0.3s, background 0.3s, color 0.3s, opacity 0.45s; }
.rhero.analyzing .rtile { opacity: 0.35; }
.rtile.on { background: var(--amber); color: var(--amber-ink); transform: translateY(-4px); }
.rhero .prog { margin-top: auto; height: 9px; border-radius: 5px; background: rgba(255,255,255,0.13); overflow: hidden; }
.rhero .prog i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 5px; transition: width 0.3s ease; }
.rhero .prog i.fill { transition: width 1.15s ease-in-out; }
.voicing { position: absolute; right: 4px; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border-radius: 20px; box-shadow: 0 7px 17px rgba(4,47,110,0.16); transform: scale(0.9); opacity: 0; transition: transform 0.45s cubic-bezier(.2,1.4,.4,1), opacity 0.35s ease; }
.rhero:not(.analyzing) .voicing { transform: scale(1); opacity: 1; }
.voicing b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--navy); line-height: 1; }
.voicing span { display: block; margin-top: 4px; font-family: var(--display); font-weight: 800; font-size: 0.6rem; letter-spacing: 0.1em; color: var(--muted); }
.slow { height: 100%; background: linear-gradient(160deg, #0f3a86 0%, #062556 100%); border-radius: var(--r-card); color: #fff; padding: 18px 18px 16px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.slow .row { display: flex; justify-content: space-between; align-items: center; }
.slow .t, .demo .t { font-family: var(--display); font-weight: 700; }
.slow .s, .demo .s { font-size: 0.78rem; color: #9fb3d9; }
.speeds { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,0.1); }
.speeds span { font-size: 0.72rem; font-weight: 700; padding: 5px 8px; border-radius: 9px; color: #9fb3d9; transition: background 0.3s, color 0.3s; }
.speeds span.on { background: var(--amber); color: var(--amber-ink); }
.slow .cap { font-size: 0.8rem; color: #9fb3d9; text-align: center; margin-top: 2px; }
.tunerc { height: 100%; background: var(--navy); border-radius: var(--r-card); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; position: relative; overflow: hidden; }
.tunerc::before, .tunerc::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.05); }
.tunerc::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.tunerc::after { width: 160px; height: 160px; left: -50px; bottom: -70px; }
.tunerc .st { font-family: var(--display); font-weight: 800; font-size: 0.68rem; letter-spacing: 0.12em; color: #9fb3d9; transition: color 0.25s; }
.tunerc .note { font-family: var(--display); font-weight: 800; font-size: 2.9rem; line-height: 1; transition: color 0.25s; }
.tunerc .meter { position: relative; width: calc(100% - 52px); height: 30px; }
.tunerc .meter .c { position: absolute; left: 50%; top: 1px; width: 3px; height: 26px; margin-left: -1.5px; background: rgba(245,184,67,0.9); }
.tunerc .meter .n { position: absolute; left: 50%; top: -3px; width: 4px; height: 34px; margin-left: -2px; border-radius: 2px; background: var(--blue); transition: transform 0.4s cubic-bezier(.2,1.2,.4,1), background 0.25s; }
.tunerc.intune .st, .tunerc.intune .note { color: var(--amber); }
.tunerc.intune .meter .n { background: var(--amber); }
.tunerc .cap { font-size: 0.78rem; color: #9fb3d9; }

/* Player-card animation (paywall) */
.demo { background: linear-gradient(160deg, rgba(19,48,105,0.96), rgba(9,27,68,0.96)); border: 1px solid rgba(127,178,255,0.16); color: #fff; border-radius: 22px; padding: 14px 14px 12px; margin-top: 14px; }
.demo .row { display: flex; justify-content: space-between; align-items: center; }
.wave { display: flex; align-items: center; gap: 2px; height: 30px; margin-top: 12px; position: relative; }
.wave i { flex: 1; display: block; background: #3e5584; border-radius: 1px; }
.wave i.past { background: var(--sky); }
.wave .head { position: absolute; top: -3px; bottom: -3px; left: 52%; width: 2px; background: var(--amber); box-shadow: 0 0 8px rgba(245,184,67,0.9); border-radius: 1px; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.chip { text-align: center; padding: 9px 0; border-radius: 12px; background: rgba(255,255,255,0.08); color: #9fb3d9; font-weight: 700; font-size: 0.85rem; transition: background 0.25s, color 0.25s; }
.chip.on { background: var(--blue); color: #fff; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 3px; }

/* ---- Paywall ---- */
.pay { background: #040e27; color: #fff; margin: -14px -20px -28px; padding: 22px 24px calc(24px + env(safe-area-inset-bottom, 0px)); min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
@media (min-width: 720px) { .pay { min-height: 0; margin: 0 -20px; border-radius: 30px; } }
.pay::before { content: ""; position: absolute; inset: -30% -20% auto -20%; height: 60%; background: radial-gradient(50% 60% at 70% 20%, rgba(42,86,244,0.35), transparent 70%); pointer-events: none; }
.pay > * { position: relative; }
.pay h2 { color: #fff; text-align: center; font-size: 1.7rem; padding-inline: 8px; }
.pay h2 .hl { color: var(--sky); }
.pay .feat { display: grid; margin-top: 14px; background: rgba(255,255,255,0.045); border: 1px solid rgba(127,178,255,0.12); border-radius: 18px; }
.pay .feat > div { display: flex; gap: 12px; align-items: center; padding: 11px 14px; }
.pay .feat > div + div { border-top: 1px solid rgba(127,178,255,0.1); }
.pay .feat > div > div { min-width: 0; }
.pay .feat i { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; background: rgba(42,86,244,0.28); display: grid; place-items: center; color: #9fc4ff; font-style: normal; font-weight: 800; font-family: var(--display); font-size: 0.8rem; }
.pay .feat b { display: block; font-size: 0.95rem; }
.pay .feat span { display: block; color: #6b7ea0; font-size: 0.82rem; }
.pay .trial { margin-top: 14px; text-align: center; font-weight: 700; font-size: 1.1rem; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(245,184,67,0.11), rgba(245,184,67,0.03)); border: 1px solid rgba(245,184,67,0.42); }
.pay .btn { margin-top: 14px; box-shadow: 0 8px 22px rgba(42,86,244,0.35); font-size: 1.1rem; padding: 1.05rem; }
.pay small { display: block; text-align: center; color: #6b7ea0; margin-top: 10px; font-size: 0.8rem; }
.pay .legal { display: flex; justify-content: center; gap: 14px; margin-top: 8px; font-size: 0.8rem; color: #6b7ea0; }
.pay .legal a:hover { text-decoration: underline; }
.pay .nc { margin-top: 12px; text-align: center; font-size: 0.85rem; color: #ffd48a; background: rgba(245,184,67,0.1); border: 1px solid rgba(245,184,67,0.3); border-radius: 12px; padding: 8px 10px; }
.pay .signout { text-align: center; margin-top: 10px; font-size: 0.8rem; color: #6b7ea0; }
.pay .signout a { text-decoration: underline; }

/* ---- Player ---- */
.phead { display: flex; align-items: center; gap: 12px; }
.phead .t { flex: 1; min-width: 0; text-align: center; }
.phead b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phead span { display: block; font-size: 0.8rem; color: var(--muted); }
.pchips { display: flex; gap: 8px; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--navy); font-family: var(--display); font-weight: 700; font-size: 0.78rem; }
.timeline { display: flex; gap: 8px; overflow-x: auto; padding: 12px 4px 4px; margin: -12px -4px -4px; scrollbar-width: none; }
.timeline::-webkit-scrollbar { display: none; }
.seg { flex: 0 0 auto; min-width: 64px; height: 56px; padding: 0 10px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--ink); position: relative; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s; }
.seg .d { position: absolute; bottom: 5px; font: 600 0.62rem var(--body); color: var(--muted); }
.seg.past { color: #9aa6c2; border-color: transparent; background: #eef2fb; }
.seg.now { background: var(--navy); border-color: var(--navy); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(4,47,110,0.25); }
.seg.now .d { color: #9fb3d9; }
.seg.next { border-color: var(--amber); }
.seg.next::after { content: "NEXT"; position: absolute; top: -9px; right: 8px; font: 800 0.55rem var(--display); letter-spacing: 0.1em; background: var(--amber); color: var(--amber-ink); padding: 1px 6px; border-radius: 6px; }
.seg.rest { color: var(--muted); font-size: 0.85rem; }
.count { text-align: center; display: grid; gap: 8px; }
.count .n { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--navy); line-height: 1; }
.count .cbar { height: 7px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.count .cbar i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 4px; }
.nownext { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pane { display: grid; gap: 6px; justify-items: center; text-align: center; }
.pane .eyebrow { color: var(--amber-text); }
.pane.dim .eyebrow { color: var(--muted); }
.pane .ch { font-family: var(--display); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pane.dim .ch { color: var(--muted); }
.diag { width: 66px; height: 78px; }
.arrow { color: #b9c5e0; font-size: 1.3rem; }
.prog { display: grid; gap: 6px; }
.prog .track { height: 6px; border-radius: 3px; background: var(--tint-2); overflow: hidden; cursor: pointer; }
.prog .track i { display: block; height: 100%; width: 0; min-width: 6px; background: var(--amber); border-radius: 3px; }
.prog .times { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.transport { display: flex; align-items: center; justify-content: center; gap: 22px; }
.skip { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--navy); display: grid; place-items: center; cursor: pointer; position: relative; }
.skip svg { width: 22px; height: 22px; }
.skip em { position: absolute; font-style: normal; font: 700 0.6rem var(--body); top: 20px; }
.play { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 26px rgba(42,86,244,0.35); }
.play svg { width: 28px; height: 28px; }
.play[disabled] { opacity: 0.5; }
.speed { position: relative; }
.speed select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.video { position: relative; aspect-ratio: 16 / 9; max-height: 220px; border-radius: var(--r-card); overflow: hidden; background: #0b1f4b; }
.video iframe, .video #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .vmsg { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; font-size: 0.9rem; }
.video .vmsg .vlink { display: inline-block; margin-top: 12px; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; font-size: 0.85rem; }
.unavail { background: #fff4de; border: 1px solid #fbe3b2; border-radius: var(--r-card); padding: 16px; color: #8a5a0a; font-size: 0.95rem; }

/* ---- Processing ---- */
.proc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 30px; }
.proc .art { width: 128px; height: 96px; border-radius: 18px; background: var(--navy-2); overflow: hidden; display: grid; place-items: center; color: #fff; }
.proc .art img { width: 100%; height: 100%; object-fit: cover; }
.proc h1 { font-size: 1.5rem; }
.stages { display: grid; gap: 10px; width: 100%; margin-top: 10px; }
.stage-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); text-align: left; }
.stage-row .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 0.7rem; color: var(--muted); flex: 0 0 26px; }
.stage-row.done .dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.stage-row.active .dot { border-color: var(--amber); }
.stage-row.active .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.5); opacity: 0.5; } }
.stage-row b { font-weight: 600; color: var(--ink); }
.stage-row span { display: block; font-size: 0.8rem; color: var(--muted); }

/* ---- Add ---- */
.preview { display: flex; gap: 12px; align-items: center; }
.preview .thumb { width: 96px; height: 68px; border-radius: 12px; background: var(--navy-2); overflow: hidden; flex: 0 0 96px; }
.preview .thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview b { display: block; color: var(--ink); }
.preview span { display: block; color: var(--muted); font-size: 0.85rem; }

/* ---- Tuner page ---- */
.tuner-big { background: var(--navy); color: #fff; border-radius: var(--r-card); padding: 28px 20px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; overflow: hidden; min-height: 320px; justify-content: center; }
.tuner-big::before, .tuner-big::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.05); }
.tuner-big::before { width: 260px; height: 260px; right: -90px; top: -110px; }
.tuner-big::after { width: 200px; height: 200px; left: -70px; bottom: -90px; }
.tuner-big > * { position: relative; }
.tuner-big .st { font-family: var(--display); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.14em; color: #9fb3d9; }
.tuner-big .note { font-family: var(--display); font-weight: 800; font-size: 5rem; line-height: 1; }
.tuner-big .cents { font-size: 0.85rem; color: #9fb3d9; font-variant-numeric: tabular-nums; }
.tuner-big .meter { position: relative; width: 100%; max-width: 320px; height: 40px; margin-top: 6px; }
.tuner-big .meter .c { position: absolute; left: 50%; top: 4px; width: 3px; height: 32px; margin-left: -1.5px; background: rgba(245,184,67,0.9); }
.tuner-big .meter .tick { position: absolute; top: 14px; width: 1px; height: 12px; background: rgba(255,255,255,0.2); }
.tuner-big .meter .n { position: absolute; left: 50%; top: 0; width: 5px; height: 40px; margin-left: -2.5px; border-radius: 3px; background: var(--blue); transition: transform 0.12s linear, background 0.25s; }
.tuner-big.intune .st, .tuner-big.intune .note { color: var(--amber); }
.tuner-big.intune .meter .n { background: var(--amber); }
.tuner-big .cap { font-size: 0.85rem; color: #9fb3d9; text-align: center; }
.strings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.strings div { text-align: center; padding: 10px 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-family: var(--display); font-weight: 800; color: var(--ink); }
.strings div.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.strings div small { display: block; font: 600 0.65rem var(--body); color: var(--muted); }
.strings div.on small { color: #9fb3d9; }

/* ---- Legal ---- */
.legal-body { font-size: 0.98rem; line-height: 1.6; }
.legal-body h2 { font-size: 1.15rem; margin-top: 18px; }
.legal-body p { margin: 10px 0; }

/* ---- Login ---- */
.login { display: flex; flex-direction: column; gap: 14px; padding-top: 30px; }
.login h1 { font-size: 1.7rem; }

@media (prefers-reduced-motion: reduce) { .scene, .seg, .chip, .rtile { transition: none !important; } .spin { animation: none !important; } }
