body.fighting{grid-template-rows:0 minmax(0,1fr) 0}.mobile-battle{grid-template-rows:40px minmax(0,1fr) 58px}.battle-head{justify-content:flex-end;background:#15271fee}.battle-head .instruction{display:none}.battle-head button{min-height:38px}.timeline{justify-content:center;gap:5px;padding:1px 4px}.timeline button{position:relative;min-width:48px;width:48px;min-height:54px;height:54px;padding:0;border-radius:3px;background:#233e32;border:1px solid #798867;flex-shrink:0}.timeline button.enemy{background:#4a2e2b;border-radius:15px 3px}.timeline button.current{border:3px solid #ffe59c}.timeline button.current:after{content:'';position:absolute;top:0;left:17px;border:5px solid transparent;border-top-color:#ffe59c}.timeline button.selected{outline:2px solid #8debd4;outline-offset:-2px}.turn-sprite{width:46px;height:51px;display:block;pointer-events:none}.actor-compact{max-width:90%;padding:4px 8px;line-height:1.4}.mobile-battle[data-mode=actor] .actor-compact{display:block}.commands{width:208px;grid-template-columns:repeat(2,1fr);gap:6px;padding:6px;max-height:calc(100% - 48px)}.commands button{font-size:18px;min-height:44px}.commands button:disabled{opacity:.4}.target-confirm{position:absolute;display:flex;gap:10px;padding:4px;z-index:20;border:1px solid #c6a875;background:#142b25f5;border-radius:6px;box-shadow:0 2px 8px #0008;touch-action:manipulation}.target-confirm button{min-height:44px;min-width:70px;font-size:18px;padding:4px 10px}.target-confirm .cancel{border:1px dashed #c4bcb0;border-radius:20px;background:#24342f}.target-confirm .primary{border-radius:3px;background:#75633d;border:2px solid #ffe2a1}.confirm-leader{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:8}.battle-controls{position:absolute;left:6px;bottom:6px;z-index:12;display:flex;gap:8px;max-width:calc(100% - 12px);align-items:center}.battle-controls button{min-height:44px;font-size:18px;padding:4px 12px}.battle-controls:has(.primary){left:auto;right:6px}.battle-controls:empty{display:none}.face-controls{width:138px;height:138px;display:block;background:none;z-index:9}.face-controls button{position:absolute;grid-area:auto!important;width:44px;height:44px}.face-controls svg{width:30px;height:30px;display:block}.prediction{top:5px;bottom:auto;left:21%;right:21%;max-height:68px;padding:4px 8px}.prediction:has(details[open]){max-height:calc(100% - 60px);z-index:25}.prediction .chain-summary{max-height:42px;overflow:auto}.prediction summary{min-height:44px}.combat-person{bottom:3px;width:19%;max-width:190px}.combat-person .portrait.large{height:min(31dvh,140px)}.target-detail{top:4px}.person-readout{font-size:14px}.person-readout strong{font-size:16px}.terminal-effect{position:absolute;inset:0;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#071c19c9;color:#ffe4a4;pointer-events:auto;animation:terminal-in .4s ease-out}.terminal-effect h1{font-size:44px;letter-spacing:.3em}.terminal-emblem{font-size:72px;filter:drop-shadow(0 0 16px #ceac62)}.terminal-effect.lose{color:#dbbbb1;background:#241d27df}@keyframes terminal-in{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.settings{overflow:auto}.font-preview{font-size:20px;line-height:1.7}.font-preview h3{font-size:24px}.font-preview button{font-size:18px}.font-status{font-size:16px}
@media(max-height:350px){.mobile-battle{grid-template-rows:36px minmax(0,1fr) 50px}.timeline button{height:46px;min-height:46px}.turn-sprite{height:44px}.combat-person .portrait.large{height:70px}.commands{top:30px;max-height:calc(100% - 30px)}}
.prediction:not(:has(details[open])){max-height:none}.prediction .chain-summary:empty{display:none}

.prediction.has-push{max-height:min(42dvh,230px);overflow:auto}.push-prediction{font-size:14px;line-height:1.45}.push-result{padding:3px 0;border-top:1px solid #8d8864}.push-result strong,.push-result span{display:block}.prediction.has-push .chain-summary{display:none}

.ground-inspection{bottom:60px;max-width:min(27em,calc(100% - 16px));line-height:1.4;overflow-wrap:anywhere;box-sizing:border-box}

.skill-caption{position:absolute;z-index:16;left:50%;transform:translateX(-50%);top:5px;padding:5px 12px;max-width:94%;border:1px solid #c1a66a;background:#172820f2;color:#fff2cf;font-weight:bold;pointer-events:none}.skill-caption[data-kind=reaction]{border-color:#7cb8bc}
