/* Lyttetesten: samme udtryk som Tapetown artist area (mørk kul og grøn, Instrument Sans,
   dæmpet salvie til det valgte), med playeren midt på siden i stedet for i bunden. */
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(/fonts/instrument-sans-400.ttf) format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(/fonts/instrument-sans-500.ttf) format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(/fonts/instrument-sans-600.ttf) format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url(/fonts/instrument-sans-700.ttf) format("truetype"); }

:root {
  --glow: 132, 138, 62;
  --bg: #111613; --bg-2: #1b201b; --panel: #1b221c; --panel-2: #202820;
  --text: #eeeee5; --muted: #acb4a9; --soft: #c7cfbf; --line: rgba(224, 231, 215, .11); --line-2: rgba(180, 197, 166, .2);
  --sage: #c4d1b4; --sage-ink: #233020; --cream: #e6e7da; --cream-ink: #243026;
  --bad: #f1a090; --bad-bg: rgba(200, 80, 60, .16); --warn: #f0c79a; --warn-bg: rgba(220, 160, 80, .12);
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --r-xs: 4px; --r-s: 8px; --r-m: 12px; --r-l: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100dvh; color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; isolation: isolate; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 90% 560px at 24% 0%, rgba(var(--glow), .22), transparent 100%), linear-gradient(180deg, var(--bg-2), var(--bg) 640px), var(--bg);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---- the page ---- */
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: calc(14px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: rgba(17, 22, 19, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.closed-tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(240, 199, 154, .45); background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; white-space: nowrap; }
.closed-tag .icon { width: 13px; height: 13px; stroke-width: 2; }
.top-text { font-size: 13px; color: var(--soft); min-width: 0; }
.top-who { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.main { width: min(820px, 100%); margin: 0 auto; padding: 34px max(20px, env(safe-area-inset-right)) calc(70px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.main.wide { width: min(1120px, 100%); }
.main > * + * { margin-top: 22px; }
.view > * + * { margin-top: 22px; }
.view.is-entering > * { animation: rise-in .44s var(--ease-out) backwards; }
.view.is-entering > :nth-child(2) { animation-delay: .05s; }
.view.is-entering > :nth-child(3) { animation-delay: .1s; }
.view.is-entering > :nth-child(n+4) { animation-delay: .14s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .view.is-entering > * { animation: none; } }

.hero { display: flex; gap: 34px; align-items: center; padding: 6px 0 10px; }
.cover { display: block; aspect-ratio: 1; border-radius: var(--r-xs); background: #2a3327 center / cover no-repeat; flex: none; }
.hero-cover { width: 210px; border-radius: var(--r-m); box-shadow: 0 15px 65px rgba(14, 8, 8, .35); }
.hero-text { flex: 1; min-width: 0; }
.eyebrow { font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--sage); font-weight: 600; }
.hero h1 { margin-top: 10px; font-size: clamp(34px, 5.2vw, 52px); line-height: 1.06; letter-spacing: -1.6px; font-weight: 500; overflow-wrap: anywhere; }
.subtitle { margin-top: 10px; font-size: 16px; color: var(--soft); }
.lead { white-space: pre-line; font-size: 16px; color: var(--soft); max-width: 62ch; }

.panel { background: rgba(32, 40, 32, .55); border: 1px solid var(--line); border-radius: var(--r-m); }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 17px; font-weight: 500; letter-spacing: -.3px; }
.panel-head p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.panel-body { padding: 20px 22px; }
.panel-body > * + * { margin-top: 16px; }

.steps { list-style: none; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.step-n { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--sage); font-size: 13px; font-weight: 600; }
.steps strong { display: block; font-weight: 500; }
.steps span.what { display: block; font-size: 14px; color: var(--muted); margin-top: 1px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 9px; font-size: 14px; color: var(--soft); }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.ticks .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--sage); }

.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--soft); }
.field > span, .field > legend { font-weight: 500; color: var(--text); font-size: 14px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 7px; }
textarea, input[type="text"], input:not([type]) { width: 100%; background: #121811; border: 1px solid #51604a; border-radius: var(--r-s); color: var(--text); padding: 12px 13px; font-size: 15px; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
textarea::placeholder, input::placeholder { color: #8c9983; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-flex; min-height: 40px; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: var(--soft); transition: background .15s, color .15s, border-color .15s; }
.chip-check input:checked + span { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); font-weight: 600; }
.chip-check input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }
.chip-check.big span { min-height: 48px; padding: 10px 20px; font-size: 15px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: rgba(196, 209, 180, .04); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, transform .1s; }
.btn:hover:not(:disabled) { background: rgba(196, 209, 180, .1); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); }
.btn.primary:hover:not(:disabled) { background: #d1dcc3; }
.btn.big { min-height: 50px; padding: 12px 22px; font-size: 15px; }
.btn.danger { color: var(--bad); border-color: rgba(241, 160, 144, .3); }
.btn .icon { width: 16px; height: 16px; }
.text-link { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; min-height: 32px; padding: 4px 2px; }
.text-link.danger { color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(196, 209, 180, .03); color: var(--muted); font-size: 12px; }
.chip[aria-pressed="true"] { border-color: var(--sage); color: var(--sage); }
.notice-box { padding: 13px 16px; border-radius: var(--r-s); background: rgba(196, 209, 180, .07); border: 1px solid var(--line); font-size: 13px; color: var(--soft); }
.notice-box.is-error { background: var(--bad-bg); border-color: rgba(241, 160, 144, .3); color: #f6d4cc; }
.notice-box.is-warn { background: var(--warn-bg); border-color: rgba(240, 199, 154, .3); color: #f3dcc0; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.center { text-align: center; }

.progress { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--sage); font-weight: 600; }
.progress-dots { display: flex; gap: 5px; }
.progress-dots i { width: 22px; height: 3px; border-radius: 2px; background: rgba(196, 209, 180, .2); }
.progress-dots i.on { background: var(--sage); }
.test-title { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -1.1px; font-weight: 500; margin-top: 10px; }

/* ---- the player (the look of the Artist Area's dock, as a card) ---- */
.player-card { background: linear-gradient(180deg, var(--panel), #171d19); border: 1px solid rgba(198, 212, 188, .14); border-radius: var(--r-l); padding: 22px 24px 18px; box-shadow: 0 18px 60px rgba(8, 12, 8, .35); }
.player-header { display: flex; align-items: center; gap: 22px; justify-content: space-between; flex-wrap: wrap; }
.now { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 13px; }
.now-cover { width: 52px; }
.now-text { min-width: 0; display: block; }
.now-title { display: block; font-weight: 500; font-size: 17px; letter-spacing: -.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mixes { display: flex; flex-wrap: wrap; gap: 7px; }
.mix-button { position: relative; min-width: 68px; min-height: 52px; padding: 8px 16px; border-radius: var(--r-s); border: 1px solid rgba(180, 197, 166, .2); background: rgba(194, 208, 183, .04); color: #b5c0af; font-size: 20px; font-weight: 500; transition: background .12s, color .12s, border-color .12s, transform .1s; }
.mix-button:hover:not(:disabled) { background: rgba(255, 255, 255, .07); color: #fff; }
.mix-button:active:not(:disabled) { transform: scale(.97); }
.mix-button[aria-pressed="true"] { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); font-weight: 600; }
.mix-button[data-preparing="true"] { cursor: progress; }
.mix-button[data-preparing="true"]::after { content: ""; position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mix-wait .8s linear infinite; }
@keyframes mix-wait { to { transform: rotate(360deg); } }
.mix-heard { position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity .3s; }
.mix-button.is-heard .mix-heard { opacity: .7; }
.player-state { margin-top: 14px; font-size: 13px; color: var(--muted); }
.player-state.has-error { color: var(--bad); }
.wave-wrap { position: relative; padding-top: 26px; }
.wave { position: relative; height: 84px; cursor: pointer; --wave-played: #bfcaa9; --wave-rest: #4f5a4b; touch-action: pan-y; }
.wave canvas { display: block; width: 100%; height: 100%; }
.playhead { position: absolute; top: -6px; bottom: -6px; width: 1px; background: #dfe5ce; pointer-events: none; box-shadow: 0 0 10px rgba(191, 202, 169, .35); }
.playhead::before { content: ""; position: absolute; top: 0; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: #dfe5ce; }
.playhead-time { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--sage); font-variant-numeric: tabular-nums; opacity: 0; }
.wave:hover .playhead-time, .wave:focus-visible .playhead-time, .wave[data-scrolling="true"] .playhead-time { opacity: 1; }
.times { display: flex; justify-content: space-between; margin-top: 10px; color: #a5b29b; font-size: 11px; font-variant-numeric: tabular-nums; }
.player-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.controls { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--soft); flex: none; transition: background .12s, transform .1s; }
.icon-button:hover { background: rgba(255, 255, 255, .07); }
.icon-button:active:not(:disabled) { transform: scale(.92); }
.step { position: relative; }
.step span { position: absolute; top: 15px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 600; }
.play { width: 54px; height: 54px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--cream); color: #263025; transition: transform .1s; }
.play:active:not(:disabled) { transform: scale(.95); }
.play svg { width: 21px; height: 21px; fill: currentColor; }
.play .pause-symbol, .play.on .play-symbol { display: none; }
.play.on .pause-symbol { display: block; }
.sync { color: #a8b49f; font-size: 12px; flex: 1 1 200px; text-align: center; }
.keys-hint { margin-top: 12px; font-size: 12px; color: #8c9983; }
@media (hover: none) { .keys-hint { display: none; } }

/* ---- the answer ---- */
.answer .panel-body > * + * { margin-top: 22px; }
.others { display: grid; gap: 12px; }
.others textarea { min-height: 64px; }
.lock-note { font-size: 13px; color: var(--muted); }
.need { font-size: 13px; color: var(--warn); }

/* ---- the reveal ---- */
.reveal-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.reveal-item { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-s); background: rgba(196, 209, 180, .03); }
.reveal-item.is-picked { border-color: var(--sage); background: rgba(196, 209, 180, .09); }
.reveal-slot { display: grid; justify-items: center; gap: 4px; min-width: 74px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.reveal-code { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); font-size: 17px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.reveal-item.is-picked .reveal-code { background: var(--sage); border-color: var(--sage); color: var(--sage-ink); }
.reveal-code.is-long { font-size: 12px; }
.reveal-item h3 { font-size: 16px; font-weight: 500; }
.reveal-item p { font-size: 14px; color: var(--soft); margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--sage); color: var(--sage-ink); font-size: 11px; font-weight: 600; vertical-align: 2px; white-space: nowrap; }
.quote { font-size: 14px; color: var(--soft); border-left: 2px solid var(--line-2); padding-left: 12px; white-space: pre-line; }

.dialog { width: min(460px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--panel); color: var(--text); }
.dialog::backdrop { background: rgba(8, 10, 8, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dialog h2 { font-size: 19px; font-weight: 500; letter-spacing: -.3px; margin-bottom: 10px; }
.dialog p { font-size: 14px; color: var(--soft); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; max-width: min(92vw, 520px); padding: 11px 17px; border-radius: 999px; background: #f3f0e6; color: #263025; font-size: 13px; box-shadow: 0 5px 30px rgba(0, 0, 0, .3); text-align: center; }
.toast.is-error { background: #f6d4cc; color: #4a1a12; }

@media (max-width: 720px) {
  .main { padding-top: 22px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-cover { width: 150px; }
  .top-text { flex-basis: 100%; order: 3; }
  .player-card { padding: 18px 16px 14px; border-radius: var(--r-m); }
  .mixes { width: 100%; }
  .mix-button { flex: 1; min-height: 56px; }
  .sync { order: 3; flex-basis: 100%; text-align: left; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
  .reveal-item { grid-template-columns: 1fr; }
  .reveal-slot { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
  .btn.big { width: 100%; }
}
