/* Combat and lobby layout: distinct touch owners, compact statistics, no theme hero labels. */
#joystick,#joystick *,.skill,.summoner-button,#minimap{touch-action:none;-webkit-user-select:none;user-select:none}
#joystick{overflow:visible}#hud .minimap-wrap{pointer-events:auto;z-index:24}#hud .minimap-wrap canvas{touch-action:none;width:100%;height:auto;display:block}
#hud .minimap-wrap>div{display:flex;align-items:center;gap:6px}#hud #map-expand{margin-left:auto;color:#e8d39e;font-size:20px;padding:0 3px}
#hud .minimap-wrap.expanded{width:min(52vw,440px);max-height:66vh;box-shadow:0 10px 45px #0009;z-index:25}
#hud .top-score{left:auto;right:16px;transform:none;gap:10px;padding:4px 12px;border:1px solid #a3c9d133;border-radius:5px;min-width:150px}
#hud .top-right{top:51px;right:18px;gap:10px;pointer-events:auto;background:#10253bc9;padding:3px 9px;border-radius:4px;font-size:10px}
#hud .top-score small{font-size:8px;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#hud .top-score>span{font-size:20px}#hud #match-time{font-size:12px}
#hud #feed{top:85px;right:18px}#hud #target-lock{max-width:210px}#hud #aim-hint{pointer-events:none;max-width:55vw;text-align:center}
#lobby .hero-caption,#lobby #hero-skills{display:none!important}#lobby .mode-summary{display:none}#lobby .hero-copy{pointer-events:none}
#lobby-media{position:absolute;left:5%;bottom:85px;font-size:11px;z-index:3;padding:9px 15px;border-color:#c1ac7659;background:#102033b8}
#lobby-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:-1}#lobby{isolation:isolate}
body[data-lobby-theme=video] #lobby{background:linear-gradient(90deg,#061425b0,transparent 60%,#08132555),linear-gradient(0deg,#071526dd,transparent 42%)}
body[data-lobby-theme=plain] #lobby{background:radial-gradient(ellipse at 60% 35%,#23415b,#0a1727 75%)}
body[data-lobby-theme=video] #lobby .hero-copy,body[data-lobby-theme=plain] #lobby .hero-copy{left:5%;top:28%;max-width:30%;text-shadow:0 2px 12px #000}
body[data-lobby-theme=video] #lobby h1,body[data-lobby-theme=plain] #lobby h1{font-size:clamp(30px,4vw,58px);font-family:KaiTi,serif;color:#f7dfab;line-height:1.4}body[data-lobby-theme=video] #lobby h1 span,body[data-lobby-theme=plain] #lobby h1 span{display:block;font-size:inherit}
#lobby .launch{display:flex;flex-direction:column;gap:8px;width:220px}#lobby .launch #practice-btn{align-self:flex-end}#lobby .launch #mode-btn{font-size:12px;padding:9px}#lobby .launch #play-btn{font-size:12px;padding:9px}#lobby .launch #battle-online{min-height:57px;font-size:21px}
.mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.mode-card{padding:15px;text-align:left;min-height:108px;border:1px solid #8eacbe55;background:linear-gradient(130deg,#233f5b,#13283d);color:#dce8f4}.mode-card>span{float:right;color:#dcc18b;font-size:26px}.mode-card strong{display:block;font-size:18px;color:#f4db9f;margin:4px 0 14px}.mode-card small{font-size:11px;line-height:1.7;color:#a8c2d8}.mode-account{color:#a5bed2}.mode-difficulty{display:flex;align-items:center;gap:20px;margin-top:16px}.mode-difficulty select,#lobby-music{background:#132d43;color:#e4d7b6;padding:10px;border:1px solid #738da4}
.media-options{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.media-options button{padding:13px;border:1px solid #9eb3c35c;color:#f5deb0;background:#1a354c}#local-lobby-video{display:block;margin:14px 0}#resource-progress{min-height:24px}.queue-orbit{width:90px;height:90px;margin:25px auto;border:1px solid #d6ba7955;border-radius:50%;display:grid;place-items:center;font-size:40px;color:#dfc491;animation:queue-pulse 2s ease-in-out infinite}@keyframes queue-pulse{50%{box-shadow:0 0 30px #96d7fa44;transform:scale(1.05)}}
@media(max-height:450px){#lobby .launch{width:200px;gap:5px}#lobby-media{bottom:77px;font-size:10px;padding:8px 12px}.mode-grid{gap:8px}.mode-card{min-height:86px;padding:10px}.mode-card strong{font-size:15px;margin-bottom:8px}.mode-card small{font-size:9px}#hud .top-right{top:47px}.media-options{grid-template-columns:repeat(2,1fr)}}
@media(max-width:740px){#hud .top-score{right:9px;min-width:130px}#hud .top-score small{max-width:100px}#lobby .launch{width:180px}.mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#lobby-media{left:4%}}
#pause-strip{position:fixed;z-index:80;top:60px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid #bc9861;background:#102238ed;border-radius:8px;box-shadow:0 5px 16px #0005;color:#f4d39d;font-size:12px;white-space:nowrap}#pause-strip button{padding:6px 10px;background:#28435b;border:1px solid #61778c;border-radius:4px;color:#e7f3ff;font-size:12px}
#modal[data-kind="training"]{background:transparent;backdrop-filter:none;pointer-events:none;justify-content:flex-end;align-items:stretch;padding:8px}#modal[data-kind="training"] .panel{pointer-events:auto;width:min(370px,47vw);max-width:none;height:calc(100dvh - 16px);max-height:none;margin:0;border-radius:9px;background:#10283bed;backdrop-filter:blur(8px)}#modal[data-kind="training"] #modal-content{padding:18px 14px;overflow-y:auto;height:100%;max-height:none}#modal[data-kind="training"] h2{font-size:20px;margin:5px 0}#modal[data-kind="training"] .battle-heading{padding-right:26px;gap:8px}#modal[data-kind="training"] #practice-resume{font-size:11px;padding:8px;min-width:66px}#modal[data-kind="training"] p{font-size:11px;line-height:1.7}#modal[data-kind="training"] .training-actions{grid-template-columns:repeat(2,minmax(0,1fr))}#modal[data-kind="training"] .training-switches{grid-template-columns:1fr}#modal[data-kind="training"] .training-switches label{padding:7px;font-size:12px}#modal[data-kind="training"] [hidden]{display:none!important}.training-tabs{display:flex;gap:5px;margin:10px 0}.training-tabs button{flex:1;padding:6px;background:#23445d;border:1px solid #466379;color:#b7cadd}.training-tabs button.active{color:#ffe7af;border-color:#d4b777}
.equipment-art{display:block;width:100%;height:100%;max-width:68px;max-height:68px;object-fit:cover;border:1px solid #b39b6b80;border-radius:5px;pointer-events:none}.equipment-tile>span{width:38px;height:38px;margin:auto}.equipment-detail .detail-icon{display:block;width:52px;height:52px}.equipment-slots button>span{display:block;width:32px;height:32px;margin:auto}.score-items>span{width:27px;height:27px}#inventory .equipment-art{width:100%;height:100%}.recipe-list button .equipment-art{display:inline-block;width:24px;height:24px;vertical-align:middle}.item-icon{display:block;width:44px;height:44px}.build-slots b{display:block;width:38px;height:38px;margin:4px auto}#quick-buy>span,#quick-buy-alt>span{width:37px;height:37px}.sell-equipment{display:block;width:100%;padding:9px 4px;background:#883e42;color:#ffddd6;border:1px solid #c78078;margin:8px 0}.equipment-slots button.selected{border-color:#f6d894}

#modal[data-kind="training"] .panel{padding:0!important}#modal[data-kind="training"] .battle-heading>div{min-width:120px}#modal[data-kind="training"] .battle-heading h2{white-space:nowrap}#modal[data-kind="training"] .battle-heading{padding-right:24px}#modal[data-kind="training"] #practice-resume{width:auto}#modal[data-kind="training"] .eyebrow{font-size:9px}
.armory-grid{grid-auto-rows:92px}.equipment-tile{height:92px;min-height:92px;grid-template-rows:40px 16px 14px;padding:6px 4px;justify-items:center}.equipment-tile>span{width:38px;height:38px}.equipment-detail .detail-icon{display:block;width:44px;height:44px;margin-bottom:7px}#modal[data-kind="training"] .training-switches{display:grid;gap:3px}#modal[data-kind="training"] .training-switches label{min-height:30px;margin:0;padding:4px}#modal[data-kind="training"] .training-heroes{gap:8px}#modal[data-kind="training"] .training-heroes select{min-width:0}
.equipment-slots button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px}.equipment-slots button>span{line-height:0!important;flex:0 0 28px;width:28px;height:28px}.equipment-slots small{display:block;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}#quick-purchases>button{height:66px!important;min-height:66px!important;grid-template-rows:30px 12px 12px;justify-items:center}#quick-purchases>button>span{width:29px;height:29px;line-height:0}#quick-purchases>button .equipment-art{width:29px;height:29px}

/* Keep controls reachable in short landscape viewports; only item content scrolls. */
#hud .minimap-wrap{display:flex;flex-direction:column-reverse}
#hud .minimap-wrap>div{flex:0 0 28px;position:relative;z-index:2;padding:0 4px}
#hud .minimap-wrap.expanded{width:min(52vw,440px,calc((70dvh - 34px)*1.63636));max-height:none}
#hud .minimap-wrap.expanded>div{flex-basis:34px}
#hud #map-expand,#hud #camera-btn{min-width:28px;min-height:28px;line-height:1}
#hud .minimap-wrap.expanded #map-expand,#hud .minimap-wrap.expanded #camera-btn{min-width:42px;min-height:34px}
.equipment-detail{display:flex;flex-direction:column;overflow:hidden!important;gap:6px}
.equipment-description{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding-right:3px}
.equipment-description .detail-icon{float:left;width:32px;height:32px;margin:0 8px 4px 0}
.equipment-description h3{min-height:32px;display:flex;align-items:center}
.equipment-description p{clear:both}
.equipment-description>small{font-size:10px;color:#a7bed0}
.equipment-actions{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:5px;border-top:1px solid #647d8b66;padding-top:6px}
.equipment-actions .primary,.equipment-actions .secondary,.equipment-actions .sell-equipment{margin:0;min-height:36px;padding:7px 3px;font-size:11px;letter-spacing:0}
.equipment-actions .primary{grid-column:1/-1}
.equipment-actions .secondary:only-of-type{grid-column:auto}
.equipment-actions #purchase-reason{grid-column:1/-1;font-size:10px;color:#dac7a3;line-height:14px}
.equipment-actions #purchase-reason:empty{display:none}
.equipment-actions:not(:has(.sell-equipment)) .secondary{grid-column:1/-1}
@media(max-height:370px){.panel:has(.armory-layout){padding:10px 16px}.panel:has(.armory-layout) #modal-content{grid-template-rows:34px minmax(0,1fr) 46px 14px;gap:5px}.equipment-slots button{height:46px}.equipment-actions .primary,.equipment-actions .secondary,.equipment-actions .sell-equipment{min-height:32px}.equipment-description .detail-icon{width:25px;height:25px}.equipment-description h3{min-height:25px}}
/* Battle panels keep existing pointers and leave both control clusters reachable. */
#modal[data-live="true"]{background:transparent;backdrop-filter:none;pointer-events:none;padding:0;align-items:flex-start;justify-content:flex-start}
#modal[data-live="true"] .panel{pointer-events:auto;position:absolute;left:18vw;top:58px;width:54vw;min-width:0;height:calc(100dvh - 76px);max-height:none;margin:0;padding:10px;background:#10283bf5}
#modal[data-live="true"] #modal-content{max-height:100%;height:100%;overflow-y:auto;padding:8px}
#modal[data-live="true"] .armory-layout{grid-template-columns:45px minmax(75px,1fr) minmax(125px,1.1fr);gap:5px}
#modal[data-live="true"] .armory-grid{grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:4px}
#modal[data-live="true"] .armory-category{padding:6px 2px;font-size:11px}
#modal[data-live="true"] .battle-heading h2{font-size:17px;margin:2px 0}
#modal[data-live="true"] .battle-heading{padding-right:22px;gap:5px}
#modal[data-live="true"] .battle-heading>b{font-size:17px}
#modal[data-live="true"] .equipment-description .detail-icon{display:none}
#modal[data-live="true"] .equipment-actions button{padding:7px 3px;font-size:12px;min-height:30px}
#modal[data-live="true"] .battle-note{font-size:9px}
#modal[data-kind="training"][data-live="true"] .panel{left:25vw;width:45vw}
#modal[data-kind="training"] .training-tabs{position:sticky;top:0;background:#10283b;z-index:2;padding:6px 0}
#modal[data-kind="draft"] .panel{width:min(960px,96vw);height:94dvh}
#modal[data-kind="draft"] #modal-content{display:flex;flex-direction:column;height:100%;overflow:hidden;gap:8px}
.draft-heading,.draft-teams,.draft-preparation{display:flex;align-items:center;gap:8px;flex-shrink:0}.draft-heading{justify-content:space-between;padding-right:32px}.draft-heading h2{margin:3px 0;font-size:22px}.draft-teams button{display:flex;align-items:center;gap:9px;border:1px solid #45617a;padding:4px 12px}.draft-teams img{width:40px;height:40px;border-radius:50%}.draft-preparation{flex-wrap:wrap;font-size:11px}.draft-preparation button{padding:7px}.draft-grid{overflow-y:auto;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:7px;touch-action:pan-y;overscroll-behavior:contain}.draft-grid button{min-height:105px;padding:5px;border:1px solid #2c4a64;background:#122e43}.draft-grid img{display:block;width:60px;height:60px;margin:auto;border-radius:8px}.draft-grid b,.draft-grid small{display:block}.draft-grid small{font-size:10px;color:#94aebe}.draft-grid .selected,.draft-teams .selected{border-color:#e5c185;background:#344854}#draft-search{max-width:340px;padding:8px;flex-shrink:0}
.draft-heading>.primary{width:auto;min-width:120px;flex-shrink:0;padding:10px 16px}.draft-heading h2{font-size:18px;white-space:nowrap}.draft-heading .eyebrow{font-size:9px}
#modal[data-kind="training"] .battle-heading{position:sticky;top:0;z-index:4;background:#10283b;padding-bottom:6px}#modal[data-kind="training"] .training-tabs{top:50px;z-index:3}#training-feedback{font-size:11px;color:#a5e7d7;min-height:16px}
#modal #close-modal{z-index:10;pointer-events:auto}
#match-loading{position:fixed;inset:0;z-index:120;background:radial-gradient(ellipse at center,#203b50,#070f1a);display:grid;place-items:center}.match-loading-card{width:min(600px,85vw);text-align:center}.match-loading-card progress{width:100%;accent-color:#e4c88f}#loading-players{display:flex;justify-content:center;align-items:center;gap:40px;margin:20px 0}#loading-players>div{display:flex;flex-direction:column;gap:8px}#loading-players img{height:110px;width:110px;border:1px solid #d7bd8e;border-radius:8px}#loading-stage{color:#c6d7e5;font-size:13px}
