.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px calc(40px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 11vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 26px 0 18px;
}
.display em { font-style: italic; color: var(--red); font-weight: 400; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 0 0 8px;
}
.lead { font-size: 17px; margin: 0 0 28px; max-width: 34ch; }
.hint { font-size: 15px; margin: 18px 0; }
.hint .stamp { margin: 0 2px; }

/* ---------- welcome & join ---------- */
.join { padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: 32px; animation: step-in 0.45s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } }
.join.step-choose { animation-name: fade-up; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }
.join-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1.5px solid var(--paper); padding-bottom: 12px; min-height: 46px; }
.join .display { margin-top: 34px; }
.display.center { text-align: center; margin: 4px 0 26px; }
.join-form { margin-top: 4px; display: grid; gap: 14px; }
.join-form .error { margin: -4px 0 0; }
.input.big { min-height: 60px; font-size: 22px; padding: 14px 16px; }
.input.code.big { font-size: 28px; letter-spacing: 0.3em; text-align: center; }
.back { background: none; border: 0; color: var(--paper-dim); font-weight: 700; font-size: 14px; padding: 8px 0; }
.back:hover { color: var(--paper); }

/* the record on the welcome screen: tap it to scratch */
.hero-disc {
  --s: min(64vw, 260px);
  position: relative;
  display: block;
  width: var(--s);
  height: var(--s);
  margin: 34px auto 26px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: none;
  cursor: grab;
  animation: spin 7s linear infinite;
}
.hero-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,0.13), transparent 38%),
    conic-gradient(from 20deg, transparent 0 40deg, rgba(255,255,255,0.06) 60deg, transparent 80deg 220deg, rgba(255,255,255,0.05) 240deg, transparent 260deg),
    repeating-radial-gradient(circle, #0b0907 0 1.6px, #1f1914 1.6px 3.2px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
}
.hero-label {
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 5px rgba(22,18,14,0.18), inset 0 0 0 6px var(--paper);
}
.hero-label span { font-family: var(--serif); font-weight: 800; font-style: italic; color: var(--paper); font-size: calc(var(--s) * 0.07); transform: translateY(-62%); }
.hero-label::after { content: ''; position: absolute; width: 7%; height: 7%; border-radius: 50%; background: var(--ink); }
.hero-disc.scratch { animation: scratch 0.9s cubic-bezier(0.3, 0.7, 0.3, 1), spin 7s linear 0.9s infinite; }
@keyframes scratch {
  0% { transform: rotate(0); }
  25% { transform: rotate(-70deg); }
  55% { transform: rotate(40deg); }
  100% { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) { .hero-disc, .hero-disc.scratch { animation: none; } .join { animation: none; } }

.choices { display: grid; gap: 12px; }
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 52px 16px 18px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  text-align: left;
  text-decoration: none;
  transition: transform 0.15s var(--ease), border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--paper); }
.choice:active { transform: scale(0.985); }
.choice.primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dj-link {
  display: block;
  margin: 22px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--paper-faint);
  text-decoration: none;
  padding: 8px;
}
.dj-link u { text-underline-offset: 3px; }
.dj-link:hover { color: var(--paper-dim); }
.choice-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.65; }
.choice-title { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.choice-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; transition: transform 0.2s var(--ease); }
.choice:hover .choice-arrow { transform: translate(4px, -50%); }

.ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--ink-2);
  border: 1px dashed var(--line-strong);
  animation: fade-up 0.4s var(--ease) 0.1s both;
}
.ticket-name { font-weight: 800; font-size: 17px; }
.ticket .dim { font-size: 14px; }

.join-wait { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.join-wait .ticket { align-self: stretch; text-align: left; margin-bottom: 28px; }
.join-wait .eyebrow { margin-top: 18px; }
.join-wait .btn { margin-top: 24px; max-width: 280px; }

/* requests left */
.allowance { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: -6px 0 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--red); }
.dots i.on { background: var(--red); }

