:root {
  --ink: #070a12;
  --ink-2: #0e1422;
  --ink-3: #161e31;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4efe6;
  --muted: rgba(244, 239, 230, 0.62);
  --faint: rgba(244, 239, 230, 0.38);
  --gold: #e8c07a;
  --gold-2: #f6dca6;
  --gold-3: #c8923f;
  --teal: #5ee0c8;
  --rose: #ff7a8a;
  --good: #7ee0a1;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
kbd {
  font: 600 11px var(--sans);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  margin-left: 6px;
  opacity: 0.75;
}
[hidden] { display: none !important; }

/* ───────────── Background ───────────── */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-photo {
  position: absolute; inset: -6%;
  background-size: cover; background-position: center;
  filter: blur(38px) saturate(1.25) brightness(0.55);
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 2.2s ease;
  animation: kenburns 28s ease-in-out infinite alternate;
}
.bg-photo.show { opacity: 1; }
@keyframes kenburns {
  from { transform: scale(1.05) translate(0, 0); }
  to { transform: scale(1.18) translate(-2%, 1.5%); }
}
.aurora { position: absolute; inset: 0; mix-blend-mode: screen; opacity: 0.55; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.5;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: radial-gradient(circle, #c8923f 0%, transparent 65%); left: -15vmax; top: -20vmax; }
.aurora span:nth-child(2) { background: radial-gradient(circle, #2b6f8f 0%, transparent 65%); right: -20vmax; top: 10vmax; animation-duration: 32s; animation-delay: -8s; }
.aurora span:nth-child(3) { background: radial-gradient(circle, #6d3f8f 0%, transparent 65%); left: 20vmax; bottom: -30vmax; animation-duration: 38s; animation-delay: -16s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(0.95); }
}
#dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.07; animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); }
}
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(4, 6, 12, 0.85) 100%); }

/* ───────────── Topbar ───────────── */
.topbar {
  backdrop-filter: blur(10px); -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent);
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(7, 10, 18, 0.7), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; font: 600 22px var(--serif); letter-spacing: 0.01em; }
.brand em { font-style: italic; color: var(--gold); font-weight: 400; margin-left: 2px; }
.brand-mark { width: 38px; height: 38px; transition: transform 0.8s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-20deg) scale(1.08); }
nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 10px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; transition: 0.25s; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--glass); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: 0.25s; }
.icon-btn:hover { background: var(--glass); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .off, .icon-btn.muted .on { display: none; }
.icon-btn.muted .off { display: block; }

/* ───────────── Screens ───────────── */
main { position: relative; z-index: 1; }
.screen { overflow-x: clip; display: none; padding: 8px clamp(16px, 4vw, 48px) 60px; }
.screen.active { display: block; animation: screenIn 0.7s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ───────────── Buttons ───────────── */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
  transition: transform 0.35s var(--spring), box-shadow 0.35s, background 0.3s, opacity 0.3s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:hover:not(:disabled) svg { transform: translateX(3px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-lg { padding: 17px 28px; font-size: 16px; }
.btn-gold {
  color: #1a1206;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-3));
  box-shadow: 0 10px 30px -8px rgba(232, 192, 122, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-gold:hover:not(:disabled)::after { transform: translateX(120%); transition: transform 0.9s var(--ease); }
.btn-gold:hover:not(:disabled) { box-shadow: 0 16px 40px -8px rgba(232, 192, 122, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost { background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(12px); }
.btn-ghost:hover:not(:disabled) { background: var(--glass-2); }
.btn-ghost.used { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.4); }

/* ───────────── Home ───────────── */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px;
  min-height: min(78vh, 760px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(232, 192, 122, 0.7); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(232, 192, 122, 0.6); } 80%, 100% { box-shadow: 0 0 0 12px rgba(232, 192, 122, 0); } }
.display {
  font: 400 clamp(46px, 7.4vw, 104px) / 0.98 var(--serif);
  letter-spacing: -0.03em; margin: 0 0 26px;
}
.display i { font-style: italic; }
.display i .w > span {
  background: linear-gradient(100deg, var(--gold-2), var(--gold) 40%, #ffb38a 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.08em 0.1em 0; margin: 0 -0.08em -0.1em 0; }
.split .w > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; }
@keyframes rise { to { transform: none; } }
.lede { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: var(--muted); max-width: 540px; margin: 0 0 34px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 46px; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font: 600 30px var(--serif); }
.hero-stats span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--faint); }
.fade-up { opacity: 0; animation: fadeUp 0.9s var(--ease) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-globe { position: relative; aspect-ratio: 1; width: 100%; max-width: 680px; justify-self: center; }
#globe { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 1.6s ease; cursor: grab; }
#globe.ready { opacity: 1; }
#globe:active { cursor: grabbing; }
.globe-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(232, 192, 122, 0.25), transparent 65%); filter: blur(40px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: 0.7; } }
.globe-tag {
  position: absolute; z-index: 2; left: 50%; bottom: 4%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px;
  background: rgba(14, 20, 34, 0.7); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px; white-space: nowrap; transition: opacity 0.5s, transform 0.5s var(--ease);
}
.globe-tag img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.globe-tag b { display: block; font-weight: 700; }
.globe-tag span { color: var(--gold); font-weight: 700; }
.globe-tag.swap { opacity: 0; transform: translate(-50%, 8px); }
.globe-label { font: 600 12px var(--sans); background: rgba(14, 20, 34, 0.9); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }

/* Daily challenge hero card */
.daily {
  position: relative; overflow: hidden; min-height: 320px; margin-top: 36px; padding: 40px 44px; border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--ink-2); box-shadow: var(--shadow);
  opacity: 0; animation: fadeUp 0.9s var(--ease) 0.15s forwards;
}
.daily-img { position: absolute; z-index: 0; inset: -4%; background: center / cover; animation: kenburns 30s ease-in-out infinite alternate; }
.daily::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(7, 10, 18, 0.96) 0%, rgba(7, 10, 18, 0.88) 38%, rgba(7, 10, 18, 0.3) 72%, rgba(7, 10, 18, 0.1)); }
.daily > *:not(.daily-img) { position: relative; z-index: 2; }
.daily .eyebrow { margin-bottom: 14px; }
.daily h2 { max-width: 620px; margin: 0 0 12px; font: 400 clamp(30px, 3.6vw, 50px)/1.05 var(--serif); letter-spacing: -0.02em; }
.daily h2 i { font-style: italic; color: var(--gold-2); }
.daily-sub { margin: 0 0 24px; color: var(--muted); font-weight: 600; max-width: 560px; }
.daily-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Streak: home card block */
.streak-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 22px; padding: 14px 18px; max-width: 620px;
  border-radius: 18px; background: rgba(7, 10, 18, 0.55); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line);
}
.streak-card .sk-note { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 700; }
.sk-note.risk { color: #ffb38a; animation: riskPulse 2s ease-in-out infinite; }
.sk-note.frozen { color: #9fd8ff; }
.sk-note.lost { color: var(--muted); }
@keyframes riskPulse { 50% { opacity: 0.6; } }
.sk-count { display: flex; align-items: center; gap: 8px; }
.sk-count b { font: 800 30px var(--serif); line-height: 1; }
.sk-count span { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); max-width: 44px; line-height: 1.2; }
.flame { width: 30px; height: 30px; color: rgba(255, 255, 255, 0.2); }
.streak-card.hot .flame, .streak-panel .flame { color: #ff9a3c; filter: drop-shadow(0 0 10px rgba(255, 140, 60, 0.7)); animation: flicker 2.4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.06, 0.97) rotate(-2deg); } 60% { transform: scale(0.97, 1.05) rotate(2deg); } }
.sk-week { display: flex; gap: 8px; justify-content: center; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wk i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line); }
.wk.played i { background: linear-gradient(135deg, #ffb35c, #ff7a3c); color: #1a1206; box-shadow: 0 0 12px rgba(255, 140, 60, 0.5); }
.wk.frozen i { background: linear-gradient(135deg, #bfe6ff, #6cb8ff); color: #0b2440; }
.wk.is-today i { box-shadow: inset 0 0 0 2px var(--gold); }
.wk.is-today.played i { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(255, 140, 60, 0.6); }
.wk small { font-size: 10px; font-weight: 800; color: var(--faint); }
.sk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sk-side small { font-size: 11px; font-weight: 700; color: var(--faint); }
.sk-fz { display: inline-flex; gap: 4px; }
.fz { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.fz.on { color: #0b2440; background: linear-gradient(135deg, #d8f0ff, #7cc4ff); box-shadow: 0 0 10px rgba(124, 196, 255, 0.5); }
.fz.earned { animation: earned 1.2s var(--spring); }
@keyframes earned { 0% { transform: scale(0) rotate(-90deg); } 60% { transform: scale(1.5) rotate(10deg); } 100% { transform: none; } }

/* Streak: summary panel */
.streak-panel {
  display: flex; align-items: center; justify-content: center; gap: 34px; width: fit-content; margin: -14px auto 34px; padding: 18px 28px;
  border-radius: 22px; background: linear-gradient(135deg, rgba(255, 140, 60, 0.12), rgba(255, 90, 60, 0.04)); box-shadow: inset 0 0 0 1px rgba(255, 150, 80, 0.35);
  text-align: left; opacity: 0; animation: fadeUp 0.8s var(--ease) 0.9s forwards;
}
.streak-panel.milestone { background: linear-gradient(135deg, rgba(246, 220, 166, 0.25), rgba(255, 120, 60, 0.12)); box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 50px -10px rgba(255, 170, 80, 0.6); }
.streak-panel.bumped .sp-num b { animation: bump 0.6s var(--spring); }
.sp-main { display: flex; align-items: center; gap: 10px; }
.sp-flame .flame { width: 64px; height: 64px; }
.sp-flame.grow .flame { animation: flameGrow 1.4s var(--spring) 2.5s both, flicker 2.4s ease-in-out 3.9s infinite; }
@keyframes flameGrow { 0% { transform: scale(0.7); } 50% { transform: scale(1.35); filter: drop-shadow(0 0 26px rgba(255, 140, 60, 1)); } 100% { transform: scale(1); } }
.sp-num b { display: block; font: 800 58px/1 var(--serif); color: #ffb35c; font-variant-numeric: tabular-nums; }
.sp-num span { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.sp-side { display: flex; flex-direction: column; gap: 8px; }
.sp-next { margin: 0; font-weight: 800; color: var(--gold-2); }
.sp-meta { margin: 0; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.sp-cal { display: grid; grid-template-columns: repeat(14, 12px); gap: 4px; }
.cd { width: 12px; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); }
.cd.played { background: linear-gradient(135deg, #ffb35c, #ff7a3c); }
.cd.frozen { background: linear-gradient(135deg, #bfe6ff, #6cb8ff); }
.cd.is-today { box-shadow: 0 0 0 1.5px var(--gold); }
.row-streak { margin-left: 8px; font-size: 12px; font-weight: 800; color: #ffb35c; white-space: nowrap; }

.streak-pill { padding: 9px 14px; border-radius: 999px; background: rgba(255, 122, 80, 0.15); box-shadow: inset 0 0 0 1px rgba(255, 140, 90, 0.4); font-weight: 700; font-size: 14px; }

.section-title { font: 400 clamp(28px, 3vw, 40px) var(--serif); letter-spacing: -0.02em; margin: 40px 0 22px; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; perspective: 1200px; }
.mode {
  position: relative; overflow: hidden; text-align: left;
  min-height: 330px; padding: 24px; border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--ink-2); box-shadow: var(--shadow);
  transform-style: preserve-3d; transition: transform 0.5s var(--ease), box-shadow 0.5s;
  opacity: 0; animation: fadeUp 0.9s var(--ease) forwards;
}
.mode-img { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.08); transition: transform 1.2s var(--ease), filter 0.8s; filter: saturate(0.9) brightness(0.8); }
.mode::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(7, 10, 18, 0.96) 18%, rgba(7, 10, 18, 0.35) 60%, rgba(7, 10, 18, 0.1)); }
.mode::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.14), transparent 40%);
  opacity: 0; transition: opacity 0.4s;
}
.mode:hover { box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(232, 192, 122, 0.35) inset; }
.mode:hover::after { opacity: 1; }
.mode:hover .mode-img { transform: scale(1.16); filter: saturate(1.1) brightness(0.95); }
.mode > *:not(.mode-img) { position: relative; z-index: 2; }
.mode-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: auto; background: rgba(14, 20, 34, 0.55); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line); color: var(--gold); }
.mode-icon svg { width: 22px; height: 22px; }
.mode h3 { font: 600 26px var(--serif); margin: 0 0 8px; letter-spacing: -0.01em; }
.mode p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.mode-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.mode-meta b { color: var(--gold); }
.mode.featured .mode-icon { background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: #1a1206; }

.ribbon { margin: 56px -48px 0; overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.ribbon-track { display: flex; gap: 16px; width: max-content; animation: marquee 120s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.postcard-mini { position: relative; width: 220px; height: 150px; border-radius: 16px; overflow: hidden; flex: none; box-shadow: var(--shadow); transform: rotate(var(--r, 0deg)); transition: transform 0.5s var(--spring); }
.postcard-mini:hover { transform: rotate(0) scale(1.06); }
.postcard-mini img { width: 100%; height: 100%; object-fit: cover; }
.postcard-mini span { position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }

/* ───────────── Game ───────────── */
.hud {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px; margin-bottom: 16px; border-radius: 999px;
  background: rgba(14, 20, 34, 0.55); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line);
}
.hud-mode { font: 600 18px var(--serif); display: flex; align-items: center; gap: 10px; }
.hud-mode svg { width: 20px; height: 20px; color: var(--gold); }
.hud-rounds { display: flex; gap: 8px; }
.hud-rounds i { width: 34px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); position: relative; overflow: hidden; }
.hud-rounds i::after { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: var(--c, var(--gold)); transition: transform 0.8s var(--ease); }
.hud-rounds i.done::after { transform: scaleX(1); }
.hud-rounds i.current { background: rgba(232, 192, 122, 0.35); animation: pulseBar 1.6s ease-in-out infinite; }
@keyframes pulseBar { 50% { background: rgba(232, 192, 122, 0.6); } }
.hud-right { display: flex; align-items: center; gap: 18px; }
.hud-score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.hud-score span { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.hud-score b { font: 600 22px var(--serif); font-variant-numeric: tabular-nums; }
.hud-score b.bump { animation: bump 0.6s var(--spring); }
@keyframes bump { 40% { transform: scale(1.25); color: var(--gold); } }
.streak { padding: 6px 12px; border-radius: 999px; background: rgba(255, 122, 80, 0.15); box-shadow: inset 0 0 0 1px rgba(255, 140, 90, 0.4); font-size: 14px; animation: pop 0.5s var(--spring); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.timer {
  position: relative; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(7, 10, 18, 0.55); box-shadow: 0 0 0 1px var(--line), 0 0 22px -4px rgba(232, 192, 122, 0.45);
  transition: box-shadow 0.3s;
}
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer .track { stroke: rgba(255, 255, 255, 0.12); }
.timer .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset 0.25s linear, stroke 0.3s; filter: drop-shadow(0 0 4px rgba(232, 192, 122, 0.7)); }
.timer b { font: 800 20px var(--serif); font-variant-numeric: tabular-nums; color: var(--gold-2); transition: color 0.3s; }
.timer.warn { box-shadow: 0 0 0 1px rgba(255, 179, 138, 0.5), 0 0 26px -2px rgba(255, 179, 138, 0.6); }
.timer.warn .bar { stroke: #ffb38a; filter: drop-shadow(0 0 5px rgba(255, 179, 138, 0.8)); }
.timer.warn b { color: #ffb38a; }
.timer.low { box-shadow: 0 0 0 1.5px var(--rose), 0 0 32px 0 rgba(255, 122, 138, 0.75); }
.timer.low .bar { stroke: var(--rose); filter: drop-shadow(0 0 6px rgba(255, 122, 138, 0.9)); }
.timer.low b { color: var(--rose); }
.timer.beat { animation: beat 0.35s var(--spring); }
.timer.low.beat { animation: beatHard 0.4s var(--spring); }
@keyframes beat { 40% { transform: scale(1.1); } }
@keyframes beatHard { 35% { transform: scale(1.2); } }
/* Countdown strip across the top of the photo, where the player is looking */
.time-strip-track { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 5px; background: rgba(7, 10, 18, 0.45); pointer-events: none; }
.time-strip { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); box-shadow: 0 0 12px rgba(232, 192, 122, 0.8); transition: transform 0.12s linear, background 0.3s; }
.time-strip.warn { background: linear-gradient(90deg, #e8864f, #ffb38a); box-shadow: 0 0 14px rgba(255, 179, 138, 0.9); }
.time-strip.low { background: linear-gradient(90deg, #d9465a, var(--rose)); box-shadow: 0 0 16px rgba(255, 122, 138, 1); animation: stripFlash 1s ease-in-out infinite; }
@keyframes stripFlash { 50% { opacity: 0.55; } }

.stage { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; height: calc(100vh - 190px); min-height: 520px; }
.photo-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); box-shadow: var(--shadow); }
.photo {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.12); transition: filter 1.2s var(--ease);
}
.photo.enter { animation: photoIn 1.4s var(--ease) forwards, slowZoom 40s linear 1.4s forwards; }
@keyframes photoIn {
  from { clip-path: circle(0% at 50% 55%); transform: scale(1.3); filter: brightness(1.8) blur(8px); }
  to { clip-path: circle(80% at 50% 50%); transform: scale(1.08); filter: none; }
}
@keyframes slowZoom { from { transform: scale(1.08); } to { transform: scale(1.22); } }
.photo-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(7, 10, 18, 0.55), transparent 22%, transparent 55%, rgba(7, 10, 18, 0.85)); }
.photo-top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(7, 10, 18, 0.55); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px; font-weight: 600; animation: chipIn 0.6s var(--spring) both;
}
.chip-gold { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.45); }
@keyframes chipIn { from { opacity: 0; transform: translateY(-10px) scale(0.9); } }
.photo-info { position: absolute; left: 24px; bottom: 22px; right: 24px; }
.photo-info h2 { font: 600 clamp(28px, 3vw, 42px) / 1.05 var(--serif); margin: 0 0 8px; letter-spacing: -0.02em; }
.photo-info p { margin: 0; color: var(--muted); font-weight: 600; display: flex; gap: 14px; flex-wrap: wrap; }
.photo-info .reveal-line { opacity: 0; animation: fadeUp 0.8s var(--ease) forwards; }
.credit { position: absolute; right: 14px; bottom: 10px; font-size: 11px; color: var(--faint); text-decoration: none; z-index: 2; }
.credit:hover { color: var(--text); }

/* ── The reveal: flash, light rays, verdict stamp, card thud, flying points ── */
.flash { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(circle at 50% 45%, rgba(255, 246, 225, 0.95), rgba(232, 192, 122, 0.5) 35%, transparent 70%); }
.flash.dim { mix-blend-mode: normal; background: rgba(7, 10, 18, 0.7); }
.flash.go { animation: flash 0.7s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }
.rays {
  position: absolute; inset: -45%; z-index: 2; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 8deg, rgba(246, 220, 166, 0.28) 8deg 11deg, transparent 11deg 22deg);
  -webkit-mask: radial-gradient(circle at center, #000 0%, transparent 55%); mask: radial-gradient(circle at center, #000 0%, transparent 55%);
}
.rays.go { animation: rays 2.8s ease-out forwards; }
@keyframes rays { 0% { opacity: 0; transform: rotate(0) scale(0.7); } 18% { opacity: 1; } 100% { opacity: 0; transform: rotate(45deg) scale(1.15); } }
.stamp {
  position: absolute; z-index: 2; left: 50%; top: 30%; opacity: 0; pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-7deg);
  font: 800 italic clamp(38px, 5.4vw, 82px)/1 var(--serif); letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--gold-2); padding: 6px 26px 12px; border: 4px solid currentColor; border-radius: 16px;
  box-shadow: inset 0 0 0 3px rgba(7, 10, 18, 0.85), inset 0 0 0 5px currentColor, 0 24px 60px rgba(0, 0, 0, 0.55);
  background: rgba(7, 10, 18, 0.35); backdrop-filter: blur(6px);
  text-shadow: 0 0 34px rgba(246, 220, 166, 0.45);
}
.stamp.t-ok { color: #f4efe6; text-shadow: none; }
.stamp.t-bad { color: var(--rose); text-shadow: 0 0 30px rgba(255, 122, 138, 0.4); }
.stamp.go { animation: stampIn 0.8s cubic-bezier(0.16, 1.3, 0.3, 1) forwards; }
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scale(2.8); filter: blur(14px); }
  50% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(0.94); filter: blur(0); }
  68% { transform: translate(-50%, -50%) rotate(-7.5deg) scale(1.05); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
}
/* Bullseye: a prismatic stamp and a glow that pulses round the photo. */
.stamp.t-epic {
  color: #fff4dc; border-color: transparent;
  background:
    linear-gradient(rgba(7, 10, 18, 0.55), rgba(7, 10, 18, 0.55)) padding-box,
    linear-gradient(120deg, #bfe6ff, #f6dca6 35%, #ffc1e0 65%, #bfe6ff) border-box;
  box-shadow: 0 0 60px rgba(246, 220, 166, 0.55), 0 24px 60px rgba(0, 0, 0, 0.55);
  text-shadow: 0 0 24px rgba(191, 230, 255, 0.8), 0 0 50px rgba(246, 220, 166, 0.7);
}
.photo-card.epic, .photo-card.thud.epic { animation: thud 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both, epicGlow 2.4s ease-out 0.2s both; }
@keyframes epicGlow {
  0% { box-shadow: var(--shadow), 0 0 0 0 rgba(246, 220, 166, 0); }
  25% { box-shadow: var(--shadow), 0 0 0 4px rgba(246, 220, 166, 0.9), 0 0 90px 10px rgba(246, 220, 166, 0.55); }
  100% { box-shadow: var(--shadow), 0 0 0 2px rgba(246, 220, 166, 0.35), 0 0 40px 0 rgba(246, 220, 166, 0.2); }
}
.bull-note {
  display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 800; color: #1a1206;
  background: linear-gradient(120deg, #bfe6ff, #f6dca6 45%, #ffc1e0); animation: rarityIn 0.8s var(--spring) 0.4s both;
}
.postcard em.pc-bull { color: #1a1206; background: linear-gradient(120deg, #bfe6ff, #f6dca6 45%, #ffc1e0); }
.photo-card.thud { animation: thud 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes thud { 10%, 90% { transform: translate(-1px, 1px); } 20%, 80% { transform: translate(2px, -1px); } 30%, 50%, 70% { transform: translate(-4px, 2px); } 40%, 60% { transform: translate(4px, -2px); } }
.floater { position: fixed; z-index: 70; pointer-events: none; font: 800 30px var(--serif); color: var(--gold-2); text-shadow: 0 2px 24px rgba(232, 192, 122, 0.7), 0 0 4px rgba(0, 0, 0, 0.6); will-change: transform; }

.result {
  position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 18px;
  padding: 24px 26px; border-radius: 20px;
  background: rgba(10, 14, 24, 0.78); backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "score home btn" "bar bar bar" "detail detail detail" "rarity rarity rarity";
  align-items: center; gap: 12px 26px;
  animation: sheetUp 0.8s var(--spring) both;
}
@keyframes sheetUp { from { opacity: 0; transform: translateY(40px) scale(0.96); } }
.result.great { box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(232, 192, 122, 0.45), 0 -10px 70px -20px rgba(232, 192, 122, 0.55); }
.result.bad .result-score b { background: linear-gradient(180deg, #fff, var(--rose)); -webkit-background-clip: text; background-clip: text; }
.result-score { grid-area: score; position: relative; display: flex; align-items: baseline; gap: 6px; }
.result-score.pulse::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gold-2); animation: ringOut 0.9s ease-out forwards; }
@keyframes ringOut { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(9); } }
.result-score b { font: 800 60px/1 var(--serif); font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-score span { color: var(--faint); font-weight: 700; font-size: 13px; }
.result-bar { grid-area: bar; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.result-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--rose), var(--gold) 50%, var(--good)); background-size: 300% 100%; transition: width 1.4s var(--ease); }
.result-detail { grid-area: detail; margin: 0; font-weight: 600; color: var(--muted); font-size: 14px; }
.result-detail b { color: var(--text); }
.result-home { grid-area: home; min-width: 0; }
.result-home h3 { margin: 0; font: 600 22px var(--serif); }
.result-where { margin: 2px 0 4px; color: var(--gold); font-weight: 700; font-size: 14px; }
.result-blurb { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.result-fact {
  margin: 10px 0 0; padding: 10px 14px; border-radius: 12px;
  background: rgba(232, 192, 122, 0.08); box-shadow: inset 2px 0 0 var(--gold);
  font-size: 13px; line-height: 1.5; color: rgba(244, 239, 230, 0.82);
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.5s forwards;
}
.result-fact b { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
#nextBtn { grid-area: btn; }

/* ── Rarity: how many players nailed this home ── */
.result-rarity {
  grid-area: rarity; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  animation: fadeUp 0.6s var(--ease) both;
}
.result-rarity[hidden] { display: none; }
.result-rarity b { color: var(--text); }
.result-rarity.is-rare {
  position: relative; overflow: hidden; padding: 10px 14px; border-radius: 14px; color: var(--text);
  background: linear-gradient(110deg, rgba(246, 220, 166, 0.16), rgba(232, 192, 122, 0.06));
  box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.55), 0 0 40px -12px rgba(232, 192, 122, 0.7);
  animation: rarityIn 0.8s var(--spring) both;
}
.result-rarity.is-rare b { color: var(--gold-2); }
/* A sheen sweeps across rare badges once, then again every few seconds. */
.result-rarity.is-rare::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%); animation: sheen 3.2s var(--ease) 0.5s infinite;
}
@keyframes sheen { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }
@keyframes rarityIn { from { opacity: 0; transform: translateY(14px) scale(0.92); } }
.rr-tag {
  flex: none; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: #1a1206; background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
  box-shadow: 0 4px 14px -4px rgba(232, 192, 122, 0.8);
}
/* Legendary and first-ever finds get a prismatic edge instead of plain gold. */
.result-rarity.t-legendary, .result-rarity.t-first {
  background: linear-gradient(110deg, rgba(160, 220, 255, 0.14), rgba(246, 220, 166, 0.14) 50%, rgba(255, 150, 200, 0.12));
  box-shadow: inset 0 0 0 1.5px rgba(200, 225, 255, 0.7), 0 0 50px -10px rgba(160, 210, 255, 0.75);
}
.t-legendary .rr-tag, .t-first .rr-tag {
  background: linear-gradient(120deg, #bfe6ff, #f6dca6 40%, #ffc1e0 70%, #bfe6ff); background-size: 220% 100%;
  animation: prism 3s linear infinite;
}
@keyframes prism { to { background-position: 220% 0; } }
.result-rarity.t-tricky { box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.35); }

/* The same find, remembered on the summary postcard. */
.pc-rare {
  position: absolute; z-index: 1; left: 14px; bottom: 74px; padding: 5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #1a1206;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
  box-shadow: 0 6px 16px -4px rgba(232, 192, 122, 0.8);
}
.pc-rare.t-legendary, .pc-rare.t-first { background: linear-gradient(120deg, #bfe6ff, #f6dca6 45%, #ffc1e0); }

.panel { position: relative; border-radius: var(--radius); background: rgba(14, 20, 34, 0.6); backdrop-filter: blur(20px); box-shadow: var(--shadow); overflow: hidden; }
.panel-pane { position: absolute; inset: 0; display: none; flex-direction: column; padding: 16px; }
.panel-pane.active { display: flex; animation: fadeUp 0.6s var(--ease); }
.map-wrap { position: relative; flex: 1; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
#map { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, #101a2e, #05070d 75%); cursor: grab; }
#map:active { cursor: grabbing; }
.country-label span {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font: 700 10px var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 250, 240, 0.85); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.7);
}
.map-hint { position: absolute; z-index: 500; left: 50%; top: 14px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(7, 10, 18, 0.75); backdrop-filter: blur(10px); font-size: 12px; font-weight: 700; pointer-events: none; transition: opacity 0.4s; white-space: nowrap; }
.map-hint.gone { opacity: 0; }
.panel-actions { display: flex; gap: 10px; margin-top: 14px; }
.panel-actions .btn-gold { flex: 1; }

/* Pin globe markers (globe.gl centres each HTML marker on its point) */
#map .country-label, #map .gpin, #map .pin-actual { pointer-events: none; transition: opacity 0.25s; }
#map .behind { opacity: 0 !important; }
.country-label { width: 0; height: 0; }
.gpin { position: relative; width: 26px; height: 52px; }
.gpin i { position: absolute; left: 50%; bottom: 26px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--teal); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), inset 0 0 0 5px rgba(7, 10, 18, 0.35); animation: pinDrop 0.5s var(--spring); }
@keyframes pinDrop { from { transform: translateY(-30px) rotate(-45deg); opacity: 0; } to { transform: rotate(-45deg); } }
.pin-actual { position: relative; }
.pin-actual img { position: absolute; left: -24px; top: -24px; width: 48px !important; height: 48px !important; max-width: none; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); animation: pop 0.7s var(--spring) 0.9s both; }
.pin-actual::before, .pin-actual::after { content: ""; position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold); animation: ring 2.2s ease-out 1s infinite; }
.pin-actual::after { animation-delay: 2.1s; }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }

