/* NatPangea styles. Dark-theme overrides are in dark.css. */
:root{--bg1:#f2f4f7;--bg2:#dfe3e9;--panel:#ffffff;--panel2:#f3f5f8;--line:#d9dee5;--text:#1c2430;--muted:#6b7684;--accent:#3a6fb0;--accent2:#5b8ed0;--good:#1f9d63;--bad:#d9443f;--warn:#c98a12;--steel:linear-gradient(180deg,#ffffff,#e9ecf0);--line2:#e3e7ec;--btnline:#c9cfd8;--hover:rgba(58,111,176,.07);--sh:rgba(20,30,45,.08);--hl:#fff}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:linear-gradient(160deg,var(--bg1),var(--bg2)) fixed;color:var(--text);font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
button,input,select,textarea{font:inherit;color:inherit}
button{background:var(--steel);border:1px solid var(--btnline);border-radius:9px;padding:7px 13px;cursor:pointer;box-shadow:0 1px 2px var(--sh),inset 0 1px 0 var(--hl);transition:.15s}
button:hover{border-color:var(--accent);box-shadow:0 2px 6px rgba(58,111,176,.2),inset 0 1px 0 var(--hl)}
button.primary{background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:#2f5d95;color:#fff;font-weight:600;text-shadow:0 1px 1px rgba(0,0,0,.2)}
button.danger{border-color:var(--bad);color:var(--bad)}
button:disabled{opacity:.45;cursor:not-allowed}
button.sm{padding:3px 10px;font-size:13px}
input,select,textarea{background:#fff;border:1px solid var(--line);border-radius:9px;padding:7px 10px;width:100%;box-shadow:inset 0 1px 2px rgba(20,30,45,.06)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent)}
textarea{resize:vertical;min-height:60px}
label{display:block;font-size:12px;color:var(--muted);margin:10px 0 4px}
.wrap{max-width:1180px;margin:0 auto;padding:0 16px}
header{background:linear-gradient(180deg,#fdfdfe,#e6e9ee);border-bottom:1px solid #c9cfd8;position:sticky;top:0;z-index:5;box-shadow:0 2px 10px rgba(20,30,45,.08)}
.top{display:flex;align-items:center;gap:12px;padding:10px 0;flex-wrap:wrap}
.brand{font-weight:800;letter-spacing:.5px;font-size:19px;background:linear-gradient(180deg,#4a5563,#1c2430);-webkit-background-clip:text;background-clip:text;color:transparent}
a.brand{text-decoration:none}
.brand span{background:linear-gradient(180deg,var(--accent2),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent}
.date{color:var(--muted);font-size:13px}
.spacer{flex:1}
.flagmini{width:36px;height:24px;object-fit:cover;border-radius:3px;border:1px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.flagtiny{width:30px;height:20px;object-fit:cover;border-radius:2px;border:1px solid var(--line);vertical-align:middle}
.res{display:flex;flex-wrap:wrap;gap:5px;padding:0 0 10px}
.chip{background:var(--steel);border:1px solid var(--btnline);border-radius:999px;padding:3px 11px;white-space:nowrap;font-size:12.5px;box-shadow:inset 0 1px 0 var(--hl)}
.chip b{font-weight:600}
.neg{color:var(--bad)}.pos{color:var(--good)}.muted{color:var(--muted)}.warn{color:var(--warn)}
nav{display:flex;gap:2px;border-top:1px solid #d2d7de;overflow:visible}
nav .navitem{position:relative}
nav button.tab{background:none;border:none;border-bottom:2px solid transparent;border-radius:0;padding:10px 14px;color:var(--muted);box-shadow:none;white-space:nowrap}
nav button.tab:hover{color:var(--text)}
nav button.tab.on{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}
.dd{display:none;position:absolute;left:0;top:100%;min-width:210px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(20,30,45,.18);padding:6px;z-index:9}
.navitem:hover .dd{display:block}
.dd button{display:block;width:100%;text-align:left;background:none;border:none;box-shadow:none;border-radius:8px;padding:8px 10px}
.dd button:hover{background:var(--panel2);color:var(--accent)}
main{padding:22px 0 60px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px;margin-bottom:14px;box-shadow:0 4px 16px rgba(20,30,45,.06)}
.card h2{margin:0 0 12px;font-size:16px}
h3.sec{margin:16px 0 8px;font-size:12.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.stat{background:var(--panel2);border:1px solid #e6e9ee;border-radius:10px;padding:9px 11px}
.stat .l{font-size:12px;color:var(--muted)}
.stat .v{font-size:16px;font-weight:600}
.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:720px){.two{grid-template-columns:1fr}}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:8px 6px;border-bottom:1px solid #e9ecf0;vertical-align:middle}
th{font-size:12px;color:var(--muted);font-weight:500}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
tr.total td{font-weight:700;border-top:2px solid var(--line)}
tr.me td{background:rgba(58,111,176,.07)}
tr.link{cursor:pointer}tr.link:hover td{background:rgba(58,111,176,.12)}
.tblwrap{overflow-x:auto}
.citycards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.city{background:var(--panel2);border:1px solid #e3e7ec;border-radius:12px;padding:12px;cursor:pointer;transition:.15s}
.city:hover{border-color:var(--accent);box-shadow:0 4px 14px rgba(58,111,176,.15);transform:translateY(-1px)}
.badge{display:inline-block;font-size:11px;padding:1px 7px;border-radius:999px;border:1px solid var(--line);margin-left:6px;background:#fff}
.badge.good{color:var(--good);border-color:var(--good)}.badge.bad{color:var(--bad);border-color:var(--bad)}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.row input{width:auto;flex:1;min-width:100px}
.imp td:first-child{min-width:170px}
.desc{font-size:12px;color:var(--muted)}
.log div{padding:7px 0;border-bottom:1px solid #e9ecf0;font-size:13px}
#toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#fff;border:1px solid var(--line);padding:10px 16px;border-radius:10px;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90vw;z-index:30;box-shadow:0 8px 24px rgba(20,30,45,.18)}
#toast.show{opacity:1}#toast.bad{border-color:var(--bad)}#toast.good{border-color:var(--good)}
.narrow{max-width:640px;margin:30px auto}
.center{text-align:center;padding:60px 16px;color:var(--muted)}
.flagbig{width:180px;height:120px;object-fit:cover;border-radius:8px;border:1px solid var(--line);background:var(--panel2)}

/* ---- Country page ----
   Page background fills everything below the header (square, no gaps).
   [ horizontal backdrop: full width across the top                     ]
   [ vertical backdrop ][ panel: rounded, floating, page bg shows around ]
   Floating on top: the flag (top-left, wider than the vertical backdrop) and
   the coat of arms over the flag's bottom-right corner.
   The panel fills the rest of the screen and scrolls inside itself. */
main.flush{padding:0}
.wrap.full{max-width:none;padding:0}
.wrap.wide{max-width:1520px}
@property --k{syntax:'<number>';inherits:true;initial-value:0}   /* a real number, so it can glide */
.np{transition:--k .14s ease-out}   /* smooths the steps between mouse-wheel notches */
.np{--k:0;--vw:calc(320px * (1 - .5 * var(--k)));--bhh:calc(clamp(170px,24vh,300px) * (1 - .5 * var(--k)));--fh:calc(var(--bhh) + 5px);--fw:calc(var(--fh) * 1.5);--ov:30px;--coa:calc(var(--bhh) * .31);
 position:relative;display:grid;grid-template-columns:var(--vw) minmax(0,1fr);grid-template-rows:var(--bhh) minmax(0,1fr);
 height:calc(100vh - var(--hh,137px));min-height:640px;background:#cfd4db center/cover no-repeat}
.bd{position:relative;background-position:center;background-size:cover;background-repeat:no-repeat;z-index:1}
.bh{grid-column:1/3;grid-row:1;background-image:linear-gradient(90deg,#7c8695,#aeb6c2);overflow:hidden}
.bv{grid-column:1;grid-row:2;background-image:linear-gradient(180deg,#8d97a6,#5a6473)}
/* the flag fills the top-left corner under the header: square corners, no frame (transparent PNGs show the backdrop through) */
.np-flag{position:absolute;z-index:4;left:0;top:0;width:var(--fw);height:var(--fh);border-radius:0;background:center/cover no-repeat;border:none;box-shadow:0 16px 36px rgba(0,0,0,.3)}
.np-flag.empty{background-color:#cfd4db}
.np-flag.empty{display:flex;align-items:center;justify-content:center;text-align:center;padding:10px;color:#6b7684;font-size:13px}
.np-coa{position:absolute;z-index:6;width:var(--coa);height:var(--coa);left:calc(var(--fw) - var(--coa) * .62);top:calc(var(--fh) - var(--coa) * .62);background:center/contain no-repeat;filter:drop-shadow(0 8px 16px rgba(0,0,0,.4));pointer-events:none}
.np-coa.empty{border-radius:50%;background:rgba(255,255,255,.28) center/58% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 4 5.5v6c0 5 3.4 8.6 8 10 4.6-1.4 8-5 8-10v-6z'/%3E%3Cpath d='M12 7v9M8.5 10.5h7'/%3E%3C/svg%3E");border:2px solid rgba(255,255,255,.75);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);filter:drop-shadow(0 6px 14px rgba(0,0,0,.25))}
.np-title{position:absolute;left:calc(var(--fw) + 40px);top:calc(30px - 18px * var(--k));right:28px;max-height:calc(var(--bhh) - var(--ov) - 12px + 18px * var(--k));overflow:hidden;pointer-events:none;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.6),0 0 2px rgba(0,0,0,.6)}
.np-title h1{margin:0;font-size:calc(36px - 10px * var(--k));letter-spacing:.3px;line-height:1.1}
.np-title .motto{font-style:italic;font-size:calc(19px - 5px * var(--k));opacity:.97;margin-top:6px}
.np-title .led{margin-top:8px;font-size:calc(16.5px - 3.5px * var(--k));opacity:.97}
.np-panel{grid-column:2;grid-row:2;position:relative;z-index:3;margin:calc(var(--ov) * -1) 28px 28px calc(var(--ov) * -1);background:#fff;border-radius:28px;box-shadow:0 20px 50px rgba(20,30,45,.3);display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
/* tab row starts just right of the coat of arms */
.ptabs{flex:none;display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:18px 20px 16px calc(var(--fw) + var(--coa) * .38 - var(--vw) + var(--ov) + 16px)}
.ptabs button{border-radius:999px;padding:6px 16px}
.ptabs button.on{background:linear-gradient(180deg,var(--accent2),var(--accent));color:#fff;border-color:#2f5d95;font-weight:600}
.ptabs .ptools{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ptools input{width:220px}
.pbody{flex:1;min-height:0;overflow:auto;padding:4px 20px 22px;scrollbar-width:thin}
.linkbtn{background:none;border:none;box-shadow:none;padding:0;color:var(--accent);text-decoration:underline;font-size:inherit}
.linkbtn:hover{box-shadow:none}

/* Info tab */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:2px 0 16px}
.kpi{background:linear-gradient(180deg,#fff,#eef1f5);border:1px solid #dde2e8;border-radius:14px;padding:13px 16px;box-shadow:inset 0 1px 0 #fff,0 1px 3px rgba(20,30,45,.06);min-width:0}
.kpi .l{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}
.kpi .v{font-size:23px;font-weight:700;margin-top:3px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi .s{font-size:12px;color:var(--muted);margin-top:2px}
.icols{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;align-items:start}
.icard{background:var(--panel2);border:1px solid #e3e7ec;border-radius:14px;padding:14px 16px}
.icard h4{margin:0 0 10px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}
.about{white-space:pre-wrap;margin:0;font-size:14.5px;line-height:1.6}
.kv{display:grid;grid-template-columns:auto 1fr;margin:0}
.kv dt,.kv dd{padding:8px 0;border-bottom:1px solid #e3e7ec;margin:0}
.kv dt{color:var(--muted);font-size:13px;padding-right:14px}
.kv dd{text-align:right;font-weight:600}
.kv dt:last-of-type,.kv dd:last-of-type{border-bottom:none}

/* Cities list: large rows, cover image fading into the row */
.clist{display:flex;flex-direction:column;gap:12px}
.crow{position:relative;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.8fr) 120px minmax(0,.7fr);align-items:center;gap:18px;min-height:108px;padding:14px 28px 14px 33%;border-radius:16px;background:linear-gradient(180deg,#fff,#f1f3f6);border:1px solid #e0e4ea;overflow:hidden;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.crow:hover{border-color:var(--accent);box-shadow:0 6px 18px rgba(58,111,176,.16)}
.ccover{position:absolute;left:0;top:0;bottom:0;width:40%;background:linear-gradient(135deg,#a3acb8,#5f6876) center/cover no-repeat;-webkit-mask-image:linear-gradient(90deg,#000 40%,transparent 100%);mask-image:linear-gradient(90deg,#000 40%,transparent 100%)}
.czone{position:absolute;left:0;top:0;bottom:0;width:26%;display:flex;align-items:center;justify-content:center;z-index:2}
.cedit{opacity:0;transition:opacity .15s}
.czone:hover .cedit{opacity:1}
.cname{position:relative;z-index:1;min-width:0}
.cname b{font-size:19px}
.cname .sub{font-size:12px;color:var(--muted);margin-top:3px}
.cstat{position:relative;z-index:1;font-size:14px;line-height:1.7}
.cstat .l{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}
.cstat .big{font-size:21px;font-weight:700;font-variant-numeric:tabular-nums}

/* City page */
.cbanner{position:relative;height:230px;border-radius:18px;overflow:hidden;background:linear-gradient(135deg,#8d97a6,#4f5866) center/cover no-repeat;margin-top:2px}
.cbanner::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 35%,rgba(0,0,0,.55));pointer-events:none}
.cbanner .back{position:absolute;left:14px;top:14px;z-index:2}
.cbanner .cbedit{position:absolute;right:76px;bottom:14px;z-index:4;opacity:0;transition:opacity .2s}
/* City tier: a large Roman numeral. Colours come from CITY_TIERS in src/game-data.js. */
.ctier{position:relative;z-index:1;font-family:"Cinzel",Georgia,"Times New Roman",serif;font-weight:900;font-size:46px;line-height:1;text-align:center;color:var(--tc);letter-spacing:1px;text-shadow:0 1px 0 rgba(255,255,255,.35),0 2px 6px rgba(0,0,0,.35);user-select:none}
.ctier.village{display:flex;align-items:center;justify-content:center}
.ctier.village img{width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35))}
.ctier.village img+.vfb{display:none}
.ctier.village .vfb{font-size:17px;letter-spacing:.5px;color:#8a7a5c;text-shadow:none}
.ctier.big.village img{width:96px;height:96px}
.ctier.big.village .vfb{font-size:30px;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.6)}
.ctier.big{position:absolute;right:26px;top:16px;z-index:2;font-size:84px;text-shadow:0 2px 0 rgba(0,0,0,.25),0 4px 18px rgba(0,0,0,.55)}
.ctier.big.none{font-size:40px;color:#fff;opacity:.35}
/* ‹ › on the city banner: faint until you hover */
.cnav{position:absolute;top:0;bottom:0;z-index:3;width:64px;border:none;border-radius:0;box-shadow:none;background:none;color:#fff;font-size:54px;line-height:1;opacity:.28;transition:opacity .2s,background .2s;text-shadow:0 2px 8px rgba(0,0,0,.6)}
.cnav:hover{opacity:1;box-shadow:none;background:linear-gradient(90deg,rgba(0,0,0,.35),rgba(0,0,0,0))}
.cnav.prev{left:0}.cnav.next{right:0}
.cnav.next:hover{background:linear-gradient(270deg,rgba(0,0,0,.35),rgba(0,0,0,0))}
.cbanner .back{left:70px}
.cbanner .cbtitle{padding-left:52px;padding-right:52px}
/* Buildings: two categories per row */
.cbsum{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;background:var(--panel2);border:1px solid var(--line2);border-radius:14px;padding:10px 14px}
.cbcol h4{margin:2px 0 6px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}
.cbline{display:flex;justify-content:space-between;gap:8px;font-size:13.5px;padding:2px 0}
.cbline b{font-weight:800;color:var(--muted);font-variant-numeric:tabular-nums}
.cbline b.has{color:var(--accent)}
@media(max-width:1000px){.cbsum{grid-template-columns:repeat(2,minmax(0,1fr))}}
h2.bhead{font-size:28px;margin:26px 0 12px;display:flex;align-items:baseline;gap:14px}
h2.bhead .muted{font-size:14px;font-weight:500}
.bgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.bcat{background:var(--panel2);border:1px solid var(--line2);border-radius:14px;padding:8px 14px 6px}
.bcat h4{margin:4px 0 4px;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}
.bimp{display:grid;grid-template-columns:minmax(0,1fr) 54px auto;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line2)}
.bimp b{font-size:16.5px}
.bimp.locked .bmain>b,.bimp.locked .beff,.bimp.locked .bcost{opacity:.5}
.block{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:700;color:#fff;background:var(--tc);vertical-align:2px}
.beff,.bcost{font-size:12.5px;color:var(--muted);margin-top:2px}
.beff .ricon,.bcost .ricon{margin:0 1px}
.bcount{font-size:18px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.bcount small{font-size:12px;font-weight:400;color:var(--muted);margin-left:2px}
.bbtns{display:flex;gap:4px}
.bbtns button{padding:3px 11px}
@media(max-width:1000px){.bgrid{grid-template-columns:1fr}}
.cbanner:hover .cbedit{opacity:1}
.cbtitle{position:absolute;left:24px;right:24px;bottom:18px;z-index:2;color:#fff;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cbtitle h2{margin:0;font-size:40px;line-height:1.05;text-shadow:0 2px 12px rgba(0,0,0,.5)}
.cbtitle h2.editable{cursor:text;transition:opacity .15s}
.cbtitle h2.editable:hover{opacity:.7}
.cbtitle h2.editable:hover::after{content:' ✎';font-size:24px}
.cbtitle input{font-size:28px;font-weight:700;max-width:480px;width:auto;flex:1;background:rgba(255,255,255,.95);color:var(--text)}
.cbtitle .badge{background:rgba(255,255,255,.92)}
.cstats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:14px 0}
.cstats:not(:has(.cmoney)){grid-template-columns:repeat(4,minmax(0,1fr))}
/* City money box: Net large, Output and Upkeep under it */
.cmoney .v{font-size:23px}
.cmrow{display:flex;justify-content:space-between;gap:8px;font-size:12.5px;color:var(--muted);margin-top:2px}
.cmrow b{font-weight:700;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.cstats{grid-template-columns:repeat(3,minmax(0,1fr))}}

@media(max-width:900px){
 .np{--vw:0px;--fw:150px;--fh:100px;--coa:56px;display:block;height:auto;min-height:0;padding-bottom:14px}
 .bv{display:none}
 .bh{height:190px}
 .np-flag{left:0;top:0}
 .np-coa{left:calc(var(--fw) - var(--coa) * .62);top:calc(var(--fh) - var(--coa) * .62)}
 .np-title{left:172px;top:16px}.np-title h1{font-size:22px}.np-title .motto{font-size:14px}.np-title .led{font-size:13px}
 .np-panel{margin:-24px 12px 0;overflow:visible}
 .ptabs{padding-left:20px}
 .pbody{overflow:visible}
 .crow{grid-template-columns:1fr;padding-left:40%;gap:6px}
 .crow .ctier{text-align:left;font-size:34px}
 .cstats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cbtitle h2{font-size:28px}
}

/* Revenue */
.rev table{width:100%}
tr.rsec th{background:linear-gradient(180deg,#f6f7fa,#e3e7ed);color:var(--text);font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;border-top:1px solid #d6dbe2;border-bottom:1px solid #d6dbe2;padding:9px 10px}
tr.rsec th.num{text-transform:none;font-weight:500;color:var(--muted);letter-spacing:0}
tr.rsec:first-child th:first-child{border-top-left-radius:10px}tr.rsec:first-child th:last-child{border-top-right-radius:10px}
.rev td{padding:9px 10px}
tr.rexp{cursor:pointer}tr.rexp:hover td{background:rgba(58,111,176,.06)}
.caret{display:inline-block;width:12px;margin-right:6px;line-height:1;text-align:center;vertical-align:middle;transform-origin:50% 50%;color:var(--muted);transition:transform .15s}
.caret.open{transform:rotate(90deg)}
tr.rsub td{font-size:13px;color:var(--muted);background:#f8f9fb}
tr.rsub td:first-child{padding-left:36px}
.taxbits{display:inline-flex;align-items:center;gap:18px;margin-left:16px;flex-wrap:wrap}
.combox{color:var(--muted);font-size:13px}.combox b{color:var(--text)}
.taxbox{display:inline-flex;align-items:center;gap:6px}
.taxbox input{width:72px;padding:3px 8px;text-align:right}

/* Info tab */
.igrid{display:grid;grid-template-columns:minmax(200px,270px) minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:start}
.icol{display:flex;flex-direction:column;gap:12px;min-width:0}
.lportrait{aspect-ratio:3/4;border-radius:14px;background:#cfd4db center/cover no-repeat;border:1px solid #dde2e8;box-shadow:0 2px 10px rgba(20,30,45,.1)}
.lportrait.empty{display:flex;align-items:center;justify-content:center;text-align:center;padding:16px;color:var(--muted);font-size:13px;background:linear-gradient(180deg,#eef1f5,#dfe3e9)}
.lcard{flex:none}
.lname{font-size:20px;font-weight:700;line-height:1.2}
.ltitle{color:var(--muted);font-style:italic;margin:3px 0 0}
.lcard .kv{margin-top:8px}
.igrid .kpis{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 16px}
/* Country tab: compact figures across the top */
.igrid .kpis.mini{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 14px}
.kpis.mini .kpi{padding:8px 11px;border-radius:10px}
.kpis.mini .kpi .l{font-size:10.5px}
.kpis.mini .kpi .v{font-size:17px;margin-top:1px}
.igrid .kpis.mini.gov{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:8px}
.igrid .icard .idesc{margin:0;padding:0;border:none;background:none;box-shadow:none}
.imap{display:flex;flex-direction:column}
.mapph{height:340px;border:2px dashed var(--line);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;color:var(--muted);padding:20px}
.mapph b{font-size:17px;color:var(--text)}
/* Government, state religion, ideology across the top */
.govrow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 10px}
.govitem{display:flex;flex-direction:column;gap:2px;padding:9px 12px;border-radius:10px;background:var(--hover);min-width:0}
.govitem span{font-size:10.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}
.govitem b{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Badges */
.badges{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 2px}
.badgeic{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:8px;background:var(--hover);overflow:hidden;flex:none}
.badgeic img{width:100%;height:100%;object-fit:contain}
.badgeic i{font-style:normal;font-weight:800;font-size:13px;color:var(--muted)}
.badgeic.lg{width:56px;height:56px}
.badgelist{display:flex;flex-direction:column;gap:8px}
.badgeitem{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--line2)}
.badgeitem .badges{margin:0}
.admgrid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.ldhead{margin:12px 0 4px}
.grresults{display:flex;flex-direction:column;gap:2px;margin:8px 0;max-width:620px}
.grres{display:flex;align-items:center;gap:10px;text-align:left;background:none;border:1px solid transparent;box-shadow:none;border-radius:10px;padding:7px 10px}
.grres:hover,.grres.on{background:var(--hover);border-color:var(--line2);box-shadow:none}
.grres .muted{font-size:12.5px}
.grpanel{border:1px solid var(--line2);border-radius:12px;padding:12px 14px;background:var(--panel2);margin-top:8px}
.grgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 24px;margin:12px 0}
.grrow{display:grid;grid-template-columns:22px 1fr 130px 130px;align-items:center;gap:8px;margin:0;font-weight:400}
.grrow .ricon{margin:0}.grhave{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}
.grrow input{padding:4px 8px;text-align:right}
@media(max-width:900px){.grgrid{grid-template-columns:1fr}}
@media(max-width:800px){.admgrid{grid-template-columns:1fr}.govrow{grid-template-columns:1fr}}
/* Policies tab */
.pol .polrow{padding:12px 0;border-bottom:1px solid var(--line2)}
.pollabel{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
.pollabel span{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.pol input[type=range]{width:100%;accent-color:var(--accent);padding:0;box-shadow:none;border:none;background:none}
.polticks{display:flex;justify-content:space-between;gap:4px;font-size:11.5px;color:var(--muted);margin-top:2px}
.polticks span{flex:1;text-align:center}.polticks span:first-child{text-align:left}.polticks span:last-child{text-align:right}
.polticks span.on{color:var(--accent);font-weight:700}
.polval{font-size:16px;font-weight:600}
.pol select{max-width:320px}
.pol .row{margin-top:14px}
.kpi.wide{grid-column:1/-1}
.kpi.wide .v{font-size:28px}
.idesc .about{font-size:15px}
@media(max-width:1250px){.igrid{grid-template-columns:minmax(190px,240px) minmax(0,1fr)}.igrid>.idesc,.igrid>.imap,.igrid>.icard:last-child{grid-column:1/-1}}
@media(max-width:700px){.igrid{grid-template-columns:1fr}.lportrait{max-width:280px}}
/* Country tab: the figures and the map share a row at the same height; the description runs under both */
.igrid.info{align-items:stretch;grid-template-rows:auto 1fr}   /* the tall leader column grows the description row, not the figures row */
.igrid.info>.icol{grid-row:span 2;align-self:start}
.igrid.info>.icard:not(.idesc){align-self:stretch}
.igrid.info>.icard:not(.idesc) .kpis.mini:last-child{margin-bottom:0}
.igrid.info>.imap .mapph{height:auto;flex:1;min-height:150px}
.igrid.info>.idesc{grid-column:2/-1;align-self:start}
/* The map is a square on the right; the country figures take the rest of the row and stretch to the same height */
.igrid.info{grid-template-columns:minmax(200px,270px) minmax(0,1fr) clamp(380px,33vw,780px)}
.igrid.info>.imap .mapph{flex:none;aspect-ratio:4/3;height:auto;min-height:0;padding:14px}
.igrid.info>.icard:not(.idesc):not(.imap){display:flex;flex-direction:column;gap:8px}
.igrid.info>.icard:not(.idesc):not(.imap)>.kpis.mini{flex:2;margin:0;grid-auto-rows:1fr}
.igrid.info>.icard:not(.idesc):not(.imap)>.kpis.mini.gov{flex:1}
.igrid.info>.icard:not(.idesc):not(.imap) .kpi{display:flex;flex-direction:column;justify-content:center}
@media(max-width:1250px){.igrid.info{grid-template-columns:minmax(190px,240px) minmax(0,1fr)}.igrid.info>.imap .mapph{aspect-ratio:auto;height:240px}}
@media(max-width:700px){.igrid.info{grid-template-columns:1fr}}
@media(max-width:1250px){.igrid.info{grid-template-rows:none}.igrid.info>.icol{grid-row:auto}.igrid.info>.imap,.igrid.info>.idesc{grid-column:1/-1}}
@media(max-width:700px){.igrid.info>.icol{grid-row:auto}}

/* Description */
.dhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.dhead h4{margin:0}
/* Quill's stylesheet loads after ours, so these selectors are made stronger than its own */
.idesc .descview.ql-container.ql-snow{border:none;font:inherit;font-size:15px;height:auto}
.idesc .descview .ql-editor{padding:0;line-height:1.6;overflow:visible}
.idesc .descedit .ql-container.ql-snow{border-radius:0 0 10px 10px;border-color:#d9dee5;background:#fff;font:inherit;font-size:15px}
.idesc .descedit .ql-toolbar.ql-snow{border-radius:10px 10px 0 0;background:linear-gradient(180deg,#fff,#eef1f5);border-color:#d9dee5;font-family:inherit}
.ql-editor img{max-width:100%;height:auto;border-radius:8px}
.ql-editor .ql-video{width:100%;max-width:640px;height:auto;aspect-ratio:16/9;border:0;border-radius:10px;display:block;margin:6px 0}
.descedit .ql-toolbar.ql-snow{border-radius:10px 10px 0 0;background:linear-gradient(180deg,#fff,#eef1f5);border-color:#d9dee5;font-family:inherit}
.descedit .ql-container.ql-snow{border-radius:0 0 10px 10px;border-color:#d9dee5;background:#fff;font:inherit;font-size:15px}
.descedit .ql-editor{min-height:280px;line-height:1.6}
.dactions{margin-top:10px}

/* Resource icons (files in /icons) */
.ricon{width:20px;height:20px;object-fit:contain;vertical-align:-5px;margin-right:6px;flex:none}
.ricon.sm{width:16px;height:16px;vertical-align:-3px}
.chip{display:inline-flex;align-items:center;padding:3px 10px 3px 5px;flex:1 1 auto;justify-content:center;min-width:0}
.chip .ricon{margin-right:5px}
.chip .rname{margin-right:5px}
.chip .ricon+.rname{display:none}   /* the name only shows if the icon picture is missing; hover shows it as a tooltip */
.chip b{margin-left:0}
a.nlink{color:inherit;text-decoration:none}
a.nlink:hover b{color:var(--accent);text-decoration:underline}

/* Market */
.mtabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:-4px 0 14px}
.mtabs button{background:none;border:none;box-shadow:none;border-bottom:2px solid transparent;border-radius:0;padding:9px 14px;color:var(--muted);font-weight:600}
.mtabs button.on{color:var(--accent);border-bottom-color:var(--accent)}
.rtabs{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;padding-bottom:10px;margin-bottom:6px}
@media(max-width:1100px){.rtabs{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}}
.rtab{display:flex;align-items:center;gap:2px;text-align:left;border-radius:12px;padding:7px 8px;white-space:nowrap;min-width:0;overflow:hidden}
.rtab span{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.rtab b{overflow:hidden;text-overflow:ellipsis}
.rtab small{color:var(--muted);font-size:11px}
.rtab.on{background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:#2f5d95;color:#fff}
.rtab.on small{color:rgba(255,255,255,.85)}
.mgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:12px}
/* Market → Send */
.trgrid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:10px}
.trside{background:var(--panel2);border:1px solid var(--line2);border-radius:12px;padding:6px 14px 12px}
.trrow{display:grid;grid-template-columns:24px 1fr 150px;align-items:center;gap:8px;margin:0;padding:4px 0;font-weight:400}
.trrow .ricon{margin:0}
.trrow input{padding:5px 8px;text-align:right}
.trto{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;margin:12px 0 4px;padding:10px 14px;background:var(--panel2);border:1px solid var(--line2);border-radius:12px;font-weight:700}
.trto input{margin:0}
/* every row keeps the icon column, even when a resource has no icon yet, so names and boxes line up */
.tricon{display:flex;align-items:center;justify-content:center;width:24px;height:24px}
.trname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trsend{margin:14px 0 6px}
.trlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px;margin-bottom:8px}
.trcard{border:1px solid var(--line2);border-radius:12px;padding:10px 14px;background:var(--panel2);display:flex;flex-direction:column;gap:8px}
.trcard.open{border-color:rgba(58,111,176,.4)}
.trhead{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.trgoods{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.trgoods small{display:block;color:var(--muted);font-size:11.5px;margin-bottom:3px}
.trgood{display:inline-flex;align-items:center;margin:0 10px 3px 0;white-space:nowrap}
.trgood .ricon{width:16px;height:16px;margin-right:4px;vertical-align:0}
@media(max-width:800px){.trgrid{grid-template-columns:1fr}}
@media(max-width:1000px){.mgrid{grid-template-columns:1fr}}
.mh{display:flex;align-items:center;gap:4px;font-size:15px;margin:6px 0 8px;flex-wrap:wrap}
.pager{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:400}
.pager button{padding:2px 11px;font-size:15px;line-height:1.2}
.mside{display:flex;flex-direction:column;min-width:0}
.moffers{flex:1;min-height:440px;background:var(--panel2);border:1px solid var(--line2);border-radius:12px;padding:2px 8px}
.moffers .mtable td{padding-top:7px;padding-bottom:7px}
.mh .desc{font-weight:400;margin-left:6px}
.fillc{white-space:nowrap}
.fillc input{width:90px;padding:3px 8px;margin-right:6px;text-align:right}
.seg{display:inline-flex;border:1px solid #c9cfd8;border-radius:10px;overflow:hidden;margin-bottom:6px}
.seg button{border:none;border-radius:0;box-shadow:none;background:var(--steel)}
.seg button.on{background:linear-gradient(180deg,var(--accent2),var(--accent));color:#fff}

/* News tab: [Post News + past news] [starred story] */
.ngrid{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,1.7fr);gap:16px;height:100%;min-height:440px}
.ncol{display:flex;flex-direction:column;gap:12px;min-height:0}
.npost{background:var(--panel2);border:1px solid var(--line2);border-radius:14px;padding:14px 16px}
.npost .big{width:100%;padding:11px;font-size:15px}
.npost .desc{margin:8px 0 0}
.nlist,.nstarbox{background:var(--panel2);border:1px solid var(--line2);border-radius:14px;padding:12px 14px;min-height:0;overflow:auto}
.nlist{flex:1}
.nlist h4,.nstarbox h4{margin:0 0 10px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}
.nitem,.pitem{display:flex;align-items:center;gap:12px;padding:8px;border-radius:10px;cursor:pointer;transition:background .15s}
.nitem:hover,.pitem:hover{background:var(--hover)}
.nthumb{flex:none;width:76px;height:52px;border-radius:8px;background:linear-gradient(135deg,#a3acb8,#5f6876) center/cover no-repeat;border:1px solid var(--line2)}
.nthumb.lg{width:120px;height:70px}
.ntext{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ntext b{font-size:14.5px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ntext small{font-size:12px;color:var(--muted)}
.nstar{flex:none;background:none;border:none;box-shadow:none;font-size:20px;padding:2px 6px;color:var(--muted);line-height:1}
.nstar.on{color:#e0a400}
.nstar:hover{box-shadow:none;color:#e0a400}
/* A news story */
.post .pcover{height:260px;border-radius:14px;background:center/cover no-repeat;margin-bottom:14px}
.post.compact .pcover{height:190px}
.ptitle{margin:0 0 6px;font-size:28px;line-height:1.2}
.post.compact .ptitle{font-size:22px}
.ptitle a{color:inherit;text-decoration:none}.ptitle a:hover{color:var(--accent)}
.pmeta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px;font-size:13.5px}
.pbody2 .descview.ql-container.ql-snow{border:none;font:inherit;font-size:15.5px;height:auto}
.pbody2 .descview .ql-editor{padding:0;line-height:1.65;overflow:visible}
.vote{background:var(--steel);border:1px solid var(--btnline);border-radius:999px;padding:4px 12px;font-weight:600;font-size:13px;white-space:nowrap}
.vote.on{background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:#2f5d95;color:#fff}
.vote.mine{color:var(--muted);border:1px dashed var(--line);background:none}
.votes{display:inline-flex;gap:4px;flex:none}
.vote.down.on{background:linear-gradient(180deg,#e0736b,#c0453c);border-color:#9e352d;color:#fff}
/* Replies under a news post */
.replies{margin-top:26px;border-top:1px solid var(--line2);padding-top:16px}
.replies h3{margin:0 0 12px;font-size:17px}
.rbox{margin:0 0 16px}
.rbox textarea{width:100%;resize:vertical;min-height:60px;font:inherit}
.rbox .row{margin-top:6px}
.thread{padding:10px 0;border-bottom:1px solid var(--line2)}
.reply{padding:4px 0}
.rhead{display:flex;align-items:center;gap:7px;font-size:13.5px}
.rbody{margin:5px 0 6px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.rbody .at{font-weight:600;margin-right:2px}
.ractions{display:flex;align-items:center;gap:10px}
.ractions .vote{padding:2px 10px;font-size:12px}
.rlink{background:none;border:none;box-shadow:none;padding:2px 4px;color:var(--muted);font-weight:600;font-size:12.5px}
.rlink:hover{color:var(--accent);box-shadow:none}
.rchildren{margin:6px 0 0 22px;padding-left:14px;border-left:2px solid var(--line2)}
.rchildren .rbox{margin:6px 0 4px}
.postpage{max-width:900px;margin:0 auto 14px}
/* Politics */
.plist{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.prank{flex:none;width:28px;text-align:center;font-size:18px;font-weight:800;color:var(--muted)}
/* Post news window */
.modal-box.wide{max-width:860px}
.ncoverpick{display:flex;align-items:center;gap:10px}
#nBody .ql-editor{min-height:260px}
/* Settings */
.setcard{max-width:760px}
.setrow{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid var(--line2)}
.switch{position:relative;display:inline-block;width:50px;height:28px;margin:0;flex:none}
.switch input{opacity:0;width:0;height:0}
.switch span{position:absolute;inset:0;border-radius:999px;background:var(--steel);border:1px solid var(--btnline);cursor:pointer;transition:.2s;box-shadow:inset 0 1px 3px rgba(0,0,0,.15)}
.switch span::before{content:'';position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.35);transition:.2s}
.switch input:checked+span{background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:#2f5d95}
.switch input:checked+span::before{transform:translateX(22px)}
/* National anthem: a small player in the bottom-left corner, shown while the anthem plays */
.anthem{position:fixed;left:18px;bottom:18px;z-index:25;width:216px;padding:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.25);opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .4s,transform .4s}
.anthem.show{opacity:1;transform:none;pointer-events:auto}
.anthem .ahead{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-bottom:6px}
.anthem .ahead span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.anthem .ahead button{padding:0 7px;font-size:12px}
#anthemSlot iframe{display:block;border-radius:8px;width:200px;height:113px}
@media(max-width:900px){.ngrid{grid-template-columns:1fr;height:auto}.nlist{max-height:420px}.nthumb.lg{width:90px;height:56px}}

/* ---- Notifications: bell in the header (top-left corner on wide screens) and its window ---- */
.nbell{position:relative;flex:none;width:40px;height:40px;padding:0;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:20px;line-height:1}
.nbell img{width:28px;height:28px;object-fit:contain}
.nbell img+.nbell-fb{display:none}
.nbadge{position:absolute;top:-6px;right:-7px;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:#e53935;color:#fff;font-size:11.5px;font-weight:700;line-height:21px;text-align:center;box-shadow:0 0 0 2px var(--panel)}
/* bell + envelope: in the header row on smaller screens, in the top-left corner on wide ones */
.hicons{display:inline-flex;align-items:center;gap:8px;flex:none}
.mbtn{position:relative;flex:none;width:48px;height:44px;padding:0;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:23px;line-height:1}
.mbtn img{width:34px;height:34px;object-fit:contain}
.mbtn img+.mbtn-fb{display:none}
@media(min-width:1360px){header .hicons{position:absolute;left:22px;top:12px;gap:10px}header .nbell{width:54px;height:54px;border-radius:14px}header .nbell img{width:38px;height:38px}header .nbell-fb{font-size:26px}
 header .mbtn{width:66px;height:58px;border-radius:14px}header .mbtn img{width:46px;height:46px}header .mbtn-fb{font-size:31px}}
/* ---- Messages window ---- */
.msgbox{max-width:1080px;display:flex;flex-direction:column;max-height:calc(100vh - 60px)}
.msgwrite{width:100%;margin:14px 0 0;padding:12px;font-size:15px;font-weight:700;border-radius:12px}
.msgwrite.on{background:linear-gradient(180deg,var(--accent2),var(--accent));border-color:#2f5d95;color:#fff}
.mcompose{border:1px solid var(--line2);border-top:none;border-radius:0 0 12px 12px;padding:4px 14px 14px;margin-top:-6px;background:var(--panel2)}
.mcompose .ql-editor{min-height:150px}
.murgent{display:inline-flex;align-items:center;gap:6px;margin:0;font-weight:600;cursor:pointer}
.murgent input{width:17px;height:17px;margin:0;padding:0;box-shadow:none;flex:none}
.urgent{display:inline-flex;align-items:center;justify-content:center;flex:none}
.urgent img{width:20px;height:20px;object-fit:contain}
.urgent img+.urgent-fb{display:none}
.urgent-fb{width:18px;height:18px;border-radius:50%;background:#e53935;color:#fff;font-weight:800;font-size:13px;line-height:18px;text-align:center}
.msgbar{display:flex;align-items:center;gap:8px;margin-top:14px;padding:8px 6px;border-bottom:1px solid var(--line2)}
.mcheck{display:inline-flex;align-items:center;gap:8px;margin:0;font-weight:400;font-size:13.5px;cursor:pointer}
.mcheck input{width:17px;height:17px;margin:0}
.msglist{overflow:auto;min-height:120px;flex:1}
.mrow{display:grid;grid-template-columns:28px minmax(150px,1.1fr) 2fr auto 72px;align-items:center;gap:10px;padding:10px 6px;border-bottom:1px solid var(--line2);cursor:pointer}
.mrow:hover{background:var(--hover)}
.mrow.read{opacity:.62}
.mrow.unread{background:var(--hover);box-shadow:inset 3px 0 0 var(--accent)}
.mrow.unread .mtitle{font-weight:700}
.mrow.sel{background:rgba(58,111,176,.16)}
.mfrom{display:flex;align-items:center;gap:8px;min-width:0}
.mwho{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.mwho b,.mwho small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mwho small{color:var(--muted);font-size:12px}
.flagtiny.none{display:inline-block;background:var(--steel)}
.mtitle{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mdot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent);margin-right:7px;vertical-align:1px}
.mflags{display:inline-flex;gap:6px;align-items:center}
.mfav{color:#e0a400;font-size:17px}
.mdate{color:var(--muted);font-size:12.5px;text-align:right}
.mthtitle{margin:12px 0 2px}
.mthread{overflow:auto;flex:1;min-height:80px;display:flex;flex-direction:column;gap:12px;margin:10px 0;padding-right:4px}
/* your messages lean left, theirs lean right */
.mmsg{border:1px solid var(--line2);border-radius:12px;padding:10px 14px;background:var(--panel2);margin-left:16%;max-width:84%}
.mmsg.mine{margin-left:0;margin-right:16%;border-color:rgba(58,111,176,.35);background:rgba(58,111,176,.07)}
.mhead{display:flex;align-items:center;gap:8px;font-size:13px}
.mbody .descview.ql-container.ql-snow{border:none;font:inherit;font-size:15px;height:auto}
.mbody .descview .ql-editor{padding:6px 0 0;line-height:1.55}
.mbody .ql-editor img,.mcompose .ql-editor img,.mreply .ql-editor img{max-width:100%;max-height:420px;border-radius:8px}
.mreply .ql-editor{min-height:90px}
@media(max-width:640px){.mrow{grid-template-columns:24px 1fr auto;grid-template-areas:"c f d" "c t g"}.mrow .mcheck{grid-area:c}.mfrom{grid-area:f}.mtitle{grid-area:t}.mflags{grid-area:g}.mdate{grid-area:d}}
.notifbox{max-width:620px;display:flex;flex-direction:column;max-height:calc(100vh - 60px)}
.notiflist{margin-top:12px;overflow:auto;min-height:120px;border-top:1px solid var(--line2)}
.notif{display:flex;gap:14px;padding:11px 6px;border-bottom:1px solid var(--line2);align-items:baseline}
.notif.new{background:var(--hover);box-shadow:inset 3px 0 0 var(--accent)}
.ndate{flex:none;width:118px;font-size:12px;color:var(--muted);white-space:nowrap}
.ntxt{flex:1;min-width:0;line-height:1.45;overflow-wrap:anywhere}
@media(max-width:560px){.notif{flex-direction:column;gap:2px}.ndate{width:auto}}
/* ---- Modal ---- */
.modal{position:fixed;inset:0;background:rgba(20,30,45,.45);z-index:20;display:flex;align-items:flex-start;justify-content:center;padding:30px 12px;overflow:auto}
.modal-box{background:#fff;border-radius:18px;max-width:700px;width:100%;padding:20px 22px;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.imgrow{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.imgslot{background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:10px}
.imgslot .prev{width:100%;height:90px;border-radius:6px;background:#d9dee5 center/cover no-repeat;margin-bottom:8px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:12px}
.imgslot input[type=file]{font-size:12px}
/* Out-of-food and pandemic notices */
.alertbar{margin:10px 0;padding:9px 13px;border:1px solid var(--bad);border-left-width:4px;border-radius:8px;background:rgba(200,40,40,.07);font-size:13.5px;line-height:1.45}
.phit{display:inline-block;font-size:11.5px;color:var(--muted);white-space:nowrap}
/* Resource bar: one row the width of the header; ten chips show at a time and the rest scroll sideways */
.res{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:6px;margin-bottom:4px;overscroll-behavior-x:contain}
.res{gap:4px}
.res .chip{flex:0 0 auto;min-width:calc((100% - 52px) / 14);font-size:13px;padding:3px 10px 3px 4px}   /* about 14 show at once on a wide screen; scrolls sideways */
.res .chip .ricon{width:22px;height:22px;margin-right:5px}
.chip .rname{overflow:hidden;text-overflow:ellipsis}
.res::-webkit-scrollbar{height:6px}.res::-webkit-scrollbar-thumb{background:var(--btnline);border-radius:3px}
/* Your flag and country name in the header: a link back to your country */
a.myc{display:inline-flex;align-items:center;gap:12px;color:inherit;text-decoration:none;border-radius:6px}
a.myc:hover b{color:var(--accent);text-decoration:underline}
a.myc:hover .flagmini{filter:brightness(1.08)}
/* Building slots pill in the tab row of a city page */
.slotpill{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;border:1px solid var(--btnline);background:var(--steel);font-size:13px;color:var(--muted);white-space:nowrap;box-shadow:inset 0 1px 0 var(--hl)}
.slotpill b{color:var(--text);font-size:14px;font-variant-numeric:tabular-nums}
.slotpill.full b{color:var(--warn)}.slotpill.over b{color:var(--bad)}
/* Job priority boxes (Cities tab and city pages) */
.jobprio{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;margin:6px 0 14px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.jphead{display:flex;flex-direction:column;gap:1px;min-width:150px}
.jphead b{font-size:13px}.jphead .desc{font-size:11.5px}
.jpboxes{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.jpbox{padding:5px 11px;border-radius:8px;border:1px solid var(--btnline);background:var(--steel);font-size:12.5px;font-weight:600;cursor:grab;user-select:none;box-shadow:inset 0 1px 0 var(--hl)}
.jpbox:active{cursor:grabbing}
.jpbox.dragging{opacity:.4}.jpbox.over{border-color:var(--accent);box-shadow:0 0 0 2px rgba(58,111,176,.25)}
.jpbox.picked{border-color:var(--accent);color:var(--accent)}
.jparrow{color:var(--muted);font-size:18px;line-height:1}
.jpbtns{display:flex;gap:6px;margin-left:auto}
/* Filled / total jobs on each building */
.jobfill{font-weight:700;font-variant-numeric:tabular-nums}
.jobfill.warn{color:var(--warn)}.jobfill.bad{color:var(--bad)}
/* ----- Buildings: category tiles, then one category's buildings ----- */
.bgrid:not(.open){grid-template-columns:repeat(5,minmax(0,1fr))}
.bgrid.open{grid-template-columns:1fr}
@media(max-width:1000px){.bgrid:not(.open){grid-template-columns:repeat(2,minmax(0,1fr))}}
.bctile{position:relative;overflow:hidden;aspect-ratio:4/3;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:4px;text-align:left;padding:16px 18px;border-radius:16px;border:1px solid var(--line);background:linear-gradient(160deg,#3a4a66,#1c2433);color:#fff;cursor:pointer;box-shadow:0 4px 14px rgba(20,30,45,.18);transition:transform .12s,box-shadow .12s}
.bctile::before{content:'';position:absolute;inset:0;background-image:var(--img);background-position:center;background-size:cover;background-repeat:no-repeat;opacity:.5;transition:opacity .15s}
.bctile::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 35%,rgba(0,0,0,.55))}
.bctile>*{position:relative;z-index:1}
.bctile:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(20,30,45,.28)}.bctile:hover::before{opacity:.62}
.bcname{font-size:22px;font-weight:800;letter-spacing:.2px;text-shadow:0 2px 8px rgba(0,0,0,.5)}
.bcsub{font-size:13.5px;font-weight:600;opacity:.92}
.bcsub .pos{color:#7be0a5}.bcsub .warn{color:#ffd166}.bcsub .neg{color:#ff8a80}
.bcatview{position:relative;border:1px solid var(--line2);border-radius:16px;background:var(--panel2);padding:14px 18px 8px;overflow:hidden}
.bcatview::before{content:'';position:absolute;left:0;right:0;top:0;height:150px;background-image:var(--img);background-position:center;background-size:cover;background-repeat:no-repeat;opacity:.18;-webkit-mask-image:linear-gradient(180deg,#000,transparent);mask-image:linear-gradient(180deg,#000,transparent);pointer-events:none}
.bcatview>*{position:relative}
.bcvhead{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:6px}
.bcvhead h3{margin:0;font-size:26px}
.bcvnav{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}
.blist .bimp{grid-template-columns:var(--bpw) minmax(0,1fr) 70px auto;gap:20px;padding:16px 0;--bpw:clamp(200px,18vw,340px)}
.bpic{width:var(--bpw,96px);aspect-ratio:4/3;height:auto;border-radius:12px;background:linear-gradient(160deg,rgba(58,111,176,.12),rgba(58,111,176,.04));border:1px solid var(--line2);overflow:hidden}
.bpic img{width:100%;height:100%;object-fit:cover;display:block}
.blist .bimp b{font-size:21px}
.blist .bimp .bmain{align-self:center}
.bdesc{font-size:16px;color:var(--text);opacity:.8;margin-top:4px;line-height:1.45}
.blist .beff{font-size:16px;margin-top:6px}
.blist .bcost{font-size:15.5px;margin-top:4px}
.blist .beff .ricon,.blist .bcost .ricon{width:24px;height:24px;vertical-align:-6px}   /* resource icons sized with the text */
.blist .bcount{font-size:22px}
.bbtns{flex-direction:column;align-items:stretch;gap:4px}
.bmulti,.bone{display:flex;gap:4px}
.bmulti button{flex:1}
button.xs{padding:1px 7px;font-size:11px;border-radius:7px}
.blist .bone button{padding:5px 14px;font-size:15px}
@media(max-width:700px){.blist .bimp{grid-template-columns:var(--bpw) minmax(0,1fr) auto;--bpw:96px}.blist .bcount{grid-column:2}.blist .bbtns{grid-column:3;grid-row:1/span 2}}
/* Upgrade path rows: a small bar on top with arrows, the path name and a dot per step (number built underneath) */
.bpathrow{border-top:1px solid var(--line2)}
.bsingles{border-top:2px solid var(--line2);margin-top:8px}
.bsingles>.bimp:first-of-type{border-top:0;padding-top:6px}
.bpathrow .bimp{border-top:0;padding-top:6px}
.bpathbar{display:flex;align-items:center;gap:8px;padding-top:12px;font-size:12.5px;color:var(--muted)}
.bpname{font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:var(--text);font-size:12px}
.bparrow{padding:0 9px;font-size:16px;line-height:22px;border-radius:7px}
.bpdots{display:inline-flex;gap:4px;margin-left:4px}
.bpdot{position:relative;min-width:24px;height:22px;padding:0 6px;font-size:11.5px;font-weight:700;border-radius:7px;line-height:20px}
.bpdot small{margin-left:3px;font-size:10px;color:var(--accent);font-weight:800}
.bpdot.on{border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 2px rgba(58,111,176,.18)}
.bpdot.shut{opacity:.5}
/* Updates button: top-right corner of the header (like the bell and envelope on the left) */
.ubtn{position:relative;flex:none;height:44px;padding:0 14px;border-radius:12px;display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;text-decoration:none;color:var(--text);border:1px solid var(--btnline);background:var(--steel);box-shadow:inset 0 1px 0 var(--hl)}
.ubtn img{width:28px;height:28px;object-fit:contain}.ubtn img+.ubtn-fb{display:none}.ubtn-fb{font-size:20px;line-height:1}
.ubtn:hover{filter:brightness(1.06)}.ubtn.on{border-color:var(--accent);color:var(--accent)}
@media(min-width:1360px){header .ubtn{position:absolute;right:22px;top:12px;height:58px;padding:0 18px;border-radius:14px;font-size:15px}header .ubtn img{width:38px;height:38px}header .ubtn-fb{font-size:26px}}
.htop .ubtn{margin-left:10px}
/* Version in the bottom-right corner of every page */
#vertag{position:fixed;right:10px;bottom:8px;z-index:40;font-size:11.5px;font-weight:700;color:var(--muted);opacity:.75;text-decoration:none;padding:2px 7px;border-radius:7px;background:var(--panel);border:1px solid var(--line2)}
#vertag:hover{opacity:1;color:var(--accent)}
/* Updates page: full width, posts newest first */
.updpage{display:flex;flex-direction:column;gap:16px;padding:6px 0 40px}
.updtitle{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.updtitle h1{margin:0;font-size:34px}
.updpost{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:20px 26px;box-shadow:0 2px 10px rgba(20,30,45,.06)}
.updhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.updhead h2{margin:0;font-size:24px}
.updver{font-size:13px;font-weight:800;color:var(--accent);border:1px solid var(--accent);border-radius:999px;padding:1px 9px}
.upddate{color:var(--muted);font-size:13px}
.updpost .descview{font-size:15.5px;line-height:1.6;border:0;padding:0;background:none;box-shadow:none;min-height:0}
.updform{display:flex;flex-direction:column;gap:10px}
.updform #updTitle{font-size:18px;font-weight:700}
.updform #updVersion{max-width:220px}
button.danger{border-color:var(--bad);color:var(--bad)}
/* Stage buttons: the city tier each stage needs (Roman numeral in the tier colour, or the Village picture) */
.bpdot{display:inline-flex;align-items:center;gap:2px;min-width:30px;height:26px;padding:0 7px}
.bptier{font-family:"Cinzel",Georgia,"Times New Roman",serif;font-weight:900;font-size:15px;color:var(--tc);letter-spacing:.5px;text-shadow:0 1px 0 rgba(0,0,0,.25)}
.bpvillage{display:inline-flex;align-items:center}
.bpvillage img{width:18px;height:18px;object-fit:contain}.bpvillage img+.bpvfb{display:none}
.bpvfb{font-size:13px;line-height:1}
.bpdot.shut{opacity:.4}
/* Hover tips (public/js/tooltip.js): solid box in the theme's colours, larger text */
#tip{position:fixed;z-index:1000;left:0;top:0;max-width:min(380px,calc(100vw - 12px));padding:8px 12px;border-radius:10px;background:var(--panel);color:var(--text);
 border:1px solid var(--line);box-shadow:0 8px 24px rgba(15,25,40,.22);font-size:14px;line-height:1.45;font-weight:500;white-space:pre-line;pointer-events:none;
 opacity:0;transform:translateY(3px);transition:opacity .12s,transform .12s;visibility:hidden}
#tip.show{opacity:1;transform:none;visibility:visible}
html[data-theme=dark] #tip{box-shadow:0 8px 28px rgba(0,0,0,.55)}
/* City buildings overview: category totals, building groups that open to show every stage */
.cbtop{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:4px}
.cbtop h4{margin:2px 0 6px}
.cbtotal{font-size:24px;font-weight:800;line-height:1;color:var(--muted);font-variant-numeric:tabular-nums}
.cbtotal.has{color:var(--accent)}
.cbline{align-items:center}
.cbline .cbn{flex:1;min-width:0}
button.cbline.cbhead{width:100%;background:none;border:0;box-shadow:none;padding:2px 0;font:inherit;font-size:13.5px;color:inherit;text-align:left;cursor:pointer;border-radius:6px}
button.cbline.cbhead:hover{background:rgba(58,111,176,.08)}
.cbhead .cbn{font-weight:700}
.cbarrow{display:inline-block;width:14px;color:var(--muted);transition:transform .15s}
.cbgroup.open .cbarrow{transform:rotate(90deg)}
.cbsingles{margin-top:6px;padding-top:6px;border-top:1px solid var(--line2)}
.cbsingles.only{margin-top:0;padding-top:0;border-top:0}
.cbkids{margin:0 0 4px 14px;padding-left:8px;border-left:2px solid var(--line2)}
.tchip{display:inline-flex;align-items:center;justify-content:center;min-width:26px;margin-right:6px;font-family:"Cinzel",Georgia,"Times New Roman",serif;font-weight:900;font-size:12.5px;color:var(--tc)}
.tchip.vil img{width:16px;height:16px;object-fit:contain}.tchip.vil img+.bpvfb{display:none}
.cbtools{margin-top:10px;align-items:center;gap:12px}
/* City template and bulk import pages */
.tplpage{display:flex;flex-direction:column;gap:12px;padding:6px 2px 20px}
.tplhead{align-items:center;gap:12px}.tplhead h2{margin:0;font-size:24px}
.tplbox{width:100%;min-height:340px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13.5px;line-height:1.45;resize:vertical;padding:12px;border-radius:12px}
.tplmsg{padding:10px 14px;border-radius:10px;font-size:14px;border:1px solid}
.tplmsg.good{border-color:var(--good);background:rgba(31,157,99,.08)}.tplmsg.bad{border-color:var(--bad);background:rgba(217,68,63,.08)}
.bulkrow{align-items:center;gap:12px;margin:-4px 0 12px}
.bulkpick{display:flex;align-items:center;gap:8px 18px;flex-wrap:wrap;padding:10px 14px;border:1px solid var(--line2);border-radius:12px;background:var(--panel2)}
.bulkpick label{display:inline-flex;align-items:center;gap:6px;margin:0;font-weight:600}
.bulkpick select{width:auto;min-width:180px}
.bulklist{display:flex;flex-direction:column;gap:4px;max-height:360px;overflow:auto}
.bulkcity{display:flex;align-items:center;gap:14px;padding:7px 12px;border:1px solid var(--line2);border-radius:10px;margin:0;font-weight:500;cursor:pointer;font-variant-numeric:tabular-nums}
.bulkcity.on{border-color:var(--accent);background:rgba(58,111,176,.07)}
.bulkcity span{color:var(--muted);font-size:13px}
.bulkcity input[type=checkbox],.bulkpick input[type=checkbox]{width:auto;flex:none;margin:0;height:auto}
.bulkpick label{white-space:nowrap}
.bulkcity b{min-width:120px}
.bulkcity>span:not(.spacer):not(.badge){min-width:84px;text-align:right}

/* Image slot showing the game's default picture (none uploaded) */
.imgslot .prev.dflt{position:relative}
.imgslot .prev.dflt span{position:absolute;left:4px;bottom:4px;font-size:11px;padding:1px 6px;border-radius:6px;background:rgba(0,0,0,.55);color:#fff}

/* Log in / create account: one card in the middle of the page */
.authpage{min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:32px 16px}
.authcard{width:100%;max-width:420px;background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:34px 32px 26px;box-shadow:0 24px 60px rgba(20,30,45,.14),0 2px 6px rgba(20,30,45,.06)}
.authbrand{display:block;text-align:center;font-size:32px;margin-bottom:18px;text-decoration:none}
.authtitle{font-size:22px;margin:0;text-align:center;font-weight:700}
.authsub{text-align:center;color:var(--muted);margin:6px 0 18px;font-size:14px}
.authnote{font-size:13px;color:var(--muted);background:var(--panel2);border:1px solid var(--line2);border-radius:10px;padding:8px 10px;margin:0 0 10px}
.authform label{font-size:12.5px;font-weight:600;color:var(--muted);margin:14px 0 5px}
.authform label:first-child{margin-top:0}
.authform input{padding:11px 13px;font-size:15px;border-radius:11px}
.authform input:focus{outline:none;border-color:var(--accent2);box-shadow:0 0 0 3px rgba(58,111,176,.18)}
.authbtn{display:block;width:100%;margin-top:20px;padding:11px;font-size:15px;border-radius:11px}
.author{display:flex;align-items:center;gap:12px;margin:20px 0 16px;color:var(--muted);font-size:12.5px;text-transform:uppercase;letter-spacing:.08em}
.author::before,.author::after{content:'';flex:1;height:1px;background:var(--line)}
.gsibtn{display:flex;justify-content:center;min-height:44px}
.authswitch{text-align:center;margin:20px 0 0;font-size:14px;color:var(--muted)}
.authswitch .linkbtn{font-weight:600;text-decoration:none}
.authswitch .linkbtn:hover{text-decoration:underline}
.authlegal{text-align:center;font-size:12px;margin:14px 0 0}.authlegal a{color:var(--muted);text-decoration:none}.authlegal a:hover{text-decoration:underline}
.authfine{text-align:center;font-size:12px;color:var(--muted);margin:10px 0 0}
@media(max-width:480px){.authcard{padding:26px 20px 20px;border-radius:16px}}

/* Country tab figures: no boxes. GDP across the top, Government · State religion · Ideology below, then three columns.
   Separators are thin lines that fade out at their ends. Some lines have a picture on the right filling most of the line. */
.igrid.info>.icard.figs:not(.idesc):not(.imap){display:flex;flex-direction:column;gap:0;padding:6px 18px}
.figs{--sep:var(--line)}
.figs .figrow,.figs .fcols{display:flex;position:relative;align-self:stretch;width:100%;min-width:0}
.figs .figrow+.figrow::before,.figs .fcols::before{content:'';position:absolute;left:0;right:0;top:0;height:1px;background:linear-gradient(90deg,transparent,var(--sep) 12%,var(--sep) 88%,transparent)}
.figs .fcols{flex:1}
.figs .fgov>.fl,.figs .fcol{flex:1;min-width:0;position:relative}
.figs .fgov>.fl+.fl::before,.figs .fcol+.fcol::before{content:'';position:absolute;top:0;bottom:0;left:0;width:1px;background:linear-gradient(180deg,transparent,var(--sep) 15%,var(--sep) 85%,transparent)}
.figs .fcol{display:flex;flex-direction:column}
.figs .fcol>.fl{flex:1}
.figs .fcol>.fl+.fl::before{content:'';position:absolute;left:14px;right:14px;top:0;height:1px;background:linear-gradient(90deg,transparent,var(--sep) 15%,var(--sep) 85%,transparent)}
.figs .fl{position:relative;padding:12px 16px;display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:74px}
.figs .fl .l{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;line-height:1.3}
.figs .fl .v{font-size:23px;font-weight:700;margin-top:3px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.figs .fgdp .fl{flex:1;padding-top:14px;padding-bottom:14px}
.figs .fgdp .fl .v{font-size:32px}
.figs .fgov .fl{min-height:88px}
.figs .fl.haspic>.l,.figs .fl.haspic>.v{max-width:64%}
.figs .fl .kicon{position:absolute;right:10px;top:20%;bottom:20%;width:30%;display:flex;align-items:center;justify-content:center;pointer-events:none}
.figs .fl .kicon img{max-width:100%;max-height:100%;aspect-ratio:1;object-fit:contain}
@media(max-width:1799px){.figs .fcol>.fl{min-height:96px}.figs .fcol:first-child>.fl{min-height:72px}}
@media(max-width:700px){.figs .fcols,.figs .fgov{flex-direction:column}
 .figs .fcol+.fcol::before,.figs .fgov>.fl+.fl::before{left:14px;right:14px;top:0;bottom:auto;width:auto;height:1px;background:linear-gradient(90deg,transparent,var(--sep) 15%,var(--sep) 85%,transparent)}}
/* Edit country: a wider window */
.modal-box.editbox{max-width:1040px}
.imgrow.icons .prev{aspect-ratio:1;height:auto;max-width:150px;background-size:contain;background-repeat:no-repeat;background-position:center}
/* Narrower screens: the 4:3 map moves under the figures (same column), so the figure tiles keep their width */
@media(min-width:1251px) and (max-width:1799px){
 .igrid.info{grid-template-columns:minmax(200px,270px) minmax(0,1fr);grid-template-rows:auto auto 1fr}
 .igrid.info>.icol{grid-row:span 3}
 .igrid.info>.imap,.igrid.info>.idesc{grid-column:2}
}
@media(max-width:1799px){
 .igrid.info>.imap .mapph{aspect-ratio:4/3;height:auto;flex:none;max-height:none}
}

/* World map (worldmap.js): satellite view with borders */
.wmap{position:relative;width:100%;height:100%;border-radius:12px;overflow:hidden;background:#070b12}
.wmap canvas{display:block;width:100%;height:100%}
.wmap .wmbtns{position:absolute;right:8px;top:8px;display:flex;flex-direction:column;gap:4px}
.wmap .wmbtns button{width:30px;height:30px;padding:0;border-radius:8px;font-size:18px;line-height:1;background:rgba(16,21,28,.82);color:#fff;border:1px solid rgba(255,255,255,.25)}
.wmap .wmcredit{position:absolute;left:8px;bottom:6px;font-size:10.5px;color:rgba(255,255,255,.75);text-shadow:0 1px 2px #000;pointer-events:none}
.mapph.hasmap{position:relative;padding:0!important;border:0;display:block;overflow:hidden}
.mapph.hasmap .wmnote{position:absolute;left:10px;right:10px;bottom:26px;text-align:center;font-size:12.5px;color:#fff;text-shadow:0 1px 3px #000;pointer-events:none}
.imap h4{display:flex;align-items:center;justify-content:space-between;gap:8px}
.imap h4 .mapedit{text-transform:none;letter-spacing:0}
.wmworld{margin-top:10px;aspect-ratio:2.05/1;max-height:70vh}
.wmap.big{height:min(72vh,900px);min-height:380px}
.maptools{margin:10px 0;gap:8px;flex-wrap:wrap}
.mapused{font-size:14px}.mapused.bad{color:var(--bad,#c0392b)}
