/* Small-screen cheki: only the count grid scrolls; totals and payment stay visible. */
@media(max-width:600px){
 .modal-backdrop:has(>.cheki-modal){padding:4px}
 .modal.cheki-modal{height:calc(100svh - 8px);max-height:calc(100svh - 8px);width:100%;padding:4px;gap:4px;overflow:hidden!important}
 .cheki-modal>.pocket-hud{flex:0 0 auto}
 .cheki-modal>.pocket-hud.hud-two-rows{grid-template-columns:minmax(0,32%) minmax(0,1fr);padding:3px 5px;gap:2px 3px}
 .cheki-modal .hud-two-rows>.hud-player{gap:3px;padding-right:3px;min-width:0}
 .cheki-modal .hud-two-rows .hud-player>.atlas-character{width:20px!important}
 .cheki-modal .hud-two-rows .hud-player>div{min-width:0}
 .cheki-modal .hud-two-rows .hud-player b{font-size:10px;line-height:10px}
 .cheki-modal .hud-two-rows .hud-player small{font-size:7px;line-height:8px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .cheki-modal .hud-two-rows .hud-player span{font-size:7px;line-height:8px;gap:2px;margin-top:0}
 .cheki-modal .hud-two-rows .hud-player em{font-size:8px;line-height:8px;width:17px}
 .cheki-modal .hud-two-rows .hud-meter{height:4px;min-width:10px}
 .cheki-modal .hud-two-rows>.hud-abilities{row-gap:1px}
 .cheki-modal .hud-two-rows .hud-ability,.cheki-modal .hud-two-rows .hud-ability:nth-child(n+6){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:9px 21px;align-items:center;column-gap:2px;padding:0 2px}
 .cheki-modal .hud-two-rows .hud-ability:nth-child(n+6){padding-top:1px}
 .cheki-modal .hud-two-rows .hud-ability>small{grid-column:1/-1;grid-row:1;font-size:7px;line-height:9px;letter-spacing:-.3px}
 .cheki-modal .hud-two-rows .hud-ability>b{grid-column:1;grid-row:2;justify-self:end;font-size:21px;line-height:21px}
 .cheki-modal .hud-two-rows .hud-ability>span{grid-column:2;grid-row:2;justify-self:start;font-size:10px;line-height:12px}
 .cheki-modal .hud-two-rows>.hud-life{align-self:end;padding:0 2px 0 0}
 .cheki-modal .hud-two-rows>.hud-life>div:first-child{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:0 3px}
 .cheki-modal .hud-two-rows>.hud-life>div:first-child>small{display:block;font-size:7px;line-height:9px;margin:0}
 .cheki-modal .hud-two-rows>.hud-life>div:first-child>b{display:block;font-size:14px;line-height:15px;letter-spacing:-.5px}
 .cheki-modal .hud-two-rows>.hud-life>div:first-child>span{grid-column:1/-1;font-size:7px;line-height:8px;margin:0}

 .cheki-modal .hud-revealed{height:12px;min-height:12px;line-height:12px;font-size:8px;gap:8px}
 .cheki-modal .hud-revealed b{font-size:10px;line-height:12px}
 .cheki-modal .cheki-console{flex:1 1 0;min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:minmax(55px,.28fr) minmax(0,1fr);gap:4px}
 .cheki-modal .cheki-art>.atlas-character{height:100%!important;width:auto!important;max-height:none;right:4%;bottom:0;margin:0}
 .cheki-modal .cheki-art>div{padding:4px 7px;bottom:3px;left:4px;max-width:75%}
 .cheki-modal .cheki-art b{margin-bottom:2px;font-size:8px}
 .cheki-modal .cheki-art p{font-size:10px;line-height:1.4}
 .cheki-modal .cheki-controls{min-height:0;padding:5px;display:grid;grid-template-rows:auto minmax(36px,1fr) auto auto;gap:5px;justify-content:stretch;overflow:hidden}
 .cheki-modal .cheki-heading{margin:0;gap:3px;flex-wrap:wrap}
 .cheki-modal .cheki-heading>b{font-size:13px}
 .cheki-modal .cheki-heading>span{font-size:8px}
 .cheki-modal .cheki-controls .cheki-counts{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:32px;align-content:start;gap:3px;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
 .cheki-modal .cheki-counts>button{min-height:32px;padding:2px;font-size:16px;flex:none}
 .cheki-modal .cheki-controls .cheki-bill{margin:0;padding:4px 7px;min-height:30px;display:flex;align-items:center;justify-content:space-between}
 .cheki-modal .cheki-bill>span{font-size:10px}
 .cheki-modal .cheki-bill>b{font-size:19px}
 .cheki-modal .cheki-payments{min-height:0}
 .cheki-modal .cheki-payments>.primary-btn.full{margin:0;min-height:40px;padding:6px;font-size:11px;white-space:nowrap}
 .cheki-modal .cheki-payments>.secondary-btn.full{margin:3px 0 0;min-height:32px;padding:5px;font-size:9px}
 .cheki-modal .cheki-payments>.payment-reason{min-height:0;margin:2px 0 0;font-size:8px;line-height:1.3}
 .cheki-modal .cheki-payments>.payment-reason:empty{display:none}
}