.pane-label { margin: 18px 6px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.pane-label-2 { margin-top: 22px; }
/* A "who" question reads as a sentence, not a caption. */
.pane-label-2.is-question { font: 600 18px/1.35 var(--serif); letter-spacing: 0; text-transform: none; color: var(--text); margin-bottom: 12px; }
.price-display { font: 600 clamp(48px, 5vw, 76px)/1.05 var(--serif); letter-spacing: -0.03em; padding: 0 6px; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-sub { margin: 4px 6px 28px; color: var(--muted); font-weight: 600; }
#priceRange { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--gold) var(--p, 50%), rgba(255, 255, 255, 0.1) var(--p, 50%)); outline: none; margin: 0; }
#priceRange::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold-2) 40%, var(--gold-3)); box-shadow: 0 0 0 6px rgba(232, 192, 122, 0.2), 0 6px 16px rgba(0, 0, 0, 0.5); cursor: grab; transition: transform 0.2s var(--spring); }
#priceRange::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
#priceRange::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold-2) 40%, var(--gold-3)); box-shadow: 0 0 0 6px rgba(232, 192, 122, 0.2); }
#priceRange:disabled { opacity: 0.4; }
.price-scale { display: flex; justify-content: space-between; margin: 10px 2px 0; font-size: 11px; font-weight: 700; color: var(--faint); }
.price-track { position: relative; height: 90px; margin: 26px 6px 0; }
.pt-line { position: absolute; left: 0; right: 0; top: 44px; height: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)); }
.pt-mark { position: absolute; top: 36px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; transition: left 1.3s var(--spring); }
.pt-mark span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 8px; }
.pt-mark.guess { background: var(--teal); box-shadow: 0 0 0 6px rgba(94, 224, 200, 0.2); }
.pt-mark.guess span { top: 26px; color: var(--teal); background: rgba(94, 224, 200, 0.12); }
.pt-mark.actual { background: var(--gold); box-shadow: 0 0 0 6px rgba(232, 192, 122, 0.25); }
.pt-mark.actual span { bottom: 26px; color: #1a1206; background: var(--gold); }
#panePrice > .pane-label:first-child { margin-top: auto; }
#priceBtn { margin-top: auto; }

.place-price { font: 800 clamp(46px, 5vw, 72px)/1.05 var(--serif); letter-spacing: -0.03em; padding: 0 6px; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.place-specs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 4px 0; }
.place-specs .chip { background: var(--glass); }
.compare { margin: 22px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; opacity: 0; animation: fadeUp 0.6s var(--ease) forwards; }
.compare-row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.compare-row i { display: block; height: 10px; width: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.22); transition: width 1.2s var(--ease); }
.compare-row.is-answer span:first-child { color: var(--text); }
.compare-row.is-answer i { background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); box-shadow: 0 0 16px rgba(232, 192, 122, 0.5); }
.compare-row b { text-align: right; font-variant-numeric: tabular-nums; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; align-content: start; }
.option {
  position: relative; overflow: hidden; text-align: left;
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.35s var(--spring), background 0.3s, box-shadow 0.3s;
  opacity: 0; animation: fadeUp 0.6s var(--ease) forwards;
}
.option:hover:not(:disabled) { transform: translateY(-3px); background: var(--glass-2); box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.5); }
.option .flag { font-size: 28px; line-height: 1; }
.option b { display: block; font-size: 15px; }
.option small { color: var(--muted); font-weight: 600; }
.option kbd { position: absolute; top: 8px; right: 8px; margin: 0; }
/* Revealed answers play at once and stay visible: each option's staggered entrance delay is set inline, and
   the base style starts at opacity 0, so without this the right answer vanished for about a second. */
