/* 081: dimensions use the game container, never the shrinking menu container. */
.original-battle .combat-scroll{box-sizing:border-box;left:27%;right:auto;top:12%;width:46%;height:58%;max-height:80%;transform:none;border-width:5cqw 4cqw 4cqw;padding:1cqw 2cqw;background:#cbd0b3;min-height:0;}
.original-battle .combat-scroll h2{position:static;margin:0;flex:0 0 7cqw;font:5cqw/1.4 JHPixel,monospace;letter-spacing:2cqw;text-align:center;color:#f5e536;text-shadow:1px 1px #456346;}
.original-battle .combat-options{display:flex;flex-direction:column;justify-content:space-around;gap:0;overflow-x:hidden;overflow-y:auto;min-height:0;}
.original-battle .combat-options>button{box-sizing:border-box;min-width:0;width:100%;min-height:0;flex:1 0 6cqw;font:5cqw/1.25 JHPixel,monospace;letter-spacing:2cqw;padding:.4cqw 0;border:0;white-space:normal;overflow-wrap:anywhere;}
.original-battle .combat-scroll.combat-picker{left:12%;top:10%;width:76%;height:73%;max-height:80%;border:2px solid #779c7e;border-radius:2px;background:#365b4e;padding:1.5cqw 2cqw;color:#cbdcaf;}
.combat-picker::before,.idle-summary::before{content:'';position:absolute;inset:0;pointer-events:none;border:solid transparent;border-width:5cqw;border-image:url('original/flowerStyle.gif.png') 15 fill stretch;opacity:.3;}
.original-battle .combat-picker h2{color:#e7efda;font-size:4.8cqw;line-height:1.3;letter-spacing:1cqw;flex-basis:6cqw;text-shadow:none;}
.original-battle .combat-picker .combat-options{justify-content:flex-start;overflow:hidden;position:relative;}
.combat-choice-list{flex:0 0 22cqw;background:#102d23;overflow-y:auto;}
.original-battle .combat-choice-list>button{display:flex;align-items:center;justify-content:space-between;gap:1cqw;min-height:7.2cqw;height:auto;flex:none;width:100%;font:4.4cqw/1.3 JHPixel,monospace;letter-spacing:0;color:#d9dfb0;text-align:left;padding:.5cqw 1cqw;border:0;background:transparent;}
.combat-choice-list>button span{min-width:0;overflow-wrap:anywhere;}
.original-battle .combat-choice-list>button small{flex:none;white-space:nowrap;font:inherit;letter-spacing:0;}
.original-battle .combat-choice-list>button.selected{background:#567366;color:#fff078;}
.combat-pages{display:flex;align-items:center;justify-content:center;gap:4cqw;flex:none;background:#102d23;color:#b8c494;font:3cqw/1 JHPixel,monospace;}
.original-battle .combat-pages button{flex:none;width:8cqw;min-height:6cqw;padding:0;font-size:3.5cqw;letter-spacing:0;color:#b7d19e;background:none;border:0;}
.original-battle .combat-pages button:disabled{opacity:.25;}
.original-battle .combat-options .combat-description{flex:1;min-height:0;overflow-y:auto;text-align:left;overflow-wrap:anywhere;margin:0;padding:3cqw 1cqw;font:4.3cqw/1.4 JHPixel,monospace;color:#e4edd7;}
.combat-bottom{position:relative;}
.combat-controls{position:absolute;bottom:3%;left:3%;right:3%;display:flex;justify-content:space-between;pointer-events:none;}
.combat-controls button{pointer-events:auto;min-height:6cqw;min-width:18cqw;padding:.6cqw 2cqw;font:4.2cqw/1.2 JHPixel,monospace;letter-spacing:.5cqw;color:#d8e6aa;border:solid transparent;border-width:1cqw 2cqw;border-image:url('original/UI2.gif.png') 8 10 fill stretch;background:#25473e;border-radius:0;}
.combat-controls button:disabled{opacity:.45;}
.combat-bottom:has(.combat-controls button) #combat-hud{height:75%;}
.combat-hero[hidden],.combat-enemy[hidden],.original-battle .combat-scroll[hidden],.idle-summary[hidden]{display:none!important;}
.game .original-idle-entry.in-combat{box-sizing:border-box;border-radius:0;height:6%;min-height:0;top:1%;right:2%;font:3.5cqw/1.3 JHPixel,monospace;white-space:nowrap;}
.idle-summary{box-sizing:border-box;position:absolute;left:3%;top:34%;width:94%;max-height:49%;overflow-y:auto;z-index:7;padding:2cqw 3cqw;background:#36594c;border:2px solid #8da779;border-radius:4px;font:4.5cqw/1.25 JHPixel,monospace;color:#bdcf81;image-rendering:pixelated;}
.idle-summary>*{position:relative;}
.idle-summary h2{margin:0 0 1cqw;text-align:center;color:#e4cb78;font:5.5cqw/1.2 JHPixel,monospace;}
.idle-summary h2>img{width:5cqw;height:5cqw;object-fit:contain;vertical-align:middle;}
.idle-summary [data-idle-panel-close]{position:absolute;right:0;top:0;min-height:0;padding:0 1cqw;background:none;border:0;color:#a8cbbc;font-size:5cqw;}
.idle-stats{display:grid;grid-template-columns:1.3fr 1fr .8fr 1fr;gap:.8cqw;color:#20afa4;font-size:4.2cqw;}
.idle-stats>*{min-width:0;overflow-wrap:anywhere;}
.idle-stats b,.idle-effect b{font-weight:normal;background:#073c28;color:#1fdf20;font-variant-numeric:tabular-nums;}
.idle-effect{margin-top:1.5cqw;border-top:1px solid #82a17b;padding-top:1cqw;}
.idle-effect h3,.idle-effect p{margin:0;font:inherit;line-height:1.3;}
.idle-effect h3{color:#91c32b;}
.idle-effect button{float:right;border:0;padding:0;margin:0 1cqw;min-height:0;background:none;}
.idle-effect img{height:5cqw;width:auto;display:block;}
.idle-summary .idle-method{margin:1cqw 0;font-size:3.5cqw;overflow-wrap:anywhere;color:#c2d4a4;}
.idle-summary .idle-toggle{display:block;width:100%;margin:0;border:0;background:none;color:#ecd786;padding:.5cqw;min-height:6cqw;font:5cqw/1.3 JHPixel,monospace;}
/* Keep rank/chat panels in the same game-sized frame; reserve scrolling for content. */
.mobile-fit #modal.original-panel.inset-panel{width:calc(var(--jh-stage-w) - 16px)!important;max-width:calc(var(--jh-stage-w) - 16px)!important;height:calc(var(--jh-stage-h) - 24px)!important;max-height:calc(var(--jh-stage-h) - 24px)!important;}
#modal #rank-live{flex:1;min-height:0;overflow-y:auto;scrollbar-gutter:stable;}
#modal .rank-row{min-height:42px;}
#modal #community-chat-form{flex:none;display:flex;gap:6px;}#modal #community-chat-form input{min-width:0;flex:1;font-size:16px;}
.mobile-fit.keyboard-open #modal{max-height:calc(var(--jh-visible-h) - 12px)!important;top:calc(var(--jh-visible-top) + var(--jh-visible-h)/2)!important;}
/* Same list and scroll geometry in PVE, sparring and arena. */
.original-battle.duel-battle .combat-scroll{left:27%;top:12%;width:46%;height:58%;max-height:80%;padding:1cqw 2cqw;border-width:5cqw 4cqw 4cqw;}
.original-battle.duel-battle .combat-scroll h2{position:static;margin:0;flex:0 0 7cqw;font:5cqw/1.4 JHPixel,monospace;letter-spacing:2cqw;}
.original-battle.duel-battle .combat-options{display:flex;flex-direction:column;gap:0;}
.original-battle.duel-battle .combat-options>button{min-height:0;flex:1 0 6cqw;padding:.4cqw 0;font:5cqw/1.25 JHPixel,monospace;letter-spacing:2cqw;border:0;}
.original-battle.duel-battle .combat-scroll.combat-picker{left:12%;top:10%;width:76%;height:73%;max-height:80%;padding:1.5cqw 2cqw;border:2px solid #779c7e;}
.original-battle.duel-battle .combat-picker h2{flex-basis:6cqw;font-size:4.8cqw;letter-spacing:1cqw;}
.original-battle.duel-battle .combat-picker .combat-options{justify-content:flex-start;}
.original-battle.duel-battle .combat-choice-list>button{flex:none;min-height:7.2cqw;font:4.4cqw/1.3 JHPixel,monospace;letter-spacing:0;padding:.5cqw 1cqw;}
.original-battle.duel-battle .combat-choice-list>button small{font:inherit;letter-spacing:0;}
.original-battle.duel-battle .combat-pages button{flex:none;width:8cqw;min-height:6cqw;font:3.5cqw/1.2 JHPixel,monospace;letter-spacing:0;padding:0;}
.duel-head-name{position:absolute;z-index:2;width:30%;transform:translate(-50%,-100%);text-align:center;pointer-events:none;font:3.4cqw/1.2 JHPixel,monospace;color:#ffcc8a;text-shadow:1px 1px #132d24,-1px -1px #132d24;overflow-wrap:anywhere;}
.duel-head-name[data-duel-name="hero"]{color:#88f2ed;}
.duel-head-name{width:25%;font-size:3.2cqw;}
.original-battle.duel-battle .combat-choice-list>button{justify-content:space-between;align-items:center;text-align:left;}
.duel-head-health{z-index:2;}

/* 082: compact idle panel and native crossed-swords artwork. */
.idle-summary{left:10%;top:35%;width:80%;max-height:42%;padding:1.5cqw 2.5cqw;font-size:3.7cqw;line-height:1.25;}
.idle-summary h2{font-size:4.5cqw;margin-bottom:.8cqw;}
.idle-summary h2>img{width:4.2cqw;height:4.2cqw;margin-right:.8cqw;}
.idle-summary [data-idle-panel-close]{font-size:4.2cqw;}
.idle-summary .idle-stats{font-size:3.6cqw;gap:.6cqw;}
.idle-summary .idle-effect{margin-top:1cqw;padding-top:.8cqw;}
.idle-summary .idle-effect img{height:4.2cqw;}
.idle-summary .idle-method{font-size:3cqw;margin:.8cqw 0;}
.idle-summary .idle-toggle{font-size:4.2cqw;min-height:5cqw;padding:.4cqw;}

/* 083: compact touch-only spell selection, single scrolling list. */
.original-battle .combat-scroll.combat-touch-spells,.original-battle.duel-battle .combat-scroll.combat-touch-spells{left:16%;top:14%;width:68%;height:58%;max-height:68%;padding:1.5cqw 2cqw;}
.original-battle .combat-touch-spells h2,.original-battle.duel-battle .combat-touch-spells h2{position:relative;font-size:4.4cqw;flex:0 0 6cqw;line-height:1.3;letter-spacing:.5cqw;padding:0 6cqw;}
.original-battle .combat-touch-spells .combat-options{flex:1;min-height:0;overflow:hidden;}
.original-battle .combat-touch-spells .combat-choice-list{flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8ea87e #102d23;}
.original-battle .combat-touch-spells .combat-choice-list>button,.original-battle.duel-battle .combat-touch-spells .combat-choice-list>button{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-content:stretch;gap:.8cqw 1cqw;min-height:13cqw;width:100%;padding:1.5cqw 1cqw;text-align:left;font:4cqw/1.3 JHPixel,monospace;letter-spacing:0;border-bottom:1px solid #476b56;}
.original-battle .combat-touch-spells .combat-choice-list>button small{font:inherit;white-space:nowrap;}
.original-battle .combat-touch-spells .combat-skill-description{grid-column:1/-1;font:3.1cqw/1.35 JHPixel,monospace;color:#b9cdb0;overflow-wrap:anywhere;}
.original-battle .combat-touch-spells .combat-choice-list>button.unavailable{opacity:.5;}
.original-battle .combat-picker-close{position:absolute;right:0;top:0;width:6cqw;min-height:5cqw;height:5cqw;padding:0;border:0;background:none;color:#d8e6ca;font:5cqw/1 JHPixel,monospace;letter-spacing:0;}
.combat-touch-back{position:absolute;z-index:5;right:3%;bottom:3%;min-height:7cqw;padding:1cqw 2cqw;border:1px solid #8eaa7c;border-radius:0;background:#284c40;color:#d4e3b9;font:3.6cqw/1.3 JHPixel,monospace;}
.original-battle .combat-touch-spells h2,.original-battle.duel-battle .combat-touch-spells h2{inset:auto;margin:0;}
.original-battle .combat-touch-spells .combat-choice-list>button,.original-battle.duel-battle .combat-touch-spells .combat-choice-list>button{box-sizing:border-box;min-width:0;white-space:normal;}
.original-battle .combat-touch-spells .combat-skill-description{white-space:normal;min-width:0;}

/* 085: approved C layout; spell window matches the root battle menu. */
.original-battle .combat-scroll.combat-spell-compact,.original-battle.duel-battle .combat-scroll.combat-spell-compact{left:27%;top:12%;width:46%;height:58%;max-height:80%;padding:1cqw 2cqw;}
.original-battle .combat-spell-compact h2,.original-battle.duel-battle .combat-spell-compact h2{font-size:4.4cqw;flex-basis:7cqw;padding:0 5cqw 1cqw;margin-bottom:1cqw;border-bottom:1px solid #77916f;}
.original-battle .combat-spell-compact .combat-choice-list{background:#284c40;}
.original-battle .combat-spell-compact .combat-choice-list>button,.original-battle.duel-battle .combat-spell-compact .combat-choice-list>button{display:flex;align-items:center;justify-content:space-between;gap:1.2cqw;min-height:8.5cqw;padding:1.5cqw .8cqw;font:3.5cqw/1.4 JHPixel,monospace;white-space:nowrap;}
.original-battle .combat-spell-compact .combat-choice-list>button>span:first-child{flex:1;white-space:nowrap;overflow-wrap:normal;}
.original-battle .combat-spell-compact .combat-choice-list>button small{flex:none;font:inherit;color:#e1cd7c;}
.original-battle .combat-spell-compact .combat-skill-description{display:none;}
.original-battle .combat-spell-compact .combat-choice-list>button:focus-visible,.original-battle .combat-spell-compact .combat-choice-list>button:hover{background:#456859;outline:1px solid #8b9d70;outline-offset:-1px;}

/* 1.0.14: keep idle labels and compact amounts on a single line. */
.idle-summary .idle-stats{grid-template-columns:1.25fr 1.3fr .65fr 1.3fr;align-items:center;}
.idle-summary .idle-stats>*{white-space:nowrap;overflow-wrap:normal;}
.idle-summary .idle-stats b{font-size:3.3cqw;}
