:root {
  color-scheme: light;
  --cream: #fff9fc;
  --blush: #fff0f6;
  --sky-light: #e8f4ff;
  --ink: #4a3f55;
  --muted: #9b8fa8;
  --pink: #ff8fab;
  --pink-deep: #f06292;
  --lavender: #b8a9ff;
  --mint: #7ed4b8;
  --gold: #ffc857;
  --gold-hot: #ffb347;
  --coral: #ff8fab;
  --seafoam: #6ecfc0;
  --violet: #c9b8ff;
  --success: #5ecfaa;
  --danger: #ff7b7b;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(255, 143, 171, 0.28);
  --glow-pink: 0 8px 32px rgba(255, 143, 171, 0.28);
  --glow-soft: 0 12px 40px rgba(184, 168, 220, 0.18);
  --font-display: "Lilita One", cursive;
  --font-body: "Outfit", system-ui, sans-serif;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(165deg, var(--cream) 0%, var(--blush) 38%, var(--sky-light) 100%);
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

#game-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.light-shaft {
  position: absolute;
  width: 55vw;
  height: 120vh;
  top: -20vh;
  opacity: 0.35;
  filter: blur(50px);
  background: linear-gradient(180deg, rgba(255, 200, 220, 0.55), transparent 70%);
  animation: shaft-drift 18s ease-in-out infinite alternate;
}

.light-shaft--left {
  left: -10vw;
  transform: rotate(-8deg);
}

.light-shaft--right {
  right: -15vw;
  transform: rotate(10deg);
  animation-delay: -6s;
  background: linear-gradient(180deg, rgba(200, 220, 255, 0.5), transparent 72%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hud-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
}

.hud-shell.screen-enter {
  animation: screen-in 520ms var(--ease-out) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shaft-drift {
  from { transform: translateY(0) rotate(-8deg); }
  to { transform: translateY(30px) rotate(-4deg); }
}

/* Typography */
.kicker {
  margin: 0 0 6px;
  color: var(--pink-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.title-display {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--pink-deep);
  text-shadow: 0 4px 20px rgba(255, 143, 171, 0.25);
}

.title-quest {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 8.5vw, 2.75rem);
  line-height: 1;
  color: var(--pink-deep);
  text-shadow: 0 2px 12px rgba(255, 143, 171, 0.2);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  box-shadow: var(--glow-soft);
}

.panel-pad {
  padding: 22px 20px;
}

.stack {
  display: grid;
  gap: 14px;
}

.loading-panel {
  margin-top: 28vh;
  padding: 28px 22px;
  text-align: center;
}

.loader-ring {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(255, 143, 171, 0.2);
  border-top-color: var(--pink);
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* HUD chrome */
.hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 4px 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--panel-border);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill--live {
  color: var(--mint);
}

.pill--dry {
  color: #c97b00;
  border-color: rgba(255, 200, 87, 0.45);
  background: #fffbeb;
}

.pill--score {
  color: var(--pink-deep);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.pill--score::before {
  content: "✦";
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Game header / timer */
.hunt-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--panel-border);
  box-shadow: var(--glow-pink);
}

.hunt-header.final-push {
  border-color: rgba(255, 123, 123, 0.45);
  animation: urgency-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(255, 123, 123, 0.2);
}

@keyframes urgency-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 123, 123, 0.15); }
  50% { box-shadow: 0 0 36px rgba(255, 123, 123, 0.3); }
}

.team-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.timer-ring {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}

.timer-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.timer-ring circle {
  fill: none;
  stroke-width: 4;
}

.timer-ring .track {
  stroke: rgba(255, 143, 171, 0.25);
}

.timer-ring .fill {
  stroke: url(#timer-gradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 400ms var(--ease-out);
}

.timer-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--pink-deep);
  letter-spacing: 0.04em;
}

.hunt-header.final-push .timer-value {
  color: var(--danger);
  animation: timer-flash 1s ease-in-out infinite;
}

@keyframes timer-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.urgency-banner {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff0f0;
  border: 1px solid rgba(255, 123, 123, 0.35);
  color: #c44;
  font-size: 0.88rem;
  line-height: 1.35;
}

.urgency-banner strong {
  color: #a22;
}

/* Treasure map progress */
.treasure-trail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-bottom: 4px;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.treasure-trail::-webkit-scrollbar {
  display: none;
}

.trail-node {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 143, 171, 0.3);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  transition: transform 200ms var(--ease-pop), border-color 200ms, box-shadow 200ms;
}

.trail-node:active {
  transform: scale(0.92);
}

.trail-node.active {
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--pink-deep));
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: var(--glow-pink);
  transform: scale(1.08);
}

.trail-node.done {
  color: white;
  background: linear-gradient(145deg, var(--mint), #5ecfaa);
  border-color: rgba(255, 255, 255, 0.5);
}

.trail-node.done::after {
  content: "✓";
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
}

/* Quest card */
.quest-card {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 48vh;
  padding: 22px 20px 18px;
  margin-bottom: 12px;
  overflow: hidden;
}

.quest-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.15), transparent 68%);
  pointer-events: none;
}

