/* ============================================================
   SCAVENGER HUNT — Retro Neon Arcade Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Variables --- */
:root {
  --bg:          #08070a;
  --bg-card:     #0f0d15;
  --bg-elevated: #1a1320;
  --bg-input:    #150f1e;
  --border:      rgba(255,255,255,.1);
  --border-soft: rgba(255,255,255,.06);
  --primary:     #ff006e;
  --primary-dk:  #cc0059;
  --primary-glow:rgba(255,0,110,.18);
  --amber:       #f7ff00;
  --amber-glow:  rgba(247,255,0,.12);
  --green:       #39ff14;
  --green-glow:  rgba(57,255,20,.12);
  --red:         #ff2d55;
  --red-glow:    rgba(255,45,85,.15);
  --blue:        #00d4ff;
  --purple:      #bc00ff;
  --pink:        #ff006e;
  --text:        #f0ede8;
  --text-2:      #888888;
  --text-3:      #444444;
  --text-muted:  #888888;
  --radius:      8px;
  --radius-sm:   6px;
  --radius-xs:   4px;
  --tab-h:       60px;
  --nav-h:       52px;
  --shadow:      0 0 40px rgba(0,0,0,.8);
  --shadow-sm:   0 0 12px rgba(0,0,0,.6);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.15) 2px,
    rgba(0,0,0,.15) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: .4;
  pointer-events: none;
  z-index: 999;
}

img, video { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Typography --- */
h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.6rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 700; }
h4 { font-size: .9rem; font-weight: 600; }
p  { font-size: .95rem; }
small { font-size: .8rem; }

