/* ==========================================================================
   Guest app styles. Mobile first; the content column maxes out at 640px.
   ========================================================================== */

:root {
  --nav-height: 68px;
  --top-height: 52px;
  --glow: 0 0 0 3px var(--accent), 0 0 28px rgba(255, 122, 26, 0.55);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body { overscroll-behavior-y: none; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
button { -webkit-user-select: none; user-select: none; }

/* ---------- Floating background bats ---------- */
.spooky-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.spooky-layer span {
  position: absolute; top: 110%; font-size: 1.6rem; opacity: 0.13;
  animation: drift calc(18s + var(--i) * 3s) linear infinite;
  animation-delay: calc(var(--i) * -4.5s);
}
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  50%  { transform: translate(30px, -60vh) rotate(8deg); }
  100% { transform: translate(-20px, -125vh) rotate(-8deg); }
}

/* ---------- Top bar ---------- */
.top-bar {
  position: sticky; top: 0; z-index: 20; height: var(--top-height);
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  background: rgba(18, 12, 28, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { font-family: var(--font-display); color: var(--accent); font-size: 1.45rem; letter-spacing: 0.05em; }
.top-actions { display: flex; align-items: center; gap: 0.5rem; }
.live-pill {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; font-weight: 900;
  letter-spacing: 0.1em; color: var(--slime); padding: 0.2rem 0.55rem; border-radius: 999px;
  background: rgba(126, 227, 107, 0.12);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slime); animation: pulse 1.6s ease-in-out infinite; }
.live-pill.offline { color: var(--text-muted); background: var(--bg-sunken); }
.live-pill.offline .live-dot { background: var(--text-muted); animation: none; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.75); } }
.icon-button { background: var(--bg-sunken); border: 1px solid var(--border); padding: 0.35rem 0.55rem; font-size: 1.05rem; }
.icon-button:hover { background: var(--bg-raised); }

/* ---------- Layout ---------- */
.screen-container {
  position: relative; z-index: 1; max-width: 640px; margin: 0 auto;
  padding: 1rem 16px calc(var(--nav-height) + var(--safe-bottom) + 1.5rem);
}
.screen { animation: screen-in 0.35s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: center; gap: 0.25rem;
  padding: 0.4rem 0.5rem calc(0.4rem + var(--safe-bottom));
  background: rgba(18, 12, 28, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.nav-button {
  flex: 1; max-width: 160px; flex-direction: column; gap: 0.1rem; padding: 0.45rem 0.25rem;
  background: transparent; color: var(--text-muted); font-size: 0.75rem; border-radius: 14px;
}
.nav-button:hover { background: var(--bg-raised); }
.nav-button.active { color: var(--accent); background: rgba(255, 122, 26, 0.12); }
.nav-icon { font-size: 1.35rem; line-height: 1.1; }
.nav-button.active .nav-icon { animation: nav-bounce 0.4s ease-out; }
.nav-avatar { width: 26px; height: 26px; object-fit: contain; }
@keyframes nav-bounce { 40% { transform: translateY(-5px) scale(1.15); } }

.brewing-pill {
  position: fixed; z-index: 15; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px);
  background: var(--bg-raised); color: var(--text); border: 1px solid var(--slime);
  box-shadow: 0 0 20px rgba(126, 227, 107, 0.35); font-size: 0.85rem; white-space: nowrap;
  animation: pill-glow 2s ease-in-out infinite;
}
.brewing-pill:hover { background: var(--bg-raised); }
@keyframes pill-glow { 50% { box-shadow: 0 0 6px rgba(126, 227, 107, 0.2); } }

/* ---------- Shared bits ---------- */
.hero { text-align: center; padding: 0.5rem 0 1.25rem; }
.hero-icon { font-size: 4rem; line-height: 1.1; }
.floaty { animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-10px) rotate(-3deg); } }
.bounce { animation: nav-bounce 0.8s ease-in-out infinite; }
.empty { text-align: center; padding: 3rem 1rem; }
.banner {
  background: rgba(255, 122, 26, 0.1); border: 1px solid rgba(255, 122, 26, 0.4);
  border-radius: 12px; padding: 0.6rem 0.9rem; font-size: 0.9rem; text-align: center;
}
.banner-closed { border-color: var(--border); background: var(--bg-sunken); color: var(--text-muted); }
.fine-print { font-size: 0.8rem; text-align: center; }
.big-button { width: 100%; font-size: 1.1rem; padding: 0.95rem 1.4rem; box-shadow: 0 6px 24px rgba(255, 122, 26, 0.35); }
.ghost-button { background: var(--bg-sunken); color: var(--text); border: 1px solid var(--border); }
.ghost-button:hover { background: var(--bg-raised); border-color: var(--accent); }
.button-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.button-row > * { flex: 1; }
.card + .card, .card + .banner, .banner + .card { margin-top: 0.9rem; }

