:root{color-scheme:dark;--bg:#0b0e12;--panel:#12171e;--line:#252d37;--muted:#8b99a9;--text:#e8edf3;--gold:#edbd69;--green:#83c7ad}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.6 'Segoe UI',sans-serif}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #b98a46;background:var(--gold);color:#17150f;padding:11px 18px;font-weight:650;border-radius:4px;transition:.18s}button:hover:enabled{filter:brightness(1.12);transform:translateY(-1px)}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #fff;outline-offset:4px}input,select{display:block;width:100%;padding:11px 12px;border:1px solid #364252;border-radius:4px;background:#0c1118;color:var(--text);margin:6px 0 16px}label{color:#b8c2ce;font-size:13px}h1,h2,h3,p{margin-top:0}h1{font-size:38px;line-height:1.2;font-weight:600;letter-spacing:-1.1px}h2{font-size:23px}h3{font-size:17px;font-weight:600}p{color:var(--muted)}small{color:var(--muted)}[hidden]{display:none!important}.brand{font-weight:850;font-size:40px;letter-spacing:2px;color:#f2f0e8;text-decoration:none;line-height:1}.brand span{color:var(--gold)}.brand small{display:block;font-size:10px;letter-spacing:7px;color:var(--gold);padding-top:10px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--gold);font-weight:600}.landing{min-height:100vh;padding:70px 10%;background:radial-gradient(ellipse at 70% 40%,#25313a55,transparent 60%),linear-gradient(120deg,#10161d,#090c10);position:relative}.landing .eyebrow{margin-top:65px}.landing h1{font-size:64px}.landing .intro{font-size:17px;line-height:1.8}.landing form{position:absolute;right:10%;top:25%;width:360px;padding:32px;background:#141b23;border:1px solid var(--line);box-shadow:0 20px 70px #0005;border-top:2px solid var(--gold)}.landing form button{width:100%;margin-top:8px}.local-note{font-size:10px;letter-spacing:2px;margin-top:70px}.text-button{background:transparent;border:0;color:var(--muted);font-size:12px;padding:8px 0}#auth-error{color:#f19a8f;margin:12px 0 0}#game{display:flex;min-height:100vh}aside{position:fixed;width:220px;top:0;bottom:0;border-right:1px solid var(--line);padding:35px 22px;background:#0e1218;display:flex;flex-direction:column}aside .brand{margin:0 14px}.world-label{font-size:9px;letter-spacing:1px;margin:30px 0;color:var(--muted)}i{display:inline-block;width:6px;height:6px;background:var(--green);border-radius:50%;margin-right:7px}nav{display:grid;gap:7px}nav button{background:none;color:var(--muted);border:1px solid transparent;text-align:left;display:flex;gap:15px;font-weight:400;padding:11px 13px}nav button.active{color:var(--gold);background:#edbd6910;border-color:#edbd6929}nav button:first-letter{font-size:19px}.commander{margin-top:auto;padding:25px 12px 0;border-top:1px solid var(--line)}.commander b,.commander small{display:block}.commander small{font-size:9px;letter-spacing:1px}main{margin-left:220px;width:calc(100% - 220px);padding:0 36px}header{display:flex;justify-content:space-between;align-items:center;min-height:116px;border-bottom:1px solid var(--line);gap:20px}header h2{margin:5px 0 0;font-size:22px}.resources{display:flex;gap:35px}.resources>div{min-width:100px}.resources span{font-size:11px;color:var(--gold)}.resources b{display:block;font-size:22px;font-weight:550}.resources small{font-size:10px;color:var(--muted)}#content{padding-top:30px;min-height:calc(100vh - 175px)}.hero{position:relative;display:flex;min-height:290px;padding:35px;border:1px solid #343a3d;background:linear-gradient(105deg,#1e252b,#111923);overflow:hidden}.hero>div:first-child{position:relative;z-index:2}.hero h1{margin-bottom:18px}.hero button{font-size:12px;padding:9px 17px}.city-art{position:absolute;width:380px;height:280px;right:10px;bottom:0;opacity:.85;background:radial-gradient(ellipse at 55% 80%,#e9b45728,transparent 65%)}.orbit{position:absolute;width:210px;height:210px;border:1px solid #edbd6933;transform:rotateX(55deg) rotateZ(-20deg);border-radius:50%;left:90px;top:30px;box-shadow:0 0 0 35px #edbd6904,0 0 0 36px #edbd6911}.tower{position:absolute;bottom:50px;background:linear-gradient(95deg,#293340,#111922);border:1px solid #64717d;transform:skewY(-12deg);box-shadow:12px 14px 0 #090e15}.tower:before{content:'';position:absolute;inset:14px 7px;background:repeating-linear-gradient(0deg,transparent 0 14px,#e6b76299 15px 17px,transparent 18px 28px)}.t1{height:85px;width:62px;left:80px}.t2{height:170px;width:70px;left:155px}.t3{height:110px;width:54px;left:245px}.t4{height:55px;width:50px;left:22px}.ground{position:absolute;width:320px;height:65px;border:1px solid #ad87565c;bottom:20px;left:20px;transform:skewY(-12deg);border-top:2px solid #edbd6988}.city-art>span{position:absolute;bottom:9px;right:25px;letter-spacing:3px;font-size:9px;color:var(--gold)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:22px 0}.stats article{border:1px solid var(--line);background:var(--panel);padding:20px 25px}.stats small{font-size:9px;letter-spacing:1.7px}.stats strong{display:block;font-size:32px;line-height:1.5;font-weight:550}.stats span{font-size:11px;color:var(--muted)}em{font-size:18px;font-style:normal;color:var(--muted)}.columns{display:grid;grid-template-columns:1fr 1.15fr;gap:22px}.panel{background:var(--panel);border:1px solid var(--line);padding:24px}.panel-title{display:flex;justify-content:space-between;gap:10px}.panel-title>span{font-size:9px;letter-spacing:1px;color:var(--gold)}.queue-item{display:flex;gap:12px;padding:17px 0;border-top:1px solid var(--line);align-items:center}.queue-item div{flex:1}.queue-item b{font-size:12px;font-weight:500}.queue-item small{display:block;font-size:10px}.queue-item strong{color:var(--gold);font-size:13px}.pulse{width:7px;height:7px;border-radius:50%;background:var(--gold);box-shadow:0 0 10px #edbd6944}.empty{padding:25px 0;font-size:12px}.quest{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:14px 0;border-top:1px solid var(--line)}.quest b{font-size:12px;font-weight:500}.quest small{display:block;font-size:10px}.quest button{font-size:10px;padding:6px 10px}.section-intro{margin:10px 0 30px}.section-intro h1{font-size:32px;margin-bottom:12px}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.card{background:var(--panel);border:1px solid var(--line);padding:25px;display:flex;flex-direction:column}.card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.building-icon{display:grid;place-items:center;width:54px;height:54px;background:#edbd690b;color:var(--gold);border:1px solid #edbd6930;font-size:32px}.level{font-size:9px;letter-spacing:1px;color:var(--muted)}.card h3{margin-bottom:9px}.card p{font-size:12px;min-height:45px}.cost{display:flex;flex-wrap:wrap;gap:14px;color:var(--gold);font-size:11px;margin:auto 0 18px;padding-top:12px}.card button{width:100%;font-size:12px;background:#edbd6911;color:var(--gold);border-color:#edbd6944}.queue-panel{margin-top:24px}.map-layout{display:grid;grid-template-columns:minmax(360px,1.5fr) minmax(230px,1fr);gap:22px}.map-panel{padding:18px}.map{display:grid;grid-template-columns:repeat(20,1fr);gap:2px;background:#080d11;padding:8px;aspect-ratio:1}.tile{padding:0;font-size:15px;min-width:0;border:0;border-radius:1px;background:#1b2525;color:#41554c;aspect-ratio:1}.tile:disabled{opacity:1}.tile.water{background:#142734;color:#33546b}.tile.forest{background:#172d27;color:#365747}.tile.enemy{background:#5b342f;color:#f7b493;border:1px solid #9b6650}.tile.home,.tile.owned{background:#4d472d;color:var(--gold);border:1px solid #aa9350}.legend{display:flex;flex-wrap:wrap;gap:16px;font-size:10px;color:var(--muted);padding-top:15px}.target-row{width:100%;display:flex;align-items:center;gap:12px;background:none;border:0;border-bottom:1px solid var(--line);color:var(--text);padding:13px 0;text-align:left}.target-row>span{font-size:22px;color:var(--gold)}.target-row div{flex:1}.target-row b{font-size:12px;font-weight:500}.target-row small{display:block;font-size:10px}.target-row strong{font-size:12px;color:var(--muted)}.reports{display:grid;gap:15px}.reports h3{margin:8px 0}.reports p{margin-bottom:0}.reports small{font-size:10px}.rank{display:flex;gap:25px;padding:20px 5px;border-bottom:1px solid var(--line)}.rank strong{color:var(--gold)}.rank b{flex:1}.rank span{color:var(--muted)}.trade-panel{max-width:550px}.manual{max-width:900px}.manual h3{color:var(--gold);margin-top:25px}.manual h3:first-child{margin-top:0}.victory{padding:30px;margin-top:20px;border:1px solid var(--gold);background:#edbd6911}.victory h2{color:var(--gold)}footer{display:flex;gap:20px;color:var(--muted);font-size:9px;letter-spacing:1px;padding:24px 0}footer span:last-child{margin-left:auto;color:var(--green)}dialog{color:var(--text);background:var(--panel);border:1px solid #59606a;padding:30px;max-width:500px;width:calc(100% - 30px);max-height:90vh}dialog::backdrop{background:#000a;backdrop-filter:blur(4px)}dialog form{position:relative}.close{position:absolute;right:-10px;top:-20px;background:none;color:var(--muted);border:0;font-size:25px}.check{display:flex;gap:10px;align-items:center;margin:20px 0}.check input{width:auto;margin:0}#notice{position:fixed;right:25px;bottom:25px;max-width:450px;background:#25342f;border:1px solid var(--green);padding:15px 24px;z-index:100;opacity:0;pointer-events:none;transform:translateY(20px);transition:.2s}#notice.visible{opacity:1;transform:translateY(0)}#power-preview{color:var(--gold)}@media(min-width:1500px){main{padding-left:55px;padding-right:55px}.hero{min-height:330px}.city-art{right:80px;transform:scale(1.15);transform-origin:bottom}.cards{grid-template-columns:repeat(4,1fr)}}@media(max-width:1100px){aside{width:185px;padding:30px 14px}main{margin-left:185px;width:calc(100% - 185px);padding:0 22px}.resources{gap:14px}.resources>div{min-width:80px}.resources b{font-size:19px}.cards{grid-template-columns:repeat(2,1fr)}.columns,.map-layout{grid-template-columns:1fr}.hero h1{font-size:30px}.city-art{opacity:.35}.landing form{right:5%;width:330px}.landing{padding:60px 6%}.landing h1{font-size:48px}}@media(max-width:760px){.landing{padding:35px 25px}.landing h1{font-size:43px}.landing .eyebrow{margin-top:35px}.landing form{position:static;width:100%;margin-top:30px}.local-note{margin-top:30px;font-size:8px}aside{position:static;width:100%;padding:18px}aside .brand{font-size:28px}.brand small{font-size:8px}.world-label,.commander small{display:none}nav{display:flex;overflow:auto;margin-top:20px;gap:5px}nav button{white-space:nowrap;font-size:12px;padding:8px 11px;gap:7px}.commander{position:absolute;right:20px;top:15px;padding:0;border:0;font-size:12px}.commander .text-button{font-size:10px}#game{display:block}main{margin:0;width:100%;padding:0 16px}header{display:block;padding:18px 0}.resources{justify-content:space-between;margin-top:20px}.resources>div{min-width:0}.resources small{font-size:9px}#content{padding-top:18px}.hero{padding:25px;min-height:270px}.hero h1{font-size:29px}.hero p{font-size:12px}.stats{gap:8px}.stats article{padding:12px}.stats small{font-size:8px;letter-spacing:.3px}.stats strong{font-size:25px}.stats span{font-size:9px}.cards{grid-template-columns:1fr}.section-intro h1{font-size:28px}.panel{padding:18px}.tile{font-size:12px}.map-panel{padding:5px}.map{padding:3px}.legend{padding:12px}.columns{gap:15px}footer{font-size:8px;gap:8px;flex-wrap:wrap}footer span:last-child{margin-left:0}.section-intro p{font-size:12px}}
.tile.unknown{background:#0a0d12;color:#59616b;border:1px solid #20252c}.tile.stale{filter:saturate(.45);opacity:.78}
.mission-templates,.production-templates{border:1px solid var(--line);background:#0e141b;padding:14px;margin:14px 0;border-radius:6px}.mission-templates>div,.production-templates>div{display:flex;flex-wrap:wrap;gap:8px}.mission-templates button,.production-templates button{font-size:12px;padding:8px 12px}.mission-templates p[role=status],.production-templates p[role=status]{min-height:1.5em;margin:8px 0 0}.production-templates form{display:grid;gap:8px;margin-top:12px}.production-templates h2{margin-top:0}.social-panel ul,.notes-panel ul{display:grid;gap:10px;padding-left:20px}.social-panel li,.notes-panel li{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.social-panel li b,.notes-panel li>b{min-width:8em}.social-panel section h3,.notes-panel section h3{margin-top:8px}.notes-panel form{display:grid;gap:8px;margin:10px 0}.notes-panel textarea{width:100%;resize:vertical}.notes-panel .columns{margin-top:14px}

.alliance-bulletin{margin:1.5rem 0;padding:1.25rem;border:1px solid var(--line);border-radius:1rem;background:rgba(14,23,30,.44)}.alliance-bulletin ul{display:grid;gap:1rem;padding:0;list-style:none}.bulletin-entry{padding:1rem;border:1px solid var(--line);border-radius:.75rem}.bulletin-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.bulletin-heading h4{margin:.15rem 0}.bulletin-entry>p{white-space:pre-wrap;overflow-wrap:anywhere}.bulletin-entry>small{display:block;margin:.7rem 0;color:var(--muted)}.bulletin-compose{margin:1rem 0}.bulletin-compose summary{cursor:pointer;font-weight:700}
.alliance-forum{margin:1.5rem 0;padding:1.25rem;border:1px solid var(--line);border-radius:1rem;background:rgba(14,23,30,.44)}.alliance-forum>ul,.forum-reports ul{display:grid;gap:1rem;padding:0;list-style:none}.forum-thread,.forum-report{padding:1rem;border:1px solid var(--line);border-radius:.75rem}.forum-thread-heading,.forum-post-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.forum-thread-heading h4{margin:.15rem 0}.forum-post-list{display:grid;gap:.75rem;padding:0;list-style:none}.forum-post{padding:.8rem;border-left:2px solid var(--line)}.forum-post p,.forum-report p{white-space:pre-wrap;overflow-wrap:anywhere}.forum-post small,.forum-thread>article>small{color:var(--muted)}
/* Original neutral exchange: fluid cards and a labelled keyboard-friendly form. */
.goods-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:16px; margin-top:16px; }
.good-card { min-width:0; overflow-wrap:anywhere; }
.good-card img { float:right; margin:0 0 12px 12px; }
.goods-trade-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:16px; align-items:end; }
.goods-trade-form label { display:grid; gap:8px; min-width:0; }
.goods-trade-form select,.goods-trade-form input { width:100%; min-width:0; box-sizing:border-box; }
.goods-trade-form p { grid-column:1/-1; }
.production-graph { position:relative; align-self:center; min-width:max-content; color:var(--text); }
.production-graph summary { cursor:pointer; color:var(--gold); font-size:11px; }
.production-graph summary:focus-visible { outline:2px solid #fff; outline-offset:4px; }
.production-graph-panel { position:absolute; z-index:20; right:0; top:calc(100% + 10px); width:min(420px,90vw); padding:16px; border:1px solid var(--line); border-radius:8px; background:#111820; box-shadow:0 12px 30px #0009; }
.production-graph-panel>p { margin-bottom:12px; font-size:12px; }
.production-graph-panel ul { display:grid; gap:12px; margin:0; padding:0; list-style:none; }
.production-graph-panel li { min-width:0; }
.production-graph-row { display:grid; grid-template-columns:72px minmax(70px,1fr) 58px; align-items:center; gap:10px; }
.production-graph-row strong,.production-graph-row b { font-size:12px; }
.production-graph-row progress { display:block; width:100%; height:12px; accent-color:var(--green); }
.production-graph-panel li>small { display:block; margin-top:3px; font-size:10px; }
@media(max-width:760px){.resources{flex-wrap:wrap}.production-graph{min-width:0;flex-basis:100%;text-align:right}.production-graph-panel{right:0;width:min(420px,calc(100vw - 32px))}}

.terra-recovery{margin:1rem 0}.terra-recovery>p{max-width:75ch}.terra-wreck{display:grid;gap:.5rem;padding:1rem 0;border-top:1px solid var(--line)}.terra-wreck h4,.terra-wreck p{margin:.25rem 0}.terra-wreck form{display:flex;flex-wrap:wrap;align-items:end;gap:.75rem}.terra-wreck label{display:grid;gap:.35rem}.terra-wreck input{max-width:9rem}
