/* Homebooth — "late-night bedroom studio"
   Layout: sticky header with wordmark, single column (max 1240px); recorder = colored section strip
   above a stage (section + lyrics | big record button | LED meter).
   Look: near-black room, warm cream text, one red recording light, orange as the working accent,
   each song section keeps its own color everywhere. Dark only by design. */
:root {
  --bg: #0b0b0c; --surface: #161618; --raise: #1f1f22; --sunk: #101012; --ink: #eae5de; --muted: #9c958d; --line: #2a2a2e;
  --accent: #ff9f43; --accent-ink: #1c1006; --accent-soft: rgba(255, 159, 67, .14);
  --tally: #ff3b3b; --tally-soft: rgba(255, 59, 59, .2);
  --ok: #22c55e; --ok-soft: rgba(34, 197, 94, .13); --warn: #f5b841; --warn-soft: rgba(245, 184, 65, .13); --err: #ff5a5a; --err-soft: rgba(255, 59, 59, .14);
  --m-green: #22c55e; --m-yellow: #f5b841; --m-red: #ff3b3b;
  --grad: linear-gradient(100deg, #ff3b3b 0%, #ff6a3d 45%, #ff9f43 100%);
  --f-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --f-hand: "Permanent Marker", "Comic Sans MS", cursive;
  --r: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: radial-gradient(900px 520px at 88% -8%, rgba(255, 59, 59, .13), transparent 62%), radial-gradient(700px 420px at -10% 110%, rgba(255, 159, 67, .06), transparent 60%), var(--bg); background-attachment: fixed; color: var(--ink); font: 15.5px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
kbd { font: 600 .8rem var(--f-mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--bg); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.lead { max-width: 64ch; color: var(--muted); font-size: 1.05rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .word { font: 700 1.25rem var(--f-display); letter-spacing: -.02em; }
.tally { width: 14px; height: 14px; border-radius: 50%; background: var(--sunk); border: 2px solid var(--line); transition: background .2s, box-shadow .2s; flex: none; }
.tally.on { background: var(--tally); border-color: var(--tally); box-shadow: 0 0 0 4px var(--tally-soft); }
.nav { display: flex; gap: 6px; align-items: center; min-width: 0; }
.navlink { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .9rem; border: 1px solid transparent; white-space: nowrap; }
.navlink:hover { border-color: var(--line); }
.navlink.user { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; background: var(--surface); border-color: var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 22px 80px; display: flex; flex-direction: column; gap: 18px; }
.loading { color: var(--muted); padding-block: 40px; }

/* panels and layout */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel.narrow { max-width: 620px; margin-inline: auto; width: 100%; }
.panel.empty { align-items: flex-start; }
.panelhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pagehead > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > .f { flex: 1 1 120px; } .row > .grow2 { flex: 2 1 220px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* tabs */
.tabs, .seg { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button, .seg button { border: 0; background: none; color: var(--muted); font: 700 .95rem var(--f-body); padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"], .seg button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* forms */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; font-weight: 700; min-width: 0; }
label.f.inline { flex-direction: row; align-items: center; gap: 8px; }
.f-btn { flex: 0 0 auto; display: flex; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], select {
  font: 16px var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0;
}
input[type=number] { font-family: var(--f-mono); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 380px; max-width: 520px; }
.inline-form input { flex: 1 1 200px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 8px; padding: 9px 14px; font: 700 .92rem var(--f-body); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: .82rem; }
.btn.wide { width: 100%; }
.btn.danger, .btn.ghost.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.on { border-color: var(--tally); color: var(--tally); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.busy { opacity: .7; cursor: progress; }
.linkbtn { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; align-self: flex-start; }

/* messages */
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msgs:empty { display: none; }
.msg { padding: 10px 12px; border-radius: 8px; font-size: .93rem; border-left: 4px solid; }
.msg.ok { background: var(--ok-soft); border-color: var(--ok); }
.msg.warn { background: var(--warn-soft); border-color: var(--warn); }
.msg.err { background: var(--err-soft); border-color: var(--err); }
.msg.info { background: var(--sunk); border-color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* auth */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 3vh; }
.auth-intro { display: flex; flex-direction: column; gap: 16px; }
.hero { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.03em; }
.howto { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; color: var(--muted); max-width: 52ch; }
.auth-card { max-width: 440px; width: 100%; justify-self: end; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-card { justify-self: stretch; max-width: none; } }
.join h1 { font-size: 2.2rem; }

/* project list */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; min-width: 0; }
.card:hover { border-color: var(--ink); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card-top h3 { overflow-wrap: anywhere; }
.card-meta { color: var(--muted); font-size: .85rem; }

/* songs */
.songlist { display: flex; flex-direction: column; gap: 8px; }
.songrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 160px; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.songrow:hover { border-color: var(--ink); }
.songrow-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.songrow-main .mono { font-size: .82rem; }
.progress { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.progress .bar { flex: 1; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--ok); }
@media (max-width: 640px) { .songrow { grid-template-columns: minmax(0, 1fr); } }

/* members & invites */
.memberlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.memberlist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.memberlist li:last-child { border-bottom: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.mname { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.role-sel { width: auto; }
.roles-help summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
ul.plain { margin: 8px 0 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.invites { display: flex; flex-direction: column; gap: 10px; }
.invite { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg); border-radius: 8px; }
.invite-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copyrow { display: flex; gap: 6px; }
.copyrow input { font: 13px var(--f-mono); }
.danger-zone { border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }

/* song page */
.rec-cta { background: var(--tally); border-color: var(--tally); color: #fff; padding: 11px 18px; font-size: 1rem; }
.rec-cta .dot { background: #fff; width: 12px; height: 12px; }
.trackcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .trackcols { grid-template-columns: 1fr; } }
.trackcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.trackcol-head { display: flex; flex-direction: column; gap: 2px; }
.versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.versions li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; flex-wrap: wrap; }
.ver { font-weight: 600; color: var(--muted); }
.vinfo { display: flex; flex-direction: column; flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.upload { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.upload .f { flex: 1 1 180px; }
canvas.wave { width: 100%; height: 120px; display: block; border-radius: 8px; background: var(--sunk); cursor: pointer; }
.wave-note { margin-top: -8px; }
.tbl-wrap { overflow-x: auto; }
table.secs { border-collapse: collapse; width: 100%; min-width: 680px; }
table.secs th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); text-align: left; padding: 6px; border-bottom: 1px solid var(--line); }
table.secs td { padding: 6px; border-bottom: 1px solid var(--line); }
table.secs td.num { width: 92px; } table.secs td.del { width: 1%; }
.seclist-ro { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.seclist-ro li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.seclist-ro .nm { font-weight: 700; }
.seclist-ro .note-ro { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
.okc { color: var(--ok); }
.filters { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.filters select { width: auto; }
.takegroup { display: flex; flex-direction: column; gap: 8px; }
.takegroup + .takegroup { border-top: 1px solid var(--line); padding-top: 14px; }

/* takes */
.takes { display: flex; flex-direction: column; gap: 6px; }
.take { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.take.starred { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.take .tn { font-weight: 700; }
.take .meta { font-size: .84rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-width: 0; }
.take .singer { color: var(--ink); font-weight: 700; }
.star { border: 0; background: transparent; cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--line); padding: 2px; }
.star[aria-pressed="true"] { color: var(--warn); }
.star:disabled { cursor: default; }
@media (max-width: 640px) { .take { grid-template-columns: auto auto minmax(0, 1fr); } .take .btns { grid-column: 1 / -1; } }

/* recorder */
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .rec-grid { grid-template-columns: 1fr; } }
.slate { gap: 16px; }
.slate-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pos { font-size: 1.4rem; font-weight: 600; color: var(--muted); }
.slate-name { display: flex; flex-direction: column; gap: 6px; }
.slate h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1; }
.note { font-size: 1.05rem; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; }
.dots { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); display: block; }
.dots i.f { background: var(--ink); border-color: var(--ink); }
.rec-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rec-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.recbtn { display: flex; align-items: center; gap: 14px; border: 2px solid var(--tally); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 14px 26px 14px 16px; font: 700 1.15rem var(--f-display); cursor: pointer; min-width: 220px; }
.recbtn .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--tally); flex: none; transition: border-radius .2s; }
.recbtn.live { background: var(--tally); color: #fff; }
.recbtn.live .dot { background: #fff; border-radius: 6px; width: 26px; height: 26px; margin: 4px; }
.recbtn.count { border-style: dashed; }
.recbtn:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) { .recbtn.live { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--tally-soft); } 50% { box-shadow: 0 0 0 10px var(--tally-soft); } }
.phase { font-weight: 600; min-height: 1.5em; }
.fb { min-height: 0; }
.mixer { gap: 12px; }
.slider { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 700; }
.slider span { display: flex; align-items: center; gap: 6px; }
ol.seclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ol.seclist button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 9px; cursor: pointer; text-align: left; font: inherit; }
ol.seclist button[aria-current="true"] { border-color: var(--ink); background: var(--surface); box-shadow: inset 4px 0 0 var(--tally); }
ol.seclist button:disabled { cursor: not-allowed; opacity: .7; }
.secname { display: flex; flex-direction: column; min-width: 0; }
.secname .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secname .bars { font-size: .76rem; color: var(--muted); }
.idx { color: var(--muted); font-size: .8rem; width: 20px; }
.cnt { font-size: .8rem; font-weight: 600; }
.cnt.done { color: var(--ok); }

/* meter */
.meter { position: relative; height: 14px; border-radius: 7px; overflow: hidden; background: linear-gradient(90deg, var(--m-green) 0 75%, var(--m-yellow) 75% 92%, var(--m-red) 92% 100%); }
.meter.big { height: 22px; border-radius: 11px; }
.meter .mask { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: var(--sunk); opacity: .93; transition: width .06s linear; }
.meter .clip { position: absolute; top: 0; right: 0; bottom: 0; width: 8%; background: var(--m-red); opacity: 0; transition: opacity .15s; }
.meter .clip.on { opacity: 1; }
.scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -8px; }

/* mic setup */
.stepn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 .8rem var(--f-mono); margin-right: 10px; vertical-align: 3px; }
ol.steps-list { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.cal-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cal-big { font-size: 2.2rem; font-weight: 600; line-height: 1.1; }
.checks { display: flex; flex-direction: column; gap: 10px; }
details summary { cursor: pointer; }
details > summary h2 { display: inline; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px); z-index: 50; }
.toast.on { opacity: 1; }
.toast.err { background: var(--err); color: #fff; }

/* section editor */
.se { display: flex; flex-direction: column; gap: 12px; }
.se-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.se-bar select { width: auto; padding: 5px 8px; font-size: .9rem; }
.se-play { min-width: 96px; }
.se-pos { font-size: 1.05rem; font-weight: 600; min-width: 120px; }
.se-zoom { display: flex; gap: 4px; }
.se-scroll { overflow-x: auto; overflow-y: hidden; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
.se-content { position: relative; height: 196px; min-width: 100%; }
.se-canvas { display: block; touch-action: none; outline: none; }
.se-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.se-head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--tally); pointer-events: none; will-change: transform; }
.se-head::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--tally); }
.se-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.se-tools .muted { flex: 1 1 280px; }
.se-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .se-cols { grid-template-columns: 1fr; } }
.se-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.se-card textarea, .se-lyr { font: 15px/1.5 var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; resize: vertical; }
.se-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.se-list button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; text-align: left; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.se-list button[aria-current="true"] { border-color: var(--tally); box-shadow: inset 3px 0 0 var(--tally); background: var(--surface); }
.se-list .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyr-dot { color: var(--accent); font-weight: 700; }
.se-save { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; z-index: 5; box-shadow: 0 6px 24px rgb(0 0 0 / .18); }
.se-save .btn.ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.se-lyrics summary { padding: 4px 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: 600 .8rem var(--f-body); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.lyrics-ro, .lyrics { white-space: pre-wrap; font-family: var(--f-body); margin: 0; }
.lyrics { font-size: 1.25rem; line-height: 1.55; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; max-height: 40vh; overflow-y: auto; }

/* drop zones */
.dropzone { position: relative; border-radius: 10px; transition: background .15s, box-shadow .15s; }
.trackcol.dropzone { padding: 10px; margin: -10px; }
.dropzone.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.dropzone.uploading { opacity: .7; }
.drophint { color: var(--muted); margin-top: -4px; }
.trackcols { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.btn kbd { background: transparent; color: inherit; border-color: currentColor; opacity: .85; }
.versions li .btn { flex: none; }

/* ================= Studio skin (design board) ================= */
h1, h2, h3 { letter-spacing: -0.025em; }
h1 { font-weight: 700; }
.top { background: rgba(11, 11, 12, .8); border-bottom-color: #1c1c1f; }
.top-inner { max-width: 1240px; }
.wrap { max-width: 1240px; }
.brand { gap: 10px; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .word { font: 700 1.38rem var(--f-display); letter-spacing: -.04em; color: var(--ink); }
.brand .word .home { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tally { width: 8px; height: 8px; border: 0; background: transparent; margin-left: 2px; }
.brand .tally.on { background: var(--tally); box-shadow: 0 0 0 4px var(--tally-soft), 0 0 14px var(--tally); }
.navlink:hover { border-color: var(--line); background: var(--raise); }
.navlink.user { background: var(--raise); border-color: var(--line); }
.eyebrow { letter-spacing: .13em; }

.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent 120px), var(--surface); border-color: #232327; }
.card, .songrow { background: var(--surface); border-color: #232327; border-radius: var(--r); }
.card:hover, .songrow:hover { border-color: rgba(255, 159, 67, .55); background: var(--raise); }
.tabs, .seg { border-bottom-color: #232327; }
.tabs button[aria-selected="true"], .seg button[aria-selected="true"] { border-bottom-color: var(--accent); }

.btn { background: var(--raise); color: var(--ink); border: 1px solid #34343a; border-radius: 10px; font-family: var(--f-body); font-weight: 600; }
.btn:hover { border-color: #55555c; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: #34343a; }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger, .btn.ghost.danger { background: var(--tally); border-color: var(--tally); color: #fff; }
.btn.on { border-color: var(--tally); color: var(--tally); }
.rec-cta { background: var(--tally); border-color: var(--tally); color: #fff; box-shadow: 0 8px 30px rgba(255, 59, 59, .35); }
.rec-cta:hover { filter: brightness(1.08); border-color: var(--tally); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], select { background: var(--sunk); border-color: #2e2e33; border-radius: 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=range] { accent-color: var(--accent); }
.check input { accent-color: var(--accent); }
.progress .bar i { background: var(--grad); }
.avatar { background: var(--accent-soft); color: var(--accent); }
.dots i.f { background: var(--tally); border-color: var(--tally); box-shadow: 0 0 8px rgba(255, 59, 59, .6); }

/* sign-in */
.auth { padding-block: 5vh; }
.hero { font-size: clamp(2.6rem, 6.2vw, 4.8rem); letter-spacing: -.05em; line-height: .96; }
.sticky-note { font: 400 1.3rem/1.15 var(--f-hand); color: #2a2522; background: #e9dcc4; padding: 14px 18px 12px; width: max-content; max-width: 240px; transform: rotate(-3.5deg); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); position: relative; margin-bottom: 8px; }
.sticky-note::before { content: ""; position: absolute; top: -11px; left: 50%; width: 76px; height: 22px; transform: translateX(-50%) rotate(4deg); background: rgba(234, 229, 222, .32); }

/* takes: handwritten tape labels */
.take { background: var(--sunk); border-color: #26262a; }
.take.starred { border-color: rgba(255, 159, 67, .65); box-shadow: inset 3px 0 0 var(--accent); }
.take .tn, .tape { font: 400 .95rem/1.3 var(--f-hand); color: #2a2522; background: #e9dcc4; padding: 1px 9px; transform: rotate(-2deg); display: inline-block; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); white-space: nowrap; }
.star[aria-pressed="true"] { color: var(--accent); }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; flex: none; vertical-align: 1px; }
ol.seclist button { grid-template-columns: auto minmax(0, 1fr) auto; background: var(--sunk); border-color: #26262a; }
ol.seclist button[aria-current="true"] { box-shadow: inset 3px 0 0 var(--tally); border-color: rgba(255, 59, 59, .6); background: var(--raise); }

/* recorder stage */
.rec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rec-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.rec-meta { display: flex; gap: 8px; }
.rec-meta span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .85rem; }
.strip { border-radius: 14px; overflow: hidden; border: 1px solid #232327; background: var(--sunk); }
canvas.strip-wave { height: 96px; border-radius: 0; background: transparent; }
.stage { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(220px, .8fr) 62px; gap: 18px; padding: 20px; border-radius: 22px; border: 1px solid #232327;
  background: radial-gradient(560px 300px at 72% 45%, rgba(255, 59, 59, .08), transparent 70%), var(--surface); }
.stage-card { background: var(--sunk); border: 1px solid #222226; border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rec-eyebrow { color: var(--tally); }
.secnav { display: flex; gap: 6px; }
.iconbtn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #34343a; background: var(--raise); color: var(--ink); font-size: 1.15rem; line-height: 1; cursor: pointer; }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn:disabled { opacity: .3; cursor: default; }
.stage-name { font: 700 clamp(2.4rem, 6vw, 4.4rem)/.95 var(--f-display); letter-spacing: -.045em; text-transform: uppercase; color: var(--tally); text-shadow: 0 0 30px rgba(255, 59, 59, .35); overflow-wrap: anywhere; }
.stage-card .note { background: var(--accent-soft); border-radius: 10px; font-size: .98rem; }
.lyrics { font: 500 clamp(1.1rem, 2vw, 1.4rem)/1.6 var(--f-body); color: var(--ink); border: 0; background: none; padding: 0; max-height: none; border-radius: 0; }
.lyrics-next { opacity: .42; display: flex; flex-direction: column; gap: 4px; }
.lyrics-next pre { white-space: pre-wrap; margin: 0; font: 400 1rem/1.55 var(--f-body); }
.stage-ctl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding-block: 8px; }
.takecount { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.recbig { position: relative; width: 170px; height: 170px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, #2b1416, #110a0b 72%);
  box-shadow: 0 0 0 2px rgba(255, 59, 59, .55), 0 0 44px rgba(255, 59, 59, .25), inset 0 2px 12px rgba(0, 0, 0, .7); transition: transform .12s, box-shadow .2s; }
.recbig:hover { transform: scale(1.02); }
.recbig .ring { position: absolute; inset: 11px; border-radius: 50%; border: 2px solid rgba(255, 59, 59, .32); }
.recbig .core { width: 106px; height: 106px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #ff7272, #ff3b3b 55%, #d41c1c); box-shadow: 0 0 34px rgba(255, 59, 59, .6); transition: width .2s, height .2s, border-radius .2s; }
.recbig.live { box-shadow: 0 0 0 3px #ff3b3b, 0 0 70px rgba(255, 59, 59, .6), inset 0 2px 12px rgba(0, 0, 0, .7); }
.recbig.live .core { width: 58px; height: 58px; border-radius: 12px; }
.recbig.count .ring { border-style: dashed; border-color: #ff3b3b; }
@media (prefers-reduced-motion: no-preference) {
  .recbig.live { animation: tallyglow 1.4s ease-in-out infinite; }
  .recbig.count .ring { animation: spin 3s linear infinite; }
}
@keyframes tallyglow { 50% { box-shadow: 0 0 0 3px #ff3b3b, 0 0 100px rgba(255, 59, 59, .8), inset 0 2px 12px rgba(0, 0, 0, .7); } }
@keyframes spin { to { transform: rotate(360deg); } }
.recbig:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.timer { font-size: 2.3rem; font-weight: 600; letter-spacing: .02em; line-height: 1; }
.stage-ctl .phase { color: var(--muted); font-weight: 600; min-height: 1.4em; font-family: var(--f-body); }
.stage-ctl:has(.recbig.live) .phase, .stage-ctl:has(.recbig.live) .timer { color: var(--tally); }
.stage-ctl .pos { font-size: .85rem; }
.center { text-align: center; }
.vmeter { display: flex; gap: 6px; align-items: stretch; padding-block: 6px; }
.meter.v { width: 16px; height: auto; flex: none; border-radius: 5px; min-height: 230px; background: linear-gradient(0deg, var(--m-green) 0 70%, var(--m-yellow) 70% 88%, var(--m-red) 88% 100%); }
.meter.v::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(16, 16, 18, .95) 5px 7px); pointer-events: none; }
.meter.v .mask { top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 100%; background: #141416; opacity: .94; transition: height .06s linear; }
.meter.v .clip { top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 7%; z-index: 1; }
.meter.v .peakline { position: absolute; left: 0; right: 0; height: 2px; background: #fff; opacity: .75; z-index: 1; }
.vscale { position: relative; width: 26px; font-size: 10px; color: var(--muted); }
.vscale span { position: absolute; left: 0; transform: translateY(50%); }
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr) 54px; padding: 14px; }
  .stage-card { grid-column: 1 / -1; padding: 18px; }
}
@media (max-width: 520px) {
  .recbig { width: 140px; height: 140px; }
  .recbig .core { width: 86px; height: 86px; }
  .recbig.live .core { width: 48px; height: 48px; }
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* nav */
.navlink.active { color: var(--accent); }

/* open songs */
.os-filters { display: flex; flex-direction: column; gap: 10px; }
.os-q { max-width: 420px; font: 15px var(--f-body); color: var(--ink); background: var(--sunk); border: 1px solid #2e2e33; border-radius: 10px; padding: 9px 12px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.os-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.os-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); border: 1px solid #232327; background: var(--surface); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.os-card:hover { border-color: rgba(255, 159, 67, .45); }
.os-card.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 40px rgba(255, 159, 67, .12); }
.os-top { display: flex; gap: 14px; align-items: center; }
.os-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.os-title h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.os-play { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: var(--grad); cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(255, 90, 60, .35); }
.os-play .tri { width: 0; height: 0; border-left: 14px solid #1c0b06; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.os-card.playing .os-play .tri { width: 14px; height: 16px; border: 0; margin: 0; background: linear-gradient(90deg, #1c0b06 0 35%, transparent 35% 65%, #1c0b06 65%); }
.os-card.loading .os-play { opacity: .6; cursor: progress; }
.os-bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.os-bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.os-note { font-size: .95rem; color: var(--ink); border-left: 3px solid var(--accent); padding-left: 10px; }
.os-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.os-cta { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.small-cta { padding: 8px 14px; font-size: .9rem; }
.small-cta .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* open call panel */
.vis-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .vis-seg { grid-template-columns: 1fr; } }
.vis-opt { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid #2e2e33; border-radius: 12px; background: var(--sunk); cursor: pointer; }
.vis-opt input { position: absolute; opacity: 0; pointer-events: none; }
.vis-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.vis-opt:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.portalbox { background: linear-gradient(100deg, rgba(255, 59, 59, .08), rgba(255, 159, 67, .06)), var(--surface); }

/* community hub */
.comm { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.comm + .comm { border-top: 1px solid #232327; padding-top: 22px; }
.comm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.comm-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.comm-title h2 { font-size: 1.5rem; }
.comm-new summary { list-style: none; cursor: pointer; }
.comm-new summary h3 { display: inline; }
.comm-new summary::before { content: "+ "; color: var(--accent); font-weight: 700; }

/* help button, drawer and guide */
.helpbtn { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid #34343a; background: var(--raise); color: var(--ink); font: 700 1rem var(--f-display); cursor: pointer; display: grid; place-items: center; }
.helpbtn:hover { border-color: var(--accent); color: var(--accent); }
.help-open .helpbtn { border-color: var(--accent); color: var(--accent); }
.helplink { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); font: 600 .86rem var(--f-body); cursor: pointer; padding: 4px 8px; border-radius: 999px; }
.helplink span { width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font: 700 .75rem var(--f-display); }
.helplink:hover { color: var(--accent); }
.help-layer { position: fixed; inset: 0; z-index: 40; }
.help-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.help-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #131315; border-left: 1px solid #26262a; box-shadow: -20px 0 60px rgba(0, 0, 0, .5); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; outline: none; }
@media (prefers-reduced-motion: no-preference) { .help-layer.on .help-drawer { animation: slidein .18s ease-out; } }
@keyframes slidein { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.help-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; background: #131315; border-bottom: 1px solid #222226; z-index: 1; }
.help-head h2 { font-size: 1.45rem; margin-top: 2px; }
.help-body { padding: 8px 20px; display: flex; flex-direction: column; }
.help-foot { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; border-top: 1px solid #222226; margin-top: auto; }
.help-q { border-bottom: 1px solid #222226; }
.help-q summary { list-style: none; cursor: pointer; padding: 12px 26px 12px 0; font-weight: 700; position: relative; }
.help-q summary::-webkit-details-marker { display: none; }
.help-q summary::after { content: "+"; position: absolute; right: 2px; top: 10px; color: var(--accent); font: 700 1.1rem var(--f-display); }
.help-q[open] summary::after { content: "–"; }
.help-q summary:hover { color: var(--accent); }
.help-a { padding: 0 0 14px; color: #cfc9c1; display: flex; flex-direction: column; gap: 8px; }
.help-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: st; display: flex; flex-direction: column; gap: 8px; }
.help-steps li { counter-increment: st; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.help-steps li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 .78rem var(--f-mono); display: grid; place-items: center; margin-top: 1px; }
.guide-toc { margin-top: -4px; }
.guide-toc .chip { text-decoration: none; padding: 6px 14px; font-size: .88rem; }
.guide-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; padding-top: 30px; border-top: 1px solid #1f1f23; scroll-margin-top: 70px; }
.guide-sec h2 { font-size: 1.6rem; margin-bottom: 6px; }
.guide-sec .shot { position: sticky; top: 80px; }
@media (max-width: 900px) { .guide-sec { grid-template-columns: 1fr; gap: 16px; } .guide-sec .shot { position: static; } }
.shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid #2a2a2f; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02); background: #111113; }
.shot figcaption { color: var(--muted); font-size: .84rem; }

/* getting started */
.start { gap: 12px; border-color: rgba(255, 159, 67, .35); background: linear-gradient(110deg, rgba(255, 59, 59, .07), rgba(255, 159, 67, .05) 50%, transparent), var(--surface); }
.start-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.start-head > div { display: flex; flex-direction: column; gap: 2px; }
.start-bar { height: 4px; border-radius: 2px; background: #26262a; overflow: hidden; }
.start-bar i { display: block; height: 100%; background: var(--grad); border-radius: 2px; }
.start-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.start-step { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #222226; }
.start-step:first-child { border-top: 0; }
.start-check { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #3a3a40; font: 700 .82rem var(--f-mono); color: var(--muted); }
.start-step.done .start-check { background: var(--ok); border-color: var(--ok); color: #06210f; }
.start-step.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(156, 149, 141, .5); }
.start-step.next .start-check { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.start-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

/* landing */
.hero-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-links .linkbtn { align-self: center; }
.land-h { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.land-how { display: flex; flex-direction: column; gap: 46px; padding-top: 40px; scroll-margin-top: 70px; }
.land-step { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.land-step.flip .land-text { order: 2; }
.land-text { display: flex; flex-direction: column; gap: 10px; }
.land-text h3 { font-size: 1.5rem; }
.land-text p { font-size: 1.02rem; max-width: 42ch; }
.land-n { color: var(--accent); font-size: .9rem; font-weight: 600; letter-spacing: .1em; }
@media (max-width: 860px) { .land-step { grid-template-columns: 1fr; gap: 16px; } .land-step.flip .land-text { order: 0; } }
.land-need { display: flex; flex-direction: column; gap: 18px; padding-top: 40px; }
.need-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.need { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid #232327; border-radius: var(--r); background: var(--surface); }
.need svg { width: 30px; height: 30px; color: var(--accent); }
.land-cta { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 30px; background: linear-gradient(100deg, rgba(255, 59, 59, .1), rgba(255, 159, 67, .07)), var(--surface); }
.land-cta > div:first-child { display: flex; flex-direction: column; gap: 6px; max-width: 60ch; }

/* narrow header: icon-only brand, short labels */
.navlink .short { display: none; }
@media (max-width: 560px) {
  .top-inner { padding-inline: 14px; gap: 8px; }
  .signed-in .brand .word, .brand .tally { display: none; }
  .nav { gap: 4px; }
  .navlink { padding: 6px 9px; font-size: .86rem; gap: 6px; }
  .navlink .long { display: none; }
  .navlink .short { display: inline; }
  .navlink.user { max-width: 30vw; }
}
.land-step.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
@media (max-width: 860px) { .land-step.flip { grid-template-columns: 1fr; } }

/* guide filter */
.guide-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; border: 1px solid #232327; border-radius: 14px; background: var(--sunk); align-self: flex-start; max-width: 100%; }
.gf { border: 0; background: transparent; color: var(--muted); font: 700 .92rem var(--f-body); padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.gf:hover { color: var(--ink); background: var(--raise); }
.gf.on { background: var(--accent); color: var(--accent-ink); }

/* sharing takes */
.sharebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(255, 159, 67, .5); background: var(--accent-soft); margin-bottom: 10px; }
.sharebar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.btn.share { background: var(--ok); border-color: var(--ok); color: #05210f; }
.btn.share:hover { filter: brightness(1.08); }
.take.draft { border-style: dashed; }

/* final vocal */
.comp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.comp-row { display: grid; grid-template-columns: 12px minmax(120px, 1fr) minmax(0, 1.4fr) 32px; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid #232327; border-radius: 12px; background: var(--sunk); }
.comp-row.empty { opacity: .65; }
.comp-name { display: flex; flex-direction: column; min-width: 0; }
.comp-pick { width: 100%; min-width: 0; font: 600 .9rem var(--f-body); color: var(--ink); background: var(--raise); border: 1px solid #34343a; border-radius: 9px; padding: 7px 10px; }
.comp-play.on { border-color: var(--accent); color: var(--accent); }
.comp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .comp-row { grid-template-columns: 12px minmax(0, 1fr) 32px; } .comp-pick { grid-column: 2 / -1; grid-row: 2; } }

/* footer and legal pages */
.foot { border-top: 1px solid #1c1c1f; }
.foot-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .86rem; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.legal { max-width: 760px; gap: 10px; }
.legal h2 { font-size: 1.1rem; margin-top: 14px; }
.legal p { color: #cfc9c1; }
.legal a { color: var(--accent); }
@media (max-width: 420px) {
  .top-inner { padding-inline: 10px; }
  .signed-in .brand { display: none; }
  .signed-in .nav { margin-inline: auto; }
  .navlink { padding: 6px 8px; font-size: .84rem; }
}
@media (max-width: 360px) {
  .top-inner { padding-inline: 6px; }
  .nav { gap: 2px; }
  .navlink { padding: 6px 6px; font-size: .8rem; gap: 4px; }
  .helpbtn { width: 28px; height: 28px; }
}

/* add people */
.add-list { display: flex; flex-direction: column; gap: 12px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.add-group { display: flex; flex-direction: column; gap: 4px; }
.add-ghead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.add-person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.add-person:hover { background: var(--raise); }
.add-person input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.add-person .avatar { width: 28px; height: 28px; font-size: .85rem; }
.add-person .mname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-person.in { opacity: .55; cursor: default; }
.add-mail { border-top: 1px solid #232327; padding-top: 14px; }
details.panel > summary { list-style: none; cursor: pointer; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary h3 { display: inline; }
details.panel > summary::before { content: "+ "; color: var(--accent); font-weight: 700; }
details.panel[open] > summary::before { content: "– "; }

/* editor lanes */
.se-wrap { position: relative; }
.se-labels { position: absolute; left: 1px; top: 1px; pointer-events: none; }
.se-lbl { position: absolute; left: 6px; white-space: nowrap; font: 700 .72rem var(--f-body); color: var(--muted); background: rgba(16, 16, 18, .82); padding: 2px 7px; border-radius: 6px; border-left: 3px solid var(--c); }
.se-lbl.on { color: var(--ink); }
.se-lbl .mono { color: var(--c); font-weight: 600; }
.se-ons { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid #34343a; font: 600 .82rem var(--f-body); cursor: pointer; color: var(--muted); }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34343a; }
.chip-check.on { color: var(--ink); border-color: var(--c); }
.chip-check.on::before { background: var(--c); }
.chip-check:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.se-align { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid #232327; border-radius: 12px; background: var(--sunk); }
.se-align-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.se-align-name { font-weight: 700; min-width: 92px; }
.se-off { width: 90px !important; text-align: right; padding: 5px 8px !important; }

/* recorder: loop strip */
.loopbox { display: flex; flex-direction: column; gap: 6px; }
.loopbar { display: grid; gap: 2px; height: 30px; padding-top: 12px; cursor: crosshair; touch-action: none; user-select: none; }
.loopbar i { position: relative; background: #1d1d21; border-radius: 3px; }
.loopbar i.bar { box-shadow: inset 2px 0 0 #3a3a40; }
.loopbar i span { position: absolute; top: -13px; left: 1px; font: 600 9px var(--f-mono); color: var(--muted); }
.loopbar i.on { background: var(--accent); }
.loopbar.locked { cursor: default; opacity: .7; }
.loopinfo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 20px; }
/* part picker */
.partseg { display: flex; gap: 2px; padding: 3px; background: #121214; border: 1px solid #26262a; border-radius: 10px; }
.partseg button { border: 0; background: transparent; color: var(--muted); font: 700 .74rem var(--f-body); padding: 5px 8px; border-radius: 7px; cursor: pointer; }
.partseg button[aria-checked="true"] { background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1px #3a3a40; }
.pill.part { background: rgba(227, 155, 255, .14); color: #E39BFF; }
/* after-take popup */
.takepop { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 30; width: min(420px, calc(100% - 32px)); background: #18181b; border: 1px solid #2e2e33; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
@media (prefers-reduced-motion: no-preference) { .takepop { animation: slidein .18s ease-out; } }
.takepop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.takepop-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
.takepop-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--sunk); border-radius: 10px; }
.takepop-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-again { background: var(--tally); border-color: var(--tally); color: #fff; }
.rec-again .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.rec-again kbd { color: #fff; border-color: rgba(255, 255, 255, .6); background: transparent; }
/* play-through */
.runpanel .row { align-items: flex-end; }
/* open songs filters */
.os-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.os-frow .eyebrow { min-width: 44px; }
.oc-parts { border: 0; padding: 0; margin: 0; }
.oc-parts legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: .86rem; }
.oc-want { align-items: flex-end; }

/* instruments */
.partpick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.partpick select { padding: 5px 8px; font-size: .86rem; }
.oc-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.add-skills { display: flex; flex-direction: column; gap: 6px; }

/* upload from DAW */
.up-layer { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; }
.up-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.up-dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #18181b; border: 1px solid #2e2e33; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.up-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.up-drop { display: grid; place-items: center; min-height: 80px; border: 1px dashed #3a3a40; border-radius: 12px; cursor: pointer; padding: 12px; text-align: center; color: var(--muted); }
.up-drop:hover { border-color: var(--accent); color: var(--ink); }

/* landing: why, who, faq */
.land-why { display: flex; flex-direction: column; gap: 14px; padding-top: 40px; max-width: 860px; }
.why-text { display: flex; flex-direction: column; gap: 14px; }
.why-text p { font-size: 1.12rem; line-height: 1.65; color: #d6d0c8; }
.why-text p:first-child::first-letter { font: 700 1.25em var(--f-display); color: var(--accent); }
.land-for { display: flex; flex-direction: column; gap: 18px; padding-top: 40px; }
.for-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.need.for { gap: 10px; padding: 22px; }
.need.for h3 { font-size: 1.2rem; }
.for-n { color: var(--accent); font-weight: 600; letter-spacing: .1em; font-size: .85rem; }
.land-faq { display: flex; flex-direction: column; gap: 10px; padding-top: 40px; max-width: 860px; }

/* practice on your own */
.practice { flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border-style: dashed; }
.practice h2 { margin: 0 0 4px; }
.practice > div:first-child { flex: 1 1 320px; }
.practice .btns { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* mix export options */
.mixopts { display: flex; flex-direction: column; gap: 8px; }
.mixopts summary { cursor: pointer; color: var(--muted, #9a9aa3); width: max-content; }
.mixopts[open] { gap: 8px; }
.mixopts > label, .mixopts > p { margin: 6px 0 0; }

/* landing: practise on your own */
.land-solo { margin-top: 40px; padding: 28px; gap: 20px; background: linear-gradient(120deg, rgba(255, 159, 67, .08), transparent 60%), var(--surface); }
.solo-head { display: flex; flex-direction: column; gap: 8px; max-width: 62ch; }
.solo-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.solo-steps li { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); }
.solo-steps h3 { font-size: 1.1rem; margin: 0; }
.land-solo .btns { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.practice.glow { box-shadow: inset 0 0 0 2px var(--accent); }

/* notifications */
.bellbtn { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid #34343a; background: var(--raise); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; }
.bellbtn svg { width: 17px; height: 17px; }
.bellbtn:hover, .bellbtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.bell-n { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b3b; color: #fff; font: 700 .7rem/18px var(--f-body, system-ui); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notify-panel { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 62px); right: max(16px, calc((100vw - 1200px) / 2)); width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; background: var(--surface); border: 1px solid #2f2f34; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.np-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.np-head h2 { font-size: 1rem; margin: 0; }
.np-list { list-style: none; margin: 0; padding: 6px; }
.np-list a { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.np-list a:hover { background: var(--raise); }
.np-list li.new a { background: var(--accent-soft); }
.np-list li.new a:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--raise)); }
.np-text { line-height: 1.4; }
.np-empty { padding: 18px 16px; margin: 0; }
@media (max-width: 360px) { .bellbtn { width: 28px; height: 28px; } }

/* delete account */
.danger { border-color: #4a2424; }
.danger h3 { color: #ff8a80; }
.del-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.del-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.del-list li.pick { border-color: var(--accent); }
#del-body { display: flex; flex-direction: column; gap: 12px; }
#del-body h4 { margin: 4px 0 0; }
.del-list label.inline span { white-space: nowrap; }
.del-list select { max-width: 100%; }
.btn.dangerbtn { background: #c62828; border-color: #c62828; color: #fff; }
.btn.dangerbtn:hover:not(:disabled) { background: #e53935; }
