/* CueUp design tokens. Same palette and type as the prototype. */
:root {
  --bg: #F5F1FA; --surface: #FFFFFF; --surface2: #EDE6F5; --line: #D9CEE7;
  --fg: #1B1426; --muted: #6B5F80;
  --accent: #C71F52; --accent-fg: #FFFFFF;
  --money: #7A4E00; --money-bg: #FFEFC7; --ok: #1B7447; --warn: #B3261E;
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark colours: used when the phone/computer is in dark mode (unless the visitor chose Light),
   and always when the visitor taps the theme button to choose Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #130F1E; --surface: #1E1830; --surface2: #2A2242; --line: #3A3057;
    --fg: #F3EEFA; --muted: #A99FC0;
    --accent: #FF5C87; --accent-fg: #1A0A12;
    --money: #FFC857; --money-bg: #3A2E10; --ok: #5BD59A; --warn: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #130F1E; --surface: #1E1830; --surface2: #2A2242; --line: #3A3057;
    --fg: #F3EEFA; --muted: #A99FC0;
    --accent: #FF5C87; --accent-fg: #1A0A12;
    --money: #FFC857; --money-bg: #3A2E10; --ok: #5BD59A; --warn: #FF8A80;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-block: 18px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; color: var(--fg); text-decoration: none; }
.brand span { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand .word { color: var(--fg); }
.brand .word span { color: var(--accent); }
.brand .mark { width: 30px; height: 30px; flex: none; }
.mark .band { stroke: var(--fg); }
.mark .cup { fill: var(--accent); }
.theme-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--fg); }
.theme-btn:hover { background: var(--surface2); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .sun { display: none; }
:root[data-shown="dark"] .theme-btn .sun { display: block; }
:root[data-shown="dark"] .theme-btn .moon { display: none; }
.nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav a { font-weight: 500; text-decoration: none; }
.note { color: var(--muted); font-size: 13px; margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* form controls */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface2); border-radius: 12px; margin-bottom: 16px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: 9px; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.16); }
label.lbl { display: block; font-weight: 500; font-size: 13px; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=number], input[type=email], input[type=password], select {
  width: 100%; font-size: 16px; padding: 12px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
input::placeholder { color: var(--muted); opacity: 1; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--warn); }
.field-err { color: var(--warn); font-size: 13px; margin: 5px 0 0; min-height: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.err { color: var(--warn); font-size: 14px; min-height: 20px; margin: 0 0 8px; }
.prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.prefix span { display: flex; align-items: center; padding: 0 0 0 13px; color: var(--muted); font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.prefix input { border: 0; border-radius: 0; background: transparent; padding-left: 2px; font-family: var(--mono); font-size: 15px; min-width: 0; }
.btn { width: 100%; border: 0; background: var(--accent); color: var(--accent-fg); font-weight: 700; padding: 14px 16px; border-radius: 14px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); font-weight: 500; margin-top: 10px; }
.btn.inline { width: auto; }
.small { border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 12px; font-weight: 500; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip { border: 1px solid var(--line); background: transparent; padding: 8px 13px; border-radius: 999px; font-family: var(--mono); font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--money-bg); border-color: var(--money); color: var(--money); font-weight: 500; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

/* guest page */
.phone { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 22px 20px 24px; max-width: 440px; margin: 0 auto; }
.venue { margin: 0; color: var(--muted); font-size: 13px; min-height: 19px; }
.djname { font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; margin: 2px 0 16px; line-height: 1.1; overflow-wrap: anywhere; }
.sum { border: 1px dashed var(--line); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.sum b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.sum .amt { font-family: var(--mono); font-size: 24px; color: var(--money); margin-top: 6px; display: block; }
.done h2 { font-family: var(--display); font-size: 24px; margin: 4px 0 8px; }
.done p { margin: 0 0 10px; color: var(--muted); }
.tick { width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: var(--bg); display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); }
.foot { text-align: center; margin: 18px 0 0; }
.demo-flag { font-family: var(--mono); font-size: 12px; background: var(--money-bg); color: var(--money); border-radius: 8px; padding: 6px 10px; margin: 0 0 14px; }

/* landing */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 420px); gap: 48px; align-items: start; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 16px; text-wrap: balance; }
.lede { font-size: 18px; color: var(--muted); max-width: 52ch; margin: 0 0 26px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.card h2, .card h3 { font-family: var(--display); margin: 0 0 12px; letter-spacing: -.01em; }
.card h2 { font-size: 22px; }
.card h3 { font-size: 18px; }
.steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps li::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; }
.steps b { display: block; }
.steps span { color: var(--muted); }
.split { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
.split strong { font-family: var(--mono); font-size: 30px; color: var(--money); font-weight: 500; }
.split p { margin: 0; color: var(--muted); max-width: 48ch; }
.mock { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 6px 14px; margin: 0 0 26px; max-width: 480px; }
.mock .row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mock .row:last-child { border-bottom: 0; }

/* dashboard */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.dash-side { display: grid; gap: 16px; }
.banner { border: 1px solid var(--accent); border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.banner p { margin: 0; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 0 18px; margin: 0; border-bottom: 1px solid var(--line); }
.stat dt { color: var(--muted); font-size: 13px; margin: 0 0 2px; }
.stat dd { margin: 0; font-family: var(--mono); font-size: 24px; font-weight: 500; }
.stat .sub { display: block; color: var(--muted); font-family: var(--body); font-size: 12px; font-weight: 400; margin-top: 2px; }
.linkbtn { border: 0; background: transparent; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; font-size: 12px; }
.qhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 12px; }
.qhead h2 { font-family: var(--display); font-size: 22px; margin: 0; }
.qhead .seg { margin: 0; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; }
.item:first-child { border-color: var(--accent); }
.rank { font-family: var(--mono); font-size: 20px; color: var(--muted); text-align: center; }
.item:first-child .rank { color: var(--accent); font-weight: 500; }
.song { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13px; }
.pay { font-family: var(--mono); background: var(--money-bg); color: var(--money); padding: 5px 10px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.acts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.acts button { border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 7px 14px; font-weight: 500; font-size: 14px; }
.acts .play { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 700; }
.acts button:disabled { opacity: .6; cursor: progress; }
.empty { border: 1px dashed var(--line); border-radius: 16px; padding: 22px; color: var(--muted); text-align: center; }
.sec { margin-top: 26px; }
.sec h3 { font-family: var(--display); font-size: 18px; margin: 0 0 10px; }
.tips { list-style: none; margin: 0; padding: 0; }
.tips li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
details { margin-top: 22px; }
summary { cursor: pointer; font-weight: 500; color: var(--muted); }
.hist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.hist li { display: flex; justify-content: space-between; gap: 10px; }
.tag-ok { color: var(--ok); }
.tag-no { color: var(--warn); }
.qr { width: 100%; max-width: 220px; aspect-ratio: 1; background: #fff; padding: 12px; border-radius: 14px; margin: 0 auto 14px; display: block; }
.qr svg { display: block; width: 100%; height: 100%; }
.linkrow { display: flex; gap: 8px; margin-bottom: 10px; }
.linkrow input { font-family: var(--mono); font-size: 13px; padding: 9px 11px; min-width: 0; }
.row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.paid-to { margin: 0 0 10px; }
.paid-to b { display: block; overflow-wrap: anywhere; }
.status { min-height: 20px; font-size: 14px; margin: 0 0 12px; color: var(--muted); }
.status.bad { color: var(--warn); }

#poster { display: none; }

/* skip link, consent checkboxes */
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-fg); padding: 10px 14px; border-radius: 10px; font-weight: 700; z-index: 20; text-decoration: none; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
.legal-note { margin: 0 0 12px; }

/* footer shown on every page */
.site-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; color: var(--muted); font-size: 13px; }
.site-foot a { color: var(--muted); }
.foot-biz { line-height: 1.6; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-start; }

/* legal pages */
.legal { max-width: 70ch; }
.legal h1 { font-family: var(--display); font-size: clamp(30px, 5vw, 42px); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; text-wrap: balance; }
.legal h2 { font-family: var(--display); font-size: 21px; letter-spacing: -.01em; margin: 32px 0 8px; }
.legal h3 { font-size: 15px; margin: 18px 0 4px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li { margin-bottom: 4px; }
.legal code { font-family: var(--mono); background: var(--surface2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.legal .callout { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px 8px; margin: 22px 0 0; }
.legal .table-wrap, .legal table { display: block; overflow-x: auto; max-width: 100%; }
.legal table { border-collapse: collapse; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-size: 13px; color: var(--muted); font-weight: 500; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.draft-banner { background: var(--money-bg); color: var(--money); border-radius: 10px; padding: 10px 14px; margin: 14px 0 0; font-size: 14px; }
.ref { font-family: var(--mono); background: var(--surface2); padding: 2px 8px; border-radius: 6px; font-size: 13px; overflow-wrap: anywhere; }
.legal-note.note { margin: 12px 0 0; }
.danger-zone .hint { margin: 10px 0 12px; }
/* danger zone */
.danger-zone { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.btn.danger { background: var(--warn); color: var(--bg); }
.small.danger { border-color: var(--warn); color: var(--warn); }

@media (prefers-reduced-motion: no-preference) {
  .item.fresh { animation: flash 2.4s ease-out; }
  @keyframes flash { from { background: var(--money-bg); } to { background: var(--surface); } }
  .spinner { animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}

@media (max-width: 899px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .stat dd { font-size: 20px; }
}

@media print {
  .app, .site-foot { display: none !important; }
  body { background: #fff; color: #000; }
  #poster { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 90vh; text-align: center; font-family: var(--display); }
  #poster .p-name { font-size: 48px; font-weight: 700; line-height: 1.1; }
  #poster .p-cta { font-size: 30px; }
  #poster .p-qr { width: 70vmin; max-width: 520px; }
  #poster .p-qr svg { display: block; width: 100%; height: auto; }
  #poster .p-link { font-family: var(--mono); font-size: 20px; }
  #poster .p-brand { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: -.02em; color: #1B1426; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #poster .p-brand svg { width: 56px; height: 56px; }
  #poster .p-brand b { color: #C71F52; font-weight: 800; }
}

/* the poster is only for printing */
#poster { display: none; }
@media print { #poster { display: flex; } }

/* ---- song search on the guest page ---- */
.combo { position: relative; }
.suggest { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.22); max-height: 300px; overflow-y: auto; }
.suggest li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.suggest li b { font-weight: 700; overflow-wrap: anywhere; }
.suggest li .by { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--surface2); }
.hint.good { color: var(--ok); }
.found { display: block; color: var(--ok); font-size: 13px; margin-top: 2px; }

/* price lines on the review screen */
.lines { margin: 12px 0 0; padding: 0; }
.lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.lines dt { color: var(--muted); }
.lines dd { margin: 0; font-family: var(--mono); }
.lines .total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.lines .total dt { color: var(--fg); font-weight: 700; }
.lines .total dd { font-size: 24px; color: var(--money); }

/* passwords, forgot password */
.rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.rules .rule.ok { color: var(--ok); }
.forgot { margin: 14px 0 0; text-align: center; }
.linkbtn.big { font-size: 14px; }
.mini { font-family: var(--display); font-size: 20px; margin: 0 0 8px; }
.ok-msg { color: var(--ok); font-size: 14px; margin: 0 0 10px; min-height: 0; }

/* "found on Apple Music" badge on the DJ's queue */
.badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); margin-left: 4px; text-decoration: none; white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.no { color: var(--muted); }

/* updated-terms dialog */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(10, 6, 20, .72); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; max-width: 460px; width: 100%; }
.modal h2 { font-family: var(--display); font-size: 22px; margin: 0 0 10px; }
.modal p { margin: 0 0 14px; }

/* analytics pages */
.page-title { font-family: var(--display); font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; margin: 0; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
.h2 { font-family: var(--display); font-size: 20px; margin: 0 0 10px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
table.data tbody th { font-weight: 500; min-width: 7.5em; overflow-wrap: break-word; }
table.data td:not(.num):not(.empty-cell) { min-width: 8em; }
table.data .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
table.data .strong { font-weight: 500; color: var(--money); }
.empty-cell { color: var(--muted); text-align: center; padding: 22px 10px; }
.barwrap { display: block; width: 110px; margin: 0 0 4px auto; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar-n { display: block; }
@media (max-width: 899px) {
  .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
