/* Floating HUD: light icons keep the monster lane open; hit areas remain generous. */
#game-container #battle-screen {
    --hud-control:44px;--hud-level:13px;--hud-gold-width:calc(var(--hud-meta)*5);
    --hud-tools:calc(var(--hud-control) + 22px);
    --hud-row-top:calc(var(--game-safe-top,0px) + var(--hud-control) + 2px);
    --hud-side-top:calc(var(--game-safe-top,0px) + var(--hud-control) + 11px);
}
.is-mobile-game #game-container #battle-screen {
    --hud-control:max(44px,var(--mobile-tap,48px));--hud-level:max(13px,var(--mobile-meta,12px));
}
#game-container #battle-screen #battle-exit-btn {top:calc(var(--game-safe-top,0px) + 1px);right:8px}
#game-container #battle-screen .battle-hud>.gold-display {
    top:calc(var(--game-safe-top,0px) + 1px);right:calc(var(--hud-control) + 20px);height:var(--hud-control);
}
#game-container #battle-screen .land-blessing-bar {top:var(--hud-side-top);right:8px;left:auto}
#game-container #battle-screen #battle-speed-btn {top:calc(var(--hud-side-top) + var(--hud-control) + 7px);right:8px}
/* v1.5（10-07 用户：经验条稍微再长一点点）：右端延到金币框空白处，经验槽约长 30% */
#game-container #battle-screen .battle-hud .exp-bar-container {
    --exp-label-width:calc(var(--hud-level)*3.8);
    top:calc(var(--game-safe-top,0px) + (var(--hud-control) - 24px)/2 + 1px);
    right:calc(var(--hud-control) + var(--hud-gold-width));height:24px;
}
#game-container #battle-screen .battle-hud .exp-text {
    height:24px;line-height:24px;padding:0 5px;border:0;border-radius:5px 9px 9px 5px;
    color:#4d4c36;text-shadow:0 1px #fff9e580;
    background:linear-gradient(115deg,#f6ebd4e8,#decca8de);
    box-shadow:inset 0 1px #fff6deaa,0 1px 2px #1d29294d;
}
#game-container #battle-screen .battle-hud .exp-bar-track {left:calc(var(--exp-label-width) + 7px);right:17px;height:6px}
#game-container #battle-screen.lottery-spirit .battle-hud .exp-bar-track {right:24px}
#game-container #battle-screen :is(.land-blessing-tip,.land-blessing-award) {top:calc(var(--hud-side-top) + var(--hud-control) + 5px)}
#game-container #battle-screen :is(#battle-exit-btn,#battle-speed-btn,.land-blessing-toggle) {
    border:0;border-radius:14px;background:transparent;box-shadow:none;padding:0;isolation:isolate;
}
#game-container #battle-screen :is(#battle-speed-btn,.land-blessing-toggle)::before {
    content:'';position:absolute;inset:5px;border:1px solid #fff1cd1f;border-radius:11px;
    background:#192c2b38;pointer-events:none;z-index:-1;
}
#game-container #battle-screen :is(#battle-exit-btn,#battle-speed-btn,.land-blessing-toggle) .hud-control-art {
    position:absolute;left:50%;top:50%;right:auto;bottom:auto;width:27px;height:27px;object-fit:contain;pointer-events:none;
    transform:translate(-50%,-50%);filter:drop-shadow(0 1px 1px #20322ccc);user-select:none;opacity:.9;
}
#game-container #battle-screen #battle-exit-btn .hud-control-art {width:25px;height:25px;opacity:.96}
#game-container #battle-screen #battle-speed-btn .hud-control-art {top:34%;width:26px;height:20px}
#game-container #battle-screen #battle-speed-text {
    position:absolute;bottom:16%;left:0;right:0;z-index:1;
    color:#f8eac9;font:400 max(12px,calc(var(--hud-control)*.27))/1 var(--font-game-number);
    text-shadow:0 1px 2px #1d2929;letter-spacing:0;pointer-events:none;
}
#game-container #battle-screen #battle-speed-btn.is-fast::before {border-color:#cfe5b344;background:#4066575c}
#game-container #battle-screen #battle-speed-btn.is-fast .hud-control-art {opacity:1;filter:drop-shadow(0 1px 1px #20322ccc) drop-shadow(0 0 2px #dbed9855)}
#game-container #battle-screen #battle-speed-btn.is-fast #battle-speed-text {color:#e5f5bf}
#game-container #battle-screen .land-blessing-count {
    z-index:2;right:2px;top:2px;min-width:14px;height:auto;min-height:14px;padding:0 3px;
    border:1px solid #ffefc54d;border-radius:7px;background:#435e50c9;color:#fff0c3;
    font:400 max(10px,calc(var(--hud-control)*.24))/1.2 var(--font-game-number);
}
#game-container #battle-screen :is(#battle-exit-btn,#battle-speed-btn,.land-blessing-toggle):focus-visible {outline:2px solid #ffedb6;outline-offset:2px}
.battle-buff-feedback {position:absolute;inset:0;z-index:32;overflow:hidden;pointer-events:none}
.battle-buff-feedback[hidden],.hero-luck-badge[hidden],.buff-flight-canvas[hidden] {display:none!important}
.buff-flight-canvas,.hero-luck-markers {position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.hero-luck-badge {position:absolute;width:21px;height:21px;transform:translate(-50%,-50%);pointer-events:none}
.hero-luck-badge img {width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 1px #253c28);animation:buff-luck-arrive .55s ease-out both}
.is-mobile-game .hero-luck-badge {width:max(21px,calc(var(--mobile-reading,14px)*1.45));height:max(21px,calc(var(--mobile-reading,14px)*1.45))}
#battle-screen.lottery-citadel .hp-bar-container,#battle-screen.lottery-spirit .exp-bar-track {animation:none}
#battle-screen .buff-received {animation:buff-target-land .8s ease-out both!important}
#battle-screen .buff-machine-received {animation:buff-machine-land .8s ease-out both!important}
.battle-buff-feedback.is-paused *, .lottery-feedback-paused :is(.buff-received,.buff-machine-received) {animation-play-state:paused!important}
/* The battle clock drives these currents: no pre-arrival shine or CSS clock drift. */
#battle-screen.lottery-charge-haste #bonus-dice-btn .bd-entry-meter:after {
    content:'';position:absolute;inset:0;pointer-events:none;animation:none;
    background:url('../assets/ui_controls_20260920l/exp-flow.svg') var(--buff-machine-shift,0px) center/24px 6px repeat-x;
    opacity:var(--buff-machine-light,.85);
}
#battle-screen.lottery-charge-haste #bonus-dice-btn.full .bd-entry-meter:after {background-position-x:0;opacity:.4}
#battle-screen.lottery-charge-haste #bonus-dice-btn .bd-entry-art-box:after {
    content:'';position:absolute;right:0;bottom:0;width:18px;height:11px;pointer-events:none;
    background:url('../assets/battle_controls_20260926/haste-wind.svg') center/contain no-repeat;
    filter:drop-shadow(0 1px #35566e);opacity:var(--buff-machine-light,.85);animation:none;
}
#battle-screen.lottery-swift .dice-cooldown-bar {
    height:6px;border-color:#6b9e90;box-shadow:0 1px 0 #e5f6cf55;
}
#battle-screen.lottery-swift .dice-cooldown-bar:after {
    content:'';position:absolute;inset:0;margin:0;width:auto;height:auto;clip-path:none;pointer-events:none;
    background:url('../assets/ui_controls_20260920l/exp-flow.svg') var(--buff-swift-shift,0px) center/24px 5px repeat-x;
    opacity:var(--buff-swift-light,.85);animation:none;
}
.lottery-feedback-paused .bd-entry-art-box:after {animation-play-state:paused!important}
@keyframes buff-target-land {0%{filter:brightness(1)}24%{filter:brightness(1.55)}100%{filter:brightness(1)}}
@keyframes buff-machine-land {0%,100%{transform:scale(1)}30%{transform:scale(1.09)}64%{transform:scale(.99)}}
@keyframes buff-luck-arrive {0%{opacity:0;transform:scale(.55)}65%{opacity:1;transform:scale(1.14)}100%{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce) {
    #battle-screen :is(.buff-received,.buff-machine-received),.hero-luck-badge img,
    #battle-screen.lottery-charge-haste #bonus-dice-btn .bd-entry-art-box:after,
    #battle-screen.lottery-swift .dice-cooldown-bar:after {animation:none!important}
}

/* v1.29h 幸运等级四叶草：1 级绿、2 级紫、3 级金（图在 assets/luck_clover_v129h） */
.hero-luck-badge{width:23px;height:23px}
.is-mobile-game .hero-luck-badge{width:max(23px,calc(var(--mobile-reading,14px)*1.6));height:max(23px,calc(var(--mobile-reading,14px)*1.6))}
.hero-luck-badge img{filter:drop-shadow(0 1px 1px #253c28)}
.hero-luck-badge[data-clover="2"] img{filter:drop-shadow(0 1px 1px #2c1846) drop-shadow(0 0 3px rgba(190,120,255,.75))}
.hero-luck-badge[data-clover="-1"] img{filter:drop-shadow(0 1px 1px #000) drop-shadow(0 0 3px rgba(40,40,48,.9));animation:buff-luck-arrive .55s ease-out both,luck-clover-gloom 2.4s ease-in-out .55s infinite}
@keyframes luck-clover-gloom{50%{transform:rotate(-8deg) translateY(1px);opacity:.82}}
.hero-luck-badge[data-clover="3"] img{filter:drop-shadow(0 1px 1px #5a3410) drop-shadow(0 0 4px rgba(255,214,80,.95));animation:buff-luck-arrive .55s ease-out both,luck-clover-gold 1.6s ease-in-out .55s infinite}
@keyframes luck-clover-gold{0%,100%{transform:scale(1);filter:drop-shadow(0 1px 1px #5a3410) drop-shadow(0 0 3px rgba(255,214,80,.8))}50%{transform:scale(1.08);filter:drop-shadow(0 1px 1px #5a3410) drop-shadow(0 0 7px rgba(255,230,120,1))}}
.lottery-feedback-paused .hero-luck-badge img,.battle-buff-feedback.is-paused .hero-luck-badge img{animation-play-state:paused!important}
.dice-unit.is-luck-max .dice-3d-wrap{filter:drop-shadow(0 0 7px #ffd84d) drop-shadow(0 0 3px #fff4b0)}