.quest-card.complete {
  border-color: rgba(94, 207, 170, 0.45);
  box-shadow: 0 0 24px rgba(94, 207, 170, 0.15);
}

.quest-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stage-tag {
  color: var(--lavender);
}

.quest-prompt {
  margin: 0;
  font-size: clamp(1.05rem, 4.5vw, 1.28rem);
  line-height: 1.35;
  color: var(--ink);
}

.loot-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 240, 246, 0.7);
  border: 1px dashed rgba(255, 143, 171, 0.35);
}

.loot-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink);
}

.loot-item::before {
  content: "◇";
  flex-shrink: 0;
  color: var(--pink);
  font-size: 0.7rem;
  margin-top: 4px;
}

.complete-badge {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(126, 212, 184, 0.15);
  border: 1px solid rgba(94, 207, 170, 0.4);
  color: #2a8f6e;
}

.complete-badge strong {
  font-size: 1.05rem;
}

.quest-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.quest-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  transition: transform 160ms var(--ease-pop), box-shadow 160ms, filter 160ms;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--pink-deep));
  box-shadow: var(--glow-pink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  min-height: 62px;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-capture {
  min-height: 68px;
  font-size: 1.2rem;
}

.btn-capture::before {
  content: "📷";
  font-size: 1.1rem;
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--panel-border);
}

.btn-ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--panel-border);
  min-height: 46px;
  font-size: 0.92rem;
}

.btn-full {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
  transform: none !important;
}

.link-btn {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.link-btn--host {
  color: var(--pink-deep);
}

/* Forms */
.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 143, 171, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 1.02rem;
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(155, 143, 168, 0.7);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.18);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%239b8fa8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.file-input {
  width: 100%;
  min-height: 56px;
  padding: 14px;
  border: 2px dashed rgba(255, 209, 102, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(4, 11, 20, 0.4);
  color: var(--muted);
  font-size: 0.92rem;
}

/* Join hero */
.join-hero {
  text-align: center;
  padding-top: 8px;
}

.join-hero .title-display {
  font-size: clamp(2.8rem, 13vw, 4rem);
  background: linear-gradient(180deg, var(--pink-deep) 10%, var(--lavender) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.join-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 240, 246, 0.95);
  border: 1px solid rgba(255, 143, 171, 0.35);
  color: var(--pink-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.join-badge::before {
  content: "🫧";
}

/* Camera capture */
.capture-screen {
  display: grid;
  gap: 16px;
}

.capture-hero--slots {
  min-height: 160px;
}

.labeled-slots--inline {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.labeled-slots--inline::-webkit-scrollbar {
  display: none;
}

.labeled-slots--inline .labeled-slot {
  flex: 0 0 84px;
  width: 84px;
}

.labeled-slots--inline .slot-thumb {
  width: 84px;
  height: 84px;
}

.labeled-slots--inline .slot-label {
  font-size: 0.64rem;
  line-height: 1.2;
  min-height: 2.4em;
}

.slot-file {
  display: none;
}

.slot-thumb img {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.slot-clear {
  z-index: 3;
}


.labeled-slot {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.labeled-slot.active .slot-thumb {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.22);
}

.labeled-slot.filled .slot-thumb {
  border-style: solid;
}

.slot-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 2px dashed rgba(255, 143, 171, 0.38);
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.slot-thumb--camera {
  width: 100%;
  padding: 0;
  cursor: pointer;
  transition: transform 140ms var(--ease-pop), border-color 140ms;
}

.slot-thumb--camera:active {
  transform: scale(0.97);
}

.slot-thumb--filled {
  width: 100%;
}

.slot-cam-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--pink-deep);
}

.slot-cam-icon svg {
  width: 34%;
  height: 34%;
}

.slot-cam-card {
  width: min(100%, 420px);
  padding: 0;
  overflow: hidden;
  background: #101010;
  border: 0;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.slot-cam-close {
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 0;
}

.slot-cam-frame {
  width: 100%;
  min-height: min(72vh, 640px);
}

.slot-cam-frame .cam-feed--slot {
  display: block;
  width: 100%;
  height: min(72vh, 640px);
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  background: #000;
}

.slot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-plus {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--pink);
}

.slot-label {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted);
}

.slot-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
  border: 0;
  cursor: pointer;
}

.quest-nav--single {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.quest-nav-hint {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 0 4px;
}

.capture-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 240, 246, 0.9), rgba(232, 244, 255, 0.85));
  border: 1px solid var(--panel-border);
}

.capture-frame {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
}

.capture-frame--live {
  width: 100%;
}

.capture-frame--live .cam-feed {
  display: block;
  width: 100%;
}

.capture-frame--live .cam-shutter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2;
}

.cam-feed {
  width: 100%;
  max-height: 52vh;
  border-radius: var(--radius-md);
  background: #f0e8ee;
  object-fit: cover;
  border: 2px solid rgba(255, 143, 171, 0.35);
  box-shadow: var(--glow-pink);
}

.cam-feed[hidden] {
  display: none;
}

