/* The Drop - studio console look. Accent is set at runtime from admin branding. */
/* Layout: single centered column (max 640px) with a sticky console header and a cue-sheet progress rail. */
:root {
  --bg: #0d0e12;
  --bg-2: #14161c;
  --panel: #191c23;
  --panel-2: #20242d;
  --line: #2b303b;
  --fg: #eef0f4;
  --muted: #9aa1ae;
  --dim: #646b78;
  --accent: #ff3d2e;
  --accent-ink: #ffffff;
  --ok: #3ddc97;
  --warn: #ffb443;
  --bad: #ff5d5d;
  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px;
  --r-lg: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.55 var(--f-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.has-bg-image { background-size: cover; background-position: center; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.console {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.console-in {
  max-width: 680px; margin: 0 auto;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand img { height: 34px; width: auto; max-width: 160px; object-fit: contain; }
.brand-name {
  font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.onair {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--dim);
  transition: all .25s;
}
.onair::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }
.onair.live { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 60%, transparent); }
.onair.live::before { opacity: 1; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* Cue-sheet progress rail */
.rail { max-width: 680px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rail li { min-width: 0; }
.rail .bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rail .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.rail li.done .bar i { width: 100%; }
.rail li.now .bar i { width: 50%; }
.rail span { display: block; margin-top: 6px; font: 500 10.5px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail li.now span, .rail li.done span { color: var(--muted); }
.rail li.now span { color: var(--fg); }

/* ---------- Page ---------- */
main {
  max-width: 680px; margin: 0 auto;
  padding-block: 28px 140px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.view { display: flex; flex-direction: column; gap: 20px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: .001; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .view, .onair.live::before { animation: none; } * { transition: none !important; } }

.eyebrow { font: 500 12px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1, h2 { font-family: var(--f-display); letter-spacing: -0.03em; line-height: 1.02; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 10vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 7vw, 38px); font-weight: 750; }
.lede { color: var(--muted); font-size: 17px; margin: 0; max-width: 60ch; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { min-width: 0; }
.spread { justify-content: space-between; }

/* Timeline (75-second anatomy) */
.timeline { display: flex; height: 54px; border-radius: 10px; overflow: hidden; gap: 2px; }
.timeline div { display: flex; align-items: flex-end; padding: 6px; font: 500 10px/1.1 var(--f-mono); color: var(--fg); min-width: 0; overflow: hidden; white-space: nowrap; }
.tl-host { background: var(--panel-2); color: var(--muted) !important; }
.tl-you { background: color-mix(in srgb, var(--accent) 55%, var(--panel)); }
.tl-song { background: var(--accent); color: var(--accent-ink) !important; }
.tl-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps-list b { font-weight: 600; }
.steps-list .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font: 500 13px var(--f-mono); color: var(--muted); }

/* ---------- Forms ---------- */
label.field { display: flex; flex-direction: column; gap: 7px; }
label.field > span { font-weight: 600; font-size: 14px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 15px; font-size: 16px; transition: border-color .2s;
}
.input:focus { border-color: var(--accent); outline: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: 14.5px; color: var(--muted); }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 1px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); font-weight: 650; font-size: 16px; cursor: pointer;
  text-decoration: none; color: var(--fg); transition: transform .12s, background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 14px; }

.alert { border-radius: 12px; padding: 13px 15px; font-size: 14.5px; border: 1px solid; }
.alert.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.alert.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.alert.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.alert b { display: block; margin-bottom: 3px; }

/* ---------- Question picker ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; cursor: pointer; color: var(--muted);
}
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.qlist { display: grid; gap: 10px; }
.qcard {
  display: grid; grid-template-columns: 1fr 40px; gap: 14px; align-items: center; text-align: left;
  width: 100%; padding: 16px 16px 16px 18px; border-radius: var(--r); cursor: pointer;
  background: var(--panel); border: 1.5px solid var(--line); transition: border-color .2s, background .2s;
}
.qcard:hover { border-color: var(--dim); }
.qcard .qt { font-size: 17px; font-weight: 550; line-height: 1.35; }
.qcard .qc { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-top: 6px; display: block; }
.qcard .badge {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed var(--line);
  display: grid; place-items: center; font: 600 17px var(--f-mono); color: var(--dim);
}
.qcard.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.qcard.sel .badge { background: var(--accent); border: 0; color: var(--accent-ink); }
.qcard.full:not(.sel) { opacity: .55; }

/* Cover page */
.cover { align-items: center; }
.coverimg { width: 100%; max-width: 520px; max-height: calc(100vh - 210px); object-fit: contain; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); }
/* The cover fits the screen exactly: no scrolling and no empty space under the image. */
body.cover-page { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
body.cover-page main { flex: 1 1 0; min-height: 0; width: 100%; box-sizing: border-box; padding-block: 12px calc(88px + env(safe-area-inset-bottom, 0px)); }
body.cover-page .cover { height: 100%; min-height: 0; justify-content: center; }
body.cover-page .coverimg { width: auto; height: auto; max-width: 100%; max-height: 100%; }

/* Sticky action dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.dock-in {
  max-width: 680px; margin: 0 auto; display: flex; gap: 12px; align-items: center;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
}
.dock-in .info { flex: 1; min-width: 0; }
.dock .picks { display: flex; gap: 6px; margin-top: 4px; }
.dock .picks i { width: 26px; height: 6px; border-radius: 6px; background: var(--line); }
.dock .picks i.on { background: var(--accent); }

/* ---------- Recorder ---------- */
.qprompt { font-family: var(--f-display); font-size: clamp(24px, 6.4vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.recorder { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 16px; }
.recbtn {
  position: relative; width: 148px; height: 148px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--panel-2); display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
}
.recbtn svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.recbtn svg.ring circle { fill: none; stroke-width: 6; }
.recbtn .track { stroke: var(--line); }
.recbtn .prog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.recbtn .core {
  width: 92px; height: 92px; border-radius: 50%; background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 45%, transparent); transition: border-radius .25s, width .25s, height .25s;
}
.recbtn .core svg { width: 34px; height: 34px; color: var(--accent-ink); }
.recbtn.rec .core { width: 58px; height: 58px; border-radius: 14px; }
.recbtn.rec .core svg { display: none; }
.rectime { font: 500 34px/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rectime small { font-size: 16px; color: var(--dim); }
.meter { width: 100%; max-width: 320px; height: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok) 0 65%, var(--warn) 65% 88%, var(--bad) 88%); transition: width 60ms; }
.meter-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.counter { font: 500 120px/1 var(--f-display); color: var(--accent); }

/* Review card */
.review { display: flex; flex-direction: column; gap: 14px; }
.transcript { font-size: 17px; line-height: 1.6; background: var(--bg-2); border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.transcript .w { color: var(--dim); }
.transcript .w.air { color: var(--fg); background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.transcript .w.now { outline: 1.5px solid var(--accent); }
.airbar { position: relative; height: 34px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.airbar .win { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.airbar .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); left: 0; }
.airbar .lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font: 500 11px var(--f-mono); color: var(--muted); pointer-events: none; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Song */
.drop { border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 30px 18px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drop.over, .drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop svg { width: 38px; height: 38px; color: var(--accent); }
.progress { height: 8px; border-radius: 8px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.wave { position: relative; height: 120px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave .win { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 16%, transparent); cursor: grab; }
.wave .win:active { cursor: grabbing; }
.wave .win::after { content: "30s"; position: absolute; top: 6px; left: 8px; font: 600 11px var(--f-mono); color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 2px 5px; }
.wave .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); pointer-events: none; }

/* Review list */
.items { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.item .k { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.item .t { font-weight: 550; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.playbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--panel-2); display: grid; place-items: center; cursor: pointer; color: var(--fg); }
.playbtn.on { background: var(--accent); color: var(--accent-ink); }
.playbtn svg { width: 18px; height: 18px; }

/* Processing */
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eq { display: flex; gap: 4px; align-items: flex-end; height: 40px; }
.eq i { width: 6px; background: var(--accent); border-radius: 3px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s } .eq i:nth-child(3) { animation-delay: .3s } .eq i:nth-child(4) { animation-delay: .45s } .eq i:nth-child(5) { animation-delay: .6s }
@keyframes eq { 0%,100% { height: 20% } 50% { height: 100% } }
.center { text-align: center; align-items: center; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.4); }

footer.foot { text-align: center; color: var(--dim); font-size: 13px; padding: 10px 16px 30px; }

@media (max-width: 420px) {
  .rail span { font-size: 9.5px; letter-spacing: .04em; }
  .panel { padding: 16px; }
  .recbtn { width: 132px; height: 132px; }
}

/* picture picker, price box */
.imgpick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imgpick .thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--line); overflow: hidden; flex: none; }
.imgpick .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fact { background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.fact b { font: 700 clamp(18px, 4.6vw, 24px)/1.1 var(--f-display); letter-spacing: -.01em; }
.fact span { font-size: 13px; color: var(--muted); line-height: 1.35; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } .fact { flex-direction: row; align-items: baseline; gap: 10px; } .fact b { flex: none; } }
