:root {
  --bg: #f2f7f6;
  --surface: #ffffff;
  --text: #1f2d2b;
  --muted: #6b7f7c;
  --accent: #0f8b8d;
  --accent-dark: #0c6e70;
  --accent-soft: #e0f2f1;
  --danger: #d9534f;
  --gold: #f4a340;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 60, 58, 0.08);
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.topbar {
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 24px 0;
}
.topbar h1 { font-size: 20px; color: var(--accent-dark); margin-bottom: 10px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  border: none; background: transparent; font-family: var(--font);
  font-size: 16px; padding: 10px 20px; cursor: pointer;
  border-radius: 10px 10px 0 0; color: var(--muted);
  border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--accent-dark); background: var(--accent-soft); }
.tab.active { color: var(--accent-dark); font-weight: 700; border-bottom-color: var(--accent); }
.tab:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
main { max-width: 860px; margin: 24px auto; padding: 0 16px; }
.panel { display: none; }
.panel.active { display: block; }
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px;
}
.card h3 { margin-bottom: 12px; }
.controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.controls label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
select, .text-input {
  font-family: var(--font); font-size: 14px; padding: 8px 10px;
  border: 1px solid #cfe0de; border-radius: 8px; background: #fff; color: var(--text);
}
textarea {
  width: 100%; font-family: var(--font); font-size: 15px; line-height: 1.6;
  padding: 12px; border: 1px solid #cfe0de; border-radius: 10px; resize: vertical;
  margin-bottom: 12px;
}
.switch-label { cursor: pointer; }
.btn {
  font-family: var(--font); font-size: 15px; border: none; border-radius: 10px;
  padding: 10px 22px; cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { background: var(--accent-soft); color: var(--accent-dark); }
.btn.danger { background: #fdecea; color: var(--danger); }
.btn.small { font-size: 13px; padding: 6px 14px; }
.btn.big { font-size: 20px; padding: 14px 48px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.muted { color: var(--muted); font-size: 14px; }
.draw-stage {
  position: relative; min-height: clamp(440px, 58vh, 720px);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, #123c52 0%, #0b2236 38%, #060f1e 72%, #030811 100%);
  isolation: isolate;
}
/* ---- 深空粒子场 ---- */
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* 星云光斑：缓慢漂移 */
.nebula {
  position: absolute; border-radius: 50%; z-index: 0; pointer-events: none;
  filter: blur(50px); opacity: 0.55; mix-blend-mode: screen;
}
.nebula-a {
  width: 55%; height: 55%; left: 8%; top: 6%;
  background: radial-gradient(circle, rgba(0,229,255,0.55), rgba(0,120,255,0.12) 55%, transparent 72%);
  animation: drift-a 18s ease-in-out infinite alternate;
}
.nebula-b {
  width: 50%; height: 50%; right: 6%; bottom: 4%;
  background: radial-gradient(circle, rgba(180,80,255,0.5), rgba(90,40,200,0.12) 55%, transparent 72%);
  animation: drift-b 22s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate(0,0) scale(1); } to { transform: translate(12%,10%) scale(1.18); } }
@keyframes drift-b { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-14%,-8%) scale(0.9); } }
/* 透视网格地面，营造空间纵深 */
.grid-floor {
  position: absolute; left: -50%; right: -50%; bottom: -34%; height: 72%; z-index: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.16) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(320px) rotateX(66deg);
  mask-image: linear-gradient(to top, #000 5%, transparent 78%);
  animation: grid-move 3.2s linear infinite;
}
@keyframes grid-move { from { background-position: 0 0; } to { background-position: 0 46px; } }