/* --- Layout --- */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 18px; }
.page { padding-bottom: calc(var(--tab-h) + 20px); }
.section { padding: 20px 0 6px; }
.row   { display: flex; align-items: center; gap: 8px; }
.col   { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.mt-4  { margin-top: 4px; }  .mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-2); }
.text-dim    { color: var(--text-3); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-primary{ color: var(--primary); }
.text-amber  { color: var(--amber); }
.full-width  { width: 100%; }
.hidden { display: none !important; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* --- Utility --- */
.pixel { font-family: 'Press Start 2P', monospace; }
.neon-yellow { color: var(--amber); text-shadow: 0 0 8px var(--amber), 0 0 20px var(--amber); }

/* --- Divider --- */
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
  pointer-events: none;
}
.btn:active { transform: scale(.97); }
.btn:hover::after { background: rgba(255,255,255,.05); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-primary  { background: var(--primary); color: #fff; text-shadow: none; box-shadow: 0 0 20px rgba(255,0,110,.4), 0 0 40px rgba(255,0,110,.2); }
.btn-primary:hover { background: var(--primary-dk); }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-green    { background: var(--green); color: #000; box-shadow: 0 0 16px rgba(57,255,20,.4); }
.btn-red      { background: var(--red);   color: #fff; box-shadow: 0 0 16px rgba(255,45,85,.4); }
.btn-ghost    { background: transparent; color: var(--text-2); padding: 8px 10px; }
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }
.btn-amber    { background: var(--amber); color: #000; }
.btn-sm  { padding: 7px 14px; font-size: .82rem; border-radius: var(--radius-xs); }
.btn-lg  { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; border-radius: var(--radius-xs); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset;
}
.card-sm  { padding: 12px; border-radius: var(--radius-sm); }
.card + .card { margin-top: 8px; }
.card-glow { box-shadow: 0 0 0 1px var(--primary-glow), 0 8px 32px rgba(0,0,0,.4); }
.card-hover { transition: border-color .2s, box-shadow .2s; cursor: pointer; }
.card-hover:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-glow); }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-primary { background: rgba(255,0,110,.15); color: var(--primary); }
.badge-green   { background: rgba(57,255,20,.12);  color: var(--green); }
.badge-red     { background: var(--red-glow);      color: var(--red); }
.badge-blue    { background: rgba(0,212,255,.15);  color: var(--blue); }
.badge-purple  { background: rgba(188,0,255,.15);  color: var(--purple); }
.badge-amber   { background: rgba(247,255,0,.12);  color: var(--amber); }
.badge-yellow  { background: rgba(247,255,0,.12);  color: var(--amber); }
.badge-muted   { background: rgba(136,136,136,.1); color: var(--text-2); }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23888888' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-hint  { font-size: .8rem; color: var(--text-2); line-height: 1.4; }
.form-error { font-size: .82rem; color: var(--red); font-weight: 500; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }

/* Option items (radio/checkbox styled) */
.option-group { display: flex; flex-direction: column; gap: 6px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.option-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.option-item input { accent-color: var(--primary); width: 17px; height: 17px; flex-shrink: 0; }
.option-item .option-label { font-size: .92rem; font-weight: 500; }

/* File upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.upload-zone input[type="file"] { display: none; }
.upload-zone-icon { font-size: 1.8rem; margin-bottom: 8px; line-height: 1; }

/* Progress bar */
.progress { height: 5px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }

/* --- Config warning banner --- */
.config-warning {
  background: rgba(255,45,85,.12);
  border: 1px solid rgba(255,45,85,.3);
  color: var(--red);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

/* --- Top Nav --- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,7,10,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,0,110,.2);
  padding: 0 16px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-subtitle { font-size: .8rem; color: var(--text-2); font-weight: 500; }

/* --- Bottom Tab Bar --- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: var(--tab-h);
  background: rgba(8,7,10,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: .45rem;
  font-family: 'Press Start 2P', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .15s;
  padding: 6px 2px;
  position: relative;
}
.tab-item svg { width: 20px; height: 20px; transition: color .15s; }
.tab-item.active { color: var(--primary); filter: drop-shadow(0 0 8px var(--primary)); }
.tab-item.active svg { filter: drop-shadow(0 0 6px rgba(255,0,110,.5)); }
.tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--red);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* --- Tab Panels --- */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* Chat panel needs flex layout override */
#panel-chat.active { display: flex; }

/* --- Modal (bottom sheet) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding-top: 8px;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 0 auto 16px;
}
.modal-header {
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-body   { padding: 18px 20px; }
.modal-footer {
  padding: 14px 20px 28px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 10px;
}

/* --- Challenge cards --- */
.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
  margin-bottom: 10px;
}
.challenge-card.unlocked  { border-color: rgba(57,255,20,.5); box-shadow: 0 0 12px rgba(57,255,20,.15); }
.challenge-card.locked    { opacity: .5; }
.challenge-card.performative { border-color: rgba(188,0,255,.5); box-shadow: 0 0 12px rgba(188,0,255,.15); }
.challenge-card-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.challenge-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.challenge-icon.perf  { background: rgba(188,0,255,.1); border-color: rgba(188,0,255,.2); }
.challenge-icon.loc   { background: rgba(57,255,20,.08); border-color: rgba(57,255,20,.15); }
.challenge-card-body  { padding: 0 16px 12px; font-size: .88rem; color: var(--text-2); line-height: 1.5; }
.challenge-card-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  background: rgba(247,255,0,.1);
  border: 1px solid rgba(247,255,0,.3);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--amber);
}

/* Lock overlay */
.locked-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 10px;
  text-align: center;
}
.lock-ring {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}

/* --- Score bar --- */
.score-bar {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.score-big {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber), 0 0 30px var(--amber), 0 0 60px rgba(247,255,0,.4);
  letter-spacing: .02em;
}

/* --- Map --- */
#team-map, #admin-map {
  width: 100%;
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* --- Submissions --- */
.submission-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: flex-start;
}
.submission-item:last-child { border-bottom: none; }
.submission-thumb {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-3);
}

/* --- Leaderboard --- */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  margin-bottom: 6px;
  transition: background .15s;
}
.lb-rank { font-size: 1rem; font-weight: 800; width: 28px; text-align: center; flex-shrink: 0; }
.lb-rank.gold { color: var(--amber); text-shadow: 0 0 8px rgba(247,255,0,.6), 0 0 20px rgba(247,255,0,.3); }
.lb-name { flex: 1; font-weight: 600; font-size: .92rem; }
.lb-score { font-weight: 800; color: var(--amber); font-size: 1rem; text-shadow: 0 0 8px rgba(247,255,0,.5); }

/* --- Stats row --- */
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}
.stat-value { font-size: 1.7rem; font-weight: 900; color: var(--primary); line-height: 1; letter-spacing: -.02em; }
.stat-label { font-size: .68rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; }

