/* Comovers Camp Out — campfire night theme (shared by / and /dj) */
:root {
  --night: #0b1026; --night2: #141a3a; --card: #1b2250; --card2: #232b63; --sheet: #1a2050;
  --ember: #ff7a2f; --flame: #ffb340; --spark: #ffd98a; --pine: #2fbf8f; --mint: #6fe3b8;
  --text: #f4f1ea; --muted: #a8acc9; --line: #2d3570; --heart: #ff4d79; --bad: #ff9a9a;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0 }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: #05070f }
body {
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden; color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; line-height: 1.3;
}
body::before { /* night sky; fixed layer instead of background-attachment (iOS) */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 4%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 3%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 9%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 11%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 15%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 19%, #fff5 50%, transparent 51%),
    radial-gradient(120% 50% at 50% 112%, #ff7a2f38, transparent 60%),
    linear-gradient(180deg, #0b1026, #12183a 60%, #1a1433);
}
body.noscroll { overflow: hidden }
button, input, select { font: inherit; color: inherit }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation }
button:disabled { cursor: default }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px }
a { color: var(--flame) }

.wrap {
  max-width: 480px; margin: 0 auto;
  /* --dock-h is measured from the fixed dock in app.js (includes its safe-area padding) */
  padding: calc(var(--sat) + 12px) max(16px, var(--sar)) calc(var(--dock-h, calc(var(--sab) + 200px)) + 20px) max(16px, var(--sal));
}

/* header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 2px 12px }
.brand { font-weight: 800; font-size: 17px; letter-spacing: -.01em; min-width: 0 }
.brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; margin-top: 1px }
.chip { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: #ff7a2f22; color: var(--flame); border: 1px solid #ff7a2f55; white-space: nowrap; flex: none }
.chip.green { background: #2fbf8f1f; color: var(--mint); border-color: #2fbf8f55 }
.chip.grey { background: #ffffff10; color: var(--muted); border-color: #ffffff22 }
.chip.red { background: #ff4d4d22; color: var(--bad); border-color: #ff4d4d55 }

.pill {
  width: max-content; margin: -4px auto 10px;
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px;
  background: #ffffff0d; border: 1px solid #ffffff1f; color: var(--muted);
  display: flex; gap: 6px; align-items: center;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--flame); animation: blink 1.2s infinite }
@keyframes blink { 50% { opacity: .25 } }

/* now playing */
.now {
  background: linear-gradient(160deg, #2a2f72, #1b2250); border: 1px solid #3a42902a; border-radius: 22px;
  padding: 14px; display: flex; gap: 12px; align-items: center; position: relative; min-height: 92px;
}
.now.dim { opacity: .6 }
.now .meta { flex: 1; min-width: 0; padding-right: 22px }
.art { width: 64px; height: 64px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 28px; overflow: hidden; background: #ffffff14 }
.art img { width: 100%; height: 100%; object-fit: cover; display: block }
.art.s { width: 44px; height: 44px; border-radius: 9px; font-size: 20px }
.a1 { background: linear-gradient(135deg, #ff4fd8, #6a3cff) } .a2 { background: linear-gradient(135deg, #ffb340, #ff5a2f) }
.a3 { background: linear-gradient(135deg, #2fbf8f, #1f6fff) } .a4 { background: linear-gradient(135deg, #ffe066, #ff9f1c) }
.a5 { background: linear-gradient(135deg, #7b5cff, #21d4fd) } .a6 { background: linear-gradient(135deg, #ff6b6b, #b2207a) }
.a7 { background: linear-gradient(135deg, #9be15d, #00b09b) } .a8 { background: linear-gradient(135deg, #f7797d, #fbd786) }
.t { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.now .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.ar { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.by { font-size: 11.5px; color: var(--flame); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.shout { font-size: 12px; color: var(--spark); margin-top: 3px; font-style: italic; overflow-wrap: anywhere }
.bar { height: 4px; background: #ffffff1a; border-radius: 4px; margin-top: 9px; overflow: hidden }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--flame)); transition: width .5s linear }
.times { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums }
.eq { position: absolute; top: 13px; right: 14px; display: flex; gap: 2px; align-items: flex-end; height: 14px }
.eq b { width: 3px; height: 4px; background: var(--flame); border-radius: 2px; animation: eq .9s ease-in-out infinite alternate }
.eq b:nth-child(2) { animation-delay: -.3s; animation-duration: .7s }
.eq b:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s }
.eq b:nth-child(4) { animation-delay: -.15s; animation-duration: .8s }
.eq.off b { animation: none; height: 3px; opacity: .5 }
@keyframes eq { from { height: 3px } to { height: 14px } }
.note { font-size: 11.5px; color: var(--muted); margin-top: 6px }

.banner {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: linear-gradient(90deg, #ff7a2f2a, #ffb34014);
  border: 1px solid #ff7a2f44; font-size: 13px; display: flex; gap: 8px; align-items: center;
}
.banner b { color: var(--spark) }

/* tabs + lists */
.tabs { display: flex; gap: 6px; margin: 14px 0 6px }
.tab { flex: 1; text-align: center; font-size: 13px; font-weight: 700; min-height: 40px; border-radius: 12px; background: #ffffff0b; color: var(--muted) }
.tab[aria-selected="true"] { background: #ffffff1c; color: #fff }
.tab .count { font-size: 11px; opacity: .7; margin-left: 3px }
.sect { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin: 12px 4px 6px; display: flex; justify-content: space-between; gap: 8px }
.sect span { font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 14px; min-height: 60px }
.item.req { background: #ffffff08; border: 1px solid #ffffff0d; margin-bottom: 6px }
.item .meta { flex: 1; min-width: 0 }
.item .t { font-size: 14px }
.item.dim { opacity: .5 }
.rank { font-size: 11px; font-weight: 800; color: var(--muted); width: 16px; text-align: center; flex: none }
.heart { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; font-size: 11.5px; color: var(--muted); font-weight: 700; border-radius: 12px; flex: none }
.heart .h { font-size: 21px; line-height: 1; filter: grayscale(1) opacity(.55); transition: transform .15s }
.heart.on .h { filter: none } .heart.on { color: var(--heart) }
.heart:active:not(:disabled) .h { transform: scale(1.3) }
.heart:disabled { opacity: .75 }
.heart.static { min-height: 0 }
.heart .you { font-size: 9.5px; color: var(--muted); font-weight: 700; margin-top: 1px }
.votes { display: flex; align-items: center; gap: 2px; flex: none }
.down { display: grid; place-items: center; min-width: 40px; min-height: 46px; border-radius: 12px; font-size: 19px; filter: grayscale(1) opacity(.5); flex: none }
.down.on { filter: none; background: #ff7a2f22; box-shadow: inset 0 0 0 1px #ff7a2f66 }
.down.static { min-width: 26px; min-height: 0; font-size: 15px; background: none; box-shadow: none }
.down:disabled { opacity: .6 }
.now .down-now { position: absolute; right: 10px; bottom: 10px; background: #ffffff10 }
.now .meta.room { padding-right: 46px }
.added { display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: #2fbf8f22; color: var(--mint) }
.hero { align-items: flex-start }
.ar.wrapline { white-space: normal; line-height: 1.35 }
.countdown { margin-top: 8px; font-size: 13px; color: var(--spark); font-weight: 600 }
.countdown b { color: #fff }
.hint.center { text-align: center; margin: 14px 4px 0 }
.lock { font-size: 10.5px; color: var(--mint); font-weight: 700; white-space: nowrap }
.eta { font-size: 11px; color: var(--muted); min-width: 36px; text-align: right; flex: none; font-variant-numeric: tabular-nums }
.empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 28px 12px; line-height: 1.5 }
.tag { font-size: 9.5px; font-weight: 800; padding: 2px 5px; border-radius: 5px; background: #ffffff1f; color: #cfd2ea; margin-left: 4px; vertical-align: 1px }
.tag.e { background: #ff4d4d33; color: var(--bad) }

.btn { font-size: 13px; font-weight: 800; padding: 0 14px; min-height: 40px; border-radius: 12px; background: var(--flame); color: #2a1200; white-space: nowrap; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px }
.btn.ghost { background: #ffffff12; color: var(--muted) }
.btn.out { background: transparent; border: 1px solid #ff7a2f88; color: var(--flame) }
.btn.bad { background: #ff4d4d22; color: var(--bad) }
.btn.good { background: #2fbf8f33; color: var(--mint) }
.btn:disabled { opacity: .55 }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: 12px; border-radius: 10px }

/* bottom dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 18px max(16px, var(--sar)) calc(var(--sab) + 12px) max(16px, var(--sal));
  background: linear-gradient(180deg, #0e143000, #0e1430f2 16px, #0e1430);
}
.dock > * { max-width: 448px; margin-left: auto; margin-right: auto }
.mebar { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; padding: 0 4px }
.mebar b { color: #fff; font-weight: 700 }
.mebar button { color: var(--flame); font-weight: 700; font-size: 12px; text-decoration: underline }
.reacts { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 10px; transition: opacity .3s }
.reacts button { flex: 1; height: 44px; border-radius: 14px; background: #ffffff10; border: 1px solid #ffffff14; font-size: 22px; transition: transform .12s }
.reacts button:active { transform: scale(.88) }
.reacts.cool { opacity: .5 }
.fab {
  width: 100%; min-height: 56px; border-radius: 18px; background: linear-gradient(90deg, var(--ember), var(--flame));
  color: #2a1200; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 30px #ff7a2f55; padding: 6px 14px; text-align: center;
}
.fab small { font-weight: 700; opacity: .7; font-size: 12.5px }
.fab.off { background: #ffffff14; color: var(--muted); box-shadow: none; font-size: 13.5px; font-weight: 700; border: 1px solid #ffffff1a }

/* sheets */
.overlay { position: fixed; inset: 0; z-index: 50; background: #05070fb3; display: flex; align-items: flex-end; justify-content: center }
.sheet {
  width: 100%; max-width: 480px; background: var(--sheet); border-top: 1px solid #ffffff22; border-radius: 24px 24px 0 0;
  padding: 14px max(16px, var(--sar)) calc(var(--sab) + 20px) max(16px, var(--sal)); box-shadow: 0 -20px 40px #0008;
  max-height: 100%; overflow-y: auto; animation: up .25s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0 } }
.grab { width: 40px; height: 5px; border-radius: 5px; background: #ffffff33; margin: 0 auto 12px }
.h2 { font-weight: 800; font-size: 20px }
.lead { color: var(--muted); font-size: 13.5px; margin-top: 4px }
.field {
  width: 100%; background: #ffffff10; border: 1px solid #ffffff22; border-radius: 12px; padding: 12px; font-size: 16px; color: #fff; margin: 10px 0; outline: none;
}
.field:focus { border-color: var(--flame) }
.field::placeholder { color: var(--muted) }
.label { font-size: 12px; color: var(--muted) }
.emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 14px }
.emojis button { aspect-ratio: 1; border-radius: 12px; background: #ffffff10; font-size: 22px; display: grid; place-items: center; min-height: 44px }
.emojis button[aria-pressed="true"] { background: #ff7a2f33; outline: 2px solid var(--flame) }
.big { width: 100%; height: 52px; border-radius: 15px; background: linear-gradient(90deg, var(--ember), var(--flame)); color: #2a1200; font-weight: 800; font-size: 16px }
.big:disabled { opacity: .5 }
.linkish { display: block; margin: 12px auto 0; color: var(--muted); font-size: 13px; padding: 6px 10px }
.quota { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 10px; justify-content: center; text-align: center; flex-wrap: wrap }
.quota b { color: #fff }
.quota i { width: 9px; height: 9px; border-radius: 50%; background: var(--flame); display: inline-block }
.quota i.used { background: #ffffff26 }

.full {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0b1026, #12183a 70%, #1a1433);
}
.full > * { width: 100%; max-width: 480px; margin: 0 auto }
.full header { display: flex; align-items: center; gap: 10px; padding: calc(var(--sat) + 10px) max(12px, var(--sar)) 4px max(12px, var(--sal)) }
.full header .h2 { flex: 1; font-size: 18px }
.x { width: 44px; height: 44px; border-radius: 14px; background: #ffffff10; font-size: 18px; flex: none }
.search {
  display: flex; gap: 8px; align-items: center; background: #ffffff12; border: 1px solid #ffffff22; border-radius: 14px; padding: 0 12px; margin: 8px 0 6px;
}
.search:focus-within { border-color: var(--flame) }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; padding: 12px 0; color: #fff }
.search input::placeholder { color: var(--muted) }
.hint { font-size: 12px; color: var(--muted); margin: 0 4px 8px }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 max(16px, var(--sar)) 12px max(16px, var(--sal)); overscroll-behavior: contain }
.full footer { padding: 10px max(16px, var(--sar)) calc(var(--sab) + 12px) max(16px, var(--sal)); border-top: 1px solid #ffffff14; background: #0e1430 }
.full footer .field { margin: 6px 0 0 }
.full footer .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 0 4px }
.full footer .row span { letter-spacing: 0; font-weight: 600; text-transform: none }

/* toasts + floating reactions */
.toasts { position: fixed; top: calc(var(--sat) + 10px); left: 0; right: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none }
.toast {
  width: 100%; max-width: 448px; padding: 12px 14px; border-radius: 14px; background: #2fbf8f; color: #062a1e; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px #0006; animation: drop .25s ease-out; pointer-events: auto; overflow-wrap: anywhere;
}
.toast.err { background: #ffb340; color: #2a1200 }
.toast.info { background: #2a2f72; color: #fff; border: 1px solid #ffffff22 }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .3s }
@keyframes drop { from { transform: translateY(-14px); opacity: 0 } }
.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden }
.floater { position: absolute; bottom: 110px; font-size: 34px; animation: floatUp var(--dur, 3s) ease-out forwards; will-change: transform, opacity }
@keyframes floatUp {
  0% { transform: translate(0, 0) scale(.6); opacity: 0 }
  10% { opacity: 1; transform: translate(0, -6vh) scale(1.1) }
  100% { transform: translate(var(--drift, 0px), -78vh) scale(.9) rotate(var(--rot, 0deg)); opacity: 0 }
}
@media (prefers-reduced-motion: reduce) {
  .floater { animation-duration: 1.2s }
  .eq b { animation: none; height: 8px }
  .sheet, .toast { animation: none }
}

/* ---------- DJ panel ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 }
.ctl { background: #ffffff0d; border: 1px solid #ffffff14; border-radius: 14px; padding: 12px; font-size: 12px; color: var(--muted); min-width: 0 }
.ctl b { display: block; font-size: 15px; color: #fff; margin-top: 3px; overflow-wrap: anywhere }
.ctl .hd { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 26px }
.switch { width: 46px; height: 28px; border-radius: 28px; background: #ffffff26; position: relative; flex: none; transition: background .2s }
.switch::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left .2s }
.switch[aria-checked="true"] { background: var(--pine) }
.switch[aria-checked="true"]::after { left: 21px }
.stepper { display: flex; align-items: center; gap: 8px; margin-top: 4px }
.stepper button { width: 36px; height: 36px; border-radius: 10px; background: #ffffff14; font-size: 18px; font-weight: 800 }
.stepper output { font-size: 18px; font-weight: 800; color: #fff; min-width: 18px; text-align: center }
.select { width: 100%; margin-top: 4px; background: #ffffff14; border: 1px solid #ffffff22; border-radius: 10px; padding: 8px; font-size: 15px; color: #fff }
.select option { background: var(--card); color: #fff }
.ctrls { display: flex; gap: 6px; flex: none }
.ctrls .btn { width: 46px; padding: 0; font-size: 18px }
.drow { background: #ffffff08; border: 1px solid #ffffff0d; border-radius: 14px; padding: 9px; margin-bottom: 6px }
.drow .item { padding: 0; min-height: 0 }
.drow .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; justify-content: flex-end }
.drow .shout { background: #ffffff08; border: 1px dashed #ffffff26; border-radius: 10px; padding: 7px 9px; margin-top: 8px; font-style: normal }
.drow .shout.hid { opacity: .5; text-decoration: line-through }
.st { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: #ffffff14; color: var(--muted); text-transform: uppercase; letter-spacing: .04em }
.st.pending { background: #ff7a2f22; color: var(--flame) } .st.sent { background: #2fbf8f22; color: var(--mint) }
.st.playing { background: #ff4d7933; color: #ff9ab4 } .st.removed { background: #ff4d4d22; color: var(--bad) }
.st.added { background: #2fbf8f22; color: var(--mint) }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px }
.stats .ctl { padding: 10px 8px }
.stats .ctl b { font-size: 18px }
.hot { color: var(--bad); font-weight: 800 }
.btn.alert { background: #ff4d4d; color: #fff }
.select.sm { width: auto; max-width: 100%; margin: 0; padding: 0 6px; min-height: 34px; font-size: 12.5px }
.warn { margin: 0 0 10px; background: linear-gradient(90deg, #ff4d4d2a, #ff4d4d10); border-color: #ff4d4d55 }
.err-line { color: var(--bad); font-size: 12px; margin-top: 6px; overflow-wrap: anywhere }
.keybox { margin-top: 30vh }
