/* The compact control rail stays above combat; the painted lottery floats on the left. */
:root{--battle-hud-height:50px}
.battle-hud{height:var(--battle-hud-height);padding:0;pointer-events:none}
.battle-hud::before{content:'';position:absolute;inset:0;background:linear-gradient(#f3e2beed,#f3e2bec9);border-bottom:1px solid #94734c99;border-radius:0 0 7px 7px;box-shadow:0 1px 0 #50392720}
.battle-hud .exp-bar-container{position:absolute;top:39px;left:8px;right:8px;width:auto;height:9px;border-width:1px;border-radius:4px}
.battle-hud .exp-text{font-size:8px;line-height:8px}
.battle-hud .battle-info-row{position:absolute;left:12px;right:128px;top:2px;height:33px;display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:17px 16px;gap:0 7px;padding:0;background:none;border:0;border-radius:0;backdrop-filter:none}
.battle-hud .timer{grid-column:1;grid-row:1;font-size:12px;line-height:16px}
.battle-hud .gold-display{grid-column:1;grid-row:2;gap:3px;font-size:11px;line-height:15px}
.battle-hud .gold-display img{width:13px;height:13px}
.battle-hud .gold-display span{font:inherit;color:inherit}
.battle-hud .wave-info{grid-column:2;grid-row:1/3;align-self:start;margin-top:2px;text-align:left;font-size:12px;line-height:16px}
.battle-hud .encounter-track{position:absolute;left:59px;right:130px;top:27px;height:4px;margin:0}
#battle-exit-btn,#battle-speed-btn,.land-blessing-toggle{box-sizing:border-box;width:34px;height:34px;padding:0;margin:0;border:2px solid #88623f;border-radius:9px;background:linear-gradient(#fff3d5,#eed09a);box-shadow:inset 0 0 0 1px #fff9e2,0 2px 0 #87613f55;color:#715033;display:flex;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .12s ease,background .12s ease;backdrop-filter:none;opacity:1}
#battle-exit-btn{top:2px;right:8px}
#battle-speed-btn{top:2px;right:48px;left:auto;flex-direction:column;gap:1px}
#battle-speed-btn span{font:400 13px/13px var(--font-game-number);color:#715033;letter-spacing:0;text-shadow:none}
#battle-speed-btn .battle-speed-glyph{display:flex;gap:1px;height:8px;align-items:center;justify-content:center}
.battle-speed-glyph i{display:block;width:7px;height:8px;background:#ad8d64;clip-path:polygon(0 0,100% 50%,0 100%)}
.battle-speed-glyph i+i{opacity:.4}
#battle-speed-btn.is-fast{background:linear-gradient(#fff0b8,#eac178);box-shadow:inset 0 0 0 1px #fff5cf,0 2px 0 #87613f55}
#battle-speed-btn.is-fast span{color:#8f532e}
#battle-speed-btn.is-fast .battle-speed-glyph i{background:#a16537;opacity:1}
#battle-exit-btn .pause-glyph i{height:15px;background:#795535}
#battle-exit-btn:hover,#battle-speed-btn:hover,.land-blessing-toggle:hover{transform:translateY(-1px);filter:brightness(1.025)}
#battle-exit-btn:active,#battle-speed-btn:active,.land-blessing-toggle:active{transform:translateY(1px)}
#battle-exit-btn:focus-visible,#battle-speed-btn:focus-visible,.land-blessing-toggle:focus-visible{outline:2px solid #725038;outline-offset:2px}

/* One third UP from the bottom: the center is at two thirds of the game screen. */
#bonus-dice-btn{left:6px;top:calc(66.667% - 32px);bottom:auto;width:58px;height:64px;z-index:34}
#bonus-dice-btn .bd-entry-art-box{left:1px;top:0;width:56px;height:55px}
#bonus-dice-btn .bd-entry-stock{right:0;top:-3px;width:19px;height:22px}
#bonus-dice-btn .bd-charge-badge{font-size:22px;line-height:22px;-webkit-text-stroke-width:2.5px}
#bonus-dice-btn .bd-entry-meter{left:6px;right:5px;bottom:2px;height:5px}
#bonus-dice-btn .bd-entry-machine{transform:scale(.84);transform-origin:top left;left:4px;top:10px}

/* One inventory; land runes and permanent lottery rewards stay distinct inside. */
.land-blessing-layer{z-index:35}
.land-blessing-layer[hidden]{display:none!important}
.land-blessing-bar{left:auto;right:88px;top:2px;width:34px;height:34px;max-width:none;padding:0;overflow:visible;display:block}
.land-blessing-toggle{position:relative;user-select:none;-webkit-touch-callout:none;touch-action:none}
.land-blessing-seal{display:grid;place-items:center;width:26px;height:27px;color:#b15d43;font:400 23px/1 var(--font-game-title);transform:rotate(-5deg);text-shadow:0 1px #fff9e2}
.land-blessing-count{position:absolute;right:-3px;top:-2px;min-width:12px;height:13px;padding:0 3px;border:1px solid #85603b;border-radius:5px;background:#eed28d;color:#735131;font:400 10px/11px var(--font-game-number)}
.land-blessing-tip{left:auto;right:8px;top:56px;width:304px;max-width:calc(100% - 16px);padding:11px 12px 8px;background:#fff1d8fc;box-shadow:inset 0 0 0 2px #ffe1a5,0 5px 14px #25322630}
.land-tip-heading{display:block;padding:0 0 7px;border-bottom:1px solid #d8b984;color:#715035;font:400 21px/1.2 var(--font-game-title)}
.land-blessing-list{max-height:390px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c7a171 transparent;touch-action:pan-y}
.land-tip-group{font:400 11px/1.5 var(--font-game-title);color:#a27b4a;letter-spacing:.12em;margin:8px 0 1px}
.land-blessing-entry{display:flex;align-items:flex-start;gap:9px;padding:8px 0;border-bottom:1px solid #dcc29466}
.land-blessing-entry:last-child{border-bottom:0}
.land-blessing-entry.is-pending{display:none}
.land-blessing-icon,.land-charm-icon{flex:none;width:32px;height:34px;margin:1px 0 0;padding:3px;object-fit:contain}
.land-charm-icon{border:1px solid #bc985f;border-radius:8px;background:#f4dfb1}
.land-tip-copy{flex:1;min-width:0}
.land-tip-title{font:400 16px/1.3 var(--font-game-title);align-items:baseline}
.land-tip-rarity{font-size:10px;flex:none}
.land-blessing-tip p{margin:4px 0 0;font-size:10px;line-height:1.65}
.land-tip-live:empty{display:none}
.land-blessing-award{left:auto;right:8px;top:56px;width:276px}
.battle-floating-text-layer{position:absolute;inset:0;z-index:35;pointer-events:none;overflow:hidden;clip-path:inset(var(--battle-hud-height,50px) 0 0)}
.land-blessing-toggle.is-new{animation:landSignArrive .5s ease-out}

/* Brief dock bubbles: never rise into the monster lane, even for LUCKY. */
.hero-cast-layer{clip-path:inset(83.52941% 0 0);overflow:hidden}
.hero-cast{display:flex;flex-direction:column;align-items:center;max-height:42px;overflow:hidden;padding:1px 0 3px;font-size:10.5px;line-height:1}
.hero-cast-panel,.hero-cast.is-lucky .hero-cast-panel{display:inline-flex;justify-content:center;align-items:center;max-width:100%;padding:1px 5px;gap:1px 3px;border:1px solid var(--hero-edge,#99754a);border-radius:5px;background:#fff0d6dc;box-shadow:0 1px 0 #75553444;animation:heroBubbleArrive .12s ease-out both}
.hero-cast-name{font:400 10.5px/13px var(--font-game-title);letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#63492f}
.hero-cast-bonus{font-size:8px;line-height:11px;letter-spacing:0}
.hero-cast.is-lucky{gap:0}
.hero-cast-lucky{font:400 12px/14px var(--font-game-number);letter-spacing:.035em;margin:0;-webkit-text-stroke-width:1.5px;animation:none}
.hero-cast-resonance{margin:0;font-size:9px;line-height:12px;animation:none}
.hero-cast-burst{top:9px}.hero-cast-burst::after{display:none}
.hero-cast-burst i{width:4px;height:4px;animation:heroDockSpark .5s ease-out both}
.hero-cast.is-lottery .hero-cast-panel{border-color:#b08a49;background:#ffedbedd}
@keyframes heroBubbleArrive{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@keyframes heroDockSpark{0%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-5px)}25%{opacity:.8}100%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-16px)}}
@media(prefers-reduced-motion:reduce){.hero-cast-panel,.hero-cast.is-lucky .hero-cast-panel,.land-blessing-toggle.is-new{animation:none}}
