:root {
  --bg: #050816;
  --panel: rgba(12, 19, 43, 0.88);
  --panel-2: rgba(21, 31, 64, 0.82);
  --gold: #facc15;
  --gold-2: #f59e0b;
  --text: #eef3ff;
  --muted: #9aa9c7;
  --blue: #38bdf8;
  --green: #34d399;
  --red: #fb7185;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 22px 80px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(250,204,21,.14), transparent 35%),
    radial-gradient(circle at top right, rgba(56,189,248,.11), transparent 32%),
    linear-gradient(135deg, #030712 0%, #08112f 52%, #040816 100%);
  color: var(--text);
  overflow-x: hidden;
}

body.live-mode {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button {
  border: 0;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border .16s ease;
}
button:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
button:active { transform: translateY(0); }
button.primary { background: linear-gradient(135deg, #eab308, #f97316); color: #111827; font-weight: 900; border: 0; }
button.blue { background: linear-gradient(135deg, #0284c7, #06b6d4); color: white; border: 0; font-weight: 800; }
button.green { background: linear-gradient(135deg, #059669, #34d399); color: #031b13; border: 0; font-weight: 900; }
button.red { background: linear-gradient(135deg, #e11d48, #fb7185); color: white; border: 0; font-weight: 800; }
button.ghost { background: transparent; }
button.small { padding: 7px 10px; border-radius: 10px; font-size: 13px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

input, select, textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 7px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }

.app-shell { width: min(1480px, calc(100% - 28px)); margin: 0 auto; padding: 20px 0 32px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #fde68a, #d97706 70%);
  color: #111827;
  box-shadow: 0 0 34px rgba(250,204,21,.35);
  font-size: 24px;
  font-weight: 1000;
}
h1 { margin: 0; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.03em; }
.subtle { color: var(--muted); font-size: 14px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 18px #ef4444; }
.status-dot.connected::before { background: #22c55e; box-shadow: 0 0 18px #22c55e; }

.grid { display: grid; gap: 16px; }
.grid.host-grid { grid-template-columns: 380px 1fr; align-items: start; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 18px;
}
.card.tight { padding: 12px; border-radius: 18px; }
.card h2, .card h3 { margin: 0 0 12px; }
.card h2 { font-size: 18px; }
.card h3 { font-size: 15px; color: #dbeafe; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.stretch > * { flex: 1; }
.stack { display: grid; gap: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-grid.three { grid-template-columns: 1.2fr 1fr 1fr; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tab { opacity: .75; }
.tab.active { background: rgba(250,204,21,.16); border-color: rgba(250,204,21,.5); color: #fde68a; opacity: 1; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.11);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}
.pill.gold { color: #fef3c7; border-color: rgba(250,204,21,.36); background: rgba(250,204,21,.11); }
.pill.green { color: #bbf7d0; border-color: rgba(52,211,153,.36); background: rgba(52,211,153,.11); }
.pill.red { color: #fecdd3; border-color: rgba(251,113,133,.36); background: rgba(251,113,133,.11); }
.pill.blue { color: #bae6fd; border-color: rgba(56,189,248,.36); background: rgba(56,189,248,.11); }

.question-list {
  max-height: 565px;
  overflow: auto;
  padding-right: 4px;
}
.q-button {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin-bottom: 8px;
  border-radius: 14px;
}
.q-button.active { background: rgba(250,204,21,.15); border-color: rgba(250,204,21,.45); }
.q-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fde68a; font-weight: 900; }
.q-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #e5e7eb; }
.q-money { color: #fde68a; font-weight: 900; }

.group-edit-card { border-left: 5px solid var(--gold); }
.group-live-card {
  position: relative;
  overflow: hidden;
  min-height: 130px;
}
.group-live-card::before {
  content: '';
  position: absolute;
  inset: -80px auto auto -80px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--group-color, #facc15);
  opacity: .18;
  filter: blur(4px);
}
.group-live-card.active { border-color: rgba(250,204,21,.75); box-shadow: 0 0 50px rgba(250,204,21,.12); }
.group-name { font-size: 18px; font-weight: 1000; }
.money { color: #fde68a; font-weight: 1000; letter-spacing: -.02em; }
.big-money { font-size: clamp(34px, 5vw, 70px); line-height: 1; text-shadow: 0 0 30px rgba(250,204,21,.26); }
.score-number { font-size: 28px; font-weight: 1000; }
.member-name { color: #bae6fd; font-weight: 900; }

.host-current {
  background:
    linear-gradient(140deg, rgba(250,204,21,.16), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}
.host-current .question-text { font-size: 19px; line-height: 1.45; }
.options-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-box {
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.07);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.option-letter {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(250,204,21,.18);
  color: #fde68a;
  display: grid; place-items: center;
  font-weight: 1000;
  flex: 0 0 auto;
}

.live-header {
  padding: 22px 34px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.live-main { width: min(1640px, calc(100% - 48px)); margin: 0 auto; flex: 1; display: grid; gap: 16px; padding-bottom: 28px; }
.live-layout { display: grid; grid-template-columns: 1fr 390px; gap: 16px; align-items: start; }
.live-stage-card { min-height: 470px; display: grid; align-content: center; position: relative; overflow: hidden; }
.live-stage-card::after {
  content: '?';
  position: absolute;
  right: -24px; bottom: -72px;
  font-size: 280px;
  font-weight: 1000;
  color: rgba(255,255,255,.035);
  line-height: 1;
}
.question-kicker { color: #fde68a; font-size: 21px; font-weight: 1000; text-transform: uppercase; letter-spacing: .08em; }
.live-question { font-size: clamp(28px, 4vw, 58px); line-height: 1.15; font-weight: 1000; letter-spacing: -.035em; margin: 18px 0 22px; }
.live-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.live-option {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  border-radius: 22px;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(16,31,71,.9), rgba(8,17,47,.9));
  border: 1px solid rgba(125,211,252,.22);
  box-shadow: inset 0 0 18px rgba(56,189,248,.06);
  font-size: clamp(18px, 2vw, 29px);
  font-weight: 800;
}
.live-option .option-letter { width: 42px; height: 42px; font-size: 19px; }
.live-answer {
  margin-top: 16px;
  font-size: 24px;
  color: #bbf7d0;
  font-weight: 1000;
}
.answer-blank {
  display: inline-block;
  min-width: min(520px, 90%);
  border-bottom: 4px solid rgba(250,204,21,.8);
  height: .95em;
  vertical-align: baseline;
}

.ladder { display: grid; gap: 6px; max-height: 720px; overflow: auto; padding-right: 4px; }
.ladder-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  color: #cbd5e1;
  font-weight: 800;
}
.ladder-row.current { background: linear-gradient(135deg, #facc15, #f97316); color: #111827; box-shadow: 0 0 28px rgba(250,204,21,.28); }
.ladder-row.done { color: rgba(203,213,225,.55); }
.ladder-row .num { opacity: .75; }

.wheel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; align-items: start; }
.single-wheel-grid { grid-template-columns: minmax(260px, 420px); justify-content: center; }
.wheel-card { text-align: center; }
.wheel-wrap { position: relative; width: min(270px, 70vw); aspect-ratio: 1/1; margin: 10px auto; }
.wheel-pointer {
  position: absolute;
  top: -8px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 34px solid #fef3c7;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
  z-index: 3;
}
.wheel {
  width: 100%; height: 100%; border-radius: 50%;
  border: 12px solid rgba(255,255,255,.12);
  background: conic-gradient(#facc15 0 45deg, #38bdf8 45deg 90deg, #a78bfa 90deg 135deg, #34d399 135deg 180deg, #fb7185 180deg 225deg, #f97316 225deg 270deg, #22d3ee 270deg 315deg, #e879f9 315deg 360deg);
  box-shadow: inset 0 0 0 12px rgba(0,0,0,.18), 0 22px 70px rgba(0,0,0,.36);
  transition: transform 5.2s cubic-bezier(.11,.68,.11,.99);
  position: relative;
  overflow: hidden;
}
.wheel::before {
  content: '';
  position: absolute;
  inset: 37%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7ed, #f59e0b);
  box-shadow: 0 0 0 10px rgba(0,0,0,.2);
  z-index: 1;
}
.wheel.spinning { filter: saturate(1.2) brightness(1.08); }
.wheel-named { display: grid; place-items: center; }
.wheel-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform: translateZ(0);
}
.wheel-label-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--label-width, 88px);
  min-height: 18px;
  display: grid;
  place-items: center;
  transform:
    translate(-50%, -50%)
    translate(var(--x, 0px), var(--y, -112px))
    rotate(calc(-1 * var(--wheel-rotation, 0deg)));
  transform-origin: center center;
  pointer-events: none;
}
.wheel-label {
  width: 100%;
  display: block;
  padding: 0;
  margin: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff7ed;
  font-size: var(--label-font, 10px);
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  letter-spacing: .01em;
  text-shadow: 0 2px 8px rgba(0,0,0,.90), 0 0 8px rgba(0,0,0,.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wheel-center-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: clamp(54px, 18%, 72px);
  height: clamp(54px, 18%, 72px);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #fffde7 0%, #fde047 42%, #eab308 100%);
  border: 5px solid rgba(15,23,42,.35);
  color: #111827;
  font-size: clamp(9px, 2.6vw, 12px);
  font-weight: 1000;
  letter-spacing: .12em;
  box-shadow: 0 0 34px rgba(250,204,21,.38), inset 0 0 12px rgba(255,255,255,.45), 0 10px 22px rgba(0,0,0,.34);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.wheel-result { font-size: 25px; font-weight: 1000; color: #bae6fd; min-height: 35px; }
.wheel-subtitle { margin-top: 8px; }
.wheel-items-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  max-height: 58px;
  overflow: hidden;
}
.wheel-items-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.wheel-status {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(250,204,21,.09);
  border: 1px solid rgba(250,204,21,.22);
  color: #fde68a;
  text-align: center;
  font-weight: 900;
}
.wheel-members { color: var(--muted); font-size: 13px; line-height: 1.4; max-height: 42px; overflow: hidden; }

.scoreboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.live-scoreboard .group-live-card { padding: 16px; }
.result-banner {
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(52,211,153,.11);
  border: 1px solid rgba(52,211,153,.28);
  color: #bbf7d0;
  font-weight: 900;
}
.pause-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 20;
  background: rgba(2,6,23,.78);
  backdrop-filter: blur(10px);
  text-align: center;
}
.pause-overlay.show { display: grid; }
.pause-box {
  padding: 36px 42px;
  border-radius: 30px;
  border: 1px solid rgba(250,204,21,.45);
  background: rgba(8,13,31,.92);
  box-shadow: 0 0 80px rgba(250,204,21,.14);
}
.pause-box .big { font-size: clamp(44px, 7vw, 92px); font-weight: 1000; color: #fde68a; letter-spacing: -.05em; }

.login-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2,6,23,.86);
  backdrop-filter: blur(12px);
  z-index: 30;
  padding: 20px;
}
.login-card { width: min(460px, 100%); }
.hidden { display: none !important; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(255,255,255,.14);
  color: white;
  padding: 13px 15px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: 380px;
}

.file-input { display: none; }
.footer-note { color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 1120px) {
  .grid.host-grid, .live-layout { grid-template-columns: 1fr; }
  .live-options, .options-preview { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell, .live-main { width: min(100% - 20px, 100%); }
  .topbar, .live-header { align-items: flex-start; flex-direction: column; padding-left: 12px; padding-right: 12px; }
  .field-grid, .field-grid.three, .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .card { border-radius: 18px; padding: 14px; }
  .live-option { grid-template-columns: 46px 1fr; }
}

/* Live-show animated popups */
.game-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(250,204,21,.18), transparent 34%),
    rgba(2,6,23,.68);
  backdrop-filter: blur(8px);
  animation: overlayFlash .42s ease-out both;
  pointer-events: none;
}
.game-popup-overlay.wrong {
  background:
    radial-gradient(circle at center, rgba(251,113,133,.22), transparent 36%),
    rgba(2,6,23,.72);
}
.game-popup-overlay.steal {
  background:
    radial-gradient(circle at center, rgba(56,189,248,.22), transparent 36%),
    rgba(2,6,23,.70);
}
.game-popup-overlay.leaving { animation: overlayOut .7s ease forwards; }
.popup-card {
  width: min(760px, 96vw);
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: 38px;
  padding: clamp(26px, 5vw, 54px);
  border: 2px solid rgba(250,204,21,.55);
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.055)),
    linear-gradient(180deg, rgba(23,31,65,.96), rgba(6,11,28,.98));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.11) inset,
    0 0 80px rgba(250,204,21,.28),
    0 30px 120px rgba(0,0,0,.62);
  animation: popupEnter .68s cubic-bezier(.18, .92, .22, 1.18) both;
}
.popup-card::before {
  content: '';
  position: absolute;
  inset: -60% -20%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: rotate(18deg) translateX(-80%);
  animation: shimmerSweep 1.6s .18s ease-out both;
}
.popup-card.correct { border-color: rgba(52,211,153,.72); box-shadow: 0 0 92px rgba(52,211,153,.25), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.wrong { border-color: rgba(251,113,133,.75); animation: popupEnter .6s cubic-bezier(.18, .92, .22, 1.18) both, wrongShake .45s .58s ease-in-out both; box-shadow: 0 0 92px rgba(251,113,133,.27), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.steal { border-color: rgba(56,189,248,.75); box-shadow: 0 0 92px rgba(56,189,248,.25), 0 30px 120px rgba(0,0,0,.62); }
.popup-icon {
  width: clamp(78px, 11vw, 124px);
  height: clamp(78px, 11vw, 124px);
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 1000;
  color: #06121f;
  background: radial-gradient(circle, #fef9c3, #f59e0b);
  box-shadow: 0 0 0 12px rgba(250,204,21,.12), 0 0 48px rgba(250,204,21,.45);
  animation: iconPop .95s .18s ease both;
}
.popup-card.correct .popup-icon { background: radial-gradient(circle, #dcfce7, #22c55e); box-shadow: 0 0 0 12px rgba(34,197,94,.12), 0 0 48px rgba(34,197,94,.45); }
.popup-card.wrong .popup-icon { background: radial-gradient(circle, #ffe4e6, #e11d48); color: white; box-shadow: 0 0 0 12px rgba(225,29,72,.12), 0 0 48px rgba(225,29,72,.45); }
.popup-card.steal .popup-icon { background: radial-gradient(circle, #e0f2fe, #0284c7); color: white; box-shadow: 0 0 0 12px rgba(2,132,199,.13), 0 0 48px rgba(2,132,199,.45); }
.popup-eyebrow {
  color: #fde68a;
  font-size: clamp(12px, 1.6vw, 17px);
  letter-spacing: .18em;
  font-weight: 1000;
  text-transform: uppercase;
}
.popup-card.correct .popup-eyebrow { color: #bbf7d0; }
.popup-card.wrong .popup-eyebrow { color: #fecdd3; }
.popup-card.steal .popup-eyebrow { color: #bae6fd; }
.popup-title {
  margin-top: 8px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: .92;
  font-weight: 1000;
  letter-spacing: -.06em;
  text-shadow: 0 0 34px rgba(250,204,21,.20);
}
.popup-message {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
  color: #e0f2fe;
}
.popup-group {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff7ed;
  font-weight: 1000;
  font-size: clamp(17px, 2.2vw, 26px);
}
.popup-amount {
  margin-top: 14px;
  color: #fde68a;
  font-size: clamp(38px, 7vw, 86px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -.05em;
  text-shadow: 0 0 36px rgba(250,204,21,.36);
  animation: amountPulse 1.2s .45s ease both;
}
.popup-answer {
  margin: 18px auto 0;
  max-width: 650px;
  color: #bbf7d0;
  font-size: clamp(16px, 2.1vw, 24px);
}
.popup-sparkles {
  position: absolute;
  inset: 18px 0 auto;
  color: rgba(250,204,21,.76);
  letter-spacing: 28px;
  font-size: 28px;
  animation: sparkleFloat 2s ease-in-out infinite;
}
.popup-burst {
  position: absolute;
  width: min(560px, 80vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(250,204,21,.42), transparent, rgba(56,189,248,.34), transparent, rgba(52,211,153,.38), transparent);
  filter: blur(2px);
  opacity: .42;
  animation: burstSpin 4.8s linear infinite;
}
.popup-burst.one { top: 4%; left: 4%; }
.popup-burst.two { right: 2%; bottom: 0; animation-direction: reverse; opacity: .32; }

@keyframes overlayFlash { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { to { opacity: 0; transform: scale(1.03); } }
@keyframes popupEnter { 0% { opacity: 0; transform: translateY(48px) scale(.76) rotateX(12deg); } 72% { opacity: 1; transform: translateY(-7px) scale(1.035); } 100% { transform: translateY(0) scale(1); } }
@keyframes iconPop { 0% { transform: scale(.25) rotate(-18deg); opacity: 0; } 65% { transform: scale(1.16) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes shimmerSweep { to { transform: rotate(18deg) translateX(90%); } }
@keyframes wrongShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(5px); } }
@keyframes amountPulse { 0% { transform: scale(.78); opacity: 0; } 50% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes sparkleFloat { 0%,100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(-8px); opacity: 1; } }
@keyframes burstSpin { to { transform: rotate(360deg); } }

/* Extra show styling so the interface does not feel plain */
.card, .live-option, .q-button { position: relative; }
.live-stage-card {
  animation: stageGlow 5s ease-in-out infinite;
}
.live-option {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.live-option:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(250,204,21,.45);
  box-shadow: 0 0 34px rgba(56,189,248,.13), inset 0 0 22px rgba(56,189,248,.08);
}
.result-banner {
  animation: bannerPop .55s cubic-bezier(.18, .92, .22, 1.18) both;
}
@keyframes stageGlow { 0%,100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 75px rgba(250,204,21,.12), var(--shadow); } }
@keyframes bannerPop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Landing page */
a { color: inherit; text-decoration: none; }
.text-link {
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.text-link:hover { color: #fde68a; }
.landing-mode {
  min-height: 100vh;
}
.landing-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 42px;
}
.landing-hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 4vw, 48px);
  border-color: rgba(250,204,21,.26);
}
.landing-glow {
  position: absolute;
  inset: -120px -120px auto auto;
  width: 430px;
  height: 430px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(250,204,21,.22), transparent 62%);
  filter: blur(2px);
  animation: landingGlow 5.5s ease-in-out infinite;
}
.landing-hero::after {
  content: '₱';
  position: absolute;
  right: 4%;
  bottom: -88px;
  font-size: min(32vw, 320px);
  font-weight: 1000;
  color: rgba(255,255,255,.035);
  line-height: 1;
}
.landing-hero-content { position: relative; z-index: 1; }
.landing-brand { align-items: flex-start; }
.landing-brand h1 {
  max-width: 820px;
  margin-top: 4px;
  font-size: clamp(36px, 6.4vw, 80px);
  line-height: .95;
  text-shadow: 0 0 42px rgba(250,204,21,.14);
}
.landing-lead {
  max-width: 760px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.55;
  margin: 22px 0;
}
.landing-actions button { min-width: 180px; }
.landing-prize-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(250,204,21,.35);
  background:
    radial-gradient(circle at top, rgba(250,204,21,.2), transparent 58%),
    rgba(5, 9, 24, .64);
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 0 80px rgba(250,204,21,.14);
}
.landing-grid {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.three-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mechanic-list { display: grid; gap: 10px; }
.mechanic-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 11px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
}
.mechanic-item span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(250,204,21,.16);
  color: #fde68a;
  font-weight: 1000;
}
.mechanic-item p {
  margin: 3px 0 0;
  color: #dbeafe;
  line-height: 1.45;
}
.feature-card {
  min-height: 185px;
  overflow: hidden;
}
.feature-card h3 { margin: 8px 0; color: #fff7ed; font-size: 21px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.feature-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(250,204,21,.12);
  border: 1px solid rgba(250,204,21,.22);
  font-size: 30px;
}

.landing-disclaimer {
  margin-top: 16px;
  text-align: center;
  color: #dbeafe;
  line-height: 1.55;
  border-color: rgba(250,204,21,.22);
  background: rgba(5, 9, 24, .56);
}
.landing-disclaimer strong { color: #fde68a; }

@keyframes landingGlow { 0%,100% { transform: scale(1); opacity: .76; } 50% { transform: scale(1.12); opacity: 1; } }

@media (max-width: 960px) {
  .landing-hero, .landing-grid, .three-cards { grid-template-columns: 1fr; }
  .landing-prize-card { max-width: 100%; }
}

/* Answer controller and selected answer animations */
.answer-control-panel {
  border: 1px solid rgba(250,204,21,.22);
  border-radius: 22px;
  padding: 14px;
  background:
    radial-gradient(circle at 10% 0%, rgba(250,204,21,.10), transparent 38%),
    rgba(255,255,255,.045);
  box-shadow: inset 0 0 30px rgba(250,204,21,.04);
}
.answer-target { margin-top: 4px; color: #e0f2fe; font-weight: 900; }
.answer-picker-grid { margin-top: 12px; }
.answer-choice {
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.answer-choice:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(250,204,21,.58);
  box-shadow: 0 0 28px rgba(250,204,21,.14), inset 0 0 20px rgba(250,204,21,.08);
}
.answer-choice.chosen-correct,
.live-option.selected-correct {
  border-color: rgba(34,197,94,.82);
  background: linear-gradient(180deg, rgba(20,83,45,.88), rgba(5,46,22,.88));
  box-shadow: 0 0 42px rgba(34,197,94,.22), inset 0 0 24px rgba(34,197,94,.10);
  animation: selectedCorrectPulse 1.15s ease both;
}
.answer-choice.chosen-wrong,
.live-option.selected-wrong {
  border-color: rgba(244,63,94,.84);
  background: linear-gradient(180deg, rgba(127,29,29,.9), rgba(76,5,25,.9));
  box-shadow: 0 0 42px rgba(244,63,94,.24), inset 0 0 24px rgba(244,63,94,.10);
  animation: selectedWrongShake .62s ease both;
}
.answer-choice.chosen-pending,
.live-option.selected-pending {
  border-color: rgba(250,204,21,.82);
  background: linear-gradient(180deg, rgba(113,63,18,.72), rgba(69,26,3,.72));
  box-shadow: 0 0 42px rgba(250,204,21,.20), inset 0 0 24px rgba(250,204,21,.10);
  animation: selectedPendingGlow 1.2s ease-in-out infinite alternate;
}
.manual-judge-row {
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(250,204,21,.08);
  border: 1px solid rgba(250,204,21,.20);
}
.manual-answer-box { display: grid; gap: 12px; margin-top: 12px; }
.chosen-answer-live {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 1000;
  text-align: center;
  animation: bannerPop .55s cubic-bezier(.18, .92, .22, 1.18) both;
}
.chosen-answer-live.correct {
  color: #bbf7d0;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.34);
}
.chosen-answer-live.wrong {
  color: #fecdd3;
  background: rgba(244,63,94,.12);
  border: 1px solid rgba(244,63,94,.34);
}
.chosen-answer-live.pending {
  color: #fef3c7;
  background: rgba(250,204,21,.12);
  border: 1px solid rgba(250,204,21,.36);
}
.wheel-label-anchor.winner .wheel-label {
  color: #fff7ed;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 2px 8px rgba(0,0,0,.88), 0 0 8px rgba(0,0,0,.55), 0 0 14px rgba(250,204,21,.85);
}
.wheel-items-list span.winner {
  background: rgba(250,204,21,.20);
  border-color: rgba(250,204,21,.55);
  color: #fef3c7;
}
.wheel.spin-complete {
  filter: drop-shadow(0 0 24px rgba(250,204,21,.30));
}
.popup-card.group { border-color: rgba(250,204,21,.78); box-shadow: 0 0 92px rgba(250,204,21,.28), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.member { border-color: rgba(56,189,248,.78); box-shadow: 0 0 92px rgba(56,189,248,.26), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.group .popup-icon { background: radial-gradient(circle, #fef9c3, #f59e0b); }
.popup-card.member .popup-icon { background: radial-gradient(circle, #e0f2fe, #0284c7); color: white; }
.popup-card.group .popup-eyebrow { color: #fde68a; }
.popup-card.member .popup-eyebrow { color: #bae6fd; }
@keyframes selectedCorrectPulse { 0% { transform: scale(.985); } 50% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes selectedWrongShake { 0%,100% { transform: translateX(0); } 22% { transform: translateX(-6px); } 44% { transform: translateX(5px); } 66% { transform: translateX(-3px); } 88% { transform: translateX(2px); } }
@keyframes selectedPendingGlow { from { filter: brightness(.95); } to { filter: brightness(1.18); } }


/* Wheel of Names-style colored slices and live answer controls */
.wheel-wrap { width: min(315px, 72vw); }
.live-mode .wheel-wrap { width: min(440px, 76vw); }
.wheel {
  border: 10px solid rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.10), inset 0 0 0 14px rgba(0,0,0,.14), 0 22px 70px rgba(0,0,0,.36);
}
.wheel::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  pointer-events: none;
}
.wheel-pointer { top: -4px; }
.wheel-pointer::after {
  content: '';
  position: absolute;
  left: -7px;
  top: -31px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fef3c7;
  box-shadow: 0 0 16px rgba(250,204,21,.5);
}
.live-answer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(250,204,21,.08);
  border: 1px solid rgba(250,204,21,.22);
}
.steal-live-tools {
  background: rgba(251,113,133,.10);
  border-color: rgba(251,113,133,.32);
}
.steal-live-tools > div:first-child { min-width: min(260px, 100%); }
.live-answer-choice {
  width: 100%;
  text-align: left;
  color: inherit;
  font-size: clamp(18px, 2.1vw, 26px);
}
.live-answer-choice:disabled,
#liveManualAnswerInput:disabled,
#liveSubmitManualAnswerBtn:disabled {
  cursor: not-allowed;
  opacity: .72;
}
.manual-live-answer { margin-top: 4px; }
.live-manual-grid { grid-template-columns: 1fr auto; }
.live-option.live-answer-choice:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.012);
  border-color: rgba(250,204,21,.68);
  box-shadow: 0 0 44px rgba(250,204,21,.16), inset 0 0 28px rgba(250,204,21,.08);
}
@media (max-width: 680px) {
  .live-manual-grid { grid-template-columns: 1fr; }
  .live-answer-tools { align-items: stretch; }
}

/* Steal Dice animation */
.dice-card {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.dice-scene {
  width: min(290px, 64vw);
  height: min(290px, 64vw);
  perspective: 1100px;
  perspective-origin: 50% 42%;
  display: grid;
  place-items: center;
  margin: 18px auto 10px;
  position: relative;
}
.dice-scene::after {
  content: "";
  position: absolute;
  width: min(210px, 48vw);
  height: 42px;
  bottom: 20px;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(0,0,0,.55), rgba(0,0,0,0) 72%);
  filter: blur(4px);
  transform: translateY(46px);
}
.live-mode .dice-scene {
  width: min(400px, 72vw);
  height: min(400px, 72vw);
}
.steal-dice {
  --dice-size: min(185px, 46vw);
  width: var(--dice-size);
  height: var(--dice-size);
  position: relative;
  transform-style: preserve-3d;
  transform: translate3d(0, 0, 0) rotateX(-16deg) rotateY(28deg) rotateZ(0deg);
  filter: drop-shadow(0 34px 52px rgba(0,0,0,.62));
  will-change: transform;
}
.live-mode .steal-dice { --dice-size: min(250px, 54vw); }
.dice-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 24px;
  border: 4px solid rgba(255,255,255,.55);
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.72), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, var(--face-color), rgba(15,23,42,.88));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.15),
    inset 16px 18px 34px rgba(255,255,255,.10),
    inset -18px -24px 34px rgba(0,0,0,.35),
    0 0 0 1px rgba(15,23,42,.55);
  color: #fff7ed;
  font-weight: 1000;
  line-height: 1.05;
  text-shadow: 0 3px 12px rgba(0,0,0,.8);
  overflow: hidden;
  backface-visibility: hidden;
}
.dice-face-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.22);
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.12), rgba(0,0,0,.12));
}
.dice-face span {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92%;
  min-height: 42%;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(15,23,42,.32);
  border: 1px solid rgba(255,255,255,.22);
  font-size: clamp(12px, 2.15vw, 20px);
  word-break: break-word;
  text-align: center;
  transform: translateZ(4px);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dice-pips {
  position: absolute;
  inset: 12px;
  z-index: 1;
}
.pip {
  position: absolute;
  width: clamp(8px, 1.8vw, 14px);
  height: clamp(8px, 1.8vw, 14px);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 7px rgba(0,0,0,.45);
}
.dice-pips-1 .pip-1 { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dice-pips-2 .pip-1 { left: 8%; top: 8%; }
.dice-pips-2 .pip-2 { right: 8%; bottom: 8%; }
.dice-pips-3 .pip-1 { left: 8%; top: 8%; }
.dice-pips-3 .pip-2 { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dice-pips-3 .pip-3 { right: 8%; bottom: 8%; }
.dice-pips-4 .pip-1 { left: 8%; top: 8%; }
.dice-pips-4 .pip-2 { right: 8%; top: 8%; }
.dice-pips-4 .pip-3 { left: 8%; bottom: 8%; }
.dice-pips-4 .pip-4 { right: 8%; bottom: 8%; }
.dice-pips-5 .pip-1 { left: 8%; top: 8%; }
.dice-pips-5 .pip-2 { right: 8%; top: 8%; }
.dice-pips-5 .pip-3 { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dice-pips-5 .pip-4 { left: 8%; bottom: 8%; }
.dice-pips-5 .pip-5 { right: 8%; bottom: 8%; }
.dice-pips-6 .pip-1 { left: 8%; top: 8%; }
.dice-pips-6 .pip-2 { right: 8%; top: 8%; }
.dice-pips-6 .pip-3 { left: 8%; top: 50%; transform: translateY(-50%); }
.dice-pips-6 .pip-4 { right: 8%; top: 50%; transform: translateY(-50%); }
.dice-pips-6 .pip-5 { left: 8%; bottom: 8%; }
.dice-pips-6 .pip-6 { right: 8%; bottom: 8%; }
.steal-dice.dice-rolling { filter: drop-shadow(0 38px 58px rgba(0,0,0,.68)) saturate(1.12); }
.steal-dice.dice-complete { animation: diceWinnerPulse 1.2s ease-in-out 1; }
.dice-face.front { transform: translateZ(calc(var(--dice-size) / 2)); }
.dice-face.back { transform: rotateY(180deg) translateZ(calc(var(--dice-size) / 2)); }
.dice-face.right { transform: rotateY(90deg) translateZ(calc(var(--dice-size) / 2)); }
.dice-face.left { transform: rotateY(-90deg) translateZ(calc(var(--dice-size) / 2)); }
.dice-face.top { transform: rotateX(90deg) translateZ(calc(var(--dice-size) / 2)); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--dice-size) / 2)); }
.dice-face.winner {
  border-color: rgba(250,204,21,.98);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.20),
    inset 0 0 44px rgba(255,255,255,.20),
    0 0 42px rgba(250,204,21,.50);
}
.dice-candidates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: min(620px, 94vw);
  margin-top: -4px;
}
.dice-candidates > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.dice-candidates span:not(:first-child) {
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip-color, #facc15) 26%, rgba(15,23,42,.76));
  border: 1px solid color-mix(in srgb, var(--chip-color, #facc15) 54%, rgba(255,255,255,.18));
  color: #fff7ed;
  font-weight: 1000;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.dice-candidates span.winner {
  background: rgba(250,204,21,.22);
  border-color: rgba(250,204,21,.68);
  color: #fef3c7;
}
.dice-result {
  min-height: 38px;
  font-size: clamp(24px, 4vw, 42px);
  color: #fde68a;
  font-weight: 1000;
  text-shadow: 0 0 28px rgba(250,204,21,.28);
}
.dice-subtitle { margin-top: 8px; }
.dice-items-list span.winner {
  background: rgba(250,204,21,.20);
  border-color: rgba(250,204,21,.60);
  color: #fef3c7;
}
.steal-winner-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(251,113,133,.10);
  border: 1px solid rgba(251,113,133,.30);
}
.steal-winner-name {
  margin-top: 4px;
  color: #fecdd3;
  font-size: 22px;
  font-weight: 1000;
}
.popup-card.dice { border-color: rgba(250,204,21,.82); box-shadow: 0 0 96px rgba(250,204,21,.30), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.dice .popup-icon { background: radial-gradient(circle, #fef9c3, #f97316); color: #111827; }
.popup-card.dice .popup-eyebrow { color: #fde68a; }
@keyframes diceWinnerPulse {
  0% { filter: drop-shadow(0 34px 52px rgba(0,0,0,.62)); }
  45% { filter: drop-shadow(0 0 48px rgba(250,204,21,.58)) drop-shadow(0 34px 52px rgba(0,0,0,.62)); }
  100% { filter: drop-shadow(0 34px 52px rgba(0,0,0,.62)); }
}
@media (max-width: 680px) {
  .dice-face { border-radius: 20px; padding: 11px; }
  .dice-face-inner { padding: 14px; }
  .dice-face span { max-width: 92%; font-size: 12px; padding: 6px 7px; }
}

/* Random rewards and lifelines */
.reward-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(250,204,21,.34);
  background:
    linear-gradient(135deg, rgba(250,204,21,.16), rgba(15,23,42,.82)),
    rgba(255,255,255,.055);
  box-shadow: inset 0 0 26px rgba(250,204,21,.06);
}
.reward-card::after {
  content: '🎁';
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 44px;
  opacity: .12;
  transform: rotate(10deg);
}
.reward-card.double { border-color: rgba(52,211,153,.42); background: linear-gradient(135deg, rgba(52,211,153,.18), rgba(15,23,42,.84)); }
.reward-card.steal { border-color: rgba(251,113,133,.44); background: linear-gradient(135deg, rgba(251,113,133,.18), rgba(15,23,42,.84)); }
.reward-card.swap { border-color: rgba(168,85,247,.44); background: linear-gradient(135deg, rgba(168,85,247,.18), rgba(15,23,42,.84)); }
.reward-label {
  color: #fde68a;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.reward-title {
  margin-top: 4px;
  font-size: clamp(18px, 2vw, 25px);
  color: #fff7ed;
  font-weight: 1000;
}
.reward-message {
  margin-top: 4px;
  color: #cbd5e1;
  font-weight: 800;
  line-height: 1.35;
}
.live-mode .reward-card {
  margin: 4px 0 12px;
  padding: 18px 22px;
  box-shadow: 0 0 40px rgba(250,204,21,.08), inset 0 0 26px rgba(250,204,21,.05);
}
.lifeline-panel {
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(125,211,252,.22);
  background: linear-gradient(135deg, rgba(56,189,248,.10), rgba(255,255,255,.045));
}
.lifeline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.lifeline-badges.compact { margin-top: 8px; }
.lifeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 1000;
  border: 1px solid rgba(255,255,255,.14);
}
.lifeline-badge.available {
  color: #bae6fd;
  background: rgba(56,189,248,.13);
  border-color: rgba(56,189,248,.30);
}
.lifeline-badge.available::before { content: '●'; color: #34d399; }
.lifeline-badge.used {
  color: #94a3b8;
  background: rgba(148,163,184,.08);
  text-decoration: line-through;
  opacity: .72;
}
.lifeline-badge.used::before { content: '×'; color: #fb7185; text-decoration: none; }
.lifeline-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.lifeline-btn {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 1000;
}
.lifeline-btn.available {
  background: linear-gradient(180deg, rgba(14,165,233,.22), rgba(14,165,233,.10));
  border-color: rgba(56,189,248,.36);
  color: #dff8ff;
}
.lifeline-btn.used, .lifeline-btn:disabled {
  opacity: .52;
  cursor: not-allowed;
  filter: grayscale(.7);
}
.live-lifeline-panel { margin-bottom: 12px; }
.live-mode .lifeline-actions { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
.lifeline-hidden-option {
  opacity: .42 !important;
  filter: grayscale(.85);
  border-style: dashed !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.live-option.lifeline-hidden-option {
  background: linear-gradient(180deg, rgba(51,65,85,.62), rgba(15,23,42,.72));
  color: #94a3b8;
}
.lifeline-editor-box {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
}
.lifeline-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.lifeline-editor label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #dbeafe;
  font-weight: 900;
}
.popup-card.reward { border-color: rgba(168,85,247,.78); box-shadow: 0 0 96px rgba(168,85,247,.28), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.reward .popup-icon { background: radial-gradient(circle, #f3e8ff, #a855f7); color: white; }
.popup-card.reward .popup-eyebrow { color: #e9d5ff; }
.popup-card.lifeline { border-color: rgba(56,189,248,.78); box-shadow: 0 0 96px rgba(56,189,248,.28), 0 30px 120px rgba(0,0,0,.62); }
.popup-card.lifeline .popup-icon { background: radial-gradient(circle, #e0f2fe, #06b6d4); color: white; }
.popup-card.lifeline .popup-eyebrow { color: #bae6fd; }
@media (max-width: 760px) {
  .lifeline-actions, .live-mode .lifeline-actions { grid-template-columns: 1fr; }
}


/* Clean wheel layout fix: slice text has no background and the center badge stays locked in the middle. */
.wheel-named { display: block !important; }
.wheel-sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 34% 32%, rgba(255,255,255,.34), rgba(255,255,255,0) 30%), linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,0) 42%);
  z-index: 1;
}
.wheel::before {
  inset: 39% !important;
  z-index: 3 !important;
  box-shadow: 0 0 0 8px rgba(0,0,0,.16), inset 0 0 16px rgba(255,255,255,.45) !important;
}
.wheel-label-anchor.winner .wheel-label,
.wheel-label-anchor.winner .wheel-label {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff7ed;
  text-shadow: 0 2px 8px rgba(0,0,0,.95), 0 0 10px rgba(0,0,0,.65), 0 0 18px rgba(250,204,21,.95);
}
.live-mode .wheel-label-anchor { padding-top: clamp(20px, 6.5%, 34px); }
.live-mode .wheel-label { font-size: clamp(11px, 1.8vw, 18px); width: min(132px, 24%); }

/* Final cleanup: keep wheel picks secret until popup and make steal dice read like a cube */
.wheel-result { display: none !important; }
.dice-result { display: block !important; }
.dice-face span {
  width: 86%;
  min-height: 36%;
  margin: auto;
  padding: 8px 9px;
  box-sizing: border-box;
}
.dice-face.right span,
.dice-face.top span {
  font-size: clamp(10px, 1.65vw, 16px);
}
.dice-candidates {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(15,23,42,.34);
  border: 1px solid rgba(255,255,255,.11);
}
.dice-candidates > span:first-child::after {
  content: ' / all eligible steal groups';
  opacity: .7;
  font-weight: 800;
}

.dice-face-groups {
  position: relative;
  z-index: 3;
  width: 90%;
  display: grid;
  gap: 7px;
  align-content: center;
  justify-items: center;
  transform: translateZ(5px);
}
.dice-group-name {
  display: block;
  width: 100%;
  max-width: 150px;
  padding: 7px 8px;
  border-radius: 13px;
  background: rgba(15,23,42,.42);
  border: 1px solid rgba(255,255,255,.20);
  color: #fff7ed;
  font-style: normal;
  font-size: clamp(10px, 1.6vw, 16px);
  font-weight: 1000;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.05;
  text-shadow: 0 3px 10px rgba(0,0,0,.85);
  box-sizing: border-box;
}
.dice-group-name.active-face {
  background: color-mix(in srgb, var(--candidate-color, #facc15) 42%, rgba(15,23,42,.46));
  border-color: color-mix(in srgb, var(--candidate-color, #facc15) 76%, rgba(255,255,255,.35));
  box-shadow: 0 0 18px color-mix(in srgb, var(--candidate-color, #facc15) 42%, transparent);
}
.live-mode .dice-group-name { max-width: 190px; font-size: clamp(12px, 2vw, 20px); }
.dice-face span { display: none; }

/* Hide wheel candidate chips so the result stays a surprise until popup reveal. */
.wheel-items-list { display: none !important; }


/* Steal dice final alignment: real cube faces with one clear group name per face. */
.dice-face-inner {
  overflow: hidden;
}
.dice-face-label {
  position: relative;
  z-index: 4;
  width: 82%;
  max-width: 185px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(15,23,42,.48);
  border: 1px solid rgba(255,255,255,.26);
  color: #fff7ed;
  font-size: clamp(13px, 2.2vw, 21px);
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .025em;
  text-shadow: 0 3px 12px rgba(0,0,0,.9);
  box-shadow: 0 8px 22px rgba(0,0,0,.25), inset 0 0 18px rgba(255,255,255,.08);
  box-sizing: border-box;
  transform: translateZ(8px);
}
.dice-face.right .dice-face-label,
.dice-face.top .dice-face-label,
.dice-face.left .dice-face-label,
.dice-face.bottom .dice-face-label,
.dice-face.back .dice-face-label {
  font-size: clamp(11px, 1.75vw, 17px);
  max-width: 160px;
}
.live-mode .dice-face-label {
  max-width: 230px;
  font-size: clamp(16px, 2.5vw, 28px);
}
.live-mode .dice-face.right .dice-face-label,
.live-mode .dice-face.top .dice-face-label,
.live-mode .dice-face.left .dice-face-label,
.live-mode .dice-face.bottom .dice-face-label,
.live-mode .dice-face.back .dice-face-label {
  font-size: clamp(13px, 2vw, 22px);
}
.dice-candidates span.winner {
  background: color-mix(in srgb, var(--chip-color, #facc15) 26%, rgba(15,23,42,.76));
  border-color: color-mix(in srgb, var(--chip-color, #facc15) 54%, rgba(255,255,255,.18));
  color: #fff7ed;
}

/* Final wheel label visibility fix: keep actual group/member names readable inside slices. */
.wheel-labels {
  z-index: 4 !important;
  overflow: visible !important;
}
.wheel::before {
  z-index: 2 !important;
  inset: 42% !important;
}
.wheel-label-anchor,
.live-mode .wheel-label-anchor {
  width: var(--label-width, 96px) !important;
  min-height: 22px !important;
  padding-top: 0 !important;
  overflow: visible !important;
}
.wheel-label,
.live-mode .wheel-label {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  font-size: var(--label-font, 12px) !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
  color: #fff7ed !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.live-mode .wheel-label-anchor {
  width: calc(var(--label-width, 96px) + 26px) !important;
}
@media (max-width: 680px) {
  .wheel-label-anchor,
  .live-mode .wheel-label-anchor {
    width: calc(var(--label-width, 88px) + 16px) !important;
  }
}


/* Emergency final wheel-name visibility fix: never wrap group/member names into single letters. */
.wheel-label-anchor,
.live-mode .wheel-label-anchor {
  width: var(--label-width, 158px) !important;
  min-width: var(--label-width, 158px) !important;
  max-width: none !important;
  overflow: visible !important;
  z-index: 10 !important;
}
.wheel-label,
.live-mode .wheel-label {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  font-size: var(--label-font, 15px) !important;
  line-height: 1 !important;
  color: #fff7ed !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-align: center !important;
  text-shadow: 0 3px 7px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,.7) !important;
}
.wheel-label-anchor.winner .wheel-label {
  color: #fff7ed !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* FINAL CLEAN REBUILD: wheel labels use SVG text so names never collapse into one letter. */
.wheel .wheel-labels,
.wheel .wheel-label-anchor,
.wheel .wheel-label { display: none !important; }
.wheel-svg-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}
.wheel-svg-label {
  fill: #fff7ed;
  stroke: rgba(2,6,23,.92);
  stroke-width: .58px;
  paint-order: stroke fill;
  font-weight: 1000;
  font-family: Inter, Arial, sans-serif;
  letter-spacing: .02em;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.85));
}
.live-mode .wheel-svg-label { stroke-width: .52px; }
.wheel-center-badge {
  z-index: 12 !important;
  pointer-events: none;
}
.wheel-result,
.wheel-items-list { display: none !important; }

/* FINAL STEAL CARD: replace broken dice with a true 2-sided flipping card. */
.steal-card-panel { text-align: center; }
.flip-card-scene {
  width: min(360px, 78vw);
  height: min(230px, 50vw);
  margin: 20px auto 10px;
  perspective: 1200px;
  display: grid;
  place-items: center;
  position: relative;
}
.live-mode .flip-card-scene {
  width: min(520px, 80vw);
  height: min(320px, 48vw);
}
.steal-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  border-radius: 28px;
  filter: drop-shadow(0 28px 48px rgba(0,0,0,.62));
}
.flip-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border-radius: 28px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.38), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--face-color, #facc15) 82%, #ffffff 8%), color-mix(in srgb, var(--face-color, #facc15) 62%, #020617 24%));
  border: 4px solid rgba(255,255,255,.36);
  box-shadow: inset 0 0 0 8px rgba(15,23,42,.18), inset 0 0 42px rgba(255,255,255,.13);
  color: #fff7ed;
  box-sizing: border-box;
}
.flip-card-face::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  border: 2px dashed rgba(255,255,255,.38);
  pointer-events: none;
}
.flip-back { transform: rotateY(180deg); }
.flip-card-small {
  position: relative;
  z-index: 2;
  font-size: clamp(12px, 1.4vw, 18px);
  font-weight: 1000;
  letter-spacing: .18em;
  color: rgba(255,255,255,.86);
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
}
.flip-card-name {
  position: relative;
  z-index: 2;
  width: 92%;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(15,23,42,.42);
  border: 1px solid rgba(255,255,255,.28);
  font-size: clamp(25px, 4vw, 48px);
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 4px 12px rgba(0,0,0,.92);
  box-sizing: border-box;
}
.steal-flip-card.dice-rolling {
  filter: drop-shadow(0 38px 64px rgba(0,0,0,.70)) saturate(1.16);
}
.steal-flip-card.dice-complete .flip-card-name {
  animation: chosenPulse 1.15s ease-in-out 1;
}
@keyframes chosenPulse {
  0%,100% { transform: scale(1); }
  45% { transform: scale(1.055); box-shadow: 0 0 36px rgba(250,204,21,.28); }
}
.dice-candidates { display: none !important; }
.dice-result { display: none !important; }


/* 2026-07-01: robust wheel labels that fit inside slices without overlap */
.wheel-svg-labels { display: none !important; }
.wheel-labels-html {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}
.wheel-segment-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.wheel-segment-label-text {
  display: block;
  width: 100%;
  min-width: 0;
  color: #fff7ed;
  font-family: Inter, Arial, sans-serif;
  font-weight: 1000;
  line-height: .95;
  letter-spacing: .01em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: 0 2px 8px rgba(0,0,0,.96), 0 1px 0 rgba(2,6,23,.95);
  transform: rotate(calc(-1 * var(--wheel-rotation, 0deg)));
  transform-origin: center center;
}
.live-mode .wheel-segment-label-text {
  line-height: .98;
}

/* 2026-07-01 final wheel/card stability patch */
.wheel-segment-label {
  height: 20px;
  max-height: 20px;
  overflow: visible;
}
.wheel-segment-label-text {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transform: none !important;
  max-width: 100%;
  padding: 0 3px;
  box-sizing: border-box;
}
.live-mode .wheel-segment-label {
  height: 24px;
  max-height: 24px;
}
@keyframes stealCardFlipToFront {
  0% { transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1); }
  12% { transform: rotateY(216deg) rotateX(8deg) rotateZ(-1deg) scale(1.02); }
  25% { transform: rotateY(450deg) rotateX(-7deg) rotateZ(1deg) scale(1.035); }
  38% { transform: rotateY(684deg) rotateX(8deg) rotateZ(-1deg) scale(1.02); }
  50% { transform: rotateY(900deg) rotateX(-5deg) rotateZ(1deg) scale(1.04); }
  63% { transform: rotateY(1134deg) rotateX(6deg) rotateZ(-1deg) scale(1.025); }
  75% { transform: rotateY(1350deg) rotateX(-6deg) rotateZ(1deg) scale(1.035); }
  88% { transform: rotateY(1584deg) rotateX(5deg) rotateZ(-.5deg) scale(1.015); }
  100% { transform: rotateY(1800deg) rotateX(0deg) rotateZ(0deg) scale(1); }
}
@keyframes stealCardFlipToBack {
  0% { transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1); }
  12% { transform: rotateY(238deg) rotateX(8deg) rotateZ(-1deg) scale(1.02); }
  25% { transform: rotateY(495deg) rotateX(-7deg) rotateZ(1deg) scale(1.035); }
  38% { transform: rotateY(752deg) rotateX(8deg) rotateZ(-1deg) scale(1.02); }
  50% { transform: rotateY(990deg) rotateX(-5deg) rotateZ(1deg) scale(1.04); }
  63% { transform: rotateY(1247deg) rotateX(6deg) rotateZ(-1deg) scale(1.025); }
  75% { transform: rotateY(1485deg) rotateX(-6deg) rotateZ(1deg) scale(1.035); }
  88% { transform: rotateY(1742deg) rotateX(5deg) rotateZ(-.5deg) scale(1.015); }
  100% { transform: rotateY(1980deg) rotateX(0deg) rotateZ(0deg) scale(1); }
}
.steal-flip-card.dice-rolling {
  animation-play-state: running;
}
.flip-card-face {
  overflow: hidden;
}
.flip-card-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* 2026-07-01 final readability pass: bigger wheel labels that auto-fit each slice */
.wheel-labels-html {
  position: absolute !important;
  inset: 0 !important;
  z-index: 8 !important;
  pointer-events: none !important;
  display: block !important;
}
.wheel-segment-label {
  position: absolute !important;
  transform: translate(-50%, -50%) !important;
  height: clamp(26px, 7%, 38px) !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  box-sizing: border-box !important;
}
.wheel-segment-label-text {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  color: #fff7ed !important;
  font-family: Inter, Arial, sans-serif !important;
  font-weight: 1000 !important;
  line-height: .95 !important;
  letter-spacing: .01em !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-shadow: 0 3px 7px rgba(0,0,0,.96), 0 1px 0 rgba(2,6,23,.98), 0 0 2px rgba(2,6,23,.92) !important;
  transform: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
.live-mode .wheel-segment-label {
  height: clamp(30px, 7.5%, 44px) !important;
}
.live-mode .wheel-segment-label-text {
  line-height: .96 !important;
}

/* 2026-07-01 final steal card: one card only; text swaps every flip */
.flip-card-scene {
  width: min(390px, 80vw) !important;
  height: min(240px, 50vw) !important;
  perspective: 1200px !important;
}
.live-mode .flip-card-scene {
  width: min(560px, 82vw) !important;
  height: min(330px, 48vw) !important;
}
.steal-flip-card {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  transform-style: preserve-3d !important;
  border-radius: 30px !important;
  filter: drop-shadow(0 28px 48px rgba(0,0,0,.62)) !important;
}
.flip-card-face.single-flip-face,
.single-flip-face {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 12px !important;
  border-radius: 30px !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  transform: none !important;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.42), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--face-color, #facc15) 82%, #ffffff 8%), color-mix(in srgb, var(--face-color, #facc15) 62%, #020617 24%)) !important;
  border: 4px solid rgba(255,255,255,.36) !important;
  box-shadow: inset 0 0 0 8px rgba(15,23,42,.18), inset 0 0 42px rgba(255,255,255,.13) !important;
  color: #fff7ed !important;
  box-sizing: border-box !important;
}
.single-flip-face::before {
  content: '' !important;
  position: absolute !important;
  inset: 18px !important;
  border-radius: 23px !important;
  border: 2px dashed rgba(255,255,255,.38) !important;
  pointer-events: none !important;
}
.steal-flip-card .flip-back { display: none !important; }
@keyframes singleStealCardFlip {
  0% { transform: rotateY(0deg) rotateX(0deg) scale(1); }
  42% { transform: rotateY(82deg) rotateX(2deg) scale(1.035); }
  50% { transform: rotateY(90deg) rotateX(0deg) scale(.98); }
  58% { transform: rotateY(82deg) rotateX(-2deg) scale(1.035); }
  100% { transform: rotateY(0deg) rotateX(0deg) scale(1); }
}
.steal-flip-card.dice-rolling {
  animation-play-state: running !important;
  filter: drop-shadow(0 38px 64px rgba(0,0,0,.70)) saturate(1.16) !important;
}
.steal-flip-card.dice-complete {
  filter: drop-shadow(0 30px 56px rgba(0,0,0,.65)) saturate(1.1) !important;
}
.flip-card-name {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 88% !important;
  min-height: 78px !important;
  max-height: 150px !important;
  overflow: hidden !important;
  padding: 14px 18px !important;
  border-radius: 18px !important;
  background: rgba(15,23,42,.42) !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  font-size: clamp(26px, 4.2vw, 52px) !important;
  font-weight: 1000 !important;
  line-height: 1.05 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-shadow: 0 4px 12px rgba(0,0,0,.92) !important;
  box-sizing: border-box !important;
}


/* Answer timer controls */
.timer-control-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .42);
  border: 1px solid rgba(250, 204, 21, .22);
}
.answer-timer {
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 165, 233, .15), rgba(250, 204, 21, .10));
  border: 1px solid rgba(186, 230, 253, .22);
  box-shadow: inset 0 0 20px rgba(255,255,255,.04), 0 12px 36px rgba(0,0,0,.18);
}
.answer-timer.compact { padding: 10px 12px; }
.answer-timer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 1000;
  letter-spacing: .08em;
  color: #e0f2fe;
  text-transform: uppercase;
}

.answer-timer-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.answer-timer-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.answer-timer-actions button {
  min-height: 30px;
  padding: 7px 12px;
  line-height: 1;
}
.answer-timer.with-controls .answer-timer-head {
  gap: 12px;
}
@media (max-width: 640px) {
  .answer-timer-right { justify-content: flex-start; width: 100%; }
}

.answer-timer-time {
  font-size: clamp(22px, 3.2vw, 42px);
  color: #fef3c7;
  text-shadow: 0 0 18px rgba(250,204,21,.34);
  letter-spacing: .04em;
}
.answer-timer-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  margin-top: 8px;
  background: rgba(15,23,42,.62);
  border: 1px solid rgba(255,255,255,.12);
}
.answer-timer-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #facc15);
  transition: width .25s linear;
}
.answer-timer.expired {
  border-color: rgba(248,113,113,.68);
  background: linear-gradient(135deg, rgba(239,68,68,.28), rgba(127,29,29,.18));
  animation: timerPulse 1s ease-in-out infinite;
}
.answer-timer.expired .answer-timer-time { color: #fecaca; }
.answer-timer.expired .answer-timer-fill { background: #ef4444; }
@keyframes timerPulse {
  0%, 100% { box-shadow: inset 0 0 20px rgba(255,255,255,.04), 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: inset 0 0 20px rgba(255,255,255,.04), 0 0 30px rgba(239,68,68,.28); }
}


/* Timer timeout / steal-card visibility patch */
.single-flip-face,
.flip-card-face.single-flip-face {
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
}
.steal-flip-card.dice-rolling .flip-card-name {
  animation: flipNamePulse 640ms ease-in-out infinite;
}
@keyframes flipNamePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  48%, 52% { opacity: .35; transform: scale(.94); }
}


/* 2026-07-01 steal-flow hotfix: one real two-sided card, both remaining groups visible during flip */
.flip-card-scene {
  width: min(430px, 82vw) !important;
  height: min(265px, 52vw) !important;
  perspective: 1300px !important;
  display: grid !important;
  place-items: center !important;
}
.live-mode .flip-card-scene {
  width: min(590px, 84vw) !important;
  height: min(350px, 50vw) !important;
}
.steal-flip-card {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  transform-style: preserve-3d !important;
  border-radius: 30px !important;
  will-change: transform !important;
}
.flip-card-face,
.flip-card-face.single-flip-face,
.single-flip-face {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 12px !important;
  border-radius: 30px !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  padding: 22px !important;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.42), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--face-color, #facc15) 82%, #ffffff 8%), color-mix(in srgb, var(--face-color, #facc15) 62%, #020617 24%)) !important;
  border: 4px solid rgba(255,255,255,.36) !important;
  box-shadow: inset 0 0 0 8px rgba(15,23,42,.18), inset 0 0 42px rgba(255,255,255,.13) !important;
  color: #fff7ed !important;
  box-sizing: border-box !important;
}
.flip-front { transform: rotateY(0deg) !important; }
.flip-back { transform: rotateY(180deg) !important; display: grid !important; }
.flip-card-face::before,
.single-flip-face::before {
  content: '' !important;
  position: absolute !important;
  inset: 18px !important;
  border-radius: 23px !important;
  border: 2px dashed rgba(255,255,255,.38) !important;
  pointer-events: none !important;
}
.steal-flip-card.dice-rolling {
  filter: drop-shadow(0 38px 64px rgba(0,0,0,.70)) saturate(1.16) !important;
}
.steal-flip-card.dice-complete .flip-card-name {
  animation: chosenPulse 1.15s ease-in-out 1 !important;
}
.flip-card-name {
  font-size: clamp(26px, 4vw, 52px) !important;
  max-width: 94% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
