@font-face {
  font-family: "Bebas Neue";
  src: url("/fonts/bebas-neue-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070708;
  --ink: #f6f3ee;
  --muted: #9c9892;
  --hot: #ff2a4a;
  --line: #2c2c30;
  --display: "Bebas Neue", "Arial Narrow", Impact, Haettenschweiler, sans-serif;
  --ui: "Barlow Condensed", "Arial Narrow", "Franklin Gothic Medium", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  background: var(--bg);
}

img { display: block; max-width: 100%; }

button, input { font: inherit; color: inherit; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 18px;
  border: 2px solid var(--hot);
  border-radius: 0;
  background: var(--hot);
  color: #070708;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

button.ghost, .btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

button.danger {
  background: transparent;
  color: var(--hot);
  border: 2px solid var(--hot);
}

button:disabled { opacity: 0.45; cursor: wait; }

button.hit {
  width: 100%;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  min-height: 96px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

button.hit strong,
button.hit em { display: block; font-style: normal; }

button.hit strong {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

button.hit em {
  color: var(--muted);
  margin-top: 2px;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

button.hit.on,
button.hit:hover {
  border-color: var(--line);
  background: transparent;
  box-shadow: inset 6px 0 0 var(--hot);
}

:focus-visible {
  outline: 3px solid var(--hot);
  outline-offset: 3px;
}

.wrap {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(48px + env(safe-area-inset-bottom));
}

body[data-screen="dj"] .wrap { width: min(1120px, 100%); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions a,
a.tv-link {
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.08em;
  line-height: 0.9;
  text-transform: uppercase;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  background: var(--hot);
  vertical-align: 2px;
}

.code-pill {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.22em;
  color: var(--hot);
  border: 0;
  border-bottom: 3px solid var(--hot);
  border-radius: 0;
  padding: 0 0 2px;
}

h1, h2, h3, .spot, .now-name, .next-name, .room-code, .wait {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.88;
  text-transform: uppercase;
  margin: 0;
}

h1 { font-size: clamp(3.4rem, 12vw, 5.6rem); }

h2 { font-size: clamp(2.4rem, 7vw, 3.4rem); }

.spot {
  font-size: clamp(4.2rem, 16vw, 6.4rem);
  margin: 8px 0 10px;
}

.lede {
  color: #ddd9d2;
  margin: 10px 0 0;
  font-size: 1.35rem;
  font-weight: 500;
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

#me > .eyebrow,
#now > .eyebrow,
body[data-screen="now"] .eyebrow {
  color: var(--hot);
}

.card, .stage-card, .next-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 0 4px;
  margin: 18px 0;
}

.stage-card,
.next-card {
  border-top: 4px solid var(--ink);
  padding-top: 16px;
}

#now.stage-card { border-top-color: var(--hot); }

label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

input {
  width: 100%;
  min-height: 56px;
  padding: 0 12px;
  border-radius: 0;
  border: 2px solid #3a3a40;
  background: #0c0c0e;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

input::placeholder { color: #6e6a64; }

input:focus {
  border-color: var(--hot);
  outline: none;
}

.stack { display: grid; gap: 10px; margin-top: 18px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.actions button { flex: 1 1 140px; }

body[data-screen="dj"] .actions button {
  min-height: 64px;
  font-size: 1.25rem;
}

.room-code {
  font-size: clamp(5rem, 22vw, 8rem);
  letter-spacing: 0.12em;
  color: var(--hot);
  margin: 6px 0;
}

.conn { min-height: 1.2em; margin: 8px 0 0; color: var(--hot); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.error { color: var(--hot); min-height: 1.2em; margin: 8px 0; font-weight: 700; }

.muted { color: var(--muted); }

.row, .hero-row, .lockup, .next-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.row img, .hero-row img, .ph,
.lockup img, .next-lockup img,
button.hit img, button.hit .ph {
  width: 84px;
  height: 84px;
  border-radius: 0;
  object-fit: cover;
  flex: 0 0 auto;
  background: #121214;
}

.ph {
  display: grid;
  place-items: center;
  color: var(--hot);
  font-family: var(--display);
  font-size: 2.4rem;
  border: 1px solid var(--line);
}

.who {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.song {
  margin: 4px 0 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.song span, .now-artist { color: var(--muted); }

.mine {
  border-color: transparent;
  box-shadow: inset 6px 0 0 var(--hot);
  padding-left: 14px;
}

#line .row, #rest .row, #recent .row, #me .row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  margin: 0;
}

.dj-hero { display: grid; gap: 8px; }

@media (min-width: 860px) {
  .dj-hero { grid-template-columns: 1.45fr 0.85fr; align-items: start; gap: 28px; }
}

#now .hero-row {
  display: grid;
  grid-template-columns: minmax(168px, 46%) 1fr;
  align-items: end;
  gap: 16px;
}

#now .hero-row img,
#now .hero-row .ph {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: 420px;
  font-size: clamp(4rem, 10vw, 7rem);
}

.lockup {
  display: grid;
  grid-template-columns: minmax(148px, 42%) 1fr;
  align-items: end;
  gap: 14px;
  margin: 8px 0 12px;
}

.lockup img,
.lockup .ph {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: 320px;
  font-size: clamp(3.5rem, 12vw, 5.5rem);
}

.next-lockup {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: end;
  gap: 12px;
}

.next-lockup img,
.next-lockup .ph {
  width: 112px;
  height: 112px;
  font-size: 3rem;
}

.now-name, .next-name {
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  overflow-wrap: anywhere;
}

.now-song {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 8px 0 0;
}

.now-artist {
  margin: 2px 0 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-title {
  margin: 28px 0 8px;
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.tiny { font-size: 1rem; letter-spacing: 0.04em; }

::selection { background: var(--hot); color: #070708; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

.noshow {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 16px 0 8px;
}

.noshow legend {
  padding: 0;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 700;
}

.choices { display: flex; gap: 8px; }

.choices button {
  flex: 1;
  min-height: 52px;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 0;
}

.choices button[aria-pressed="true"] {
  background: var(--hot);
  color: #070708;
  border-color: var(--hot);
}

.timer {
  font-family: var(--ui);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 12px 0 0;
  color: var(--hot);
}

.timer.urgent {
  color: #070708;
  background: var(--hot);
  display: inline-block;
  padding: 2px 8px;
}

.stage-note { color: var(--muted); margin: 10px 0 0; font-size: 1.05rem; }

button.confirm,
button.putback {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

button.putback { min-height: 48px; flex: 0 0 auto; }

.history-item { margin-top: 4px; }

.wait {
  font-size: clamp(2.2rem, 7vw, 3rem);
  color: var(--ink);
  margin: 0 0 8px;
}

body[data-screen="now"] {
  background: #070708;
}

body[data-screen="now"] .wrap {
  width: min(1680px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7vh 5vw;
}

.display-code {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  right: calc(20px + env(safe-area-inset-right));
  margin: 0;
  font-family: var(--ui);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--hot);
  font-size: clamp(1.1rem, 2vw, 1.7rem);
}

.display { position: relative; }

.display-hero {
  display: grid;
  grid-template-columns: minmax(220px, 46vw) 1fr;
  align-items: end;
  gap: clamp(20px, 4vw, 72px);
}

.display-hero img,
.display-hero .ph,
.display-art {
  width: min(46vw, 78vh);
  height: auto;
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 0;
  font-size: clamp(5rem, 14vw, 10rem);
}

h1.display-name {
  font-size: clamp(4.6rem, 11vw, 11.5rem);
  line-height: 0.84;
  overflow-wrap: anywhere;
}

.display-song {
  font-family: var(--ui);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 3.3rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0.4em 0 0;
  overflow-wrap: anywhere;
}

.display-artist {
  font-family: var(--ui);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 2.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.2em 0 0;
  overflow-wrap: anywhere;
}

.display-next {
  margin: 5vh 0 0;
  padding-top: 2vh;
  border-top: 1px solid var(--line);
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.display-next span {
  display: inline-block;
  margin-right: 0.7em;
  color: var(--hot);
  letter-spacing: 0.18em;
  font-size: 0.78em;
}

body[data-screen="now"] .eyebrow {
  font-size: clamp(1rem, 1.8vw, 1.45rem);
  margin-bottom: 1.1rem;
}

.display-conn {
  position: absolute;
  left: 5vw;
  bottom: calc(16px + env(safe-area-inset-bottom));
}

.tv-link-row { margin: 10px 0 0; }

@media (max-width: 720px) {
  .display-hero,
  #now .hero-row,
  .lockup {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .display-hero img,
  .display-hero .ph,
  .display-art {
    width: min(86vw, 70vh);
  }

  #now .hero-row img,
  #now .hero-row .ph,
  .lockup img,
  .lockup .ph {
    width: min(78vw, 360px);
  }
}

.room-qr {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  margin: 18px 0 8px;
}

.room-qr .qr-svg svg {
  width: 180px;
  height: 180px;
  display: block;
  background: #fff;
  shape-rendering: crispEdges;
}

.room-qr.small { grid-template-columns: 140px 1fr; }

.room-qr.small .qr-svg svg {
  width: 140px;
  height: 140px;
}

.qr-url {
  margin: 6px 0 0;
  color: var(--muted);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.scan-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: #070708;
}

.scan-layer video {
  width: 100%;
  flex: 1 1 auto;
  min-height: 240px;
  max-height: 70dvh;
  object-fit: cover;
  background: #000;
}

.scan-layer button { width: 100%; }

@media (max-width: 560px) {
  .room-qr,
  .room-qr.small { grid-template-columns: 1fr; }
}

/* Landing page styles live in /poster.css (scoped to .landing). */
html.join-lock,
html.join-lock body { overflow: hidden; }

/* DJ bump arrows: swap a waiting singer with the one above or below. */
.tile-ctl { display: flex; align-items: flex-end; gap: 8px; }
.tile-ctl .actions { flex: 1 1 auto; }
.bump { display: flex; gap: 8px; margin-top: 14px; flex: 0 0 auto; }
.bump-btn, .bump-gap { width: 64px; min-height: 64px; }
.bump-btn {
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 1.5rem;
  letter-spacing: 0;
  line-height: 1;
}
.bump-btn:hover, .bump-btn:focus-visible { border-color: var(--hot); color: var(--hot); }
.bump-btn:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }
.bump-gap { display: block; }
@media (max-width: 420px) {
  .bump-btn, .bump-gap { width: 52px; }
}