.option.correct { background: rgba(126, 224, 161, 0.16); box-shadow: inset 0 0 0 2px var(--good); animation: correct 0.7s var(--spring) forwards; animation-delay: 0s !important; opacity: 1; }
.option.wrong { background: rgba(255, 122, 138, 0.14); box-shadow: inset 0 0 0 2px var(--rose); animation: shake 0.5s; animation-delay: 0s !important; opacity: 1; }
.option:disabled { cursor: default; }
.option:disabled:not(.correct):not(.wrong) { opacity: 0.35 !important; }
.option.removed { opacity: 0.12 !important; filter: grayscale(1); transform: scale(0.96); transition: opacity 0.5s, transform 0.5s var(--ease), filter 0.5s; }
.place-actions { margin-top: 12px; }
.lifeline-btn { white-space: nowrap; }
.price-actions { margin-top: auto; }
.price-actions #priceBtn { margin-top: 0; }
#panePrice.narrowed #priceRange { animation: narrowGlow 1.1s var(--ease); }
#panePrice.narrowed .price-scale { animation: fadeUp 0.6s var(--ease); color: var(--gold); }
@keyframes narrowGlow { 0% { box-shadow: 0 0 0 0 rgba(232, 192, 122, 0.8); } 100% { box-shadow: 0 0 0 14px rgba(232, 192, 122, 0); } }
@keyframes correct { 0% { opacity: 1; transform: scale(1); } 40% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* Round intro: 2.2s title card. Everything arrives over the first second and leaves together at 1.75s. */
.round-intro {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; text-align: center; overflow: hidden;
  background: rgba(7, 10, 18, 0.6); backdrop-filter: blur(10px);
  animation: introBg 2.2s var(--ease) forwards;
}
@keyframes introBg { 0% { opacity: 0; } 10%, 82% { opacity: 1; } 100% { opacity: 0; } }
.ri-bd { position: absolute; inset: -6%; background: var(--ink) center / cover; filter: blur(50px) brightness(0.45) saturate(1.3); animation: riBd 2.2s var(--ease) forwards; }
@keyframes riBd { from { transform: scale(1.25); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
.ri-bar { position: absolute; left: 0; right: 0; height: 13vh; z-index: 2; background: #04060b; animation: barIn 0.9s var(--ease) both, barOut 0.5s var(--ease) 1.75s both; }
.ri-bar.top { top: 0; transform-origin: top; }
.ri-bar.bot { bottom: 0; transform-origin: bottom; }
@keyframes barIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes barOut { from { transform: scaleY(1); } to { transform: scaleY(0); } }
.ri-num {
  position: absolute; z-index: 1; left: 50%; top: 50%; pointer-events: none;
  font: 800 clamp(220px, 42vw, 600px)/1 var(--serif); letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(246, 220, 166, 0.16);
  animation: riNum 2.2s var(--ease) forwards;
}
@keyframes riNum { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); } 25% { opacity: 1; } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.96); } }
.ri-content { position: relative; z-index: 3; padding: 0 16px; }
.ri-icon { width: 54px; height: 54px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(7, 10, 18, 0.5); box-shadow: inset 0 0 0 1px rgba(246, 220, 166, 0.45); animation: riIn 0.8s var(--ease) 0.05s both, riOut 0.45s var(--ease) 1.75s both; }
.ri-icon svg { width: 24px; height: 24px; }
.round-intro p { margin: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; color: var(--gold); animation: riTrack 1s var(--ease) 0.1s both, riOut 0.45s var(--ease) 1.75s both; }
@keyframes riTrack { from { opacity: 0; letter-spacing: 1em; transform: translateY(10px); } to { opacity: 1; letter-spacing: 0.38em; transform: none; } }
.round-intro h2 { margin: 12px 0 16px; font: 400 clamp(50px, 9vw, 132px)/1 var(--serif); font-style: italic; letter-spacing: -0.03em; animation: riOut 0.45s var(--ease) 1.75s both; }
.round-intro h2 .c { display: inline-block; opacity: 0; animation: riChar 0.75s var(--ease) forwards; }
@keyframes riChar { from { opacity: 0; transform: translateY(44px) rotate(5deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.ri-rule { width: 140px; height: 1px; margin: 0 auto 16px; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: riRule 0.9s var(--ease) 0.55s both, riOut 0.45s var(--ease) 1.75s both; }
@keyframes riRule { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.round-intro .tip { display: block; color: var(--muted); font-weight: 600; animation: riIn 0.8s var(--ease) 0.75s both, riOut 0.45s var(--ease) 1.75s both; }
@keyframes riIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes riOut { to { opacity: 0; transform: translateY(-26px) scale(1.03); filter: blur(10px); } }

/* ───────────── Summary ───────────── */
.summary { max-width: 1100px; margin: 20px auto 0; text-align: center; }
.sum-total { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.sum-total b { font: 800 clamp(80px, 12vw, 160px)/1 var(--serif); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff 20%, var(--gold) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 40px rgba(232, 192, 122, 0.35)); }
.sum-total span { color: var(--faint); font-weight: 700; }
.sum-rank { font: 400 italic clamp(24px, 3vw, 36px) var(--serif); color: var(--gold-2); margin: 6px 0 36px; }
.postcards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; perspective: 1000px; }
.postcard { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); text-align: left; opacity: 0; animation: flipIn 0.9s var(--spring) forwards; transform-origin: bottom; }
@keyframes flipIn { from { opacity: 0; transform: rotateX(70deg) translateY(40px); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
.postcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.postcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 10, 18, 0.95) 10%, transparent 60%); }
.postcard div { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 14px; }
.postcard b { display: block; font: 700 26px var(--serif); color: var(--gold-2); }
.postcard span { font-size: 12px; font-weight: 700; color: var(--muted); }
.postcard em { position: absolute; z-index: 1; top: 12px; left: 12px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: rgba(7, 10, 18, 0.6); backdrop-filter: blur(8px); }
.save { display: flex; gap: 10px; justify-content: center; margin: 38px auto 14px; max-width: 480px; }
.save input { flex: 1; min-width: 0; padding: 14px 20px; border-radius: 999px; border: 0; outline: none; font: 600 15px var(--sans); color: var(--text); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s; }
.save input:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.save.saved { opacity: 0.5; pointer-events: none; }
.sum-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-panel {
  display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; max-width: 780px; margin: 26px auto 0; padding: 18px; text-align: left;
  border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); animation: fadeUp 0.6s var(--ease);
}
.share-panel img { display: block; width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.share-side { display: flex; flex-direction: column; gap: 14px; }
.share-side pre { margin: 0; padding: 16px 18px; border-radius: 14px; background: rgba(7, 10, 18, 0.6); font: 600 15px/1.6 var(--sans); white-space: pre-wrap; word-break: break-word; user-select: all; }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.share-hint { margin: 0; color: var(--faint); font-size: 13px; }

/* ───────────── Leaderboard ───────────── */
.board { max-width: 900px; margin: 10px auto 0; }
.board-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.display-sm { font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); letter-spacing: -0.03em; margin: 0; }
.tabs { position: relative; display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.tab { position: relative; z-index: 1; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); transition: color 0.3s; }
.tab.active { color: #1a1206; }
.tab-pill { position: absolute; top: 5px; bottom: 5px; border-radius: 999px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); transition: left 0.5s var(--spring), width 0.5s var(--spring); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 14px; margin-bottom: 20px; min-height: 330px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pod-avatar { position: relative; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font: 700 30px var(--serif); color: #1a1206; margin-bottom: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); opacity: 0; animation: popIn 0.8s var(--spring) forwards; }
@keyframes popIn { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.pod-1 .pod-avatar { width: 96px; height: 96px; font-size: 38px; }
.pod-1 .pod-avatar::before { content: "👑"; position: absolute; top: -30px; font-size: 28px; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(6deg); } }
.pod-name { font-weight: 800; font-size: 15px; }
.pod-score { font: 600 22px var(--serif); color: var(--gold-2); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.pod-block {
  width: 100%; border-radius: 18px 18px 6px 6px; display: grid; place-items: start center; padding-top: 16px;
  font: 800 44px var(--serif); color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px var(--line);
  height: 0; transition: height 1.1s var(--spring);
}
.pod-1 .pod-block { background: linear-gradient(180deg, rgba(232, 192, 122, 0.45), rgba(232, 192, 122, 0.05)); color: var(--gold-2); }
.pod-2 .pod-block { background: linear-gradient(180deg, rgba(200, 210, 230, 0.3), rgba(200, 210, 230, 0.03)); }
.pod-3 .pod-block { background: linear-gradient(180deg, rgba(210, 140, 90, 0.35), rgba(210, 140, 90, 0.03)); }
/* Your own pod gets the celebration: spotlight, glowing ring, orbiting sparkle, shimmer sweep. */
.pod { position: relative; }
.pod > * { position: relative; z-index: 1; }
.pod.me::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: -45%; bottom: 0; width: 170%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(246, 220, 166, 0.16) 55%, transparent);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  animation: spot 1.2s var(--ease) 0.6s both, sway 5s ease-in-out 1.8s infinite alternate;
}
@keyframes spot { from { opacity: 0; transform: translateX(-50%) scaleY(0); } to { opacity: 1; transform: translateX(-50%) scaleY(1); } }
@keyframes sway { from { transform: translateX(-53%) skewX(-3deg); } to { transform: translateX(-47%) skewX(3deg); } }
.pod.me .pod-avatar { box-shadow: 0 0 0 4px var(--teal), 0 0 44px rgba(94, 224, 200, 0.55), 0 10px 30px rgba(0, 0, 0, 0.5); animation: popIn 0.8s var(--spring) forwards, glowPulse 2.4s ease-in-out 1.2s infinite; }
@keyframes glowPulse { 50% { box-shadow: 0 0 0 6px var(--teal), 0 0 70px rgba(94, 224, 200, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5); } }
.pod.me .pod-avatar::after { content: "✦"; position: absolute; inset: -20px; color: var(--gold-2); font-size: 18px; line-height: 1; text-align: center; animation: orbit 3.2s linear 1.2s infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.pod.me.pod-1 .pod-avatar::before { animation: crownDrop 0.9s var(--spring) 1s both, float 3s ease-in-out 1.9s infinite; }
@keyframes crownDrop { from { opacity: 0; transform: translateY(-70px) rotate(-20deg); } to { opacity: 1; transform: none; } }
.pod.me .pod-block { overflow: hidden; }
.pod.me .pod-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); transform: translateX(-120%); animation: sweep 2.6s var(--ease) 1.8s infinite; }
@keyframes sweep { to { transform: translateX(120%); } }
.board-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; margin: -8px auto 28px; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; color: var(--teal); background: rgba(94, 224, 200, 0.1); box-shadow: inset 0 0 0 1px rgba(94, 224, 200, 0.5);
  animation: bannerIn 0.9s var(--spring) 0.3s both;
}
.board-banner b { font: 800 22px var(--serif); }
.board-banner.top { color: #1a1206; background: linear-gradient(110deg, var(--gold-2), var(--gold) 35%, var(--gold-3) 60%, var(--gold-2) 85%); background-size: 250% 100%; box-shadow: 0 16px 44px -10px rgba(232, 192, 122, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5); animation: bannerIn 0.9s var(--spring) 0.3s both, shimmer 3s linear 1.2s infinite; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-22px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -250% 0; } }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 44px 40px 1fr auto auto; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  opacity: 0; animation: rowIn 0.6s var(--ease) forwards;
}
@keyframes rowIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.row .rank { font: 700 18px var(--serif); color: var(--faint); text-align: center; }
.row .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--serif); color: #1a1206; }
.row .nm { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .dt { font-size: 12px; color: var(--faint); font-weight: 600; }
.row .sc { font: 600 20px var(--serif); font-variant-numeric: tabular-nums; }
.row.me { background: rgba(94, 224, 200, 0.1); box-shadow: inset 0 0 0 1.5px var(--teal); }
.row.me .sc { color: var(--teal); }
.bot { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-left: 8px; color: var(--faint); background: rgba(255, 255, 255, 0.07); vertical-align: middle; }
.board-note { margin-top: 26px; text-align: center; color: var(--faint); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

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

/* ───────────── Responsive ───────────── */
@media (max-width: 1100px) {
  .modes { grid-template-columns: repeat(2, 1fr); }
  .postcards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-globe { max-width: 420px; order: -1; margin: -20px auto -30px; }
  .stage { grid-template-columns: 1fr; height: auto; }
  .photo-card { height: 52vh; min-height: 340px; }
  .panel { min-height: 380px; }
  .result { grid-template-columns: 1fr auto; grid-template-areas: "score btn" "bar bar" "home home" "detail detail" "rarity rarity"; }
  /* On phones the result card sits in the flow over the lower photo, and the card grows to fit it. */
  .photo-card { height: auto; min-height: 52vh; display: flex; flex-direction: column; }
  .result { position: relative; left: auto; right: auto; bottom: auto; margin: 34vh 12px 12px; }
  /* The card grows as the result (and later the rarity line) arrives. Keep the photo and its shade at
     the answering height so they don't stretch and re-crop mid-reveal; the card's dark background shows below. */
  .photo, .photo-shade { bottom: auto; height: max(52vh, 340px); }
  .photo-shade { height: calc(max(52vh, 340px) + 48px); } /* also covers the zoomed photo's overhang */
  .photo-shade { background: linear-gradient(to bottom, rgba(7, 10, 18, 0.55), transparent 22%, transparent 55%, var(--ink-2)); }
  /* The endless slow zoom repaints the photo every frame under the blurred result card, which is costly on phones. */
  .photo.enter { animation: photoIn 1.4s var(--ease) forwards; }
  .hud-rounds i { width: 18px; }
  .hud-mode span { display: none; }
  .stamp { top: 26%; font-size: clamp(30px, 9vw, 48px); border-width: 3px; padding: 4px 16px 8px; }
  .ri-bar { height: 9vh; }
}
@media (max-width: 560px) {
  .modes { grid-template-columns: 1fr; }
  .mode { min-height: 250px; }
  .postcards { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 24px; }
  .nav-link { padding: 8px 10px; }
  .brand span { display: none; }
  .options { grid-template-columns: 1fr; }
  .podium { gap: 6px; }
  .pod-avatar { width: 58px; height: 58px; font-size: 22px; }
  .pod-1 .pod-avatar { width: 70px; height: 70px; }
  .row { grid-template-columns: 30px 32px 1fr auto; gap: 10px; }
  .row .dt { display: none; }
  .save { flex-direction: column; }
  /* Score and button don't fit side by side here: the button gets its own full-width row, in thumb reach. */
  .result { padding: 20px; gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "score" "bar" "home" "detail" "rarity" "btn"; }
  .result-score b { font-size: 50px; }
  #nextBtn { width: 100%; }
  #nextBtn kbd { display: none; }
  .ribbon { margin: 40px -16px 0; }
  .daily { padding: 28px 22px; min-height: 280px; }
  .daily::before { background: linear-gradient(to top, rgba(7, 10, 18, 0.97) 45%, rgba(7, 10, 18, 0.35)); }
  .share-panel { grid-template-columns: 1fr; }
  .streak-card { grid-template-columns: 1fr; gap: 12px; }
  .streak-card .sk-side { flex-direction: row; justify-content: space-between; align-items: center; }
  .sk-week { justify-content: space-between; gap: 0; }
  .streak-panel { flex-direction: column; gap: 14px; text-align: center; }
  .sp-meta { justify-content: center; }
  .share-panel img { max-width: 240px; margin: 0 auto; }
}

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

/* ── Avatars: the chosen home on its disc, on the podium, in rows and on the pickers ── */
.has-av svg { width: 74%; height: 74%; display: block; }
.av-btn {
  flex: none; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; position: relative;
  box-shadow: 0 0 0 2px rgba(246, 220, 166, 0.5), 0 8px 20px -6px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}
.av-btn svg { width: 74%; height: 74%; }
button.av-btn:hover, .board-av:hover .av-btn { transform: scale(1.08); box-shadow: 0 0 0 2px var(--gold), 0 8px 24px -6px rgba(232, 192, 122, 0.7); }
/* A small pencil says "you can change this". */
button.av-btn::after {
  content: "✎"; position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; color: #1a1206; background: var(--gold-2); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.board-av { gap: 10px; padding: 6px 18px 6px 6px; margin-right: auto; }
.board-av .av-btn { width: 34px; height: 34px; }

.avatar-modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(7, 10, 18, 0.72); backdrop-filter: blur(10px);
  animation: fadeUp 0.35s var(--ease);
}
.avatar-modal[hidden] { display: none; }
.am-card {
  width: min(520px, 100%); padding: 28px; border-radius: var(--radius); text-align: center;
  background: rgba(14, 20, 34, 0.96); box-shadow: var(--shadow), inset 0 0 0 1px rgba(232, 192, 122, 0.25);
  animation: rarityIn 0.6s var(--spring) both;
}
.am-card h3 { margin: 0; font: 600 28px var(--serif); }
.am-sub { margin: 6px 0 22px; color: var(--muted); font-size: 14px; }
.am-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.am-opt {
  aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.7); transition: transform 0.3s var(--spring), box-shadow 0.3s;
  animation: amIn 0.5s var(--spring) both;
}
/* Animates `scale`, not `transform`, so the hover zoom still works after it finishes. */
@keyframes amIn { from { scale: 0.4; opacity: 0; } }
.am-opt:nth-child(5n + 2) { animation-delay: 0.03s; } .am-opt:nth-child(5n + 3) { animation-delay: 0.06s; }
.am-opt:nth-child(5n + 4) { animation-delay: 0.09s; } .am-opt:nth-child(5n) { animation-delay: 0.12s; }
.am-opt svg { width: 72%; height: 72%; }
.am-opt:hover, .am-opt:focus-visible { transform: scale(1.1); outline: none; box-shadow: 0 0 0 3px var(--gold-2), 0 10px 26px -6px rgba(232, 192, 122, 0.6); }
.am-opt.on { box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px rgba(232, 192, 122, 0.3), 0 10px 26px -6px rgba(232, 192, 122, 0.6); }
.am-name { margin: 20px 0 0; min-height: 1.4em; font: italic 600 18px var(--serif); color: var(--gold-2); }
@media (max-width: 560px) {
  .am-card { padding: 22px 16px; }
  .am-grid { gap: 10px; }
  .save .av-btn { align-self: center; }
}

/* ── Lite build (phones and tablets; js/fx.js adds .lite) ──
   Big blurred layers, blur/brightness filter animations and frosted glass exhaust a phone's graphics
   memory; Chrome on Android then flashes black tiles over photos while they load. Keep the look,
   drop the costly parts: no live blur, only opacity and transform animations on the photo. */
.lite * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.lite .aurora { display: none; }
.lite .bg-photo { filter: blur(22px) saturate(1.2) brightness(0.5); }
.lite .round-intro { background: rgba(7, 10, 18, 0.72); }
.lite .ri-bd { filter: brightness(0.32) saturate(1.2); animation: riBdLite 2.2s var(--ease) forwards; }
@keyframes riBdLite { from { opacity: 0; } 30%, to { opacity: 1; } }
.lite .photo.enter { animation: photoInLite 1s var(--ease) forwards; }
@keyframes photoInLite { from { opacity: 0; transform: scale(1.2); } to { opacity: 1; transform: scale(1.08); } }
/* Panels that relied on frosted glass get a more solid fill instead. */
.lite .chip, .lite .btn-ghost, .lite .globe-tag, .lite .mode-icon { background: rgba(10, 14, 24, 0.82); }
.lite .result { background: rgba(10, 14, 24, 0.94); }
.lite .panel { background: rgba(14, 20, 34, 0.92); }
/* The film grain is a 4×-screen layer re-rasterised six times a second; at 7% it's invisible on a phone. */
.lite .grain { display: none; }
/* Backgrounds don't cycle on phones (js/fx.js), so only the visible layer needs to exist. */
.lite .bg-photo:not(.show) { display: none; }

/* ── The game family: switcher cards on the home screen ── */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 10px; }
.game-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  color: var(--text); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.3s var(--spring), box-shadow 0.3s, background 0.3s;
}
.game-card:hover { transform: translateY(-3px); background: var(--glass-2); box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.5); }
.game-card.current { cursor: default; transform: none; box-shadow: inset 0 0 0 1.5px var(--gold); }
.gc-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(7, 10, 18, 0.5); }
.gc-text { display: flex; flex-direction: column; min-width: 0; }
.gc-text b { font: 600 17px var(--serif); }
.gc-text small { color: var(--muted); font-size: 12px; font-weight: 700; }
.game-card.current .gc-text small { color: var(--gold); }
.demo-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10px; letter-spacing: 0.14em; color: #1a1206; background: var(--gold); vertical-align: 2px; }
.lite .game-card { background: rgba(10, 14, 24, 0.82); }