.pop { animation: pop 0.45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 40% { transform: scale(1.08); } }
.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.bump { animation: bump 0.6s cubic-bezier(.3, 1.8, .5, 1); color: var(--slime) !important; }
@keyframes bump { 30% { transform: scale(1.5); } }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--slime); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; z-index: 60; top: calc(var(--top-height) + 8px); left: 50%; transform: translateX(-50%);
  width: min(92vw, 440px); display: flex; flex-direction: column; gap: 0.45rem; pointer-events: none;
}
.toast {
  pointer-events: auto; padding: 0.75rem 1rem; border-radius: 14px; font-weight: 800; font-size: 0.95rem;
  background: var(--bg-raised); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.45);
  animation: toast-in 0.45s cubic-bezier(.3, 1.5, .5, 1);
}
.toast-hype { background: linear-gradient(135deg, #ff7a1a, #ff4d6d); color: #1a0d00; border: 0; }
.toast-warn { border-color: var(--danger); }
.toast-leaving { animation: toast-out 0.3s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-20px) scale(0.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-14px) scale(0.95); } }

.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

/* ---------- Join ---------- */
.join-form { display: flex; flex-direction: column; gap: 1rem; }
.step { position: relative; padding-top: 1.4rem; }
.step-number {
  position: absolute; top: -12px; left: 14px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 900;
}
.step-title { font-size: 1.05rem; font-weight: 900; color: var(--text); margin: 0 0 0.5rem; display: block; }
.join-form input[type="text"] { font-size: 1.15rem; padding: 0.8rem 0.9rem; }
.field-hint { font-size: 0.85rem; margin: 0.4rem 0 0; color: var(--text-muted); min-height: 1.3em; }
.field-hint.good { color: var(--slime); font-weight: 800; }
.field-hint.bad { color: var(--danger); font-weight: 800; }
.photo-button { display: block; width: 100%; padding: 0; background: none; border-radius: 16px; }
.photo-button:hover { background: none; }
.photo-frame {
  position: relative; aspect-ratio: 3 / 4; max-height: 52vh; margin: 0 auto; border-radius: 16px;
  border: 2px dashed var(--border); background: var(--bg-sunken); color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; overflow: hidden;
  font-weight: 700; font-size: 0.9rem; transition: border-color 0.2s;
}
.photo-button:hover .photo-frame { border-color: var(--accent); }
.silhouette { font-size: 6rem; opacity: 0.35; filter: grayscale(1); }
.photo-frame.has-photo { border-style: solid; border-color: var(--accent); }
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.retake {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.65);
  color: #fff; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.8rem;
}
.photo-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.photo-actions > * { flex: 1; }
.summon-button.ready { animation: ready-wiggle 2.4s ease-in-out infinite; }
@keyframes ready-wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-2deg) scale(1.03); } 90% { transform: rotate(2deg) scale(1.03); } 95% { transform: rotate(-1deg); } }

