@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;--gold:#e9c47d;--ink:#0a1420;--muted:#a8b6c5;--line:#ffffff21}*{box-sizing:border-box}body{margin:0;background:#08131e;color:#f2f4f7;font:16px Manrope,system-ui,sans-serif}button,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:#142637;color:#f2f4f7;border-radius:6px;padding:11px 17px;transition:background .15s,transform .15s}button:hover{background:#223b50}button:active{transform:translateY(1px)}button:disabled{cursor:default;opacity:.45}button:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--gold);outline-offset:4px}[hidden]{display:none!important}.selection{max-width:1480px;margin:auto;padding:30px 5vw 36px;position:relative;isolation:isolate;min-height:100vh}.selection:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#08131e77,#08131e 76%),url('/assets/quest/v3/garden.webp') center top/cover no-repeat;opacity:.5}header{display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{text-decoration:none;color:var(--gold);font-size:13px;letter-spacing:2px;font-weight:800}.brand span{color:#a6b5c3;margin-left:14px}.edition,.eyebrow,.select-label>span{font-size:12px;font-weight:700;letter-spacing:2px;color:var(--gold)}.edition{color:#c1cad4}.intro{padding:45px 0 25px}.eyebrow{margin:0 0 8px}.intro h1{font:600 clamp(40px,5.4vw,76px)/1.07 'Cormorant Garamond',Georgia,serif;margin:0 0 14px;letter-spacing:-1px}.intro>p:last-child{color:#c0cbd6;line-height:1.7;margin:0}.select-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.select-label h2{font-size:18px;margin:0}.select-label>span{color:#8598a9}.roster{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.fighter{position:relative;overflow:hidden;min-height:300px;padding:0;text-align:left;border-radius:8px;background:linear-gradient(155deg,#27425999,#0b1725);border:1px solid #bbcdd526}.fighter:after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 50px #07111c80;pointer-events:none}.fighter[aria-pressed=true]{border-color:var(--gold);background:linear-gradient(155deg,#4f493a99,#17283b)}.fighter canvas{width:100%;height:250px;object-fit:contain;display:block;filter:drop-shadow(0 8px 25px #0008)}.fighter .card-copy{position:relative;padding:0 20px 20px;z-index:1}.fighter .card-copy strong{font:600 30px 'Cormorant Garamond',Georgia,serif;display:block}.fighter .card-copy small{font-size:13px;color:#adbecd;display:block;margin-top:5px}.fighter .card-copy em{display:block;color:var(--gold);font-size:13px;font-style:normal;margin-top:12px}.fighter .selected{position:absolute;right:14px;top:14px;background:var(--gold);color:#162331;border-radius:50%;width:25px;height:25px;text-align:center;line-height:25px;visibility:hidden}.fighter[aria-pressed=true] .selected{visibility:visible}.launch{display:flex;align-items:center;gap:32px;padding:25px 0 0}.enemy-pick{display:grid;gap:9px;min-width:230px}.enemy-pick label{font-size:13px;color:var(--muted)}select{padding:12px 35px 12px 14px;border:1px solid var(--line);border-radius:6px;background:#112335;color:white;width:100%}.launch-note{display:grid;gap:6px;font-size:14px;color:#d0d9e2}.launch-note span{font-size:13px;color:var(--muted)}.primary{background:var(--gold);color:#15212b;border:0;font-weight:800;padding:17px 32px}.primary:hover{background:#ffda96}.launch>.primary{margin-left:auto;min-width:220px}#load-status{color:var(--muted);font-size:13px;text-align:right;min-height:18px}.guide{border-top:1px solid var(--line);padding-top:18px;color:#aebdca;font-size:14px}.guide summary{cursor:pointer;color:#e7dfcb}.guide-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:25px;line-height:1.7}.guide-grid b{display:block;color:white;margin-bottom:5px}.match-header{height:65px;padding:10px 22px;background:#0b1724}.match-header button{font-size:13px;padding:9px 12px}.scoreboard{display:flex;align-items:center;gap:24px;font-size:14px}.scoreboard span:first-child{color:#85dceb}.scoreboard span:last-child{color:#ff9aa7}.scoreboard b{font-size:23px;color:#f1dcae}.match-tools{display:flex;align-items:center;gap:12px}#clock{font-variant-numeric:tabular-nums;font-size:14px}.battlefield{position:relative;overflow:hidden;border-top:1px solid var(--line);border-bottom:1px solid var(--line);height:calc(100dvh - 205px);min-height:350px;max-height:900px;background:#132837}#canvas{display:block;width:100%;height:100%;outline:none;touch-action:none;object-fit:cover}.battle-top{position:absolute;left:3%;right:3%;top:19px;display:flex;justify-content:space-between;gap:16px;pointer-events:none}.base-meter{width:25%;max-width:280px;font-size:11px;letter-spacing:1.7px;font-weight:800;text-shadow:0 2px 5px #000}.base-meter.enemy{text-align:right}.base-meter progress{width:100%;height:7px;display:block;margin-top:8px;border:0;border-radius:3px;overflow:hidden;appearance:none;background:#102332}.base-meter progress::-webkit-progress-bar{background:#102332}.base-meter progress::-webkit-progress-value{background:#73d7df}.base-meter.enemy progress::-webkit-progress-value{background:#f8788b}.base-meter progress::-moz-progress-bar{background:#73d7df}.base-meter.enemy progress::-moz-progress-bar{background:#f8788b}.wave{text-align:center;display:grid;font-size:13px;gap:4px;text-shadow:0 2px 5px black}.wave span{font-size:12px;color:#c8d6e3}.map-wrap{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);width:280px;padding:7px 12px;background:#071421df;border:1px solid #d6c18c40;border-radius:6px;pointer-events:none}.map-wrap canvas{display:block;width:100%;height:36px}.map-wrap>span{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:#adbac5}.map-wrap i{font-style:normal;color:#dfc89a}.hud{display:flex;align-items:center;gap:24px;padding:14px 25px;background:#0c1b29;min-height:102px}.hero-hud{display:flex;align-items:center;gap:12px;flex:1;max-width:410px}.hero-hud>canvas{height:74px;width:64px;background:#1c3545;border:1px solid #d7bf8866;border-radius:5px;object-fit:cover}.vitals{flex:1;min-width:130px}.vitals>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:15px;margin-bottom:8px}.vitals>div:first-child span{font-size:12px;color:var(--muted)}.bar{height:18px;position:relative;background:#020b12;margin:5px 0;border-radius:3px;overflow:hidden}.bar i{position:absolute;inset:0 auto 0 0;transition:width .15s;background:linear-gradient(90deg,#278573,#72dbb2)}.bar.mana i{background:linear-gradient(90deg,#2866a0,#67b5f4)}.bar span{position:relative;display:block;text-align:center;font-size:11px;font-weight:800;line-height:18px;text-shadow:0 1px 3px #000}.attributes{display:flex;gap:20px;color:#f0dfb7;font-size:16px}.attributes>span{display:grid;gap:5px}.attributes small{font-size:11px;color:#99adbd}.skill{display:grid;position:relative;gap:5px;padding:14px 18px 14px 49px;min-width:200px;text-align:left;border-color:#dcc17c60;background:#28322d;margin-left:auto}.skill b{font-size:14px}.skill small{font-size:11px;color:#c6d1d8}.key{position:absolute;left:14px;top:18px;border:1px solid #dcc17c60;border-radius:3px;padding:2px 5px;font-size:12px;color:var(--gold)}.shop-button{display:grid;gap:3px;min-width:135px;text-align:left}.shop-button span{font-size:12px}.shop-button b{font-size:14px;color:var(--gold)}.shop-button small{font-size:11px;color:var(--muted)}.bottom-line{display:flex;justify-content:space-between;gap:15px;padding:9px 25px;font-size:12px;color:var(--muted)}.bottom-line p{margin:0;color:#e0c994}.bottom-line>span{font-size:11px}.banner{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);width:min(90%,480px);padding:25px;text-align:center;background:#081623ed;border:1px solid #e0c18788;border-radius:10px;box-shadow:0 20px 80px #0008;z-index:5}.banner h2{font:600 37px Georgia,serif;margin:10px 0}.banner p{color:var(--muted);line-height:1.5}.target-info{position:absolute;top:88px;right:3%;background:#081624d9;border:1px solid #fb8f9655;border-radius:5px;padding:9px 14px;font-size:13px;pointer-events:none}.buffs{position:fixed;bottom:160px;left:24px;display:flex;gap:8px;pointer-events:none}.buffs span{font-size:12px;background:#15332b;padding:8px;border:1px solid #91d5a444;border-radius:4px}.shop{position:fixed;right:22px;bottom:135px;width:min(380px,calc(100vw - 32px));background:#0d2030f5;backdrop-filter:blur(15px);border:1px solid #dbbd7e70;border-radius:10px;padding:20px;z-index:10;box-shadow:0 20px 60px #0009}.shop>div:first-child{display:flex;justify-content:space-between;align-items:center}.shop h2{margin:0;font:600 28px Georgia,serif}.shop p{font-size:13px;color:var(--muted);line-height:1.6}#items{display:grid;gap:10px}#items button{text-align:left;display:grid;gap:6px;padding:13px}#items small{color:var(--muted);font-size:12px}#items b{font-size:14px;color:var(--gold)}.touch-controls{position:absolute;bottom:28px;left:24px;right:24px;display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none}#joystick{width:104px;height:104px;border:1px solid #ffffff45;border-radius:50%;background:#0b1b2b65;position:relative;touch-action:none;pointer-events:auto}#stick{position:absolute;width:44px;height:44px;background:#deceb655;border:1px solid #e7d5b488;left:29px;top:29px;border-radius:50%}.touch-attacks{display:flex;align-items:flex-end;gap:12px;pointer-events:auto}.touch-attacks button{width:74px;height:74px;border-radius:50%;font-weight:800;background:#49352be0;border-color:#edc482aa;touch-action:none}.touch-attacks small{display:block;font-size:10px}#touch-magic{width:61px;height:61px;background:#143e55de;border-color:#87c8e3aa}@media(hover:hover) and (pointer:fine){.touch-controls{display:none}}@media(min-width:1500px){.selection{padding-top:40px}.intro{padding-top:65px}.fighter canvas{height:310px}}@media(max-width:800px){.selection{padding:20px}.edition{display:none}.intro{padding:35px 0 25px}.roster{gap:10px}.fighter canvas{height:190px}.fighter .card-copy{padding:0 12px 15px}.fighter .card-copy strong{font-size:25px}.fighter .card-copy small{font-size:11px}.fighter .card-copy em{font-size:11px}.fighter{min-height:280px}.launch{gap:18px;flex-wrap:wrap}.launch-note{display:none}.launch>.primary{min-width:180px}.guide-grid{grid-template-columns:1fr 1fr}.hud{gap:12px;padding:10px 14px}.attributes{gap:12px;font-size:14px}.skill{min-width:160px;padding-right:9px}.shop-button{min-width:95px;padding:10px}.match-header{padding:8px 12px}.scoreboard{gap:12px}.bottom-line>span{display:none}.battlefield{height:calc(100dvh - 194px)}.match-tools #sound{display:none}}@media(max-width:560px){.roster{grid-template-columns:1fr 1fr}.fighter canvas{height:210px}.fighter{min-height:290px}.intro h1{font-size:47px}.launch{align-items:stretch}.enemy-pick{min-width:100%;}.launch>.primary{width:100%}#load-status{text-align:left}.select-label>span{font-size:9px}.guide-grid{grid-template-columns:1fr}.match-header{height:52px;gap:8px}.match-header button{font-size:11px;padding:7px 9px}.scoreboard{gap:8px}.scoreboard span{font-size:11px}.scoreboard b{font-size:19px}.match-tools{gap:6px}#clock{font-size:11px}.battlefield{height:calc(100dvh - 230px);min-height:340px}.hud{flex-wrap:wrap;gap:8px}.hero-hud{max-width:none;flex:1 1 65%}.hero-hud>canvas{height:55px;width:48px}.vitals>div:first-child{font-size:13px;margin:0}.attributes{flex:1;font-size:13px}.attributes small{font-size:9px}.skill{margin:0;flex:1;min-width:160px;padding:9px 12px 9px 44px}.skill .key{top:12px}.shop-button{flex:1;display:flex;align-items:center;justify-content:space-between}.shop-button small{display:none}.bottom-line{padding:7px 14px;font-size:11px}.battle-top{top:12px}.base-meter{font-size:9px;width:30%}.wave{font-size:11px}.wave span{font-size:10px}.map-wrap{bottom:13px;width:170px;padding:4px 8px}.map-wrap canvas{height:25px}.map-wrap>span{font-size:7px}.touch-controls{left:15px;right:15px;bottom:53px}#joystick{width:92px;height:92px}#stick{left:23px;top:23px}.touch-attacks{gap:8px}.touch-attacks button{width:66px;height:66px}#touch-magic{width:53px;height:53px}.shop{bottom:150px;right:16px}.buffs{bottom:183px;left:14px}.target-info{top:66px;font-size:11px}}@media(max-height:500px) and (orientation:landscape){.match-header{height:42px}.battlefield{height:calc(100dvh - 117px);min-height:190px}.hud{min-height:65px;padding:5px 12px}.hero-hud>canvas{height:50px;width:43px}.bottom-line{display:none}.touch-controls{bottom:12px}#joystick{height:80px;width:80px}#stick{left:17px;top:17px}.touch-attacks button{height:56px;width:56px}.map-wrap{bottom:8px;width:210px}.battle-top{top:8px}.attributes{display:none}.buffs{bottom:80px}}

