:root {
  --bg: #17122b;
  --panel: #241b45;
  --panel2: #2e2260;
  --ink: #f4f1ff;
  --muted: #bdb2e8;
  --purple: #a855f7;
  --purple-glow: #c084fc;
  --blue: #38bdf8;
  --blue-glow: #7dd3fc;
  --gold: #ffb020;
  --good: #4ade80;
  --bad: #f87171;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
}
main { max-width: 680px; margin: 0 auto; padding: 16px 16px 90px; }
.loading { color: var(--muted); text-align: center; margin-top: 60px; }
a { color: var(--blue-glow); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 2px solid var(--panel2);
  background: #1d1739; color: var(--ink); font-size: 16px; font-family: inherit; margin: 4px 0 12px;
}
label { font-weight: 800; font-size: 14px; color: var(--muted); }
.btn {
  display: inline-block; border: 0; border-radius: 12px; padding: 13px 20px;
  background: var(--purple); color: #fff; font-weight: 900; font-size: 16px; text-decoration: none;
}
.btn.blue { background: #0284c7; }
.btn.ghost { background: transparent; border: 2px solid var(--purple); color: var(--ink); }
.btn.gold { background: var(--gold); color: #17122b; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.err { color: var(--bad); min-height: 22px; font-weight: 700; }
.hint { color: var(--muted); font-size: 15px; }
.card {
  background: var(--panel); border-radius: 18px; padding: 20px; margin: 14px 0;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.card h2, .card h3 { margin-top: 0; }

/* ---- header / wordmark ---- */
#topbar { background: #0f0b20; padding: 10px 16px; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; max-width: 680px; margin: 0 auto; }
.brand .panel {
  background: #0b0817; border-radius: 14px; padding: 4px 18px 8px; display: inline-block;
  border: 1px solid #33265e;
}
.wordmark { font-family: 'Sacramento', cursive; font-size: 40px; line-height: 1; white-space: nowrap; }
.wordmark .meet { color: #e9d5ff; text-shadow: 0 0 6px var(--purple-glow), 0 0 16px var(--purple), 0 0 30px var(--purple); }
.wordmark .now { color: #e0f2fe; text-shadow: 0 0 6px var(--blue-glow), 0 0 16px var(--blue), 0 0 30px var(--blue); }
.tagline { color: var(--muted); font-size: 13px; font-weight: 700; }

/* ---- mascot ---- */
.mascot-row { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0; }
.mascot {
  width: 84px; height: 84px; object-fit: contain; flex: 0 0 auto;
  transform-origin: 50% 90%;
  animation: mascot-wave 2.6s ease-in-out infinite;
}
.mascot.small { width: 52px; height: 52px; }
@keyframes mascot-wave {
  0%, 100% { transform: rotate(-8deg) translateX(-2.5px) translateY(0); }
  50% { transform: rotate(9deg) translateX(2.5px) translateY(-1.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .mascot { animation: none; }
}
.bubble {
  background: #fff; color: #241b45; border-radius: 16px; padding: 12px 16px;
  position: relative; font-weight: 700; flex: 1;
}
.bubble::before {
  content: ''; position: absolute; left: -8px; top: 26px; width: 16px; height: 16px;
  background: #fff; transform: rotate(45deg); border-radius: 3px;
}
.cheer .mascot { animation-duration: 1.1s; }

/* ---- nav tabs ---- */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; background: #0f0b20; z-index: 20;
  display: flex; justify-content: center; gap: 2px; padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
nav.tabs button {
  background: transparent; border: 0; color: var(--muted); font-weight: 900; font-size: 14px;
  padding: 10px 12px; border-radius: 10px;
}
nav.tabs button.active { background: var(--panel2); color: #fff; }
nav.tabs .dot { color: var(--gold); }

/* ---- profile cards / deck ---- */
.photo { width: 100%; border-radius: 14px; display: block; }
.avatar {
  width: 100%; aspect-ratio: 1.2; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--purple), #0284c7); font-size: 72px; font-weight: 900; color: #fff;
}
.avatar.sm { width: 54px; height: 54px; aspect-ratio: auto; font-size: 22px; border-radius: 50%; flex: 0 0 auto; }
img.avatar-img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.badge-verified { color: var(--gold); font-weight: 900; }
.tag {
  display: inline-block; background: var(--panel2); border-radius: 999px; padding: 3px 10px;
  font-size: 13px; font-weight: 800; color: var(--muted); margin: 2px 2px 2px 0;
}
.tag.sample { background: #7c2d12; color: #fed7aa; }
.tag.shared { background: #14532d; color: #bbf7d0; }
.q { color: var(--muted); font-weight: 800; font-size: 14px; margin: 12px 0 2px; }
.deck-actions { display: flex; gap: 12px; margin-top: 16px; }
.deck-actions .btn { flex: 1; font-size: 18px; padding: 16px; }
.pass-btn { background: #3f3f46 !important; }

/* ---- availability grid ---- */
table.grid { border-collapse: collapse; width: 100%; }
table.grid th, table.grid td { padding: 6px 4px; text-align: center; font-size: 14px; }
table.grid th { color: var(--muted); }
.slotbox {
  width: 100%; padding: 9px 2px; border-radius: 9px; border: 2px solid var(--panel2);
  background: #1d1739; color: var(--muted); font-weight: 800; font-size: 13px;
}
.slotbox.on { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ---- chat ---- */
.thread { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; background: var(--panel2); align-self: flex-start; }
.msg.mine { background: var(--purple); align-self: flex-end; }
.msg .when { display: block; font-size: 11px; color: rgba(255,255,255,.65); margin-top: 4px; }
.match-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--panel); border: 0; border-radius: 14px; padding: 12px; color: var(--ink); margin: 8px 0; }
.match-row .last { color: var(--muted); font-size: 14px; }

/* ---- video picker ---- */
.videogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.videogrid button { background: var(--panel2); border: 3px solid transparent; border-radius: 12px; padding: 4px; color: var(--ink); font-weight: 800; font-size: 13px; }
.videogrid button.sel { border-color: var(--gold); }
.videogrid img { width: 100%; border-radius: 8px; display: block; }
video.preview { width: 100%; border-radius: 14px; margin: 10px 0; background: #000; }

.price { font-size: 22px; font-weight: 900; }
.strike { text-decoration: line-through; color: var(--muted); }
.date-status { font-weight: 900; }
.date-status.confirmed { color: var(--good); }
.date-status.pending { color: var(--gold); }
footer.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 0 30px; }