/* ---------- Summoning ---------- */
.summoning-screen { text-align: center; }
.summoning-screen h1 { margin-top: 0.5rem; overflow-wrap: anywhere; }
.cauldron { position: relative; width: 190px; height: 190px; margin: 1rem auto 0; }
.cauldron-glow {
  position: absolute; inset: 15%; border-radius: 50%;
  background: radial-gradient(circle, rgba(126,227,107,.55), rgba(126,227,107,0) 70%);
  animation: glow-breathe 1.8s ease-in-out infinite;
}
@keyframes glow-breathe { 50% { transform: scale(1.25); opacity: 0.6; } }
.cauldron-pot { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6.5rem; animation: wobble 2.2s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.bubble {
  position: absolute; bottom: 45%; left: calc(30% + var(--i) * 6%); width: 12px; height: 12px; border-radius: 50%;
  background: var(--slime); opacity: 0; animation: bubble 2.4s ease-in infinite; animation-delay: calc(var(--i) * 0.33s);
}
@keyframes bubble { 0% { opacity: 0.9; transform: translateY(0) scale(0.5); } 100% { opacity: 0; transform: translateY(-110px) scale(1.4); } }
.summon-line { font-weight: 800; font-size: 1.1rem; min-height: 1.6em; }
.progress { height: 14px; border-radius: 999px; background: var(--bg-sunken); border: 1px solid var(--border); overflow: hidden; margin: 1rem 0 0.5rem; }
.progress-fill {
  height: 100%; width: 0; border-radius: inherit; transition: width 0.25s linear;
  background: repeating-linear-gradient(-45deg, var(--slime) 0 12px, #5fc94d 12px 24px);
  background-size: 34px 34px; animation: stripes 0.8s linear infinite;
}
@keyframes stripes { to { background-position: 34px 0; } }
.queue-note { min-height: 1.5em; font-size: 0.9rem; }
.summon-tip { margin-top: 1.25rem; }
.summon-tip p { margin-top: 0; }

/* ---------- Reveal ---------- */
.reveal {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow: hidden;
  background: rgba(8, 4, 14, 0.94); animation: fade-in 0.3s ease-out; padding: 16px;
}
.reveal-leaving { animation: fade-out 0.3s ease-in forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.reveal-rays {
  position: absolute; width: 200vmax; height: 200vmax; left: 50%; top: 42%; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,122,26,.18) 0deg 10deg, transparent 10deg 20deg);
  animation: spin 24s linear infinite; mask-image: radial-gradient(circle, #000 0%, transparent 45%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 45%);
}
.reveal-content { position: relative; text-align: center; max-width: 420px; width: 100%; }
.reveal-kicker { font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slime); margin: 0; animation: fade-in 0.5s 0.3s both; }
.reveal-character { height: min(46vh, 440px); }
.reveal-character img {
  width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 30px rgba(255,122,26,.6));
  animation: rise 1.1s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes rise { 0% { opacity: 0; transform: translateY(80px) scale(0.2) rotate(-25deg); filter: brightness(4) blur(6px); } 60% { filter: brightness(1.6); } }
.reveal-name { font-size: clamp(2.2rem, 10vw, 3.4rem); margin: 0.25rem 0; animation: rise 0.8s 0.6s cubic-bezier(.2, 1.4, .4, 1) both; overflow-wrap: anywhere; }
.reveal-note { color: var(--text-muted); animation: fade-in 0.5s 1s both; }
.reveal-actions { display: flex; flex-direction: column; gap: 0.5rem; animation: fade-in 0.5s 1.2s both; }

/* ---------- Chips ---------- */
.chips {
  display: flex; gap: 0.45rem; overflow-x: auto; scrollbar-width: none; padding: 0.25rem 2px 0.6rem;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; scroll-snap-align: center; padding: 0.5rem 0.9rem; font-size: 0.9rem;
  background: var(--bg-raised); color: var(--text); border: 1px solid var(--border);
}
.chip:hover { background: var(--bg-raised); border-color: var(--accent); }
.chip.selected { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip.closed:not(.selected) { opacity: 0.6; }
.chip-emoji { font-size: 1.1rem; }
.chip-marker { font-size: 0.8rem; }

/* ---------- Vote ---------- */
.ballot-progress {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0.9rem; border-radius: 14px; background: var(--bg-raised); border: 1px solid var(--border); margin-bottom: 0.75rem;
}
.ballot-progress.complete { border-color: var(--slime); box-shadow: 0 0 18px rgba(126,227,107,.25); }
.ballot-pips { display: flex; gap: 0.3rem; }
.pip {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem;
  background: var(--bg-sunken); border: 2px dashed var(--border); filter: grayscale(1); opacity: 0.55;
  transition: all 0.3s cubic-bezier(.3, 1.6, .5, 1);
}
.pip.filled { filter: none; opacity: 1; border: 2px solid var(--accent); background: rgba(255,122,26,.18); transform: scale(1.08); }
.ballot-count { font-size: 0.85rem; font-weight: 800; color: var(--text-muted); text-align: right; }
.complete .ballot-count { color: var(--slime); }

.challenge-header { display: flex; align-items: center; gap: 0.75rem; margin: 0.25rem 0 0.75rem; animation: screen-in 0.3s ease-out; }
.challenge-header h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); margin: 0; line-height: 1.1; }
.challenge-header p { margin: 0.2rem 0 0; font-size: 0.92rem; }
.challenge-emoji { font-size: 2.8rem; animation: floaty 3s ease-in-out infinite; }
.search { margin-bottom: 0.75rem; font-size: 1rem; }
.vote-screen .banner { margin-bottom: 0.75rem; }