/* --- Toasts --- */
#toast-container {
  position: fixed;
  bottom: calc(var(--tab-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}
.toast {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .22s ease;
  pointer-events: all;
  backdrop-filter: blur(12px);
}
.toast-success { background: rgba(57,255,20,.15);  border: 1px solid rgba(57,255,20,.35);  color: var(--green); }
.toast-error   { background: rgba(255,45,85,.15);  border: 1px solid rgba(255,45,85,.35);  color: var(--red); }
.toast-info    { background: rgba(255,0,110,.15);  border: 1px solid rgba(255,0,110,.35);  color: var(--primary); }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* --- Spinner / loading --- */
.spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  z-index: 999;
  font-family: 'Press Start 2P', monospace;
}

/* --- Hero (landing) --- */
.hero {
  padding: 48px 18px 32px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(188,0,255,.18) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero-emoji { font-size: 2.2rem; margin-bottom: 20px; }
.hero h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(.8rem, 3.5vw, 1rem);
  line-height: 1.8;
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber), 0 0 30px var(--amber), 3px 3px 0 rgba(0,0,0,.6);
  animation: flicker 6s infinite;
  margin-bottom: 16px;
  letter-spacing: .04em;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--primary-glow);
  border: 1px solid rgba(255,0,110,.3);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.hero-tagline {
  font-family: 'Press Start 2P', monospace;
  font-size: .52rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  letter-spacing: .05em;
  margin-top: 8px;
  line-height: 1.8;
}

/* Venmo inline note */
.venmo-note {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0 4px;
}
.venmo-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Keep .venmo-box hidden / gone — retained for compat */
.venmo-box { display: none; }
.venmo-amount { display: none; }
.venmo-btn { display: none; }

/* Step indicator */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-2);
  flex-shrink: 0;
  transition: all .2s;
  z-index: 1;
}
.step-dot.active { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 12px var(--primary-glow); }
.step-dot.done   { border-color: var(--green); background: var(--green); color: #000; }
.step-line { flex: 1; height: 2px; background: var(--border); transition: background .2s; }
.step-line.done  { background: var(--green); }

/* --- Admin tabs --- */
.admin-tabs-top {
  display: flex;
  overflow-x: auto;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-soft);
  scrollbar-width: none;
  gap: 0;
  background: rgba(8,7,10,.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
}
.admin-tabs-top::-webkit-scrollbar { display: none; }
.admin-tab-btn {
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 600;
  padding: 10px 14px 11px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  cursor: pointer;
}
.admin-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-panel.hidden { display: none; }

/* --- Participant rows --- */
.participant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.participant-row:last-child { border-bottom: none; }
.participant-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 1px solid rgba(255,0,110,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
  color: var(--primary);
  text-transform: uppercase;
}

/* Tag pills */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.tag-sober   { background: rgba(57,255,20,.1);  color: var(--green);  border-color: rgba(57,255,20,.2); }
.tag-alcohol { background: rgba(0,212,255,.1);  color: var(--blue);   border-color: rgba(0,212,255,.2); }
.tag-single  { background: rgba(255,0,110,.1);  color: var(--pink);   border-color: rgba(255,0,110,.2); }
.tag-diet    { background: rgba(188,0,255,.1);  color: var(--purple); border-color: rgba(188,0,255,.2); }
.tag-team    { background: var(--primary-glow); color: var(--primary);border-color: rgba(255,0,110,.25); }

/* --- Chat --- */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-h) - var(--tab-h));
  padding-bottom: 0;
}
.chat-channels {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-card);
  flex-shrink: 0;
}
.chat-channel-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 700;
  padding: 10px 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  position: relative;
}
.chat-channel-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 2px 0;
}
.msg-row.mine { flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
  margin-bottom: 2px;
}
.msg-bubble-group { display: flex; flex-direction: column; gap: 2px; max-width: 75%; }
.msg-row.mine .msg-bubble-group { align-items: flex-end; }
.msg-sender { font-size: .72rem; color: var(--text-2); font-weight: 600; margin-bottom: 2px; padding: 0 4px; }
.msg-bubble {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px;
  font-size: .88rem;
  line-height: 1.45;
  word-break: break-word;
  max-width: 100%;
}
.msg-row.mine .msg-bubble {
  background: var(--primary-glow);
  border-color: rgba(255,0,110,.3);
  border-radius: 14px 14px 4px 14px;
  color: var(--text);
}
.msg-bubble.admin-msg { background: rgba(247,255,0,.1); border-color: rgba(247,255,0,.2); }
.msg-time { font-size: .65rem; color: var(--text-3); padding: 0 4px; margin-top: 2px; }
.msg-date-divider {
  text-align: center;
  font-size: .72rem;
  color: var(--text-3);
  font-weight: 600;
  margin: 10px 0 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input-bar textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 13px;
  font-size: .9rem;
  resize: none;
  max-height: 100px;
  min-height: 40px;
  outline: none;
  line-height: 1.45;
  transition: border-color .2s;
}
.chat-input-bar textarea:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}
.chat-send-btn:active { transform: scale(.93); }
.chat-send-btn:hover { background: var(--primary-dk); }
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  gap: 8px;
  font-size: .9rem;
}