/* ── The hub: every game on one page, with a globe of who's playing ── */
.hub-live { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.hub-live b { color: var(--text); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #8ff0b4; box-shadow: 0 0 0 0 rgba(143, 240, 180, 0.6); animation: live-pulse 2s infinite; }
.hub-live:not(.busy) .live-dot { background: var(--muted); animation: none; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 10px rgba(143, 240, 180, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 240, 180, 0); } }
.hub-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.hub-card {
  position: relative; display: flex; flex-direction: column; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; text-align: left;
  color: var(--text); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.35s var(--spring), box-shadow 0.3s; animation: hub-in 0.6s var(--spring) both;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(232, 192, 122, 0.55), 0 18px 40px rgba(0, 0, 0, 0.35); }
.hub-card.current { box-shadow: inset 0 0 0 1.5px var(--gold); }
@keyframes hub-in { from { opacity: 0; transform: translateY(14px); } }
.hc-img { display: block; aspect-ratio: 16 / 9; background: center / cover no-repeat; transition: transform 0.6s ease; }
.hub-card:hover .hc-img { transform: scale(1.05); }
.hc-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 16px; }
.hc-top { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.hc-icon { font-size: 20px; }
.hc-top .demo-tag { margin-left: 0; }
.hc-live { margin-left: auto; font-size: 12px; font-weight: 800; color: #8ff0b4; }
.hc-body b { font: 600 19px var(--serif); }
.hc-body small { color: var(--muted); font-size: 13px; font-weight: 600; }
.hub-note { margin: 0 0 40px; font-size: 12px; color: var(--faint); }
.hub-note a { color: var(--muted); }
.lite .hub-card { background: rgba(10, 14, 24, 0.82); }

/* The hub's hero is the globe: full screen, running under the top bar, with the words over its left side. */
#screen-hub .hero {
  position: relative; display: flex; align-items: center;
  min-height: calc(100svh - 72px); margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding: 0 clamp(16px, 4vw, 48px);
}
#screen-hub .hero::before {
  content: ''; position: absolute; inset: -80px 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 10, 18, 0.82), rgba(7, 10, 18, 0.35) 38%, transparent 62%), linear-gradient(to top, var(--ink), transparent 18%);
}
#screen-hub .hero-copy { position: relative; z-index: 2; max-width: 580px; }
#hubGlobeSlot { position: absolute; inset: -80px -12vw 0 12%; width: auto; max-width: none; aspect-ratio: auto; margin: 0; justify-self: stretch; align-self: stretch; }
#hubGlobeSlot .globe-glow { inset: 18% 22%; }
@media (max-width: 860px) {
  #screen-hub .hero { align-items: flex-end; min-height: calc(100svh - 64px); padding-bottom: 28px; }
  #screen-hub .hero::before { background: linear-gradient(to top, var(--ink) 8%, rgba(7, 10, 18, 0.75) 42%, transparent 70%); }
  #hubGlobeSlot { inset: -70px -35vw 28% -35vw; order: 0; }
}

