/* 星灯夜游 · 样式
 * 设计令牌与 Claude Design「Star Lantern Night」画板对齐（design/claude-design/）。
 * 布局：游戏页占满 iframe（高度 = 宿主 safeHeight），纵向弹性分区，灯环吃掉剩余空间。
 */
@import url("fonts.css?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d");
:root {
  --night-0: #070b1f;
  --night-1: #0b1032;
  --night-2: #0f1f4a;
  --night-3: #0e3550;
  --teal: #5ee0c8;
  --teal-hi: #9bf7ea;
  --teal-ink: #b9f5e9;
  --teal-deep: #2bb8a9;
  --gold: #f6c34a;
  --gold-hi: #fff6d0;
  --gold-soft: #ffe7a0;
  --gold-deep: #d08a1a;
  --amber: #f2993b;
  --coral: #ff7a45;
  --rose: #ff6f8e;
  --violet: #9e6cf0;
  --ink: #f4f1ff;
  --ink-2: #dde3ff;
  --ink-3: rgba(221, 227, 255, .62);
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .08);
  --pos: #7ff5c4;
  --neg: #ff8a9a;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .4);
  --gold-text: linear-gradient(180deg, #fff6d0 10%, #f6c34a 55%, #d08a1a 100%);
  --font-display: "Baloo 2", "Changa", "Baloo Da 2", system-ui, sans-serif;
  --font-ui: "Baloo 2", "Changa", "Baloo Da 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hit: 44px;
}
[dir=rtl] { --font-display: "Changa", "Baloo 2", system-ui, sans-serif; --font-ui: "Changa", "Baloo 2", system-ui, sans-serif; }
:lang(bn) { --font-display: "Baloo Da 2", "Baloo 2", system-ui, sans-serif; --font-ui: "Baloo Da 2", "Baloo 2", system-ui, sans-serif; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night-0); color: var(--ink); font-family: var(--font-ui); overflow: hidden; }
body { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
svg { display: block; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ---------- 加载页 ---------- */
.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 12px; background: linear-gradient(180deg, var(--night-1), var(--night-2) 45%, var(--night-3)); transition: opacity .5s ease; }
.is-ready .boot { opacity: 0; pointer-events: none; }
.boot { background: url("../assets/art/splash-bg.svg?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d") center / cover no-repeat, linear-gradient(180deg, var(--night-1), var(--night-2) 45%, var(--night-3)); }
.boot-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.boot-sl { position: absolute; left: var(--x); bottom: -60px; width: calc(40px * var(--s)); height: calc(60px * var(--s)); background: url("../assets/art/sky-lantern.svg?v=2ab444fbdec84a690c3daeb20e73c36114c6eded8af2c0b8081769dde5729c9d") center / contain no-repeat; filter: drop-shadow(0 0 10px rgba(255, 190, 110, .7)); animation: rise 7s linear var(--d) infinite; opacity: 0; }
.boot-tower { position: relative; width: 104px; height: 164px; }
.boot-tower img { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.boot-lens { position: absolute; left: 50%; top: 29%; width: 90px; height: 90px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(94, 224, 200, .7), rgba(94, 224, 200, 0) 65%); animation: lens 2.2s ease-in-out infinite; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .7; } 100% { transform: translateY(-110vh) translateX(12px); opacity: 0; } }
@keyframes lens { 50% { transform: translate(-50%, -50%) scale(1.25); opacity: .6; } }
.boot-logo { width: 92px; height: 92px; filter: drop-shadow(0 0 24px rgba(246, 195, 74, .55)); animation: float 3s ease-in-out infinite; }
.boot-title { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: .03em; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-bar { width: 180px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.boot-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); transform-origin: 0 50%; transform: scaleX(.02); transition: transform .3s ease; }
[dir=rtl] .boot-bar i { transform-origin: 100% 50%; }
.boot-hint { font-size: 12px; color: var(--ink-3); }

