#combat-overlay{position:fixed;inset:0;z-index:80;background:#0007;touch-action:none;display:grid;place-items:center}#combat-overlay[hidden]{display:none}.combat-window{box-sizing:border-box;width:740px;height:320px;padding:12px 18px 20px;background:url('ui/status-frame.png') center/100% 100%;transform:scale(var(--combat-scale,1));font-family:TSClient,sans-serif;color:#151b25}.combat-window h2{margin:0 0 20px;padding:5px 18px;height:38px;background:url('ui/status-title.png') center/100% 100%;font-size:22px;color:white;text-shadow:1px 2px #35669c}.combat-cards{display:flex;align-items:center;justify-content:center;gap:10px;height:220px;background:url('ui/status-content.png') center/100% 100%;padding:14px;box-sizing:border-box}.combat-card{width:31%;height:184px;border:0;background:url('ui/status-content.png') center/100% 100%;color:#141c28;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;font-family:inherit;cursor:pointer}.combat-card img{width:60px;height:60px;image-rendering:pixelated}.combat-card strong{font-size:20px}.combat-card span{font-size:14px;white-space:pre-line;line-height:1.6}.combat-card:hover,.combat-card:focus-visible{outline:3px solid #eccf6c;outline-offset:-5px}
/* Original client skill-slot art, live combat cooldown clock. */
#learned-skill-bar{position:absolute;z-index:12;left:50%;bottom:max(7px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:2px;padding:3px;background:#201d42;border:2px ridge #aac5c6;border-radius:3px;pointer-events:auto;touch-action:none;max-width:95vw}.learned-skill-slot{position:relative;width:48px;height:48px;flex:0 0 48px;background:url('ui/skills/common0_bod023.png') center/100% 100%;overflow:hidden}.learned-skill-slot>img{position:absolute;inset:4px;width:calc(100% - 8px);height:calc(100% - 8px);image-rendering:pixelated}.skill-cooldown-shade{position:absolute;left:4px;right:4px;bottom:4px;background:#101222b8;max-height:calc(100% - 8px);pointer-events:none}.skill-cooldown-number{position:absolute;inset:0;display:grid;place-items:center;color:white;font:700 18px TSClient,sans-serif;text-shadow:1px 1px 2px #000,-1px -1px 2px #000}.learned-skill-slot>small{position:absolute;right:4px;bottom:2px;color:#ffe479;font:700 11px TSClient,sans-serif;text-shadow:1px 1px #000}.learned-skill-slot.low-sp>img{filter:brightness(.5)}.learned-skill-slot.low-sp .skill-cooldown-number{color:#a5d9ff;font-size:14px}
@media(max-width:1800px){#learned-skill-bar{bottom:max(72px,env(safe-area-inset-bottom))}}
@media(max-height:500px) and (orientation:landscape){#learned-skill-bar{bottom:max(59px,env(safe-area-inset-bottom));gap:1px;padding:2px}.learned-skill-slot{width:36px;height:36px;flex-basis:36px}.skill-cooldown-number{font-size:14px}.learned-skill-slot>small{font-size:9px}}
/* Nine shortcuts; scrolling is only needed when the viewport is narrower. */
#learned-skill-bar{max-width:min(460px,80vw);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;touch-action:pan-x;overscroll-behavior:contain}.combat-card span{font-size:12px;padding:0 8px}
@media(max-height:500px) and (orientation:landscape){#learned-skill-bar{max-width:min(360px,65vw)}}

/* Reserve room for concrete upgrade deltas, including multi-hit milestones. */
.combat-window{height:400px}.combat-cards{height:300px}.combat-card{height:264px;gap:6px;justify-content:flex-start;padding-top:12px;box-sizing:border-box}.combat-card img{width:44px;height:44px;flex-shrink:0}.combat-card strong{font-size:18px}.combat-card span{line-height:1.45;font-size:12px;text-align:left;max-width:100%;box-sizing:border-box}
/* Manual field casting: hotkey numbers, clickable slots and a short press highlight. */
.skill-hotkey{display:none;position:absolute;z-index:2;left:3px;top:1px;color:#fff;font:700 11px TSClient,sans-serif;font-style:normal;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000;pointer-events:none}
#learned-skill-bar.manual .skill-hotkey{display:block}
#learned-skill-bar.manual .learned-skill-slot{cursor:pointer}
.learned-skill-slot.pressed::after{content:'';position:absolute;inset:0;z-index:3;background:rgba(255,244,170,.55);pointer-events:none;animation:skill-press .22s ease-out forwards}
@keyframes skill-press{to{opacity:0}}
@media(max-height:500px) and (orientation:landscape){#learned-skill-bar.manual .learned-skill-slot{width:44px;height:44px;flex-basis:44px}#learned-skill-bar.manual{max-width:min(420px,72vw)}}

/* Dungeon battle: 戰意 card bar, non-blocking (movement and auto-fight continue). */
#combat-overlay.combat-inline{background:none;pointer-events:none;touch-action:auto;place-items:end center;padding-bottom:128px;box-sizing:border-box}
#combat-overlay.combat-inline .combat-window{pointer-events:auto;transform:scale(calc(var(--combat-scale,1) * .88));transform-origin:center bottom;box-shadow:0 0 18px #ffe58a99}

/* Death uses the native NPC yes/no dialogue with the player's own sprite. */
#combat-overlay.combat-death{background:rgba(0,0,0,.1568627506494522);}
#combat-overlay.combat-death button:hover:not(:disabled){filter:none;}
#combat-overlay.combat-death-dismissed{background:none;pointer-events:none;}
#combat-overlay .combat-revive{position:absolute;bottom:110px;left:50%;transform:translateX(-50%);min-height:42px;pointer-events:auto;}