/* Hub rows: one per category of game. */
.hub-row { margin-bottom: 26px; }
.hub-row-head { display: flex; align-items: baseline; gap: 14px; margin: 0 2px 12px; }
.hub-row-head h3 { margin: 0; font: 600 24px var(--serif); }
.hub-row-head span { color: var(--muted); font-size: 14px; font-weight: 600; }
.hub-row-head small { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 860px) {
  /* Each row scrolls sideways, so the page stays short however many games there are. */
  .hub-row .hub-games {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(16px, 4vw, 48px); gap: 12px;
    margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding: 4px clamp(16px, 4vw, 48px) 10px; scrollbar-width: none;
  }
  .hub-row .hub-games::-webkit-scrollbar { display: none; }
  .hub-row .hub-card { flex: 0 0 72%; scroll-snap-align: start; }
  .hub-row-head span { display: none; }
}

/* "New player" banner on the hub's globe. */
#hubTag { bottom: 16%; padding: 10px 18px; }
#hubTag b { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #8ff0b4; }
#hubTag.pop { animation: tag-pop 0.5s var(--spring); }
@keyframes tag-pop { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); } }

/* The round's question: a headline set straight on the photo (no pill, no emoji). The words rise in one by
   one as the photo opens, then a thin gold rule draws in underneath. */