/* ---------- 主体 ---------- */
.game { position: relative; height: 100%; display: flex; flex-direction: column; isolation: isolate; }
.sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 42%, var(--night-3) 100%); }
.sky .aurora { position: absolute; left: -20%; right: -20%; top: -10%; height: 60%; filter: blur(18px); animation: drift 9s ease-in-out infinite alternate; }
.sky .a1 { background: radial-gradient(60% 40% at 30% 40%, rgba(94, 224, 200, .35), transparent 70%), radial-gradient(50% 35% at 75% 30%, rgba(157, 120, 255, .28), transparent 70%); }
.sky .a2 { top: 40%; opacity: .5; background: radial-gradient(40% 30% at 50% 50%, rgba(246, 195, 74, .16), transparent 70%); animation-duration: 13s; }
.sky .stars { position: absolute; inset: 0; opacity: .7; background-image: radial-gradient(1px 1px at 12% 18%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 40% 8%, #fff 60%, transparent 61%), radial-gradient(1.5px 1.5px at 78% 22%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 88% 60%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 30% 70%, #fff 60%, transparent 61%), radial-gradient(1.5px 1.5px at 62% 48%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 8% 50%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 55% 88%, #fff 60%, transparent 61%); animation: twinkle 5s ease-in-out infinite; }
.sky .lattice { position: absolute; inset: 0; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0L28 8V24L14 32L0 24V8Z M14 24L28 32V48M14 24L0 32V48' fill='none' stroke='white' stroke-width='1'/%3E%3C/svg%3E"); }

/* HUD */
.hud { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 10px; flex: none; }
.hud-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.hud-title b { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: linear-gradient(180deg, #fff3c4, #f6c34a 60%, #c88a1e); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir=rtl] .hud-title b { letter-spacing: 0; font-size: 14px; }
.hud-sub { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--teal-ink); white-space: nowrap; }
.hud-sub .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.hud-sub .sep, #round-no { display: none; }
.hud-actions { display: flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--glass); border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); position: relative; }
.icon-btn::after { content: ""; position: absolute; inset: -3px; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-gold { background: linear-gradient(180deg, rgba(255, 232, 160, .22), rgba(246, 195, 74, .1)); border-color: rgba(255, 220, 140, .4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 14px rgba(246, 195, 74, .25); }
.icon-btn.is-gold svg { stroke: var(--gold-soft); }
.icon-btn:active { transform: translateY(1px) scale(.96); }
[dir=rtl] #btn-exit svg { transform: scaleX(-1); }

/* 全服动态 */
.feed { flex: none; display: flex; align-items: center; gap: 8px; margin: 2px 12px 0; height: 24px; padding: 0 10px 0 6px; border-radius: 12px; background: rgba(8, 12, 40, .45); border: 1px solid rgba(255, 255, 255, .08); font-size: 11px; color: #cfd6ff; white-space: nowrap; overflow: hidden; }
.feed:empty::before { content: ""; }
.feed-item { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; animation: feedIn .35s ease; }
.feed-item b { color: #fff; }
.feed-room { opacity: .8; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.feed-amt { color: var(--gold-soft); font-weight: 800; }
.feed-ico { width: 16px; height: 18px; object-fit: contain; }
.feed-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #ff8fb0, #9e6cf0); }

/* 宝藏 + 星盘 */
.top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 0; gap: 8px; }
.treasure { min-width: 0; line-height: 1; }
.treasure-label { display: block; font-size: 10px; letter-spacing: .18em; font-weight: 700; color: var(--teal-ink); text-transform: uppercase; }
[dir=rtl] .treasure-label { letter-spacing: 0; font-size: 11px; }
.treasure-amt { display: block; font-family: "Baloo 2", var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(120, 60, 0, .55)) drop-shadow(0 0 14px rgba(246, 195, 74, .45)); direction: ltr; unicode-bidi: isolate; }
.dials { display: flex; gap: 6px; direction: ltr; }
.dial { position: relative; width: 50px; height: 50px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #1b2c6e, #0b1236 70%); border: 2px solid rgba(94, 224, 200, .55); box-shadow: 0 0 0 3px rgba(8, 12, 40, .6), 0 6px 16px rgba(0, 0, 0, .5), inset 0 0 14px rgba(94, 224, 200, .25); color: var(--gold-soft); }
.dial-ring { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg fill='%23FFF3C4' stroke='%23B9F5E9' stroke-width='1' stroke-opacity='.7'%3E%3Cpath d='M14 20L26 12L40 18L44 34L30 46L16 38Z' fill='none'/%3E%3Ccircle cx='14' cy='20' r='2.2'/%3E%3Ccircle cx='26' cy='12' r='1.8'/%3E%3Ccircle cx='40' cy='18' r='2.6'/%3E%3Ccircle cx='44' cy='34' r='1.8'/%3E%3Ccircle cx='30' cy='46' r='2.4'/%3E%3Ccircle cx='16' cy='38' r='1.6'/%3E%3C/g%3E%3C/svg%3E") center / 100% no-repeat; opacity: .9; }
.dial.is-spin .dial-ring { animation: spin .5s linear infinite; }
.dial.is-spin { border-color: rgba(246, 195, 74, .8); }
.dial.is-lock { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(8, 12, 40, .6), 0 0 18px rgba(246, 195, 74, .55), inset 0 0 14px rgba(246, 195, 74, .3); }
.dial.is-lock .dial-ring { opacity: 0; }
.dial-sym { position: relative; width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(255, 200, 90, .8)); }
.dial-sym svg, .dial-sym img { width: 100%; height: 100%; }
.dial.is-lock .dial-sym { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }

/* 舞台 */
.stage-wrap { position: relative; flex: 1 1 auto; min-height: 200px; }
.stage { position: absolute; inset: 0; direction: ltr; }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.stage-labels { position: absolute; inset: 0; pointer-events: none; }
.lbl { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: max-content; max-width: 96px; transition: opacity .4s; }
.lbl.is-dim { opacity: .38; }
.lbl-hit { position: absolute; left: 50%; top: calc(var(--ah, 78px) * -1 + 8px); bottom: 0; width: var(--aw, 72px); transform: translateX(-50%); pointer-events: auto; border-radius: 18px; background: transparent; z-index: 1; }
.lbl-hit:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.lbl-mult { min-width: 34px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; font-family: "Baloo 2", sans-serif; font-size: 15px; font-weight: 800; line-height: 1; color: #3b1f00; background: linear-gradient(180deg, #fff6d0, #f6c34a 55%, #d08a1a); border: 1.5px solid #fff1bd; box-shadow: 0 3px 8px rgba(0, 0, 0, .5), 0 0 10px rgba(246, 195, 74, .5); direction: ltr; }
.lbl.is-lit .lbl-mult { transform: scale(1.12); box-shadow: 0 3px 8px rgba(0, 0, 0, .5), 0 0 18px rgba(255, 220, 120, .9); }
/* 半屏（舞台扁）：倍率贴到灯的左上角，灯下只留一行注额，隐藏人数，避免相邻标签互压、压到倒计时环（stage.js layout 按此计算） */
.stage-labels.is-compact .lbl-mult { position: absolute; top: calc(var(--ah, 78px) * -1 + 10px); left: calc(50% - var(--aw, 72px) / 2); min-width: 28px; height: 18px; padding: 0 5px; font-size: 12px; }
.stage-labels.is-compact .lbl-ppl { display: none; }
.stage-labels.is-compact .lbl-hot { inset-inline-end: auto; left: calc(50% + var(--aw, 72px) / 2); transform: translateX(-100%); }
.lbl-all:not(:empty)::after { content: " " attr(data-tag); }
.stage-labels.is-compact .lbl-all::after { content: none; }
.lbl-name { margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--ink-2); line-height: 1; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.lbl-row { display: flex; align-items: center; gap: 4px; margin-top: 3px; height: 18px; direction: ltr; }
.lbl-my { height: 18px; padding: 0 7px; border-radius: 9px; background: rgba(94, 224, 200, .18); border: 1px solid rgba(94, 224, 200, .55); color: var(--teal-ink); font-size: 11px; font-weight: 800; line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; }
.lbl-all { font-size: 10px; font-weight: 600; color: var(--ink-3); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.lbl-hot { position: absolute; top: calc(var(--ah, 78px) * -1 + 14px); inset-inline-end: 6px; padding: 0 6px; height: 16px; border-radius: 8px; font-size: 9px; font-weight: 800; letter-spacing: .08em; color: #fff; background: linear-gradient(180deg, #ff7a45, #e0341c); box-shadow: 0 0 10px rgba(255, 90, 40, .8); display: grid; place-items: center; }
.cd { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; pointer-events: none; }
.cd svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cd-bg { fill: rgba(6, 10, 36, .72); stroke: rgba(255, 255, 255, .14); stroke-width: 3; }
.cd-fg { fill: none; stroke: var(--teal); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 0 200; filter: drop-shadow(0 0 6px var(--teal)); transition: stroke-dasharray 1s linear, stroke .3s; }
.cd[data-state=urgent] .cd-fg { stroke: #ff6f8e; filter: drop-shadow(0 0 6px #ff6f8e); }
.cd[data-state=reveal] .cd-fg { stroke: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
.cd-t { position: relative; font-family: "Baloo 2", sans-serif; font-weight: 800; color: #fff; line-height: 1; text-shadow: 0 0 10px rgba(94, 224, 200, .9); font-variant-numeric: tabular-nums; }
.cd[data-state=urgent] .cd-t { text-shadow: 0 0 10px rgba(255, 111, 142, .9); animation: pulse .5s ease-in-out infinite alternate; }
.phase { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); padding: 2px 12px; border-radius: 12px; font-size: 11px; font-weight: 700; background: rgba(8, 12, 40, .6); border: 1px solid rgba(255, 255, 255, .1); color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.phase[data-phase=bet] { visibility: hidden; }
.event-strip { position: absolute; left: 14px; right: 14px; top: 0; height: 26px; display: flex; align-items: center; justify-content: center; gap: 2px; border-radius: 13px; font-size: 12px; white-space: nowrap; overflow: hidden; color: #fff3c4; text-shadow: 0 0 12px rgba(255, 200, 90, .9); background: linear-gradient(90deg, rgba(246, 195, 74, 0), rgba(246, 195, 74, .3), rgba(246, 195, 74, 0)); opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; pointer-events: none; }
.event-strip b { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.event-strip span { color: var(--teal-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.event-strip.is-show { opacity: 1; transform: none; }
.event-strip[data-ev^=meteor], .event-strip[data-ev=flight] { color: #e6fbff; }
.event-card { position: absolute; left: 50%; top: 46%; width: min(340px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px; border: 1.5px solid rgba(255, 255, 255, .55); box-shadow: 0 16px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .6); transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; z-index: 6; background: linear-gradient(100deg, #4f7de0, #5ee0c8); }
.event-card.is-show { animation: eventIn 1.9s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.event-card[data-ev=meteor1] { background: linear-gradient(100deg, #3b62c9, #3fc6d8 60%, #7ff0da); }
.event-card[data-ev=meteor2] { background: linear-gradient(100deg, #1fb7a6, #5ee0c8 55%, #b8fff0); }
.event-card[data-ev=glow2] { background: linear-gradient(100deg, #d9831c, #f6b43a 55%, #ffd97a); }
.event-card[data-ev=glow3] { background: linear-gradient(100deg, #f3c04d, #ffe39a 55%, #fff6d8); }
.event-card[data-ev=bloom] { background: linear-gradient(100deg, #c2185b, #ef5a92 55%, #ffa3c4); }
.event-card[data-ev=flight] { background: linear-gradient(100deg, #6a3fd0, #9a6cf0 55%, #c9a8ff); }
.event-card[data-ev=galaxy] { background: linear-gradient(100deg, #8a4a10, #d99a2b 45%, #fff0c0); }
.ev-dials { display: flex; gap: 4px; flex: none; direction: ltr; }
.ev-dial { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #0b1236; border: 2px solid #f6c34a; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.ev-dial img { width: 30px; height: 30px; border-radius: 50%; }
.ev-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.ev-txt b { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); overflow-wrap: break-word; }
.event-card[data-ev=galaxy] .ev-txt b { font-size: 16px; }   /* 事件名多语言长短差很大：允许换行，最长的「三星连珠 · 银河宝藏」再缩字 */
.ev-txt small { font-size: 11.5px; font-weight: 700; color: rgba(11, 18, 54, .85); }
.event-card[data-ev=meteor1] .ev-txt small, .event-card[data-ev=bloom] .ev-txt small, .event-card[data-ev=flight] .ev-txt small { color: rgba(255, 255, 255, .92); }
.event-card[data-ev=glow3] .ev-txt b, .event-card[data-ev=galaxy] .ev-txt b, .event-card[data-ev=meteor2] .ev-txt b { color: #3b1f00; text-shadow: none; }
[dir=rtl] .ev-txt b { letter-spacing: 0; }
.lbl-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 底部面板 */
.dock { flex: none; position: relative; margin: 0 8px 8px; padding: 8px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 -10px 30px rgba(0, 0, 0, .25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 8px; }
.dock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.balance { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px; padding-inline-end: 6px; border-radius: 15px; background: rgba(8, 12, 40, .55); border: 1px solid rgba(255, 255, 255, .1); }
.balance b { font-family: "Baloo 2", sans-serif; font-size: 15px; font-weight: 800; color: #fff3c4; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6d0, #f6c34a 45%, #b8791c); box-shadow: 0 1px 3px rgba(0, 0, 0, .6); position: relative; }
.coin::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #8a4a10; font-style: normal; }
.plus { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; line-height: 1; background: var(--teal); color: #0b1236; }
.today { text-align: end; line-height: 1.1; font-size: 12px; font-weight: 700; color: var(--teal-ink); }
.today small { display: block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
[dir=rtl] .today small { letter-spacing: 0; font-size: 10px; }
.today b { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.dock-controls { align-items: stretch; gap: 6px; }
.chips { flex: 1; display: flex; gap: 6px; }
.chip { flex: 1; height: var(--hit); border-radius: 14px; display: grid; place-items: center; font-family: "Baloo 2", sans-serif; font-size: 15px; font-weight: 800; color: var(--ink-2); background: rgba(8, 12, 40, .55); border: 1.5px solid rgba(255, 255, 255, .12); transition: transform .12s ease; }
.chip.is-on { color: #3b1f00; background: linear-gradient(180deg, #fff6d0, #f6c34a 55%, #d08a1a); border-color: #fff1bd; box-shadow: 0 4px 14px rgba(246, 195, 74, .5), inset 0 1px 0 #fff; transform: translateY(-2px); }
.chip:active { transform: scale(.96); }
.auto-btn { width: 70px; flex: none; height: var(--hit); border-radius: 14px; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #0b1236; background: linear-gradient(180deg, #9bf7ea, #5ee0c8 60%, #2bb8a9); border: 1.5px solid #c9fff4; box-shadow: 0 4px 12px rgba(94, 224, 200, .45), inset 0 1px 0 #fff; }
[dir=rtl] .auto-btn { letter-spacing: 0; font-size: 13px; }
.auto-btn.is-on { color: #fff; background: linear-gradient(180deg, #ff9ab0, #ff6f8e 60%, #d23c62); border-color: #ffd0dc; box-shadow: 0 4px 12px rgba(255, 111, 142, .5), inset 0 1px 0 #fff; animation: pulse 1.2s ease-in-out infinite alternate; }
.history { display: flex; align-items: center; gap: 5px; min-height: 26px; text-align: start; }
.history-label { flex: none; width: 34px; font-size: 9px; font-weight: 700; letter-spacing: .12em; line-height: 1.1; color: rgba(221, 227, 255, .55); text-transform: uppercase; }
[dir=rtl] .history-label { letter-spacing: 0; }
.history-strip { flex: 1; display: flex; gap: 5px; overflow: hidden; }
.hist { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 12, 40, .55); border: 1.5px solid rgba(255, 255, 255, .35); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.hist-ico { width: 18px; height: 20px; object-fit: contain; }
.hist-plus { position: absolute; right: -5px; bottom: -4px; font-style: normal; font-size: 8px; font-weight: 800; background: var(--teal); color: #0b1236; border-radius: 6px; padding: 0 3px; }
.hist-new { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 0 4px; height: 11px; border-radius: 6px; background: var(--coral); font-size: 7px; font-weight: 800; letter-spacing: .06em; color: #fff; line-height: 11px; font-style: normal; }
.hist.is-new { border-color: var(--gold); }

/* 结算（Claude Design Frame 5） */
.result { position: absolute; inset: 48px 8px 8px; z-index: 20; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.result.is-show { opacity: 1; pointer-events: auto; }
.rs-card { width: min(100%, 380px); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: radial-gradient(120% 60% at 50% 0%, rgba(246, 195, 74, .16), transparent 60%), linear-gradient(180deg, #16245a, #0c1640 70%, #0e2a48); border: 1px solid rgba(255, 220, 140, .35); box-shadow: 0 20px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12); transform: translateY(12px) scale(.96); transition: transform .35s cubic-bezier(.2, 1.3, .4, 1); scrollbar-width: none; }
.result.is-show .rs-card { transform: none; }
.rs-head { display: flex; align-items: center; justify-content: space-between; }
.rs-head small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); }
.rs-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 1.1; color: #fff; }
.rs-next { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 5px 0 12px; border-radius: 15px; background: rgba(8, 12, 40, .6); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; }
.rs-next b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #0b1236; font-size: 12px; }
.rs-wins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rs-wins.n1 { grid-template-columns: 1fr; }
.rs-win { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, rgba(246, 195, 74, .18), rgba(246, 195, 74, .05)); border: 1px solid rgba(255, 220, 140, .45); min-width: 0; }
.rs-win img { width: 50px; height: 50px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 210, 120, .7)); }
.rs-win div { min-width: 0; line-height: 1.1; }
.rs-win small { display: block; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-win b { display: block; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-win em { font-style: normal; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 18px; color: var(--gold); direction: ltr; unicode-bidi: isolate; }
.rs-me { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.rs-me small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.rs-me b { font-family: "Baloo 2", sans-serif; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.rs-me > div:nth-child(2) b { color: var(--gold-soft); }
.rs-net { padding: 6px 10px; border-radius: 12px; text-align: end; background: rgba(8, 12, 40, .5); border: 1px solid var(--line); }
.rs-net.is-pos { background: rgba(94, 224, 200, .14); border-color: rgba(94, 224, 200, .55); }
.rs-net.is-pos b { color: var(--pos); font-size: 20px; }
.rs-net.is-neg b { color: var(--neg); }
.rs-me.is-idle { display: block; text-align: center; color: var(--ink-2); font-size: 13px; }
.rs-jp { grid-column: 1 / -1; font-size: 12px; font-weight: 800; color: var(--teal); }
.rs-top { display: flex; align-items: baseline; justify-content: space-between; }
.rs-top b { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rs-top small { font-size: 10.5px; color: var(--ink-3); }
[dir=rtl] .rs-top b, [dir=rtl] .rs-head small, [dir=rtl] .rs-me small, [dir=rtl] .rs-win small { letter-spacing: 0; }
.podium { display: grid; grid-template-columns: 1fr 1.1fr 1fr; align-items: end; gap: 6px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 14px; text-align: center; min-width: 0; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.pod-1 { padding-top: 12px; min-height: 150px; background: linear-gradient(180deg, rgba(246, 195, 74, .22), rgba(246, 195, 74, .05)); border-color: rgba(255, 220, 140, .5); }
.pod-2 { min-height: 128px; } .pod-3 { min-height: 118px; }
.pod.is-empty { visibility: hidden; }
.pod-ava { position: relative; margin-bottom: 4px; }
.pod-ava .ava { width: 40px; height: 40px; font-size: 15px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.pod-1 .pod-ava .ava { width: 48px; height: 48px; box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(246, 195, 74, .6); }
.pod-rank { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; background: #c9d4ff; color: #0b1236; }
.pod-1 .pod-rank { background: var(--gold); } .pod-3 .pod-rank { background: #ff9f6b; }
.pod-name { max-width: 100%; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-room { max-width: 100%; font-size: 9.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-amt { margin-top: auto; padding-top: 6px; font-family: "Baloo 2", sans-serif; font-size: 14px; font-weight: 800; color: var(--gold-soft); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.pod.is-me { border-color: rgba(94, 224, 200, .7); } .pod.is-me .pod-name { color: var(--teal); }
.rs-empty, .rs-myrank { text-align: center; font-size: 12px; color: var(--ink-3); margin: 0; }
.rs-cta { position: relative; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-size: 16px; font-weight: 800; color: #3b1f00; background: linear-gradient(180deg, #fff6d0, #f6c34a 55%, #d08a1a); border: 1.5px solid #fff1bd; box-shadow: 0 6px 20px rgba(246, 195, 74, .45), inset 0 1px 0 #fff; flex: none; }
.rs-auto { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 8px; background: rgba(59, 31, 0, .18); }
.ava { width: 42px; height: 42px; font-size: 16px; }
.pod-1 .pod-ava .ava { width: 52px; height: 52px; box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(255, 210, 122, .6); }
.pod-rank { position: absolute; bottom: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; background: var(--gold); color: #3a2206; }
.pod-name { max-width: 100%; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-room { max-width: 100%; font-size: 9.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-amt { font-size: 13px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.pod-base { width: 100%; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, rgba(255, 210, 122, .35), rgba(255, 210, 122, .06)); }
.pod-1 .pod-base { height: 34px; } .pod-2 .pod-base { height: 24px; background: linear-gradient(180deg, rgba(201, 212, 255, .35), rgba(201, 212, 255, .05)); } .pod-3 .pod-base { height: 16px; background: linear-gradient(180deg, rgba(255, 164, 120, .35), rgba(255, 164, 120, .05)); }
.pod.is-me .pod-name { color: var(--teal); }
.rs-list { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: rs 3; }
.rs-list li { counter-increment: rs; display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 12px; border-radius: 8px; }
.rs-list li::before { content: counter(rs); width: 18px; text-align: center; color: var(--ink-3); font-weight: 700; }
.rs-list li.is-me { background: rgba(94, 224, 200, .12); }
.rs-list .ava { width: 22px; height: 22px; font-size: 10px; }
.rs-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-list b { color: var(--gold); font-variant-numeric: tabular-nums; }
.rs-empty, .rs-myrank { text-align: center; font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }
.ava { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; font-weight: 800; color: #fff; background: linear-gradient(135deg, hsl(var(--h, 220) 70% 60%), hsl(calc(var(--h, 220) + 40) 70% 38%)); flex: 0 0 auto; }

/* 大赢庆祝 */
.win { position: absolute; inset: 44px 0 0; z-index: 18; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.win.is-show { animation: winIn 2.6s ease forwards; }
.win > * { grid-area: 1 / 1; }
.win::before { content: ""; grid-area: 1 / 1; width: 100%; height: 100%; background: radial-gradient(70% 55% at 50% 45%, rgba(5, 8, 28, .82), rgba(5, 8, 28, .55) 70%, rgba(5, 8, 28, .2)); }
.win-rays { width: 150%; max-width: 560px; aspect-ratio: 1; animation: spin 14s linear infinite; opacity: .9; }
.win-halo { width: 62%; max-width: 240px; aspect-ratio: 1; }
.win-arc { width: 90%; max-width: 360px; transform: translateY(-120px); }
.win-lantern { width: 132px; height: 132px; transform: translateY(-28px); filter: drop-shadow(0 0 24px rgba(255, 210, 120, .9)); animation: winPop .6s cubic-bezier(.2, 1.6, .4, 1); }
.win-title { transform: translateY(64px); font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(120, 60, 0, .6)) drop-shadow(0 0 18px rgba(246, 195, 74, .6)); max-width: calc(100% - 24px); font-size: clamp(24px, 8.5vw, 34px); line-height: 1.05; text-align: center; }
.win-amt { transform: translateY(104px); font-family: "Baloo 2", sans-serif; font-size: 30px; font-weight: 800; color: #fff; text-shadow: 0 0 16px rgba(94, 224, 200, .9), 0 2px 0 rgba(0, 0, 0, .4); font-variant-numeric: tabular-nums; direction: ltr; }
.win-eyebrow { transform: translateY(34px); max-width: calc(100% - 24px); font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: .12em; text-align: center; text-transform: uppercase; color: #d9fff6; text-shadow: 0 0 10px rgba(94, 224, 200, .9); }
.win-cap { transform: translateY(142px); padding: 4px 12px; border-radius: 12px; font-size: 11.5px; font-weight: 700; color: var(--teal-ink); background: rgba(8, 12, 40, .7); border: 1px solid rgba(94, 224, 200, .45); white-space: nowrap; }
.win[data-tier=great] .win-cap { transform: translateY(72px); }
[dir=rtl] .win-eyebrow { letter-spacing: 0; }
.win[data-tier=great] .win-lantern { display: none; }
.win[data-tier=great] .win-title { transform: translateY(-6px); }
.win[data-tier=great] .win-amt { transform: translateY(34px); }
.win[data-tier=legend] .win-title { background: linear-gradient(180deg, #e9fffa, #5ee0c8 50%, #f6c34a); -webkit-background-clip: text; background-clip: text; }
[dir=rtl] .win-title { letter-spacing: 0; }
@keyframes winIn { 0% { opacity: 0; transform: scale(.85); } 10% { opacity: 1; transform: scale(1.02); } 16% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes winPop { from { transform: translateY(-28px) scale(.3); } }

/* 提示 */
.toast { position: absolute; left: 50%; top: 96px; transform: translate(-50%, -8px); z-index: 30; padding: 8px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; background: rgba(7, 10, 34, .92); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90%; text-align: center; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
/* 无遮罩、横条卡片压在顶栏下方（动态条 / 宝藏区，下注期不可点的区域）：只有卡片可点，灯环与筹码不被挡 */
.notice { position: absolute; left: 10px; right: 10px; top: 52px; z-index: 40; display: flex; justify-content: center; pointer-events: none; }
html:not(.is-half) .notice { top: calc(52px + env(safe-area-inset-top, 0px)); }
html.is-half .notice { top: 4px; }   /* 半屏上方区域更矮：压住顶栏，长文案也不碰到灯 */
.nt-card { position: relative; pointer-events: auto; width: min(360px, 100%); min-height: 76px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-inline-start: 78px; border-radius: 18px; text-align: start; background: radial-gradient(120% 60% at 50% 0%, rgba(246, 195, 74, .2), transparent 60%), linear-gradient(180deg, #16245a, #0c1640 70%, #0e2a48); border: 1px solid rgba(255, 220, 140, .45); box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 4px rgba(246, 195, 74, .08), inset 0 1px 0 rgba(255, 255, 255, .14); animation: nt-pop .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.nt-art { position: absolute; inset-inline-start: 4px; top: 50%; width: 70px; height: 70px; transform: translateY(-50%); }
.nt-halo { position: absolute; inset: -18px; width: calc(100% + 36px); height: calc(100% + 36px); opacity: .75; animation: nt-spin 9s linear infinite; }
.nt-ico { position: absolute; inset: 5px; width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(246, 195, 74, .55)); animation: nt-bob 2.4s ease-in-out infinite; }
.nt-spark { position: absolute; width: 16px; height: 16px; animation: nt-twinkle 1.6s ease-in-out infinite; }
.nt-spark.s1 { left: -6px; top: 14px; }
.nt-spark.s2 { right: -4px; top: 46px; width: 12px; height: 12px; animation-delay: .8s; }
.notice p { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-size: 14px; font-weight: 800; line-height: 1.35; color: var(--gold-hi); text-shadow: 0 2px 0 rgba(60, 30, 0, .45), 0 0 14px rgba(246, 195, 74, .35); }
.nt-ok { flex: none; min-width: 64px; height: 40px; padding: 0 14px; border-radius: 14px; font-family: var(--font-display); font-size: 14px; font-weight: 800; color: #3b1f00; background: linear-gradient(180deg, #fff6d0, #f6c34a 55%, #d08a1a); border: 1.5px solid #fff1bd; box-shadow: 0 6px 20px rgba(246, 195, 74, .45), inset 0 1px 0 #fff; cursor: pointer; }
.nt-ok:active { transform: scale(.96); }
@keyframes nt-pop { 0% { opacity: 0; transform: translateY(16px) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes nt-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes nt-spin { to { transform: rotate(360deg); } }
@keyframes nt-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .nt-card, .nt-halo, .nt-ico, .nt-spark { animation: none; } }
.offline { position: absolute; left: 10px; right: 10px; top: 56px; z-index: 31; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; background: #5a1d2c; border: 1px solid #ff8a9a66; text-align: center; }
.bigwin { position: absolute; left: 10px; right: 10px; top: 54px; z-index: 29; padding: 7px 12px; border-radius: 14px; font-size: 12.5px; font-weight: 700; color: #2a1600; background: linear-gradient(90deg, var(--gold-hi), var(--gold), var(--amber)); box-shadow: 0 6px 24px rgba(255, 180, 94, .45); opacity: 0; transform: translateY(-8px); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bigwin.is-show { animation: bigwin 4.5s ease forwards; }
.bw-star { margin-inline-end: 6px; }

/* 面板抽屉 */
.sheet-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(3, 5, 20, .6); opacity: 0; transition: opacity .25s; }
.sheet-open .sheet-scrim { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 86%; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #1c2566, #0d1238 60%); border-top: 1px solid rgba(255, 210, 122, .35); box-shadow: 0 -16px 48px rgba(0, 0, 0, .5); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .9, .3, 1); }
.sheet-open .sheet { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 8px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; color: var(--gold); }
.sheet-body { overflow: auto; padding: 0 14px 16px; -webkit-overflow-scrolling: touch; }
.set-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.set-row > span:first-child { flex: 1; }
.set-row small { display: block; font-size: 11px; color: var(--ink-3); }
.set-slider > span:nth-child(2) { flex: 0 0 auto; min-width: 88px; }
.set-slider > .set-ico { flex: 0 0 22px; color: var(--gold); font-size: 16px; }
.set-slider input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 28px; background: transparent; --v: 50%; }
.set-slider input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--teal) var(--v), rgba(255, 255, 255, .12) var(--v)); }
[dir=rtl] .set-slider input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(270deg, var(--teal) var(--v), rgba(255, 255, 255, .12) var(--v)); }
.set-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold)); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.set-slider input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.set-slider input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--teal); }
.set-slider input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--gold); }
.set-slider output { width: 30px; text-align: end; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.set-toggle { cursor: pointer; }
.set-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: 0 0 auto; width: 46px; height: 28px; border-radius: 14px; background: rgba(255, 255, 255, .14); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.set-toggle input:checked + .switch { background: var(--teal); }
.set-toggle input:checked + .switch::after { inset-inline-start: 21px; }
.set-toggle input:focus-visible + .switch { outline: 2px solid var(--gold); outline-offset: 2px; }
.set-select { min-height: 36px; border-radius: 10px; padding: 0 10px; background: rgba(7, 10, 34, .6); color: var(--ink); border: 1px solid var(--line); font: inherit; }
.set-links { display: flex; gap: 8px; padding-top: 12px; }
.link-btn { flex: 1; min-height: var(--hit); border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-weight: 700; }
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.tab { min-height: 36px; padding: 0 14px; border-radius: 18px; font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, .06); color: var(--ink-2); }
.tab.is-on { background: var(--gold); color: #3a2206; }
.lb-reset { margin-inline-start: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lb-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 8px; border-radius: 12px; }
.lb-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.lb-row.is-me { background: rgba(94, 224, 200, .12); box-shadow: inset 0 0 0 1px rgba(94, 224, 200, .35); }
.lb-rank { width: 28px; text-align: center; font-weight: 800; color: var(--ink-3); }
.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-size: 12px; color: #3a2206; }
.medal.m1 { background: radial-gradient(circle at 35% 30%, #fff5cc, #ffc94d 60%, #c98a2b); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #fff, #c9d4ff 60%, #7f88bd); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #ffe0cc, #ff9f6b 60%, #b8612e); }
.lb-row .ava { width: 32px; height: 32px; font-size: 13px; }
.lb-name { flex: 1; min-width: 0; font-size: 13px; }
.lb-name b { font-weight: 700; }
.lb-name small { display: block; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-amt { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.lb-me { position: sticky; bottom: -16px; margin: 6px -14px -16px; padding: 8px 14px 14px; background: #0d1238; border-top: 1px solid rgba(94, 224, 200, .35); box-shadow: 0 -10px 20px rgba(3, 5, 20, .7); z-index: 2; }
.lb-me .lb-row { background: rgba(94, 224, 200, .16); }
.empty { text-align: center; color: var(--ink-3); padding: 24px 0; font-size: 13px; }
.skeleton { height: 44px; margin: 6px 0; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.rules-cell { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 11px; text-align: center; }
.rules-cell b { color: var(--gold); }
.rules-ico { width: 38px; height: 38px; object-fit: contain; }
.rules-text p { margin: 6px 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.fair { margin-top: 10px; padding: 10px; border-radius: 12px; background: rgba(7, 10, 34, .5); }
.credits { margin: 12px 0 0; font-size: 10px; color: var(--ink-3); text-align: center; direction: ltr; }
.fair h3 { margin: 0 0 6px; font-size: 13px; color: var(--teal); }
.fair-row { margin: 4px 0; }
.fair-row small { display: block; font-size: 10.5px; color: var(--ink-3); }
.fair code { display: block; font-size: 10px; word-break: break-all; color: var(--ink-2); direction: ltr; }
.rec-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
.rec-round { width: 52px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rec-played, .rec-lit { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rec-played { flex: 1; }
.rec-played small { color: var(--ink-3); margin-inline-end: 4px; }
.rec-ico { width: 20px; height: 20px; object-fit: contain; }
.rec-row b { min-width: 64px; text-align: end; font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.hist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hist-cell { display: grid; justify-items: center; align-content: center; min-height: 64px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.hist-cell small { font-size: 9.5px; color: var(--teal); text-align: center; }
.hist-big { width: 34px; height: 34px; object-fit: contain; }

/* 动画 */
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes drift { to { transform: translateX(8%) rotate(-4deg); } }
@keyframes twinkle { 50% { opacity: .6; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes pulse { to { filter: brightness(1.25); } }
@keyframes feedIn { from { transform: translateY(8px); opacity: 0; } }
@keyframes eventIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(.96); } }
@keyframes bigwin { 0% { opacity: 0; transform: translateY(-8px); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 矮屏（视口 < 560，或半屏可用高度 < 560：半屏时视口是整屏，要按 --stage-h 判断，由 main.js 加 is-short） */
@media (max-height: 560px) {
  .hud { min-height: 46px; padding-top: 3px; }
  .feed { display: none; }
  .treasure-amt { font-size: 22px; }
  .dial { width: 40px; height: 40px; }
  .history-label { display: none; }
}
html.is-short .hud { min-height: 46px; padding-top: 3px; }
html.is-short .feed { display: none; }
html.is-short .treasure-amt { font-size: 22px; }
html.is-short .dial { width: 40px; height: 40px; }
html.is-short .history-label { display: none; }
html.is-short .stage-wrap { min-height: 150px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 展示模式（对齐 BAISHUN 1.3.2） ----------
 * 半屏（gameMode=2）：宿主 WebView 铺满全屏且透明，游戏只绘制底部 --stage-h（= safeHeight），上方露出语音房。
 * 全屏（gameMode=3）：铺满整屏，避让刘海与底部手势区。 */
html.is-half, html.is-half body { background: transparent; }
html.is-half body { pointer-events: none; }
html.is-half .game, html.is-half .boot, html.is-half .sheet, html.is-half .sheet-scrim { pointer-events: auto; }
html.is-half .game { position: absolute; left: 0; right: 0; bottom: 0; height: var(--stage-h); border-radius: 22px 22px 0 0; overflow: hidden; box-shadow: 0 -12px 40px rgba(0, 0, 0, .45); }
html.is-half .boot { top: auto; height: var(--stage-h); border-radius: 22px 22px 0 0; }
html.is-half .sheet-scrim { top: auto; height: var(--stage-h); border-radius: 22px 22px 0 0; }
html.is-half .sheet { max-height: calc(var(--stage-h) * .92); }
html:not(.is-half) .hud { padding-top: env(safe-area-inset-top, 0px); height: calc(48px + env(safe-area-inset-top, 0px)); }
.dock { margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

/* 下注期其他玩家头像币（限流见 ui.js crowd） */
.crowd-coin { position: fixed; z-index: 30; width: 22px; height: 22px; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); box-shadow: 0 0 0 1.5px rgba(255, 231, 160, .75), 0 2px 6px rgba(0, 0, 0, .5); overflow: hidden; will-change: transform, opacity; }
.crowd-coin .ava { width: 100%; height: 100%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, hsl(var(--h, 200) 80% 62%), hsl(calc(var(--h, 200) + 60) 70% 45%)); }
.crowd-coin.is-big { width: 28px; height: 28px; box-shadow: 0 0 0 2px #ffd36b, 0 0 10px rgba(255, 211, 107, .8); }
.lbl-all.is-bump { animation: lbl-bump .35s ease-out; }
@keyframes lbl-bump { 40% { transform: scale(1.25); color: #ffe7a0; } }
.lbl-ppl { font-size: 10px; color: var(--ink-3); white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.lbl-ppl:not(:empty)::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 2px; vertical-align: -1px; border-radius: 50% 50% 2px 2px; background: currentColor; opacity: .8; }
.feed-cnt { margin-inline-start: 3px; font-size: 10px; color: #ffe7a0; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .crowd-coin { display: none; } }
.has-notice .crowd-coin { display: none; }

/* 语聊房内 展开/收起（半屏 ⇄ 全屏） */
#btn-view .ico-collapse { display: none; }
#btn-view[aria-pressed="true"] .ico-expand { display: none; }
#btn-view[aria-pressed="true"] .ico-collapse { display: block; }

/* Star Light: approved layout, icon-only controls and personal result. */
.boot-title{font-size:36px}.boot-credit{font-size:13px;color:#f7dfa4;direction:ltr;letter-spacing:.025em}.boot-hint:empty{display:none}
.treasure{display:none}.hud{height:58px;padding:5px 12px;gap:8px;justify-content:space-between}.hud-actions{flex:1;margin-inline-start:8px;gap:6px;justify-content:space-between}.hud-title{display:none}.hud .icon-btn{width:44px;height:44px;border-radius:13px}.hud .icon-btn svg{width:22px;height:22px}.hud-actions .icon-btn svg{translate:0 -4px}.hud-actions .icon-btn::after{content:attr(data-label);inset:auto 1px 3px;display:block;font-size:9px;line-height:1;text-align:center;color:#e8dbc6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top{justify-content:space-between;min-height:54px;padding:2px 12px 4px;gap:8px}.top .hud-sub{min-height:42px;padding:8px 10px;gap:7px;border-radius:13px;border:1px solid #a0d8cd2b;background:#122544aa;font-size:14px}.sl-online-value{display:flex;align-items:baseline;gap:6px}.sl-online-number{font-size:19px;font-weight:800;font-variant-numeric:tabular-nums;direction:ltr}.sl-online-label{font-size:12px;color:#b4e4d8;font-weight:600}.dials{gap:8px}.dial{width:44px;height:44px}
.feed{display:flex;height:30px;margin:0 12px 3px;padding:0 8px;font-size:12px;border-radius:13px}.feed-item{width:100%;gap:5px}.feed-room{max-width:70px}.feed-amt{font-size:13px}.feed-ico{width:18px;height:20px}
.dock{margin:0 10px 8px;padding:9px;gap:7px;border-radius:18px}.balance{height:36px;padding:0 7px;gap:7px}.balance b{font-size:19px}.today small{font-size:10px;letter-spacing:.08em}.today b{font-size:15px}.chip,.auto-btn{height:46px;border-radius:13px;font-size:16px}.history{min-height:25px}.history-label{font-size:9px}.lbl-my{font-size:12px}.lbl-all,.lbl-ppl{opacity:.65}
html.is-short .hud{height:54px;min-height:54px;padding:4px 10px;gap:6px}html.is-short .hud-actions{margin-inline-start:0;gap:4px}html.is-short .top{min-height:46px;padding-bottom:3px}html.is-short .top .hud-sub{min-height:38px;padding:6px 8px}html.is-short .sl-online-number{font-size:18px}html.is-short .sl-online-label{font-size:12px}html.is-short .dial{width:38px;height:38px}html.is-short .feed{display:flex;height:28px;font-size:11px;margin-bottom:2px}html.is-short .dock{gap:6px;padding:7px;margin-bottom:6px}html.is-short .chip,html.is-short .auto-btn{height:44px;font-size:15px}html.is-short .balance{height:32px}html.is-short .balance b{font-size:17px}
@media(max-width:350px){.hud{padding-inline:10px;gap:6px}.hud-actions{margin-inline-start:0;gap:4px}.hud-actions .icon-btn::after{font-size:8px}.top .hud-sub{padding-inline:8px}.sl-online-number{font-size:18px}.dial{width:40px;height:40px}.dials{gap:6px}.feed-room{max-width:45px}.feed{font-size:11px}.feed-amt{font-size:12px}.balance b{font-size:17px}}
.lbl-my::before{content:attr(data-mine-label);font-weight:500;margin-inline-end:4px}.lbl-all,.lbl-ppl{opacity:.55}.is-half .lbl-all,.is-half .lbl-ppl{display:none}
.sl-status{position:absolute;left:12px;right:12px;top:146px;z-index:24;text-align:center;padding:9px 12px;border:1px solid #5fb6a2;border-radius:12px;background:#12234bf0;color:#c9f8e9;font-size:12px;pointer-events:none}.sl-status[hidden]{display:none}
.sl-auto{font-size:10px;color:#f3dba5;text-align:end;white-space:nowrap}.sl-result{width:min(100%,330px);padding:20px;border-radius:22px;gap:14px;overflow:visible}.result{pointer-events:none}.result.is-show{pointer-events:none}.sl-result{pointer-events:auto}
.sl-result-head{display:flex;align-items:center;gap:8px}.sl-result-head h2{font-size:15px;margin:0;flex:1}.sl-next{font-size:11px;color:#c8c4d6;white-space:nowrap}.sl-close{width:44px;height:44px;border:0;background:#ffffff0c;color:#ead9b9;border-radius:12px;font-size:23px;flex:none}
.sl-lit{display:flex;justify-content:center;gap:3px;align-items:center;min-height:48px}.sl-lit img{width:31px;height:44px;object-fit:contain}.sl-reward{text-align:center;padding:4px 0}.sl-reward small{font-size:13px;color:#d7cbd9}.sl-reward strong{display:block;font-size:42px;line-height:1.35;color:#ffdf8c;font-variant-numeric:tabular-nums;direction:ltr}.sl-reward img{width:27px;height:27px;vertical-align:middle;margin-inline-end:8px}.sl-stake{display:flex;justify-content:center;align-items:center;gap:8px;text-align:center;font-size:13px;color:#d2c9dc}.sl-stake b{font-size:16px;color:#f6edd9;margin-inline-start:0;font-variant-numeric:tabular-nums;direction:ltr;display:inline-block}
.sl-next-button{width:100%;height:48px;min-height:48px;border-radius:14px;font-size:16px}.sl-rules-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:6px 0 14px}.sl-step{background:#ffffff07;border:1px solid #ffffff12;border-radius:14px;padding:12px 5px;text-align:center;font-size:12px;color:#f2e5cb}.sl-step img{height:42px;width:40px;object-fit:contain;display:block;margin:0 auto 10px}.sl-step b{font-size:11px;display:block;color:#a6daca;margin-bottom:5px}
.sl-rule-section{border-top:1px solid #ffffff16;padding:12px 0}.sl-rule-section summary{min-height:30px;font-size:14px;color:#ffdf8c}.sl-rule-section p{font-size:13px;line-height:1.65;color:#d6d1e3;white-space:pre-line}.sl-record{border:1px solid #ffffff18;border-radius:14px;margin:10px 0;background:#ffffff05}.sl-record summary{padding:15px;min-height:44px;color:#f9df9b;font-size:14px;cursor:pointer}.sl-record dl{margin:0;padding:0 15px 14px;display:grid;grid-template-columns:1fr auto;gap:12px;font-size:13px}.sl-record dt{color:#c6bed3}.sl-record dd{margin:0;direction:ltr;font-variant-numeric:tabular-nums}.sl-record .pos{color:#93e1bd}.sl-record .neg{color:#ffc0ad}
.sl-onboarding{text-align:center;padding:10px 0}.sl-onboarding h3{color:#ffdf8c}.sl-onboarding button,.sl-retry{min-height:44px;border:1px solid #e5bb66;background:#eac270;color:#1d2141;border-radius:12px;padding:9px 22px;font-weight:700}.sl-onboarding .skip{background:transparent;color:#d9d0e2;border-color:#ffffff22;margin-inline-start:8px}
html.is-short .sl-result{gap:9px;padding:14px}html.is-short .sl-reward strong{font-size:36px}html.is-short .sl-lit{min-height:40px}
/* Result art is the main visual, with all eight lanterns kept visible. */
.sl-result-art{position:relative;isolation:isolate;display:grid;place-items:center;min-height:182px}
.sl-result-halo{position:absolute;width:198px;height:198px;object-fit:contain;z-index:-1;opacity:.64;animation:slHalo 2.8s ease-in-out infinite}
.sl-result-lit.n1{min-height:176px}.sl-result-lit.n1 .sl-lamp{width:156px;height:156px}
.sl-result-lit.n2,.sl-result-lit.n3{gap:8px}.sl-result-lit.n2 .sl-lamp,.sl-result-lit.n3 .sl-lamp{width:82px;height:100px}
.sl-result-lit.n4,.sl-result-lit.n5,.sl-result-lit.n6,.sl-result-lit.n7,.sl-result-lit.n8{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 4px;width:100%;min-height:156px}
.sl-result-lit .sl-lamp{position:relative;display:grid;place-items:center;min-width:0;height:76px;filter:drop-shadow(0 0 8px #e6b95855);animation:slLampEnter .38s cubic-bezier(.2,.7,.3,1) both,slLampFloat 2.7s ease-in-out infinite;animation-delay:calc(var(--order)*45ms),calc(.4s + var(--order)*45ms)}
.sl-result-lit .sl-lamp-image{width:100%;max-width:76px;height:76px;object-fit:contain}
.sl-result-lit.n1 .sl-lamp-image{max-width:156px;width:156px;height:156px}.sl-result-lit.n2 .sl-lamp-image,.sl-result-lit.n3 .sl-lamp-image{max-width:82px;width:82px;height:100px}
.sl-art-spark{position:absolute;width:22px;height:22px;pointer-events:none;animation:slSpark 2.4s ease-in-out infinite}.sl-art-spark.s1{left:14%;top:22%}.sl-art-spark.s2{right:15%;top:60%;animation-delay:.6s}
.sl-result.has-many .sl-result-art{min-height:156px}.sl-result.has-many .sl-result-halo{width:260px;height:182px;opacity:.35}
html.is-short .sl-result-art{min-height:128px}html.is-short .sl-result-lit.n1{min-height:128px}html.is-short .sl-result-lit.n1 .sl-lamp{width:120px;height:120px}html.is-short .sl-result-lit.n1 .sl-lamp-image{width:120px;height:120px}html.is-short .sl-result-halo{width:154px;height:154px}
html.is-short .sl-result.has-many .sl-result-art{min-height:142px}html.is-short .sl-result-lit.n4,html.is-short .sl-result-lit.n5,html.is-short .sl-result-lit.n6,html.is-short .sl-result-lit.n7,html.is-short .sl-result-lit.n8{min-height:142px}html.is-short .sl-result-lit .sl-lamp{height:70px}html.is-short .sl-result-lit .sl-lamp-image{height:70px}
@keyframes slLampEnter{from{transform:scale(.8);opacity:.65}to{transform:scale(1);opacity:1}}@keyframes slLampFloat{0%,100%{translate:0 0}50%{translate:0 -3px}}@keyframes slHalo{0%,100%{opacity:.45;transform:scale(.96)}50%{opacity:.7;transform:scale(1.03)}}@keyframes slSpark{0%,100%{opacity:.4;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}
@media(prefers-reduced-motion:reduce){.sl-lamp,.sl-result-halo,.sl-art-spark{animation:none!important}}


.sl-low-motion .sl-lamp,.sl-low-motion .sl-result-halo,.sl-low-motion .sl-art-spark{animation:none!important}

.sl-result-lit.n5 .sl-lamp:last-child{grid-column:2 / span 2}

/* Approved final correction: icon-only utility controls. */
.hud-actions .icon-btn::after{content:none}.hud-actions .icon-btn svg{width:26px;height:26px;translate:0 0}

.sl-low-motion .win.is-show{animation:none;opacity:1}.sl-low-motion .win-rays,.sl-low-motion .win-lantern,.sl-low-motion .sky .aurora,.sl-low-motion .sky .stars,.sl-low-motion .dial.is-spin{animation:none}
.sl-retry{display:block;margin:10px auto 0;min-height:44px;padding:8px 18px;border:1px solid #e5bb66;border-radius:12px;background:#f6c34a;color:#302344}.sl-status{top:auto;bottom:145px}

/* Small host safe areas keep every input visible without shrinking touch targets. */
html.is-tiny .hud{height:44px;min-height:44px;padding:0 10px}html.is-tiny .top{height:32px;min-height:32px;padding:0 12px}html.is-tiny .top .hud-sub{height:30px;min-height:30px;padding:0 8px;line-height:1}html.is-tiny .sl-online-number{font-size:16px;line-height:1}html.is-tiny .sl-online-label{font-size:11px}html.is-tiny .dial{width:30px;height:30px}html.is-tiny .dials{gap:6px}html.is-tiny .feed{height:22px;margin:0 12px;font-size:11px}html.is-tiny .dock{padding:6px;gap:4px;margin-bottom:4px}html.is-tiny .balance{height:26px}html.is-tiny .history{height:24px;min-height:24px;padding:0}html.is-tiny .hist{width:22px;height:22px}html.is-tiny .hist-ico{width:14px;height:18px}html.is-tiny .chip,html.is-tiny .auto-btn{height:44px}html.is-tiny .stage-wrap{min-height:150px}
