/* KIX 1.9.0. All game overrides require the explicit touch-mode root class. */
#kix-device-controls{position:fixed;z-index:100050;left:max(8px,env(safe-area-inset-left));bottom:max(8px,env(safe-area-inset-bottom));font:13px/1.4 system-ui,sans-serif;color:#f5f1e7;background:#172124;border:1px solid #849992;border-radius:9px;box-shadow:0 3px 14px #0008;max-width:220px;padding:0;box-sizing:border-box}
#kix-device-controls summary{cursor:pointer;padding:10px 13px;min-height:40px;box-sizing:border-box;user-select:none}
#kix-device-controls label{display:block;padding:4px 12px;color:inherit;font:inherit}
#kix-device-controls select{display:block;width:calc(100% - 24px);min-width:145px;min-height:44px;margin:4px 12px 12px;padding:8px;border-radius:5px;background:#0b1316;color:#fff;border:1px solid #849992;font:16px system-ui}
#kix-device-gate{position:fixed;inset:0;z-index:100040;display:grid;place-items:center;padding:24px;background:#080e16;color:#f2f4ff;font:16px/1.6 system-ui}
#kix-device-gate[hidden]{display:none}
#kix-device-gate>div{max-width:420px}
#kix-device-gate h1{font-size:26px;line-height:1.2;color:inherit}
#kix-device-gate a,#kix-device-gate button{display:block;padding:13px 18px;border:1px solid #98b9d0;margin:16px 0;background:#1b3449;color:#fff;border-radius:9px;font:inherit;cursor:pointer;text-align:center;text-decoration:none}
.kix-device-notice{max-width:550px;padding:12px;background:#101a2d;border:1px solid #8395b4;border-radius:8px;color:#fff}
html.kix-touch:is([data-kix-game="sol"],[data-kix-game="word"],[data-kix-game="def"],[data-kix-game="mis"],[data-kix-game="apc"],[data-kix-game="geng"],[data-kix-game="pok"]),
html.kix-touch:is([data-kix-game="sol"],[data-kix-game="word"],[data-kix-game="def"],[data-kix-game="mis"],[data-kix-game="apc"],[data-kix-game="geng"],[data-kix-game="pok"]) body{min-width:0;width:100%;height:auto;min-height:100%;overflow-x:clip;overflow-y:auto}
.kix-touch:is([data-kix-game="sol"],[data-kix-game="word"],[data-kix-game="def"],[data-kix-game="mis"],[data-kix-game="apc"],[data-kix-game="geng"],[data-kix-game="pok"]) body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
.kix-touch :is(button,a,input,select){touch-action:manipulation}
.kix-touch:is([data-kix-game="sol"],[data-kix-game="word"],[data-kix-game="def"],[data-kix-game="mis"],[data-kix-game="apc"],[data-kix-game="geng"],[data-kix-game="pok"]) :is(button,select){min-height:44px}
.kix-touch input:not([type="checkbox"]):not([type="radio"]){font-size:16px}
.kix-touch .kix-return{min-height:44px}
/* Royal Klondike: seven columns remain visible; tap source then destination. */
html.kix-touch[data-kix-game="sol"]{--card-width:min(100px,calc((100vw - 48px)/7));--pile-gap:4px;--card-height:calc(var(--card-width)*1.4)}
.kix-touch[data-kix-game="sol"] .app-shell{height:auto;min-height:calc(100dvh - 64px);padding:6px;grid-template-rows:auto minmax(490px,1fr)}
.kix-touch[data-kix-game="sol"] .toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:8px}
.kix-touch[data-kix-game="sol"] .brand{display:none}
.kix-touch[data-kix-game="sol"] .toolbar-actions{flex:1 1 100%;flex-wrap:wrap;justify-content:center;gap:4px}
.kix-touch[data-kix-game="sol"] .toolbar .button{padding:8px;font-size:12px}
.kix-touch[data-kix-game="sol"] .game-readout{min-width:0;flex:1;gap:10px;justify-content:space-around}
.kix-touch[data-kix-game="sol"] .toolbar-secondary{gap:3px}
.kix-touch[data-kix-game="sol"] .readout{min-width:0}
.kix-touch[data-kix-game="sol"] .readout-value{font-size:14px}
.kix-touch[data-kix-game="sol"] .table{padding:12px 6px 35px;min-height:490px;grid-template-rows:auto minmax(300px,1fr);gap:22px}
.kix-touch[data-kix-game="sol"] .top-row{grid-template-columns:var(--card-width) calc(var(--card-width) + 8px) 1fr auto;gap:4px}
.kix-touch[data-kix-game="sol"] .table-medallion{visibility:hidden;width:0;min-width:0}
.kix-touch[data-kix-game="sol"] .foundations{gap:4px}
.kix-touch[data-kix-game="sol"] .waste-pile .card:nth-child(2){left:4px}
.kix-touch[data-kix-game="sol"] .waste-pile .card:nth-child(3){left:8px}
.kix-touch[data-kix-game="sol"] .pile-label{font-size:6px;letter-spacing:0}
.kix-touch[data-kix-game="sol"] .tableau{gap:4px}
.kix-touch[data-kix-game="sol"] .table-footer{left:6px;right:6px}
.kix-touch[data-kix-game="sol"] .shortcut-hint{display:none}
.kix-touch[data-kix-game="sol"] .card{touch-action:none}
/* SKYSHIELD: controls outside the targeting canvas; menus scroll independently. */
.kix-touch[data-kix-game="mis"] body{padding:6px 6px 64px}
.kix-touch[data-kix-game="mis"] .topbar{flex-wrap:wrap;gap:8px}
.kix-touch[data-kix-game="mis"] h1{font-size:25px}
.kix-touch[data-kix-game="mis"] .stage-wrap{display:flex;flex-direction:column;overflow:visible}
.kix-touch[data-kix-game="mis"] canvas{order:0;touch-action:none;width:100%;height:auto}
.kix-touch[data-kix-game="mis"] .weapon-strip,.kix-touch[data-kix-game="mis"] .ability-strip{position:relative;inset:auto;order:1;flex-wrap:wrap;padding:5px;gap:5px;background:#182128}
.kix-touch[data-kix-game="mis"] .support-strip{flex-wrap:wrap}
.kix-touch[data-kix-game="mis"] .overlay{position:fixed;z-index:1000;padding:8px;overflow-y:auto;align-items:start}
.kix-touch[data-kix-game="mis"] .panel{width:100%;max-height:calc(100dvh - 16px);overflow:auto;padding:14px}
.kix-touch[data-kix-game="mis"] :is(.campaign-grid,.war-grid,.upgrade-cards,.operation-grid,.scenario-grid,.records-grid){grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}
.kix-touch[data-kix-game="mis"] :is(.loadout-grid,.weapon-upgrade-grid,.tech-grid){grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr))}
.kix-touch[data-kix-game="mis"] .campaign-section.wide,.kix-touch[data-kix-game="mis"] .war-section.wide{grid-column:1/-1}
.kix-touch[data-kix-game="mis"] .campaign-footer{position:static;flex-wrap:wrap}
.kix-touch[data-kix-game="mis"] .center-message{top:8px;font-size:10px;max-width:90%;text-align:center}
/* Defender: map and commands stack; action scenes retain their coordinate space. */
.kix-touch[data-kix-game="def"] .game-shell{width:100%;height:auto;min-height:0;margin:0}
.kix-touch[data-kix-game="def"] .crown-header{flex-wrap:wrap;padding:10px;gap:8px}
.kix-touch[data-kix-game="def"] .campaign-frame{display:flex;flex-direction:column;height:auto;min-height:0;padding:4px}
.kix-touch[data-kix-game="def"] .command-scroll{padding:16px 12px}
.kix-touch[data-kix-game="def"] .modal-backdrop{padding:4px}
.kix-touch[data-kix-game="def"] .modal{width:100%;max-height:calc(100dvh - 8px)}
.kix-touch[data-kix-game="def"] :is(.scene-full,.raid-scene,.joust-scene){min-height:0}
.kix-touch[data-kix-game="def"] .scene-full>svg{width:100%;height:auto;min-height:0;display:block}
.kix-touch[data-kix-game="def"] :is(#raid-svg,#joust-svg,#siege-svg){touch-action:none}
.kix-touch[data-kix-game="def"] .scene-title{min-width:0;max-width:65%;left:4px;top:4px;padding:6px;font-size:10px;pointer-events:none}
.kix-touch[data-kix-game="def"] .scene-title h2{font-size:15px;margin:0}
.kix-touch[data-kix-game="def"] .raid-stage-note{position:static;max-width:none;font-size:12px;margin:0}
.kix-touch[data-kix-game="def"] .joust-hint{position:static;transform:none;max-width:none;margin:0;font-size:12px}
.kix-touch[data-kix-game="def"] .kix-raid-controls{display:flex;gap:8px;padding:8px;background:#20170e}
.kix-raid-controls{display:none}
.kix-touch[data-kix-game="def"] .kix-raid-controls button{flex:1;color:#f8e7c2;background:#52351b;border:1px solid #c6994a;border-radius:5px;padding:8px}
/* Apocalypse: map first, then readable command panels and full-width utility windows. */
.kix-touch[data-kix-game="apc"] .topbar{height:auto;flex-wrap:wrap;padding:10px;gap:8px}
.kix-touch[data-kix-game="apc"] .topstats{flex-wrap:wrap;gap:4px}
.kix-touch[data-kix-game="apc"] .stat{min-width:85px;padding:6px}
.kix-touch[data-kix-game="apc"] .layout{display:flex;flex-direction:column;height:auto}
.kix-touch[data-kix-game="apc"] .world-panel{order:-1;height:60dvh;min-height:340px}
.kix-touch[data-kix-game="apc"] .panel.left,.kix-touch[data-kix-game="apc"] .panel.right{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(270px,100%),1fr));gap:8px;overflow:visible;padding:8px}
.kix-touch[data-kix-game="apc"] .world-toolbar{height:auto;min-height:53px;flex-wrap:wrap;padding:8px;gap:8px}
.kix-touch[data-kix-game="apc"] .actions button{font-size:13px}
.kix-touch[data-kix-game="apc"] .actions button strong{font-size:13px}
.kix-touch[data-kix-game="apc"] .actions button small{font-size:11px}
/* Genghis: preserve map/battle geometry in their own scroll areas. */
.kix-touch[data-kix-game="geng"] .topbar{flex-wrap:wrap;padding:10px}
.kix-touch[data-kix-game="geng"] :is(.dashboard-shell,.main-content,.content-area,.workspace){min-width:0;max-width:100%}
.kix-touch[data-kix-game="geng"] :is(.battlefield-panel,.table-wrap,.table-scroll){overflow:auto;max-width:100%;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.kix-touch[data-kix-game="geng"] .battle-grid{min-width:832px}
.kix-touch[data-kix-game="geng"] :is(.tab-nav,.main-nav,.command-tabs){display:flex;overflow-x:auto;max-width:100%;white-space:nowrap}
.kix-touch[data-kix-game="geng"] :is(.nav-button,.tab-button){min-height:44px}
/* Cribbage: accessible cards mirror the same hand, selection and rules as the 3D table. */
#kix-crib-hand{display:none}
.kix-touch[data-kix-game="3crib"] #hud{top:6px;left:6px;right:6px;width:auto;padding:8px;font-size:12px;gap:4px}
.kix-touch[data-kix-game="3crib"] #hud>div:first-child span{display:none}
.kix-touch[data-kix-game="3crib"] #scores{gap:4px}
.kix-touch[data-kix-game="3crib"] #action-panel{left:6px;right:6px;bottom:58px;width:auto;padding:8px;display:grid;gap:6px}
.kix-touch[data-kix-game="3crib"] #action-panel .button-row{display:flex;gap:4px;flex-wrap:wrap}
.kix-touch[data-kix-game="3crib"] #action-panel button{font-size:12px;padding:8px;min-height:44px}
.kix-touch[data-kix-game="3crib"] #kix-crib-hand{display:flex;gap:5px;justify-content:center;padding:6px 0}
.kix-touch[data-kix-game="3crib"] #kix-crib-hand button{background:#fff6df;color:#172019;border:2px solid #789485;border-radius:7px;flex:0 1 62px;height:72px;font:bold 19px Georgia;min-width:0;padding:4px}
.kix-touch[data-kix-game="3crib"] #kix-crib-hand button.red-card{color:#a82032}
.kix-touch[data-kix-game="3crib"] #kix-crib-hand button[aria-pressed="true"]{border-color:#ffd04c;background:#ffedac;transform:translateY(-4px)}
.kix-touch[data-kix-game="3crib"] #kix-crib-hand button:disabled{opacity:.45}
.kix-touch[data-kix-game="3crib"] #log-panel{bottom:8px;right:8px;left:auto;width:min(250px,65vw);max-height:38dvh;overflow:auto;font-size:12px}
.kix-touch[data-kix-game="3crib"] #table-labels{display:none}
.kix-touch[data-kix-game="3crib"] .modal{max-height:90dvh;overflow:auto;padding:16px}
/* Moonlit Wordsmith: letters first, ledger and librarian below. */
.kix-touch[data-kix-game="word"] .app-shell{width:calc(100% - 12px);height:auto;min-height:0;margin:6px;grid-template-rows:auto auto}
.kix-touch[data-kix-game="word"] .topbar{display:flex;flex-wrap:wrap;padding:12px;gap:8px}
.kix-touch[data-kix-game="word"] .brand h1{font-size:24px}
.kix-touch[data-kix-game="word"] .toolbar{flex-wrap:wrap;justify-content:flex-start;gap:4px}
.kix-touch[data-kix-game="word"] .game-grid{display:flex;flex-direction:column;padding:8px;gap:10px}
.kix-touch[data-kix-game="word"] .workbench{order:-1;min-width:0;padding:14px 8px;grid-template-rows:auto auto minmax(95px,1fr) auto auto auto}
.kix-touch[data-kix-game="word"] .letter-rack{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.kix-touch[data-kix-game="word"] .letter-tile{min-height:54px;border-radius:7px}
.kix-touch[data-kix-game="word"] .tile-letter{font-size:clamp(22px,6vw,42px)}
.kix-touch[data-kix-game="word"] .tile-corner,.kix-touch[data-kix-game="word"] .tile-gem{display:none}
.kix-touch[data-kix-game="word"] .spellbook{max-height:380px}
.kix-touch[data-kix-game="word"] .modal{padding:8px}
.kix-touch[data-kix-game="word"] .modal-card{width:100%;max-height:94dvh;padding:18px}
.kix-touch[data-kix-game="word"] .modal-actions{flex-wrap:wrap}
@media(max-height:540px){
.kix-touch[data-kix-game="3crib"] #hud{width:47%;right:auto;font-size:11px}
.kix-touch[data-kix-game="3crib"] #hud .kix-return{min-height:32px}
.kix-touch[data-kix-game="3crib"] #action-panel{left:auto;right:6px;width:47%;bottom:58px}
.kix-touch[data-kix-game="3crib"] #kix-crib-hand button{height:52px;font-size:17px}
}
.kix-touch[data-kix-game="apc"] :is(.news-window,.utility-window){left:8px!important;right:8px!important;top:8px!important;width:calc(100vw - 16px)!important;max-height:calc(100dvh - 72px);transform:none!important}
.kix-touch[data-kix-game="apc"] :is(.evolution-tree,.intel-grid,.operations-grid){grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}
.kix-touch[data-kix-game="geng"] .strategy-stage{width:calc(100% - 12px);grid-template-columns:minmax(0,1fr);gap:8px}
.kix-touch[data-kix-game="geng"] .realm-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.kix-touch[data-kix-game="geng"] .game-nav{display:flex;overflow-x:auto;justify-content:flex-start}
.kix-touch[data-kix-game="geng"] .game-nav a{flex:0 0 auto;min-width:100px;min-height:48px}
.kix-touch[data-kix-game="geng"] .world-board{padding:8px}
.kix-touch[data-kix-game="geng"] .map-heading{flex-wrap:wrap}
.kix-touch[data-kix-game="geng"] .map-frame{overflow:auto;max-width:100%;aspect-ratio:auto;touch-action:pan-x pan-y}
.kix-touch[data-kix-game="geng"] .realm-map{min-width:650px;min-height:0;height:auto;aspect-ratio:1800/611;touch-action:pan-x pan-y}
.kix-touch[data-kix-game="geng"] .realm-map.is-zoomed{touch-action:none}
.kix-touch[data-kix-game="geng"] .game-dialog{max-width:calc(100vw - 12px);max-height:calc(100dvh - 16px);overflow:auto;padding:0}
/* Casino: existing controls are reflowed; money and settlement stay server-owned. */
.kix-touch[data-kix-game="pok"] :is(.game-shell,.holdem-room,.blackjack-room,.vp-room,.baccarat-room,.roulette-room,.craps-room,.slot-room,.lucky-seven-room,.fusion-room){min-width:0;width:100%;height:auto;min-height:100dvh;overflow:hidden}
.kix-touch[data-kix-game="pok"] :is(.topbar,.top-bar,.casino-bar){position:relative;height:auto;min-height:0;display:flex;flex-wrap:wrap;gap:8px;padding:10px;align-items:center;justify-content:space-between}
.kix-touch[data-kix-game="pok"] :is(.game-logo,.room-logo){position:static;transform:none;width:min(240px,100%);height:48px;order:-1;flex-basis:100%;object-fit:contain}
.kix-touch[data-kix-game="pok"] :is(.top-button,.bar-button,.lobby-button,.round-control){height:auto;min-height:44px;min-width:44px;padding:8px 12px;font-size:11px;letter-spacing:.02em}
.kix-touch[data-kix-game="pok"] :is(.player-readout,.balance-readout,.player-strip,.balance-strip){min-width:0;text-align:left}
.kix-touch[data-kix-game="pok"] .kix-mobile-navigation{display:none}
.kix-touch[data-kix-game="pok"] :is(.overlay,.modal-overlay,.session-overlay,.entry-overlay,.rules-modal){position:fixed;inset:0;padding:10px;overflow:auto;max-width:100vw;align-items:center}
.kix-touch[data-kix-game="pok"] :is(.entry-card,.start-card,.help-card,.modal-card,.rules-card,.paytable-card,.profile-card,.theme-picker,.loading-card){width:100%;min-width:0;max-width:650px;max-height:calc(100dvh - 20px);overflow:auto;padding:18px;box-sizing:border-box}
.kix-touch[data-kix-game="pok"] :is(.rules-grid,.rules-columns,.rule-columns,.help-columns,.help-grid,.theme-grid){grid-template-columns:1fr;gap:12px}
.kix-touch[data-kix-game="pok"] :is(.chip-rack,.chip-buttons,.denomination-buttons,.bet-tools,.action-buttons,.credit-buttons){display:flex;flex-wrap:wrap;gap:6px;height:auto;min-width:0;max-width:100%;justify-content:center}
.kix-touch[data-kix-game="pok"] :is(.chip-button,.rack-chip){flex:0 0 44px;width:44px;height:44px;min-width:44px;font-size:11px}
.kix-touch[data-kix-game="pok"] :is(.control-rail,.control-dock,.action-dock){position:relative;inset:auto;transform:none;width:100%;height:auto;display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:12px;min-width:0}
.kix-touch[data-kix-game="pok"] :is(.information-rail,.left-console,.right-console,.stats-panel){position:relative;inset:auto;width:100%;height:auto;min-height:0;max-height:none;transform:none}
.kix-touch[data-kix-game="pok"] :is(.room-stage,.game-stage){position:relative;inset:auto;display:grid;grid-template-columns:minmax(0,1fr);width:100%;height:auto;min-height:0;padding:8px;gap:12px}
.kix-touch[data-kix-game="pok"] :is(.history-panel,.stats-panel,.rail-panel){min-height:100px;height:auto;max-height:300px;overflow:auto}
.kix-touch[data-kix-game="pok"] :is(.round-history,.hand-history,.history-list){min-height:60px;max-height:180px;height:auto}
.kix-touch[data-kix-game="pok"] :is(.account-strip,.topbar-actions){flex-wrap:wrap;gap:6px}
/* Midnight Stud: three opponents, pot, player hand and actions in reading order. */
.kix-touch[data-kix-room="poker"] .table-stage{position:relative;inset:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 4px;padding:18px 5px}
.kix-touch[data-kix-room="poker"] .seat{position:relative;inset:auto;transform:none;width:100%;min-width:0}
.kix-touch[data-kix-room="poker"] .seat-you{grid-column:1/-1;grid-row:3;width:100%}
.kix-touch[data-kix-room="poker"] .player-panel{width:100%;min-width:0;padding:6px;gap:3px}
.kix-touch[data-kix-room="poker"] .avatar{width:32px;height:32px}
.kix-touch[data-kix-room="poker"] .player-name{font-size:12px}
.kix-touch[data-kix-room="poker"] .player-stack{font-size:12px}
.kix-touch[data-kix-room="poker"] .card-row{height:auto;min-height:85px;gap:2px;justify-content:center}
.kix-touch[data-kix-room="poker"] .card{width:clamp(29px,8vw,65px);height:calc(clamp(29px,8vw,65px)*1.4);margin:0 -3px}
.kix-touch[data-kix-room="poker"] .seat-you .card{width:clamp(48px,14vw,82px);height:calc(clamp(48px,14vw,82px)*1.4)}
.kix-touch[data-kix-room="poker"] .pot-zone{position:relative;inset:auto;transform:none;grid-column:1/-1;grid-row:2;width:100%;min-height:65px}
.kix-touch[data-kix-room="poker"] .announcement{position:relative;inset:auto;transform:none;width:100%;grid-column:1/-1;font-size:12px}
.kix-touch[data-kix-room="poker"] .deck-stack{display:none}
.kix-touch[data-kix-room="poker"] .action-panel{position:relative;inset:auto;transform:none;width:calc(100% - 12px);margin:6px;display:flex;flex-direction:column;padding:10px}
.kix-touch[data-kix-room="poker"] .action-button{flex:1;min-width:80px;padding:9px}
.kix-touch[data-kix-room="poker"] .next-hand-button{position:relative;inset:auto;transform:none;display:block;margin:10px auto}
/* Hold'em: preserve all six seats and the community cards without tiny scaled text. */
.kix-touch[data-kix-room="holdem"] .table-stage{position:relative;inset:auto;min-height:0;padding:12px 6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 4px}
.kix-touch[data-kix-room="holdem"] .table-art{inset:0;width:100%;height:100%;transform:none;object-fit:fill}
.kix-touch[data-kix-room="holdem"] .seat{position:relative;inset:auto;transform:none;width:100%;min-width:0}
.kix-touch[data-kix-room="holdem"] .seat-3{grid-column:2;grid-row:1}
.kix-touch[data-kix-room="holdem"] .seat-2{grid-column:1;grid-row:1}
.kix-touch[data-kix-room="holdem"] .seat-4{grid-column:3;grid-row:1}
.kix-touch[data-kix-room="holdem"] .seat-1{grid-column:1;grid-row:3}
.kix-touch[data-kix-room="holdem"] .seat-5{grid-column:3;grid-row:3}
.kix-touch[data-kix-room="holdem"] .seat-0{grid-column:2;grid-row:3}
.kix-touch[data-kix-room="holdem"] .seat-shell{width:100%;height:auto;min-height:64px;display:flex;flex-direction:column;padding:5px}
.kix-touch[data-kix-room="holdem"] .avatar{display:none}
.kix-touch[data-kix-room="holdem"] .seat-copy{padding:0;text-align:center;gap:2px}
.kix-touch[data-kix-room="holdem"] .seat-copy strong,.kix-touch[data-kix-room="holdem"] .seat-copy span{font-size:12px}
.kix-touch[data-kix-room="holdem"] .seat-action{position:static;font-size:9px;letter-spacing:0}
.kix-touch[data-kix-room="holdem"] .seat-cards{height:68px;margin-bottom:0}
.kix-touch[data-kix-room="holdem"] .hole-card,.kix-touch[data-kix-room="holdem"] .human-seat .hole-card{width:40px;height:57px;margin:0 -2px}
.kix-touch[data-kix-room="holdem"] .human-seat .seat-cards{height:85px}
.kix-touch[data-kix-room="holdem"] .human-seat .hole-card{width:48px;height:68px}
.kix-touch[data-kix-room="holdem"] .board-zone{position:relative;inset:auto;transform:none;grid-column:1/-1;grid-row:2;width:100%;padding:12px 0}
.kix-touch[data-kix-room="holdem"] .board-cards{gap:5px;justify-content:center}
.kix-touch[data-kix-room="holdem"] :is(.board-card,.board-slot){width:clamp(44px,13vw,76px);height:calc(clamp(44px,13vw,76px)*1.4)}
.kix-touch[data-kix-room="holdem"] .board-card img{width:100%;height:100%}
.kix-touch[data-kix-room="holdem"] :is(.table-stats,.action-history){position:relative;inset:auto;transform:none;grid-column:1/-1;width:100%;max-height:140px;overflow:auto}
.kix-touch[data-kix-room="holdem"] .raise-control{width:100%;min-width:0}
.kix-touch[data-kix-room="holdem"] .action-button{min-width:70px;flex:1;font-size:12px;padding:10px}
.kix-touch[data-kix-room="holdem"] .raise-row{flex-wrap:wrap}
.kix-touch[data-kix-room="holdem"] .seat-bet{position:static;transform:none;margin:3px}
/* Blackjack: split hands wrap, each hand stays readable. */
.kix-touch[data-kix-room="blackjack"] .table-stage{min-width:0;border-radius:18px;overflow:hidden;padding:10px}
.kix-touch[data-kix-room="blackjack"] .dealer-console{position:relative;inset:auto;display:block;height:auto;min-height:150px}
.kix-touch[data-kix-room="blackjack"] :is(.shoe-unit,.discard-unit,.rule-arc,.table-brand){display:none}
.kix-touch[data-kix-room="blackjack"] .dealer-zone{display:flex;flex-direction:column;gap:6px;align-items:center;min-width:0}
.kix-touch[data-kix-room="blackjack"] .dealer-cards{min-width:0;max-width:100%;flex-wrap:wrap;justify-content:center}
.kix-touch[data-kix-room="blackjack"] .message-plaque{position:relative;inset:auto;transform:none;min-width:0;width:100%;margin:10px 0}
.kix-touch[data-kix-room="blackjack"] .player-hands{position:relative;inset:auto;min-height:0;flex-wrap:wrap;gap:8px;align-items:stretch}
.kix-touch[data-kix-room="blackjack"] .hand-zone{width:100%;min-width:0;max-width:380px;height:auto;min-height:210px;padding-top:44px}
.kix-touch[data-kix-room="blackjack"] .hand-cards{min-height:120px;flex-wrap:wrap}
.kix-touch[data-kix-room="blackjack"] .playing-card{width:66px;height:96px}
.kix-touch[data-kix-room="blackjack"] .bet-console{display:flex;flex-wrap:wrap;justify-content:center;height:auto}
.kix-touch[data-kix-room="blackjack"] .action-console{min-width:0;display:flex;flex-wrap:wrap;gap:6px}
.kix-touch[data-kix-room="blackjack"] .action-console button{flex:1 1 90px;padding:12px;font-size:12px}
/* Video poker: all five cards and hold buttons fit across the screen. */
.kix-touch[data-kix-room="video-poker"] .machine-cabinet{grid-template-rows:auto auto auto auto;min-height:0;max-height:none;border-radius:20px;padding:8px}
.kix-touch[data-kix-room="video-poker"] .machine-marquee{margin:0;height:64px}
.kix-touch[data-kix-room="video-poker"] .machine-marquee img{max-width:100%;height:60px}
.kix-touch[data-kix-room="video-poker"] .variant-selector{height:auto;display:flex;flex-wrap:wrap;margin:8px 0}
.kix-touch[data-kix-room="video-poker"] .variant-button{flex:1;min-width:85px;font-size:11px;padding:8px}
.kix-touch[data-kix-room="video-poker"] .machine-screen{margin:0;padding:8px 4px;height:auto;min-height:0}
.kix-touch[data-kix-room="video-poker"] .paytable-panel{overflow:auto;height:auto;max-height:240px}
.kix-touch[data-kix-room="video-poker"] .paytable{min-width:300px;font-size:11px}
.kix-touch[data-kix-room="video-poker"] .card-bay{height:auto;min-height:145px;gap:4px;padding:12px 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.kix-touch[data-kix-room="video-poker"] .card-position{width:100%;min-width:0}
.kix-touch[data-kix-room="video-poker"] .card-slot{width:100%;height:auto;aspect-ratio:5/7}
.kix-touch[data-kix-room="video-poker"] :is(.playing-card,.empty-card){width:100%;height:100%}
.kix-touch[data-kix-room="video-poker"] .hold-toggle{width:100%;font-size:10px;padding:4px;letter-spacing:0}
.kix-touch[data-kix-room="video-poker"] .control-deck{display:flex;flex-wrap:wrap;height:auto;padding:10px;gap:10px}
.kix-touch[data-kix-room="video-poker"] .control-deck>div{flex:1 1 130px;min-width:0}
.kix-touch[data-kix-room="video-poker"] .deal-draw-button{width:100%;height:60px;font-size:18px}
/* Baccarat: two hands above a three-column betting area. */
.kix-touch[data-kix-room="baccarat"] .table-shell{position:relative;inset:auto;min-width:0;margin:8px;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 6px}
.kix-touch[data-kix-room="baccarat"] .dealer-zone{position:relative;inset:auto;grid-column:1/-1;height:auto;display:block}
.kix-touch[data-kix-room="baccarat"] :is(.shoe-wrap,.commission-plaque){display:none}
.kix-touch[data-kix-room="baccarat"] .dealer-message{min-width:0;padding:10px;font-size:12px}
.kix-touch[data-kix-room="baccarat"] .hand-zone{position:relative;inset:auto;width:100%;height:190px}
.kix-touch[data-kix-room="baccarat"] .hand-heading{left:6px;right:6px;top:5px}
.kix-touch[data-kix-room="baccarat"] .hand-heading span{font-size:12px;letter-spacing:.03em}
.kix-touch[data-kix-room="baccarat"] .card-lane{min-width:0;width:100%;gap:2px;height:120px}
.kix-touch[data-kix-room="baccarat"] .playing-card{width:44px;height:64px}
.kix-touch[data-kix-room="baccarat"] .playing-card.third{margin-left:0;transform:rotate(0);animation-name:cardFlight}
.kix-touch[data-kix-room="baccarat"] .result-banner{position:relative;inset:auto;transform:none;min-width:0;grid-column:1/-1;width:100%}
.kix-touch[data-kix-room="baccarat"] .betting-layout{position:relative;inset:auto;grid-column:1/-1;height:auto;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.kix-touch[data-kix-room="baccarat"] .bet-spot{height:135px;border-radius:15px;min-width:0;padding:6px}
.kix-touch[data-kix-room="baccarat"] .bet-spot span{font-size:12px;letter-spacing:0}
.kix-touch[data-kix-room="baccarat"] :is(.left-console,.right-console){padding:8px;gap:8px}
/* Roulette: full-size board scrolls locally; the precise-bet picker avoids tiny intersections. */
.kix-touch[data-kix-room="roulette"] :is(.wheel-wing,.table-wing){min-width:0;width:100%;padding:0;border:0;max-width:100%}
.kix-touch[data-kix-room="roulette"] .wheel-shell{width:min(330px,90vw);height:min(330px,90vw)}
.kix-touch[data-kix-room="roulette"] .result-plaque{position:relative;inset:auto;transform:none;width:100%;margin:10px 0;grid-template-columns:55px 60px 1fr}
.kix-touch[data-kix-room="roulette"] .betting-board{margin-top:8px}
.kix-touch[data-kix-room="roulette"] .inside-hotspot{min-height:0}
.kix-touch[data-kix-room="roulette"] .kix-board-scroll{max-width:100%;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y}
.kix-touch-bet-tools{display:none}
.kix-touch[data-kix-room="roulette"] .kix-touch-bet-tools{display:grid;gap:8px;padding:12px;background:#0c2c24;border:1px solid #cba656;border-radius:10px;margin:8px 0}
.kix-touch-bet-tools label{display:grid;gap:5px;font:13px system-ui;color:#f5e7bf}
.kix-touch-bet-tools select,.kix-touch-bet-tools button{width:100%;min-height:44px;font:16px system-ui;background:#152b24;color:#fff;padding:8px;border:1px solid #cba656;border-radius:6px}
/* Craps: keep numbered columns large enough to select, with their own horizontal scroll. */
.kix-touch[data-kix-room="craps"] :is(.table-wing,.action-wing){min-width:0;width:100%;padding:0;border:0}
.kix-touch[data-kix-room="craps"] .table-wing{overflow:auto}
.kix-touch[data-kix-room="craps"] .craps-layout{min-width:700px}
.kix-touch[data-kix-room="craps"] .action-wing{display:flex;flex-direction:column;gap:10px}
.kix-touch[data-kix-room="craps"] .dice-arena{height:280px;min-height:280px}
.kix-touch[data-kix-room="craps"] .prop-panel{height:auto;min-height:260px}
.kix-touch[data-kix-room="craps"] .hardway-grid{height:auto;min-height:60px;grid-template-columns:repeat(4,minmax(0,1fr))}
.kix-touch[data-kix-room="craps"] .proposition-grid{height:auto;min-height:150px;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:60px}
.kix-touch[data-kix-room="craps"] .hop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.kix-touch[data-kix-room="craps"] .mode-controls{display:flex;flex-wrap:wrap;gap:6px}
.kix-touch[data-kix-room="craps"] .mode-button{flex:1;min-width:100px}
/* Jackpot and Fusion: reflow the cabinet around responsive reels and large spin controls. */
.kix-touch[data-kix-room="slots"] .machine-wrap,.kix-touch[data-kix-room="fusion-slots"] .cabinet-stage{position:relative;inset:auto;transform:none;width:100%;height:auto;min-height:0;padding:10px 5px;display:block}
.kix-touch[data-kix-room="slots"] .slot-machine,.kix-touch[data-kix-room="fusion-slots"] .fusion-cabinet{width:100%;height:auto;min-height:0;padding:16px 10px;border-width:4px;border-radius:24px}
.kix-touch[data-kix-room="slots"] .machine-logo{position:relative;inset:auto;transform:none;width:100%;height:100px;display:block}
.kix-touch[data-kix-room="slots"] .reel-chassis,.kix-touch[data-kix-room="fusion-slots"] .reel-chassis{height:clamp(210px,52vw,390px);min-height:0;padding:6px;margin:8px 0}
.kix-touch[data-kix-room="slots"] .message-display,.kix-touch[data-kix-room="fusion-slots"] .message-display{min-width:0;display:block;height:auto;min-height:54px;padding:8px;font-size:15px;text-align:center}
.kix-touch[data-kix-room="slots"] .meter-row,.kix-touch[data-kix-room="fusion-slots"] .meter-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.kix-touch[data-kix-room="slots"] .control-deck,.kix-touch[data-kix-room="fusion-slots"] .control-deck{display:grid;grid-template-columns:1fr 1fr;height:auto;padding:8px;gap:8px}
.kix-touch[data-kix-room="slots"] .spin-button,.kix-touch[data-kix-room="fusion-slots"] .spin-button{grid-column:1/-1;grid-row:2;height:72px;width:100%}
.kix-touch[data-kix-room="slots"] .deck-button,.kix-touch[data-kix-room="fusion-slots"] .deck-button{min-width:0;font-size:11px;padding:8px}
.kix-touch[data-kix-room="slots"] .stats-panel,.kix-touch[data-kix-room="fusion-slots"] .stats-panel{margin:8px;width:calc(100% - 16px);padding:12px}
.kix-touch[data-kix-room="slots"] .paytable-grid,.kix-touch[data-kix-room="fusion-slots"] .paytable-grid{grid-template-columns:1fr 1fr}
.kix-touch[data-kix-room="slots"] .scatter-note,.kix-touch[data-kix-room="fusion-slots"] .scatter-note{grid-template-columns:1fr 1fr}
.kix-touch[data-kix-room="fusion-slots"] .topbox{margin:0;height:auto;min-height:100px;padding:12px}
.kix-touch[data-kix-room="fusion-slots"] .topbox>strong{font-size:25px}
.kix-touch[data-kix-room="fusion-slots"] .main-screen{height:auto;padding:8px}
.kix-touch[data-kix-room="fusion-slots"] .cabinet-led{width:5px}
.kix-touch[data-kix-room="fusion-slots"] .progressive-strip{gap:3px;flex-wrap:wrap}
.kix-touch[data-kix-room="fusion-slots"] .quick-bets{flex-wrap:wrap;display:flex;gap:5px}
/* Lucky Seven: machine first, wager/pull controls next, history last. */
.kix-touch[data-kix-room="lucky-seven"] .machine-area{order:-1;height:auto;min-height:0;padding:55px 0 25px}
.kix-touch[data-kix-room="lucky-seven"] .machine{width:min(460px,90vw)}
.kix-touch[data-kix-room="lucky-seven"] .machine-marquee{width:min(400px,85vw);top:0}
.kix-touch[data-kix-room="lucky-seven"] .machine-footnote{width:95%;bottom:0;font-size:9px}
.kix-touch[data-kix-room="lucky-seven"] :is(.left-plaque,.right-plaque){height:auto;max-height:none;min-width:0}
.kix-touch[data-kix-room="lucky-seven"] .pull-button{min-height:65px;font-size:18px}
/* Narrow-screen corrections confirmed against the running game pages. */
.kix-touch[data-kix-game="def"] body::before{display:none;content:none}
.kix-touch[data-kix-game="def"] .campaign-left{width:100%;min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}
.kix-touch[data-kix-game="def"] .strategic-map-shell{min-width:0;min-height:340px;height:auto}
.kix-touch[data-kix-game="3crib"] #log-panel{top:auto}
.kix-touch[data-kix-game="3crib"] #round-data{flex-direction:row;flex-wrap:wrap;font-size:11px}
.kix-touch[data-kix-game="mis"] .hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.kix-touch[data-kix-game="mis"] .hud-block{min-width:0;padding:8px}
.kix-touch[data-kix-game="mis"] .hud-block .label{font-size:9px;white-space:normal}
.kix-touch[data-kix-game="mis"] .hud-block strong{font-size:12px}
.kix-touch[data-kix-game="pok"] :is(.topbar,.top-bar,.casino-bar)>.kix-return{display:flex;position:static;min-width:0}
.kix-touch[data-kix-game="pok"] :is(.toast-layer,.toast){max-width:calc(100vw - 16px);min-width:0;box-sizing:border-box;overflow-wrap:anywhere}
.kix-touch[data-kix-room="poker"] .player-panel{display:flex;flex-direction:column;align-items:center;height:auto;min-height:72px}
.kix-touch[data-kix-room="poker"] .player-meta{min-width:0;text-align:center}
.kix-touch[data-kix-room="poker"] .avatar{display:none}
.kix-touch[data-kix-room="poker"] .status-badge{font-size:9px;max-width:100%}
.kix-touch[data-kix-room="video-poker"] .card-position{flex:1 1 0;max-width:none}
.kix-touch[data-kix-room="video-poker"] .card-bay .hold-toggle,.kix-touch[data-kix-room="video-poker"] .card-bay .card-slot{min-width:0;max-width:100%}
/* Casino lobby is the touch entry point to the same ten rooms. */
.kix-touch[data-kix-game="pok"] .casino-lobby{height:auto;min-height:100dvh;overflow:hidden}
.kix-touch[data-kix-game="pok"] .lobby-header{position:relative;inset:auto;height:auto;display:flex;flex-wrap:wrap;padding:10px;gap:8px}
.kix-touch[data-kix-game="pok"] .lobby-header>.kix-return{display:flex;position:static}
.kix-touch[data-kix-game="pok"] .casino-logo{width:min(270px,90vw);height:68px}
.kix-touch[data-kix-game="pok"] .account-bar{min-width:0;width:100%;flex-wrap:wrap;padding:8px}
.kix-touch[data-kix-game="pok"] .floor-heading{display:none}
.kix-touch[data-kix-game="pok"] :is(.casino-floor,.game-floor){position:relative;inset:auto;transform:none;width:100%;height:auto}
.kix-touch[data-kix-game="pok"] .game-floor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 8px}
.kix-touch[data-kix-game="pok"] .game-station{position:relative;inset:auto;width:100%;height:auto;min-height:170px;transform:none!important;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;text-decoration:none}
.kix-touch[data-kix-game="pok"] .game-station img{width:100%;height:130px;max-height:none;object-fit:contain;transform:none}
.kix-touch[data-kix-game="pok"] .station-plaque{position:relative;inset:auto;transform:none;width:100%;min-width:0;max-width:100%;padding:8px 3px;text-align:center}
.kix-touch[data-kix-game="pok"] .station-plaque strong{font-size:12px;white-space:normal}
.kix-touch[data-kix-game="pok"] .station-plaque small{font-size:9px}
.kix-touch[data-kix-game="pok"] .lobby-footer{position:relative;inset:auto;padding:12px}
.kix-touch[data-kix-game="def"] .kix-desktop-notice{display:none!important}
.kix-touch[data-kix-game="def"] .start-backdrop{padding:8px;justify-content:stretch}
.kix-touch[data-kix-game="def"] .start-panel{width:100%;min-width:0}
.kix-touch[data-kix-game="def"] .character-scroll{min-width:0;padding:8px}
.kix-touch[data-kix-game="def"] .character-grid{grid-template-columns:1fr;grid-template-rows:auto}
.kix-touch[data-kix-game="def"] .knight-card{min-height:180px;padding:10px}
.kix-touch[data-kix-room="poker"] :is(.action-panel,.next-hand-button){grid-column:1/-1}
.kix-touch[data-kix-room="poker"] .playing-card{width:clamp(26px,7vw,55px);height:calc(clamp(26px,7vw,55px)*1.4);margin-left:-5px;flex-shrink:0}
.kix-touch[data-kix-room="poker"] .human .playing-card{width:clamp(50px,14vw,80px);height:calc(clamp(50px,14vw,80px)*1.4);margin-left:-3px}
.kix-touch[data-kix-room="poker"] .action-panel .action-buttons{width:100%;display:flex;flex-wrap:wrap}
.kix-touch[data-kix-room="poker"] .human .player-panel{min-width:0;padding-left:6px}
.kix-touch[data-kix-room="baccarat"] .table-shell{display:block}
.kix-touch[data-kix-room="baccarat"] .table-felt{position:relative;inset:auto;width:100%;height:auto;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:8px;border-radius:18px;padding:8px}
.kix-touch[data-kix-room="baccarat"] .felt-crest{display:none}
.kix-touch[data-kix-room="baccarat"] .rail{display:none}
.kix-touch[data-kix-room="video-poker"] .card-position{height:auto;grid-template-rows:44px auto 19px}
.kix-touch[data-kix-game="sol"] .toolbar-actions{display:flex}
.kix-touch[data-kix-game="def"] .scene-full>svg{position:relative;inset:auto;aspect-ratio:1000/560}
.kix-touch[data-kix-game="def"] .cinematic-caption{position:relative;inset:auto;transform:none;max-width:none;width:100%;padding:12px;font-size:14px}
.kix-touch[data-kix-game="def"] .robin-intro,.kix-touch[data-kix-game="def"] .tournament-opening{min-height:0}
.kix-touch[data-kix-game="word"] .workbench{min-height:460px}
.kix-touch[data-kix-game="word"] .raven-panel{min-height:0}

/* Last Path: reuse its existing mobile dock when Touch is explicitly selected. */

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience {
    overscroll-behavior: none;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience #game-shell {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    height: 100dvh;
    min-height: 100dvh;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience #game-viewport {
    min-height: 0;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience #control-panel {
    position: absolute;
    inset:
      auto
      max(0px, env(safe-area-inset-right))
      0
      max(0px, env(safe-area-inset-left));
    z-index: 90;
    width: auto;
    max-width: none;
    height: min(82dvh, 720px);
    padding:
      26px
      14px
      calc(86px + env(safe-area-inset-bottom));
    border: 1px solid rgba(216, 241, 211, 0.24);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background:
      linear-gradient(180deg, rgba(22, 38, 29, 0.995), rgba(8, 17, 12, 0.998)),
      var(--panel);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.58);
    transform: translateY(104%);
    transition: transform 220ms ease;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience #control-panel::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: rgba(216, 241, 211, 0.34);
    transform: translateX(-50%);
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience #game-shell.is-panel-open #control-panel {
    transform: translateY(0);
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-panel-toggle {
    display: none;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-action-dock {
    position: absolute;
    z-index: 72;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: minmax(132px, 1.35fr) repeat(3, minmax(72px, 0.75fr));
    gap: 7px;
    padding: 7px;
    border: 1px solid rgba(216, 241, 211, 0.25);
    border-radius: 15px;
    background: rgba(8, 17, 12, 0.92);
    box-shadow: 0 15px 42px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(14px);
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-action-dock button {
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
    border-radius: 11px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    touch-action: manipulation;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-action-dock .mobile-dock-primary {
    border-color: rgba(213, 242, 107, 0.6);
    background: linear-gradient(180deg, #5e7927, #354812);
    color: #f5ffd3;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-action-dock button.has-selection {
    border-color: rgba(116, 217, 255, 0.55);
    color: #c9efff;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-camera-tools {
    position: absolute;
    z-index: 68;
    top: 50%;
    right: max(8px, env(safe-area-inset-right));
    display: grid;
    gap: 6px;
    transform: translateY(-50%);
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .mobile-camera-tools button {
    min-height: 38px;
    padding: 7px 9px;
    border-color: rgba(216, 241, 211, 0.22);
    border-radius: 10px;
    background: rgba(8, 17, 12, 0.78);
    color: #dbe7d8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    font-size: 0.58rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience #top-stats {
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    grid-template-columns: repeat(4, minmax(66px, auto));
    gap: 5px;
    max-width: 62vw;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .stat-card {
    min-width: 0;
    padding: 6px 8px;
    border-radius: 9px;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .stat-card strong {
    font-size: 0.82rem;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .stat-label {
    font-size: 0.48rem;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-toolbar {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    bottom: auto;
    left: auto;
    width: auto;
    max-width: 35vw;
    gap: 6px;
    padding: 5px 7px;
    border-radius: 10px;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-identity {
    min-width: 0;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-identity > span:not(.command-credit-readout) {
    display: none;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-identity > strong {
    overflow: hidden;
    max-width: 120px;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .command-credit-readout {
    font-size: 0.52rem !important;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-actions {
    display: none;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .battle-supply-bar {
    display: flex;
    width: auto;
    max-width: 190px;
    gap: 4px;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-toolbar .battle-supply-button {
    width: 74px;
    min-height: 34px;
    padding: 4px 6px;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-toolbar .battle-supply-button strong {
    font-size: 0.55rem;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-toolbar .battle-supply-button small,
  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .game-account-toolbar .battle-supply-slot {
    font-size: 0.46rem;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .supply-effect-status {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: max-content;
    max-width: 240px;
    padding: 5px 7px;
    border-radius: 7px;
    background: rgba(8, 17, 12, 0.82);
    text-align: right;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .tower-shop {
    display: flex;
    grid-template-columns: none;
    gap: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-padding-inline: 2px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .tower-shop-item {
    width: 172px;
    min-width: 172px;
    flex: 0 0 172px;
    scroll-snap-align: start;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .tower-shop-item .tower-card {
    min-height: 98px;
    padding-bottom: 37px;
    touch-action: manipulation;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .tower-card-copy small {
    display: none;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience button,
  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience a,
  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience select {
    touch-action: manipulation;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .placement-hint {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .round-summary {
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: min(520px, calc(100% - 18px));
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .overlay-screen {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience .hero-card {
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience.battle-panel-open .mobile-action-dock,
  html.kix-touch[data-kix-game="tower"][data-kix-controls="touch"] body.mobile-experience.battle-panel-open .mobile-camera-tools {
    opacity: 0;
    pointer-events: none;
  }

html[data-kix-game="tower"][data-kix-controls="desktop"] .orientation-gate{display:none}
html[data-kix-game="tower"] #kix-device-controls{left:auto;right:8px;bottom:84px}
.kix-touch[data-kix-game="def"] .map-stage{order:-1;min-height:0}
.kix-touch[data-kix-game="def"] .strategic-map-shell{position:relative;inset:auto;min-height:0;aspect-ratio:830/650;width:100%}
.kix-touch[data-kix-game="def"] .strategic-map{height:100%;width:100%}
.kix-touch[data-kix-game="def"] .campaign-left{grid-template-rows:auto auto;padding:0;gap:8px}
.kix-touch[data-kix-game="def"] .lord-panel{min-height:0;padding:12px;background-color:#dfbd86!important;border-radius:8px}
.kix-touch[data-kix-game="def"] .campaign-status-copy{height:auto}
.kix-touch[data-kix-game="def"] .status-portrait-row{width:100%;min-height:110px}
.kix-touch[data-kix-game="def"] .status-portrait{width:96px;min-width:96px;height:110px}
.kix-touch[data-kix-game="def"] .orders{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:10px}
.kix-touch[data-kix-game="def"] .orders>:is(h2,a,p){grid-column:1/-1}
.kix-touch[data-kix-game="def"] .order-button{width:100%;font-size:14px}
.kix-touch[data-kix-game="mis"] :is(.weapon-strip,.ability-strip){max-width:none;width:100%;justify-content:flex-start;align-self:stretch}
.kix-touch[data-kix-game="mis"] .support-strip{justify-content:flex-start}
.kix-touch[data-kix-game="mis"] .objective-bar{position:relative;inset:auto;order:2;max-width:none;width:100%;font-size:11px}
.kix-touch[data-kix-game="sol"] .toolbar-actions .button span:last-child{display:inline}
