:root{color-scheme:dark;--bg:#0a1218;--bg2:#0e1a23;--panel:#14212b;--panel2:#192a36;--line:#2c3a47;--line2:#3a4e60;--text:#ecede7;--muted:#94a4b2;--accent:#e0bc76;--accent2:#f5d799;--accent3:#9c7236;--danger:#ff8c73;--success:#79d6a6}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:radial-gradient(ellipse at top,#14242f 0%,var(--bg) 65%);color:var(--text);font:14px/1.5 Tahoma,Arial,sans-serif;min-height:100vh}button,input,select{font:inherit;color:inherit;border-radius:3px;border:1px solid var(--line2);min-height:42px;background:var(--panel2)}button{cursor:pointer;padding:9px 14px;transition:background .12s,border-color .12s,transform .08s}button:hover{background:#26394a;border-color:var(--accent3)}button:active{transform:translateY(1px)}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:disabled{opacity:.4;cursor:not-allowed}input,select{padding:10px 12px;width:100%;margin-top:8px;background:var(--bg2)}label{display:block;font-size:14px;color:#c8d0d4}.primary{color:#1a1308;background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:var(--accent3);font-weight:bold;text-shadow:0 1px 0 #fff8}.primary:hover{background:linear-gradient(180deg,#ffe3a8,#f5d799);border-color:#b08640}.secondary{background:linear-gradient(180deg,#1f2e3a,#192630);border-color:#3a4d5d}.quiet{background:transparent;color:#b1bec8;border-color:#384552}.danger{color:#ffb0a4;border-color:#7a3d34;background:#3a2520}.danger:hover{background:#5a302a;border-color:#a04a3f}.muted{color:var(--muted)}.subtle{font-size:12px;color:var(--muted);line-height:1.7}.eyebrow{font-size:11px;letter-spacing:2.5px;font-family:Arial,sans-serif;color:var(--accent);text-transform:uppercase}.brand{display:flex;align-items:center;gap:12px;font-family:Arial,sans-serif;letter-spacing:2px;color:var(--text);text-decoration:none;font-size:20px;font-weight:900}.brand b{font-weight:400;color:#aebcc8}.mark{color:var(--accent);font-style:italic;font-size:38px;line-height:1;border:1px solid #7d7053;padding:2px 9px 2px 3px;background:linear-gradient(180deg,#1c252d,#0e161c)}.lobbyHeader{height:88px;display:flex;align-items:center;gap:30px;padding:0 5vw;border-bottom:2px solid var(--line);background:linear-gradient(180deg,#14242f 0%,#0e1820 100%);box-shadow:0 4px 20px #000a}.version{font-size:11px;letter-spacing:2px;color:#b5bec8}.version i{font-style:normal;color:var(--accent);border:1px solid #514936;padding:4px 6px;margin-left:10px}.connection{margin-left:auto;font-size:12px;color:#a9b7bd}.lobbyContent{max-width:1460px;margin:auto;padding:36px 5vw 24px}.heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}h1{font-size:30px;font-weight:500;margin:8px 0;line-height:1.4}h1 span{font-size:14px;color:var(--muted);display:inline-block;margin-left:20px}.factionCards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:28px}.factionCard{height:250px;padding:0;position:relative;overflow:hidden;text-align:left;border-color:#34414c;border-radius:5px;background-image:url('assets/factions.webp');background-size:200% 200%;transition:transform .15s,box-shadow .15s;box-shadow:0 4px 12px #0006}.factionCard:hover{transform:translateY(-2px);box-shadow:0 8px 24px #000a;border-color:var(--accent3)}.factionCard[data-faction='0']{background-position:0 0}.factionCard[data-faction='1']{background-position:100% 0}.factionCard[data-faction='2']{background-position:0 100%}.factionCard[data-faction='3']{background-position:100% 100%}.factionCard:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#081019 1%,#0a1217bb 24%,transparent 74%)}.factionCard.chosen{outline:2px solid var(--accent);outline-offset:3px}.factionCard .chosenBadge{position:absolute;top:12px;right:12px;background:#101a22d9;border:1px solid #e0bc76;padding:4px 8px;color:var(--accent);font-size:11px;display:none}.factionCard.chosen .chosenBadge{display:block}.factionCopy{position:absolute;bottom:17px;left:18px;right:12px}.factionCopy span{font:10px Arial;letter-spacing:1.8px;color:#d9c696}.factionCopy strong{display:block;font-size:22px;margin:4px 0}.factionCopy small{color:#b7c1c9;font-size:12px}.setupGrid{display:grid;grid-template-columns:2.2fr 1fr;gap:22px}.panel{background:linear-gradient(160deg,#1a2734 0%,#11202a 60%,#0d1822 100%);border:1px solid var(--line);border-radius:6px;padding:25px;box-shadow:0 6px 24px #0006,inset 0 1px 0 #ffffff05}.panelTitle{display:flex;align-items:center;gap:14px;margin-bottom:20px;padding-bottom:14px;border-bottom:1px solid var(--line)}.panelTitle>span{font:13px monospace;color:var(--accent);padding:7px;border:1px solid #4e4738;background:#1a1408}h2{font-size:18px;margin:0}.fieldrow{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.mapHeader{display:flex;justify-content:space-between;margin:22px 0 12px}.mapHeader .muted{font-size:12px}.mapCards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mapCard{text-align:left;padding:0 0 12px;overflow:hidden;background:linear-gradient(180deg,#0c151d,#08131a);transition:transform .12s,box-shadow .12s;box-shadow:0 3px 10px #0005;cursor:pointer}.mapCard:hover{transform:translateY(-1px);box-shadow:0 6px 20px #0008;border-color:var(--accent3)}.mapCard canvas{display:block;width:100%;height:100px}.mapCard strong,.mapCard small{display:block;margin:8px 12px 0}.mapCard strong{font:14px Arial}.mapCard small{color:var(--muted);font-size:11px}.mapCard.chosen{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent),0 4px 14px #0008}.actions{display:flex;gap:12px;margin:22px 0 14px}.actions .primary{min-width:240px}.joinPanel>p{color:var(--muted);font-size:14px;line-height:1.8}.joinPanel #joinCode{font:28px monospace;letter-spacing:8px;text-transform:uppercase;text-align:center;background:#08131c;border:2px solid var(--line2);padding:14px 12px}.joinPanel #joinCode:focus{border-color:var(--accent);box-shadow:0 0 0 3px #e0bc7633}.joinPanel #joinRoom{width:100%;margin-top:15px;min-height:50px;font-size:16px}.rules{border-top:1px solid var(--line);margin-top:26px;padding-top:22px}.rules p{font-size:13px;color:#a9b7c1;line-height:1.9}.lobbyFooter{display:flex;justify-content:space-between;color:#6e8191;font-size:11px;letter-spacing:.6px;margin-top:28px}.roomHeader{display:flex;align-items:center;gap:18px;padding-bottom:22px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#14232f,#101d27);margin:-25px -25px 22px;padding:22px 25px;border-radius:6px 6px 0 0}.roomHeader h2{font-size:23px;margin:8px 0}.codeButton{margin-left:auto;font:26px monospace;letter-spacing:6px;color:var(--accent);background:linear-gradient(180deg,#1a2530,#0d1721);border:2px solid var(--line2);padding:8px 18px;box-shadow:inset 0 1px 0 #ffffff08}.codeButton:hover{border-color:var(--accent);background:linear-gradient(180deg,#1f2d3a,#142130)}.playersHead,.playerRow{display:grid;grid-template-columns:1.4fr 1.2fr .7fr .8fr;gap:20px;align-items:center}.playersHead{color:var(--muted);font-size:12px;padding:20px 14px 10px;text-transform:uppercase;letter-spacing:1px}.playerRow{min-height:74px;border:1px solid var(--line);background:linear-gradient(180deg,#0f1c27,#0a141d);margin:8px 0;padding:10px 14px;border-radius:4px;transition:border-color .12s,box-shadow .12s}.playerRow:hover{border-color:#3a4e60;box-shadow:0 2px 12px #0005}.playerRow select{margin:0;background:#0a141d}.playerName{font-size:16px}.playerName i{width:12px;height:12px;display:inline-block;margin-right:10px;border-radius:50%;box-shadow:0 0 6px currentColor}.playerName small{display:block;margin-left:22px;font-size:11px;color:var(--muted)}.readyLabel{color:var(--accent2);font-size:13px}.playerRow.empty{color:#6c7d8a;border-style:dashed;background:#0a121a}.roomActions{display:flex;gap:12px;justify-content:flex-end;margin-top:24px}.roomActions #addBot{margin-right:auto}.roomActions #begin{min-width:180px}.matchHeader{height:70px;display:flex;align-items:center;gap:15px;padding:0 20px;border-bottom:1px solid var(--line)}.matchHeader .brand{font-size:15px}.matchHeader .mark{font-size:30px}.resources{display:flex;gap:28px;margin-left:auto}.resources span{color:var(--muted);font-size:12px}.resources b{font:18px monospace;color:var(--text);margin-left:8px}#networkState{font:11px monospace;color:#b3c5b4}main{display:grid;grid-template-columns:1fr 300px;height:calc(100dvh - 70px)}.battle{position:relative;overflow:hidden;background:#151f1c}#game{display:block;width:100%;height:100%;touch-action:none}.mission{position:absolute;top:22px;left:24px;display:flex;flex-direction:column;pointer-events:none;text-shadow:0 2px 8px #000}.mission strong{font-size:16px;margin:5px 0}.mission #clock{font:15px monospace}.mapwrap{position:absolute;bottom:22px;left:24px;padding:6px;background:#081219e8;border:1px solid #697065;box-shadow:0 4px 15px #0008}.mapwrap span{display:block;font:10px monospace;text-align:center;color:#b7c2bf;padding-top:4px}#mini{width:150px;height:150px;display:block;cursor:crosshair}.viewtools{position:absolute;right:18px;bottom:22px;display:flex;gap:5px}.viewtools button{background:#101c24e8}.hint{position:absolute;bottom:4px;left:200px;color:#b4bca6;font-size:11px;pointer-events:none}aside{background:var(--panel);border-left:1px solid var(--line);overflow-y:auto;padding:14px}.commanderPortrait{height:110px;background-image:url('assets/factions.webp');background-size:200% 200%;position:relative;margin:-14px -14px 12px}.commanderPortrait>div{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:15px;background:linear-gradient(0deg,#101924,transparent)}.commanderPortrait h2{font:600 16px Arial;margin-top:5px}.scoreboard{font-size:12px;border-bottom:1px solid var(--line);padding-bottom:10px}.scoreline{display:flex;gap:6px;margin:4px 0}.scoreline b{font-weight:400;max-width:140px;overflow:hidden;text-overflow:ellipsis}.scoreline span:last-child{margin-left:auto;color:var(--muted)}.sectiontitle{display:flex;justify-content:space-between;margin:14px 0 8px;font-size:14px}.sectiontitle span{font:10px monospace;color:var(--muted)}.cards{display:grid;grid-template-columns:1fr 1fr;gap:6px}.card{min-height:64px;padding:8px;text-align:left;background:#172630}.card strong{display:block;font-size:13px}.card span{display:block;font:12px monospace;color:var(--accent);margin-top:5px}.card small{font-size:11px;color:var(--muted)}.card.active,.commands button.active{border-color:var(--accent);background:#3a3528}.queue{display:flex;align-items:center;justify-content:space-between;padding:9px 0;font-size:11px;color:var(--muted)}.queue button{min-height:25px;height:25px;padding:0 8px}.selection{border-top:1px solid var(--line);padding-top:10px}.selection strong{display:block;font-size:13px;margin:0 0 10px}.commands{display:grid;grid-template-columns:1fr 1fr;gap:6px}.commands button{font-size:13px;padding:5px}#help{width:100%;margin-top:12px}#toast{position:fixed;z-index:10;bottom:24px;left:50%;transform:translateX(-50%);background:#0c1725f5;border:1px solid #917951;box-shadow:0 8px 30px #0007;max-width:90%;padding:12px 24px;pointer-events:none;opacity:0;text-align:center}dialog{color:var(--text);background:linear-gradient(160deg,#1a2734,#11202a 50%,#0c1822);border:2px solid #8e7956;border-radius:6px;padding:30px;max-width:650px;width:calc(100% - 30px);max-height:90dvh;overflow-y:auto;box-shadow:0 20px 100px #000b,inset 0 1px 0 #ffffff0a}dialog::backdrop{background:#030b10c9;backdrop-filter:blur(6px)}dialog h2{font-size:25px;margin:12px 0;color:var(--accent2)}dialog p,dialog li{font-size:15px;color:#c5d1d8;line-height:1.8}dialog li{margin:10px 0}dialog button{margin:14px 5px 0 0}dialog .eyebrow{font-size:12px;letter-spacing:3px;color:var(--accent)}#result{text-align:center}#result h1{font:900 50px Arial;color:var(--accent);text-shadow:0 0 30px #e0bc76aa,0 4px 12px #000a}#result p{color:#c5d1d8}#resumeRoom{width:100%;margin-top:12px}@media(max-width:1000px){.lobbyContent{padding:25px}.lobbyHeader{padding:0 25px}.factionCards{gap:10px}.factionCard{height:220px}.factionCopy{left:10px;bottom:12px}.factionCopy small{font-size:11px}.setupGrid{grid-template-columns:1.7fr 1fr}.panel{padding:18px}.brand{font-size:16px}.version{display:none}.resources{gap:14px}.matchHeader{padding:0 10px}main{grid-template-columns:1fr 250px}.hint{display:none}#mini{width:110px;height:110px}.mission{top:14px;left:14px}.mapwrap{left:14px;bottom:65px}.matchHeader .brand b{display:none}}@media(max-width:700px){.lobbyHeader{height:68px;padding:0 16px}.brand{font-size:15px;gap:8px}.mark{font-size:29px}.connection{font-size:10px}.lobbyContent{padding:24px 16px}.heading{align-items:flex-start;gap:8px}.heading h1{font-size:23px}.heading h1 span{display:block;margin:5px 0;font-size:12px}.heading .eyebrow{font-size:9px}.heading button{font-size:11px;padding:7px;min-height:36px}.factionCards{grid-template-columns:1fr 1fr;gap:13px}.factionCard{height:205px}.factionCopy strong{font-size:20px}.factionCopy span{font-size:9px}.setupGrid{grid-template-columns:1fr}.mapCards{gap:5px}.mapCard canvas{height:80px}.mapCard strong,.mapCard small{margin-left:7px;margin-right:5px}.mapCard strong{font-size:12px}.mapCard small{font-size:10px}.mapHeader .muted{display:none}.actions{flex-direction:column}.fieldrow{gap:10px}.lobbyFooter{display:block;line-height:2}.lobbyFooter span{display:block}.roomHeader{flex-wrap:wrap;gap:10px}.codeButton{font-size:20px}.roomHeader>div{width:100%}.codeButton{margin-left:0}.roomHeader #leaveRoom{margin-left:auto}.playersHead{display:none}.playerRow{grid-template-columns:1fr 1fr;gap:8px;font-size:13px}.playerName{font-size:14px}.playerRow select{font-size:13px;padding:6px}.roomActions{flex-wrap:wrap}.roomActions button{flex:1}.roomActions #addBot{margin:0}.matchHeader{height:58px;gap:6px}.matchHeader .brand>span:last-child{display:none}.resources{gap:10px}.resources span{font-size:10px;display:flex;flex-direction:column;align-items:center}.resources b{font-size:13px;margin:0}.matchHeader button{padding:0 8px;font-size:12px;min-height:36px}#networkState{font-size:9px;max-width:40px}main{height:calc(100dvh - 58px);display:flex;flex-direction:column}.battle{flex:1;min-height:220px}aside{height:246px;flex-shrink:0;display:grid;grid-template-columns:1fr 1fr;gap:6px;align-content:start;padding:9px;border-top:1px solid var(--line)}.commanderPortrait,.scoreboard{display:none}.sectiontitle{grid-row:1;margin:0;font-size:12px}.sectiontitle span{font-size:9px}.cards{grid-row:2}.card{min-height:52px;padding:5px}.card strong{font-size:12px}.card span{font-size:11px;margin:0}.queue{grid-column:1/-1;padding:0}.selection{grid-column:1/-1;padding:4px 0}.selection strong{font-size:11px;margin:0 0 5px}.commands{grid-template-columns:repeat(4,1fr)}.commands button{min-height:34px;font-size:12px}#help{grid-column:1/-1;margin:0;min-height:30px;font-size:12px}.mapwrap{bottom:12px;left:10px;padding:4px}#mini{width:75px;height:75px}.mapwrap span{display:none}.mission strong{font-size:12px}.mission .eyebrow{font-size:9px}.mission #clock{font-size:11px}.viewtools{bottom:12px;right:10px}.viewtools button{font-size:12px;min-height:36px;padding:5px 10px}#toast{font-size:12px;bottom:260px;padding:9px 13px}#lobby:not([hidden])~#toast{bottom:20px}}
.factionCard:hover{background-image:url('assets/factions.webp');background-size:200% 200%}
/* War Room 0.3 */
.factionCards{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:22px}.factionCard{height:210px}.factionCopy{left:12px;bottom:12px}.factionCopy strong{font-size:21px}.factionCopy span{font-size:9px;letter-spacing:1.3px}.factionCopy small{font-size:12px}.identityBar{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:0 0 28px;padding:16px 20px;border:1px solid var(--line);background:#111c26}.colorChoices{display:flex;gap:10px;margin-top:9px}.colorChip{--chip:#fff;background:var(--chip)!important;color:#071017;border:2px solid transparent;min-height:30px;width:30px;height:30px;padding:0;border-radius:50%;font-size:19px;font-weight:bold}.colorChip.chosen{outline:2px solid #f2e2b7;outline-offset:3px}.colorChip:disabled{opacity:.2;cursor:not-allowed}.roleDetails{max-width:540px;text-align:right}.roleDetails strong,.roleDetails span{display:block}.roleDetails strong{font-size:16px;color:#e1c68e}.roleDetails span{font-size:13px;color:#a8b7c4;margin-top:5px}.roomSize{max-width:240px}.mapCards{grid-template-columns:repeat(4,minmax(0,1fr))}.playersHead,.playerRow{grid-template-columns:1.25fr 1.05fr .7fr .7fr .8fr;gap:12px}.commandTabs{display:flex;gap:4px;margin-bottom:10px}.commandTabs button{flex:1;font-size:12px;padding:6px;min-height:36px}.commandTabs .active{border-color:var(--accent);background:#3c3528}.commandContent{flex:1;min-height:160px;overflow-y:auto;padding-right:3px}.commandContent .sectiontitle{margin-top:0}aside{display:flex;flex-direction:column;overflow:hidden}.scoreboard{max-height:135px;overflow-y:auto;flex-shrink:0;margin-bottom:10px}.commanderPortrait{flex-shrink:0}.selection,.queue{flex-shrink:0}.card>small{display:block;font-size:11px;color:#91a6ad;margin-top:6px;line-height:1.5}.card strong{font-size:13px}.mission .eyebrow{color:#d6ba7c}.battle{background:#04090e}
@media(max-width:1000px){.factionCards{grid-template-columns:repeat(5,minmax(0,1fr))}.factionCard{height:180px}.factionCopy strong{font-size:17px}.factionCopy small{font-size:10px}.factionCopy span{font-size:8px;letter-spacing:.3px}.mapCards{grid-template-columns:1fr 1fr}.identityBar{align-items:flex-start}.roleDetails{max-width:320px}}
@media(max-width:700px){.factionCards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.factionCard{height:190px}.factionCopy strong{font-size:20px}.factionCopy small{font-size:12px}.factionCopy span{font-size:10px}.identityBar{display:block;padding:15px}.roleDetails{text-align:left;margin-top:16px}.roleDetails span{font-size:12px}.colorChoices{gap:9px}.colorChip{width:27px;height:27px;min-height:27px}.playerRow{grid-template-columns:1fr 1fr;gap:10px}.playerName{grid-column:1/-1}.mapCards{grid-template-columns:1fr 1fr}aside{display:flex;height:278px;gap:0;overflow:hidden}.commandTabs{margin-bottom:6px}.commandTabs button{min-height:31px}.commandContent{min-height:65px;padding-bottom:3px}.commandContent .sectiontitle{display:none}.commandContent .cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.card{min-height:54px}.card strong{font-size:11px}.card>small{font-size:9px;line-height:1.2}.queue{min-height:24px}.selection{padding-top:3px}.commands{display:grid;grid-template-columns:repeat(4,1fr)}#help{margin-top:3px;min-height:27px}#toast{bottom:290px}.commanderPortrait,.scoreboard{display:none}#lobby:not([hidden])~#toast{bottom:20px}}
/* Battle controls stay beside the battlefield, with a compact production panel on touch screens. */
main{grid-template-columns:minmax(0,1fr) 300px}.commandDock{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);width:min(560px,calc(100% - 36px));padding:10px;background:#0b1824f2;border:1px solid #7b7257;box-shadow:0 8px 28px #0008;border-radius:6px}.selectionSummary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.selectionSummary strong{font-size:14px;line-height:1.4}.selectionSummary button{min-height:30px;padding:3px 9px;font-size:13px}.commands{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.commands button{min-height:48px;font-size:14px;padding:5px 3px}.commands button.active{background:#655435;border-color:#ffdf96;box-shadow:inset 0 0 0 1px #ffdf96}kbd{display:inline-block;font:11px Arial;color:#aab6c0;border:1px solid #55616c;border-radius:3px;padding:1px 3px}.actionGuide{position:absolute;top:20px;right:18px;max-width:min(380px,48%);display:flex;flex-direction:column;gap:4px;background:#091724e8;border:1px solid #4d5d69;border-left:3px solid var(--accent);padding:10px 14px;pointer-events:none}.actionGuide strong{font-size:15px;color:#f0d79f}.actionGuide span{font-size:13px;color:#c0cdd5;line-height:1.5}.mapwrap{bottom:145px}.viewtools{bottom:145px}.hint{bottom:126px;left:50%;transform:translateX(-50%);width:max-content;max-width:90%;text-align:center;font-size:12px}.panelHandle{display:none}.buildConfirm{position:absolute;bottom:135px;left:50%;transform:translateX(-50%);width:min(400px,calc(100% - 28px));background:#122331f5;border:1px solid #c6ad76;padding:12px;z-index:2;box-shadow:0 6px 25px #0008}.buildConfirm span{display:block;font-size:14px;margin-bottom:9px}.buildConfirm>div{display:flex;gap:8px}.buildConfirm button{flex:1;min-height:46px}.card strong{font-size:14px}.card>small{font-size:12px}#toast{bottom:145px}.helpControls h3{font-size:17px;color:var(--accent);margin-top:24px}.helpControls p{font-size:15px}.commandTabs button{font-size:14px;min-height:42px}
@media(max-width:900px){main{display:flex;flex-direction:column;height:calc(100dvh - 58px)}.matchHeader{height:58px;padding:0 8px;gap:6px}.matchHeader .brand{display:none}.resources{margin-right:auto;gap:12px}.resources span{font-size:12px}.resources b{font-size:14px}.matchHeader button{min-height:38px;font-size:13px;padding:4px 9px}#networkState{font-size:11px}.battle{flex:1;min-height:0}aside{height:62px;flex-shrink:0;padding:8px 10px;border-left:0;border-top:1px solid var(--line);display:flex;overflow:hidden;gap:0}.panelHandle{display:flex;align-items:center;justify-content:space-between;min-height:44px;flex-shrink:0}.panelHandle strong{font-size:14px}.panelHandle button{font-size:14px;min-height:42px;padding:6px 14px}.commanderPortrait,.scoreboard{display:none}aside .commandTabs,aside .commandContent,aside .queue,aside #help{display:none}#match.panel-open aside{height:min(290px,46dvh)}#match.panel-open aside .commandTabs{display:flex;margin:5px 0 7px;flex-shrink:0}#match.panel-open aside .commandContent{display:block;min-height:0;flex:1}#match.panel-open aside .queue{display:flex;font-size:12px;min-height:28px}#match.panel-open aside #help{display:block;min-height:30px;margin:3px 0;font-size:13px}.commandContent .cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.card{min-height:62px;padding:8px}.card strong{font-size:14px}.card span{font-size:12px}.card>small{font-size:12px;line-height:1.4}.commandDock{bottom:10px;width:calc(100% - 20px);padding:8px}.commands{gap:4px}.commands button{min-height:48px;font-size:13px}.commands kbd{display:none}.selectionSummary{margin-bottom:6px}.selectionSummary strong{font-size:13px}.actionGuide{top:60px;left:10px;right:auto;max-width:calc(100% - 20px);padding:7px 10px}.actionGuide strong{font-size:14px}.actionGuide span{font-size:12px}.mission{top:9px;left:10px}.mission strong{font-size:12px;margin:0}.mission .eyebrow{font-size:9px}.mission #clock{position:absolute;left:calc(100vw - 72px);top:0;font-size:12px}.mapwrap{bottom:125px;left:10px;padding:4px}#mini{width:72px;height:72px}.mapwrap span{display:none}.viewtools{bottom:125px;right:10px}.viewtools button{min-height:42px;padding:6px 10px;font-size:14px}.hint{display:none}.buildConfirm{bottom:126px}#toast{bottom:182px;font-size:14px;max-width:90%;padding:10px 14px}#lobby:not([hidden])~#toast{bottom:20px}}
@media(max-height:550px) and (max-width:900px){.actionGuide{top:8px;left:230px;max-width:calc(100% - 240px)}.actionGuide span{display:none}.mission .eyebrow{display:none}.mission #clock{display:none}.commandDock{left:auto;right:10px;transform:none;width:min(520px,calc(100% - 112px))}.mapwrap{bottom:14px}.viewtools{bottom:114px}#match.panel-open aside{height:42dvh}.buildConfirm{bottom:114px}.selectionSummary strong{font-size:12px}}
.buildLegend{position:absolute;top:128px;right:18px;max-width:300px;display:flex;flex-direction:column;gap:5px;padding:10px 12px;background:#0c1c27ed;border:1px solid #69816d;pointer-events:none}.buildLegend span{font-size:14px;font-weight:bold}.validKey{color:#a9edc7}.invalidKey{color:#ffa991}.buildLegend small{font-size:12px;line-height:1.6;color:#c3cbd0}@media(max-width:900px){.buildLegend{top:118px;left:10px;right:auto;max-width:260px;padding:6px 9px;gap:2px}.buildLegend span{font-size:12px}.buildLegend small{font-size:11px}}@media(max-height:550px) and (max-width:900px){.buildLegend{top:44px;left:auto;right:10px;max-width:230px}.buildLegend small{display:none}}
/* Production pictures and a queue that remains visible beside the battlefield. */
.card .itemPicture,.queueItem .itemPicture{display:block;position:relative;width:100%;height:76px;background-repeat:no-repeat;background-color:#0b151e;border-radius:3px;margin:0 0 8px;overflow:hidden;font:inherit}.itemPicture i{position:absolute;right:4px;bottom:4px;min-width:20px;text-align:center;background:#0a1724e8;border:1px solid #987e4c;color:#f4d18e;font:bold 14px Arial;font-style:normal;border-radius:3px}.card strong{line-height:1.45}.card:disabled{opacity:.58}.productionQueue{flex-shrink:0;border-top:1px solid var(--line);padding-top:6px;margin-top:8px}.queue{gap:8px;min-height:38px;font-size:13px;padding:4px 0}.queue strong{font-weight:400;color:#e1d3b3}.queue button{font-size:12px;min-height:34px;height:auto;padding:4px 7px;white-space:nowrap}.queueItems{max-height:164px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;display:flex;flex-direction:column;gap:5px}.queueItem{display:flex;gap:9px;padding:6px;background:#10202b;border:1px solid #2d414f;border-radius:4px;min-height:62px;flex-shrink:0}.queueItem.current{border-color:#8d7951}.queueItem .itemPicture{width:48px;height:48px;flex-shrink:0;margin:0}.queueItem>div{flex:1;min-width:0}.queueItem strong{display:block;font-size:13px;line-height:1.4}.queueItem span:not(.itemPicture){display:block;font-size:12px;color:#b3c1c9}.queueItem progress{display:block;width:100%;height:5px;margin-top:5px;accent-color:#e0bc76}.queueEmpty{font-size:12px;color:#9dafba;margin:4px 0 8px}.panPad{position:absolute;right:12px;bottom:196px;display:none;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,42px);gap:4px;touch-action:none;user-select:none}.panPad button{padding:0;min-height:42px;background:#102432ee;border-color:#637886;font-size:17px;touch-action:none}.panPad button:active{background:#635235;border-color:#e0bc76}#pan-up{grid-column:2}#pan-left{grid-column:1;grid-row:2}#pan-down{grid-column:2;grid-row:2}#pan-right{grid-column:3;grid-row:2}#queueBadge{font-size:12px;color:#e0bc76;margin-left:6px}
@media(max-width:900px){.panPad{display:grid;bottom:180px;grid-template-columns:repeat(3,40px);grid-template-rows:repeat(2,40px)}aside{height:144px}.productionQueue{margin:0;padding:0;border:0;min-height:0}aside .queue,#match.panel-open aside .queue{display:flex;min-height:29px;font-size:12px}.queue button{min-height:28px;font-size:11px}.queueItems{flex-direction:row;max-height:58px;overflow-x:auto;overflow-y:hidden;padding-bottom:3px}.queueItem{min-width:176px;max-width:210px;min-height:52px;padding:4px;gap:6px}.queueItem .itemPicture{width:42px;height:42px}.queueItem strong{font-size:12px}.queueItem span:not(.itemPicture){font-size:11px}.queueEmpty{white-space:normal;margin:3px 0}.card .itemPicture{height:68px}.card strong{font-size:13px}.card>small{font-size:12px}#match.panel-open aside{height:min(400px,52dvh)}#match.panel-open .queueItems{max-height:116px;flex-direction:column;overflow-y:auto;overflow-x:hidden}#match.panel-open .queueItem{max-width:none;min-height:52px}.commandContent{overscroll-behavior:contain}}
@media(max-height:550px) and (max-width:900px){aside{height:108px}.panelHandle{min-height:36px}.panelHandle button{min-height:32px}.queueItems{max-height:40px}.queueItem{min-height:36px}.queueItem .itemPicture{height:30px;width:30px}.queueItem progress{margin-top:2px}.panPad{left:12px;right:auto;top:56px;bottom:auto;grid-template-columns:repeat(3,34px);grid-template-rows:repeat(2,34px)}.panPad button{min-height:34px}.card .itemPicture{height:48px}#match.panel-open .queueItems{max-height:70px}}
@media(pointer:coarse) and (min-width:901px){.panPad{display:grid}}
.teamSetup{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.teamSetup label{min-width:150px}.teamSetup button{align-self:flex-end}.mapCards{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:900px){.mapCards{grid-template-columns:repeat(2,minmax(0,1fr))}.teamSetup .subtle{width:100%}}

.armyPreviewPanel{display:flex;align-items:center;gap:24px;background:#10212a;border:1px solid #29404a;border-radius:12px;padding:12px;margin:16px 0}.armyPreviewPanel canvas{width:min(70%,600px);height:auto}.armyPreviewPanel label{flex:1}.armyPreviewPanel small{display:block;color:#99adb1;margin-top:8px}.factionCard{min-height:135px}@media(max-width:700px){.factionCards{display:flex;overflow-x:auto;gap:10px;padding-bottom:10px}.factionCard{flex:0 0 145px;min-height:155px}.armyPreviewPanel{flex-direction:column;gap:8px}.armyPreviewPanel canvas{width:100%}.armyPreviewPanel label{width:100%}}

#game,#mini,#armyPreview,.itemPicture,.factionCard{image-rendering:pixelated}.armyPreviewPanel{border-radius:3px}.factionCard{border-radius:3px;background-color:#14232a}.factionCard .factionCopy{background:linear-gradient(transparent,#08151ced)}.itemPicture{border-radius:2px}.buildingPicture{background-repeat:no-repeat}

.warRoomGrid{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(420px,1.4fr);gap:24px;margin-bottom:20px}.preBattleControls,.preBattlePreview{border:1px solid #354653;background:#10202b;padding:20px;min-width:0}.preBattleControls h2,.previewHeader h2{font-size:20px;margin:14px 0}.playModes{display:flex;gap:6px}.playModes button{flex:1;font-size:14px;padding:10px 12px;background:linear-gradient(180deg,#172430,#11202a);transition:all .12s}.playModes button:hover{background:linear-gradient(180deg,#243747,#1a2835);border-color:var(--accent3)}.playModes .chosen{border-color:var(--accent);background:linear-gradient(180deg,#5c4a2d,#3e3120);box-shadow:inset 0 0 12px #e0bc7644}.preBattleControls .factionCards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:12px 0 20px;overflow:visible}.preBattleControls .factionCard{height:108px;min-height:108px;background-size:800% 800%;flex:auto}.preBattleControls .factionCopy{left:4px;right:4px;bottom:4px}.preBattleControls .factionCopy strong{font-size:14px}.preBattleControls .factionCopy span,.preBattleControls .factionCopy small,.preBattleControls .chosenBadge{display:none}.preBattleControls label{margin-top:12px}.previewHeader{display:flex;align-items:center;justify-content:space-between;gap:12px}.previewHeader label{max-width:190px;font-size:14px}#armyPreview{width:100%;height:auto;background:#0d1a23;display:block}.rosterCards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.rosterCard{padding:6px;min-width:0;border:1px solid #354d5c;background:#122734;text-align:center}.rosterCard.chosen{border-color:#ecd49a;background:#3a362b}.rosterCard .itemPicture{height:58px}.rosterCard strong{display:block;font-size:14px;overflow-wrap:anywhere}.rosterCard small{display:block;color:#bed1db;font-size:12px}.unitInspect{margin-top:14px;padding:12px;border-top:1px solid #355361;font-size:14px}.unitInspect strong{font-size:17px;color:#efd6a4}.unitStats{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px;color:#bad2db}.setupGrid.single{grid-template-columns:1fr}.setupGrid.single>.panel{max-width:none}.actions{position:sticky;bottom:0;padding:12px;background:#101d29f5;z-index:2}.identityBar{margin-bottom:18px}@media(max-width:900px){.warRoomGrid{grid-template-columns:1fr}.preBattleControls .factionCards{grid-template-columns:repeat(5,minmax(0,1fr))}.preBattleControls .factionCard{height:96px;min-height:96px}.preBattleControls,.preBattlePreview{padding:14px}.rosterCards{grid-template-columns:repeat(4,minmax(0,1fr))}.rosterCard strong{font-size:13px}.rosterCard .itemPicture{height:44px}.previewHeader h2{font-size:18px}.actions{bottom:0}.matchHeader #graphicsButton{font-size:12px;padding:5px}}

.quickStart{width:100%;margin-top:12px;min-height:48px;font-size:17px}.preBattleControls .fieldrow{align-items:start}.previewHeader select{min-width:135px}

.factionCard{background-image:none!important}.factionPortrait{position:absolute;inset:0;overflow:hidden;pointer-events:none}.factionPortrait img{position:absolute;max-width:none;object-fit:fill;image-rendering:auto}.factionCard:before{z-index:1;background:linear-gradient(0deg,#071019ee,transparent 65%)}.factionCard .factionCopy{z-index:2}.factionCard .chosenBadge{z-index:3}.preBattleControls .factionCard{height:136px;min-height:136px}.preBattleControls .factionCopy{bottom:8px;left:8px}.preBattleControls .factionCopy strong{font-size:14px}.preBattleControls .factionCard .chosenBadge{top:5px;right:5px;padding:2px 5px;font-size:12px}.commanderPortrait{position:relative;background-image:none!important;overflow:hidden}.commanderPortrait>div{position:relative;z-index:2}.commanderPortrait .factionPortrait{opacity:.8}.serverVersion{font-size:12px;color:#c6d7dc;white-space:nowrap}@media(max-width:900px){.preBattleControls .factionCard{height:110px;min-height:110px}.lobbyHeader{flex-wrap:wrap;height:auto;min-height:88px;gap:8px 16px;padding-top:12px;padding-bottom:12px}.serverVersion{margin-left:auto}}

.factionPortrait svg{display:block;width:100%;height:100%}

/* Phone layout: a clearer battlefield, controls within thumb reach, and a side panel in landscape. */
#match{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
button,select,.card{touch-action:manipulation}
#mini{touch-action:none}
/* Battle alarm: the minimap flashes and the battlefield edge glows red when the base is hit. */
#mini.alert{box-shadow:0 0 0 2px #ff6a4d,0 0 18px #ff6a4d88;animation:riftAlertPulse .45s ease-in-out 2}
@keyframes riftAlertPulse{0%,100%{box-shadow:0 0 0 2px #ff6a4d,0 0 18px #ff6a4d88}50%{box-shadow:0 0 0 3px #ffb199,0 0 30px #ff6a4dcc}}
.battle::after{content:none;display:none;position:absolute;inset:0;pointer-events:none;opacity:0;box-shadow:inset 0 0 90px #ff4a2a99,inset 0 0 26px #ff8a6ab3;transition:opacity .25s ease}
@media(prefers-reduced-motion:reduce){#mini.alert{animation:none}}
@media(max-width:900px){.matchHeader{height:48px;padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left))}
.matchHeader button{min-height:36px;padding:3px 10px}
main{height:calc(100dvh - 48px)}
.panPad{display:none}
.mission strong{display:none}
.actionGuide{top:30px;padding:5px 9px}
.actionGuide strong{font-size:13px}
.actionGuide span{font-size:11.5px;line-height:1.4}
.buildLegend{top:96px}
#mini{width:92px;height:92px}
.mapwrap,.viewtools{bottom:122px}
.commands button{min-height:46px}
#match.placing .commandDock,#match.placing .mapwrap,#match.placing .viewtools{display:none}
#match.placing .buildConfirm{bottom:10px}
aside{height:auto;padding:4px 10px calc(6px + env(safe-area-inset-bottom))}
.panelHandle{min-height:40px}
.panelHandle button{min-height:38px}
#match:not(.panel-open) .queueEmpty{display:none}
#match:not([hidden])~#toast{top:calc(54px + env(safe-area-inset-top));bottom:auto;left:10px;right:10px;transform:none;max-width:none;font-size:13px;padding:8px 12px}
.card .itemPicture{height:54px}
.card>small{font-size:11px;line-height:1.35}
}
@media(max-height:520px) and (orientation:landscape){.matchHeader{height:40px;gap:8px;padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left))}
.matchHeader .brand{display:none}
.resources{margin-left:0;margin-right:auto;gap:14px}
.resources span{font-size:11px;display:inline}
.resources b{font-size:13px;margin-left:5px}
.matchHeader button{min-height:32px;padding:2px 10px;font-size:12px}
#networkState{font-size:10px}
main{display:flex;flex-direction:row;height:calc(100dvh - 40px)}
.battle{flex:1;min-width:0;min-height:0}
#match aside,#match.panel-open aside{height:auto;width:clamp(190px,29vw,270px);flex-shrink:0;display:flex;flex-direction:column;overflow:hidden;border-top:0;border-left:1px solid var(--line);padding:6px max(8px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) 8px}
#match .panelHandle{display:none}
#match aside .commandTabs{display:flex;margin:0 0 6px;flex-shrink:0;gap:3px}
#match aside .commandTabs button{min-height:32px;font-size:12px;padding:2px}
#match aside .commandContent{display:block;flex:1;min-height:0}
#match aside .queue{display:flex;min-height:26px;font-size:11px}
#match aside #help{display:block;min-height:28px;margin:3px 0 0;padding:2px;font-size:12px}
.commandContent .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.card{min-height:0;padding:5px}
.card .itemPicture{height:40px;margin-bottom:3px}
.card strong{font-size:12px}
.card span{font-size:11px}
.card>small{display:none}
#match .queueItems,#match.panel-open .queueItems{flex-direction:column;max-height:84px;overflow-x:hidden;overflow-y:auto}
#match .queueItem{max-width:none;min-width:0;min-height:36px}
#match .commandContent .sectiontitle,#match .queueEmpty{display:none}
.commandDock{left:8px;right:8px;bottom:6px;width:auto;transform:none;padding:5px;display:flex;align-items:center;gap:5px}
.selectionSummary{margin:0;flex-shrink:0}
.selectionSummary strong{display:none}
.selectionSummary button{min-height:40px}
.commands{flex:1;gap:4px}
.commands button{min-height:40px;font-size:12px;padding:2px}
.mission{top:6px;left:auto;right:8px}
.mission .eyebrow,.mission strong{display:none}
.mission #clock{display:block;position:static}
.actionGuide{top:6px;left:8px;max-width:calc(100% - 80px)}
.actionGuide span{display:none}
.buildLegend{top:40px;left:8px;right:auto}
.buildLegend small{display:none}
.mapwrap,.viewtools{bottom:62px}
.mapwrap{left:8px}
.viewtools{right:8px}
#mini{width:78px;height:78px}
.viewtools button{min-height:36px;padding:3px 10px}
#match.placing .buildConfirm{bottom:6px;width:min(400px,calc(100% - 16px))}
#match:not([hidden])~#toast{top:calc(46px + env(safe-area-inset-top));left:8px;right:calc(clamp(190px,29vw,270px) + 8px);padding:6px 10px}
}

/* HD interface icons from assets/hd (optional). */
.hdIcon{width:20px;height:20px;vertical-align:-4px;margin-right:5px;image-rendering:auto;pointer-events:none}
@media(max-width:700px){.resources .hdIcon{display:none}.commands .hdIcon{display:block;margin:0 auto 2px}}

/* Title screen: animated armies behind a large logo and the main menu. */
.titleScreen{position:fixed;inset:0;z-index:5;overflow:hidden;background:radial-gradient(ellipse at 30% 40%,#1c2d3a 0%,#0a1218 65%)}
.titleScreen[hidden]{display:none}
#titleScene,#titleVideo{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover}
.titleShade{position:absolute;inset:0;background:linear-gradient(100deg,#05090df2 0%,#05090db0 28%,#05090d30 55%,transparent 75%),linear-gradient(0deg,#05090d99 0%,transparent 30%);pointer-events:none}
.titleMenu{position:absolute;inset:0;width:100%;height:100%;max-width:none;padding:0;margin:0;pointer-events:none;overflow:visible!important;z-index:6;display:block}
.titleLogo{position:absolute;top:max(22px,env(safe-area-inset-top));left:max(28px,env(safe-area-inset-left));display:flex;flex-direction:row;align-items:center;gap:16px;margin:0;padding:0;pointer-events:auto;z-index:10}
.titleLogo img{width:clamp(56px,6.8vw,80px);height:auto;filter:none}
.titleLogo .mark{font-size:clamp(48px,5vw,72px);line-height:1}
.titleLogo h1{margin:0;white-space:nowrap;font-family:'Cinzel Decorative',Cinzel,Georgia,serif!important;font-weight:900!important;font-size:clamp(24px,3.2vw,38px);letter-spacing:3px;line-height:1;background:linear-gradient(180deg,#fff6dc 0%,#f3d48c 38%,#c08a3a 62%,#f0cf86 100%);-webkit-background-clip:text;background-clip:text;color:transparent!important;filter:none!important;-webkit-text-stroke:.5px #5a3a12}
.titleLogo h1 b{display:inline-block;font-family:Cinzel,Georgia,serif!important;font-weight:800!important;letter-spacing:.38em!important;margin-left:6px;background:linear-gradient(180deg,#e9fbff,#7fe3ec 55%,#2fa9b5);-webkit-background-clip:text;background-clip:text;color:transparent!important;-webkit-text-stroke:0}
.titleLogo p{margin:6px 0 0;font-family:Rajdhani,Kanit,sans-serif!important;font-weight:700;font-size:clamp(8px,1vw,11px);letter-spacing:.35em;color:#d9c38f!important;text-shadow:0 2px 8px #000}
.titleAccountRow{position:absolute;top:max(22px,env(safe-area-inset-top));right:max(28px,env(safe-area-inset-right));display:flex;align-items:center;gap:10px;margin:0;pointer-events:auto;z-index:10}
.accountChip{display:inline-flex;align-items:center;gap:8px;padding:6px 14px;border-radius:999px;background:#140d25cc;border:1px solid #7c6136;box-shadow:0 4px 14px #000a,0 0 12px #dcae5822;color:#ecede7;font:600 13px system-ui,sans-serif;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);cursor:pointer;transition:transform .12s,border-color .12s}
.accountChip:hover{border-color:#dcae58;transform:translateY(-1px)}
#titleOptions{width:40px;height:40px;min-height:40px;border-radius:50%;padding:0;display:inline-flex;align-items:center;justify-content:center;background:#140d25cc;border:1px solid #7c6136;box-shadow:0 4px 14px #000a;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#d7c08b;cursor:pointer;transition:transform .12s,border-color .12s}
#titleOptions:hover{border-color:#dcae58;transform:rotate(30deg)}
#titleOptions svg{width:20px;height:20px}
.titleButtons{position:static;width:auto;margin:0;padding:0}
.titleButtons .quiet{display:none!important}
#titleStart{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:clamp(144px,18vmin,184px);height:clamp(144px,18vmin,184px);aspect-ratio:1/1;border-radius:50%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:12px!important;background:radial-gradient(circle at 50% 35%,#2e1952 0%,#180e30 52%,#0b071a 100%)!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:2.5px solid #f3d48c!important;box-shadow:0 0 32px #9b5cff88,0 0 65px #dcae5844,inset 0 0 22px #dcae5833,inset 0 0 44px #55d3dc22!important;cursor:pointer!important;pointer-events:auto!important;z-index:10;animation:riftOrbPulse 3s ease-in-out infinite!important;transition:transform .22s cubic-bezier(.34,1.56,.64,1),box-shadow .22s ease,border-color .22s ease,opacity .35s ease!important}
#titleStart::before{content:'';position:absolute;inset:-8px;border-radius:50%;border:1.5px dashed #7fe3ec66;box-shadow:0 0 16px #55d3dc33;animation:riftOrbSpin 24s linear infinite;pointer-events:none}
#titleStart::after{content:'';position:absolute;inset:-16px;border-radius:50%;border:1px solid #dcae582e;animation:riftOrbBreathe 3s ease-in-out infinite;pointer-events:none}
#titleStart:hover{transform:translate(-50%,-50%) scale(1.08)!important;border-color:#fff0c7!important;box-shadow:0 0 50px #9b5cffcc,0 0 95px #dcae5877,inset 0 0 32px #dcae5855!important}
#titleStart:active{transform:translate(-50%,-50%) scale(0.95)!important}
#titleStart span{font-family:Cinzel,Rajdhani,Kanit,serif!important;font-size:clamp(16px,2.2vmin,21px)!important;font-weight:900!important;letter-spacing:.16em!important;color:#fff6dc!important;text-shadow:0 0 12px #f3d48c,0 2px 4px #000!important;line-height:1.15!important;pointer-events:none!important}
#titleStart small{font-family:Kanit,system-ui,sans-serif!important;font-size:clamp(10px,1.4vmin,13px)!important;font-weight:400!important;color:#e5ccff!important;letter-spacing:.02em!important;margin-top:5px!important;text-shadow:0 1px 3px #000!important;line-height:1.2!important;pointer-events:none!important}
@keyframes riftOrbSpin{100%{transform:rotate(360deg)}}
@keyframes riftOrbBreathe{0%,100%{transform:scale(1);opacity:.4}50%{transform:scale(1.08);opacity:.85}}
@keyframes riftOrbPulse{0%,100%{box-shadow:0 0 32px #9b5cff88,0 0 65px #dcae5844,inset 0 0 22px #dcae5833,inset 0 0 44px #55d3dc22}50%{box-shadow:0 0 48px #b48affbb,0 0 85px #dcae5866,inset 0 0 32px #dcae5844,inset 0 0 58px #55d3dc33}}
#titleVersion{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));left:max(28px,env(safe-area-inset-left));font-family:Rajdhani,Kanit,monospace;font-size:12px;letter-spacing:2px;color:#8b99a6;z-index:6;display:block;pointer-events:none;margin:0}
.hubHint{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));right:max(28px,env(safe-area-inset-right));font-family:Kanit,system-ui,sans-serif;font-size:clamp(11px,1.2vw,13px);color:#8da2b0;letter-spacing:.02em;z-index:6;pointer-events:none;margin:0}
#riftGuide{display:none!important}
.checkRow{display:flex!important;align-items:center;gap:10px;margin:12px 0}
.checkRow input{width:22px;height:22px;min-height:0}
#optionsDialog{max-width:420px}
#optionsDialog button{margin:6px 6px 0 0}
@media(max-width:700px){
 .titleLogo{left:max(16px,env(safe-area-inset-left));top:max(16px,env(safe-area-inset-top));gap:10px}
 .titleLogo img{width:46px}
 .titleLogo h1{font-size:20px}
 .titleLogo p{font-size:8px;letter-spacing:.2em}
 .titleAccountRow{right:max(16px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));gap:6px}
 .accountChip{padding:4px 10px;font-size:11px}
 #titleOptions{width:34px;height:34px;min-height:34px}
 #titleStart{width:clamp(130px,36vw,156px);height:clamp(130px,36vw,156px)}
 #titleStart span{font-size:15px!important}
 #titleStart small{font-size:10px!important}
 #titleVersion{left:16px;bottom:12px;font-size:10px}
 .hubHint{right:16px;bottom:12px;font-size:10px;max-width:55vw;text-align:right}
}
@media(max-height:540px) and (orientation:landscape){
 .titleLogo img{width:40px}
 .titleLogo h1{font-size:18px}
 .titleLogo p{display:none}
 #titleStart{width:116px;height:116px}
 #titleStart span{font-size:14px!important}
 #titleStart small{font-size:9px!important}
}
@media (max-width:900px),(pointer:coarse){
 #match button,#match .commandTabs button,#match .queue button{min-height:44px;height:auto}
 .viewtools{display:grid;grid-template-columns:repeat(2,minmax(44px,auto));gap:6px}
 #zoomout{grid-column:1;grid-row:1}#zoomin{grid-column:2;grid-row:1}#home{grid-column:1;grid-row:2}#focusArmy{grid-column:2;grid-row:2}
 .viewtools button{font-size:12px;padding:4px 8px}.colorChoices{flex-wrap:wrap}.colorChip{min-height:44px;width:44px;height:44px}input,select{font-size:16px}
 .selectionSummary button{flex-shrink:0}.commandContent{overscroll-behavior:contain}
}
@media(max-width:900px) and (orientation:portrait){
 .matchHeader{height:calc(52px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}main{height:calc(100dvh - 52px - env(safe-area-inset-top))}
 .matchHeader .resources{gap:8px;margin-left:0}.matchHeader button{padding:3px 7px}#networkState{max-width:38px;overflow:hidden}
 .mapwrap,.viewtools{bottom:154px}.commands button{font-size:12px;overflow-wrap:anywhere}.commandContent .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 #match.panel-open .queueItems{max-height:58px;flex-direction:row;overflow-x:auto;overflow-y:hidden}#match.panel-open .queueItem{min-width:176px}
 .preBattleControls .factionCards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-height:520px) and (orientation:landscape){
 .matchHeader{height:calc(48px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}main{height:calc(100dvh - 48px - env(safe-area-inset-top))}
 .commandDock{left:max(8px,env(safe-area-inset-left));bottom:max(6px,env(safe-area-inset-bottom))}.mapwrap,.viewtools{bottom:calc(68px + env(safe-area-inset-bottom))}
 #match aside #help{display:none}#match aside .queueItems{max-height:42px}#match .commandTabs button,#match .commands button{font-size:11px}
}
@media(prefers-reduced-motion:reduce){.titleButtons button:hover{transform:none}}
@keyframes riftFadeIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes riftFadeInUp{from{opacity:0;transform:translateY(28px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes riftFadeInDown{from{opacity:0;transform:translateY(-24px)}to{opacity:1;transform:translateY(0)}}
@keyframes riftFadeInLeft{from{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:translateX(0)}}
@keyframes riftFadeInRight{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}
@keyframes riftScaleIn{from{opacity:0;transform:scale(.86)}to{opacity:1;transform:scale(1)}}
@keyframes riftPop{0%{opacity:0;transform:scale(.7)}60%{opacity:1;transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}
@keyframes riftShine{0%{transform:translateX(-160%) skewX(-22deg);opacity:0}30%{opacity:.6}100%{transform:translateX(260%) skewX(-22deg);opacity:0}}
@keyframes riftPulse{0%,100%{box-shadow:0 0 0 0 #e0bc7644}50%{box-shadow:0 0 0 12px #e0bc7600}}
@keyframes riftPulseRing{from{transform:scale(.6);opacity:.7}to{transform:scale(2.2);opacity:0}}
@keyframes riftSweep{0%{transform:translateX(-110%)}100%{transform:translateX(110%)}}
@keyframes riftTitleGlow{0%,100%{text-shadow:0 4px 0 #3b2c14,0 8px 24px #000}50%{text-shadow:0 4px 0 #3b2c14,0 10px 38px #e0bc7699,0 0 18px #f5d79977}}
@keyframes riftSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@keyframes riftDrift{0%,100%{transform:translateY(0) translateX(0)}50%{transform:translateY(-6px) translateX(3px)}}
@keyframes riftDiveIn{0%{opacity:0;transform:translateY(-160%) rotateZ(-6deg)}70%{opacity:1;transform:translateY(8%) rotateZ(2deg)}100%{opacity:1;transform:translateY(0) rotateZ(0)}}
@keyframes riftPanelIn{0%{opacity:0;transform:translateY(18px) scale(.97)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes riftToastIn{0%{opacity:0;transform:translateX(-50%) translateY(20px)}100%{opacity:1;transform:translateX(-50%) translateY(0)}}
@keyframes riftProgress{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
#title{animation:riftFadeIn .9s cubic-bezier(.22,.61,.36,1) both}
#title .titleShade{background:linear-gradient(180deg,#05090df0 0%,#05090d99 45%,#05090d55 72%,#05090d10 82%,#05090d40 100%);animation:riftFadeIn 1.2s ease both}
.titleLogo .mark{animation:riftDrift 6s ease-in-out infinite}
.titleButtons{display:flex;flex-direction:column;gap:14px;width:min(320px,100%);animation:riftFadeInLeft .9s cubic-bezier(.22,.61,.36,1) both;animation-delay:.25s}
.titleButtons button{position:relative;overflow:hidden}
.titleButtons button::after{content:'';position:absolute;top:0;left:0;width:60%;height:100%;background:linear-gradient(90deg,transparent,#ffffff30,transparent);transform:translateX(-160%) skewX(-22deg);pointer-events:none;transition:none}
.titleButtons button:hover::after{animation:riftShine 1s ease both}
.titleButtons button.primary{animation:riftPop .9s cubic-bezier(.2,1.3,.4,1) both;animation-delay:.35s}
.titleButtons button:not(.primary):nth-of-type(2){animation:riftFadeInLeft .8s ease both;animation-delay:.45s}
.titleButtons button:not(.primary):nth-of-type(3){animation:riftFadeInLeft .8s ease both;animation-delay:.55s}
.titleButtons button:hover{transform:translateY(-3px);box-shadow:0 10px 28px #000c,0 0 0 1px #e0bc7666 inset;background:linear-gradient(180deg,#ffe3a8,#f5d799);border-color:#b08640}
.titleButtons button.primary:hover{transform:translateY(-3px) scale(1.02);box-shadow:0 14px 36px #e0bc7666,0 0 0 1px #f5d799aa inset}
.titleVersion{animation:riftFadeIn 1.4s ease both;animation-delay:.9s;opacity:0;animation-fill-mode:forwards}
.lobbyHeader{animation:riftFadeInDown .6s ease both}
.lobbyContent .heading{animation:riftFadeInUp .7s cubic-bezier(.22,.61,.36,1) both}
.playModes button{position:relative;overflow:hidden}
.playModes button::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#e0bc7622,transparent);transform:translateX(-110%);transition:none;pointer-events:none}
.playModes button:hover::before{animation:riftSweep 1.1s ease both}
.playModes button:hover{transform:translateY(-2px);box-shadow:0 8px 22px #000a}
.playModes .chosen{animation:riftPulse 2.6s ease-in-out infinite}
.factionCard{animation:riftPanelIn .6s cubic-bezier(.22,.61,.36,1) both;transform-origin:center bottom}
.factionCard[data-faction="0"]{animation-delay:.05s}
.factionCard[data-faction="1"]{animation-delay:.1s}
.factionCard[data-faction="2"]{animation-delay:.15s}
.factionCard[data-faction="3"]{animation-delay:.2s}
.factionCard[data-faction="4"]{animation-delay:.25s}
.factionCard[data-faction="5"]{animation-delay:.3s}
.factionCard[data-faction="6"]{animation-delay:.35s}
.factionCard[data-faction="7"]{animation-delay:.4s}
.factionCard[data-faction="8"]{animation-delay:.45s}
.factionCard[data-faction="9"]{animation-delay:.5s}
.factionCard{transition:transform .25s cubic-bezier(.22,.61,.36,1),box-shadow .25s ease,border-color .25s ease}
.factionCard:hover{transform:translateY(-6px) scale(1.025);box-shadow:0 18px 36px #000c,0 0 0 1px #e0bc7677;animation:none}
.factionCard:hover::before{background:linear-gradient(0deg,#081019 1%,#0a1217bb 24%,transparent 74%),radial-gradient(circle at 50% 0%,#e0bc7622,transparent 70%)}
.factionCard.chosen{animation:riftPop .6s cubic-bezier(.2,1.3,.4,1) both}
.factionCard .chosenBadge{animation:riftFadeIn .35s ease both}
.factionCard .chosenBadge::after{content:'';position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;border:1px solid #e0bc76aa;border-radius:inherit;animation:riftPulseRing 1.8s ease-out infinite;pointer-events:none}
.mapCard{animation:riftPanelIn .5s ease both;transform-origin:center}
.mapCard[data-map="valley"]{animation-delay:.05s}
.mapCard[data-map="desert"]{animation-delay:.1s}
.mapCard[data-map="frost"]{animation-delay:.15s}
.mapCard[data-map="wilds"]{animation-delay:.2s}
.mapCard[data-map="islands"]{animation-delay:.25s}
.mapCard[data-map="highlands"]{animation-delay:.3s}
.mapCard[data-map="canyon"]{animation-delay:.35s}
.mapCard[data-map="crossroads"]{animation-delay:.4s}
.mapCard{transition:transform .22s cubic-bezier(.22,.61,.36,1),box-shadow .22s ease,border-color .22s ease}
.mapCard:hover{transform:translateY(-3px) scale(1.015);box-shadow:0 10px 26px #000a;border-color:var(--accent3)}
.mapCard.chosen{animation:riftPop .45s cubic-bezier(.2,1.3,.4,1) both}
.colorChip{transition:transform .18s ease,box-shadow .18s ease}
.colorChip:hover{transform:scale(1.18) rotate(-3deg);box-shadow:0 0 14px var(--chip)}
.colorChip.chosen{animation:riftPop .35s cubic-bezier(.2,1.3,.4,1) both}
.panel{animation:riftFadeInUp .55s cubic-bezier(.22,.61,.36,1) both}

.colorChoices{margin-top:9px;animation:riftFadeIn .6s ease both}
.rosterCards .rosterCard{animation:riftFadeInUp .5s ease both;transition:transform .2s ease,border-color .2s ease,background .2s ease}
.rosterCards .rosterCard:nth-child(1){animation-delay:.05s}
.rosterCards .rosterCard:nth-child(2){animation-delay:.1s}
.rosterCards .rosterCard:nth-child(3){animation-delay:.15s}
.rosterCards .rosterCard:nth-child(4){animation-delay:.2s}
.rosterCards .rosterCard:hover{transform:translateY(-3px) scale(1.04);border-color:var(--accent3);background:#1a2c3a}
.rosterCards .rosterCard.chosen{animation:riftPop .45s cubic-bezier(.2,1.3,.4,1) both}
.unitInspect{animation:riftFadeIn .5s ease both}
.quickPlay{position:relative;overflow:hidden;animation:riftPop .9s cubic-bezier(.2,1.3,.4,1) both;animation-delay:.5s}
.quickPlay::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff33,transparent);transform:translateX(-160%);pointer-events:none}
.quickPlay:hover::before{animation:riftShine 1.1s ease infinite}
.quickPlay:hover{transform:translateY(-3px) scale(1.02);box-shadow:0 14px 36px #e0bc7655}
.actions button{transition:transform .2s ease,box-shadow .2s ease,background .15s ease}
.actions button:hover{transform:translateY(-2px);box-shadow:0 10px 24px #000a}
.actions .primary{position:relative;overflow:hidden}
.actions .primary::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff30,transparent);transform:translateX(-160%);pointer-events:none}
.actions .primary:hover::after{animation:riftShine 1s ease both}
.joinPanel{animation:riftFadeInRight .55s cubic-bezier(.22,.61,.36,1) both}
#joinCode{transition:border-color .2s ease,box-shadow .2s ease}
#joinCode:focus{transform:scale(1.02);border-color:var(--accent);box-shadow:0 0 0 4px #e0bc7633,0 8px 24px #e0bc7622}
#joinRoom,#createRoom,#solo{position:relative;overflow:hidden}
#joinRoom::after,#createRoom::after,#solo::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff22,transparent);transform:translateX(-160%);pointer-events:none}
#joinRoom:hover::after,#createRoom:hover::after,#solo:hover::after{animation:riftShine .9s ease both}
.roomPanel,#roomPanel{animation:riftFadeInUp .55s cubic-bezier(.22,.61,.36,1) both}
.roomHeader{animation:riftFadeInDown .5s ease both;position:relative;overflow:hidden}
.roomHeader::before{content:'';position:absolute;top:0;left:-100%;width:60%;background:linear-gradient(90deg,transparent,#e0bc7622,transparent);animation:riftSweep 5s linear infinite;pointer-events:none}
.codeButton{transition:transform .2s ease,box-shadow .2s ease,background .2s ease}
.codeButton:hover{transform:scale(1.05);box-shadow:0 0 18px #e0bc7644}
.codeButton:active{transform:scale(.97)}
.playerRow{animation:riftFadeInLeft .45s ease both;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.playerRow:hover{transform:translateX(4px);border-color:var(--accent3);box-shadow:0 6px 18px #000a}
.playerRow.empty{animation:riftPulse 2.4s ease-in-out infinite}
.roomActions button{position:relative;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}
.roomActions button:hover{transform:translateY(-2px);box-shadow:0 10px 22px #000a}
.roomActions button::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff22,transparent);transform:translateX(-160%);pointer-events:none}
.roomActions button:hover::after{animation:riftShine .9s ease both}
#begin:hover{transform:translateY(-3px) scale(1.03);box-shadow:0 14px 32px #e0bc7666}
#ready.READY{animation:riftPulse 2.2s ease-in-out infinite}
.matchHeader{animation:riftFadeInDown .5s ease both}
.resources b{transition:color .2s ease}
.resources span{animation:riftFadeIn .6s ease both}
.resources span:nth-child(1){animation-delay:.05s}
.resources span:nth-child(2){animation-delay:.1s}
.resources span:nth-child(3){animation-delay:.15s}
.matchHeader button{transition:transform .15s ease,box-shadow .15s ease}
.matchHeader button:hover{transform:translateY(-1px);box-shadow:0 6px 18px #000a}
.matchHeader button.active{animation:riftPulse 1.8s ease-in-out infinite}
#networkState{transition:color .2s ease}
.commandDock{animation:riftFadeInUp .55s cubic-bezier(.22,.61,.36,1) both}
.commands button{position:relative;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease,background .15s ease}
.commands button::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff22,transparent);transform:translateX(-160%);pointer-events:none}
.commands button:hover::after{animation:riftShine .9s ease both}
.commands button:hover{transform:translateY(-2px) scale(1.04);box-shadow:0 8px 18px #000a}
.commands button.active{animation:riftPulse 2s ease-in-out infinite}
.card{transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease}
.card:hover{transform:translateY(-3px) scale(1.025);border-color:var(--accent3);background:#1d2e3c;box-shadow:0 10px 22px #000a}
.card.active{animation:riftPulse 2.4s ease-in-out infinite}
.card strong{transition:color .2s ease}
.card:hover strong{color:var(--accent2)}
.queueItem{animation:riftFadeInLeft .35s ease both;transition:border-color .2s ease,background .2s ease,transform .2s ease}
.queueItem:hover{transform:translateX(4px);background:#16293a;border-color:var(--accent3)}
.queueItem.current{animation:riftPop .5s cubic-bezier(.2,1.3,.4,1) both,riftPulse 2.4s ease-in-out infinite 1s}
aside{animation:riftFadeInRight .55s cubic-bezier(.22,.61,.36,1) both}
.commanderPortrait{animation:riftFadeInDown .6s ease both;position:relative;overflow:hidden}
.commanderPortrait::after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,#e0bc7611 50%,transparent 70%);animation:riftSweep 5s linear infinite;pointer-events:none}
.scoreboard{animation:riftFadeIn .55s ease both}
.commandTabs button{transition:transform .18s ease,background .18s ease,border-color .18s ease}
.commandTabs button:hover{transform:translateY(-1px);background:#243747}
.commandTabs button.active{animation:riftPulse 2s ease-in-out infinite}
.productionQueue{animation:riftFadeInUp .55s ease both}
#help{transition:transform .2s ease,box-shadow .2s ease}
#help:hover{transform:translateY(-2px);box-shadow:0 6px 18px #000a}
.mapwrap{animation:riftFadeIn .6s ease both;transition:transform .25s ease}
.mapwrap:hover{transform:translateY(-2px)}
.viewtools button{transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.viewtools button:hover{transform:translateY(-2px);box-shadow:0 8px 18px #000a}
.viewtools button:active{transform:translateY(0) scale(.96)}
.panPad button{transition:transform .12s ease,background .12s ease,border-color .12s ease}
.panPad button:hover{transform:scale(1.06);background:#243747}
.panPad button:active{transform:scale(.94);background:#635235;border-color:#e0bc76}
#toast{animation:riftToastIn .35s cubic-bezier(.22,.61,.36,1) both}
dialog{animation:riftDialogIn .42s cubic-bezier(.22,1.3,.36,1) both;transform-origin:center top}
@keyframes riftDialogIn{0%{opacity:0;transform:translateY(-26px) scale(.94)}100%{opacity:1;transform:translateY(0) scale(1)}}
dialog::backdrop{animation:riftBackdropIn .35s ease both}
@keyframes riftBackdropIn{from{opacity:0;backdrop-filter:blur(0)}to{opacity:1;backdrop-filter:blur(6px)}}
dialog button{position:relative;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
dialog button:hover{transform:translateY(-2px);box-shadow:0 8px 18px #000a}
dialog button.primary:hover{box-shadow:0 10px 22px #e0bc7655,0 0 0 1px #f5d799aa inset}
dialog button::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff22,transparent);transform:translateX(-160%);pointer-events:none}
dialog button:hover::after{animation:riftShine .9s ease both}
#result h1{animation:riftPop .9s cubic-bezier(.2,1.4,.4,1) both,riftTitleGlow 4s ease-in-out infinite .9s}
#result p{animation:riftFadeInUp .6s ease both;animation-delay:.4s;opacity:0;animation-fill-mode:forwards}
#result button{animation:riftFadeInUp .5s ease both}
#result button:nth-of-type(1){animation-delay:.5s}
#result button:nth-of-type(2){animation-delay:.6s}
.lobbyFooter{animation:riftFadeIn 1s ease both;animation-delay:1.2s;opacity:0;animation-fill-mode:forwards}
input,select{transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
input:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #e0bc7633;background:#14222d}
.identityBar{animation:riftFadeInUp .55s ease both}
.lobbyHeader{position:relative;overflow:hidden}
.lobbyHeader::before{content:'';position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,transparent,var(--accent),transparent);animation:riftSweep 4s linear infinite;pointer-events:none}
.lobbyContent{animation:riftFadeIn .6s ease both}
#armyPreview{animation:riftFadeIn .7s ease both}
#armyPreview:hover{box-shadow:inset 0 0 0 1px #e0bc7666,0 8px 20px #000a}
.preBattleControls,.preBattlePreview{transition:transform .25s ease,box-shadow .25s ease}
.preBattleControls:hover,.preBattlePreview:hover{transform:translateY(-2px);box-shadow:0 12px 28px #000a}
.selectionSummary button{transition:transform .18s ease,box-shadow .18s ease}
.selectionSummary button:hover{transform:translateY(-1px) scale(1.04);box-shadow:0 6px 14px #000a}
.brand{display:inline-flex;align-items:center;gap:12px;font-family:Arial,sans-serif;letter-spacing:2px;color:var(--text);text-decoration:none;font-size:20px;font-weight:900;transition:transform .2s ease,color .2s ease}
.brand:hover{transform:translateX(2px);color:#f3ead2}
.brand .mark{transition:transform .4s ease,box-shadow .4s ease}
.brand:hover .mark{transform:rotate(-6deg) scale(1.05);box-shadow:0 0 16px #e0bc7666}
.muted{color:var(--muted);transition:color .2s ease}
.eyebrow{font-size:11px;letter-spacing:2.5px;font-family:Arial,sans-serif;color:var(--accent);text-transform:uppercase}
.eyebrow::after{content:'';display:inline-block;width:24px;height:2px;background:linear-gradient(90deg,var(--accent),transparent);margin-left:8px;vertical-align:middle;animation:riftSweep 3s linear infinite}
#result{text-align:center}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-delay:0!important;transition-duration:.001ms!important}}

/* ================================================================
   HoN-style theme: forged iron panels, bronze trim, ember light,
   a thin cyan rift-glow for the sci-fi touch. Overrides earlier rules.
   ================================================================ */
:root{--bg:#0a0908;--panel:#15110d;--line:#4a3a22;--text:#ebe0c8;--muted:#a3957d;--accent:#dcae58;--glow:#55d3dc;--bronze:#7c6136;--gold:#e7bf6b;
 --frame:inset 0 0 0 1px #000,inset 0 0 0 2px #3a2d19,inset 0 1px 0 3px #ffdc9612,0 0 0 1px #000,0 14px 30px #000b;
 --corners:linear-gradient(var(--gold),var(--gold)) 0 0/16px 2px no-repeat,linear-gradient(var(--gold),var(--gold)) 0 0/2px 16px no-repeat,linear-gradient(var(--gold),var(--gold)) 100% 0/16px 2px no-repeat,linear-gradient(var(--gold),var(--gold)) 100% 0/2px 16px no-repeat,linear-gradient(var(--gold),var(--gold)) 0 100%/16px 2px no-repeat,linear-gradient(var(--gold),var(--gold)) 0 100%/2px 16px no-repeat,linear-gradient(var(--gold),var(--gold)) 100% 100%/16px 2px no-repeat,linear-gradient(var(--gold),var(--gold)) 100% 100%/2px 16px no-repeat}
body{font-family:Kanit,Tahoma,Arial,sans-serif;font-weight:300;background:radial-gradient(ellipse 120% 70% at 50% -10%,#3a2512 0%,#130e0a 45%,#080706 100%) fixed,var(--bg);color:var(--text)}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;background:repeating-linear-gradient(0deg,#ffffff05 0 1px,transparent 1px 3px),radial-gradient(ellipse at 50% 120%,#55d3dc10,transparent 60%)}
#lobby,#match{position:relative;z-index:1}
h1,h2,h3,.panelTitle h2,.browserHead h2,#resultTitle{font-family:Cinzel,Kanit,serif;font-weight:800;letter-spacing:.06em;color:var(--gold);text-shadow:0 2px 0 #000,0 0 18px #dcae5833}
.eyebrow,.version,.sectiontitle span,#miniCaption,.playersHead,.roomTableHead{font-family:Rajdhani,Kanit,sans-serif!important;font-weight:700;letter-spacing:.22em;color:var(--glow)!important;text-shadow:0 0 8px #55d3dc66}
/* Panels and frames */
.panel,.identityBar,.preBattleControls,.preBattlePreview,dialog,.commandDock,aside,.actionGuide,.buildConfirm,.buildLegend,.mapwrap,.scoreboard,.queueItem,.roomBrowser{background:var(--corners),linear-gradient(180deg,#1f1913 0%,#14100c 55%,#0f0c09 100%)!important;border:1px solid var(--bronze)!important;box-shadow:var(--frame)!important;border-radius:3px!important}
.mission{background:linear-gradient(90deg,#0d0a08e6,#0d0a0800)!important;padding:8px 14px}
.panelTitle>span:first-child{background:linear-gradient(180deg,#e7bf6b,#8a6328)!important;color:#1a1006!important;border:1px solid #ffd98c;box-shadow:0 0 12px #dcae5855;font-family:Rajdhani,sans-serif;font-weight:700}
.panelTitle{border-bottom:1px solid #3a2d19;box-shadow:0 1px 0 #55d3dc22}
/* Headers */
.lobbyHeader,.matchHeader{background:linear-gradient(180deg,#221a12,#0e0b08)!important;border-bottom:1px solid var(--bronze)!important;box-shadow:0 1px 0 #000,0 2px 0 #55d3dc33,0 8px 24px #000a}
.brand,.brand span{font-family:Cinzel,Kanit,serif;letter-spacing:.12em}
.brand b{color:var(--gold)}
.mark{border-color:var(--bronze)!important;background:radial-gradient(circle at 50% 30%,#3a2a14,#120d08)!important;box-shadow:inset 0 0 8px #000,0 0 10px #dcae5833;color:var(--gold)}
.resources b{color:#f5e2b6;text-shadow:0 0 8px #dcae5844}
/* Buttons: forged metal plates */
button{font-family:Kanit,Tahoma,sans-serif;font-weight:400;color:#ecd8ab;background:linear-gradient(180deg,#3a2f22 0%,#251d15 48%,#18130e 52%,#120e0a 100%);border:1px solid #6f5631;border-radius:2px;box-shadow:inset 0 1px 0 #ffe2a826,inset 0 -2px 0 #0008,0 2px 3px #000c;text-shadow:0 1px 0 #000;transition:border-color .15s,box-shadow .15s,color .15s,filter .15s}
button:hover:not(:disabled){border-color:var(--gold);color:#fff4d6;box-shadow:inset 0 1px 0 #ffe2a840,inset 0 -2px 0 #0008,0 0 0 1px #000,0 0 12px #55d3dc55;filter:brightness(1.12)}
button:active:not(:disabled){filter:brightness(.92);box-shadow:inset 0 2px 6px #000}
button.primary,.titleButtons button.primary{color:#1b1006;font-weight:600;background:linear-gradient(180deg,#f3d48c 0%,#d9a64d 45%,#a6742d 55%,#7f5520 100%)!important;border:1px solid #ffe2a0!important;text-shadow:0 1px 0 #ffeec455;box-shadow:inset 0 1px 0 #fff4cc,inset 0 -2px 0 #4a2f0d,0 0 0 1px #000,0 0 16px #dcae5855!important}
button.primary:hover:not(:disabled){color:#000;filter:brightness(1.1);box-shadow:inset 0 1px 0 #fff4cc,0 0 0 1px #000,0 0 22px #e7bf6b88,0 0 10px #55d3dc66!important}
button.quiet{background:linear-gradient(180deg,#1d1812,#110e0a);color:#c9b48a}
button.danger{background:linear-gradient(180deg,#6b2418,#3a120b);border-color:#b2533c;color:#ffd7c8}
button.chosen,.commandTabs .active,.commands button.active{background:linear-gradient(180deg,#5a4320,#2d2112)!important;border-color:var(--gold)!important;color:#fff0cc!important;box-shadow:inset 0 0 12px #dcae5833,0 0 0 1px #000,0 0 10px #55d3dc44!important}
button:disabled{filter:grayscale(.6) brightness(.7)}
/* Fields */
input,select,textarea{font-family:Kanit,Tahoma,sans-serif;background:#0c0a08!important;color:#ecdcb8!important;border:1px solid #4d3c22!important;border-radius:2px!important;box-shadow:inset 0 2px 6px #000,inset 0 0 0 1px #00000080}
input:focus,select:focus{outline:none;border-color:var(--glow)!important;box-shadow:inset 0 2px 6px #000,0 0 0 1px #000,0 0 10px #55d3dc55!important}
label{color:#c7b68f}
/* Cards */
.factionCard,.mapCard,.card{border:1px solid #5a4528!important;box-shadow:inset 0 0 0 1px #000,0 6px 16px #000a!important;border-radius:2px!important}
.factionCard.chosen,.mapCard.chosen,.card.active{border-color:var(--gold)!important;box-shadow:inset 0 0 0 1px #000,0 0 0 1px var(--gold),0 0 18px #dcae5866,0 0 8px #55d3dc55!important}
.card{background:linear-gradient(180deg,#221b13,#120e0a)!important}
.card:hover:not(:disabled){border-color:var(--gold)!important}
/* Room browser (classic RTS style list) */
.roomBrowser{margin-top:22px;padding:18px 20px}
.browserHead{display:flex;align-items:flex-end;gap:16px;margin-bottom:12px}
.browserHead>div{flex:1}.browserHead h2{margin:4px 0 0;font-size:24px}
#roomCount{font-family:Rajdhani,sans-serif;font-weight:700;letter-spacing:.15em;color:var(--glow)}
.roomTable{border:1px solid #3a2d19;background:#080706;box-shadow:inset 0 0 0 1px #000,inset 0 6px 20px #000c}
.roomTableHead,.roomRow{display:grid;grid-template-columns:34px minmax(0,2.2fr) minmax(0,1.4fr) minmax(0,1.1fr) minmax(0,1.3fr) 70px;gap:10px;align-items:center;padding:0 14px}
.roomTableHead{min-height:34px;font-size:12px;background:linear-gradient(180deg,#221a11,#130f0a);border-bottom:1px solid var(--bronze)}
.roomList{max-height:340px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#7c6136 #0b0908}
.roomRow{width:100%;min-height:44px;text-align:left;border:0!important;border-bottom:1px solid #241c13!important;border-radius:0!important;background:linear-gradient(90deg,#16120d,#0e0b09)!important;box-shadow:none!important;color:#dccaa3;font-size:15px}
.roomRow:nth-child(even){background:linear-gradient(90deg,#1a150f,#100d0a)!important}
.roomRow:hover:not(:disabled){background:linear-gradient(90deg,#2b2115,#16110c)!important;color:#fff1cf}
.roomRow.selected{background:linear-gradient(90deg,#4a3518,#1c150d)!important;color:#fff4d8;box-shadow:inset 3px 0 0 var(--gold),inset 0 0 0 1px #55d3dc55,0 0 12px #55d3dc22!important}
.roomRow.full{opacity:.5}
.roomRow .rname{font-weight:600;color:#f1d79d}
.roomRow span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.roomRow i{color:#c27a5c;font-style:normal;font-size:12px}
.roomRow .count{font-family:Rajdhani,sans-serif;font-weight:700;font-size:17px;color:var(--glow);text-align:right}
.roomRow .lock{text-align:center}
.roomEmpty{padding:28px 16px;text-align:center;color:var(--muted);margin:0}
.browserActions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:12px}
.browserActions .primary{min-width:220px}
#passDialog{max-width:400px}#passDialog button{margin:10px 8px 0 0}
/* Match HUD */
.actionGuide strong{font-family:Cinzel,Kanit,serif;color:var(--gold)}
#toast{background:var(--corners),linear-gradient(180deg,#221a12,#110d0a)!important;border:1px solid var(--bronze)!important;box-shadow:var(--frame),0 0 18px #55d3dc33!important;color:#f3e3bd}
dialog::backdrop{background:#000a;backdrop-filter:blur(2px)}
.lobbyFooter{color:#7d6f58;border-top:1px solid #2e2418}
@media(max-width:700px){.roomTableHead{display:none}.roomRow{grid-template-columns:26px 1fr 54px;padding:8px 10px;min-height:52px}.roomRow span:nth-child(3),.roomRow span:nth-child(4),.roomRow span:nth-child(5){display:none}.browserActions{flex-direction:column;align-items:stretch}.browserActions .primary{min-width:0}}

/* HoN theme: remaining surfaces from the older navy theme. */
.actions{background:linear-gradient(180deg,#1b1611f2,#0e0b09f8)!important;border-top:1px solid var(--bronze)!important;box-shadow:0 -1px 0 #55d3dc22,0 -10px 20px #000a!important}
.checkRow[hidden],#roomListedField[hidden]{display:none!important}
#toast:empty{display:none!important}
.rosterCard,.playModes button,.secondary,.codeButton,.viewtools button,.panPad button,.commandTabs button,.titleButtons button:not(.primary),.titleButtons .quiet{background:linear-gradient(180deg,#3a2f22 0%,#251d15 48%,#18130e 52%,#120e0a 100%)!important;border:1px solid #6f5631!important;color:#ecd8ab!important;box-shadow:inset 0 1px 0 #ffe2a826,inset 0 -2px 0 #0008,0 2px 3px #000c!important}
.rosterCard:hover,.rosterCards .rosterCard:hover,.playModes button:hover,.secondary:hover,.codeButton:hover,.viewtools button:hover,.panPad button:hover,.commandTabs button:hover,.titleButtons button:not(.primary):hover{border-color:var(--gold)!important;color:#fff4d6!important;box-shadow:inset 0 1px 0 #ffe2a840,0 0 0 1px #000,0 0 12px #55d3dc55!important}
.rosterCard.chosen,.rosterCard.active,.rosterCard[aria-pressed=true]{border-color:var(--gold)!important;box-shadow:inset 0 0 12px #dcae5833,0 0 0 1px #000,0 0 10px #55d3dc44!important}
.mapCard{background:linear-gradient(180deg,#1b1611,#0e0b09)!important}
.factionCard .factionCopy{background:linear-gradient(180deg,transparent,#0b0907f2 55%)!important}
.factionCard:before,.factionCard:hover::before{background:linear-gradient(180deg,transparent 40%,#0b0806e6)!important}
.factionCard .chosenBadge,.itemPicture i{background:linear-gradient(180deg,#e7bf6b,#8a6328)!important;color:#1a1006!important;border-color:#ffd98c!important}
.card .itemPicture,.queueItem .itemPicture,#armyPreview,.armyPreviewPanel{background-color:#0a0807!important;box-shadow:inset 0 0 0 1px #000,inset 0 4px 14px #000c}
.commanderPortrait>div{background:linear-gradient(90deg,#0b0907f0,#0b090700)!important}
.playerRow,.playerRow.empty,.roomHeader{background:linear-gradient(90deg,#1a150f,#100d0a)!important;border-color:#3a2d19!important}
.playerRow select{background:#0c0a08!important}
.colorChip.chosen,.colorChip{background:var(--chip)!important;box-shadow:inset 0 -3px 0 #0005,0 0 0 1px #000!important;border-color:transparent!important;filter:none!important}
.colorChip.chosen{outline:2px solid var(--gold)!important;outline-offset:3px;box-shadow:0 0 12px #dcae5888,0 0 0 1px #000!important}
.roomTableHead,.playersHead{font-family:Kanit,sans-serif!important;font-weight:600;letter-spacing:.05em!important;font-size:13px}

/* Title screen typography enhancements */
.titleLogo h1{filter:none!important;-webkit-text-stroke:.5px #5a3a12}
.titleLogo h1 b{-webkit-text-stroke:0;font-family:Cinzel,Georgia,serif!important;font-weight:800!important;letter-spacing:.42em!important;background:linear-gradient(180deg,#e9fbff,#7fe3ec 55%,#2fa9b5);-webkit-background-clip:text;background-clip:text;color:transparent!important;filter:none}
.titleLogo p{font-family:Rajdhani,sans-serif!important;font-weight:700;letter-spacing:.35em!important;color:#d9c38f!important}
#armyPreview{image-rendering:auto!important}
.mark.markLogo{width:44px;height:44px;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;object-fit:contain;filter:drop-shadow(0 0 6px #55d3dc44) drop-shadow(0 2px 3px #000);display:block;flex:none}
.matchHeader .mark.markLogo{width:38px;height:38px}
.queueItem .qCount{margin-left:6px;font-family:Rajdhani,sans-serif;font-weight:700;font-size:1.1em;color:var(--glow);text-shadow:0 0 8px #55d3dc66}
.queueItem,.queueItem.current{animation:none!important}.queueItem.fresh{animation:riftFadeInLeft .35s ease both!important}
.card.active{animation:none!important}
#toast{animation:none!important;transition:opacity .3s ease}
/* Placing a building: the confirm bar takes the command dock's place, and match toasts sit top-centre so nothing stacks. */
#match.placing .commandDock{display:none!important}
#match.placing .buildConfirm{bottom:18px!important}
.buildConfirm div{display:flex;gap:8px}.buildConfirm div button{flex:1}
#match:not([hidden])~#toast{bottom:auto!important}
@media(min-width:901px){#match:not([hidden])~#toast{left:50%;right:auto;transform:translateX(-50%);max-width:min(560px,calc(100% - 360px))}}
#feedbackDialog{width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto}
#feedbackDialog textarea{width:100%;box-sizing:border-box;min-height:120px;resize:vertical;font-size:16px;padding:10px;margin-top:6px}
.feedbackKinds{display:flex;gap:8px;margin:10px 0}.feedbackKinds button{flex:1;min-height:42px}
.feedbackActions{display:flex;gap:10px;margin-top:12px}.feedbackActions button{flex:1;min-height:46px}
#feedbackCount{display:block;text-align:right;font-size:12px;margin-top:4px}
/* After the first reveal, lobby cards never replay entry/pop animations when the selection changes. */
#lobby.settled .factionCard,#lobby.settled .mapCard,#lobby.settled .rosterCard,#lobby.settled .colorChip,#lobby.settled .factionCard.chosen,#lobby.settled .mapCard.chosen,#lobby.settled .rosterCards .rosterCard,#lobby.settled .rosterCards .rosterCard.chosen,#lobby.settled .colorChip.chosen,#lobby.settled .chosenBadge{animation:none!important}
/* Match loading screen */
.loadingScreen{position:fixed;inset:0;z-index:50;background:#020304;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;opacity:1;transition:opacity .45s ease}
.loadingScreen[hidden]{display:none}.loadingScreen.done{opacity:0;pointer-events:none}
.loadLogo{width:clamp(110px,18vmin,180px);height:auto;filter:drop-shadow(0 0 28px #55d3dc55) drop-shadow(0 0 60px #dcae5833);animation:loadGlow 2.4s ease-in-out infinite}
@keyframes loadGlow{50%{filter:drop-shadow(0 0 40px #55d3dc88) drop-shadow(0 0 80px #dcae5855)}}
.loadTitle{font-family:'Cinzel Decorative',Cinzel,serif;font-weight:900;font-size:clamp(22px,4vmin,34px);letter-spacing:.14em;color:#f3d48c}.loadTitle b{font-family:Cinzel,serif;color:#7fe3ec;letter-spacing:.3em;margin-left:.3em}
.loadFoot{position:absolute;left:50%;bottom:max(36px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(560px,calc(100% - 48px));display:flex;flex-direction:column;gap:8px;text-align:center}
#loadText{font-family:Rajdhani,Kanit,sans-serif;font-weight:700;letter-spacing:.12em;color:#9fdfe6;font-size:14px}
.loadBar{height:6px;border:1px solid #7c6136;background:#0c0a08;box-shadow:inset 0 0 6px #000;overflow:hidden}.loadBar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#8a6328,#f3d48c,#7fe3ec);box-shadow:0 0 10px #55d3dc88;transition:width .25s ease}
.loadTip{color:#a3957d;font-size:13px}
/* One construction at a time: build cards dim with a hint while a site is being built. */
.card.busy{position:relative}.card.busy::after{content:'รอก่อสร้างเสร็จ';position:absolute;inset:8px 8px auto 8px;padding:2px 4px;font-size:11px;line-height:1.3;text-align:center;color:#f3e3bd;background:#0b0907d9;border:1px solid #7c6136;border-radius:2px}
/* ===== Phone HUD (final overrides): one compact command row at the bottom, minimap and view tools on the right edge ===== */
@media (max-width:700px){
 #match .commandDock{left:8px!important;right:8px!important;width:auto!important;transform:none!important;bottom:8px!important;padding:6px!important;display:flex!important;flex-direction:column!important;gap:6px!important;max-width:none!important}
 #match .selectionSummary{display:flex!important;align-items:center;gap:8px;min-height:0!important;width:auto!important}
 #match .selectionSummary strong{flex:1;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #match .selectionSummary button{min-height:36px!important;padding:4px 12px!important;font-size:13px}
 #match .commands{display:flex!important;gap:6px!important;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;width:auto!important}
 #match .commands::-webkit-scrollbar{display:none}
 #match .commands button{flex:0 0 auto!important;min-width:74px;min-height:48px!important;padding:4px 8px!important;font-size:12px!important;white-space:nowrap;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
 #match .commands kbd{display:none}
 #match .mapwrap{left:auto!important;right:8px!important;top:150px!important;bottom:auto!important;width:96px!important;height:96px!important}
 #match .viewtools{left:auto!important;right:8px!important;top:254px!important;bottom:auto!important;display:grid!important;grid-template-columns:44px 44px!important;gap:4px!important;width:auto!important}
 #match .viewtools button{min-height:40px!important;padding:2px!important;font-size:11px!important}
}
@media (max-height:500px) and (orientation:landscape){
 #match .commandDock{left:8px!important;bottom:6px!important;transform:none!important;padding:5px!important;display:flex!important;flex-direction:row!important;align-items:center;gap:6px!important;max-width:calc(100% - 270px)!important;width:auto!important;right:auto!important}
 #match .selectionSummary{flex:0 0 auto;width:auto!important}#match .selectionSummary strong{display:none}
 #match .commands{display:flex!important;gap:5px!important;overflow-x:auto;scrollbar-width:none;width:auto!important}
 #match .commands::-webkit-scrollbar{display:none}
 #match .commands button{flex:0 0 auto!important;min-width:64px;min-height:42px!important;padding:3px 8px!important;font-size:12px!important;white-space:nowrap}
 #match .commands kbd{display:none}
 #match .mapwrap{left:auto!important;right:8px!important;top:56px!important;bottom:auto!important;width:84px!important;height:84px!important}
 #match .viewtools{left:auto!important;right:8px!important;top:146px!important;bottom:auto!important;display:grid!important;grid-template-columns:40px 40px!important;gap:4px!important;width:auto!important}
 #match .viewtools button{min-height:36px!important;padding:2px!important;font-size:11px!important}
 #match .mission{display:none!important}
}
@media (max-width:700px){#match .commands button{flex:1 1 0!important;min-width:0!important;white-space:normal!important;line-height:1.15;font-size:11px!important;padding:4px 2px!important}#match .commands button img,#match .commands button .hdIcon{width:20px;height:20px}}
@media (max-height:500px) and (orientation:landscape){#match .commandDock{max-width:calc(100% - 16px)!important}}
@media (max-width:700px) and (max-height:700px){#match .mapwrap{top:132px!important;width:80px!important;height:80px!important}#match .viewtools{top:218px!important;grid-template-columns:38px 38px!important}#match .viewtools button{min-height:34px!important}}

/* ================= Lobby wizard (paged) · uiverse-style components ================= */
.wizard{display:flex;flex-direction:column;gap:18px;min-height:calc(100dvh - 150px)}.wizard .wizardBar{margin-top:auto}
.lobbyPage[hidden]{display:none!important}
.lobbyPage{animation:pageIn .45s cubic-bezier(.22,.61,.36,1) both}
@keyframes pageIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.pageHead{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:4px 0 16px}
.pageHead h1{margin:6px 0 0;font-size:clamp(24px,3.4vw,38px)}
/* Step indicator with a glowing progress track */
.lobbySteps{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:10px;padding:12px 4px 18px;background:linear-gradient(180deg,#0b0907f2 70%,#0b090700)}
.lobbySteps button[hidden]{display:none}
.lobbySteps button{position:relative;z-index:1;display:flex;align-items:center;gap:8px;flex:1;justify-content:center;min-height:46px;padding:6px 10px!important;border-radius:999px!important;background:#120e0b!important;border:1px solid #3a2d19!important;box-shadow:none!important;color:#a3957d!important;font-weight:600;transition:all .25s}
.lobbySteps button i{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;font-style:normal;font-family:Rajdhani,sans-serif;font-weight:700;background:#1d1711;border:1px solid #5a4528;color:#d9c38f}
.lobbySteps button.current{color:#fff4d6!important;border-color:var(--gold)!important;background:linear-gradient(180deg,#3a2c18,#1a130c)!important;box-shadow:0 0 0 1px #000,0 0 18px #dcae5855!important}
.lobbySteps button.current i{background:linear-gradient(180deg,#f3d48c,#a6742d);color:#1b1006;border-color:#ffe2a0;box-shadow:0 0 12px #e7bf6b99}
.lobbySteps button.done{color:#cfe9ec!important;border-color:#2c6d74!important}
.lobbySteps button.done i{background:#14363a;border-color:#55d3dc;color:#9ff0f6}
.lobbySteps button.done i::after{content:'✓';position:absolute;font-size:0}
.stepTrack{position:absolute;left:24px;right:24px;top:35px;height:3px;background:#2a2016;border-radius:3px;z-index:0}
.stepTrack b{display:block;height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,#55d3dc,#e7bf6b);box-shadow:0 0 10px #55d3dc88;transition:width .4s ease}
/* Glass cards with a light sweep on hover */
.pageCard{position:relative;padding:18px;border:1px solid #4a3a22;border-radius:14px;background:linear-gradient(160deg,#211a12ee,#120e0bf2);box-shadow:inset 0 1px 0 #ffdc9614,0 10px 30px #0008;overflow:hidden}
.pageCard::before{content:'';position:absolute;inset:0;background:linear-gradient(115deg,transparent 40%,#ffffff0d 50%,transparent 60%);transform:translateX(-100%);transition:transform .9s ease;pointer-events:none}
.pageCard:hover::before{transform:translateX(100%)}
.armyGrid,.battleGrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:18px;align-items:start}
.battleGrid{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
.settingsCard{margin-top:18px;max-width:760px}
.modeRow{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:18px;align-items:stretch}.modeRow .settingsCard{max-width:none}
.chatCard{margin-top:18px;display:flex;flex-direction:column;min-height:300px;max-height:410px}
.chatHead{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin-bottom:10px}.chatHead .eyebrow{flex-basis:100%}.chatHead b{font-size:18px;color:#f6e3b4}.chatHead small{color:#a8977a;font-size:12px}
.chatList{list-style:none;margin:0;padding:8px;flex:1;min-height:120px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;border:1px solid #3a2e1c;border-radius:10px;background:#0b0907b3;display:flex;flex-direction:column;gap:6px}
.chatList li{font-size:13px;line-height:1.4;color:#e8dcc4;overflow-wrap:anywhere}.chatList li b{color:#f0c46a;margin-right:6px}.chatList li.mine b{color:#9fd7ff}.chatList li time{color:#7d6f58;font-size:11px;margin-left:6px}.chatList li.chatEmpty{color:#8a7b62;font-style:italic;margin:auto;text-align:center}
.chatForm{display:flex;gap:8px;margin-top:10px}.chatForm input{flex:1;min-width:0;min-height:42px}.chatForm button{min-width:72px;min-height:42px}
.chatError{min-height:16px;margin:6px 0 0;font-size:12px;color:#ff9b8a}
@media (max-width:900px){.modeRow{grid-template-columns:1fr;gap:0}.chatCard{min-height:260px;max-height:340px}}
/* Mode cards: big tiles with an animated conic border on the chosen one */
.lobbyPage .playModes{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.lobbyPage .playModes button{position:relative;display:flex!important;flex-direction:column;align-items:flex-start;gap:8px;min-height:170px;padding:22px!important;text-align:left;border-radius:16px!important;background:linear-gradient(160deg,#241c13,#100c09)!important;border:1px solid #4a3a22!important;transition:transform .25s,box-shadow .25s,border-color .25s;overflow:hidden;isolation:isolate}
.lobbyPage .playModes button:hover{transform:translateY(-4px);border-color:var(--gold)!important;box-shadow:0 14px 34px #000c,0 0 22px #55d3dc33!important}
.lobbyPage .playModes .modeIcon{font-style:normal;font-size:30px;line-height:1;color:var(--gold);text-shadow:0 0 14px #e7bf6b88}
.lobbyPage .playModes b{font-family:Cinzel,Kanit,serif;font-size:22px;color:#fff1cf;letter-spacing:.04em}
.lobbyPage .playModes small{color:#bfae88;font-size:14px;line-height:1.45;white-space:normal}
.lobbyPage .playModes button.chosen{border-color:transparent!important}
.lobbyPage .playModes button.chosen::before{content:'';position:absolute;inset:-60%;z-index:-2;background:conic-gradient(from 0deg,#55d3dc,#e7bf6b,#7c6136,#55d3dc);animation:spinBorder 4s linear infinite}
.lobbyPage .playModes button.chosen::after{content:'';position:absolute;inset:2px;z-index:-1;border-radius:14px;background:linear-gradient(160deg,#2d2215,#120d09)}
@keyframes spinBorder{to{transform:rotate(360deg)}}
/* Bottom bar: ghost back, glowing next, gold start */
.wizardBar{position:sticky;bottom:0;margin:0 -4px;border-radius:14px 14px 0 0;z-index:20;display:flex;align-items:center;gap:12px;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:linear-gradient(180deg,#0e0b08e6,#080605fa);border-top:1px solid var(--bronze);box-shadow:0 -1px 0 #55d3dc33,0 -12px 28px #000c;backdrop-filter:blur(6px)}
#lobby:has(#roomPanel:not([hidden])) .wizardBar,#setupPanel[hidden] .wizardBar{display:none}
.stepSummary{flex:1;text-align:center;color:#bfae88;font-size:14px;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ghostBtn{min-height:48px;padding:0 20px!important;border-radius:999px!important;background:transparent!important;border:1px solid #5a4528!important;box-shadow:none!important;color:#d9c38f!important}
.ghostBtn:hover{border-color:var(--gold)!important;color:#fff!important}
.glowBtn{position:relative;min-height:48px;padding:0 26px!important;border-radius:999px!important;color:#e9fbff!important;font-weight:700;letter-spacing:.06em;background:linear-gradient(180deg,#1d5258,#0f2f33)!important;border:1px solid #55d3dc!important;box-shadow:0 0 0 1px #000,0 0 16px #55d3dc66,inset 0 1px 0 #b8f6fb55!important;transition:box-shadow .25s,transform .15s}
.glowBtn:hover{box-shadow:0 0 0 1px #000,0 0 28px #55d3dccc,inset 0 1px 0 #b8f6fb88!important;transform:translateY(-1px)}
.wizardBar #quickPlay{min-height:52px;padding:0 30px!important;border-radius:999px!important;font-size:17px;letter-spacing:.06em;animation:startPulse 2.6s ease-in-out infinite}
@keyframes startPulse{50%{box-shadow:inset 0 1px 0 #fff4cc,0 0 0 1px #000,0 0 30px #e7bf6bcc}}
.legacyActions{display:none!important}
.wizard .preBattlePreview{margin:0}
.wizard .identityBar{margin-top:14px;background:none!important;border:0!important;box-shadow:none!important;padding:0!important}
.wizard #roomBrowser{margin-top:0}
.wizard #joinPanel{margin-top:18px}
@media (max-width:900px){.armyGrid,.battleGrid{grid-template-columns:1fr}.lobbyPage .playModes{grid-template-columns:1fr}.lobbyPage .playModes button{min-height:0;flex-direction:row;align-items:center;flex-wrap:wrap;padding:16px!important}.lobbyPage .playModes small{flex-basis:100%}}
@media (max-width:700px){.lobbySteps{gap:6px;padding:8px 0 14px}.lobbySteps button{min-height:40px;padding:4px!important;font-size:12px}.lobbySteps button span{display:none}.lobbySteps button.current span{display:inline}.stepTrack{top:28px}.stepSummary{display:none}.wizardBar{gap:8px}.ghostBtn,.glowBtn{padding:0 14px!important}.wizardBar #quickPlay{flex:1;padding:0 12px!important}.pageCard{padding:14px}}
.wizardBar #quickPlay{width:auto!important;flex:0 0 auto}
@media (max-width:700px){.wizardBar #quickPlay{flex:1 1 auto}}
@media (max-width:700px){.wizardBar{gap:6px;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}.wizardBar button{white-space:nowrap!important;font-size:14px!important;min-height:46px!important}.ghostBtn{padding:0 12px!important}.glowBtn{padding:0 14px!important}.wizardBar #quickPlay{font-size:15px!important;letter-spacing:.02em!important;padding:0 10px!important;min-width:0}}
@media (max-width:700px){.ghostBtn .lbl{display:none}}
/* Faction cards: portrait fills the top, centred on the character; name and role sit on a plate below it */
.lobbyPage .factionCard{display:flex;flex-direction:column;justify-content:flex-end;height:230px!important}
.lobbyPage .factionCard .factionPortrait{inset:0 0 34% 0!important}
.lobbyPage .factionCard .factionPortrait svg{width:100%;height:100%}
.lobbyPage .factionCard:before{background:linear-gradient(180deg,transparent 48%,#0c0907 66%)!important}
.lobbyPage .factionCopy{position:relative!important;inset:auto!important;z-index:1;padding:8px 8px 10px;text-align:center}
.lobbyPage .factionCopy span{display:block;font:600 9px Rajdhani,sans-serif!important;letter-spacing:.12em!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#9fdfe6!important}
.lobbyPage .factionCopy strong{font-size:18px!important;margin:2px 0!important;white-space:nowrap}
.lobbyPage .factionCopy small{display:block;font-size:11px!important;line-height:1.3;color:#bfae88!important}
/* Map list + small preview */
.mapPicker{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:14px;align-items:start}
.mapList{display:flex;flex-direction:column;gap:6px;max-height:430px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#7c6136 #0b0908;padding-right:4px}
.mapItem{display:flex!important;align-items:center;gap:10px;justify-content:space-between;text-align:left;padding:10px 14px!important;border-radius:10px!important;min-height:54px}
.mapItem span{display:flex;flex-direction:column;min-width:0}.mapItem strong{font-family:Cinzel,Kanit,serif;color:#f1d79d}.mapItem small{color:#a3957d;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mapItem.chosen{border-color:var(--gold)!important;box-shadow:inset 3px 0 0 var(--gold),0 0 14px #55d3dc33!important;background:linear-gradient(90deg,#3a2c18,#18120c)!important}
.mapItem:disabled{opacity:.35}
.mapSize{flex:none;font-style:normal;font-size:11px;padding:3px 8px;border-radius:999px;border:1px solid #5a4528;color:#d9c38f;white-space:nowrap}.mapSize.p2{color:#9ff0f6;border-color:#2c6d74}.mapSize.p4{color:#b6f09a;border-color:#3f7a2c}.mapSize.p6{color:#f3d48c;border-color:#8a6328}.mapSize.p8{color:#d9b3ff;border-color:#7045a0}
.mapShow{position:sticky;top:90px;display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid #4a3a22;border-radius:12px;background:#0b0907}
.mapShow canvas{width:100%;height:auto;border-radius:8px;background:#0b0907}.mapShow strong{color:#f1d79d}.mapShow small{color:#a3957d;font-size:12px;line-height:1.4}
.roomSettings{display:grid;grid-template-columns:repeat(3,minmax(0,200px));gap:10px;align-items:end;margin:12px 0}
.roomSettings canvas{width:100%;height:auto;border:1px solid #4a3a22;border-radius:8px}
.stepSummary{visibility:hidden}
@media (max-width:700px){.mapPicker{grid-template-columns:1fr}.mapShow{position:static;order:-1}.mapShow canvas{max-width:240px}.roomSettings{grid-template-columns:1fr 1fr}.roomSettings canvas{grid-column:1/-1;max-width:240px}.lobbyPage .factionCard{height:200px!important}}
#roomPanel .mapPicker{margin-bottom:14px}#roomPanel .mapList{max-height:340px}.mapShow canvas{cursor:pointer}
/* Room: faction with picture and stats */
.slotFaction{display:flex;align-items:center;gap:10px;min-width:0}
.slotThumb{position:relative;flex:none;width:46px;height:46px;border-radius:8px;overflow:hidden;border:1px solid #5a4528}
.slotThumb .factionPortrait svg{width:100%;height:100%}
.slotFactionText{display:flex;flex-direction:column;gap:3px;min-width:0}.slotFactionText small{color:#a3957d;font-size:11px;line-height:1.3}
.roomFactionPick{margin:14px 0 6px}
.roomFactionCards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.roomFactionCard{position:relative;display:flex;flex-direction:column;justify-content:flex-end;height:190px;padding:0!important;border-radius:12px!important;overflow:hidden;text-align:center}
.roomFactionCard .factionPortrait{inset:0 0 40% 0}.roomFactionCard .factionPortrait svg{width:100%;height:100%}
.roomFactionCard span{position:relative;z-index:1;display:flex;flex-direction:column;gap:2px;padding:6px 6px 8px;background:linear-gradient(180deg,#0c090700,#0c0907 30%)}
.roomFactionCard b{font-size:16px;color:#f1d79d}.roomFactionCard small{font-size:11px;color:#9fdfe6}.roomFactionCard em{font-style:normal;font-size:10.5px;line-height:1.3;color:#bfae88}
.roomFactionCard.chosen{border-color:var(--gold)!important;box-shadow:0 0 0 1px #000,0 0 18px #dcae5866,0 0 8px #55d3dc55!important}
@media (max-width:900px){.roomFactionCards{grid-template-columns:repeat(2,minmax(0,1fr))}.roomFactionCard{height:170px}.slotThumb{width:38px;height:38px}}

/* Match HUD: direct production at the bottom on phones; centred desktop actions. */
#match .commandDock{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(640px,calc(100% - 24px))!important;max-width:none!important;padding:6px!important;bottom:12px!important;display:block!important}
#match .commands{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px!important;width:100%!important;overflow:visible}
#match .commands button{min-width:0!important;min-height:46px!important;font-size:12px!important;padding:4px!important;line-height:1.2;white-space:normal!important}
#match .selectionStatus{position:absolute;top:12px;left:50%;transform:translateX(-50%);max-width:55%;padding:4px 10px;border:1px solid #7c613655;border-radius:4px;background:#100e0ac9;font:12px Kanit,sans-serif;color:#dfd1b0;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#match .selectionStatus[hidden],#match .actionGuide[hidden]{display:none!important}
#match .powerAlert{position:absolute;top:44px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:5px 12px;border:1px solid #ff8a6a99;border-radius:4px;background:#2a0f0ae6;font:600 13px Kanit,sans-serif;color:#ffd2c4;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 0 14px #ff5a3a44;animation:powerPulse 1.6s ease-in-out infinite}
#match .powerAlert[hidden]{display:none!important}
@keyframes powerPulse{50%{border-color:#ffb08a;box-shadow:0 0 20px #ff5a3a88}}
#match .actionGuide{top:44px;left:50%;right:auto;transform:translateX(-50%);max-width:min(440px,calc(100% - 24px));padding:5px 9px;z-index:2}
#match .actionGuide strong{font-size:12px}#match .actionGuide span{font-size:11px}
#match:not([hidden])~#toast{top:calc(78px + env(safe-area-inset-top))!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:max-content;max-width:calc(100% - 28px);font-size:12px!important;padding:5px 10px!important}
#match.placing .commandDock{display:none!important}
#match .buildConfirm{bottom:12px!important;padding:8px;max-width:calc(100% - 20px)}
#match .buildConfirm span{font-size:12px;margin-bottom:5px}
#match .buildLegend{pointer-events:none}
.drawerGrip{display:none!important}
@media (max-width:900px), (pointer:coarse) and (max-width:1200px){
 #match main{display:flex!important;flex-direction:column!important;height:calc(100dvh - 58px)!important}
 #match .matchHeader{height:58px!important;padding:0 8px!important;gap:5px!important}
 #match .matchHeader .brand{display:none!important}
 #match .resources{margin:0 auto 0 0!important;gap:12px}
 #match .resources span{font-size:10px;display:flex;flex-direction:column}
 #match .resources b{font-size:13px;margin:0}
 #match .matchHeader button{min-height:38px!important;padding:4px 8px!important;font-size:12px}
 #match .battle{flex:1 1 auto!important;min-height:100px!important;width:100%!important}
 #match aside,#match.panel-open aside{position:relative!important;inset:auto!important;width:100%!important;height:var(--drawer-h,155px)!important;max-height:var(--drawer-max-h,78dvh)!important;min-height:44px!important;flex:0 0 auto!important;display:flex!important;flex-direction:column!important;padding:2px max(8px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;border-left:0!important;border-top:1px solid var(--bronze);gap:3px!important;overflow:hidden;transition:height .2s cubic-bezier(.2,.9,.3,1)}
 #match aside.resizing{transition:none!important}
 .drawerGrip{display:flex!important;align-items:center;justify-content:center;width:100%;height:14px;min-height:14px;margin:0 0 2px;padding:3px 0;cursor:ns-resize;touch-action:none;user-select:none;-webkit-user-select:none;flex-shrink:0}
 .drawerBar{display:block;width:42px;height:4px;border-radius:2px;background:rgba(225,198,142,.45);box-shadow:0 1px 2px rgba(0,0,0,.6);transition:background .15s ease,width .15s ease,transform .15s ease}
 .drawerGrip:active .drawerBar,.drawerGrip.dragging .drawerBar{background:#ffd375;width:58px;transform:scaleY(1.35)}
 #match.drawer-tall .commandContent,#match aside.drawer-tall .commandContent{display:block!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;padding-right:2px!important}
 #match.drawer-tall .commandContent .cards,#match aside.drawer-tall .commandContent .cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(84px,1fr))!important;overflow-y:auto!important;overflow-x:hidden!important;gap:5px!important;padding:3px 0!important;touch-action:pan-y!important}
 #match.drawer-tall .commandContent .card,#match aside.drawer-tall .commandContent .card{min-height:76px!important;width:auto!important;flex:none!important}
 #match.drawer-tall .card .itemPicture,#match aside.drawer-tall .card .itemPicture{height:36px!important}
 #match.drawer-tall .queueItems,#match aside.drawer-tall .queueItems{max-height:80px!important;flex-wrap:wrap!important}
 #match .panelHandle,#match .commanderPortrait,#match .scoreboard,#match aside #help{display:none!important}
 #match aside .commandTabs{display:flex!important;flex:none!important;gap:6px!important;margin:0!important;order:0}
 #match .commandTabs button{min-height:42px!important;font-size:15px!important;padding:4px 8px!important}
 #match aside .commandContent{display:block!important;flex:0 1 auto!important;min-height:0!important;padding:0!important;overflow-y:auto!important;order:1}
 #match .commandContent section[hidden]{display:none!important}
 #match .commandContent .sectiontitle,#match .commandContent .subtle{display:none!important}
 #match .commandContent .cards{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scroll-snap-type:x proximity;padding:2px 0 4px;touch-action:pan-x}
 #match .commandContent .card{flex:0 0 88px!important;width:88px!important;min-height:86px!important;padding:4px!important;text-align:center;scroll-snap-align:start}
 #match .card .itemPicture{height:40px!important;width:100%!important;margin:0!important}
 #match .card strong{font-size:11px!important;line-height:1.25;white-space:normal}
 #match .card span:not(.itemPicture){font-size:11px!important;margin:2px 0 0}
 #match .card>small,#match .card span small{display:none!important}
 #match .productionQueue{order:2;margin:0!important;padding:0!important;min-height:0!important;border:0}
 #match aside .queue{display:flex!important;min-height:24px!important;padding:0!important;font-size:11px}
 #match .queue button{min-height:28px!important;height:28px!important;padding:0 8px!important;font-size:11px}
 #match .queueItems,#match.panel-open .queueItems{display:flex;flex-direction:row!important;max-height:35px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;gap:5px}
 #match .queueItem,#match.panel-open .queueItem{flex:0 0 148px;min-width:148px!important;min-height:30px!important;padding:2px 4px!important;gap:4px}
 #match .queueItem .itemPicture{width:24px!important;height:24px!important}
 #match .queueItem strong,#match .queueItem span:not(.itemPicture){font-size:10px!important}
 #match .queueEmpty{display:none!important}
 #match .commandDock{bottom:5px!important;width:calc(100% - 12px)!important;padding:4px!important}
 #match .commands{gap:3px!important}
 #match .commands button{min-height:44px!important;font-size:10px!important;padding:3px 1px!important;display:flex;flex-direction:column;align-items:center;justify-content:center}
 #match .commands kbd{display:none!important}
 #match .commands .hdIcon{width:18px!important;height:18px!important}
 #match .selectionStatus{top:8px;max-width:58%;font-size:11px;padding:3px 8px}
 #match .powerAlert{top:34px;font-size:11px;padding:3px 9px;white-space:normal;text-align:center;max-width:calc(100% - 24px)}
 #match .actionGuide{top:34px}
 #match .mission,#match .panPad,#match .hint{display:none!important}
 #match .mapwrap{top:12px!important;bottom:auto!important;left:auto!important;right:8px!important;width:74px!important;height:74px!important;padding:3px!important}
 #match #mini{width:100%!important;height:100%!important}
 #match .mapwrap span{display:none!important}
 #match .viewtools{top:92px!important;bottom:auto!important;left:auto!important;right:8px!important;width:74px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:3px!important}
 #match .viewtools button{min-height:34px!important;padding:2px!important;font-size:10px!important}
 #match.placing aside .commandContent,#match.placing aside .productionQueue{display:none!important}
 #match.placing aside{max-height:none!important}
 #match.placing .buildConfirm{bottom:8px!important}
 #match.placing .buildLegend{display:none!important}
 #match:not([hidden])~#toast{top:calc(61px + env(safe-area-inset-top))!important;font-size:11px!important}
}
@media (max-height:500px) and (orientation:landscape) and (max-width:1200px){
 #match main{height:calc(100dvh - 44px)!important}
 #match .matchHeader{height:44px!important}
 #match .matchHeader button{min-height:32px!important}
 #match aside,#match.panel-open aside{max-height:40dvh!important;padding-top:3px!important;padding-bottom:calc(3px + env(safe-area-inset-bottom))!important;gap:2px!important}
 #match .commandTabs button{min-height:32px!important;font-size:12px!important}
 #match .commandContent .card{flex-basis:94px!important;width:94px!important;min-height:62px!important}
 #match .card .itemPicture{height:26px!important}
 #match .productionQueue .queue{min-height:20px!important}
 #match .queueItems{display:none!important}
 #match .commands button{min-height:36px!important}
 #match .commands .hdIcon{display:none!important}
 #match .mapwrap{width:54px!important;height:54px!important;top:5px!important}
 #match .viewtools{top:64px!important;width:70px!important;grid-template-columns:repeat(4,1fr)!important;right:8px!important}
 #match .viewtools button{min-height:28px!important;font-size:9px!important;overflow:hidden}
 #match .selectionStatus{top:5px}
 #match .powerAlert{top:28px}
 #match .actionGuide{top:28px;padding:3px 8px}
 #match .actionGuide span{display:none!important}
 #match:not([hidden])~#toast{top:46px!important}
}

@media (max-height:500px) and (orientation:landscape) and (max-width:1200px){
 #match .resources .hdIcon{display:none!important}
 #match .viewtools{width:156px!important;grid-template-columns:repeat(4,36px)!important;gap:4px!important}
 #match .viewtools button{width:36px!important;min-width:36px!important;height:30px!important;grid-column:auto!important;grid-row:auto!important;white-space:normal!important;line-height:1.1}
 #match .viewtools .hdIcon{display:none!important}
}

/* Shader atmosphere (src/fx.js): transparent WebGPU layer above menu backgrounds, below all controls. */
.menuFx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:0;transition:opacity 1.2s ease;z-index:0}
.menuFx.fxOn{opacity:1}
#lobby>.menuFx{position:fixed}
#lobby>*:not(.menuFx){position:relative;z-index:1}

/* ===== Pro HUD polish: one consistent skin for the battle screen (glass panels, gold hairlines, bevelled controls).
   Layout and sizes stay as defined above; only surfaces, borders, light and motion change. ===== */
:root{--glass:linear-gradient(180deg,#1c1710f0,#0d0b08f2);--glass2:linear-gradient(180deg,#241d13f5,#120f0af5);--hair:#c99a4f55;--hair2:#f0c97a99;--glow:0 0 0 1px #00000080,0 10px 28px #000000a0,inset 0 1px 0 #ffffff12}
#match .matchHeader{background:linear-gradient(180deg,#1b150ef7,#0c0a07f2);border-bottom:1px solid transparent;border-image:linear-gradient(90deg,transparent,#e0bc7699 18%,#f5d799 50%,#e0bc7699 82%,transparent) 1;box-shadow:0 6px 22px #000000b0;backdrop-filter:blur(6px)}
#match .resources span{border:1px solid var(--hair);border-radius:8px;background:linear-gradient(180deg,#2a2217,#14100b);box-shadow:inset 0 1px 0 #ffffff14,0 2px 6px #00000080}
@media (min-width:1000px) and (min-height:560px){#match .resources span{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px}}
#match .resources b{color:var(--accent2);text-shadow:0 0 10px #f5d79944;font-variant-numeric:tabular-nums}
#match aside{background:var(--glass);border-left:1px solid var(--hair);box-shadow:-10px 0 30px #000000a0;backdrop-filter:blur(8px)}
#match button.quiet,#match .commands button,#match .viewtools button{background:linear-gradient(180deg,#2c2418,#16120c);border:1px solid var(--hair);box-shadow:inset 0 1px 0 #ffffff18,0 2px 6px #0000009a;transition:transform .12s ease,box-shadow .18s ease,border-color .18s ease,filter .18s ease}
#match button.quiet:hover:not(:disabled),#match .commands button:hover:not(:disabled),#match .viewtools button:hover:not(:disabled){border-color:var(--hair2);box-shadow:inset 0 1px 0 #ffffff22,0 0 14px #e0bc7655,0 2px 8px #000000b0;filter:brightness(1.12)}
#match button:active:not(:disabled){transform:translateY(1px) scale(.985)}
#match button:focus-visible{outline:2px solid var(--accent2);outline-offset:2px}
#match .card{border:1px solid var(--hair);border-radius:10px;background:linear-gradient(180deg,#221b12,#110d09);box-shadow:inset 0 1px 0 #ffffff12,0 4px 10px #0000008c;transition:transform .14s ease,border-color .18s ease,box-shadow .18s ease}
#match .card:hover:not(:disabled){transform:translateY(-2px);border-color:var(--hair2);box-shadow:inset 0 1px 0 #ffffff1c,0 0 16px #e0bc7644,0 8px 16px #000000a0}
#match .card:disabled{filter:grayscale(.75) brightness(.7)}
#match .mapwrap{border:1px solid var(--hair);border-radius:10px;background:var(--glass2);box-shadow:var(--glow)}
#match .mission{border:1px solid var(--hair);border-radius:10px;background:linear-gradient(180deg,#1a140ddd,#0c0a07dd);box-shadow:var(--glow);backdrop-filter:blur(4px)}
#match .selectionStatus,#match .powerAlert{border-radius:999px;backdrop-filter:blur(4px)}
@media (prefers-reduced-motion:reduce){#match .card,#match button{transition:none}}
#match .commandDock .commands{background:var(--glass);border:1px solid var(--hair);border-radius:12px;box-shadow:var(--glow);backdrop-filter:blur(6px)}

/* Rift hub title (drawRiftHub in game.js): space background with the rift and faction worlds, world dialog. */
#title .titleShade{background:linear-gradient(100deg,#040308e6 0%,#04030899 26%,#04030820 48%,transparent 62%)}
@media (max-aspect-ratio:21/20){#title .titleShade{background:linear-gradient(180deg,#040308ee 0%,#040308aa 36%,#04030800 52%)}}
#title #titleFx{opacity:.55}
.hubHint{position:absolute;right:max(24px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));margin:0;font:11px/1 "JetBrains Mono",ui-monospace,monospace;letter-spacing:.2em;text-transform:uppercase;color:#c9c2e0;opacity:.7;pointer-events:none}
#title.cracking .titleMenu,#title.cracking .hubHint{opacity:0;transition:opacity .35s ease}
.worldDialog{width:min(1040px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #c99a4f66;border-radius:16px;background:linear-gradient(180deg,#140f1df7,#08060cf7);color:var(--text);box-shadow:0 30px 80px #000c,0 0 40px #8a4dff33;overflow:auto}
.worldDialog::backdrop{background:#04030899;backdrop-filter:blur(4px)}
.worldDialog[open]{animation:riftFadeIn .35s ease both}
.worldHead{display:grid;grid-template-columns:minmax(140px,240px) 1fr;gap:20px;padding:20px;align-items:end}
.worldHead img{width:100%;aspect-ratio:2/3;object-fit:cover;object-position:50% 15%;border-radius:12px;border:1px solid #c99a4f55;box-shadow:0 12px 30px #000a}
.worldHead h2{margin:6px 0;font-size:clamp(28px,5vw,44px);color:var(--accent2)}
.worldHead p{margin:4px 0 12px}
.worldUnits{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding:0 20px 20px}
.worldUnit{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px;border:1px solid #c99a4f40;border-radius:10px;background:linear-gradient(180deg,#221a12,#0f0c09);text-align:center}
.worldUnitImg{width:96px;height:96px;background-repeat:no-repeat;image-rendering:auto}
.worldUnit b{font-size:14px}.worldUnit small{color:var(--muted);font-size:11px}
.worldClose{position:absolute;top:10px;right:10px;width:40px;height:40px;border-radius:50%}
@media (max-width:600px){.worldHead{grid-template-columns:110px 1fr;gap:12px;padding:14px}.worldUnits{grid-template-columns:repeat(2,1fr);padding:0 14px 14px}.worldUnitImg{width:80px;height:80px}}
@media (max-aspect-ratio:21/20){#title .titleMenu{top:auto;bottom:max(18px,env(safe-area-inset-bottom));gap:14px}#title .titleLogo img,#title .titleLogo .mark{display:none!important}#title .titleShade{background:linear-gradient(0deg,#040308f2 0%,#040308bb 42%,#04030800 58%)}#title .hubHint{top:max(14px,env(safe-area-inset-top));bottom:auto;left:16px;right:16px;text-align:center}}
#lobbySteps[hidden]{display:none!important}
#hub3d{position:absolute;inset:0;width:100%;height:100%;display:block}
#title #titleScene{z-index:0}#title #hub3d{z-index:0}
.hubLabels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.hubLabel{position:absolute;left:0;top:0;display:flex;align-items:center;gap:6px;margin:-8px 0 0 10px;font:11px/1.1 "JetBrains Mono",ui-monospace,monospace;letter-spacing:.12em;color:#c9c2e0;opacity:.7;transition:opacity .3s,color .3s;white-space:nowrap}
.hubLabel i{width:5px;height:5px;border-radius:50%;background:currentColor}
.hubLabel small{display:none;font:12px Kanit,system-ui,sans-serif;letter-spacing:0;color:#ffe6b8}
.hubLabel.on{opacity:1;color:#ffe6b8}.hubLabel.on small{display:inline}.hubLabel.on b{text-shadow:0 0 12px #ffd2a1aa}
@media (max-width:600px){.hubLabel b{font-size:9px}}

/* ===== Rift theme for every control (title, lobby, dialogs, battle): deep space glass, violet rift edge, gold for the
   main action. Sizes and layout stay as defined above; only surfaces, light and motion change. ===== */
:root{--rift:#b48aff;--rift2:#7ad8ff;--riftGlass:linear-gradient(180deg,#191330ee,#0b0818f2);--riftLine:#b48aff55;--riftLine2:#d8c2ffaa}
#title .titleButtons button,#lobby button:not(.mapItem):not(.factionCard):not(.roomRow):not([data-faction]):not(.colorChip),.worldDialog button,dialog button,#match button.quiet,#match .commands button,#match .viewtools button{
 background:var(--riftGlass)!important;border:1px solid var(--riftLine)!important;border-radius:14px!important;color:#ece6ff!important;
 box-shadow:inset 0 1px 0 #ffffff14,0 6px 18px #000a,0 0 0 1px #00000060!important;transition:transform .16s cubic-bezier(.2,.8,.2,1),box-shadow .2s,border-color .2s,filter .2s!important}
#title .titleButtons button:hover:not(:disabled),#lobby button:hover:not(:disabled):not(.mapItem):not(.factionCard):not(.roomRow),.worldDialog button:hover,dialog button:hover,#match button.quiet:hover:not(:disabled),#match .commands button:hover:not(:disabled),#match .viewtools button:hover:not(:disabled){
 border-color:var(--riftLine2)!important;box-shadow:inset 0 1px 0 #ffffff22,0 0 22px #9a6bff55,0 8px 22px #000b!important;transform:translateY(-1px);filter:brightness(1.1)}
#title .titleButtons button:active,#lobby button:active,dialog button:active,#match button:active:not(:disabled){transform:translateY(1px) scale(.985)!important}
#title .titleButtons button.primary,#lobby button.glowBtn:not(.a):not(.b):not(.c):not(.d),#lobby button.primary:not(.a):not(.b):not(.c):not(.d),.worldDialog button.primary,#lobby #quickPlay:not(.a):not(.b):not(.c):not(.d){
 background:linear-gradient(100deg,#ffe2a8 0%,#e0b76a 45%,#c48ef0 100%)!important;color:#1b1026!important;border-color:#fff0cc!important;
 box-shadow:0 0 0 1px #00000050,0 0 26px #c48ef055,0 8px 22px #000b,inset 0 1px 0 #ffffff80!important;text-shadow:none}
#title .titleButtons button.primary small,#lobby .glowBtn small{color:#3a2450!important}
#title .titleButtons button small{color:#b9b0d8}
#lobby button:focus-visible,#title button:focus-visible,dialog button:focus-visible{outline:2px solid var(--rift2)!important;outline-offset:3px}
/* Inner pages share the hub's space backdrop instead of brown leather. */
#lobby{background:radial-gradient(ellipse at 70% 0%,#2a1650 0%,#0d0a1c 45%,#06050c 100%) fixed!important}
#lobby .pageCard,#lobby .playModes button,#lobby .lobbySteps button,#lobby .wizardBar{background:linear-gradient(180deg,#171230e6,#0b0918ee)!important;border-color:var(--riftLine)!important}
#lobby .playModes button[aria-pressed="true"],#lobby .playModes button.chosen,#lobby .lobbySteps button.current{border-color:var(--riftLine2)!important;box-shadow:0 0 24px #9a6bff44,inset 0 0 0 1px #d8c2ff55!important}
#lobby .eyebrow{color:var(--rift2)}
#lobby h1{color:#ffe2a8;text-shadow:0 0 24px #b48aff55}
@media (prefers-reduced-motion:reduce){#title .titleButtons button,#lobby button,dialog button,#match button{transition:none!important}}

/* ===== Lobby in the rift theme: deep space with stars, a faint tear of light behind the pages, purple glass ===== */
#lobby{background:radial-gradient(ellipse 55% 42% at 50% 40%,#2a1356b0 0%,transparent 70%),radial-gradient(ellipse 80% 50% at 50% 115%,#0b2a3c 0%,transparent 60%),#07050f}
#lobby::before{content:'';position:fixed;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(2px 2px at 7% 14%,#cfe9ffff 50%,transparent 52%),radial-gradient(1px 1px at 18% 62%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 27% 31%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 36% 84%,#cfe9ffb0 50%,transparent 52%),radial-gradient(1px 1px at 44% 9%,#fffff 50%,transparent 52%),radial-gradient(2px 2px at 53% 47%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 61% 73%,#cfe9ffb0 50%,transparent 52%),radial-gradient(1px 1px at 69% 22%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 77% 58%,#fffff 50%,transparent 52%),radial-gradient(1px 1px at 86% 36%,#cfe9ffb0 50%,transparent 52%),radial-gradient(2px 2px at 93% 79%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 12% 90%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 31% 6%,#cfe9ffff 50%,transparent 52%),radial-gradient(1px 1px at 58% 92%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 82% 11%,#fffb0 50%,transparent 52%),radial-gradient(2px 2px at 97% 51%,#cfe9ffb0 50%,transparent 52%),radial-gradient(1px 1px at 4% 43%,#fffff 50%,transparent 52%),radial-gradient(1px 1px at 47% 68%,#fffb0 50%,transparent 52%),radial-gradient(1px 1px at 72% 88%,#cfe9ffb0 50%,transparent 52%),radial-gradient(1px 1px at 89% 64%,#fffb0 50%,transparent 52%);opacity:.75}
#lobby::after{content:'';position:fixed;left:50%;top:8%;bottom:8%;width:2px;margin-left:-1px;pointer-events:none;z-index:0;background:linear-gradient(180deg,transparent,#e9dcff 22%,#fff 50%,#e9dcff 78%,transparent);box-shadow:0 0 18px 4px #9b6bff77,0 0 70px 22px #6b3dff33;opacity:.3;animation:lobbyRiftPulse 3.4s ease-in-out infinite}
@keyframes lobbyRiftPulse{0%,100%{opacity:.22}50%{opacity:.42}}
@media (prefers-reduced-motion:reduce){#lobby::after{animation:none}}
#lobby .lobbyHeader{background:linear-gradient(180deg,#150f2cf0,#0a0717e8)!important;border-bottom:1px solid var(--riftLine)!important;box-shadow:0 6px 24px #000a,0 1px 0 #b48aff22!important}
#lobby .lobbyHeader::before{background:linear-gradient(90deg,transparent,var(--rift),var(--rift2),transparent)!important}
#lobby .preBattlePreview{background:var(--riftGlass)!important;border:1px solid var(--riftLine)!important;border-radius:14px;box-shadow:0 10px 30px #0009,inset 0 1px 0 #ffffff10}
#lobby .preBattlePreview canvas{border-radius:10px}
.titleScreen.riftHot #titleStart{box-shadow:0 0 0 2px #f5d799,0 0 34px 6px #b48affaa!important;transform:translateY(-1px)}
/* ===== Accounts, gold, shop and the settings gear (phone first: 48px targets, 16px inputs) ===== */
.titleAccountRow{display:flex;align-items:center;gap:10px;margin:0 0 12px;max-width:100%}
.accountChip{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 12px 6px 6px!important;border-radius:999px!important;background:linear-gradient(180deg,#1b1436ee,#0d0a1cee)!important;border:1px solid var(--riftLine)!important;color:#efe7ff;text-align:left;cursor:pointer}
.accountChip[hidden]{display:none}
.accountChip #accountName{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 15px system-ui,sans-serif}
.accountAvatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:none;background:linear-gradient(135deg,#f0cf8a,#b48aff);color:#1a1030;font:800 16px system-ui,sans-serif}
.goldTag{display:inline-flex;align-items:center;gap:5px;flex:none;padding:3px 10px;border-radius:999px;background:#0007;border:1px solid #f5c84c55;color:#ffe08a;font:700 14px system-ui,sans-serif}
.coin{width:18px;height:18px;flex:none}
.gearButton,#lobby #lobbyGear{flex:none;width:48px;height:48px;min-height:48px;padding:0!important;border-radius:50%!important;display:grid;place-items:center;background:linear-gradient(180deg,#1b1436ee,#0d0a1cee)!important;border:1px solid var(--riftLine)!important;color:#d9c8ff;cursor:pointer}
.gearButton svg{width:24px;height:24px;transition:transform .5s ease}
.gearButton:hover svg,.gearButton:focus-visible svg{transform:rotate(90deg)}
.accountDialog,.shopDialog{width:min(420px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);overflow:auto;padding:22px 20px!important;border-radius:18px!important;background:linear-gradient(180deg,#191330f7,#0b0818fa)!important;border:1px solid var(--riftLine)!important;color:#efe7ff;box-shadow:0 20px 60px #000c,0 0 0 1px #b48aff22}
.accountDialog::backdrop,.shopDialog::backdrop{background:#05030cc4;backdrop-filter:blur(4px)}
.accountDialog h2,.shopDialog h2{margin:4px 0 14px;font-size:24px;color:#f5d799}
.authTabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;margin-bottom:14px;border-radius:12px;background:#0008}
.accountDialog .authTabs button{min-height:44px;margin:0;border-radius:9px!important;background:transparent!important;border:0!important;box-shadow:none!important;color:#b9acd9;font:600 15px system-ui,sans-serif}
.accountDialog .authTabs button.on{background:linear-gradient(180deg,#3d2c70,#251a46)!important;color:#fff}
.authForm{display:grid;gap:12px}
.authForm label{display:grid;gap:6px;font-size:14px;color:#cbbfe8}
.authForm label[hidden]{display:none}
.authForm input{width:100%;min-height:48px;padding:10px 12px;border-radius:10px;border:1px solid var(--riftLine);background:#0b0818;color:#fff;font-size:16px}
.authForm input:focus{outline:2px solid var(--rift2);outline-offset:1px}
.accountDialog>div>button,.authForm button,.shopDialog>button{display:block;width:100%;min-height:48px;margin:8px 0 0}
.authError{min-height:1.2em;margin:0;color:#ff9a9a;font-size:14px}
.authOr{display:flex;align-items:center;gap:10px;margin:14px 0 10px;color:#8f84ad;font-size:13px}
.authOr::before,.authOr::after{content:'';flex:1;height:1px;background:#ffffff1f}
.googleButton{display:flex;justify-content:center;min-height:44px;margin-bottom:6px;color-scheme:light}
.googleButton[hidden]{display:none}
.authNote{margin:10px 0 0;font-size:13px;line-height:1.55;color:#a99cc9}
.authNote[hidden],#profileUpgrade[hidden]{display:none}
.profileType{margin:-8px 0 8px;color:#a99cc9}
.goldBig{display:flex;align-items:center;gap:8px;margin:6px 0 12px;font:800 30px system-ui,sans-serif;color:#ffe08a}
.goldBig .coin{width:30px;height:30px}
.goldBig span{font-size:16px;font-weight:600;color:#d9c48a}
.goldRates{display:grid;gap:6px;margin:8px 0 0;padding:0;list-style:none}
.goldRates li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:#ffffff0b;font-size:14px}
.goldRates span{color:#ffe08a;white-space:nowrap}
.shopSoon{display:grid;place-items:center;align-content:center;gap:6px;min-height:150px;margin:6px 0 4px;padding:16px;border-radius:14px;border:1px dashed #b48aff66;background:radial-gradient(ellipse at 50% 40%,#3a1f7a55,transparent 70%);text-align:center}
.shopSoon b{font-size:28px;color:#f5d799;letter-spacing:.04em}
.shopSoon span{font-size:14px;color:#bfb2e0}
.resultGold{margin:6px 0 14px;font-size:16px;color:#ffe08a}
.resultGold[hidden]{display:none}
.resultGold b{font-size:20px}
@media (max-width:560px){.accountDialog,.shopDialog{padding:18px 16px!important}.accountDialog h2,.shopDialog h2{font-size:21px}.goldBig{font-size:26px}}
@media (max-height:520px) and (orientation:landscape){.accountDialog,.shopDialog{width:min(560px,calc(100vw - 24px));padding:14px 16px!important}.shopSoon{min-height:90px}.goldRates{grid-template-columns:repeat(3,1fr)}.goldRates li{flex-direction:column;align-items:flex-start;gap:2px}}
@media (max-height:520px) and (orientation:landscape){
 #authView:not([hidden]){display:grid;grid-template-columns:1.3fr 1fr;column-gap:18px;grid-auto-flow:row dense;align-items:start}
 #authView>*{grid-column:1}
 #authView>.authOr,#authView>.googleButton,#authView>#authGuest,#authView>#authClose{grid-column:2}
 #authView>.authOr{margin-top:6px}
 .accountDialog h2{margin-bottom:8px}.authTabs{margin-bottom:8px}.authForm{gap:8px}.authForm input{min-height:44px}
 #profileView:not([hidden]){display:grid;grid-template-columns:1fr 1fr;column-gap:18px;align-items:start}
 #profileView>*{grid-column:1}#profileView>button{grid-column:2}
 #profileView{grid-auto-flow:row dense}
}
@media (max-height:520px) and (orientation:landscape){#authView>.eyebrow,#authView>h2{display:none}.authForm label{gap:3px}.authError:empty{min-height:0}}
/* Opening gate: only space and the login panel until signed in */
.titleScreen.authPending .titleMenu,.titleScreen.authGate .titleMenu,.titleScreen.authGate .hubHint{visibility:hidden;opacity:0}
.titleScreen .titleMenu{transition:opacity .5s ease}
.accountDialog.gate::backdrop{background:radial-gradient(ellipse at 50% 50%,#05030c55,#05030ccc);backdrop-filter:none}
.accountDialog.gate{box-shadow:0 20px 60px #000c,0 0 80px #6b3dff44,0 0 0 1px #b48aff33}
.gateLogo,.gateNote{display:none}
.accountDialog.gate .gateLogo{display:block;width:84px;height:84px;margin:-6px auto 4px;object-fit:contain;filter:drop-shadow(0 0 18px #7a4dff88)}
.accountDialog.gate #authView>.eyebrow{display:block;text-align:center}
.accountDialog.gate #authView>h2{text-align:center}
.accountDialog.gate .gateNote{display:block;margin:12px 0 0;text-align:center;font-size:13px;color:#a99cc9}
/* Lobby header wallet: commander, gold and the shop */
.lobbyWallet{display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0}
.lobbyWallet[hidden]{display:none}
#lobby #lobbyAccount{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;padding:4px 10px 4px 4px!important;border-radius:999px!important;background:linear-gradient(180deg,#1b1436ee,#0d0a1cee)!important;border:1px solid var(--riftLine)!important;color:#efe7ff;cursor:pointer}
#lobby #lobbyAccount .accountAvatar{width:34px;height:34px;font-size:15px}
#lobbyName{min-width:0;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 14px system-ui,sans-serif}
#lobby #lobbyShop{min-height:44px;padding:0 16px!important;border-radius:999px!important;background:linear-gradient(135deg,#f0cf8a,#c69cf0)!important;border:0!important;color:#1a1030!important;font:700 14px system-ui,sans-serif;cursor:pointer}
.lobbyWallet~.serverVersion{margin-left:0}
.onlinePlayers{display:inline-flex;align-items:center;gap:7px;margin-left:auto;padding:7px 10px;border:1px solid #66dc9b44;border-radius:999px;background:#10251bcc;color:#d9fbe6;font:600 12px system-ui,sans-serif;white-space:nowrap}
.onlinePlayers i{width:8px;height:8px;border-radius:50%;background:#42e882;box-shadow:0 0 9px #42e882aa;flex:none}
.onlinePlayers[aria-busy="true"] i{background:#8a8297;box-shadow:none}
@media (max-width:760px){.onlinePlayers{order:4;margin-left:auto}}
@media (max-width:760px){.lobbyWallet{order:5;width:100%;margin-left:0}.lobbyWallet #lobbyAccount{flex:1}#lobbyName{max-width:none;flex:1}}
@media (max-height:520px) and (orientation:landscape){.accountDialog.gate .gateLogo{display:none}}
@media (max-height:520px) and (orientation:landscape){.accountDialog.gate #authView>.eyebrow{display:none}#authView>.gateNote{grid-column:2}}
/* Gate guide on the rift: a pulsing ring on its centre and a floating label under the tear (placed by hub3d / 2D hub) */
.riftRing,.riftGuide{position:absolute;left:0;top:0;width:0;height:0;z-index:2;pointer-events:none;display:none;transition:opacity .3s ease}
.titleScreen.authGate .riftRing,.titleScreen.authGate .riftGuide{display:block}
.riftRing i{position:absolute;left:-64px;top:-64px;width:128px;height:128px;border-radius:50%;border:2px solid #e2d2ffcc;box-shadow:0 0 26px #b48aff99,inset 0 0 20px #b48aff55;animation:riftPing 2.4s ease-out infinite}
.riftRing i:nth-child(2){animation-delay:1.2s}
@keyframes riftPing{0%{transform:scale(.3);opacity:0}25%{opacity:1}100%{transform:scale(1.55);opacity:0}}
.guideBox{position:absolute;left:0;top:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 18px 10px;border-radius:14px;background:#0b0818b3;border:1px solid #b48aff66;box-shadow:0 0 30px #6b3dff55;backdrop-filter:blur(4px);white-space:nowrap;animation:guideFloat 2s ease-in-out infinite}
.guideBox svg{width:22px;height:22px;animation:guideArrow 1s ease-in-out infinite alternate}
.guideBox b{font:800 19px/1.2 system-ui,sans-serif;color:#f5d799;letter-spacing:.02em}
.guideBox small{font-size:13px;color:#d8c2ff}
@keyframes guideFloat{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-6px)}}
@keyframes guideArrow{from{transform:translateY(2px)}to{transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.riftRing i,.guideBox,.guideBox svg{animation:none}.riftRing i{opacity:.8;transform:scale(1)}.guideBox{transform:translateX(-50%)}}
@media (max-width:560px){.guideBox b{font-size:17px}.riftRing i{left:-52px;top:-52px;width:104px;height:104px}}

/* Profile pictures: chips, the profile dialog and the room player list */
.accountAvatar.hasPic,.avatarBig.hasPic{background-size:cover;background-position:center;color:transparent}
.avatarRow{display:flex;justify-content:center;margin:4px 0 10px}
.accountDialog .avatarRow .avatarPick{display:flex;flex-direction:column;align-items:center;gap:6px;width:auto;min-height:0;margin:0;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;color:#cbbfe8;cursor:pointer}
.avatarBig{width:88px;height:88px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#f0cf8a,#b48aff);color:#1a1030;font:800 34px system-ui,sans-serif;border:2px solid #f5d79988;box-shadow:0 0 24px #7a4dff55}
.avatarPick small{font-size:13px;text-decoration:underline;text-underline-offset:3px}
.memberAvatar{width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid;flex:none;margin-right:8px;vertical-align:middle}
@media (max-height:520px) and (orientation:landscape){.avatarBig{width:64px;height:64px;font-size:26px}}

.visuallyHidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;opacity:0}
.avatarRow .avatarPick{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;color:#cbbfe8;cursor:pointer;-webkit-tap-highlight-color:transparent}
.avatarRow .avatarPick:focus-visible{outline:2px solid var(--rift2);outline-offset:4px;border-radius:12px}
.avatarCam{position:absolute;top:58px;left:calc(50% + 18px);width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#f5d799;color:#1a1030;border:2px solid #191330;box-shadow:0 2px 8px #0008}
.avatarCam svg{width:18px;height:18px}
.avatarPick.busy .avatarBig{opacity:.5;animation:avatarBusy 1s ease-in-out infinite alternate}
@keyframes avatarBusy{to{opacity:.9}}
@media (max-height:520px) and (orientation:landscape){.avatarCam{top:38px;left:calc(50% + 12px);width:26px;height:26px}.avatarCam svg{width:15px;height:15px}}

/* Building actions: repair (on while repairing) and sell (armed after the first tap) */
#match .commands #repairBtn.active{border-color:#7fd46a!important;color:#c8f3b8!important;box-shadow:0 0 12px #7fd46a55}
#match .commands #sellBtn.armed{border-color:#f0705a!important;color:#ffd2c8!important;box-shadow:0 0 12px #f0705a66;animation:sellPulse .6s ease-in-out infinite alternate}
@keyframes sellPulse{to{box-shadow:0 0 20px #f0705aaa}}

/* Friends */
.friendBadge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;margin-left:6px;border-radius:99px;background:#f0705a;color:#fff;font:700 12px system-ui,sans-serif;vertical-align:middle}
.friendBadge[hidden]{display:none}
#lobby #lobbyFriends{min-height:44px;padding:0 14px!important;border-radius:999px!important;background:linear-gradient(180deg,#1b1436ee,#0d0a1cee)!important;border:1px solid var(--riftLine)!important;color:#efe7ff;font:600 14px system-ui,sans-serif;cursor:pointer}
.friendAdd{display:flex;gap:8px;margin:8px 0 4px}
.friendAdd input{flex:1;min-width:0;min-height:48px;padding:10px 12px;border-radius:10px;border:1px solid var(--riftLine);background:#0b0818;color:#fff;font-size:16px}
.accountDialog .friendAdd button{width:auto;min-width:84px;margin:0}
.friendGroup h3{margin:14px 0 6px;font-size:14px;letter-spacing:.04em;color:#cbbfe8}
.friendRow{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;background:#ffffff0a;margin-bottom:6px}
.friendPic{width:40px;height:40px;flex:none;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#f0cf8a,#b48aff);color:#1a1030;font:800 17px system-ui,sans-serif;background-size:cover;background-position:center}
.friendWho{flex:1;min-width:0;display:flex;flex-direction:column}
.friendWho b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
.friendWho small{color:#a99cc9;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.friendWho .on{font-style:normal;color:#7fd46a}
.friendActions{display:flex;gap:6px;flex:none}
.accountDialog .friendActions button{width:auto;min-height:38px;margin:0;padding:0 12px!important;font-size:13px}
.accountDialog .friendActions button.armed{border-color:#f0705a!important;color:#ffd2c8!important}
@media (max-width:380px){.friendActions{flex-direction:column}.accountDialog .friendActions button{min-height:34px}}
#friendsClose{display:block;width:100%;min-height:48px;margin-top:14px}

.downloadDialog{width:min(680px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);overflow:auto;padding:26px!important;border-radius:20px!important;background:linear-gradient(180deg,#191330f7,#0b0818fa)!important;border:1px solid var(--riftLine)!important;color:#efe7ff;box-shadow:0 20px 60px #000c,0 0 0 1px #b48aff22}
.downloadDialog::backdrop{background:#05030ccc;backdrop-filter:blur(5px)}
.downloadDialog h2{margin:5px 0 4px;color:#f5d799;font-size:26px}
.downloadIntro{margin:0 0 18px;color:#b9acd9}
.downloadChoices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.downloadCard{display:grid;grid-template-columns:38px 1fr;align-items:center;gap:8px 12px;padding:16px;border:1px solid #b48aff44;border-radius:14px;background:linear-gradient(145deg,#171329,#10101d)}
.downloadPlatformIcon{grid-row:span 2;display:grid;place-items:center;width:38px;height:38px;border:1px solid #b48aff66;border-radius:10px;color:#e4d5ff;font-size:24px}
.downloadCard h3{margin:0;color:#f1e7ff;font-size:18px}
.downloadCard p{margin:2px 0 0;color:#a99cc9;font-size:13px}
.downloadCard button{grid-column:1/-1;width:100%;margin-top:6px!important}
.downloadDialog .installStatus{min-height:44px;margin:16px 0 6px;padding:10px 12px;border-left:2px solid #b48aff;background:#b48aff12;color:#e5d8ff}
.downloadDialog .downloadNote{margin:8px 0 14px;color:#a99cc9;font-size:12px;line-height:1.65}
.downloadDialog>#downloadClose{display:block;width:100%;min-height:44px}
@media(max-width:560px){.downloadDialog{padding:20px 16px!important}.downloadDialog h2{font-size:22px}.downloadChoices{grid-template-columns:1fr}.downloadCard{grid-template-columns:34px 1fr;padding:12px}.downloadPlatformIcon{width:34px;height:34px}}

.fpsMeter{margin-left:8px;font:700 12px ui-monospace,Consolas,monospace;color:#7fd46a;white-space:nowrap;padding:2px 5px;border-radius:3px;background:rgba(0,0,0,.35)}
#networkState{padding:2px 5px;border-radius:3px;background:rgba(0,0,0,.35)}

/* Room rename (host) */
.roomTitleRow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.roomTitleRow h2{margin:0;min-width:0;overflow-wrap:anywhere}
#lobby .roomRename{min-height:36px;padding:0 12px!important;border-radius:999px!important;font:600 13px system-ui,sans-serif}
.roomRenameForm{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.roomRenameForm[hidden]{display:none}
.roomRenameForm input{flex:1 1 180px;min-width:0;min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid var(--riftLine);background:#0b0818;color:#fff;font-size:16px}
#lobby .roomRenameForm button{min-height:44px}

/* Ranked: matchmaking page, badges */
@media (min-width:1100px){.playModes{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media (min-width:901px) and (max-width:1099px){.playModes{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.rankedGrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:16px;align-items:start}
.rankCard{display:flex;align-items:center;gap:18px}
.rankBadge{width:132px;height:132px;flex:none;object-fit:contain;filter:drop-shadow(0 6px 18px #0008)}
.rankInfo{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.rankInfo>b{font-size:22px;color:#ffe9b8;overflow-wrap:anywhere}
.rankBar{height:10px;border-radius:999px;background:#ffffff1a;overflow:hidden;border:1px solid #ffffff22}
.rankBar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#7fd4ff,#c38bff);transition:width .4s}
.rankInfo small{color:#cbbfe8}
.rankQueueCard{display:flex;flex-direction:column;gap:12px}
.rankSizes{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rankSizes button{min-height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:12px}
.rankSizes button b{font-size:20px}
.rankSizes button small{font-size:12px;opacity:.8}
.rankSizes .chosen{border-color:var(--accent);box-shadow:inset 0 0 14px #e0bc7655}
.rankRules{margin:0;font-size:13px;line-height:1.6;color:#d8cff0}
.rankFind{min-height:52px;font-size:18px}
.rankSearching{display:flex;align-items:center;gap:12px;padding:12px;border-radius:12px;background:#ffffff0d;border:1px solid #ffffff22}
.rankSearching[hidden],.rankNeed[hidden]{display:none}
.rankSearching div{display:flex;flex-direction:column;flex:1;min-width:0}
.rankSearching small{color:#cbbfe8}
.rankSearching button{min-height:44px}
.rankSpinner{width:28px;height:28px;flex:none;border-radius:50%;border:3px solid #ffffff2a;border-top-color:#c38bff;animation:rankSpin 1s linear infinite}
@keyframes rankSpin{to{transform:rotate(360deg)}}
.rankNeed{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:10px;color:#ffd38a}
.rankNeed button{min-height:44px}
.rankLadder{grid-column:1/-1}
.rankLadder summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}
.rankLadderGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:10px}
.rankStep{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px}
.rankStep img{width:72px;height:72px;object-fit:contain}
.rankStep b{font-size:13px}
.rankStep small{font-size:11px;color:#cbbfe8}
.accountRank{width:30px;height:30px;object-fit:contain;flex:none;margin-left:-4px}
.accountRank[hidden]{display:none}
.memberRank{width:26px;height:26px;object-fit:contain;vertical-align:middle;margin-right:4px}
.resultRank{margin:0 0 10px;font-size:16px;color:#d8b8ff}
.resultRank[hidden]{display:none}
@media (max-width:900px){.rankedGrid{grid-template-columns:1fr}.rankBadge{width:96px;height:96px}.rankInfo>b{font-size:19px}}

/* Sound settings */
.soundSet{border:1px solid var(--riftLine,#ffffff33);border-radius:12px;padding:8px 12px 10px;margin:10px 0;display:flex;flex-direction:column;gap:6px}
.soundSet legend{padding:0 6px;font-weight:700}
.soundRow{display:grid;grid-template-columns:80px 1fr;align-items:center;gap:10px}
.soundRow input[type=range]{width:100%;min-height:32px;accent-color:#c38bff}
.soundToggle{min-width:40px;font-size:16px}
@media (max-width:480px){#match .matchHeader .soundToggle{min-width:30px!important;width:30px;padding:0!important;font-size:14px}#match .fpsMeter{margin-left:4px;font-size:11px}}
/* Phones: bigger minimap, zoom buttons and text in the match (players found the battle UI too small to use) */
@media (max-width:700px){#match .mapwrap{top:150px!important;width:124px!important;height:124px!important}#match #mini{width:116px!important;height:116px!important}#match .viewtools{top:284px!important;width:auto!important;grid-template-columns:52px 52px!important;gap:6px!important}#match .viewtools button{width:52px!important;min-width:0!important;min-height:48px!important;padding:2px!important;font-size:12px!important;overflow:hidden}.matchHeader .resources b{font-size:15px}}
@media (max-width:700px) and (max-height:700px){#match .mapwrap{top:132px!important;width:104px!important;height:104px!important}#match #mini{width:96px!important;height:96px!important}#match .viewtools{top:244px!important;grid-template-columns:48px 48px!important}#match .viewtools button{width:48px!important;min-height:42px!important}}
@media (max-height:500px) and (orientation:landscape){#match .mapwrap{top:52px!important;width:104px!important;height:104px!important}#match #mini{width:96px!important;height:96px!important}#match .viewtools{top:164px!important}.matchHeader .resources b{font-size:15px}}
/* Phone landscape: the command panel becomes a right-hand column (like the desktop layout), so the battlefield keeps the
   full screen height instead of a thin strip above the panel. */
@media (max-height:500px) and (orientation:landscape){
 #match main{flex-direction:row!important}
 #match aside,#match.panel-open aside{height:auto!important;width:min(290px,36vw)!important;flex:0 0 min(290px,36vw)!important;border-top:0!important;border-left:1px solid var(--line)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:6px 8px!important}
 #match .drawerGrip{display:none!important}
 #match aside .commandTabs{display:flex!important;flex-shrink:0}
 #match aside .commandContent{display:block!important;flex:1 1 auto;min-height:0;overflow-y:auto!important}
 #match aside .commandContent .cards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
 #match aside .card{min-height:0!important}#match aside .card .itemPicture{height:44px!important}
 #match aside .queue{display:flex!important;flex-shrink:0}
 #match .commandDock{max-width:calc(100% - 16px)!important;width:calc(100% - 16px)!important}/* the battle area already excludes the panel */
}
@media (max-height:500px) and (orientation:landscape){
 #match main{align-items:stretch!important}#match aside,#match.panel-open aside{align-self:stretch!important;max-height:none!important}
 #match aside .card{height:auto!important;max-height:none!important}
 #match .commands button{min-width:56px!important;padding:2px 4px!important;font-size:11px!important;white-space:normal!important;line-height:1.1;overflow:hidden}
}
/* Phones: a compact bottom bar and panel (players found them too big; the battlefield gets the room back) */
@media (max-width:700px) and (orientation:portrait){
 #match .commandDock{padding:4px!important;bottom:6px!important;gap:4px!important}
 #match .commands{gap:4px!important}
 #match .commands button{min-height:40px!important;padding:2px!important;font-size:11px!important;line-height:1.1}
 #match .commands .hdIcon,#match .commands button img{width:16px!important;height:16px!important}
 #match aside,#match.panel-open aside{height:var(--drawer-h,155px)!important;padding:4px 8px!important}
 #match .commandTabs{margin:0 0 4px!important}#match .commandTabs button{min-height:32px!important;height:32px!important;padding:2px!important;font-size:13px!important}
 #match .commandContent .cards{gap:4px!important}
 #match .card{min-height:0!important;padding:3px!important}#match .card .itemPicture{height:34px!important}
 #match .card strong{font-size:11px!important;line-height:1.2}#match .card span{font-size:10px!important;margin:0!important}
 #match aside .queue,#match.panel-open aside .queue{min-height:22px!important;font-size:11px!important}#match .queue button{min-height:22px!important;height:22px!important;font-size:10px!important}
}
@media (max-height:500px) and (orientation:landscape){
 #match .commandDock{padding:3px!important;bottom:4px!important}
 #match .commands button{min-height:36px!important;font-size:11px!important}
 #match .commands .hdIcon,#match .commands button img{width:16px!important;height:16px!important}
}
@media (max-width:700px) and (orientation:portrait){
 #match .commands .hdIcon,#match .commands button img{display:none!important}
 #match .commands button{min-height:38px!important}
 #match aside,#match.panel-open aside{height:var(--drawer-h,155px)!important}
 #match .card .itemPicture,#match .commandContent .card .itemPicture{height:28px!important;min-height:0!important}
 #match .viewtools{grid-template-columns:46px 46px!important}#match .viewtools button{width:46px!important;min-height:42px!important}
}
/* Command symbols: desktop keeps the text buttons; phones show symbols only, plus "!" that explains them. */
.cmdGlyph{display:none;font-style:normal}.cmdHelp{display:none}
.cmdHelpList{list-style:none;padding:0;margin:10px 0;display:grid;gap:8px}.cmdHelpList li{display:grid;grid-template-columns:40px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;margin:0!important}
.cmdHelpList i{grid-row:1/3;display:grid;place-items:center;width:40px;height:40px;border:1px solid #5a4528;border-radius:8px;background:#1d1711;font:20px/1 Kanit,sans-serif;font-style:normal}.cmdHelpList i img{width:28px;height:28px}
.cmdHelpList b{font-size:15px;color:var(--accent2)}.cmdHelpList span{font-size:13px;color:#c5d1d8;line-height:1.5}
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){
 html,body{overflow-x:hidden}
 #match .matchHeader{overflow:hidden;gap:4px!important}#match .matchHeader .resources{flex:1 1 auto;min-width:0;gap:6px!important}#match .matchHeader button{flex:0 0 auto;padding:3px 7px!important}
 #match .fpsMeter{font-size:10px!important;white-space:nowrap}
 #match .commandDock{width:auto!important;max-width:calc(100% - 12px)!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;padding:4px!important}
 #match .commands{display:flex!important;gap:4px!important;overflow-x:auto;width:auto!important}
 #match .commands button{flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;border-radius:10px!important}
 #match .commands button[hidden]{display:none!important}
 #match .cmdLabel,#match .commands kbd{display:none!important}
 #match .cmdGlyph{display:block!important;font-size:20px;line-height:1}
 #match .commands .hdIcon,#match .commands button img{display:block!important;width:26px!important;height:26px!important;margin:0!important}
 #match .commands .hdIcon~.cmdGlyph{display:none!important}
 #match .commandDock .commands button.cmdHelp{display:flex!important;font:700 22px/1 Kanit,sans-serif!important;color:#1a1308!important;background:linear-gradient(180deg,#f5d799,#e0bc76)!important;border-color:#9c7236!important;opacity:1!important}
 #match .panelFold{flex:0 0 40px!important;min-width:40px!important;padding:0!important;font-size:14px!important}
 #match.panel-folded aside .commandContent,#match.panel-folded aside .queue,#match.panel-folded aside .productionQueue{display:none!important}
 #match.panel-folded aside{height:auto!important;padding-top:4px!important;padding-bottom:calc(4px + env(safe-area-inset-bottom))!important}
}
@media (max-height:500px) and (orientation:landscape){
 #match.panel-folded aside{width:60px!important;flex:0 0 60px!important;padding:4px!important}
 #match.panel-folded aside .commandTabs{flex-direction:column!important;gap:4px!important}
 #match.panel-folded aside .commandTabs button{min-width:0!important;width:100%!important;flex:0 0 auto!important;font-size:12px!important;padding:2px!important;min-height:38px!important}
 #match .commands button{flex-basis:40px!important;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important}
}

/* Command bar on every screen: symbol buttons (tooltip = name + shortcut, the key shown in the corner on PC) and "!" */
#match .commandDock{width:auto!important;max-width:calc(100% - 24px)!important}
#match .commands{display:flex!important;gap:5px!important;justify-content:center;width:auto!important}
#match .commands button{flex:0 0 50px!important;width:50px!important;min-width:50px!important;height:50px!important;min-height:50px!important;padding:0!important;position:relative;display:flex!important;align-items:center;justify-content:center;border-radius:10px!important}
#match .commands button[hidden]{display:none!important}
#match .cmdLabel{display:none!important}
#match .cmdGlyph{display:block!important;font-size:22px;line-height:1;font-style:normal}
#match .commands .hdIcon,#match .commands button img{display:block!important;width:32px!important;height:32px!important;margin:0!important}
#match .commands .hdIcon~.cmdGlyph{display:none!important}
#match .commands kbd{display:block!important;position:absolute;right:4px;bottom:2px;font:600 10px/1 monospace;color:#d9c38f;background:none!important;border:0!important;padding:0!important;box-shadow:none!important;opacity:.85}
#match .commandDock .commands button.cmdHelp{display:flex!important;font:700 24px/1 Kanit,sans-serif!important;color:#1a1308!important;background:linear-gradient(180deg,#f5d799,#e0bc76)!important;border-color:#9c7236!important;opacity:1!important}
#rally .cmdGlyph,.rallyGlyph{color:#ffc24a!important;text-shadow:0 0 6px #ff9b2d99}
/* Phones and tablets: buttons share the bar width (narrow phones keep every button on screen); no key letters */
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){
 #match .commandDock{width:calc(100% - 12px)!important;max-width:470px!important}
 #match .commands button{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:46px;height:42px!important;min-height:42px!important}
 #match .commands kbd{display:none!important}
 #match .commands .hdIcon,#match .commands button img{width:24px!important;height:24px!important}
 #match .cmdGlyph{font-size:19px}
 /* header: icon + number on one line, no stacked labels */
 #match .matchHeader .resources span{font-size:0!important;display:flex!important;flex-direction:row!important;align-items:center;gap:3px;white-space:nowrap}
 #match .matchHeader .resources .hdIcon{display:block!important;width:16px!important;height:16px!important;margin:0!important}
 #match .matchHeader .resources b{font-size:13px!important;margin:0!important;white-space:nowrap}
 #match #networkState{font:700 10px ui-monospace,Consolas,monospace!important;max-width:none!important;white-space:nowrap!important;padding:2px 4px;border-radius:3px;background:rgba(0,0,0,.35)}
}
@media (max-width:480px){
 #match .fpsMeter{display:inline-block!important;font-size:10px!important;margin-left:3px;padding:2px 4px;border-radius:3px;background:rgba(0,0,0,.35)}
 #match #networkState{font-size:10px!important}
}
/* Phone portrait: small minimap and view buttons in the top-left corner */
@media (max-width:700px) and (orientation:portrait){
 #match .mapwrap{top:8px!important;left:8px!important;right:auto!important;bottom:auto!important;width:92px!important;height:92px!important;padding:3px!important}
 #match #mini{width:86px!important;height:86px!important}
 #match .viewtools{top:106px!important;left:8px!important;right:auto!important;bottom:auto!important;width:auto!important;grid-template-columns:44px 44px!important;gap:4px!important}
 #match .viewtools button{width:44px!important;min-width:0!important;height:36px!important;min-height:36px!important;padding:1px!important;font-size:11px!important}
 #match .viewtools .hdIcon{display:none!important}
 #match .actionGuide{top:8px!important;left:108px!important;right:8px!important;max-width:none!important}
 #match .selectionStatus{left:auto!important;right:8px!important;transform:none!important;max-width:calc(100% - 120px)!important}
}
/* Phone landscape: minimap top-left, view buttons in one row beside it, command bar at the bottom: nothing overlaps */
@media (max-height:500px) and (orientation:landscape){
 #match .mapwrap{top:6px!important;left:6px!important;right:auto!important;bottom:auto!important;width:80px!important;height:80px!important;padding:2px!important}
 #match #mini{width:76px!important;height:76px!important}
 #match .viewtools{top:6px!important;left:92px!important;right:auto!important;bottom:auto!important;width:auto!important;grid-template-columns:repeat(4,40px)!important;gap:4px!important}
 #match .viewtools button{width:40px!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:1px!important;font-size:10px!important;grid-column:auto!important;grid-row:auto!important}
 #match .viewtools .hdIcon{display:none!important}
 #match .commandDock{bottom:4px!important;max-width:min(470px,calc(100% - 12px))!important}
 #match .commands button{max-width:42px;height:38px!important;min-height:38px!important}
 #match .actionGuide{top:46px!important;left:92px!important;right:auto!important}
 #match .selectionStatus{top:6px!important;left:auto!important;right:8px!important;transform:none!important;max-width:40%!important}
}
/* the panel fold is for phones and tablets only (the desktop side panel does not fold) */
.panelFold{display:none!important}
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){#match .panelFold{display:flex!important;align-items:center;justify-content:center}}
/* map size badges: small cyan, medium green, large orange-red (medium and large used to share the gold) */
.mapSize.p2{color:#9ff0f6!important;border-color:#2c6d74!important;background:#0c2a2e99}
.mapSize.p4{color:#b6f09a!important;border-color:#3f7a2c!important;background:#14290c99}
.mapSize.p6{color:#ffb38a!important;border-color:#a8492a!important;background:#2e120a99}.mapSize.p8{color:#d9b3ff!important;border-color:#7045a0!important;background:#211331cc}

/* ===== Phone overlap fixes (checked on 320-430 px portrait, 568-932 px landscape with the browser bar) ===== */
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){
 /* header: everything shrinks instead of overlapping */
 #match .matchHeader{flex-wrap:nowrap!important;overflow:hidden}
 #match .matchHeader .resources{flex:1 1 0!important;min-width:0!important;overflow:hidden;flex-wrap:nowrap!important}
 #match .matchHeader .resources span{flex:0 1 auto!important;min-width:0!important;padding-left:4px!important;padding-right:4px!important}
 #match .matchHeader .resources b{overflow:hidden;text-overflow:clip}
 #match .matchHeader button{flex:0 0 auto!important;min-width:34px!important;padding:3px 6px!important;font-size:12px!important}
 #match #networkState,#match .fpsMeter{flex:0 1 auto;min-width:0}
 /* hints sit just above the command bar, one short line, never over the minimap or buttons */
 #match .actionGuide{top:auto!important;bottom:62px!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;max-width:calc(100% - 16px)!important;width:max-content;padding:3px 10px!important;pointer-events:none;text-align:center}
 #match .actionGuide strong{font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
 #match .actionGuide span{display:none!important}
 #match:not([hidden])~#toast{top:auto!important;bottom:calc(var(--toastBottom,220px) + env(safe-area-inset-bottom))!important;font-size:12px!important;max-width:calc(100% - 24px)!important}
}
@media (max-width:700px) and (orientation:portrait){
 #match:not([hidden])~#toast{--toastBottom:262px}#match.panel-folded:not([hidden])~#toast{--toastBottom:154px}
 .hubHint{display:none!important}
}
@media (max-height:500px) and (orientation:landscape){
 #match .actionGuide{bottom:50px!important}
 #match:not([hidden])~#toast{--toastBottom:84px;left:8px!important;right:calc(min(290px,36vw) + 8px)!important;transform:none!important;margin:0 auto;width:max-content}
 #match.panel-folded:not([hidden])~#toast{right:68px!important}
 /* lobby: a slim header so the steps keep the screen */
 .lobbyHeader{min-height:0!important;height:auto!important;padding-top:4px!important;padding-bottom:4px!important;gap:4px 12px!important}
 .lobbyHeader .serverVersion,.lobbyHeader .connection{display:none!important}
 .lobbySteps{padding:4px 4px 8px!important}.lobbySteps button{min-height:36px!important}
}
/* loading screen: logo, title and progress stack in one column (no overlap on short screens) */
.loadingScreen{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:clamp(6px,2vh,18px)!important}
.loadingScreen[hidden]{display:none!important}
.loadFoot{position:static!important;transform:none!important;margin-top:clamp(8px,4vh,40px)}
@media (max-height:500px){.loadLogo{width:clamp(56px,22vh,110px)!important}.loadTitle{font-size:clamp(16px,6vh,26px)!important}.loadFoot{margin-top:4px;gap:5px!important}.loadTip{font-size:11px!important}}
@media (max-width:700px) and (orientation:portrait){#match:not([hidden])~#toast{left:104px!important;right:8px!important;transform:none!important;width:auto!important;text-align:center}}
@media (max-width:380px){#match #networkState{display:none!important}#match .matchHeader .resources{gap:3px!important}#match .matchHeader .resources span{padding-left:2px!important;padding-right:2px!important;gap:2px!important}#match .matchHeader .resources .hdIcon{width:12px!important;height:12px!important}#match .matchHeader .resources b{font-size:11px!important}#match .matchHeader button{min-width:30px!important;padding:2px 4px!important;font-size:11px!important}}
@media (max-height:500px) and (orientation:landscape){#match .actionGuide{bottom:60px!important}#match:not([hidden])~#toast{--toastBottom:94px}}
@media (min-width:701px) and (min-height:501px) and (pointer:coarse) and (max-width:1200px){#match:not([hidden])~#toast{top:calc(66px + env(safe-area-inset-top))!important;bottom:auto!important}}
/* short portrait phones (e.g. 320x480 under the browser bar): a compact title menu that fits the screen */
@media (max-width:700px) and (orientation:portrait) and (max-height:640px){.titleMenu{top:max(8px,env(safe-area-inset-top))!important;gap:10px!important}.titleLogo img{width:52px!important}.titleLogo h1{font-size:28px!important}.titleLogo p{display:none!important}.titleButtons{gap:6px!important}.titleButtons button{min-height:40px!important;font-size:14px!important;padding:6px 10px!important}}

/* match header: resources on the left, one gear on the right; its drop-down holds pause, sound, graphics, menu */
#match .matchHeader{position:relative}
#match .hudGear{flex:0 0 auto!important;min-width:42px!important;width:42px;height:38px!important;min-height:38px!important;padding:0!important;font-size:22px!important;line-height:1;border-radius:10px!important;margin-left:6px}
#match .hudGear.active{border-color:var(--accent)!important;background:#3a3528!important}
.hudMenu{position:fixed;z-index:60;top:60px;right:8px;display:flex;flex-direction:column;gap:6px;padding:8px;min-width:170px;border:1px solid #7c6136;border-radius:10px;background:linear-gradient(180deg,#1a140ef5,#0c0a07f5);box-shadow:0 10px 30px #000c}
.hudMenu[hidden]{display:none!important}
.hudMenu button{width:100%!important;min-height:42px!important;text-align:left;padding:6px 12px!important;font-size:14px!important;flex:none!important}

/* group slots (touch screens): right edge of the battlefield above the command bar */
.groupBar{display:none}
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){
 #match .groupBar{position:absolute;z-index:6;right:8px;bottom:64px;display:flex;flex-direction:column;gap:5px}
 #match .groupBar button{position:relative;width:42px!important;min-width:42px!important;height:38px!important;min-height:38px!important;padding:0!important;font:700 16px/1 Kanit,sans-serif!important;border-radius:10px!important;opacity:.75;-webkit-touch-callout:none;user-select:none;touch-action:manipulation}
 #match .groupBar button.filled{opacity:1;border-color:var(--accent)!important;color:#f5d799!important}
 #match .groupBar button[data-count]:not([data-count=""]):after{content:attr(data-count);position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#e0bc76;color:#1a1308;font:700 11px/18px Kanit,sans-serif}
 #match.placing .groupBar{display:none!important}
}
@media (max-height:500px) and (orientation:landscape){#match .groupBar{bottom:auto;top:46px;flex-direction:column}#match .groupBar button{height:34px!important;min-height:34px!important}}
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){#match .actionGuide{max-width:calc(100% - 116px)!important}}
/* messages leave room for the group buttons on the right edge */
@media (max-width:700px) and (orientation:portrait){#match:not([hidden])~#toast{right:58px!important}}
@media (max-height:500px) and (orientation:landscape){#match:not([hidden])~#toast{right:calc(min(290px,36vw) + 58px)!important}#match.panel-folded:not([hidden])~#toast{right:118px!important}}

/* No flash when tapping or clicking the battlefield: the browser tap highlight covered the whole canvas and the
   focused canvas drew an outline around the map on every order. */
html,body,#match,#match *{-webkit-tap-highlight-color:transparent}
#game,#game:focus,#game:focus-visible,#mini:focus,#mini:focus-visible{outline:none}

/* Card lists scroll both ways by touch: in landscape the panel is a column and the cards scroll up and down
   (pan-x alone blocked vertical swipes there). */
#match .commandContent .cards,#match .commandContent,#match aside{touch-action:pan-x pan-y}

/* Ranked party: invites, members, invite list (friend rows reused) */
.rankPartyCard{grid-column:1/-1;display:flex;flex-direction:column;gap:10px}
.rankPartyCard h3{margin:0 0 6px;font-size:14px;letter-spacing:.04em;color:#cbbfe8}
.rankPartyNote{margin:0;font-size:13px;line-height:1.6;color:#cbbfe8}
.rankPartyActions{display:flex;gap:8px;flex-wrap:wrap}
.rankPartyActions button{min-height:44px;padding:0 18px;border-radius:999px}
.rankPartyActions button[hidden]{display:none}
.rankInviteList{display:flex;flex-direction:column;max-height:260px;overflow-y:auto;touch-action:pan-y}
.rankInviteList[hidden]{display:none}
.rankPartyCard .friendActions button{min-height:38px;padding:0 14px;font-size:13px}
.rankInvite{border:1px solid var(--accent);box-shadow:inset 0 0 14px #e0bc7633}
#rankFind:disabled{opacity:.7;cursor:default}
/* "+ เพื่อน" next to a player's name in an online room */
.roomFriend{display:inline-flex;align-items:center;margin-left:8px;min-height:26px;padding:0 10px!important;border-radius:999px!important;font:600 12px system-ui,sans-serif!important;vertical-align:middle;width:auto!important}
button.roomFriend{background:linear-gradient(180deg,#3a2a62,#21173d)!important;border:1px solid var(--riftLine)!important;color:#efe7ff!important;cursor:pointer}
span.roomFriend{color:#7fd46a;border:1px solid #7fd46a55}
/* the friends dialog never scrolls sideways */
.friendsDialog{overflow-x:hidden}

/* START GAME: a round portal beside the rift, leaving its bright center visible. */
#title #titleStart.riftOrb{position:absolute!important;left:50%;top:50%;z-index:7!important;box-sizing:border-box!important;width:clamp(128px,17vmin,176px)!important;height:clamp(128px,17vmin,176px)!important;min-width:0!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0 10px!important;border-radius:50%!important;transform:translate(-50%,-50%)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;text-align:center!important;overflow:visible!important;
 background:radial-gradient(circle at 50% 38%,#3a2160ee 0%,#1c1038e6 55%,#0b0718f0 100%)!important;border:2px solid #f3d48c!important;color:#fff6dc!important;cursor:pointer;pointer-events:auto!important;
 box-shadow:0 0 30px #9b5cff99,0 0 70px #dcae5840,inset 0 0 24px #b48aff55!important;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
 animation:riftOrbPulse 3s ease-in-out infinite!important;transition:transform .2s cubic-bezier(.34,1.56,.64,1),opacity .35s ease,border-color .2s!important}
#title #titleStart.riftOrb::before{content:''!important;position:absolute!important;inset:-9px!important;width:auto!important;height:auto!important;top:auto;left:auto;border-radius:50%!important;border:1.5px dashed #7fe3ec88!important;background:none!important;transform:none;animation:riftOrbSpin 22s linear infinite!important;pointer-events:none}
#title #titleStart.riftOrb::after{content:''!important;position:absolute!important;inset:-18px!important;width:auto!important;height:auto!important;border-radius:50%!important;border:1px solid #dcae5840!important;background:none!important;transform:none;animation:riftOrbBreathe 3s ease-in-out infinite!important;pointer-events:none}
#title #titleStart.riftOrb:hover,.titleScreen.riftHot #title #titleStart.riftOrb,.titleScreen.riftHot #titleStart.riftOrb{transform:translate(-50%,-50%) scale(1.08)!important;border-color:#fff0c7!important;box-shadow:0 0 50px #b48affcc,0 0 100px #dcae5870,inset 0 0 30px #dcae5855!important}
#title #titleStart.riftOrb:active{transform:translate(-50%,-50%) scale(.95)!important}
#title #titleStart.riftOrb span{display:block!important;font:900 clamp(14px,2vmin,19px)/1.1 Cinzel,Georgia,serif!important;letter-spacing:.14em!important;color:#fff6dc!important;text-shadow:0 0 12px #f3d48c,0 2px 4px #000!important;white-space:nowrap}
#title #titleStart.riftOrb small{display:block!important;margin:0!important;font:400 clamp(10px,1.3vmin,12px)/1.25 Kanit,system-ui,sans-serif!important;letter-spacing:0!important;color:#e5ccff!important;opacity:1!important;text-shadow:0 1px 3px #000!important}
.titleScreen.authPending #titleStart,.titleScreen.authGate #titleStart,#title.cracking #titleStart{opacity:0!important;pointer-events:none!important}
@media(max-height:540px) and (orientation:landscape){#title #titleStart.riftOrb{width:112px!important;height:112px!important}}
/* Mobile resource HUD: the labels were hidden without replacement icons, leaving bare values. */
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){
 #match .matchHeader .resources span{font-size:0!important;display:flex!important;flex:0 0 auto!important;flex-direction:row!important;align-items:center;gap:4px!important;white-space:nowrap;overflow:visible!important}
 #match .matchHeader .resources span::before{font-size:15px!important;line-height:1;opacity:.95}
 #match .matchHeader .resources span:nth-child(1)::before{content:'◈';color:#f0c66f}
 #match .matchHeader .resources span:nth-child(2)::before{content:'⚡';color:#86dcf2}
 #match .matchHeader .resources span:nth-child(3)::before{content:'⚔';color:#e8b4ff}
 #match .matchHeader .resources b{font-size:12px!important;line-height:1.2;overflow:visible!important}
}
@media (max-width:380px){#match .fpsMeter{display:none!important}}
/* Mobile game gestures: let the game canvas own single finger panning and two finger zoom. */
#game{touch-action:none}

/* Use the loading screen wordmark type on the title screen and keep mobile controls inside the viewport. */
#title .titleLogo h1{font-family:'Cinzel Decorative',Cinzel,serif!important;font-weight:900!important;font-size:clamp(22px,4vmin,34px)!important;letter-spacing:.14em!important}
#title .titleLogo h1 b{font-family:Cinzel,serif!important;font-weight:800!important;letter-spacing:.3em!important;margin-left:.3em!important}
#title .titleMenu{inset:0!important;top:0!important;right:0!important;bottom:0!important;left:0!important;width:100%!important;height:100%!important}
@media (max-width:700px) and (orientation:portrait){
 #title .titleLogo{top:max(12px,env(safe-area-inset-top))!important;left:max(12px,env(safe-area-inset-left))!important;gap:7px!important}
 #title .titleLogo img{display:block!important;width:36px!important;height:36px!important;object-fit:contain}
 #title .titleLogo .mark{display:none!important}
 #title .titleLogo h1{font-size:clamp(18px,5vw,22px)!important;letter-spacing:.04em!important}
 #title .titleLogo h1 b{letter-spacing:.12em!important;margin-left:2px!important}
 #title .titleLogo p{display:none!important}
 #title .titleAccountRow{top:calc(58px + env(safe-area-inset-top))!important;left:auto!important;right:max(12px,env(safe-area-inset-right))!important;gap:6px!important;max-width:calc(100% - 24px)}
 #title .accountChip{max-width:calc(100vw - 64px);min-width:0;padding:4px 9px!important;font-size:12px!important}
 #title #accountName{display:block;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #title #titleOptions{width:36px!important;height:36px!important;min-height:36px!important;flex:0 0 36px}
 #title #titleStart.riftOrb{left:50%!important;top:57%!important;width:clamp(132px,38vw,168px)!important;height:clamp(132px,38vw,168px)!important}
 #title .hubHint{top:auto!important;bottom:calc(42px + env(safe-area-inset-bottom))!important;left:12px!important;right:12px!important;max-width:none!important;text-align:center!important;font-size:10px!important}
 #titleVersion{left:max(12px,env(safe-area-inset-left))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;font-size:9px!important}
}
@media (max-width:900px) and (orientation:landscape) and (max-height:560px){
 #title .titleLogo{top:max(8px,env(safe-area-inset-top))!important;left:max(12px,env(safe-area-inset-left))!important;gap:8px!important}
 #title .titleLogo img{display:block!important;width:32px!important;height:32px!important;object-fit:contain}
 #title .titleLogo .mark{display:none!important}
 #title .titleLogo h1{font-size:clamp(16px,3vw,22px)!important;letter-spacing:.08em!important}
 #title .titleLogo h1 b{letter-spacing:.16em!important;margin-left:2px!important}
 #title .titleLogo p{display:none!important}
 #title .titleAccountRow{top:max(8px,env(safe-area-inset-top))!important;right:max(12px,env(safe-area-inset-right))!important;gap:6px!important}
 #title #titleOptions{width:34px!important;height:34px!important;min-height:34px!important}
 #title #titleStart.riftOrb{left:62%!important;top:62%!important;width:112px!important;height:112px!important}
 #title .hubHint{display:none!important}
 #titleVersion{left:max(12px,env(safe-area-inset-left))!important;bottom:max(6px,env(safe-area-inset-bottom))!important;font-size:9px!important}
}
@media (max-width:900px),(pointer:coarse) and (max-width:1200px){.hubLabels{display:none!important}}
/* Keep map zoom controls above the battle panel and overlays on touch screens. */
#match .viewtools{z-index:25;pointer-events:auto}
#match .viewtools button{touch-action:manipulation;pointer-events:auto}
/* Title wordmark and launch button: brighter lettering with a cleaner sci-fi typeface. */
#title .titleLogo h1{
 background-image:linear-gradient(180deg,#fffdf4 0%,#ffe8ab 48%,#f5ca69 100%)!important;
 color:transparent!important;-webkit-text-fill-color:transparent!important;-webkit-text-stroke:0!important;
 filter:drop-shadow(0 2px 5px #000) drop-shadow(0 0 7px #f4d88a66)!important;
}
#title .titleLogo h1 b{
 background-image:linear-gradient(180deg,#ffffff 0%,#c9fbff 48%,#76e6ef 100%)!important;
 color:transparent!important;-webkit-text-fill-color:transparent!important;-webkit-text-stroke:0!important;
 filter:drop-shadow(0 1px 5px #000) drop-shadow(0 0 7px #6fe8f288)!important;
}
#title .titleLogo p{color:#ffe7a6!important;text-shadow:0 1px 3px #000,0 0 8px #e6bf6c66!important}
#title #titleStart.riftOrb span{
 font:700 clamp(16px,2.2vmin,21px)/1.1 Rajdhani,Kanit,system-ui,sans-serif!important;
 letter-spacing:.08em!important;color:#fff9e9!important;-webkit-text-fill-color:#fff9e9!important;
 text-shadow:0 1px 2px #000,0 0 10px #f5dda7aa!important;
}
#title #titleStart.riftOrb small{
 font:500 clamp(10px,1.35vmin,13px)/1.3 Kanit,system-ui,sans-serif!important;
 color:#fff0d2!important;-webkit-text-fill-color:#fff0d2!important;
 text-shadow:0 1px 3px #000,0 0 8px #c7a5ff77!important;
}
/* Solid high contrast wordmark: avoid clipped gradients and dark centres on mobile renderers. */
#title .titleLogo h1{
 background:none!important;background-clip:border-box!important;-webkit-background-clip:border-box!important;
 color:#ffe8ad!important;-webkit-text-fill-color:#ffe8ad!important;-webkit-text-stroke:0!important;
 text-shadow:0 2px 2px #09060c,0 0 10px #f6d88a88!important;filter:none!important;
}
#title .titleLogo h1 b{
 background:none!important;background-clip:border-box!important;-webkit-background-clip:border-box!important;
 color:#c9faff!important;-webkit-text-fill-color:#c9faff!important;-webkit-text-stroke:0!important;
 font-weight:900!important;letter-spacing:.2em!important;
 text-shadow:0 2px 2px #071014,0 0 10px #75e8f088!important;filter:none!important;
}
#title .titleLogo p{color:#fff0c4!important;text-shadow:0 1px 3px #000,0 0 6px #e6bf6c77!important}
#title #titleStart.riftOrb span{
 font:700 clamp(15px,2.1vmin,19px)/1.15 Kanit,system-ui,sans-serif!important;
 letter-spacing:.05em!important;color:#fff5dd!important;-webkit-text-fill-color:#fff5dd!important;
 text-shadow:0 2px 2px #080512,0 0 8px #f5dda777!important;
}
#title #titleStart.riftOrb small{
 font:500 clamp(10px,1.35vmin,13px)/1.3 Kanit,system-ui,sans-serif!important;
 color:#fff3dc!important;-webkit-text-fill-color:#fff3dc!important;
 text-shadow:0 1px 3px #080512,0 0 7px #c7a5ff66!important;
}