.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 520px) { .character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.character-card { position: relative; }
.character-pick {
  width: 100%; display: flex; flex-direction: column; padding: 0; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #2a1d42, #1a1229); color: var(--text); border: 2px solid var(--border);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.character-pick:hover { background: linear-gradient(180deg, #33244f, #1d142e); border-color: #4d3a70; }
.character-pick:active { transform: scale(0.96); }
.character-art {
  display: block; aspect-ratio: 3 / 4; width: 100%; min-height: 0; overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(185,140,255,.28), transparent 65%);
}
.character-art img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 6px; transition: transform 0.3s; }
.character-name { padding: 0.45rem 0.5rem 0.6rem; font-weight: 900; font-size: 0.95rem; overflow-wrap: anywhere; line-height: 1.2; }
.badge {
  position: absolute; top: 8px; left: 8px; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 900;
}
.badge-me { background: var(--slime); color: #0d2508; }
.badge-pick { display: none; background: var(--accent); color: var(--accent-text); left: auto; right: 8px; top: auto; bottom: 46px; }
.character-zoom {
  position: absolute; top: 6px; right: 6px; padding: 0.3rem 0.45rem; font-size: 0.85rem;
  background: rgba(0,0,0,.45); border: 0; border-radius: 10px;
}
.character-zoom:hover { background: rgba(0,0,0,.7); }
.character-card.picked .character-pick { border-color: var(--accent); box-shadow: var(--glow); }
.character-card.picked .character-art img { transform: scale(1.05); }
.character-card.picked .badge-pick { display: block; animation: pop 0.45s cubic-bezier(.3, 1.6, .5, 1); }
.character-card.is-me .character-pick { opacity: 0.75; }

/* ---------- Lightbox / dialogs ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 4, 14, 0.88); animation: fade-in 0.2s ease-out;
}
.lightbox-body {
  position: relative; width: min(100%, 420px); max-height: 92vh; overflow-y: auto; text-align: center;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 22px; padding: 1.25rem;
  animation: pop 0.4s cubic-bezier(.3, 1.6, .5, 1);
}
.lightbox-body img { max-width: 100%; max-height: 55vh; object-fit: contain; }
.lightbox-body h2 { font-size: 2rem; margin: 0.25rem 0 0.75rem; overflow-wrap: anywhere; }
.lightbox-body .ghost-button { margin-top: 0.5rem; width: 100%; }
.lightbox-close { position: absolute; top: 10px; right: 10px; background: var(--bg-sunken); color: var(--text); padding: 0.35rem 0.65rem; z-index: 1; }
.celebrate h2 { font-size: 2.4rem; }

/* ---------- Leaderboard ---------- */
.totals {
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem;
}
.totals strong { color: var(--text); font-size: 1.15rem; }
.board-title { text-align: center; font-size: clamp(2rem, 9vw, 2.8rem); margin: 0.25rem 0 0.75rem; }
.leaderboard-screen .banner { margin-bottom: 0.75rem; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.podium-spot {
  flex: 1; max-width: 190px; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0; background: none; color: var(--text); border-radius: 16px; min-width: 0;
}
.podium-spot:hover { background: none; }
.podium-spot img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.place-1 img { filter: drop-shadow(0 0 22px rgba(255, 196, 0, 0.55)); }
.podium-medal { font-size: 1.6rem; line-height: 1; }
.place-1 .podium-medal { font-size: 2.3rem; animation: floaty 2.2s ease-in-out infinite; }
.podium-name { font-weight: 900; font-size: 0.9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-votes { font-size: 0.8rem; color: var(--text-muted); font-weight: 800; }
.podium-block {
  width: 100%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.6rem;
  border-radius: 12px 12px 4px 4px; margin-top: 0.25rem; color: rgba(0,0,0,.55);
}
.place-1 .podium-block { height: 92px; background: linear-gradient(180deg, #ffd34d, #e0a400); }
.place-2 .podium-block { height: 64px; background: linear-gradient(180deg, #e3e3ef, #a8a8c0); }
.place-3 .podium-block { height: 44px; background: linear-gradient(180deg, #e6a26a, #b46b35); }
.place-1 { order: 2; } .place-2 { order: 1; } .place-3 { order: 3; }
.podium-spot.is-me .podium-name { color: var(--slime); }
.crowned { animation: crowned 1s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes crowned { 30% { transform: scale(1.12) rotate(-3deg); } 60% { transform: scale(1.05) rotate(2deg); } }

.board-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.board-row {
  display: grid; grid-template-columns: 2.4rem 44px minmax(0, 1fr) minmax(50px, 30%) 2.2rem; align-items: center; gap: 0.5rem;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 14px; padding: 0.35rem 0.6rem;
}
.board-row.is-me { border-color: var(--slime); box-shadow: 0 0 14px rgba(126,227,107,.2); }
.board-rank { font-weight: 900; color: var(--text-muted); }
.board-row img { width: 44px; height: 54px; object-fit: contain; }
.board-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-bar { height: 10px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.board-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ffb347); transition: width 0.6s cubic-bezier(.2,.9,.3,1.2); }
.board-votes { font-weight: 900; text-align: right; display: inline-block; }

/* ---------- Me ---------- */
.me-hero { position: relative; height: min(48vh, 420px); }
.me-aura {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(80%, 360px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,122,26,.35), transparent 65%); animation: glow-breathe 3s ease-in-out infinite;
}
.me-character { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.me-hero.brewing .me-character { filter: grayscale(.7) blur(2px); opacity: 0.6; }
.me-brewing {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-weight: 900; background: rgba(0,0,0,.6); padding: 1rem 1.25rem; border-radius: 16px;
}
.me-name { text-align: center; font-size: clamp(2.2rem, 10vw, 3.2rem); margin: 0.25rem 0 0.75rem; overflow-wrap: anywhere; }
.me-screen .banner { margin-bottom: 0.9rem; }
.me-screen h2 { font-size: 1.5rem; }
.stats-total { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.stats-total strong { font-family: var(--font-display); font-size: 3rem; color: var(--accent); font-weight: 400; }
.stats-list { list-style: none; margin: 0; padding: 0; }
.stats-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--border); }
.stats-list li.leading { color: #ffd34d; }
.stats-emoji { font-size: 1.3rem; }
.stats-name { flex: 1; font-weight: 800; }
.stats-rank { font-weight: 900; }
.toggles { display: flex; flex-direction: column; gap: 0.6rem; }
.toggle { display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; color: var(--text); margin: 0; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }

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

/* ---------- Photo check feedback ---------- */
.photo-tip { margin: -0.25rem 0 0.6rem; }
.photo-frame.rejected { border-color: var(--danger); border-style: solid; }
.photo-frame.rejected img { filter: grayscale(0.8) brightness(0.6); }
.photo-feedback {
  margin: 0.75rem 0 0; padding: 0.7rem 0.9rem; border-radius: 12px; font-weight: 800;
  background: rgba(255, 90, 110, 0.12); border: 1px solid var(--danger); color: var(--text);
}

/* ---------- Waiting room ---------- */
.waiting-screen { text-align: center; }
.waiting-screen h1 { overflow-wrap: anywhere; margin-top: 0.5rem; }
.door { position: relative; width: 160px; height: 170px; margin: 1rem auto 0; }
.door-emoji { font-size: 7rem; display: inline-block; animation: door-rattle 2.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes door-rattle { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(-3deg); } 80% { transform: rotate(3deg); } 85% { transform: rotate(-2deg); } 90% { transform: rotate(2deg); } }
.knock {
  position: absolute; font-family: var(--font-display); color: var(--accent); font-size: 1.3rem; opacity: 0;
  animation: knock 2.4s ease-out infinite;
}
.knock-1 { top: 10px; left: -24px; animation-delay: 1.75s; }
.knock-2 { top: 40px; right: -30px; animation-delay: 2s; }
@keyframes knock { 0% { opacity: 0; transform: scale(0.6); } 10% { opacity: 1; transform: scale(1.1); } 30% { opacity: 0; transform: scale(1) translateY(-10px); } 100% { opacity: 0; } }
.waiting-screen .card p { margin-top: 0; }