/* Lane II: two skills and progression, compact enough for touch. */
.selection:before{background-image:linear-gradient(180deg,#08131e66,#08131e 82%),url('/assets/lane/map.webp');background-size:cover;opacity:.7}
.experience{height:8px!important;margin:5px 0 0!important;background:#070d17}.bar.experience i{background:linear-gradient(90deg,#997331,#f1d58c)}.bar.experience span{font-size:0}#level{display:inline-flex;align-items:center;justify-content:center;background:#e0bb6c;color:#102132;border-radius:50%;height:22px;min-width:22px;font-size:12px;font-style:normal;margin-left:6px}.vitals{position:relative}.experience{cursor:help}.skill{min-width:165px;padding-left:42px}.guard-skill{margin-left:0;background:#343021}.hud{gap:14px}.attributes{gap:14px}.shop-button{min-width:120px}#fps{font-size:12px;color:#8ca89d;font-variant-numeric:tabular-nums}#touch-guard{width:61px;height:61px;background:#54472edb}.touch-attacks{gap:8px}.guard-skill.charging{border-color:#ffdf8a;background:#625239}.guard-skill.charging small{color:#fff2c2}
@media(max-width:1000px){.attributes{display:none}.skill{min-width:150px}.hud{gap:8px}.shop-button{min-width:105px}.hero-hud>canvas{width:48px}.skill b{font-size:12px}}
@media(max-width:560px){.hero-hud{flex:1 1 100%;max-width:100%}.vitals{padding-right:0}.hero-hud>canvas{height:48px;width:42px}.vitals>div:first-child{font-size:14px}.bar{height:15px}.bar span{line-height:15px}.hud{padding:7px 10px;gap:6px}.skill,.guard-skill{flex:1;min-width:0;padding:10px 5px 10px 29px}.skill b{font-size:11px}.skill small{font-size:10px}.skill .key{left:7px;top:13px;font-size:10px}.shop-button{flex:0 0 82px;min-width:82px;display:grid;gap:4px;padding:7px}.shop-button span{font-size:11px}.shop-button b{font-size:11px}.match-tools{gap:5px}#fps{display:none}.battlefield{height:calc(100dvh - 237px)}.touch-attacks{position:relative;gap:5px;align-items:end}#touch-guard{position:absolute;right:8px;bottom:80px;width:50px;height:50px}#touch-magic{width:50px;height:50px;margin-bottom:19px}.touch-attacks #touch-attack{width:62px;height:62px}.buffs{bottom:185px}.buffs span{font-size:11px}.guide-grid{font-size:14px}}
@media(max-height:500px) and (orientation:landscape){.hero-hud{flex:1}.skill{min-width:125px;padding:8px 6px 8px 35px}.skill b{font-size:11px}.skill .key{left:9px;top:10px}.bar{height:13px}.bar span{line-height:13px}.experience{height:5px!important}.battlefield{height:calc(100dvh - 120px)}#touch-guard{height:48px;width:48px}.shop-button{min-width:85px}.hud{flex-wrap:nowrap}}
.bar.experience{height:12px!important}.bar.experience span{font-size:10px;line-height:12px;color:#fff0c5}.guard-skill.charging:disabled{opacity:1}@media(max-height:500px) and (orientation:landscape){.bar.experience{height:9px!important}.bar.experience span{font-size:9px;line-height:9px}}
/* Stage 3: ultimate, upgrades, boss access. */
.hud{gap:9px}.skill{min-width:145px;margin-left:0;padding:12px 9px 12px 36px}.skill .key{left:9px}.ultimate-skill{background:#36233e;border-color:#b88cca80}.ultimate-skill b{font-size:12px}.ultimate-skill.aiming{border-color:#ffda86;background:#65442b}.hero-hud{min-width:225px}.attributes{display:none}.upgrade-panel{position:absolute;left:50%;top:85px;transform:translateX(-50%);background:#102131ed;border:1px solid #dfbd70;padding:12px;border-radius:8px;display:grid;grid-template-columns:1fr 1fr;gap:8px;z-index:4;max-width:90%;width:440px}.upgrade-panel>b,.upgrade-panel>span{grid-column:1/-1;text-align:center}.upgrade-panel>span{font-size:12px;color:#c8bda2}.upgrade-panel button{font-size:12px;padding:9px}.boss-way{position:absolute;bottom:20px;left:20px;padding:8px 12px;font-size:12px;background:#372a24d9;color:#efd5ba}#touch-ultimate{background:#59345be6;border-color:#e6adea;width:60px;height:60px}.shop{max-height:70dvh;overflow:auto}.skill small{font-size:11px}.selection:before{background-image:linear-gradient(180deg,#08131e66,#08131e 82%),url('/assets/lane/map-v7.webp')}
@media(max-width:900px), (pointer:coarse){.hero-hud{min-width:205px}.skill{min-width:125px}.shop-button{min-width:100px}.hud{flex-wrap:wrap}.hero-hud{flex:1}.ultimate-skill{flex:1}.battlefield{height:calc(100dvh - 244px)}}
@media(max-width:560px){.hero-hud{flex:1 1 100%;min-width:0}.skill,.ultimate-skill{flex:1;min-width:0;padding:9px 4px 9px 26px}.skill b{font-size:10px}.skill small{font-size:9px}.skill .key{left:5px;font-size:9px}.shop-button{min-width:70px;flex:0 0 70px;font-size:10px}.shop-button b{font-size:10px}.battlefield{height:calc(100dvh - 237px)}#touch-ultimate{position:absolute;right:70px;bottom:81px;width:48px;height:48px}#touch-guard{right:5px;bottom:82px}.boss-way{bottom:13px;left:10px;font-size:9px;padding:6px;max-width:85px}.map-wrap{width:150px}.upgrade-panel{top:68px;padding:9px;width:350px}.upgrade-panel>b{font-size:13px}.upgrade-panel>span{font-size:10px}.upgrade-panel button{font-size:11px}}
@media(max-height:500px) and (orientation:landscape){.hud{flex-wrap:nowrap}.hero-hud{min-width:180px}.skill{min-width:105px}.skill b{font-size:10px}.battlefield{height:calc(100dvh - 125px)}.boss-way{bottom:8px;left:115px;font-size:10px}.upgrade-panel{top:50px}.upgrade-panel span{display:none}#touch-ultimate{width:48px;height:48px}}
/* Inventory and tavern */
.inventory-panel{flex:0 0 144px}.inventory-slots{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.inventory-slot{position:relative;height:42px;padding:2px;border:1px solid #69818b66;border-radius:5px;background:#111e29}.inventory-slot.selected{border-color:#ffe3a1}.inventory-slot.consumable{box-shadow:inset 0 -2px #7edfb7}.inventory-slot kbd{position:absolute;right:2px;bottom:1px;font:10px system-ui;color:#ffe5b9;background:#071219bb;padding:0 2px}.empty-slot{color:#48606b}.item-icon{display:block;width:44px;height:44px;flex:0 0 44px;background-image:url('/assets/lane/item-icons.webp');background-size:400% 300%;background-repeat:no-repeat}.inventory-slot .item-icon{width:100%;height:100%}.shop{width:430px;max-width:94vw}.shop #items{display:grid;gap:6px}.shop #items button{display:flex;align-items:center;gap:10px;text-align:left;padding:8px}.shop #items button div{flex:1}.shop #items button b{display:block;font-size:14px}.shop #items button small{display:block;font-size:12px;line-height:1.4}.shop #items button:disabled{opacity:.55}#tavern-status{color:#a8dcca}#recipe-progress{padding:10px;background:#283447;color:#eed6a0;font-size:13px}#sell-item,#go-tavern{font-size:13px;padding:8px 12px}.hud .skill{min-width:120px}.hud .hero-hud{min-width:210px}
@media(max-width:900px), (pointer:coarse){.inventory-panel{flex:0 0 132px}.inventory-slot{height:37px}.hud .skill{min-width:100px}}
@media(max-width:560px){.hud .hero-hud{min-width:0}.hud .skill{min-width:0}.inventory-panel{flex:1 1 100%;order:10}.inventory-slots{grid-template-columns:repeat(6,1fr);max-width:330px;margin:auto}.inventory-slot{height:39px}.battlefield{height:calc(100dvh - 283px)}.buffs{bottom:230px}}
@media(max-height:500px) and (orientation:landscape){.inventory-panel{flex:0 0 105px}.inventory-slot{height:30px}.hud .skill{min-width:85px}.hud .hero-hud{min-width:155px}.item-icon{width:36px;height:36px;flex-basis:36px}}
.extra-icon{background-image:url('/assets/lane/gear-v6.webp');background-size:200% 200%}.hud{flex-wrap:wrap}.hud .attributes{display:grid;grid-template-columns:repeat(6,minmax(62px,1fr));gap:8px;flex:1 1 100%;order:20;border-top:1px solid #9bc4c52a;padding:7px 0 0}.attributes span{display:flex;align-items:center;justify-content:center;gap:6px}.attributes b{font-size:15px;color:#e0f1ec}.attributes small{font-size:12px;color:#9eb7c0}.attributes .main-attribute b,.attributes .main-attribute small{color:#ffe1a0}.battlefield{height:calc(100dvh - 220px)}.teleport-panel{position:absolute;z-index:7;left:50%;top:90px;transform:translateX(-50%);width:350px;max-width:90%;padding:16px;border:1px solid #82c9e7;background:#102734f5;border-radius:12px;box-shadow:0 12px 40px #0008}.teleport-panel>div:first-child{display:flex;justify-content:space-between;align-items:center}.teleport-panel p{font-size:13px;color:#afcbd8}.teleport-panel button{padding:9px;font-size:14px}#teleport-towers{display:grid;gap:8px}
@media(max-width:900px), (pointer:coarse){.battlefield{height:calc(100dvh - 280px)}}
@media(max-width:560px){.hud .attributes{grid-template-columns:repeat(3,1fr);gap:5px;padding-top:5px}.attributes b{font-size:13px}.attributes small{font-size:11px}.battlefield{height:calc(100dvh - 330px)}.buffs{bottom:275px}.teleport-panel{top:60px}.hud .attributes span{justify-content:flex-start}}
@media(max-height:500px) and (orientation:landscape){.hud .attributes{grid-template-columns:repeat(6,1fr);padding-top:3px}.attributes b{font-size:12px}.attributes small{font-size:10px}.battlefield{height:calc(100dvh - 163px)}}

#courier-status{font-size:12px;color:#aef4d5;margin:4px 0;min-height:16px}

.selection{overflow:hidden}.menu-video{position:absolute;inset:0 0 auto;width:100%;height:clamp(300px,48vw,620px);object-fit:cover;object-position:center top;z-index:-2;pointer-events:none;-webkit-mask-image:linear-gradient(#000 0%,#000 65%,transparent 100%);mask-image:linear-gradient(#000 0%,#000 65%,transparent 100%)}.selection:before{z-index:-1;opacity:1;background:linear-gradient(180deg,rgba(8,19,30,.28),rgba(8,19,30,.62) 48%,#08131e 96%)}@media(prefers-reduced-motion:reduce){.menu-video{visibility:hidden}.selection:before{background:linear-gradient(180deg,#08131e66,#08131e 96%),url('/assets/lane/map-v7.webp') center top/cover no-repeat}}

.cancel-action{position:absolute;top:75px;left:16px;z-index:3;padding:8px 12px;font-size:13px;background:#132331db}

.health-stone{filter:hue-rotate(300deg) saturate(1.3)}.mana-stone{filter:hue-rotate(25deg) saturate(1.25)}
/* Mobile match layout: one viewport, no horizontal overflow or cover-cropped battlefield. */
html{ -webkit-text-size-adjust:100%;text-size-adjust:100%}body,main{max-width:100%;overflow-x:clip}button{touch-action:manipulation}select{font-size:16px}
#match{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#match button,#canvas,#joystick{touch-action:none;-webkit-tap-highlight-color:transparent}.shop{touch-action:pan-y;overscroll-behavior:contain}.shop button{touch-action:pan-y}
@media(max-width:900px), (pointer:coarse){
 #match{box-sizing:border-box;height:var(--app-height,100dvh);max-width:100%;display:grid;grid-template-rows:auto minmax(150px,1fr) auto auto;padding:var(--safe-top) max(12px,var(--safe-right)) var(--safe-bottom) max(12px,var(--safe-left));overflow:hidden}
 #match>*{min-width:0}.match-header{height:auto;min-height:48px;gap:6px;padding:4px;flex-wrap:nowrap}.match-header button{min-height:40px;padding:7px 8px;font-size:12px}.scoreboard{min-width:0;gap:7px}.scoreboard span{max-width:65px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.match-tools{gap:6px;flex-shrink:0}.match-tools #sound,#fps{display:none}
 #match .battlefield{height:auto;min-height:0;max-height:none}#canvas{object-fit:contain;object-position:center}
 #match .hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:6px;min-height:0;align-items:center}#match .hud>*{min-width:0;max-width:100%;margin:0}
 #match .hero-hud{grid-column:1/3;order:0;gap:6px}.hero-hud>canvas{width:36px;height:46px}.vitals{min-width:0}.vitals>div:first-child{font-size:12px;margin:0}.bar{height:13px;margin:3px 0}.bar span{font-size:10px;line-height:13px}#match .bar.experience{height:9px!important}.bar.experience span{line-height:9px;font-size:8px}
 #match .shop-button{grid-column:3;grid-row:1;order:0;padding:6px;min-height:44px;display:grid;font-size:12px}.shop-button small{display:block}
 #match .hud .skill{order:1;min-height:44px;padding:6px 3px 6px 22px}.skill .key{left:4px;top:10px}.skill b{font-size:11px}.skill small{font-size:9px}
 #match .inventory-panel{grid-column:1/-1;order:2}#match .inventory-slots{grid-template-columns:repeat(6,minmax(0,1fr));max-width:none;gap:4px}.inventory-slot{height:38px}#courier-status{font-size:10px;min-height:12px;margin:1px 0}
 #match .hud .attributes{grid-column:1/-1;order:3;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:4px 0 0}.attributes b{font-size:12px}.attributes small{font-size:10px}.attributes span{gap:3px;justify-content:flex-start}
 .bottom-line{padding:3px 7px;min-height:19px;font-size:10px}.bottom-line p{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.bottom-line>span{display:none}
 .touch-controls{left:18px;right:18px;bottom:22px}#joystick{width:80px;height:80px}#stick{left:17px;top:17px}.touch-attacks{display:grid;grid-template-columns:48px 54px;gap:6px;align-items:center}.touch-attacks button,#touch-magic,#touch-guard,#touch-ultimate,.touch-attacks #touch-attack{position:static;width:48px;height:48px;min-width:0;margin:0;padding:3px;font-size:15px}.touch-attacks #touch-attack{width:54px;height:54px;font-size:11px}.touch-attacks small{font-size:9px}
 .battle-top{left:8px;right:8px;top:8px;gap:6px}.base-meter{font-size:8px;letter-spacing:.3px}.wave{font-size:10px}.wave span{font-size:9px}.map-wrap{bottom:5px;width:105px;padding:2px 4px}.map-wrap canvas{height:18px}.map-wrap>span{font-size:6px;letter-spacing:0}.boss-way{left:8px;bottom:112px;font-size:10px;max-width:100px}.cancel-action{top:54px;left:8px;padding:7px;min-height:36px;font-size:11px}.target-info{top:55px;right:8px;padding:5px;max-width:60%;font-size:10px}
 .shop{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:auto;max-width:none;max-height:75dvh;padding:12px}.buffs{top:100px;bottom:auto;left:20px;max-width:80%;flex-wrap:wrap}.buffs span{padding:3px;font-size:10px}
}
@media(max-width:430px){.scoreboard span{display:none}.match-header #back{font-size:11px}.match-header #clock{font-size:11px}}
@media(max-width:900px) and (orientation:landscape), (pointer:coarse) and (orientation:landscape){
 #match{grid-template-rows:40px minmax(100px,1fr) auto}.bottom-line{display:none}#match .hud{grid-template-columns:minmax(100px,1.4fr) repeat(3,minmax(0,.8fr)) minmax(90px,1.2fr) minmax(60px,.8fr);gap:4px;padding:3px}
 #match .hero-hud{grid-column:auto}#match .shop-button{grid-column:6;grid-row:1}#match .hud .skill{grid-row:1;order:0}#match .inventory-panel{grid-column:5;grid-row:1;order:0}#match .inventory-slots{grid-template-columns:repeat(3,1fr)}.inventory-slot{height:25px}#courier-status{font-size:9px}#match .hud .attributes{grid-template-columns:repeat(6,1fr);padding-top:2px}.hero-hud>canvas{display:none}.touch-controls{bottom:10px}.boss-way{left:110px;bottom:7px}.map-wrap{width:120px}
}

#match>:not(.shop){touch-action:none}

.multiplayer-panel{margin:32px 0;padding:28px;border:1px solid #b69b5d55;border-radius:20px;background:#0b1825e8}.multiplayer-panel h2{margin:8px 0 24px}.multiplayer-panel button,.multiplayer-panel select,.multiplayer-panel input{padding:12px;border-radius:10px;font:inherit;color:#f6ebce;background:#203344;border:1px solid #72859866}.multiplayer-panel .primary{background:#edce88;color:#10202b}.multiplayer-panel label{display:flex;gap:8px;align-items:center}.room-controls,#room-entry,.room-heading{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.room-teams{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.room-teams>div{padding:16px;background:#18323977;border-radius:12px}.room-teams>div+div{background:#42283977}.empty-seat{opacity:.45}#room-code{font-size:24px;letter-spacing:3px}#room-status{color:#b4c6d2;font-size:14px}#network-status{position:fixed;top:calc(env(safe-area-inset-top) + 4px);left:50%;transform:translateX(-50%);z-index:100;background:#10202be8;padding:4px 12px;border-radius:9px;font-size:11px;max-width:85vw;pointer-events:none} @media(max-width:600px){.multiplayer-panel{padding:16px}.room-teams{gap:8px}.room-teams>div{padding:9px}.room-controls label{width:100%}}
:root .target-info{white-space:pre-line;max-width:min(420px,65%);line-height:1.5;pointer-events:none}

.performance-panel{position:fixed;top:max(3px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:30;max-width:96vw;width:max-content;padding:4px 8px;border-radius:6px;background:#07131de8;color:#d4eee6;font:11px/1.4 system-ui;pointer-events:none;font-variant-numeric:tabular-nums;text-align:center}#match[hidden] .performance-panel{display:none}

.item-symbol{display:grid;place-items:center;min-width:44px;height:44px;color:#ffe0a2;font-weight:800;font-size:18px;background:#253743;border:1px solid #bfa36c;border-radius:9px}

/* Telegram shell: safe insets have one owner, never compounded on rotation. */
:root{--safe-top:max(env(safe-area-inset-top,0px),var(--tg-safe-top,0px));--safe-right:max(env(safe-area-inset-right,0px),var(--tg-safe-right,0px));--safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-safe-bottom,0px));--safe-left:max(env(safe-area-inset-left,0px),var(--tg-safe-left,0px))}
@media(max-width:900px), (pointer:coarse){html.in-match,html.in-match body{overflow:hidden;overscroll-behavior:none}}
input,textarea,select{font-size:16px;user-select:text;-webkit-user-select:text;touch-action:manipulation}
.selection button,.selection canvas,.selection img{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.telegram-app .selection{padding-top:max(16px,var(--safe-top));padding-right:max(16px,var(--safe-right));padding-bottom:max(20px,var(--safe-bottom));padding-left:max(16px,var(--safe-left));min-height:var(--app-height,100dvh)}
.shop{touch-action:pan-y;-webkit-overflow-scrolling:touch}
#fullscreen{font-size:20px;min-width:44px;min-height:44px}
@media(max-width:900px), (pointer:coarse){
 #match{grid-template-rows:auto minmax(0,1fr) auto auto}
 #match .match-header button{min-height:44px}
 .shop{left:max(12px,var(--safe-left));right:max(12px,var(--safe-right));bottom:max(12px,var(--safe-bottom));max-height:calc(var(--app-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 24px)}
 .shop button,#close-teleport,.upgrade-panel button{min-height:44px}
 .teleport-panel,.upgrade-panel,.banner{max-height:calc(100% - 16px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;top:8px}
 .banner{transform:translateX(-50%);padding:12px}.banner h2{font-size:26px;margin:4px}.banner p{margin:8px 0}
 .teleport-panel button,.upgrade-panel button{touch-action:manipulation}
 #network-status,.performance-panel{top:calc(var(--safe-top) + 4px)}
 .inventory-slot{min-height:38px}
}
@media(max-width:900px) and (orientation:landscape), (pointer:coarse) and (orientation:landscape){
 #match{grid-template-rows:auto minmax(0,1fr) auto}
 #match .inventory-slot{height:36px;min-height:36px}
 #match .hud .skill{min-height:44px}
 #match .hud .skill small{display:none}
 #match .match-header{min-height:44px}
 .touch-controls{left:14px;right:14px;bottom:12px}
}
/* Landscape battle owns the screen; HUD is one strip, abilities live on field. */
#canvas{object-fit:cover}
@media (orientation:landscape) and (max-height:600px){
 #match{grid-template-rows:44px minmax(0,1fr) 54px;padding-top:0;padding-bottom:0}
 #match .match-header{height:44px;min-height:44px;padding:0 4px}
 #match .match-header button{min-height:40px;padding:4px 10px}
 #match .hud{height:54px;min-height:54px;display:grid;grid-template-columns:minmax(120px,1fr) minmax(210px,1.6fr) minmax(90px,.65fr);gap:8px;padding:3px 6px}
 #match .hud .hero-hud{grid-column:1;grid-row:1;order:0;min-width:0}
 #match .hud .inventory-panel{grid-column:2;grid-row:1;order:0}
 #match .hud .shop-button{grid-column:3;grid-row:1;min-height:44px;padding:4px}
 #match .hud .skill,#match .hud .attributes,#courier-status,.shop-button small,#match .bottom-line{display:none}
 #match .inventory-slots{grid-template-columns:repeat(6,minmax(0,1fr))}
 #match .inventory-slot{height:42px;min-height:42px}
 #match .vitals>div:first-child{font-size:10px;line-height:12px}.hero-hud .bar{margin:1px 0;height:10px}.hero-hud .bar span{line-height:10px;font-size:9px}#match .bar.experience{height:5px!important}.bar.experience span{display:none}
 .touch-controls{bottom:14px;left:18px;right:18px}.touch-attacks{display:grid;grid-template-columns:48px 54px;gap:6px}.touch-attacks button,#touch-magic,#touch-guard,#touch-ultimate,.touch-attacks #touch-attack{position:static;width:48px;height:48px;margin:0;padding:3px}
 .map-wrap{bottom:5px;width:120px}.boss-way{bottom:5px;left:112px}.cancel-action{top:45px;left:112px}.battle-top{top:5px}.performance-panel{display:none}
}
html.focus-game #match{position:fixed;inset:0;height:var(--app-height,100dvh);z-index:50}
html.focus-game #match .match-header{background:#0b1724d9}
html.focus-game #match{grid-template-rows:0 minmax(0,1fr) 54px}
html.focus-game #match .match-header{position:absolute;top:4px;left:12px;right:12px;z-index:12;background:transparent;pointer-events:none}
html.focus-game .match-header button{pointer-events:auto}
html.focus-game .match-header .scoreboard,html.focus-game #clock{display:none}
html.focus-game .battle-top{top:50px}
.fullscreen-note{position:fixed;z-index:200;left:50%;top:calc(var(--safe-top) + 8px);transform:translateX(-50%);max-width:85vw;padding:10px 14px;background:#102333;color:#fff;border:1px solid #e9c47d;border-radius:8px;font:14px/1.4 system-ui;pointer-events:none}
