/* Mobile play: retain room for the next action and readable battle feedback. */
.combat-feedback-row{height:44px;min-height:44px;max-height:44px;flex:none}
.combat-feedback-row .combat-feedback{height:44px;min-height:44px;max-height:44px;padding:5px 1px;white-space:normal;overflow:auto;text-overflow:clip;font:12px/17px system-ui;overflow-wrap:anywhere}
.combat-buttons{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:52px;gap:6px}
.combat-buttons .btn{height:52px;min-height:52px;max-height:52px;min-width:0;margin:0;padding:5px 4px;overflow:hidden;transition:background .15s}
.combat-buttons .btn strong,.combat-buttons .btn small{white-space:nowrap}
.combat-buttons .btn small{font-size:11px;line-height:14px}
.combat-buttons .btn:active{transform:none}
.combat-buttons .btn[aria-disabled="true"]{opacity:.5;cursor:help}
.combat-buttons .btn[aria-disabled="true"]:hover{background:linear-gradient(#faf7ec,#e6e0cd);border-color:#a9a38e}
.combat-buttons .btn.primary[aria-disabled="true"]:hover{background:linear-gradient(#5b684d,#435139);border-color:#38442f}
.combat-attack{position:relative;min-width:0;height:52px}
.combat-buttons .combat-actions-toggle{display:grid;grid-template-columns:22px minmax(0,1fr) 22px;align-items:center;gap:0;width:100%;padding:5px 8px;border-radius:3px}
.combat-action-label{grid-column:2;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
.combat-actions-chevron{grid-column:3;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.combat-buttons .combat-actions-toggle[aria-expanded="true"]{background:#d6ddc8}
.combat-buttons .combat-actions-toggle:disabled{cursor:not-allowed}
.combat-actions-toggle[aria-expanded="true"] .combat-actions-chevron{transform:rotate(180deg)}
.combat-action-menu{position:absolute;z-index:35;bottom:calc(100% + 8px);left:0;width:min(310px,calc(100vw - 24px));max-height:min(410px,calc(100dvh - 200px - var(--safe-top,0px) - var(--safe-bottom,0px)));overflow-y:auto;overscroll-behavior:contain;padding:8px;display:grid;gap:6px;background:var(--panel);border:1px solid #aaa18a;border-radius:6px;box-shadow:0 4px 18px #20271940}
.combat-action-menu[hidden]{display:none}
.combat-action-menu>.caps{padding:2px 4px;color:var(--muted)}
.combat-action-menu>.btn{align-items:flex-start;padding-left:12px}
.combat-action-menu>.btn{flex:none;min-height:52px;height:auto;max-height:none;text-align:left}
.combat-action-menu>.btn strong,.combat-action-menu>.btn small{white-space:normal;overflow-wrap:anywhere}
.combat-strip.combat-header{position:relative;z-index:30;height:54px;min-height:54px;max-height:54px;gap:0;padding:0;margin-bottom:5px;overflow:visible}
.combat-header .combat-weapon{display:flex;flex:1;width:auto;min-width:0;height:54px;min-height:54px;max-height:54px;gap:7px;margin:0;padding:5px 8px;border:0;background:transparent;color:inherit}
.combat-header .combat-weapon>.combat-header-content{flex:1;min-width:0;text-align:left;display:grid;gap:3px}
.combat-header .combat-header-field{display:block;font:11px/14px system-ui;color:#e6dac4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.combat-header-weapon{display:flex;align-items:baseline;gap:7px;min-width:0}
.combat-header .combat-header-weapon strong{display:block;min-width:0;font:500 14px/18px Georgia,serif;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.combat-header .combat-header-weapon small{flex:none;font:11px/14px system-ui;color:#e6dac4;white-space:nowrap}
.combat-header .combat-ap{display:flex;align-items:center;align-self:stretch;flex:none;padding:0 8px;border-left:1px solid #8a7560;font:500 13px/18px system-ui;white-space:nowrap}
.combat-weapon-chevron{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.combat-weapon[aria-expanded="true"] .combat-weapon-chevron{transform:rotate(180deg)}
.combat-weapon-menu{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:35;display:grid;gap:8px;max-height:min(320px,calc(100dvh - 260px - var(--safe-top,0px) - var(--safe-bottom,0px)));overflow-y:auto;overscroll-behavior:contain;padding:10px;background:var(--panel);color:var(--ink);border:1px solid #aaa18a;border-radius:6px;box-shadow:0 4px 18px #20271940}
.combat-weapon-menu[hidden]{display:none}
.combat-weapon-menu>.caps{font:11px/14px system-ui;color:var(--muted)}
.combat-weapon-choice{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:58px;padding:9px;background:#eae5d4;color:var(--ink);border:1px solid #b8b09a;border-radius:3px;text-align:left}
.combat-weapon-choice>span{flex:1;min-width:0}
.combat-weapon-choice strong{display:block;font:500 14px/18px Georgia,serif;overflow-wrap:anywhere}
.combat-weapon-choice small{display:block;font:11px/16px system-ui;color:var(--muted);margin-top:3px;overflow-wrap:anywhere}
.combat-weapon-choice>b{flex:none;white-space:nowrap;font:500 11px/16px system-ui}
.combat-weapon-choice:disabled{opacity:.55;cursor:not-allowed}
.combat-weapon-details-link{min-height:44px;padding:7px;border:0;background:transparent;color:var(--ink);text-align:left;font:12px/17px system-ui;text-decoration:underline}
.combat-equipment-links{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}
.combat-equipment-links .combat-tool{min-height:44px;background:#eae5d4;border:1px solid var(--line);border-radius:3px}
.combat-equipment-links .combat-tool:last-child:nth-child(odd){grid-column:1/-1}
.combat-weapon-details+.combat-weapon-details,.combat-prepared-slot+.combat-prepared-slot{border-top:1px solid var(--line);margin-top:12px;padding-top:8px}
.combat-weapon small,.combat-target small,.combat-target .meter-label{font-size:11px}
.combat-panel-body .combat-load-choice{display:flex;flex-direction:column;align-items:flex-start;width:100%;max-width:100%;white-space:normal;text-align:left}
.combat-load-choice small{display:block;margin-top:2px;font-size:11px;font-weight:400}
.combat-load-summary{font-size:13px;overflow-wrap:anywhere}
.combat-target{height:44px;min-height:44px;max-height:44px}
.combat-target small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* One stable receipt per hit: enter gently, hold to read, then fade. */
.combat-attack-target{z-index:12;box-shadow:inset 0 0 0 2px #cfb388!important}
.combat-impact{--impact-x:-50%;position:absolute;top:auto;right:auto;bottom:calc(100% + 5px);left:50%;min-width:65px;padding:5px 8px;display:grid;gap:4px;border:1px solid #b8ad95;border-radius:5px;background:#f3eedf;color:#4b5143;box-shadow:0 2px 7px #252b2030;font:700 16px/18px system-ui;white-space:nowrap;transform:translateX(var(--impact-x));animation:combat-impact-settle var(--impact-duration,1200ms) ease-out var(--impact-delay,0ms) both}
.combat-impact-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:18px;font-variant-numeric:tabular-nums}
.combat-impact-row+.combat-impact-row{padding-top:4px;border-top:1px solid #d6cdbb}
.combat-impact-row .icon{width:16px;height:16px;flex:none;stroke-width:2;fill:none}
.combat-impact-protection{color:#3e6876}
.combat-impact-hp{color:#9b493c}
.combat-impact.miss{background:#ece8d9;color:#59604e;font:500 12px/18px system-ui;min-width:0}
.combat-impact-left{--impact-x:0%;left:2px}
.combat-impact-right{--impact-x:0%;left:auto;right:2px}
.combat-impact-below{top:calc(100% + 5px);bottom:auto}
@keyframes combat-impact-settle{0%{opacity:0;transform:translate(var(--impact-x),4px)}10%,82%{opacity:1;transform:translate(var(--impact-x),0)}100%{opacity:0;transform:translate(var(--impact-x),-3px)}}
@media(prefers-reduced-motion:reduce){.combat-impact{animation:none;opacity:1}}
.meter.protection .meter-fill{background:#66868e}
.combat-vitals-pool{gap:10px}
.combat-vitals-pool>.meter,.combat-protection-open{flex:1;min-width:0}
.combat-protection-open{align-self:stretch;display:flex;align-items:center;background:none;border:0;padding:0;color:inherit;cursor:pointer;text-align:left}
.combat-protection-open .meter{width:100%;margin:0}
.combat-vitals-pool>span{font-size:11px}
.combat-vitals-pool .meter-label{font-size:10px;gap:3px;white-space:nowrap}
.combat-target-pool>span:last-child{width:100px;display:grid;gap:2px}
.combat-target-pool .meter-label{font:9px/11px system-ui;margin-bottom:1px;gap:3px}
.combat-target-pool .meter-track{height:3px}
.combat-series-actions{display:grid;gap:8px;margin-top:12px}
.battle-result-protection p{font:14px/1.5 system-ui}
.battle-result-protection .small{font-size:11px;margin:12px 0}
.battle-result-protection details{font:12px/1.5 system-ui;text-align:left}
.battle-result-protection summary{cursor:pointer;padding:6px 0}
.combat-result-tools{display:flex;justify-content:center;gap:12px}
.combat-tool{min-height:40px;font-size:12px}
.combat-trial-tools{grid-template-columns:repeat(4,minmax(0,1fr))}
.combat-focused .toast{bottom:auto;top:max(8px,var(--safe-top));pointer-events:none}
@media(max-width:640px){
 .scene.scene-city{height:190px}
 .scene-city .scene-title{left:14px;right:14px;bottom:13px}
 .scene-city .scene-title h2{font-size:26px}
 .scene-city .scene-title p{font-size:12px;line-height:1.4;margin-top:6px}
 .scene-city .scene-title .caps{display:none}
 .scene-city .scene-marker{top:36%;left:auto;right:12px;min-height:40px}
 .scene-actions{padding:10px;gap:7px}
 .scene-actions .btn,.npc-description .btn,.quest-card .btn,.arena-row .btn{min-height:44px;font-size:13px}
 .scene-actions .hint{display:none}
 .npc-row{padding:12px}
 .npc-row .npc-avatar{width:56px;height:66px}
 .npc-description p{font-size:13px}
 .arena-row{gap:8px;padding:12px}
 .arena-row .rank-emblem{display:none}
 .arena-text p{font-size:12px}
 .welcome-art{min-height:180px;padding:20px}
 .welcome-copy h2{font-size:30px;margin:6px 0 10px}
 .welcome-features{display:none}
 .registration{padding:20px}
 .registration input,.registration select{font-size:16px;min-height:44px}
 .registration .btn{min-height:48px}
 .bottomnav button{font-size:10px}
}

[data-quarry-offer] .btn{min-height:48px;white-space:normal}
.combat-quarry .combat-targets{display:grid;grid-template-columns:1fr;overflow:visible}
.combat-quarry .combat-target{width:100%;flex-basis:auto}
