/* Thunder Siege: clean like Harvest Tycoon and SkylineTopia: white panels with a coloured header, chunky buttons with a
   darker lower edge, round corners, soft shadows, one font (Rubik). Military colours: olive, khaki and gold. */
@font-face{font-family:Rubik;src:url(/fonts/rubik.woff2) format('woff2');font-weight:300 900;font-display:swap}
:root{
 --ink:#26301a;--ink-soft:#5f6a4c;--panel:#fff;--panel-2:#f3f1e6;--line:#e2dfcc;
 --olive:#6b8a3a;--olive-dark:#4a6326;--green:#58b33a;--green-dark:#3c8a24;--gold:#ffc83a;--gold-dark:#e09a10;
 --red:#ff5a4e;--red-dark:#d1372c;--blue:#39a7ff;--blue-dark:#1b77c9;
 --shadow:0 6px 0 rgba(40,50,20,.18),0 12px 28px rgba(30,40,15,.25);--radius:22px;
 --chip:rgba(28,36,16,.78);
 --font:Rubik,system-ui,-apple-system,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none;background:#7cc04b;color:var(--ink);font:15px/1.35 var(--font);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:none}
#view,#labels,#ui{position:fixed;inset:0}
#view canvas{display:block}
#labels{pointer-events:none;overflow:hidden}
#ui{pointer-events:none}
#ui>*{pointer-events:auto}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0}
b{font-weight:600}
.ico{width:24px;height:24px;flex:none}

.loading{position:fixed;inset:0;z-index:50;display:grid;place-content:center;justify-items:center;gap:18px;background:#1f2612 url(/art/loading-landscape.webp) center/cover;transition:opacity .4s}
.loading.gone{opacity:0;pointer-events:none}
.loading .bar{width:min(320px,70vw);height:14px;border-radius:10px;background:rgba(0,0,0,.4);overflow:hidden;box-shadow:inset 0 2px 0 rgba(0,0,0,.25)}
.loading .bar i{display:block;height:100%;width:5%;background:linear-gradient(#ffe27a,var(--gold));border-radius:10px;transition:width .2s}
.loading p{font-weight:700;letter-spacing:.5px;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.4)}
@media (orientation:portrait){.loading{background-image:url(/art/loading-portrait.webp)}}

/* ---- HUD ---- */
.top{position:absolute;top:0;left:0;right:0;display:flex;gap:10px;align-items:flex-start;justify-content:space-between;padding:calc(10px + env(safe-area-inset-top)) 12px 0;pointer-events:none}
.top>*{pointer-events:auto}
.me{display:flex;align-items:center;gap:10px;background:var(--chip);border-radius:999px;padding:4px 16px 4px 4px;color:#fff;backdrop-filter:blur(6px)}
.lvl{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#ffd965,var(--gold-dark));color:#5a3400;font-weight:800;font-size:19px;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}
.me b{display:block;font-size:15px;line-height:1.1;white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}
.xpbar{display:block;width:110px;height:7px;border-radius:5px;background:rgba(255,255,255,.2);overflow:hidden;margin-top:5px}.xpbar i{display:block;height:100%;background:var(--gold);border-radius:5px}
.res{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.chip{position:relative;display:flex;align-items:center;gap:6px;min-width:100px;height:38px;background:var(--chip);color:#fff;border-radius:999px;padding:0 14px 0 6px;backdrop-filter:blur(6px)}
.chip .ico{width:28px;height:28px}
.chip b{font-size:16px;font-weight:700}
.chip small{display:none}
.chip .fill{position:absolute;left:38px;right:14px;bottom:5px;height:3px;border-radius:3px;background:rgba(255,255,255,.18);overflow:hidden}.chip .fill i{display:block;height:100%;background:#d8f27a}
.chip.full .fill i{background:var(--red)}
.chip.mute{min-width:0;width:38px;padding:0;justify-content:center;font-size:17px}
.side{position:absolute;left:12px;top:calc(68px + env(safe-area-inset-top));display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.pill{display:inline-flex;gap:7px;align-items:center;height:34px;background:var(--chip);color:#fff;border-radius:999px;padding:0 14px 0 8px;font-weight:600;font-size:14px;backdrop-filter:blur(6px)}
.pill .ico{width:22px;height:22px}

/* Goals (daily orders), like ST's goal cards */
.orders{display:grid;gap:8px;width:250px}
.orders-head{background:linear-gradient(#ffd965,var(--gold-dark));color:#5a3400;box-shadow:0 4px 0 #a86f05;font-weight:700}
.order{display:grid;gap:4px;text-align:left;background:var(--panel);border-radius:16px;padding:10px 12px;box-shadow:0 4px 0 rgba(40,50,20,.15),0 8px 18px rgba(30,40,15,.18);font-size:14px}
.order b{font-size:15px}
.order .cost{display:inline-flex;gap:10px;align-items:center;font-weight:600;color:var(--ink-soft)}.order .cost span{display:inline-flex;gap:3px;align-items:center}.order .ico{width:18px;height:18px}
.order .bar{height:8px;border-radius:5px;background:var(--panel-2);overflow:hidden}.order .bar i{display:block;height:100%;background:var(--green);border-radius:5px}
.order.done{background:linear-gradient(#f2ffe9,#dcffd0);outline:3px solid #7ee16f;animation:glow 1.4s ease-in-out infinite}
.order[disabled]{opacity:.5}
@keyframes glow{50%{box-shadow:0 0 0 6px rgba(126,225,111,.35),0 4px 0 rgba(40,50,20,.15)}}

/* The dock, like ST's build bar: one white pill with the three big actions */
.dock{position:absolute;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:6px;background:var(--panel);border-radius:26px;padding:6px;box-shadow:var(--shadow)}
.big{display:grid;justify-items:center;gap:1px;min-width:84px;padding:8px 12px 7px;border-radius:20px;font-weight:700;font-size:13px;color:var(--ink)}
.big svg{width:36px;height:36px}
.big:hover{background:var(--panel-2)}
.big.attack{background:linear-gradient(#ff7a5c,var(--red));color:#fff;box-shadow:0 4px 0 var(--red-dark)}
.big.attack:hover{background:linear-gradient(#ff8a6c,#ff6a5c)}
.big:active{transform:translateY(2px)}

/* ---- Buttons ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 18px;border-radius:16px;font-weight:700;font-size:15px;color:#fff;background:linear-gradient(#7ccf52,var(--green));box-shadow:0 4px 0 var(--green-dark);text-shadow:0 1px 0 rgba(0,0,0,.2)}
.btn.gold{background:linear-gradient(#ffd965,var(--gold));box-shadow:0 4px 0 var(--gold-dark);color:#5a3400;text-shadow:none}
.btn.red{background:linear-gradient(#ff7a5c,var(--red));box-shadow:0 4px 0 var(--red-dark)}
.btn.gem{background:linear-gradient(#6cc4ff,var(--blue));box-shadow:0 4px 0 var(--blue-dark)}
.btn.plain{background:var(--panel-2);color:var(--ink);box-shadow:0 4px 0 var(--line);text-shadow:none}
.btn[disabled]{filter:grayscale(1);opacity:.55;cursor:not-allowed}
.btn:active:not([disabled]){transform:translateY(3px);box-shadow:0 1px 0 rgba(0,0,0,.25)}
.btn .ico{width:20px;height:20px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* ---- Building sheet ---- */
.sheet{position:absolute;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);width:min(560px,calc(100vw - 20px));background:var(--panel);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;animation:rise .2s ease-out}
.sheet header{display:flex;align-items:center;gap:12px;padding:12px 14px;background:linear-gradient(#86a84c,var(--olive));color:#fff}
.sheet header .pic svg{width:40px;height:40px;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25))}
.sheet header div{flex:1;min-width:0}
.sheet h2{margin:0;font-size:20px;font-weight:700;text-shadow:0 2px 0 rgba(0,0,0,.2)}
.sheet header p{margin:0;font-size:13px;opacity:.92}
.sheet .lvtag{background:rgba(0,0,0,.22);border-radius:999px;padding:3px 10px;font-weight:700;font-size:13px;white-space:nowrap}
.sheet .body{padding:12px 14px 14px;display:grid;gap:12px}
.close{width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,.2);color:#fff;font-size:22px;line-height:1;flex:none}
.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
.stat{background:var(--panel-2);border-radius:12px;padding:7px 10px}.stat small{display:block;color:var(--ink-soft);font-size:12px}.stat b{font-size:15px}
.timer{display:inline-flex;gap:6px;align-items:center;font-weight:700;color:var(--olive-dark);font-size:16px}
.progress{height:12px;border-radius:8px;background:var(--panel-2);overflow:hidden}.progress i{display:block;height:100%;background:linear-gradient(#ffd965,var(--gold));border-radius:8px}
@keyframes rise{from{transform:translate(-50%,24px);opacity:0}}

/* ---- Panels (modals), like ST's .panel ---- */
.modal-back{position:absolute;inset:0;background:rgba(20,26,10,.45);display:grid;place-items:center;padding:12px}
.modal{position:relative;width:min(760px,100%);max-height:calc(100vh - var(--foot-h,0px) - 24px);max-height:calc(100dvh - var(--foot-h,0px) - 24px);display:flex;flex-direction:column;background:var(--panel);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;animation:pop .22s cubic-bezier(.3,1.4,.6,1)}
.modal>header{display:flex;align-items:center;gap:12px;padding:14px 14px 12px 18px;background:linear-gradient(#86a84c,var(--olive));color:#fff}
.modal>header.red{background:linear-gradient(#ff8a6c,var(--red))}
.modal>header h2{flex:1;margin:0;font-size:22px;font-weight:700;text-shadow:0 2px 0 rgba(0,0,0,.2)}
.modal .panel-body{padding:14px 16px 18px;overflow-y:auto;display:grid;gap:12px}
.modal p{margin:0;color:var(--ink-soft)}
.modal h3{margin:6px 0 0;font-size:17px}
.tabs{display:flex;gap:4px;padding:4px;background:var(--panel-2);border-radius:14px;flex-wrap:wrap}
.tabs button{flex:1;min-width:90px;padding:8px 10px;border-radius:11px;font-weight:600;color:var(--ink-soft)}
.tabs button[aria-pressed=true]{background:var(--panel);color:var(--ink);box-shadow:0 2px 0 var(--line)}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.card{position:relative;text-align:left;background:var(--panel);border:2px solid var(--line);border-radius:18px;padding:10px 12px 12px;display:flex;flex-direction:column;gap:4px;min-height:168px;box-shadow:0 4px 0 var(--line);transition:transform .08s}
.card:hover:not([disabled]){border-color:#b9cf86}
.card:active:not([disabled]){transform:translateY(3px);box-shadow:0 1px 0 var(--line)}
.card b{font-size:16px}
.card small{color:var(--ink-soft);font-size:12.5px;flex:1}
.card .cost{display:flex;gap:10px;flex-wrap:wrap;font-weight:700;font-size:14px}
.card .cost span{display:inline-flex;gap:3px;align-items:center}
.card .ico{width:18px;height:18px}
.card .badge{position:absolute;right:10px;top:10px;font-size:12px;font-weight:700;background:var(--panel-2);color:var(--ink-soft);border-radius:999px;padding:2px 8px}
.card[disabled]{opacity:.55}
.card .pic{height:54px;display:grid;place-items:center;background:var(--panel-2);border-radius:12px;margin-bottom:4px}.card .pic svg{width:44px;height:44px}
.missions{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
.mission{background:var(--panel);border:2px solid var(--line);border-radius:14px;padding:8px 6px;text-align:center;box-shadow:0 3px 0 var(--line)}
.mission b{display:block;font-size:13px;line-height:1.2}
.mission.next{border-color:var(--gold);box-shadow:0 3px 0 var(--gold-dark);animation:glow 1.6s infinite}
.mission.locked{opacity:.4}
.stars{color:#cfcbb8;font-size:18px;letter-spacing:1px}.stars i{font-style:normal;color:var(--gold);text-shadow:0 1px 0 var(--gold-dark)}
.raid{display:flex;gap:12px;align-items:center;background:var(--panel-2);border-radius:16px;padding:12px;flex-wrap:wrap}
.raid .ico{width:40px;height:40px}
.raid .info{flex:1;min-width:180px}.raid .info b{font-size:17px}
.cost-line{display:inline-flex;gap:10px;flex-wrap:wrap;font-weight:700}.cost-line span{display:inline-flex;gap:3px;align-items:center}.cost-line .ico{width:18px;height:18px}
.queue{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.queue button{background:var(--panel-2);border-radius:12px;padding:4px 8px;display:flex;gap:4px;align-items:center;font-weight:600}
.queue svg{width:24px;height:24px}
input.name{font:600 18px var(--font);padding:12px 14px;border-radius:14px;border:2px solid var(--line);background:var(--panel-2);color:var(--ink);width:100%;user-select:text;outline:none}
input.name:focus{border-color:var(--olive)}

/* ---- Labels over the 3D view ---- */
.tag{position:absolute;left:0;top:0;white-space:nowrap;pointer-events:none;font-weight:700;font-size:12px;background:var(--chip);color:#fff;border-radius:999px;padding:3px 9px}
.bubble{position:absolute;left:0;top:0;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#fff;box-shadow:0 4px 0 rgba(0,0,0,.2),0 0 0 3px #fff8;pointer-events:none;animation:bob 1.4s ease-in-out infinite}
.bubble svg{width:28px;height:28px}
@keyframes bob{50%{margin-top:-6px}}
.hpbar{position:absolute;left:0;top:0;width:40px;height:6px;border-radius:4px;background:rgba(0,0,0,.55);overflow:hidden}.hpbar i{display:block;height:100%;background:#6ee04a}.hpbar.enemy i{background:#ff5b3b}

/* ---- Battle ---- */
.bhud{position:absolute;top:calc(10px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;gap:14px;align-items:center;background:var(--chip);color:#fff;border-radius:999px;padding:6px 18px;backdrop-filter:blur(6px)}
.bhud .timer{color:#fff;font-size:20px;white-space:nowrap}
.bhud .pct{font-weight:800;font-size:20px}
.bhud .stars{font-size:22px;color:rgba(255,255,255,.3)}
.bloot{position:absolute;top:calc(10px + env(safe-area-inset-top));left:12px;display:grid;gap:6px}
.troops{position:absolute;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:6px;background:var(--panel);border-radius:24px;padding:6px;box-shadow:var(--shadow)}
.troop{position:relative;width:78px;padding:6px 4px 5px;border-radius:18px;display:grid;justify-items:center;font-size:12px;font-weight:700}
.troop svg{width:40px;height:40px}
.troop[aria-pressed=true]{background:linear-gradient(#ffe27a,var(--gold));box-shadow:0 3px 0 var(--gold-dark)}
.troop .n{position:absolute;top:2px;right:6px;font-size:14px;font-weight:800}
.troop[disabled]{opacity:.35}
.endbtn{position:absolute;right:12px;top:calc(10px + env(safe-area-inset-top))}
.hint{position:absolute;left:50%;top:calc(70px + env(safe-area-inset-top));transform:translateX(-50%);background:var(--panel);color:var(--ink);padding:10px 16px;border-radius:16px;font-weight:600;box-shadow:var(--shadow);max-width:calc(100vw - 24px);text-align:center}
.coach{position:absolute;left:50%;bottom:calc(110px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:10px;align-items:center;background:var(--panel);color:var(--ink);padding:10px 16px 10px 10px;border-radius:18px;font-weight:600;box-shadow:var(--shadow);width:max-content;max-width:calc(100vw - 24px);animation:rise .3s}
.coach .who{width:40px;height:40px;border-radius:50%;background:linear-gradient(#86a84c,var(--olive));display:grid;place-items:center;flex:none}.coach .who svg{width:26px;height:26px}
.result{text-align:center;display:grid;gap:10px;justify-items:center}.result .stars{font-size:64px;color:#e5e1cf}.result .stars i{display:inline-block}
.toasts{position:absolute;left:50%;top:calc(64px + env(safe-area-inset-top));transform:translateX(-50%);display:grid;gap:6px;justify-items:center;pointer-events:none;z-index:20}
.toast{background:var(--panel);color:var(--ink);padding:9px 16px;border-radius:14px;font-weight:600;box-shadow:var(--shadow);animation:pop .25s}
.toast.error{background:#fff1ef;color:#a3261c}.toast.reward{background:linear-gradient(#fffbe6,#fff1b8);color:#6a4500}
@keyframes pop{from{transform:scale(.85);opacity:0}}
.placebar{position:absolute;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:10px;flex-wrap:wrap;justify-content:center;background:var(--panel);border-radius:22px;padding:10px 12px;align-items:center;box-shadow:var(--shadow);width:max-content;max-width:calc(100vw - 20px)}
.placebar span{color:var(--ink-soft)}
.fly{position:fixed;left:0;top:0;width:30px;height:30px;z-index:40;pointer-events:none;filter:drop-shadow(0 2px 2px rgba(0,0,0,.4))}.fly svg{width:30px;height:30px}
.float{position:fixed;z-index:40;pointer-events:none;font-weight:800;font-size:22px;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.45)}
.banner{position:fixed;left:50%;top:40%;z-index:45;pointer-events:none;text-align:center;display:grid;gap:4px}
.banner b{font-size:clamp(44px,9vw,86px);font-weight:900;letter-spacing:2px;color:#fff;text-shadow:0 5px 0 var(--red-dark),0 10px 24px rgba(0,0,0,.4)}
.banner small{font-size:20px;font-weight:700;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.4)}

@media (max-width:700px){
 .orders{width:220px}.orders:not(.open) .order{display:none}
 .chip{min-width:0;height:34px;padding:0 10px 0 4px}.chip .ico{width:24px;height:24px}.chip b{font-size:14px}.chip .fill{left:30px;right:10px}
 .me{padding-right:12px}.xpbar{width:70px}.lvl{width:36px;height:36px;font-size:16px}
 .big{min-width:70px;padding:6px 8px}.big svg{width:30px;height:30px}
 .troop{width:64px}.troop svg{width:32px;height:32px}
 .bhud{top:auto;bottom:calc(98px + env(safe-area-inset-bottom));padding:4px 14px}.bhud .timer,.bhud .pct{font-size:16px}
 .bloot{transform:scale(.9);transform-origin:top left}
 .coach{bottom:calc(100px + env(safe-area-inset-bottom))}
}
.armory{display:flex;gap:12px;align-items:center;background:linear-gradient(#2f3a1c,#465526);color:#fff;border-radius:16px;padding:8px 14px 8px 8px}
.armory .tt-host{width:150px;height:110px;flex:none;border-radius:12px;background:radial-gradient(#6b7d45,#2a3418);overflow:hidden}.armory .tt-host canvas{display:block;width:100%;height:100%}
.armory>div:last-child{display:grid;gap:1px}.armory small{opacity:.7;font-size:12px}.armory b{font-size:17px}.armory span{font-size:13px;opacity:.9}
img.ico{object-fit:contain;-webkit-user-drag:none}
.chip img.ico{width:32px;height:32px;margin:-2px 0}
.chip.mute img.ico{width:26px;height:26px}
.big img{width:44px;height:44px;margin:-4px 0 -2px}
.pill img.ico{width:24px;height:24px}
.card .pic img{width:52px;height:52px}
.sheet header .pic img{width:52px;height:52px;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25))}
.troop img{width:46px;height:46px}
.bubble img{width:32px;height:32px}
.fly img{width:32px;height:32px}
.queue img{width:28px;height:28px}
.raid img.ico{width:48px;height:48px}
.coach .who{background:none}.coach .who img{width:44px;height:44px}
.with-ico{display:flex;align-items:center;gap:6px}.with-ico img{width:28px;height:28px}
.btn img.ico{width:22px;height:22px}
.order .ico{width:20px;height:20px}
.cost-line img.ico,.card .cost img.ico{width:20px;height:20px}
@media (max-width:700px){.chip img.ico{width:26px;height:26px}.big img{width:36px;height:36px}.troop img{width:38px;height:38px}}
.viewbtns{position:absolute;right:12px;bottom:calc(110px + env(safe-area-inset-bottom));display:grid;gap:8px}
.viewbtns button{width:46px;height:46px;border-radius:16px;background:linear-gradient(#ffffff,#eef0e2);display:grid;place-items:center;box-shadow:0 4px 0 #c9cbb4,0 6px 14px rgba(30,40,15,.25)}
.viewbtns .ui-ico{width:28px;height:28px}
.viewbtns button:active{transform:translateY(2px)}
@media (max-width:700px){.viewbtns{bottom:calc(150px + env(safe-area-inset-bottom))}.viewbtns button{width:40px;height:40px}}
.big{position:relative}
.big .badge{position:absolute;top:2px;right:8px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--red);color:#fff;font-size:12px;font-weight:800;display:grid;place-items:center;box-shadow:0 2px 0 var(--red-dark)}
.big.attack .badge{background:#fff;color:var(--red-dark);box-shadow:0 2px 0 rgba(0,0,0,.2)}
.big .badge.dot{min-width:12px;width:12px;height:12px;padding:0;top:6px;right:14px;background:var(--green);box-shadow:0 0 0 2px #fff}
.pill.dark{background:var(--panel-2);color:var(--ink)}
.mini{display:flex;flex-wrap:wrap;gap:8px}
.mini span{display:inline-flex;align-items:center;gap:6px;background:var(--panel-2);border-radius:12px;padding:4px 10px 4px 4px;font-size:13px;color:var(--ink-soft)}
.mini img.ico{width:34px;height:34px}.mini b{color:var(--ink);font-size:15px}
.btn.big-go{font-size:18px;min-height:52px;padding:0 26px}
.raid.warn{background:#fff4d6;outline:2px solid var(--gold)}
.setrow{display:flex;justify-content:space-between;align-items:center;background:var(--panel-2);border-radius:14px;padding:8px 12px}
.setrow span{display:flex;align-items:center;gap:10px}.setrow img.ico{width:32px;height:32px}
.toggle{width:52px;height:30px;border-radius:999px;background:#cfcbb8;position:relative;transition:background .15s}
.toggle i{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 2px 3px rgba(0,0,0,.25);transition:left .15s}
.toggle.on{background:var(--green)}.toggle.on i{left:25px}
@media (max-width:700px){.res{flex-wrap:nowrap;gap:5px}.chip{padding:0 8px 0 3px;min-width:0}.chip b{font-size:13px}.chip img.ico{width:24px;height:24px}.me b{max-width:90px}}
@media (max-width:520px){.me{padding:3px}.me>span:last-child{display:none}.top{gap:6px;padding-left:8px;padding-right:8px}.chip .fill{display:none}.chip{height:32px}}
.cards.weapons .card{min-height:150px}.card.picked{border-color:var(--gold);box-shadow:0 4px 0 var(--gold-dark)}
.equip{display:inline-flex;align-items:center;gap:6px;background:var(--panel-2);border-radius:12px;padding:4px 10px 4px 4px;font-weight:600;border:2px solid transparent}
.equip.on{border-color:var(--green);background:#eaf7df}.equip img.ico{width:32px;height:32px}
.carries{display:flex;align-items:center;gap:4px;color:var(--olive-dark)!important;font-weight:600;flex:0!important}.carries img.ico{width:22px;height:22px}
.close{display:grid;place-items:center;background:none;padding:0}.close img.ico{width:38px;height:38px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
.btn .ui-ico{width:22px;height:22px}
.dotb{width:10px;height:10px;border-radius:50%;background:var(--red);box-shadow:0 0 0 2px #fff;margin-left:2px}
.achs{display:grid;gap:8px}
.ach{display:flex;gap:12px;align-items:center;background:var(--panel-2);border-radius:16px;padding:10px 12px}
.ach>img.ico{width:52px;height:52px}.ach>div{flex:1;display:grid;gap:2px}.ach b{font-size:16px}.ach .stars{font-size:15px}.ach small{color:var(--ink-soft);font-size:12.5px}
.ach .progress{height:8px;margin-top:3px}.ach.ready{background:linear-gradient(#f2ffe9,#dcffd0);outline:3px solid #7ee16f}
.reward{display:inline-flex;align-items:center;gap:3px;font-weight:700;color:var(--ink-soft)}.reward img.ico{width:20px;height:20px}
.leagues{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}
.lg{display:grid;justify-items:center;gap:2px;background:var(--panel-2);border-radius:14px;padding:8px}.lg img.ico{width:54px;height:54px}.lg small{color:var(--ink-soft);font-size:12px}
.lg.on{outline:3px solid var(--gold);background:#fff8df}
.strip{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.starbonus{flex:1;min-width:240px;display:flex;align-items:center;gap:10px;background:var(--panel-2);border-radius:16px;padding:6px 12px 6px 6px}
.starbonus>img.ico{width:40px;height:40px}.starbonus>div{flex:1}.starbonus small{color:var(--ink-soft);font-weight:600}
.starbonus.ready{background:linear-gradient(#fffbe6,#fff1b8);outline:3px solid var(--gold)}
.pips i{font-style:normal;color:#cfcbb8;font-size:18px;margin-right:2px}.pips i.on{color:var(--gold);text-shadow:0 1px 0 var(--gold-dark)}
.troop.hero{background:linear-gradient(#fff3c4,#ffd965);box-shadow:0 3px 0 var(--gold-dark)}.troop.hero[aria-pressed=true]{outline:3px solid var(--red)}
.troop.ability{background:linear-gradient(#ff8a6c,var(--red));color:#fff;box-shadow:0 3px 0 var(--red-dark);animation:glow 1.2s infinite}
.herochip{outline:2px solid var(--gold);background:#fff8df!important}
.raid.herocard{background:linear-gradient(#fffbe6,#fff1c4)}.raid .ok{color:var(--green-dark);font-weight:700}
.stars-i{display:inline-flex;gap:1px;vertical-align:middle;--s:20px}.stars-i img{width:var(--s);height:var(--s)}
.result .stars-i{--s:62px}.bhud .stars-i{--s:24px}.ach .stars-i{--s:18px}.mission .stars-i{--s:20px;justify-content:center}
.big .badge.alert{background:none;box-shadow:none;padding:0;top:0;right:4px}.big .badge.alert img{width:24px;height:24px}
.mission b .ui-ico{width:16px;height:16px;vertical-align:-2px;margin-right:2px}
.hint .ui-ico{width:24px;height:24px;vertical-align:-6px}
.endbtn .ui-ico{width:24px;height:24px}
.order b .ui-ico{width:18px;height:18px;vertical-align:-3px}
/* Side menu: round buttons with a small label, like the genre's left rail */
.side{gap:10px}
.sidebtn{position:relative;width:62px;display:grid;justify-items:center;gap:0;padding:6px 2px 4px;border-radius:18px;background:var(--chip);color:#fff;backdrop-filter:blur(6px)}
.sidebtn img.ico{width:38px;height:38px}.sidebtn small{font-size:11px;font-weight:700;line-height:1.1}
.sidebtn.passive{cursor:default}
.sb-badge{position:absolute;top:-4px;right:-4px;width:22px;height:22px;border-radius:50%;background:var(--red);color:#fff;font-weight:800;font-size:13px;display:grid;place-items:center;box-shadow:0 0 0 2px #fff}
.sb-count{position:absolute;top:-4px;right:-6px;padding:1px 6px;border-radius:999px;background:#fff;color:var(--ink);font-size:11px;font-weight:800;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.side .orders.open{position:absolute;left:72px;top:0;width:250px}
.chip.eng{min-width:0;padding:0 12px 0 6px}
.stat em{font-style:normal;color:var(--green-dark);font-weight:700;white-space:nowrap}
.note{display:inline-flex;align-items:center;gap:6px;color:var(--ink-soft);font-weight:600}.note img.ico{width:22px;height:22px}
.spacebar{display:grid;gap:6px;background:var(--panel-2);border-radius:14px;padding:10px 12px}.spacebar span{display:flex;align-items:center;gap:8px}.spacebar img.ico{width:30px;height:30px}
.trainbtn{display:flex;justify-content:center;align-items:center;gap:6px;margin-top:6px;padding:8px;border-radius:12px;background:linear-gradient(#7ccf52,var(--green));color:#fff;font-weight:700;box-shadow:0 3px 0 var(--green-dark)}
.trainbtn .cost-line{color:#fff}.trainbtn .ui-ico{width:20px;height:20px}
.lockline{display:flex;align-items:center;gap:6px;margin-top:6px;padding:8px;border-radius:12px;background:var(--panel-2);color:var(--ink-soft);font-weight:700;font-size:13px}.lockline .ui-ico{width:18px;height:18px}
@media (max-width:520px){.chip.eng{display:none}}
.phone-only{display:none}@media (max-width:520px){.phone-only{display:grid}}
.big.weapons{background:linear-gradient(#ffe27a,var(--gold));color:#5a3400;box-shadow:0 4px 0 var(--gold-dark)}
.big.weapons:hover{background:linear-gradient(#ffeb9a,#ffd24a)}
.big .badge.busy{background:var(--blue);box-shadow:0 2px 0 var(--blue-dark);padding:0;width:22px}.big .badge.busy .ui-ico{width:16px;height:16px}
.tabs.scroll{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;flex:none;min-height:48px}.tabs.scroll button{flex:1 0 auto;padding:8px 12px}.tabs.scroll::-webkit-scrollbar{display:none}
.tabs button{display:inline-flex;align-items:center;justify-content:center;gap:5px;position:relative;white-space:nowrap}.tabs button img.ico{width:24px;height:24px}
.tabdot{position:absolute;top:4px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--green)}
.card .lockline{margin-top:0;padding:5px 8px;font-size:12.5px}
.destroy{display:flex;align-items:center;gap:8px}
.dbar{position:relative;width:110px;height:10px;border-radius:6px;background:rgba(255,255,255,.22);overflow:visible}
.dbar i{display:block;height:100%;border-radius:6px;background:linear-gradient(#ffe27a,var(--gold));transition:width .3s}
.dbar .mark{position:absolute;top:-3px;width:3px;height:16px;margin-left:-1px;border-radius:2px;background:#fff}
@media (max-width:520px){.dbar{width:70px}.big.weapons{min-width:62px}}
/* The dock's four buttons share one box: same height, icon area and label line, coloured or not. */
.dock{align-items:stretch}
.big{height:80px;min-width:86px;grid-template-rows:46px 18px;align-content:center;justify-items:center;padding:6px 12px;box-shadow:0 4px 0 transparent}
.big img{width:46px;height:46px;margin:0;object-fit:contain}
.big.weapons,.big.attack{box-shadow:0 4px 0 var(--gold-dark)}.big.attack{box-shadow:0 4px 0 var(--red-dark)}
@media (max-width:520px){.big{height:70px;min-width:68px;grid-template-rows:38px 16px;padding:5px 8px}.big img{width:38px;height:38px}}
.log{display:grid;gap:6px}.logrow{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--panel-2);border-radius:14px;padding:8px 12px;border-left:5px solid var(--green)}
.logrow.lost{border-left-color:var(--red)}.logrow small{display:block;color:var(--ink-soft)}
.btn.small{min-height:36px;padding:0 12px;font-size:14px}.btn.small img.ico{width:20px;height:20px}
.replaytag{position:absolute;left:50%;top:calc(58px + env(safe-area-inset-top));transform:translateX(-50%);background:var(--red)!important}
.olabel{display:block;color:#fff;font-size:12px;font-weight:700;text-shadow:0 1px 2px rgba(0,0,0,.5);margin:2px 0 -2px}.order.week{border-left:5px solid var(--blue)}
.side .orders.open{max-height:calc(100vh - var(--foot-h,0px) - 220px);overflow-y:auto}
/* ---- Polish pass: building sheet, prices, timers, toasts (after HT and SkylineTopia) ---- */
.short{color:var(--red-dark)!important}
.btn .short{color:#c4271c!important;text-shadow:none}
.btn.two{justify-content:flex-start;gap:10px;min-height:56px;padding:6px 16px 6px 12px;text-align:left}
.btn.two>.ui-ico,.btn.two>img.ico{width:30px;height:30px}
.btn.two>span{display:grid;gap:1px;min-width:0}.btn.two b{font-size:16px;line-height:1.15}
.btn.two small{font-size:13.5px;font-weight:700;opacity:.95}.btn.two small.cost-line{gap:8px}.btn.two .cost-line img.ico{width:18px;height:18px}
.actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;align-items:stretch}
.actions .note,.actions .maxed{justify-content:center;min-height:56px;background:var(--panel-2);border-radius:16px;padding:0 12px}
.maxed{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:var(--olive-dark)}.maxed svg{width:20px;height:20px}
.uprow{display:flex;gap:10px;align-items:center}
.progress.big{position:relative;flex:1;height:44px;border-radius:14px;box-shadow:inset 0 2px 0 rgba(0,0,0,.06)}
.progress.big i{border-radius:14px;background:linear-gradient(#ffe27a,var(--gold));box-shadow:inset 0 -3px 0 rgba(0,0,0,.08)}
.progress.big .timer{position:absolute;inset:0;justify-content:center;color:var(--ink);font-size:16px}
.uprow .btn.gem{min-height:44px;white-space:nowrap}
.btn.gem.armed{background:linear-gradient(#8fe1ff,#39b8ff);outline:3px solid #fff;box-shadow:0 4px 0 var(--blue-dark),0 0 0 6px rgba(57,167,255,.35);animation:pulse .9s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.04)}}
.sheet header{padding:10px 10px 10px 12px;gap:10px}
.sheet h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:19px;line-height:1.2}
.sheet h2 .lvtag{font-size:12px;padding:2px 9px;text-shadow:none}
.sheet header p{line-height:1.3;margin-top:1px}
.hbtn{width:40px;height:40px;border-radius:50%;flex:none;display:grid;place-items:center;background:rgba(255,255,255,.92);box-shadow:0 3px 0 rgba(0,0,0,.18)}
.hbtn .ui-ico{width:24px;height:24px}.hbtn:active{transform:translateY(2px)}
.sheet .body{gap:10px}
.stats{grid-template-columns:repeat(auto-fit,minmax(96px,1fr))}
.stat{padding:6px 10px}.stat b{font-size:15px;white-space:nowrap}
/* Toasts: an icon, a coloured edge, and they drop in from the top */
.toast{display:flex;align-items:center;gap:8px;padding:8px 16px 8px 10px;border-left:5px solid var(--olive);animation:drop .28s cubic-bezier(.3,1.4,.6,1);max-width:calc(100vw - 32px)}
.toast .ico,.toast .ui-ico{width:24px;height:24px;flex:none}
.toast.error{border-left-color:var(--red)}.toast.reward{border-left-color:var(--gold-dark)}
@keyframes drop{from{transform:translateY(-14px) scale(.9);opacity:0}}
/* The timer over a building being built or upgraded: hammer, time, and how far along it is */
.tag.build{display:flex;align-items:center;gap:4px;padding:3px 10px 3px 4px;background:rgba(28,36,16,.85);box-shadow:0 3px 0 rgba(0,0,0,.25)}
.tag.build .ui-ico{width:20px;height:20px;background:var(--gold);border-radius:50%;padding:2px}
.tag.build span{display:grid;gap:2px;font-size:12px;line-height:1}
.tag.build i{display:block;height:3px;border-radius:2px;background:var(--gold);min-width:2px}
/* Phones: the settings move from the top bar to the side rail, so the four counters fit across */
@media (max-width:520px){
 .top .chip.mute{display:none}
 .res{gap:4px}.chip{flex:1 1 auto}
 .side{gap:8px}.sidebtn{width:56px}.sidebtn img.ico{width:32px;height:32px}
 .actions{grid-template-columns:1fr 1fr}.actions>:only-child{grid-column:1/-1}
 .btn.two{padding:6px 10px;gap:6px}.btn.two b{font-size:15px}.btn.two>.ui-ico,.btn.two>img.ico{width:26px;height:26px}
 .sheet header p{font-size:12.5px}
 .stat{padding:5px 8px}.stat small{font-size:11px}.stat b{font-size:14px}
 #ui:has(.sheet) .viewbtns{display:none}
 .viewbtns button:nth-child(n+3){display:none} /* pinch zooms on a phone */
 /* Panels: two cards a row, tighter, so a shop tab or the army fits on one screen */
 .modal-back{padding:8px}.modal .panel-body{padding:12px 12px 16px;gap:10px}.modal>header{padding:10px 10px 10px 14px}.modal>header h2{font-size:19px}
 .cards{grid-template-columns:1fr 1fr;gap:8px}
 .card{min-height:0;padding:8px 9px 10px;border-radius:16px}.card b{font-size:14.5px;line-height:1.2}.card small{font-size:11.5px}
 .card .pic{height:46px}.card .pic img{width:42px;height:42px}.card .cost{font-size:13px;gap:6px}
 .trainbtn,.lockline{padding:7px 6px;font-size:13px}.card .lockline{font-size:11.5px;line-height:1.2;padding:5px 6px}
 .tabs.scroll button{padding:7px 10px;font-size:14px}
}
/* ---- Today (docs/ui-parity.md): the daily supply drop and the daily orders in one window, like Harvest Tycoon's and
   SkylineTopia's daily gift: seven days of the streak (collected ticked, today with a gold edge, tomorrow dashed), the drop
   with Collect, and a tab with the orders. Then the level-up window and confetti. ---- */
.tabs .tbadge{min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--red);color:#fff;font-size:12px;font-weight:800;display:inline-grid;place-items:center}
.streak{display:grid;gap:10px;padding:12px;border-radius:18px;background:linear-gradient(#fbf6e2,#f1ead0);border:2px solid #e6dcb4}
.streak-head{display:flex;align-items:center;gap:10px}.streak-head>img.ico{width:52px;height:52px}
.streak-head b{display:block;font-size:22px;line-height:1.1}.streak-head small{color:var(--ink-soft);font-weight:600}
.sdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:0;padding:0;list-style:none}
.sday{display:grid;justify-items:center;gap:2px;padding:7px 2px;border:2px solid var(--line);border-radius:14px;background:var(--panel)}
.sday small{font-size:11px;font-weight:700;color:var(--ink-soft);white-space:nowrap}.sday b{font-size:15px;color:var(--blue-dark)}
.sday img.ico,.sday .ui-ico{width:30px;height:30px}
.sday.got{background:#e9f4dc;border-color:#cfe3b4}.sday.got .ui-ico{background:var(--green);border-radius:50%;padding:3px}
.sday.today{border-color:var(--gold);background:#fff7d6;box-shadow:0 0 0 3px rgba(255,200,58,.35)}
.sday.today.got{border-color:var(--green);background:#e9f4dc;box-shadow:none}
.sday.next{border:2px dashed var(--gold-dark)}
.sclaim{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:16px;background:var(--panel)}
.sclaim>div{display:grid;gap:5px;min-width:0}.sclaim b{font-size:16px}
.sclaim.ready{outline:3px solid var(--gold);animation:glow 1.4s ease-in-out infinite}
.sdone{display:inline-flex;align-items:center;gap:5px;font-weight:700;color:var(--green-dark);flex:none}
.sdone .ui-ico{width:22px;height:22px;background:var(--green);border-radius:50%;padding:2px}
.streak .note,.modal .note{font-size:13px;color:var(--ink-soft);text-align:center;display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap}
.modal .note .ico{width:18px;height:18px}
.obonus{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:16px;background:linear-gradient(#fffbe6,#fff3cc);border:2px solid #f1df9e}
.obonus>img.ico{width:42px;height:42px}.obonus>div{flex:1;display:grid;gap:3px;min-width:0}.obonus .ocount{font-size:22px;color:#7a5200}
.obonus.ready{outline:3px solid var(--gold)}.obonus .ocount .ui-ico{width:28px;height:28px;background:var(--green);border-radius:50%;padding:3px}
.olist{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px}
.ocard{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:16px;background:var(--panel-2)}
.ocard>img.ico,.ocard>.ui-ico{width:38px;height:38px;flex:none}
.oinfo{flex:1;display:grid;gap:5px;min-width:0}.oinfo b{font-size:15px;line-height:1.2}
.obar{display:flex;align-items:center;gap:8px}.oinfo .cost-line{font-size:13px;gap:8px;color:var(--ink-soft)}.oinfo .cost-line img.ico{width:18px;height:18px}.obar small{font-weight:700;color:var(--ink-soft);white-space:nowrap}
.obar .bar{flex:1;height:8px;border-radius:5px;background:#dcd8c2;overflow:hidden}.obar .bar i{display:block;height:100%;background:var(--green);border-radius:5px}
.ocard.ready{background:linear-gradient(#f2ffe9,#dcffd0);outline:3px solid #7ee16f}
.ocard.done{opacity:.6}
.ocard .btn.small{flex:none;gap:6px}.ocard .btn.small img.ico{width:18px;height:18px}
.sidebtn.glow{animation:glow 1.4s ease-in-out infinite;outline:2px solid var(--gold)}
.result.levelup .cost-line.big{font-size:22px;gap:8px 16px}.result.levelup .cost-line.big img.ico{width:30px;height:30px}
.result .milestone{margin:0;padding:4px 12px;border-radius:999px;background:var(--gold);color:#5a3400;font-weight:800}
.confetti{position:fixed;inset:0;z-index:60;pointer-events:none;overflow:hidden}.confetti i{position:absolute;border-radius:2px}
@media (max-width:520px){.sdays{gap:3px}.sday small{font-size:9.5px}.sday img.ico,.sday .ui-ico{width:24px;height:24px}.sclaim{flex-direction:column;align-items:stretch}.sclaim .btn{width:100%}.olist{grid-template-columns:1fr}}

/* ---- The logged-out page: SkylineTopia's landing, in Thunder Siege's colours ---- */
.landing{position:fixed;inset:0;z-index:40;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;display:grid;grid-template-rows:auto 1fr auto;justify-items:center;padding:0 12px calc(16px + env(safe-area-inset-bottom));touch-action:auto;-webkit-user-select:text;user-select:text;isolation:isolate}
.landing[hidden]{display:none}
.landing::before,.landing::after{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none}
.landing::before{background:url('/art/start-page-wide.webp') center/cover no-repeat}
@media (orientation:portrait){.landing::before{background-image:url('/art/start-page-tall.webp')}}
.landing::after{background:radial-gradient(ellipse 70% 65% at 50% 48%,rgba(30,42,14,.35),rgba(22,32,10,.5) 65%,rgba(16,24,8,.68))}
.landing-bar{position:sticky;top:0;z-index:2;width:calc(100% + 24px);margin:0 -12px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;padding:calc(10px + env(safe-area-inset-top)) 18px 10px}
.landing-logo{height:56px;width:auto;display:block;filter:drop-shadow(0 4px 8px rgba(0,0,0,.4))}
.landing-signin{min-height:40px;padding:0 18px;border-radius:14px;font-size:15px}
.landing-center{display:grid;justify-items:center;align-content:safe center;gap:14px;width:100%;padding:12px 0}
.launch-banner{display:flex;align-items:center;gap:8px;margin:0;color:#fff;font-weight:600;font-size:14px}
.launch-chip{display:inline-flex;align-items:center;gap:5px;background:var(--gold);color:#4a2c00;border-radius:999px;padding:3px 10px 3px 6px;font-weight:800}
.launch-copy{opacity:.9;text-shadow:0 1px 2px rgba(0,0,0,.5)}
.landing-auth{position:relative;display:grid;gap:10px;width:min(400px,100%);padding:26px 24px 20px;border-radius:28px;background:#fff;color:var(--ink);box-shadow:0 20px 60px rgba(0,0,0,.35);animation:pop .3s cubic-bezier(.2,.9,.3,1.3)}
.landing-auth h2{margin:0;font-size:24px}
.landing-auth p.muted{margin:0 0 4px;font-size:13px;color:var(--ink-soft)}.landing-auth p.small{font-size:12px}
.landing-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:16px;background:#f1f0e6}
.landing-tabs button{padding:8px;border-radius:12px;font-weight:600;color:var(--ink-soft)}
.landing-tabs button.on{background:#fff;color:var(--ink);box-shadow:0 2px 0 #dcdac8}
.landing-auth form{display:grid;gap:8px}
.landing-auth input{padding:12px 14px;border-radius:14px;border:2px solid #e2dfcc;font:inherit;font-size:16px;width:100%;outline:none;color:var(--ink);background:#fff}
.landing-auth input:focus{border-color:var(--olive)}
.pw{position:relative}.pw input{padding-right:70px}.pw button{position:absolute;right:8px;top:50%;transform:translateY(-50%);padding:6px 10px;border-radius:10px;font-weight:600;font-size:14px;color:var(--olive-dark)}
.btn.social{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px;border-radius:16px;background:#fff;box-shadow:inset 0 0 0 2px #e2dfcc,0 3px 0 #dcdac8;font-weight:600;font-size:17px;color:var(--ink);text-shadow:none}
.btn.social:hover{background:#fafaf3}
.landing-or{display:flex;align-items:center;gap:8px;color:var(--ink-soft);font-size:13px}
.landing-or::before,.landing-or::after{content:'';flex:1;height:1px;background:#e6e3d2}
.landing-name{display:grid;gap:4px;font-weight:600;font-size:14px}.landing-name small{font-weight:400;color:var(--ink-soft);font-size:12px}
.landing-switch{justify-self:center;color:var(--olive-dark);font-weight:600;font-size:14px;text-decoration:underline;padding:4px}
.landing-back-link{justify-self:start;color:var(--olive-dark);font-weight:600;font-size:14px}
.btn.green{background:linear-gradient(#7ccf52,var(--green));box-shadow:0 4px 0 var(--green-dark);color:#fff}
.btn.big{min-height:52px;font-size:18px;width:100%}
.notice{margin:0;padding:10px 12px;border-radius:12px;font-size:14px;background:var(--panel-2);color:var(--ink)}.notice.good{background:#e9f8df;color:var(--green-dark)}.notice.bad{background:#fff0ee;color:var(--red-dark)}
.legal{margin:2px 0 0;font-size:12px;color:var(--ink-soft);text-align:center}.legal a{color:var(--olive-dark)}
/* The footer sits under the form (never over it), however tall the form gets. */
.landing-foot{position:static;margin-top:18px;width:min(980px,100%);display:grid;gap:4px;justify-items:center;padding:8px 16px;border-radius:18px;background:rgba(255,255,255,.82);backdrop-filter:blur(6px);text-align:center;color:var(--ink)}
.landing-foot nav{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 14px}.landing-foot nav a{font-size:13px;color:var(--ink);opacity:.75;text-decoration:none}.landing-foot nav a:hover{opacity:1}
.landing-foot small{font-size:12px;color:var(--ink-soft)}
@media (max-width:900px){.landing-logo{height:46px}}
/* ---- Cookie banner ---- */
.cookie-banner{position:fixed;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:60;width:min(620px,calc(100vw - 20px));display:flex;gap:12px;align-items:flex-start;background:var(--panel);color:var(--ink);border-radius:20px;padding:14px 16px;box-shadow:var(--shadow);animation:rise .3s;touch-action:auto}
.cookie-banner img{flex:none}.cookie-banner h2{margin:0 0 4px;font-size:17px}.cookie-banner p{margin:0 0 10px;font-size:13.5px;color:var(--ink-soft)}.cookie-banner a{color:var(--olive-dark)}
.cookie-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
/* ---- Tutorial: the arrow, the pulse on what it points at, the coach's steps (main.js) ---- */
.tut-arrow{position:fixed;z-index:40;width:44px;height:44px;margin-left:-22px;transform:translateY(-100%);pointer-events:none;animation:tutbob .9s ease-in-out infinite;filter:drop-shadow(0 3px 3px rgba(0,0,0,.35))}
.tut-arrow.up{transform:rotate(180deg)}
.tut-arrow .ico,.tut-arrow3d .ico{width:44px;height:44px}
.tut-arrow3d{position:absolute;left:0;top:0;width:44px;height:44px;margin:-44px 0 0 -22px;pointer-events:none;animation:tutbob .9s ease-in-out infinite;filter:drop-shadow(0 3px 3px rgba(0,0,0,.35))}
@keyframes tutbob{50%{translate:0 -10px}}
.tut-pulse{animation:tutpulse 1.2s ease-in-out infinite!important;position:relative;z-index:1}
@keyframes tutpulse{50%{box-shadow:0 0 0 6px rgba(255,210,58,.75),0 0 18px 6px rgba(255,210,58,.5)}}
.coach-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:5px;font-size:13px}
.coach .pips{display:flex;gap:4px}.coach .pips i{width:14px;height:6px;border-radius:3px;background:var(--line)}.coach .pips i.on{background:var(--green)}.coach .pips i.now{background:var(--gold)}
.coach .cost-line .ico{width:18px;height:18px}
.goal-list{display:grid;gap:6px}.goal-list>div{display:flex;gap:10px;align-items:center;background:var(--panel-2);border-radius:12px;padding:8px 10px}.goal-list .ico{width:30px;height:30px;flex:none}
.coach{bottom:calc(136px + env(safe-area-inset-bottom))} /* room for the arrow over the dock */
.queue{flex-wrap:nowrap;overflow-x:auto;min-height:40px}.queue button{flex:none}.queue-empty{color:var(--ink-soft)} /* one fixed line: the cards never move under a finger */
input.name.small{width:92px;padding:7px 10px;font-size:15px}
/* ---- Battalions (main.js) ---- */
input.name.small.wide{width:100%;flex:1}
.raid.bat .info small{color:var(--ink-soft)}.raid.bat .desc{font-style:italic}
.createbat{display:grid;gap:8px}
.members{display:grid;gap:6px}
.member{background:var(--panel-2);border-radius:14px;overflow:hidden}.member>.row{padding:0 10px 10px}
.mrow{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"rank name more" "rank info more";column-gap:10px;align-items:center;width:100%;text-align:left;padding:8px 10px}
.mrow .rank{grid-area:rank}.mrow b{grid-area:name}.mrow small{grid-area:info;color:var(--ink-soft);display:flex;gap:4px;align-items:center;flex-wrap:wrap}.mrow>.ico{grid-area:more;width:22px;height:22px}
.mrow small .ico{width:16px;height:16px}
.rank{font-size:12px;font-weight:700;border-radius:999px;padding:3px 9px;background:var(--line);color:var(--ink)}
.rank.r-commander{background:var(--gold);color:#4a2c00}.rank.r-officer{background:var(--olive);color:#fff}.rank.r-sergeant{background:#cfd9b0}
label.check{display:inline-flex;gap:6px;align-items:center;font-weight:600}
.sidebtn.locked{opacity:.6}
.tabs button .ico{width:20px;height:20px;vertical-align:-4px;margin-right:4px}
/* ---- Battalion chat ---- */
.chat{display:flex;flex-direction:column;gap:6px;max-height:min(46vh,420px);overflow-y:auto;background:var(--panel-2);border-radius:16px;padding:10px}
.msg{background:var(--panel);border-radius:14px 14px 14px 4px;padding:7px 11px;max-width:85%;align-self:flex-start;box-shadow:0 2px 0 var(--line)}
.msg.me{align-self:flex-end;border-radius:14px 14px 4px 14px;background:#eef6dd}
.msg.sys{align-self:center;background:none;box-shadow:none;color:var(--ink-soft);font-size:13px;text-align:center;padding:2px}
.msg p{margin:2px 0 0;overflow-wrap:anywhere}.msg.signal p{font-weight:600}.msg p .ico{width:18px;height:18px;vertical-align:-4px;margin-right:4px}
.msg-head{color:var(--ink);display:flex;gap:8px;align-items:baseline;padding:0;font-size:13px}.msg-head small{color:var(--ink-soft)}
.msg-acts{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:6px}
.composer{display:flex;gap:6px;align-items:center}.composer .btn{flex:none}
.signals{display:flex;gap:6px;flex-wrap:wrap}
/* ---- Reinforcements ---- */
.reqbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--panel-2);border-radius:14px;padding:6px 10px}.reqbar>.ico{width:30px;height:30px}
.reqbar span{flex:1;display:flex;gap:4px;align-items:center;flex-wrap:wrap}.reqbar span .ico{width:22px;height:22px}
.msg.request{background:#fff7dc;max-width:92%}.msg.request .progress{height:8px;margin-top:4px}.msg.request .ico{width:20px;height:20px;vertical-align:-4px}
/* ---- Raids: Player or AI ---- */
.kindtag{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.04em;border-radius:6px;padding:1px 6px;vertical-align:2px;text-transform:uppercase}
.kindtag.player{background:var(--olive);color:#fff}.kindtag.ai{background:#d9dce4;color:#3b4252}
/* ---- Campaign Pass ---- */
.passgrid{display:grid;grid-template-columns:40px 1fr 1fr;gap:6px;align-items:stretch}
.phead{font-weight:700;font-size:13px;color:var(--ink-soft);display:flex;gap:4px;align-items:center}.phead .ico{width:20px;height:20px}
.ptier{display:grid;place-items:center;font-weight:800;border-radius:12px;background:var(--panel-2);color:var(--ink-soft)}.ptier.on{background:var(--gold);color:#4a2c00}
.pcell{display:flex;gap:6px;align-items:center;justify-content:space-between;background:var(--panel-2);border-radius:12px;padding:6px 8px;min-height:44px}
.pcell.premium{background:#fff3cf}.pcell.got{opacity:.55}.pcell .ui-ico{width:22px;height:22px}
.raid.premium{background:#fff3cf}
/* ---- Theatre Ops and weekend events ---- */
.front{position:relative;height:14px;border-radius:8px;background:var(--panel);margin:6px 0 4px;overflow:hidden}.front i{display:block;height:100%;background:linear-gradient(#9fd65b,var(--green))}
.front span{position:absolute;top:0;bottom:0;width:2px;background:rgba(0,0,0,.18)}
.tiers{display:grid;gap:6px}.tiers .pcell b{width:44px}
.raid.event.on{background:#fff3cf}.sidebtn.event{background:#fff3cf}

/* ---- Settings, as in SkylineTopia and Harvest Tycoon: the account card, one calm list, a page per row ---- */
.account-card{display:grid;gap:10px;background:var(--panel-2);border-radius:16px;padding:12px}
.account-top{display:flex;gap:12px;align-items:center}.account-top>.ico{width:56px;height:56px;flex:none}
.account-top div{display:grid;gap:1px;min-width:0}.account-top b{font-size:18px}.account-top small{font-size:12px;color:var(--ink-soft)}
.account-top .muted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn.wide{width:100%;justify-content:center}
.settings-list{list-style:none;margin:0;padding:0;display:grid;border-radius:16px;overflow:hidden;background:var(--panel-2)}
.settings-list li+li{border-top:1px solid var(--line)}
.settings-list button{display:flex;align-items:center;gap:12px;width:100%;padding:10px 14px;font-weight:600;font-size:15px;text-align:start}
.settings-list button:hover{background:rgba(0,0,0,.04)}.settings-list .ico{width:30px;height:30px;flex:none}.settings-list span{flex:1}
.chev{width:9px;height:9px;border:solid var(--ink-soft);border-width:2px 2px 0 0;transform:rotate(45deg);flex:none}
[dir=rtl] .chev{transform:rotate(-135deg)}
.menu-foot{font-size:12.5px;display:flex;gap:6px;align-items:center;justify-content:center}.menu-foot .ico{width:16px;height:16px}
.other-game{text-decoration:none;color:var(--ink)}.other-game>span:first-child{display:flex;gap:12px;align-items:center;min-width:0}
.other-game>span:first-child>span{display:grid;gap:2px}.other-game small{color:var(--ink-soft);font-size:12.5px;font-weight:400}
.game-logo{width:88px;height:64px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.25))}
.setrow.danger{flex-wrap:wrap;gap:8px}
.modal header .close.back{display:grid;place-items:center}.settings-back{font-size:30px;line-height:1;margin-top:-4px;font-weight:700}
[dir=rtl] .settings-back{transform:scaleX(-1)}
/* ---- The footer bar (desktop), as in SkylineTopia and Harvest Tycoon: © left, our other games in the middle, links right ---- */
.site-foot{display:none}
.landing-foot .other-games a{font-weight:700;opacity:.9;color:var(--olive-dark)}
@media (min-width:900px) and (hover:hover) and (pointer:fine){
 :root{--foot-h:34px}
 .site-foot{position:fixed;left:0;right:0;bottom:0;height:var(--foot-h);z-index:45;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:0 18px;
  background:rgba(22,30,12,.72);backdrop-filter:blur(10px);border-top:1px solid rgba(255,255,255,.12);font-size:13px;font-weight:600;color:rgba(255,255,255,.72)}
 .site-foot a{color:rgba(255,255,255,.88);text-decoration:none}.site-foot a:hover{color:#fff;text-decoration:underline}
 .site-foot-copy{white-space:nowrap}
 .site-foot nav{display:flex;gap:18px;white-space:nowrap}
 .site-foot .other-games a{color:var(--gold);font-weight:700}
 .site-foot-links{justify-self:end}
 /* The game's own bottom bars (dock, sheet, troops) sit on top of the bar, not behind it. */
 #ui{bottom:var(--foot-h)}
 .landing{bottom:var(--foot-h)}
 /* Panels are capped at the height above the bar (see .modal), and the cookie banner sits above it too. */
 .cookie-banner{bottom:calc(12px + var(--foot-h))}
 .landing-foot{display:none}
}

/* ---- Rankings ---- */
.ranklist{display:grid;gap:6px}
.rankrow{display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:center;text-align:left;background:var(--panel-2);border-radius:14px;padding:8px 12px;width:100%;color:var(--ink)}
.rankrow.me{background:#eef6dd;box-shadow:inset 0 0 0 2px var(--olive)}.rankrow .pos{font-size:18px;text-align:center}.rankrow small{display:block;color:var(--ink-soft)}
.rankrow:nth-child(1) .pos{color:#c88a10}.rankrow:nth-child(2) .pos{color:#8a93a0}.rankrow:nth-child(3) .pos{color:#a8683a}
/* ---- Feedback & bugs (Settings) and the admin's Feedback tab ---- */
textarea.fb-text{font:500 16px/1.4 var(--font);resize:vertical;min-height:130px}
.fb-item{align-items:flex-start;flex-wrap:nowrap}.fb-item>img.ico{width:36px;height:36px}
.fb-body{margin:4px 0!important;color:var(--ink)!important;white-space:pre-wrap;word-break:break-word;-webkit-user-select:text;user-select:text}
button.setrow.other-game{width:100%;text-align:start}
/* The Armory's turntable with ‹ › to page through every model of the weapon (one per level). */
.tt-col{display:grid;gap:4px;justify-items:center;align-content:start}.tt-nav{display:flex;gap:6px;align-items:center}
.tt-nav .btn{min-width:34px;padding:4px 10px;font-size:18px}.tt-nav small{white-space:nowrap}
.warscore{font-weight:800;font-size:17px}.warscore.ahead{color:var(--green-dark,#3c8a24)}
.raid small.wide{flex-basis:100%;color:var(--ink-soft)}