/* --- People tab --- */
.team-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 10px;
}
.team-color-bar {
  width: 4px; height: 20px;
  border-radius: 99px;
  flex-shrink: 0;
}
.people-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.people-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.people-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
  transition: background .15s;
}
.people-member:last-child { border-bottom: none; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: .9rem; }
.member-phone {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 1px;
  letter-spacing: .01em;
}
.member-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* --- Voting --- */
.star-rating { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; }
.star-btn {
  background: none; border: none;
  font-size: 1.5rem; color: var(--border);
  cursor: pointer; padding: 2px;
  transition: color .1s, transform .1s;
  line-height: 1;
}
.star-btn:active { transform: scale(1.25); }
.star-btn.filled { color: var(--amber); }
.star-label { font-size: .78rem; color: var(--text-2); margin-left: 6px; }

/* Performative note */
.perf-note {
  background: rgba(188,0,255,.08);
  border: 1px solid rgba(188,0,255,.2);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: .83rem;
  color: var(--purple);
  line-height: 1.45;
  margin-bottom: 12px;
}
.admin-perf-note {
  background: rgba(188,0,255,.08);
  border: 1px solid rgba(188,0,255,.2);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: .83rem;
  color: var(--purple);
  margin-bottom: 12px;
}

/* Score reveal banner */
.reveal-banner {
  background: linear-gradient(135deg, rgba(247,255,0,.15), rgba(255,0,110,.1));
  border: 1px solid rgba(247,255,0,.4);
  border-radius: var(--radius);
  padding: 11px 16px;
  text-align: center;
  font-weight: 700;
  font-size: .88rem;
  color: var(--amber);
  margin-bottom: 12px;
  box-shadow: 0 0 16px rgba(247,255,0,.1);
}

/* Invite code section */
.invite-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.invite-code-row:last-child { border-bottom: none; }
.invite-code-value {
  font-family: 'Courier New', monospace;
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 3px 10px;
  border-radius: 5px;
  user-select: all;
  letter-spacing: .06em;
}

/* Reveal pw */
.reveal-pw {
  font-family: monospace;
  font-size: .9rem;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 3px 10px;
  border-radius: 5px;
  user-select: all;
}
.copy-btn {
  background: none; border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background .15s;
}
.copy-btn:hover { background: var(--primary-glow); }

/* Auth page */
.auth-toggle { text-align: center; font-size: .88rem; color: var(--text-2); margin-top: 14px; }
.auth-toggle a { color: var(--primary); font-weight: 600; }

/* Nav extras */
.nav-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary), 0 0 20px var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}

/* People avatar alias */
.people-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 1px solid rgba(255,0,110,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
  color: var(--primary);
  text-transform: uppercase;
}

/* Venmo button alias */
.btn-venmo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #0070ba;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  font-size: .95rem;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-venmo:hover { opacity: .9; color: #0070ba; }

/* Invite code used state */
.invite-code-value.used {
  color: var(--text-3);
  background: var(--bg-elevated);
  text-decoration: line-through;
  opacity: .6;
}

/* Responsive */
@media (min-width: 480px) {
  .container { padding: 0 24px; }
}

/* Desktop: kill the noise texture — it's illegible at large sizes */
@media (min-width: 769px) {
  body::after { display: none; }
}

/* Scrollbar global */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* --- Animations --- */
@keyframes flicker {
  0%,94%,100% { opacity:1; }
  95% { opacity:.85; }
  96% { opacity:1; }
  97% { opacity:.7; }
  98% { opacity:1; }
}
@keyframes neon-pulse {
  0%,100% { text-shadow: 0 0 8px currentColor, 0 0 20px currentColor; }
  50%      { text-shadow: 0 0 14px currentColor, 0 0 35px currentColor, 0 0 60px currentColor; }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