#promptChip {
  display: block; flex-basis: 100%; max-width: min(85%, 640px); padding: 0 0 12px; position: relative;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-radius: 0; animation: none;
  font: 600 clamp(24px, 2.5vw, 38px) / 1.1 var(--serif); letter-spacing: -0.02em; color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}
#promptChip::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); transform-origin: left; transform: scaleX(0);
}
#promptChip.ask::after { animation: askRule 0.8s var(--ease) calc(var(--ask-delay, 0s) + 0.55s) forwards; }
@keyframes askRule { to { transform: scaleX(1); } }
/* A deeper shade under the headline so it reads on bright photos. */
.photo-shade { background: linear-gradient(to bottom, rgba(7, 10, 18, 0.7), rgba(7, 10, 18, 0.25) 24%, transparent 40%, transparent 55%, rgba(7, 10, 18, 0.85)); }
@media (max-width: 860px) { .photo-shade { background: linear-gradient(to bottom, rgba(7, 10, 18, 0.7), rgba(7, 10, 18, 0.25) 24%, transparent 40%, transparent 55%, var(--ink-2)); } }
.pane-label-2.is-question { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.25; }

/* Whole-photo mode (packs about objects): the photo is shown uncropped over a blurred, dimmed copy. */
.photo-fill { display: none; position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) brightness(0.45) saturate(1.2); }
.photo-card.fit .photo-fill { display: block; }
.photo-card.fit .photo { background-size: contain; background-repeat: no-repeat; }
.photo-card.fit .photo.enter { animation: photoInFit 1.4s var(--ease) forwards; }
@keyframes photoInFit {
  from { clip-path: circle(0% at 50% 55%); transform: scale(1.12); filter: brightness(1.8) blur(8px); }
  to { clip-path: circle(80% at 50% 50%); transform: scale(0.94); filter: none; }
}
/* Phones skip the big blur (graphics memory; see .lite above) and show a plain dark surround. */
.lite .photo-fill { filter: none; opacity: 0.18; }
/* On phones the photo credit gets its own line under the item's details instead of running into them. */
@media (max-width: 860px) { .photo-info { bottom: 34px; } }
