/* Independent edition: a focused game shell, safe areas, and readable touch controls. */
.mobile-game-site{background:#0e2935;color:#f5eed5;min-height:100svh;overscroll-behavior-y:none}
.mobile-game-site>.school-widget,.mobile-game-site #languageTabs,.mobile-game-site .top>span{display:none!important}
.mobile-game-site>header{background:#102d3b;border-bottom:1px solid #496b6c;color:#f5eed5;padding:14px max(20px,env(safe-area-inset-right)) 14px max(20px,env(safe-area-inset-left));gap:12px}
.mobile-game-site .brand{color:#f2da9a;font-size:15px;letter-spacing:1px;white-space:normal}
.mobile-game-site .brandmark{background:#e6c477;color:#153c44}
.mobile-game-site>.layout{max-width:1600px;min-height:calc(100svh - 90px)}
.mobile-game-site .top button{color:#e6eddc;border-color:#537474;background:#1d424e;font-size:13px;min-height:44px}
.mobile-game-site main{min-width:0;padding:24px 30px}
.mobile-game-site .standalone-hero{min-height:clamp(310px,47svh,530px);border:1px solid #638c85;box-shadow:0 24px 90px #03182080}
.mobile-game-site .standalone-hero>div{min-height:inherit;padding:clamp(24px,5vw,70px);background:linear-gradient(90deg,#072637ee,#09263866,transparent)}
.mobile-game-site .standalone-hero h1{font-family:RepublicDisplay,Georgia,serif;font-size:clamp(48px,7vw,92px);letter-spacing:-1px;line-height:.98;text-shadow:0 3px 20px #092632}
.mobile-game-site .standalone-hero p{font:17px/1.5 Arial,sans-serif;max-width:370px}
.mobile-game-site .standalone-hero .eyebrow{font-size:11px;letter-spacing:3px;color:#ebce84}
.mobile-game-site .standalone-hero span{font-size:12px;color:#cce3d4}
.mobile-game-site .standalone-entry{max-width:780px;background:#f8f4e6;border:1px solid #dacb9a;box-shadow:0 12px 40px #031c2866}
.mobile-game-site .standalone-entry h2{font:700 30px/1.12 RepublicDisplay,Arial,sans-serif;color:#173d43;margin:16px 0}
.mobile-game-site .standalone-entry p{font-size:15px;line-height:1.6;color:#34534b}
.mobile-game-site .standalone-entry label{font-size:14px;color:#27483f}
.mobile-game-site .standalone-entry input,.mobile-game-site .standalone-entry select{background:#fffef7;color:#193a36;border:1px solid #9aac99;border-radius:10px;font-size:16px;min-height:48px}
.mobile-game-site .standalone-entry .primary{background:linear-gradient(125deg,#f0d995,#d8b35e);color:#123b43;border:1px solid #b69a56;font-size:16px;min-height:50px}
.app-save-label{font:700 10px/1.4 Arial,sans-serif;letter-spacing:1.5px;color:#41674e;display:flex;gap:8px;align-items:center}.app-save-label>span{color:#388060;font-size:14px}
.app-install-card{display:flex;gap:12px;align-items:center;padding-top:18px;margin-top:20px;border-top:1px solid #d4d3bd}.app-install-card img{border-radius:13px;flex:none}.app-install-card>div{flex:1}.app-install-card b{font-size:14px;color:#193f42;display:block}.app-install-card small{display:block;font-size:12px;color:#54685b;margin-top:4px}.app-install-card button{font-size:12px;white-space:normal;background:#204851;color:#f6efd7;border:1px solid #557970;min-height:44px}
.mobile-app-dialog{box-sizing:border-box;width:min(94vw,500px);max-height:calc(100dvh - 36px);border:1px solid #8caa9a;border-radius:20px;background:#faf6e8;color:#213f3b;padding:24px;box-shadow:0 30px 100px #03172299;overflow:auto;font:15px/1.55 Arial,sans-serif}.mobile-app-dialog::backdrop{background:#061d2bba;backdrop-filter:blur(5px)}.mobile-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;letter-spacing:2px;font-weight:700;color:#55715b;margin-bottom:12px}.mobile-dialog-heading button{background:#e6eadc;color:#234941;border:1px solid #b2c4b0;border-radius:50%;height:44px;width:44px;font-size:25px}.mobile-app-dialog>img{border-radius:18px}.mobile-app-dialog h2{font:700 32px/1.1 RepublicDisplay,Arial,sans-serif;margin:16px 0}.mobile-app-dialog h3{font-size:16px;margin:0 0 10px}.mobile-app-dialog section{background:#edf0e3;border:1px solid #d1d9c3;padding:16px;border-radius:12px;margin:16px 0}.mobile-app-dialog section p{margin:8px 0;font-size:14px;color:#37554b}.mobile-app-dialog ol{padding-left:18px;margin:0}.mobile-app-dialog li{margin:10px 0;font-size:14px}.mobile-app-dialog .mobile-signout{color:#275943;text-decoration:underline;font-weight:600;font-size:14px;padding:12px 0;min-height:44px}.mobile-app-dialog .primary{background:#dfbf70;color:#133f43}.mobile-app-dialog .secondary{background:#214c53;color:#fff2cb}.mobile-app-dialog .actions{align-items:center;gap:14px}.mobile-online-note{color:#5b6654!important;font-size:12px!important}
#mobileConnection{position:fixed;top:env(safe-area-inset-top,0px);left:10px;right:10px;z-index:1000;background:#ffe4aa;color:#483913;border:1px solid #c2953c;border-radius:0 0 12px 12px;padding:10px 16px;text-align:center;font:600 13px/1.4 Arial,sans-serif;box-shadow:0 6px 18px #071c3266}#mobileConnection[hidden]{display:none}
.mobile-game-site .nation-topbar{padding-top:max(16px,env(safe-area-inset-top))}.mobile-game-site[data-app-screen=game]>header{display:none}.mobile-game-site[data-app-screen=game] main{padding:0}.mobile-game-site[data-app-screen=game] .nation-shell{border-radius:0;min-height:100svh}.mobile-game-site[data-app-screen=game] #loungeMessage:empty{display:none}.mobile-game-site .nation-tabs button{min-width:0}
html{scroll-padding-top:80px}.mobile-game-site button,.mobile-game-site a,.mobile-game-site input,.mobile-game-site select{-webkit-tap-highlight-color:#d8bf6d44}.mobile-game-site button{touch-action:manipulation}.mobile-game-site :focus-visible{outline:3px solid #e0b854;outline-offset:3px}
@media(max-width:760px){
 .mobile-game-site>header{padding:calc(10px + env(safe-area-inset-top)) 12px 10px;display:flex;flex-wrap:nowrap;align-items:center}.mobile-game-site .brand{font-size:12px;line-height:1.2;max-width:155px}.mobile-game-site .brandmark{display:none}.mobile-game-site .top{display:flex;flex-wrap:nowrap;gap:5px}.mobile-game-site #loungeTab{display:none}.mobile-game-site .top button{font-size:11px;padding:7px 9px;min-height:44px}.mobile-game-site main{padding:10px 10px max(18px,env(safe-area-inset-bottom))}
 .mobile-game-site .standalone-hero{min-height:260px;border-radius:16px}.mobile-game-site .standalone-hero>div{padding:24px;min-height:260px}.mobile-game-site .standalone-hero h1{font-size:49px}.mobile-game-site .standalone-hero p{font-size:15px;max-width:260px}.mobile-game-site .standalone-entry{margin:12px 0;padding:20px;border-radius:16px}.mobile-game-site .standalone-entry h2{font-size:27px}.mobile-game-site .standalone-entry .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mobile-game-site .standalone-entry #standalonePlay{grid-column:1/-1}.app-install-card{gap:8px;flex-wrap:wrap}.app-install-card>div{min-width:155px}.app-install-card button{width:100%;margin-top:3px}
 .mobile-game-site .nation-shell .nation-topbar{padding:calc(9px + env(safe-area-inset-top)) 12px 9px!important;min-height:58px!important;top:0;z-index:40}.mobile-game-site .nation-shell .nation-topbar h2{font-size:20px!important}.mobile-game-site .nation-shell .nation-header-round{font-size:11px;color:#f3dc9a}.mobile-game-site .nation-shell .nation-treasury>b{font-size:27px}.mobile-game-site .nation-shell .nation-campaign,.mobile-game-site .nation-shell .nation-bp-wallet{display:none!important}
 .mobile-game-site .nation-shell .nation-metrics{padding:8px 10px;gap:4px}.mobile-game-site .nation-shell .nation-metrics span{font-size:9px}.mobile-game-site .nation-shell .nation-metrics b{font-size:19px}.mobile-game-site .nation-shell .nation-league-pulse{padding:7px 11px}.mobile-game-site .nation-shell .nation-league-pulse b{font-size:11px}.mobile-game-site .nation-shell .nation-playfield{padding:8px!important;gap:8px}.mobile-game-site .nation-shell #nationPanel{scroll-margin-top:calc(74px + env(safe-area-inset-top))}
 .mobile-game-site .nation-mobile-nav{padding-bottom:calc(5px + env(safe-area-inset-bottom))}.mobile-game-site .nation-mobile-nav button{font-size:11px;min-height:52px}.mobile-game-site .nation-shell .nation-decision{grid-template-columns:32px minmax(0,1fr) 22px!important;gap:9px!important}.mobile-game-site .nation-shell .nation-choice-letter{position:static!important;grid-column:1;grid-row:1;font-size:19px!important;width:30px;height:34px}.mobile-game-site .nation-shell .nation-decision input[type=radio]{width:20px;height:20px;min-height:20px}.mobile-game-site .nation-shell .nation-decision b{font-size:15px!important;line-height:1.35!important}.mobile-game-site .nation-shell .nation-effect-tags{grid-column:2/-1}.mobile-game-site .nation-shell .nation-confirm-bar{position:relative;bottom:auto;z-index:auto}.mobile-game-site .nation-shell .nation-confirm-bar button{width:100%;min-height:48px}
 .mobile-game-site dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)}.mobile-game-site .nation-mobile-menu{padding-bottom:calc(16px + env(safe-area-inset-bottom))}.mobile-app-dialog{padding:20px}.mobile-app-dialog h2{font-size:29px}
}
@media(max-height:520px) and (orientation:landscape){.mobile-game-site .nation-shell .nation-topbar{position:relative}.mobile-game-site .nation-mobile-nav{position:sticky;bottom:0}.mobile-game-site .nation-shell{padding-bottom:0!important}.mobile-game-site .nation-shell .nation-metrics{display:none}.mobile-game-site .nation-shell .nation-playfield{grid-template-columns:minmax(170px,30%) minmax(0,1fr)!important}.mobile-game-site .nation-shell .nation-island-monitor{display:block!important;max-height:none!important}.mobile-game-site .nation-shell .nation-monitor-map svg{width:100%!important;height:auto!important}}
.beta-recover{margin:22px 0 8px;border-top:1px solid #d2d4c0;padding-top:18px;color:#294c43}.beta-recover summary{font-size:14px;font-weight:700;cursor:pointer}.beta-recover form{padding-top:16px}.mobile-app-dialog input,.mobile-app-dialog select,.mobile-app-dialog textarea{box-sizing:border-box;width:100%;padding:12px;border:1px solid #9fb5a6;border-radius:8px;background:#fffef8;color:#193b38;font:16px/1.4 Arial,sans-serif;min-height:44px;margin:6px 0 14px}.mobile-app-dialog label{font-weight:700;display:block;font-size:13px}.mobile-app-dialog #betaCode{font:13px/1.5 monospace;word-break:break-all}.mobile-app-dialog .small{font-size:12px;color:#546656}.mobile-app-dialog form{display:grid;gap:4px}.mobile-app-dialog .quiet{color:#305a4c}.beta-inbox-item{border:1px solid #bccbb5;background:#fffdf4;color:#29473a;padding:18px;border-radius:12px;margin:12px 0}.beta-inbox-item p{white-space:pre-wrap;overflow-wrap:anywhere}.beta-inbox-item small{display:block;color:#51664e;font-size:12px}.beta-inbox-item button{margin-top:12px}.beta-player-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.beta-player-list article{padding:15px;background:#e8eddd;border:1px solid #bccbb5;border-radius:10px;display:grid;gap:10px}.mobile-game-site label:has(#teacherGamePeriod),.mobile-game-site label:has(#nationLeaguePeriod){display:none!important}.mobile-game-site .nation-league-controls{grid-template-columns:1fr auto}.mobile-game-site #teacherModeBanner .teacherbanner-label{font-size:14px}

.mobile-game-site label:has(#nationWorldPeriod),.mobile-game-site label:has(#nationPeriod){display:none!important}

.mobile-game-site label:has(#nationPeriodFilter){display:none!important}

/* Compact, high-contrast founding terrain cards. */
.nation-founding .founding-site-preview,.nation-shell .founding-site-preview{background:#f4efda;border:1px solid #cbb576;border-radius:12px;padding:16px;margin:16px 0;color:#193b43}
.nation-founding .founding-site-preview h3,.nation-shell .founding-site-preview h4{font:700 20px/1.25 Arial,sans-serif;color:#193b43!important;margin:0 0 12px}
.nation-founding .founding-site-preview p{font:14px/1.5 Arial,sans-serif;color:#344d4c;margin:10px 0}
.founding-site-effects{display:flex;flex-wrap:wrap;gap:8px}.founding-site-effects>span{font:700 13px/1.4 Arial,sans-serif;padding:7px 9px;border-radius:6px}
.founding-site-preview .site-pro{background:#d4ead8;color:#184a31}.founding-site-preview .site-con{background:#f4dace;color:#6b3020}
.founding-site-preview>strong{display:block;font:700 14px/1.4 Arial,sans-serif;margin:10px 0;color:#284f40}.founding-site-preview>small{display:block;font:12px/1.5 Arial,sans-serif;color:#435854}
.nation-founding-map>button small{font-size:10px;max-width:122px;white-space:normal;text-align:center;line-height:1.2;min-width:65px}.nation-founding-map-label{bottom:0;transform:translateY(100%);background:#102d3b;width:100%;padding:5px 0;box-sizing:border-box}.nation-founding-visual{padding-bottom:24px}
@media(max-width:500px){.nation-founding-map>button small{font-size:9px;max-width:88px}.nation-founding .founding-site-preview{padding:12px}.nation-founding .founding-site-preview h3{font-size:18px}}
