:root{color-scheme:light;--purple:#422762;--deep:#26133e;--cream:#fff4d3;--u:calc(min(100vw, 100dvh * .54, 540px) / 480);font-family:'Arial Rounded MT Bold','Trebuchet MS',system-ui,sans-serif}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background:radial-gradient(ellipse at center,#384b3b,#1b2926 72%);display:grid;place-items:center;color:#fff;font-weight:800}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;border:0;transition:filter .12s,transform .12s; -webkit-tap-highlight-color:transparent}button:active{transform:translateY(2px);filter:brightness(.96)}button:focus-visible{outline:3px solid #fff;outline-offset:2px}button:disabled{filter:saturate(.45);opacity:.72;cursor:default}#app{width:min(100vw,54dvh,540px);height:min(100dvh,185.185vw,1000px);position:relative;display:grid;grid-template-rows:7.7% 7.8% minmax(0,1fr) 8% 16% 2%;overflow:hidden;background:linear-gradient(#b9eea1,#66b96c 55%,#41265d);container-type:inline-size;box-shadow:0 0 40px #101c1b66;isolation:isolate}small{font-size:2.3cqw;font-weight:900}.hud{display:flex;align-items:center;gap:1.6cqw;padding:2cqw 2.6cqw 0;z-index:1}.metric{display:flex;align-items:center;gap:1.4cqw;min-width:0;flex:1;padding:1.5cqw 2cqw;border:1.5px solid #fff9;border-radius:5.5cqw;box-shadow:0 2px 0 #7a4d2b,0 4px 5px #25332b38,inset 0 1px 2px #fff;line-height:1.02}.metric i{font-style:normal;font-size:5.8cqw;line-height:1;text-shadow:0 2px 0 #0003}.metric small{display:block;white-space:nowrap;font-size:2.15cqw}.metric b{display:block;font-size:4.8cqw;letter-spacing:-.15cqw}.gold{background:linear-gradient(#fff6b8,#ffdb69);color:#814809;box-shadow:0 2px 0 #a66517,0 4px 5px #25332b38,inset 0 1px 2px #fff}.gold i{color:#dc8504;text-shadow:0 1px 0 #fff6ae}.energy{background:linear-gradient(#ead6ff,#b695ef);color:#4f277a;box-shadow:0 2px 0 #7951ad,0 4px 5px #25332b38,inset 0 1px 2px #fff}.energy i{color:#ffbc24;text-shadow:1px 1px #9a5614,-1px -1px #fff}.life{background:linear-gradient(#ffdce9,#f69cb8);color:#902954;box-shadow:0 2px 0 #ac456c,0 4px 5px #25332b38,inset 0 1px 2px #fff}.life i{color:#e93c62}.gear{background:linear-gradient(#bc91f6,#7347be);border:1.5px solid #e9d8ff;border-radius:4cqw;width:10cqw;height:10cqw;flex:none;font-size:6cqw;box-shadow:0 3px 0 #482775,0 5px 6px #281b4640;text-shadow:0 2px 0 #4e2f80}.brandbar{display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1;gap:.4cqw}.logo{position:relative;display:inline-flex;align-items:center;white-space:nowrap;font-size:8.5cqw;font-weight:1000;font-style:italic;letter-spacing:-.6cqw;line-height:1.12;transform:rotate(-3deg);filter:drop-shadow(0 3px 0 #392057) drop-shadow(0 3px 3px #23104355);isolation:isolate}.logo span:not(.bolt){-webkit-text-stroke:1.1cqw #392057;paint-order:stroke fill;text-shadow:0 1px 0 #fff8,0 3px 0 #0004}.logo i{font-style:inherit}.logo i:nth-child(1){color:#ff5b57}.logo i:nth-child(2){color:#ff9c28}.logo i:nth-child(3){color:#ffe044}.logo i:nth-child(4){color:#9ee844}.logo i:nth-child(5){color:#38d9df}.logo i:nth-child(6){color:#36a9ff}.logo-storm{color:#f8efff}.bolt{position:absolute;z-index:-1;right:4%;top:-55%;font-size:12cqw;color:#d3b1ff;-webkit-text-stroke:1.3cqw #7647c3;paint-order:stroke fill;transform:rotate(26deg);opacity:.8}.sector,.tag{background:linear-gradient(#9a75ce,#63429a);padding:.55cqw 4cqw;border:1px solid #e8d4ff;border-radius:10cqw;font-size:2.1cqw;letter-spacing:.3cqw;text-shadow:0 1px #432364;box-shadow:0 2px 0 #493074}.board{position:relative;min-height:0;overflow:hidden;background:#77bf67;box-shadow:inset 0 0 10px #346d46}canvas#field{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.notice{position:absolute;top:1.8cqw;left:50%;transform:translateX(-50%);max-width:94%;width:max-content;padding:1.4cqw 3cqw;color:#4a2e6c;background:#fff4e4eF;border:1px solid #fff;border-radius:9cqw;font-size:2.55cqw;box-shadow:0 2px 0 #906eae55;pointer-events:none;text-align:center;transition:opacity .2s;z-index:2}.notice.hide{opacity:0}.controls{display:flex;align-items:center;gap:1.7cqw;padding:1.6cqw 2.4cqw;background:linear-gradient(#ad88e4,#7151a5);border:1.5px solid #d6bdf6;border-radius:5cqw;box-shadow:0 -2px 0 #e6ccff80,0 3px 0 #41245f;z-index:2}.wavebox{background:#5a3889;border-radius:3.2cqw;padding:1.1cqw 2cqw;min-width:20cqw;line-height:1.05;box-shadow:inset 0 2px 3px #40205c66}.wavebox small{display:block;color:#d7c3f7;font-size:2cqw;letter-spacing:.4cqw}.wavebox b{font-size:4cqw}.primary{background:linear-gradient(#b9f45d 0%,#65cf21 38%,#35a518 80%,#258f1a);color:#fff;border:1.5px solid #dcffad;border-radius:4.4cqw;box-shadow:0 3px 0 #206d18,0 5px 6px #241b3340,inset 0 1.5px 1px #fff9;text-shadow:0 2px 0 #1c7c16;font-weight:1000}.controls .primary{flex:1;height:100%;min-height:0;font-size:3.65cqw;white-space:nowrap}.speed{display:flex;align-items:center;background:#422968;border-radius:3.6cqw;padding:.55cqw;gap:.1cqw;box-shadow:inset 0 2px 4px #24163f}.speed button{padding:1.5cqw 1.1cqw;border-radius:3cqw;background:none;font-size:2.65cqw;min-width:6.1cqw}.speed button.active{background:linear-gradient(#e5ccff,#aa83e8);color:#3c2260;box-shadow:0 2px 0 #6e48a6,inset 0 1px #fff9}.arsenal{background:linear-gradient(#4c306e,#2b1845);padding:1.6cqw 2.2cqw 1cqw;min-height:0;display:flex;flex-direction:column;gap:1.1cqw}.trayhead{display:flex;align-items:center;justify-content:space-between;color:#ddc5f3;font-size:2.1cqw;letter-spacing:.35cqw;line-height:1}.trayhead button{background:#70529d;border:1px solid #ad8ddd;border-radius:2cqw;padding:.6cqw 2cqw;font-size:2.3cqw;letter-spacing:0}.towers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.5cqw;flex:1;min-height:0}.tower{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;min-width:0;gap:0;background:linear-gradient(var(--card-light),var(--card-dark));border:1.5px solid #ffffff60;border-radius:4cqw;box-shadow:0 2px 0 #1e1238,0 3px 4px #170b2b80,inset 0 1px 1px #fff5;text-shadow:0 1px 2px #160b36;padding:.5cqw}.tower canvas{width:100%;height:66%;min-height:0;object-fit:contain;pointer-events:none}.tower strong{display:block;font-size:3.1cqw;line-height:1.1}.tower em{display:block;font-style:normal;font-size:2.5cqw;color:#ffe098;line-height:1.2}.tower.selected{outline:2px solid #ffeb70;outline-offset:-2px;filter:brightness(1.15)}.tower.unaffordable{filter:saturate(.5) brightness(.75)}.tower[hidden]{display:none}.details{position:absolute;bottom:2cqw;left:2cqw;right:2cqw;z-index:3;padding:2.8cqw;background:linear-gradient(#fff8ff,#e8ddf6);border:2px solid #fff;border-radius:5cqw;color:#422760;box-shadow:0 4px 0 #715298,0 7px 13px #24153b55;line-height:1.15}.details h3{margin:0;font-size:4.3cqw}.details p{font-size:2.65cqw;margin:1.2cqw 0;color:#6c5786}.details small{color:#8d6ab1}.detailstats{display:flex;justify-content:space-between;font-size:2.3cqw;margin:1.4cqw 0;color:#7b6497}.detailstats b{display:block;color:#452966;font-size:3.5cqw}.upgrade{display:block;width:100%;text-align:left;margin-top:1.3cqw;padding:2cqw;background:linear-gradient(#ae8ce4,#7951b6);border:1px solid #c7b0f2;border-radius:2.7cqw;font-size:2.9cqw;color:white;box-shadow:0 2px 0 #634091}.upgrade b{float:right;color:#fff3a8}.minor{display:flex;gap:1.5cqw;margin-top:1.7cqw}.minor button{flex:1;background:#ded0f0;color:#513377;padding:1.6cqw;border-radius:2.7cqw;font-size:2.7cqw}.dismiss{position:absolute;right:2.5cqw;top:2cqw;width:7cqw;height:7cqw;background:#bda6e3;border-radius:2.5cqw;color:#513377;font-size:4cqw}.hidden{display:none!important}footer{background:#2b1845;text-align:center;font-size:1.7cqw;letter-spacing:.45cqw;color:#cbb4ec;display:flex;align-items:center;justify-content:center;gap:1.2cqw}.overlay{position:absolute;inset:0;z-index:10;background:#28123bb8;backdrop-filter:blur(5px);display:grid;place-items:center;padding:5cqw}.modal{width:100%;padding:5cqw;background:linear-gradient(#fff8ff,#e8daf6);border:2px solid #fff;border-radius:6cqw;text-align:center;color:#40265f;box-shadow:0 5px 0 #8b69bd,0 12px 30px #21132d80}.modal h2{font-size:6cqw;line-height:1.05;margin:1.6cqw 0}.modal p{font-size:3cqw;font-weight:700;color:#755c91;margin:2cqw 0 3cqw}.modal small{color:#8665ad;letter-spacing:.2cqw}.maplist{display:grid;gap:2cqw}.mapchoice{display:flex;align-items:center;gap:3cqw;text-align:left;background:linear-gradient(#f8edff,#d4bce9);border:1px solid #b89ad8;border-radius:4cqw;padding:2cqw;color:#422760;box-shadow:0 2px 0 #a387c2}.mapchoice canvas{width:19cqw;height:16cqw;object-fit:cover;border-radius:2.5cqw;flex:none}.mapchoice b{display:block;font-size:3.9cqw}.mapchoice small{display:block;font-size:2.55cqw;letter-spacing:0}.modal-actions,.mode-row{display:flex;gap:2cqw;justify-content:center;margin-top:3cqw}.modal-actions button,.mode-row button,.settingrow button{background:linear-gradient(#ad8be4,#754db2);border:1px solid #d2baf6;border-radius:3cqw;padding:2.5cqw 4cqw;color:#fff;box-shadow:0 2px 0 #5c348f;font-size:3cqw}.mode-row{margin:2cqw 0 3cqw}.mode-row .active{background:linear-gradient(#98e94e,#36a31b);box-shadow:0 2px 0 #247c1a}.settingrow{display:flex;align-items:center;justify-content:space-between;padding:2cqw 0;border-bottom:1px solid #d8c6ed;font-size:3.5cqw}.home{position:absolute;inset:0;z-index:5;overflow:hidden;background:linear-gradient(#dcf6b0,#6cb969 55%,#2b1845)}.home #preview{position:absolute;inset:0;width:100%;height:79%;object-fit:cover;opacity:1}.home:after{content:'';position:absolute;inset:0;background:linear-gradient(#e0f9c455,transparent 28%,transparent 40%,#28174033 55%,#2b1845 92%);pointer-events:none}.homeTop{position:absolute;top:2.8cqw;left:3.5cqw;right:3.5cqw;display:flex;justify-content:space-between;z-index:2}.homeTop .metric{flex:none;min-width:32cqw}.homeBrand{position:absolute;z-index:2;top:12%;left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:1.3cqw}.homeBrand .logo{font-size:10.8cqw}.homeBrand .tag{font-size:2.6cqw;padding:1.2cqw 5cqw}.crest{height:10cqw;display:flex;align-items:center;gap:1cqw;transform:rotate(-6deg);filter:drop-shadow(0 3px 0 #432974)}.crest span{display:grid;place-items:center;width:8cqw;height:8cqw;border-radius:50%;background:radial-gradient(circle at 30% 22%,#fff,#ffad36 24%,#e7690d 75%);border:1px solid #fff8;color:transparent}.crest span:nth-child(2){width:13cqw;height:13cqw;background:radial-gradient(circle at 35% 25%,#d9b5ff,#9061ef 45%,#5b2aa5 80%);color:#ffe652;font-size:10cqw;text-shadow:0 2px #8d4f06}.crest span:nth-child(3){background:radial-gradient(circle at 30% 22%,#fff,#6bf2fb 25%,#178ed5 78%)}.homeBottom{position:absolute;z-index:2;bottom:0;left:4.5cqw;right:4.5cqw;display:flex;flex-direction:column;gap:3cqw}.playcard{background:linear-gradient(#fffaff,#f0e9fa);color:#452962;border:2px solid #fff;border-radius:6cqw;padding:4cqw;box-shadow:0 4px 0 #7e5eb2,0 8px 15px #21133577}.playcard small{color:#8a6aae;letter-spacing:.4cqw}.playtitle{font-size:7cqw;line-height:1.1;margin:1.5cqw 0}.playdesc{font-size:3cqw;color:#816a99;margin:0 0 3cqw}.playcard .primary{width:100%;font-size:6.2cqw;padding:3cqw}.homelinks{display:grid;grid-template-columns:repeat(3,1fr);gap:2cqw}.homelinks button{background:linear-gradient(#9974cf,#5a378d);border:1px solid #bfa1e9;border-radius:4cqw;box-shadow:0 3px 0 #352050;padding:2cqw;font-size:3cqw}.homelinks span{display:block;color:#f7d976;font-size:6cqw;line-height:1.2}.homeBottom footer{background:transparent;padding:1cqw 0 2cqw;font-size:2cqw}
.brandbar .bolt{font-size:9cqw;top:-29%;opacity:.65}.controls .primary.running{filter:none;opacity:1;background:linear-gradient(#ab8bd6,#7850ab);border-color:#cdb2f0;box-shadow:0 2px 0 #4c2c78;text-shadow:0 1px #4c2c78}.homeBrand .logo{filter:drop-shadow(0 3px 0 #392057) drop-shadow(0 5px 4px #23104366)}@media(max-width:600px) and (orientation:portrait){#app{width:100vw;height:100dvh;max-height:none}.home #preview{height:79%}}
/* R3: Reference artwork, compact premium portrait game layout. */
#app{width:min(100vw,56.25dvh,540px);height:min(100dvh,177.778vw,960px);grid-template-rows:7.8% 13.5% minmax(0,1fr) 8.1% 17.2% 1.8%;background:linear-gradient(#b7efce 0%,#a5df88 20%,#66bc55 58%,#321b52 80%)}
.hud{gap:1.25cqw;padding:1.8cqw 2.2cqw .5cqw}.metric{border-radius:5cqw;padding:1.6cqw 1.4cqw;gap:.9cqw;border-width:1.5px}.metric small{font-size:2.05cqw}.metric b{font-size:4.7cqw}.metric i{font-size:5.6cqw}.gear{width:10cqw;height:10cqw;border-radius:3.4cqw}.gold{background:linear-gradient(#fff8bd,#ffd34e);border-color:#fff2b8}.energy{background:linear-gradient(#efddff,#b38def);border-color:#f7e9ff}.life{background:linear-gradient(#ffdae7,#f68cb5);border-color:#fff0f7}.brandbar{position:relative;gap:0;overflow:hidden;background:radial-gradient(ellipse at 50% 5%,#e2fff4 0%,#b4ebbd 55%,#a7e18c 100%);padding:.1cqw 0 .4cqw}.reference-logo{object-fit:contain;display:block;filter:drop-shadow(0 3px 2px #57347c38);max-width:100%;max-height:100%}.brandbar .reference-logo{width:75%;height:95%}.brandbar .sector{display:none}.board{background:#79c75e;box-shadow:none}.controls{gap:1.2cqw;padding:1.3cqw 1.7cqw;background:linear-gradient(#b8a0e8,#8a68c0 53%,#7652aa);border:2px solid #ddcafa;border-radius:5.5cqw;box-shadow:0 -1px 2px #fff8,0 3px 0 #41245f}.controls .primary{font-size:3.8cqw;letter-spacing:-.12cqw}.wavebox{padding:1.2cqw 1.65cqw;min-width:20cqw}.speed button{padding:1.5cqw .85cqw;font-size:2.8cqw;min-width:5.6cqw}.arsenal{border-radius:5cqw 5cqw 0 0;border:1px solid #7d56a8;background:linear-gradient(#57377c,#2f194e);padding:1.2cqw 1.6cqw 1.1cqw;gap:.8cqw}.trayhead{font-size:2cqw}.towers{grid-template-columns:repeat(5,minmax(0,1fr));gap:1.25cqw}.tower{border-radius:3.5cqw;border:1.5px solid #fff6;box-shadow:0 3px 0 #26133e,0 4px 5px #180c2b80,inset 0 1px 1px #fff5;padding:.25cqw .1cqw .8cqw}.tower canvas{height:76%;width:100%;object-fit:contain;flex:1;min-height:0}.tower strong{font-size:2.8cqw;line-height:1.05}.tower em{margin-top:.8cqw;border-radius:2.3cqw;padding:.55cqw 1.5cqw;background:#30174c40;border:1px solid #fff5;font-size:2.7cqw;color:#ffedaf}.homeBrand{top:11.8%;width:92%;left:4%;gap:0}.homeBrand .reference-logo{width:100%;max-height:unset;height:auto}.home #preview{filter:saturate(1.09)}.homeBottom{padding:0 4cqw 1.3cqw}.playcard{border:2px solid #fff;border-radius:6.8cqw;background:linear-gradient(#fffaff,#eee5fa);box-shadow:0 4px 0 #9970ce,0 7px 12px #25113c70}.playcard .primary{border-radius:4.7cqw}.home .homelinks button{background:linear-gradient(#a583da,#5a358e);box-shadow:0 2px 0 #372054,inset 0 1px 1px #fff4}.homeTop .gold{max-width:35cqw}.notice{font-size:2.5cqw;top:1.2cqw}.homeBrand{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;transform:none}.homeBrand .reference-logo{filter:drop-shadow(0 4px 4px #36214c60)}

/* Keep the map projection proportional; use full colour cards even before purchase. */
.tower.unaffordable{filter:saturate(.88) brightness(.86)}.tower.unaffordable em{color:#fff0d2}.metric.life b{font-size:4.15cqw;white-space:nowrap}.brandbar .reference-logo{width:84%;height:100%}.home #preview{object-fit:contain;object-position:top center;height:79%;width:100%;transform:scale(1.38);transform-origin:50% 0}.home{background:linear-gradient(#bdeec1,#8bce76 50%,#2b1845 82%)}.homeBrand .reference-logo{width:100%;max-height:unset}.homeBrand{top:13%;left:4%;width:92%}.home .homeBottom{left:4%;right:4%}

.home #preview{object-fit:cover;object-position:center;transform:none}.metric.life b{font-size:3.7cqw}.homeBrand{top:12%}.brandbar .reference-logo{width:86%;height:100%}.brandbar{background:radial-gradient(ellipse at 50% 10%,#dcfff1,#b2ebbd 55%,#91d875)}
/* R6: larger uninterrupted battlefield, exact reference logo retained. */
#app{grid-template-rows:7.8% 9.5% minmax(0,1fr) 8.1% 12.8% 1.8%;background:#9cdb76}.hud{background:linear-gradient(#c8f5cc,#a9e88c)}.brandbar{background:linear-gradient(#a9e88c,#91d56d);padding:0}.brandbar .reference-logo{height:100%;width:74%;filter:drop-shadow(0 3px 2px #49336c44)}.board{overflow:hidden;background:#91d56d}.board #field{width:100%;height:100%;display:block;touch-action:none}.arsenal{gap:1cqw}.trayhead{justify-content:space-between}.towers{display:flex;gap:2cqw}.tower{width:32%;flex:0 0 32%;display:grid;grid-template-columns:55% 45%;grid-template-rows:100%;padding:0 1cqw;gap:0;align-items:center}.tower canvas{width:100%;height:100%;object-fit:contain}.tower strong{font-size:3.5cqw}.tower em{font-size:2.9cqw;padding:.5cqw .6cqw}.arsenal .sliceInfo{flex:1;display:flex;flex-direction:column;justify-content:center;padding:0 1.5cqw;color:#f3e8ff;font-size:3cqw;line-height:1.25}.sliceInfo small{color:#d6c0ef;font-size:2.5cqw;margin-top:.8cqw}.home #preview{object-fit:cover;object-position:top;height:84%}.homeBrand{top:13%}.homeBottom .playdesc{line-height:1.3}.trayhead button[hidden]{display:none}.hud .metric{min-height:10cqw}
.arsenal{display:grid;grid-template-columns:34% minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:.7cqw 1.5cqw}.arsenal .trayhead{grid-column:1/-1}.arsenal .towers{display:flex;min-height:0;grid-column:1}.arsenal .tower{width:100%;flex:1}.arsenal .sliceInfo{grid-column:2;min-height:0}.tower canvas{object-fit:contain}.tower>div{min-width:0}.homeBottom .playdesc:after{content:' · Spark trial'}

/* R7: continuous 3D world behind HUD and unchanged reference logo, five-card arsenal. */
#app{grid-template-rows:7.8% 9.5% minmax(0,1fr) 8.1% 15.2% 1.8%}#worldHeader{position:absolute;top:0;left:0;width:100%;height:17.3%;pointer-events:none;z-index:0}.hud,.brandbar{background:transparent}.brandbar .reference-logo{width:74%;height:100%}.arsenal{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:.6cqw}.arsenal .towers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1.2cqw;grid-column:1;min-height:0}.arsenal .tower{display:flex;flex-direction:column;width:auto;min-width:0;padding:.25cqw .1cqw .65cqw;gap:0}.arsenal .tower canvas{width:100%;height:70%;flex:1;min-height:0;object-fit:contain}.tower>div{width:100%;text-align:center}.tower strong{font-size:2.7cqw;line-height:1.05}.tower em{font-size:2.6cqw;padding:.35cqw 1cqw;margin-top:.5cqw}.homeBottom .playdesc:after{content:none}.trayhead button[hidden]{display:none}

/* R8: card safe areas and explicit icon/text rows. */
.arsenal .tower{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;align-items:center;justify-items:center;align-content:stretch;gap:.3cqw;padding:1.15cqw .65cqw .95cqw;overflow:hidden;min-height:0;min-width:0;}
.arsenal .tower canvas{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-height:0;min-width:0;object-fit:contain;flex:none;}
.arsenal .tower>div{width:100%;min-width:0;display:grid;justify-items:center;gap:.4cqw;}
.arsenal .tower strong{font-size:2.65cqw;line-height:1.12;white-space:nowrap;}
.arsenal .tower em{margin:0;padding:.38cqw .9cqw;line-height:1.12;font-size:2.5cqw;white-space:nowrap;max-width:100%;}
/* R9: progression overlays and dual upgrade paths; R8 arena layout unchanged. */
.tower.locked-tower{filter:saturate(.25) brightness(.64);opacity:.86;cursor:not-allowed}.tower.locked-tower em{color:#f4e2ff}.branch-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.6cqw;margin:1.3cqw 0}.branch{min-width:0;display:flex;flex-direction:column;gap:1.1cqw;padding:1.5cqw;border:1px solid #bba2d8;border-radius:3cqw;background:linear-gradient(#fff9f0,#f4dfbc)}.branch-b{background:linear-gradient(#f3f5ff,#dcdcfb)}.branch strong{font-size:3.1cqw;color:#573e78}.branch b{font-size:3.1cqw}.branch small{font-size:2.35cqw;min-height:5.1cqw;color:#725e86;line-height:1.15}.branch .upgrade{margin:0;width:100%;justify-content:center;font-size:3cqw;padding:1.5cqw .7cqw}.tier-pips{display:flex;gap:.8cqw}.tier-pips i{font-style:normal;border-radius:50%;width:4.5cqw;height:4.5cqw;display:grid;place-items:center;background:#d8cce8;color:#765d93;font-size:2.3cqw;border:1px solid #fff}.tier-pips i.filled{background:linear-gradient(#ffe786,#e6a230);color:#654221}.branch-b .tier-pips i.filled{background:linear-gradient(#b3e7ff,#6a89ed);color:#203e91}.campaign-modal{max-height:94%;overflow-y:auto;padding:3.4cqw}.stage-list{display:grid;gap:1.2cqw;margin:2.5cqw 0}.stage-list button,.trial-modes button{background:linear-gradient(#fff,#ebdff9);color:#462b67;border:1px solid #cab5e4;border-radius:2.8cqw;padding:1.6cqw 2cqw;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:1cqw;font-size:3.1cqw}.stage-list button:disabled{opacity:.52}.stage-list small,.trial-modes small{display:block;font-size:2.35cqw;letter-spacing:0;margin-top:.5cqw}.stage-list em{font-style:normal;font-size:2.8cqw;color:#9f7226;white-space:nowrap}.trial-modes{display:grid;grid-template-columns:1fr 1fr;gap:1.4cqw}.trial-modes button{display:block;text-align:center}.trial-modes button:first-child{grid-column:1/-1;background:linear-gradient(#e4d7ff,#c8a8f7)}.stars{font-size:10cqw;color:#eab03a;text-shadow:0 2px #a66b18}.trayhead span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.homeBottom .playtitle{font-size:6.2cqw}

.enemy-guide{display:grid;gap:1.5cqw;text-align:left;margin:3cqw 0}.enemy-guide>div{display:flex;gap:2.8cqw;align-items:center;padding:1.3cqw;background:#fff7;border-radius:2.5cqw}.enemy-guide i{width:7cqw;height:7cqw;flex:none;border-radius:50%;background:radial-gradient(circle at 30% 23%,#fff,var(--orb) 30%,var(--orb) 65%,#372448);box-shadow:0 2px 2px #36224a44}.enemy-guide b{font-size:3.1cqw}.enemy-guide small{display:block;font-size:2.5cqw;letter-spacing:0}.trial-modes button:first-child{grid-column:auto}.trial-modes button{padding:1.5cqw 1cqw}.trial-modes button small{font-size:2.2cqw}
/* R10 home only — battle UI unchanged. */
#home .homeBrand{top:9%;left:10%;width:80%}#home #preview{height:85%;object-fit:cover;object-position:top center}#home .homeBottom.r10-home{left:4%;right:4%;bottom:0;gap:1.6cqw;padding:0 0 1.5cqw}#home .r10-home .playcard{padding:3cqw 3.5cqw;border-radius:5.4cqw}#home .r10-home .playcard>small{font-size:2.35cqw;letter-spacing:.43cqw}#home .home-play-row{display:flex;align-items:center;gap:2cqw;justify-content:space-between;margin:1.1cqw 0}#home .r10-home .playtitle{font-size:5.5cqw;line-height:1.12;margin:0;min-width:0;letter-spacing:-.1cqw}#home .level-picker{flex:none;color:#583887;background:linear-gradient(#ede5fa,#d9c9ee);border:1px solid #cfbae7;border-radius:3.4cqw;padding:2cqw 2.5cqw;font-size:3.1cqw}#home .home-progress{height:1.35cqw;background:#dfd3ed;border-radius:99px;overflow:hidden;margin:1.5cqw 0 1.1cqw}#home .home-progress i{display:block;height:100%;background:linear-gradient(90deg,#a579e9,#65c933);border-radius:99px;width:0}#home .home-progress-row{display:flex;align-items:center;justify-content:space-between;color:#765f91;font-size:2.6cqw;gap:1cqw;margin:0 0 2cqw}#home .r10-home .playcard .primary{font-size:5.3cqw;padding:2.1cqw;line-height:1.15}#home .home-section{display:flex;justify-content:space-between;align-items:center;padding:0 .7cqw;font-size:2.5cqw;letter-spacing:.4cqw;color:#fff;text-shadow:0 1px 4px #2c174e}#home .home-section small{font-size:2.35cqw;letter-spacing:0;color:#e6d4f6}#home .challenge-grid{display:grid;grid-template-columns:1fr 1fr;gap:2cqw}#home .challenge{min-width:0;text-align:left;display:flex;flex-direction:column;gap:1.1cqw;border:1px solid #e1bdfb;border-radius:4.2cqw;padding:2.5cqw 2.6cqw;background:linear-gradient(155deg,#7147a4,#392254 90%);box-shadow:0 3px #211337,0 5px 8px #170d2950,inset 0 1px #fff4}#home .challenge.siege{background:linear-gradient(155deg,#ba6849,#713146 95%);border-color:#efb581;box-shadow:0 3px #4c2336,0 5px 8px #170d2950,inset 0 1px #fff4}#home .challenge>span{font-size:2.45cqw;color:#ffe096;letter-spacing:.35cqw;display:flex;justify-content:space-between}#home .challenge>strong{font-size:3.8cqw;line-height:1.08;min-height:8.2cqw}#home .challenge small{font-size:2.65cqw;color:#f4e7f8;line-height:1.15;letter-spacing:0}#home .challenge em{font-style:normal;font-size:2.5cqw;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #ffffff2d;padding-top:1.7cqw;color:#ffe29e;margin-top:.5cqw}#home .homelinks{gap:1.5cqw;grid-template-columns:repeat(3,minmax(0,1fr))}#home .homelinks button{min-width:0;display:grid;justify-items:center;align-content:center;gap:.65cqw;font-size:2.75cqw;line-height:1.1;padding:1.45cqw .4cqw;border-radius:3.3cqw}#home .homelinks button span{font-size:4.7cqw;line-height:1.05}#home .homelinks button:nth-child(1) span{color:#ffe19c}#home .homelinks button:nth-child(2) span{color:#9df1fa}#home .homelinks button:nth-child(3) span{color:#ffd78d}#home .homelinks button:nth-child(4) span{color:#e0caff}#home .homelinks button:nth-child(6) span{color:#ffe487}#home .r10-home footer{font-size:1.9cqw;padding:.2cqw 0 .6cqw;letter-spacing:.45cqw}#home::after{background:linear-gradient(transparent 25%,#34214e11 36%,#34214e80 53%,#2b1845 82%)}
/* Compact portrait and landscape desktop viewport: use height-sensitive spacing. */
@container (min-width: 1px){#home .r10-home{max-height:74%;} }@media(max-aspect-ratio: 9/17){#home .r10-home{gap:2.1cqw}#home .homeBrand{top:12%}}@media(max-height:600px) and (orientation:portrait){#home .r10-home{gap:1.2cqw}#home .challenge>strong{min-height:0}#home .challenge{padding:1.8cqw 2cqw;gap:.6cqw}#home .r10-home .playcard{padding:2cqw 3cqw}#home .homeBrand{top:8%;width:64%;left:18%}}
/* ChromaTraffic R45 startup sequence, adapted to the Storm identity. */
#splash{position:absolute;inset:0;z-index:50;background:radial-gradient(ellipse at 50% 35%,#fff 15%,#f2eaff 70%,#ddd0f7);color:#34234f;overflow:hidden}#splash[hidden]{display:none!important}.splash-stage{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3cqw;text-align:center;pointer-events:none}.studio-stage img{width:77%;height:auto;display:block;object-fit:contain;background:transparent}.studio-stage span{font-size:3.2cqw;font-weight:900;letter-spacing:.35em;color:#85729c}.studio-stage{animation:studioReveal 4.6s both}.game-stage{animation:gameReveal 4.6s both}.game-stage img{width:94%;max-height:40%;object-fit:contain;filter:drop-shadow(0 7px 8px #4b326d30)}.game-stage p{font-size:4cqw;font-weight:800;color:#6a5489;margin:0}.splash-orbs{display:flex;align-items:center;justify-content:center;gap:3cqw;width:65%;height:10cqw;background:linear-gradient(#56506c,#39334e);border-radius:99px;border:2px solid #fff;box-shadow:0 4px #d1c3e9;overflow:hidden}.splash-orbs i{width:6cqw;height:6cqw;border-radius:50%;background:radial-gradient(circle at 30% 22%,#fff,#ff6b6b 25%,#c9234b 80%);box-shadow:0 2px 3px #1c1029;animation:stormRoll 1.6s ease-in-out infinite alternate}.splash-orbs i:nth-child(2){background:radial-gradient(circle at 30% 22%,#fff,#67d8ff 25%,#1974ce 80%);animation-delay:.1s}.splash-orbs i:nth-child(3){background:radial-gradient(circle at 30% 22%,#fff,#a8ef5b 25%,#35972b 80%);animation-delay:.2s}.splash-orbs i:nth-child(4){background:radial-gradient(circle at 30% 22%,#fff,#ffdc65 25%,#df9b15 80%);animation-delay:.3s}.splash-orbs i:nth-child(5){background:radial-gradient(circle at 30% 22%,#fff,#d596ff 25%,#8736c4 80%);animation-delay:.4s}.splash-bottom{position:absolute;bottom:8%;left:20%;width:60%;display:grid;gap:4cqw;text-align:center;justify-items:center}.splash-track{height:2cqw;width:100%;overflow:hidden;border-radius:99px;background:#d7cce9}.splash-track div{height:100%;width:100%;background:linear-gradient(90deg,#ff3b3b,#ffd32a,#22c55e,#1e90ff,#a855f7);transform-origin:left;animation:bootFill 4.5s linear both}.splash-bottom button{background:transparent;box-shadow:none;border:0;color:#79678e;font-size:3.6cqw;padding:2% 10%}@keyframes studioReveal{0%{opacity:0;transform:scale(.94)}12%,31%{opacity:1;transform:scale(1)}43%,100%{opacity:0;transform:scale(1.02)}}@keyframes gameReveal{0%,39%{opacity:0;transform:translateY(12px) scale(.96)}55%,100%{opacity:1;transform:none}}@keyframes stormRoll{from{transform:translateY(-2px)}to{transform:translateY(2px)}}@keyframes bootFill{from{transform:scaleX(.08)}to{transform:scaleX(1)}}@media(prefers-reduced-motion:reduce){#splash .studio-stage{display:none}#splash .game-stage{animation:none}#splash .splash-orbs i,#splash .splash-track div{animation:none}}
.r10-modal{max-height:94%;overflow-y:auto}.r10-modal .book-list{display:grid;gap:1.8cqw;margin:2.5cqw 0;text-align:left}.book-entry{display:grid;grid-template-columns:16cqw minmax(0,1fr);gap:2cqw;align-items:center;background:#ffffffa0;border:1px solid #dfd0f2;border-radius:3cqw;padding:1.7cqw}.book-entry img{width:100%;height:15cqw;object-fit:contain}.book-entry b{font-size:3.4cqw}.book-entry small{display:block;letter-spacing:0;font-size:2.6cqw;line-height:1.25;margin-top:.6cqw;color:#78638d}.book-entry .book-lock{color:#9d6d35}.book-entry .book-state{color:#42833a}.book-entry .book-icon{font-size:7cqw;text-align:center;color:#ad7a27}.r10-modal .mode-start{width:100%;padding:2.8cqw;font-size:4cqw;margin:2cqw 0}.r10-modal .mode-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1.4cqw;margin:2cqw 0}.r10-modal .mode-stats>div{background:#e5d9f2;border-radius:3cqw;padding:2cqw 1cqw;font-size:2.5cqw}.r10-modal .mode-stats b{display:block;font-size:4.4cqw;margin-bottom:.5cqw}.r10-modal .modal-actions button{min-width:0}.r10-modal .credit-logo{width:80%;max-height:20cqw;object-fit:contain;margin:2cqw auto;display:block}