/* ---- 能量核心 ---- */
.energy-core {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 1;
  transform-style: preserve-3d; pointer-events: none;
}
.core-halo {
  position: absolute; left: 50%; top: 50%; width: calc(var(--sphere-r, 200px) * 2.6); height: calc(var(--sphere-r, 200px) * 2.6);
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.16) 0%, rgba(0,150,255,0.07) 38%, transparent 68%);
  animation: core-breathe 4s ease-in-out infinite;
}
@keyframes core-breathe { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 0.7; } 50% { transform: translate(-50%,-50%) scale(1.12); opacity: 1; } }
.core-orb {
  position: absolute; left: 50%; top: 50%; width: calc(var(--sphere-r, 200px) * 1.5); height: calc(var(--sphere-r, 200px) * 1.5);
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(160,255,255,0.5), rgba(0,180,220,0.14) 40%, rgba(0,40,90,0.05) 70%, transparent 74%);
  box-shadow: inset 0 0 60px rgba(0,229,255,0.18), 0 0 40px rgba(0,180,255,0.14);
  animation: orb-pulse 3.4s ease-in-out infinite;
}
@keyframes orb-pulse { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } }
/* 三道不同倾角、不同速度的轨道环 */
.core-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  border: 1px solid rgba(0,229,255,0.42);
  box-shadow: 0 0 12px rgba(0,229,255,0.3), inset 0 0 12px rgba(0,229,255,0.16);
  transform-style: preserve-3d;
}
.ring-1 {
  width: calc(var(--sphere-r, 200px) * 2.3); height: calc(var(--sphere-r, 200px) * 2.3);
  margin: calc(var(--sphere-r, 200px) * -1.15) 0 0 calc(var(--sphere-r, 200px) * -1.15);
  border-top-color: rgba(120,255,255,0.95); border-right-color: rgba(0,170,255,0.15);
  animation: ring-spin 9s linear infinite;
}
.ring-2 {
  width: calc(var(--sphere-r, 200px) * 2.55); height: calc(var(--sphere-r, 200px) * 1.5);
  margin: calc(var(--sphere-r, 200px) * -0.75) 0 0 calc(var(--sphere-r, 200px) * -1.275);
  border-color: rgba(180,110,255,0.42); border-bottom-color: rgba(210,160,255,0.95);
  box-shadow: 0 0 12px rgba(180,110,255,0.3);
  animation: ring-spin2 13s linear infinite reverse;
}
.ring-3 {
  width: calc(var(--sphere-r, 200px) * 1.75); height: calc(var(--sphere-r, 200px) * 2.45);
  margin: calc(var(--sphere-r, 200px) * -1.225) 0 0 calc(var(--sphere-r, 200px) * -0.875);
  border-color: rgba(0,255,190,0.35); border-left-color: rgba(120,255,210,0.95);
  box-shadow: 0 0 12px rgba(0,255,190,0.25);
  animation: ring-spin3 17s linear infinite;
}
@keyframes ring-spin { from { transform: rotateX(72deg) rotateY(0deg); } to { transform: rotateX(72deg) rotateY(360deg); } }
@keyframes ring-spin2 { from { transform: rotateY(64deg) rotateZ(0deg); } to { transform: rotateY(64deg) rotateZ(360deg); } }
@keyframes ring-spin3 { from { transform: rotateX(-58deg) rotateY(0deg); } to { transform: rotateX(-58deg) rotateY(-360deg); } }
.core-spark {
  position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  margin: -4px 0 0 -4px; background: #eaffff;
  box-shadow: 0 0 18px 6px rgba(0,229,255,0.9), 0 0 50px 16px rgba(0,170,255,0.5);
  animation: spark-flash 2.6s ease-in-out infinite;
}
@keyframes spark-flash { 0%,100% { opacity: 0.55; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.35); } }