/* ---------- header & tabs ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(16px, env(safe-area-inset-top)) 0 12px;
  border-bottom: 1.5px solid var(--paper);
}
.top-event {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 13px;
  color: var(--paper-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  margin: 0 -18px;
  padding: 0 18px;
}
.tabs button {
  flex: 1;
  padding: 14px 0 12px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  transition: color 0.15s, border-color 0.15s;
}
.tabs button[aria-selected='true'] { color: var(--paper); border-bottom-color: var(--red); }
.count { font-family: var(--mono); color: var(--red); letter-spacing: 0; margin-left: 2px; }

/* ---------- now playing ---------- */
.np {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.np-text { display: flex; flex-direction: column; min-width: 0; }
.np-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.np-title { font-family: var(--serif); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-title .dim { font-family: var(--sans); font-size: 14px; }

/* ---------- search ---------- */
.search-box { position: relative; margin-bottom: 6px; }
.search-box .input { padding-left: 44px; font-size: 18px; }
.search-box::before {
  content: '';
  position: absolute;
  left: 15px; top: 50%;
  width: 14px; height: 14px;
  border: 2px solid var(--paper-dim);
  border-radius: 50%;
  transform: translateY(-62%);
}
.search-box::after {
  content: '';
  position: absolute;
  left: 27px; top: 31px;
  width: 7px; height: 2px;
  background: var(--paper-dim);
  transform: rotate(45deg);
}
.searching { display: flex; align-items: center; gap: 12px; padding: 18px 0; }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px dashed var(--line);
  background: none;
  text-align: left;
}
button.row { transition: background 0.15s; }
button.row:active { background: var(--ink-2); }
button.row:hover .disc .label { transform: rotate(25deg); }
.disc .label { transition: transform 0.6s var(--ease); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 700; font-size: 16px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 14px; color: var(--paper-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.free-link {
  display: block;
  margin: 18px 0 0;
  padding: 10px 0;
  background: none;
  border: 0;
  color: var(--paper-dim);
  font-size: 15px;
}
.free-link u { color: var(--paper); text-decoration-color: var(--red); text-underline-offset: 3px; }

/* ---------- queue ---------- */
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 28px 0 4px;
}
.section-title .dim { font-family: var(--sans); font-size: 16px; }
.section-sub { font-size: 14px; margin: 0 0 4px; }
.queue .rank { font-family: var(--serif); font-size: 26px; width: 24px; text-align: center; color: var(--paper-faint); }
.queue li:first-child .rank { color: var(--red); }
.row.mine .row-title::after { content: ' ●'; color: var(--red); font-size: 10px; vertical-align: middle; }
.heart {
  flex-shrink: 0;
  min-width: 54px;
  min-height: 36px;
  padding: 4px 10px;
  background: none;
  border: 1.5px solid var(--line-strong);
  color: var(--paper-dim);
  font-weight: 800;
  font-size: 13px;
  transition: all 0.15s var(--ease);
}
.heart.on, .heart.is-mine { border-color: var(--red); color: var(--red); }
.heart.on { background: var(--red-dim); }
.heart:active { transform: scale(0.94); }
.heart.is-mine { display: inline-flex; align-items: center; justify-content: center; }
.history .time { font-size: 12px; color: var(--paper-faint); width: 40px; flex-shrink: 0; }
.history .stamp { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

.banner { border: 1.5px solid var(--gold); color: var(--gold); padding: 12px 14px; margin: 18px 0 0; font-size: 15px; }
.leave { display: block; margin: 36px auto 0; background: none; border: 0; color: var(--paper-faint); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- request sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 6, 4, 0.7); opacity: 0; transition: opacity 0.25s; }
.sheet-card {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  background: var(--ink-2);
  border-top: 1.5px solid var(--paper);
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  max-height: 92dvh;
  overflow-y: auto;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-card { transform: none; }
.sheet-close { position: absolute; right: 10px; top: 8px; width: 40px; height: 40px; background: none; border: 0; font-size: 28px; color: var(--paper-dim); }
.sheet-track { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.sheet.open .sheet-track .disc .label { animation: spin 1.8s linear infinite; }
.sheet-title { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.05; margin: 10px 0 4px; }
.sheet-track p { margin: 0; }
.opt { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* ---------- receipt ---------- */
.receipt-wrap {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--ink);
  overflow-y: auto;
  padding: max(28px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  opacity: 0;
  transition: opacity 0.25s;
}
.receipt-wrap.open { opacity: 1; }
.receipt-stage { max-width: 340px; margin: 0 auto; }
.printer { height: 18px; background: var(--ink-3); border-radius: 4px; position: relative; box-shadow: 0 2px 0 #000 inset; }
.slot { position: absolute; left: 6%; right: 6%; top: 7px; height: 4px; background: #000; border-radius: 2px; }
.paper-clip { overflow: hidden; margin: -9px 9% 0; padding-bottom: 14px; }
.receipt {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  padding: 18px 16px 26px;
  transform: translateY(-105%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 95% 98.4%, 90% 100%, 85% 98.4%, 80% 100%, 75% 98.4%, 70% 100%, 65% 98.4%, 60% 100%, 55% 98.4%, 50% 100%, 45% 98.4%, 40% 100%, 35% 98.4%, 30% 100%, 25% 98.4%, 20% 100%, 15% 98.4%, 10% 100%, 5% 98.4%, 0 100%);
}
.receipt-wrap.open .receipt { animation: print 1.5s steps(14, end) 0.15s forwards; }
@keyframes print { to { transform: translateY(0); } }
.receipt header { text-align: center; display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.receipt header strong { letter-spacing: 0.25em; font-size: 14px; }
.receipt header span { font-size: 11px; opacity: 0.7; }
.receipt-body { border-top: 1px dashed var(--ink); border-bottom: 1px dashed var(--ink); padding: 10px 0; }
.receipt-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.receipt-artist { opacity: 0.7; margin-bottom: 10px; }
.receipt dl { margin: 0; }
.receipt dl div { display: flex; justify-content: space-between; gap: 12px; }
.receipt dt { opacity: 0.7; }
.receipt dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.receipt-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; margin-top: 10px; }
.barcode { display: flex; justify-content: center; height: 34px; margin-top: 14px; }
.barcode i { display: block; background: var(--ink); height: 100%; }
.receipt-stamp {
  position: absolute;
  right: 12px;
  bottom: 24px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--red);
  border: 3px solid var(--red);
  padding: 4px 10px 3px;
  opacity: 0;
  transform: rotate(-10deg) scale(1.8);
  mix-blend-mode: multiply;
}
.receipt-wrap.open .receipt-stamp { animation: stamp 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) 1.8s forwards; }
@keyframes stamp { to { opacity: 0.92; transform: rotate(-10deg) scale(1); } }
.receipt-thanks {
  text-align: center;
  font-family: var(--serif);
  font-size: 22px;
  margin: 18px 0 22px;
  opacity: 0;
}
.receipt-wrap.open .receipt-thanks { animation: fade 0.4s 2s forwards; }
@keyframes fade { to { opacity: 1; } }
.receipt-actions { max-width: 340px; margin: 0 auto; display: grid; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  .receipt-wrap.open .receipt, .receipt-wrap.open .receipt-stamp, .receipt-wrap.open .receipt-thanks { animation-duration: 0.01s; animation-delay: 0s; }
}