.cam-big {
  width: min(72vw, 200px);
  height: min(72vw, 200px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--pink-deep));
  box-shadow: var(--glow-pink);
  transition: transform 180ms var(--ease-pop), box-shadow 180ms;
}

.cam-big:active {
  transform: scale(0.96);
}

.cam-shutter {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.cam-shutter svg {
  width: 26px;
  height: 26px;
}

.cam-shutter:active {
  transform: translateX(-50%) scale(0.94);
}

.capture-frame--live .cam-shutter:active {
  transform: translateX(-50%) scale(0.94);
}

.cam-flip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(74, 63, 85, 0.2);
}

.cam-flip[hidden] {
  display: none;
}

.cam-flip svg {
  width: 22px;
  height: 22px;
}

.cam-big svg {
  width: 42%;
  height: 42%;
}

.upload-plus {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 16px rgba(184, 168, 220, 0.2);
  cursor: pointer;
  transition: transform 160ms var(--ease-pop);
}

.upload-plus:active {
  transform: scale(0.92);
}

.upload-plus input {
  display: none;
}

.upload-plus span {
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  color: var(--pink-deep);
}

.capture-fields {
  display: grid;
  gap: 10px;
}

.field-compact {
  display: grid;
  gap: 4px;
}

.field-ask {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.input-compact {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 143, 171, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 0.92rem;
  outline: none;
}

.input-compact:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 143, 171, 0.15);
}

.input-compact::placeholder {
  color: rgba(155, 143, 168, 0.65);
}

.thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.thumb {
  position: relative;
  width: 64px;
  height: 64px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255, 143, 171, 0.45);
}

.thumb button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
}

.preview {
  display: none;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: rgba(255, 240, 246, 0.6);
}

.preview.show {
  display: block;
}

video.preview {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius-md);
  background: #f0e8ee;
}

video.preview[hidden] {
  display: none;
}

/* End screen */
.end-screen {
  text-align: center;
}

.final-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
}

.final-score-num {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--pink-deep);
  text-shadow: var(--glow-pink);
}

.final-score-den {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--muted);
}

.award-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.award-card {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--panel-border);
  text-align: left;
}

.award-emoji {
  font-size: 1.6rem;
}

.award-card strong {
  font-size: 0.92rem;
  color: var(--ink);
}

/* Feedback (collapsed) */
.feedback-drawer {
  margin-top: 8px;
}

.feedback-drawer summary {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.feedback-drawer summary::-webkit-details-marker {
  display: none;
}

.feedback-body {
  padding: 14px 4px 4px;
  display: grid;
  gap: 12px;
}

.mini-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--panel-border);
}

.mini-card strong {
  color: var(--pink-deep);
  font-size: 0.85rem;
}

.mini-card p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Party connections & host side quests */
.connection-meter {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 143, 171, 0.12);
  border: 1px dashed rgba(255, 143, 171, 0.45);
  font-size: 0.88rem;
  color: var(--ink);
}

.connection-meter__icon {
  font-size: 1.1rem;
}

.meet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: rgba(36, 24, 32, 0.42);
  opacity: 0;
  transition: opacity 200ms ease;
}

.meet-overlay.show {
  opacity: 1;
}

.meet-card {
  width: min(100%, 380px);
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-lg);
}

.meet-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.host-section {
  display: grid;
  gap: 10px;
}

.host-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--pink-deep);
}

.side-quest-grid {
  display: grid;
  gap: 10px;
}

.side-quest-btn {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.side-quest-btn strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--pink-deep);
}

.side-quest-btn span {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.35;
}

.side-quest-btn:active {
  transform: scale(0.99);
}

.btn-start-hunt {
  width: 100%;
  min-height: 132px;
  padding: 28px 20px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 11vw, 3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  border-radius: var(--radius-lg);
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--pink-deep));
  box-shadow: var(--glow-pink);
  transition: transform 180ms var(--ease-pop), box-shadow 180ms;
}

.btn-start-hunt:active {
  transform: scale(0.98);
}

.host-pill {
  margin: 0;
}

.host-live-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(126, 212, 184, 0.16);
  border: 1px solid rgba(126, 212, 184, 0.45);
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.host-guest-list {
  display: grid;
  gap: 8px;
}

.host-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--panel-border);
}

.host-guest-name {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-guest-score {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--pink-deep);
}

.host-guest-empty {
  margin: 0;
  line-height: 1.45;
}

.side-quest-btn--solo {
  padding: 18px 16px;
}

/* Toast & effects */
.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 50;
  display: none;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  box-shadow: var(--glow-pink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-align: center;
}

.toast.show {
  display: block;
  animation: toast-in 480ms var(--ease-pop);
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.shake {
  animation: shake 460ms ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.confetti {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 60;
  animation: confetti-fall 1s ease-out forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(520deg);
    opacity: 0;
  }
}

.quest-card.quest-pop {
  animation: quest-pop 600ms var(--ease-pop);
}

@keyframes quest-pop {
  0% { transform: scale(0.96); opacity: 0.5; }
  60% { transform: scale(1.02); }
  100% { transform: none; opacity: 1; }
}

.hud-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