/* ===== 揭晓冲击波：三环错峰爆发 + 中心闪光 + 放射光束 ===== */
.shockwave {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  z-index: 8; pointer-events: none;
}
.shock-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  opacity: 0; transform: translate(-50%,-50%) scale(0.2);
}
.shockwave.fire .shock-ring { animation: shock-ring 1.05s cubic-bezier(0.1,0.75,0.25,1) forwards; }
.shockwave.fire .ring-a {
  border: 10px solid rgba(180,255,255,0.98);
  box-shadow: 0 0 34px 12px rgba(0,229,255,0.95), inset 0 0 34px 12px rgba(0,229,255,0.8);
}
.shockwave.fire .ring-b {
  border: 7px solid rgba(120,150,255,0.95);
  box-shadow: 0 0 40px 14px rgba(80,110,255,0.8);
  animation-delay: 0.12s;
  animation-duration: 1.15s;
}
.shockwave.fire .ring-c {
  border: 5px solid rgba(220,140,255,0.9);
  box-shadow: 0 0 46px 16px rgba(180,80,255,0.75);
  animation-delay: 0.24s;
  animation-duration: 1.25s;
}
@keyframes shock-ring {
  0% { opacity: 1; transform: translate(-50%,-50%) scale(0.16); }
  55% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(34); }
}
/* 中心白色闪光 */
.shock-flash {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px;
  margin: -30px 0 0 -30px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff 0%, rgba(190,250,255,0.95) 25%, rgba(0,200,255,0.5) 55%, transparent 75%);
}
.shockwave.fire .shock-flash { animation: shock-flash 0.7s ease-out forwards; }
@keyframes shock-flash {
  0% { opacity: 0; transform: scale(0.2); }
  18% { opacity: 1; transform: scale(2.2); }
  100% { opacity: 0; transform: scale(9); }
}
/* 放射光束：锥型渐变旋转 */
.shock-rays {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  opacity: 0;
  background: conic-gradient(from 0deg,
    rgba(255,255,255,0.95) 0deg, transparent 7deg, transparent 30deg,
    rgba(120,240,255,0.9) 36deg, transparent 43deg, transparent 68deg,
    rgba(255,255,255,0.85) 74deg, transparent 81deg, transparent 108deg,
    rgba(180,140,255,0.9) 114deg, transparent 121deg, transparent 150deg,
    rgba(255,255,255,0.95) 156deg, transparent 163deg, transparent 190deg,
    rgba(120,240,255,0.9) 196deg, transparent 203deg, transparent 230deg,
    rgba(255,255,255,0.85) 236deg, transparent 243deg, transparent 270deg,
    rgba(180,140,255,0.9) 276deg, transparent 283deg, transparent 310deg,
    rgba(255,255,255,0.95) 316deg, transparent 323deg, transparent 360deg);
}
.shockwave.fire .shock-rays { animation: shock-rays 0.8s cubic-bezier(0.1,0.7,0.3,1) forwards; }
@keyframes shock-rays {
  0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  15% { opacity: 0.95; }
  100% { opacity: 0; transform: scale(30) rotate(28deg); }
}
/* 舞台震动 */
.draw-stage.blast { animation: blast-shake 0.55s cubic-bezier(0.36,0.07,0.19,0.97); }
@keyframes blast-shake {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-4px, 3px); }
  22% { transform: translate(5px, -3px); }
  36% { transform: translate(-4px, -2px); }
  52% { transform: translate(3px, 4px); }
  68% { transform: translate(-2px, 2px); }
  84% { transform: translate(2px, -2px); }
}
/* 扫描线 */
.scanline {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.24;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}
.stage-hint {
  position: absolute; font-size: 17px; font-weight: 700;
  color: #8ff6ff; letter-spacing: 2px; z-index: 6;
  text-shadow: 0 0 12px rgba(0,229,255,0.9), 0 0 28px rgba(0,170,255,0.6);
  animation: hint-glow 2.2s ease-in-out infinite;
}
@keyframes hint-glow { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } }
.stage-expand {
  position: absolute; top: 12px; right: 14px; z-index: 7;
  font-size: 13px; padding: 6px 12px;
  background: rgba(8,32,52,0.72); color: #9ff2ff; border: 1px solid rgba(0,229,255,0.4);
}
.stage-expand:hover { background: rgba(0,229,255,0.2); }
/* 全屏模式：舞台铺满视口，球体窗口跟着占满 */
.draw-stage.fullscreen {
  position: fixed; inset: 0; z-index: 80;
  min-height: 100vh; height: 100vh;
  margin: 0; border-radius: 0;
}
.draw-stage.fullscreen .stage-expand { top: 18px; right: 22px; }
.draw-stage.fullscreen .sphere-name { font-size: 22px; padding: 7px 18px; }
.draw-stage.fullscreen .sphere-name.chosen { font-size: 30px; padding: 12px 34px; }
.draw-stage.fullscreen .sphere-ball.multi-picked .sphere-name.chosen { font-size: 22px; padding: 10px 22px; }
/* 点名进行中的按钮状态 */
.btn.stop { background: var(--danger); color: #fff; }
.btn.stop:hover { background: #c94541; }
/* 全屏时把开始/停止按钮浮到舞台之上，否则会被 fixed 舞台盖住 */
body.stage-fullscreen #btn-draw {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 90; box-shadow: 0 8px 24px rgba(15,60,58,0.3);
}
body.stage-fullscreen #pool-info {
  position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 90; color: #9ff2ff; font-weight: 600; margin: 0;
  text-shadow: 0 0 10px rgba(0,229,255,0.7);
}
.sphere-viewport {
  position: absolute; inset: 0; z-index: 5;
  perspective: 1200px;
  display: flex; align-items: center; justify-content: center;
}
.sphere-ball {
  position: relative; width: 0; height: 0;
  transform-style: preserve-3d;
}
.sphere-name {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  transform-style: preserve-3d;
  font-size: 17px; font-weight: 600; white-space: nowrap;
  color: #d8fbff;
  background: linear-gradient(145deg, rgba(20,80,110,0.82), rgba(8,40,70,0.78));
  border: 1px solid rgba(120,235,255,0.55);
  padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 0 10px rgba(0,200,255,0.3), inset 0 0 8px rgba(0,200,255,0.12);
  text-shadow: 0 0 8px rgba(120,240,255,0.8);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.sphere-name::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.28) 50%, transparent 80%);
  opacity: 0; pointer-events: none;
}
.sphere-name.back { filter: blur(0.7px) saturate(0.55); }
.sphere-name.chosen {
  background: linear-gradient(145deg, #00d5ff, #0a7fff 55%, #6a3cff);
  color: #fff; font-size: 22px; padding: 10px 26px;
  z-index: 10;
  border: 1.5px solid rgba(230,255,255,0.95);
  text-shadow: 0 0 14px rgba(255,255,255,0.95), 0 0 26px rgba(0,229,255,0.9);
  box-shadow:
    0 0 0 4px rgba(0,229,255,0.28),
    0 0 24px 6px rgba(0,200,255,0.85),
    0 0 60px 14px rgba(120,60,255,0.5),
    inset 0 0 18px rgba(255,255,255,0.5);
  animation: chosen-pop 0.5s cubic-bezier(0.2,1.5,0.4,1);
}
.sphere-name.chosen::after { animation: sheen 2.4s linear infinite; }
@keyframes sheen {
  0% { opacity: 0; transform: translateX(-120%); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(120%); }
}
/* 只动 filter/opacity，不碰 transform —— transform 由 JS 控制排布 */
@keyframes chosen-pop {
  0% { filter: brightness(2.8) saturate(1.5); opacity: 0.3; }
  50% { filter: brightness(1.9) saturate(1.2); opacity: 1; }
  100% { filter: brightness(1) saturate(1); opacity: 1; }
}
/* 抽取结果揭晓后，未抽中的名字淡出避让 */
.sphere-name.dimmed { opacity: 0.1 !important; filter: blur(1px) saturate(0.3); }
.sphere-name.picked {
  background: linear-gradient(145deg, rgba(120,60,255,0.75), rgba(40,20,110,0.8));
  color: #f0e4ff; font-weight: 700; opacity: 1 !important;
  border-color: rgba(200,150,255,0.7);
  box-shadow: 0 0 18px rgba(160,80,255,0.55);
}
/* 多人同时抽中：高亮标签更紧凑，避免横向排开时互相挤压 */
.sphere-ball.multi-picked .sphere-name.chosen {
  font-size: 18px; padding: 8px 16px;
  box-shadow: 0 0 0 3px rgba(0,229,255,0.25), 0 0 20px 4px rgba(0,200,255,0.7), inset 0 0 12px rgba(255,255,255,0.4);
}
@media (max-width: 600px) {
  .draw-stage { min-height: 420px; }
  .sphere-name { font-size: 15px; padding: 4px 11px; }
  .sphere-name.chosen { font-size: 19px; padding: 8px 20px; }
}
/* 点名中：核心加速、星云变亮、舞台轻微脉冲 */
.draw-stage.rolling .core-halo { animation-duration: 1.1s; opacity: 1; }
.draw-stage.rolling .core-orb { animation-duration: 0.9s; }
.draw-stage.rolling .core-spark { animation-duration: 0.7s; }
.draw-stage.rolling .ring-1 { animation-duration: 1.6s; }
.draw-stage.rolling .ring-2 { animation-duration: 2.1s; }
.draw-stage.rolling .ring-3 { animation-duration: 2.6s; }
.draw-stage.rolling .nebula { opacity: 0.85; }
.draw-stage.rolling .grid-floor { animation-duration: 0.7s; }
.draw-stage.landed { animation: land 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes land { from { filter: brightness(1.5); } to { filter: brightness(1); } }
.draw-result { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.draw-result .picked {
  background: linear-gradient(135deg, #0fd6ff, #2f6bff 60%, #7a3cff);
  color: #fff; font-size: 22px; font-weight: 700;
  padding: 12px 26px; border-radius: 12px;
  box-shadow: 0 0 18px rgba(0,180,255,0.5), 0 6px 18px rgba(20,60,120,0.3);
  border: 1px solid rgba(220,250,255,0.7);
}
.quick-points { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.history { margin-top: 20px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-actions { display: flex; gap: 14px; }
.history-list { list-style: none; color: var(--muted); font-size: 14px; }
.history-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 4px; border-bottom: 1px dashed #d8e6e4;
}
.history-list li:first-child { color: var(--text); font-weight: 600; }
.history-text { flex: 1; }
.history-del {
  flex: none; border: none; background: none; cursor: pointer;
  color: var(--muted); font-size: 17px; line-height: 1;
  padding: 2px 8px; border-radius: 6px;
}
.history-del:hover { background: #fdecea; color: var(--danger); }
#btn-history-clear { color: var(--danger); }
.group-result { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.group-result.empty-hint, .leaderboard.empty-hint, .roster-list.empty-hint {
  display: block; color: var(--muted); text-align: center; padding: 30px 0;
}
.group-card { border-radius: 12px; padding: 14px; color: #fff; box-shadow: var(--shadow); }
.group-card h4 { margin-bottom: 8px; font-size: 16px; }
.group-card ul { list-style: none; font-size: 15px; line-height: 1.8; }
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.score-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #f7fbfa; border-radius: 10px;
}
.score-row .rank { width: 34px; font-weight: 700; color: var(--muted); text-align: center; }
.score-row.top1 .rank { color: var(--gold); font-size: 18px; }
.score-row.top2 .rank { color: #9aa7b0; font-size: 18px; }
.score-row.top3 .rank { color: #c98a5a; font-size: 18px; }
.score-row .name { flex: 1; font-size: 16px; }
.score-row .score { font-weight: 700; font-size: 18px; color: var(--accent-dark); min-width: 44px; text-align: right; }
.roster-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-dark);
  padding: 6px 12px; border-radius: 999px; font-size: 14px;
}
.chip .pts { font-size: 12px; color: var(--muted); }
.chip button {
  border: none; background: transparent; color: var(--danger);
  cursor: pointer; font-size: 14px; padding: 0;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.header-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-user select { max-width: 180px; }
.mode-banner {
  margin: 8px 0 0; padding: 6px 12px; font-size: 13px;
  background: #fff7e6; color: #9a6b00; border-radius: 8px;
}
.auth-overlay {
  position: fixed; inset: 0; background: rgba(19, 44, 42, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(3px);
}
.auth-card {
  background: var(--surface); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  padding: 32px; width: min(92vw, 380px); display: flex; flex-direction: column; gap: 12px;
}
.auth-card h2 { color: var(--accent-dark); }
.text-input.wide { width: 100%; font-size: 15px; padding: 10px 12px; }
.auth-actions { display: flex; gap: 10px; }
.auth-actions .btn { flex: 1; }
.auth-msg { color: var(--danger); font-size: 13px; min-height: 18px; }
.link-btn {
  border: none; background: none; color: var(--muted); cursor: pointer;
  text-decoration: underline; font-size: 13px;
}
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(31, 45, 43, 0.92); color: #fff; padding: 10px 22px;
  border-radius: 999px; font-size: 14px; z-index: 99;
}
.hidden { display: none !important; }
@media (max-width: 600px) {
  .draw-stage { font-size: 32px; }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .draw-stage.rolling, .draw-stage.landed { animation: none; }
}
