/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
:root{color-scheme:dark;--bg:#09131d;--panel:#112230;--border:#243a49;--ink:#ecf1ed;--muted:#8fa6b4;--gold:#efc47d;--green:#86cba4}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 55% 0,#1b3341 0,#0a1722 47%,#071019 100%);color:var(--ink);font:14px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif;min-height:100vh}button{font:inherit;cursor:pointer;color:inherit;border:1px solid var(--border);background:#1a3040;border-radius:9px;padding:10px 14px;transition:background .16s,transform .16s}button:hover{background:#25485a}button:active{transform:translateY(1px)}button:disabled{opacity:.42;cursor:default}button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}[hidden]{display:none!important}.app{max-width:1680px;padding:25px 34px 16px;margin:auto}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.brand{display:flex;align-items:center;gap:22px}.brand>b{font-size:35px;line-height:1;font-weight:850;letter-spacing:-1.5px}.brand>b span{color:var(--gold)}.brand>div{color:var(--muted);font-size:10px;letter-spacing:3px;border-left:1px solid #435361;padding-left:22px;line-height:28px}.top-right{display:flex;gap:10px;align-items:center}.prototype{font-size:10px;letter-spacing:1.7px;color:#b7c7d0;margin-right:10px}.quiet{font-size:12px;background:transparent;padding:8px 13px}.resources{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:20px}.resource{display:flex;gap:13px;align-items:center;background:linear-gradient(125deg,#172a36,#10212e);border:1px solid var(--border);padding:12px 17px;border-radius:13px;min-width:0;box-shadow:0 6px 20px #0002}.resource i{font-style:normal;font-size:30px;color:var(--green);width:32px}.resource.power i{color:#f4c35e}.resource.metal i{color:#9aaec3}.resource.population i{color:#72bbdf}.resource.score i{color:#d3a7ed}.resource small{display:block;color:var(--muted);font-size:11px}.resource strong{font-size:23px;font-weight:650;line-height:1.15;font-variant-numeric:tabular-nums}.resource>span{margin-left:auto;color:#8fb4a6;font-size:10px;text-align:right;white-space:nowrap}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 294px;gap:20px}.world-panel{min-width:0;border:1px solid var(--border);border-radius:15px;background:#10202d;overflow:hidden;box-shadow:0 18px 55px #0005}.world-heading,.world-bottom{display:flex;justify-content:space-between;align-items:center;padding:13px 18px;gap:10px}.world-heading b{font-size:12px;font-weight:550}.world-heading>span,.world-bottom>span{font-size:10px;color:var(--muted)}.live-dot{display:inline-block;width:6px;height:6px;background:var(--green);border-radius:50%;box-shadow:0 0 9px #69cb7a;vertical-align:middle;margin-right:9px}.world{position:relative;aspect-ratio:8/5;isolation:isolate;overflow:hidden;background:#172027}canvas{width:100%;height:100%;display:block}.room-buttons{position:absolute;inset:0;pointer-events:none}.room-hit{position:absolute;pointer-events:auto;background:transparent;border:1px solid transparent;border-radius:5px;padding:0;display:flex;align-items:flex-start;justify-content:space-between;color:#e7f0f6;overflow:hidden}.room-hit:hover{background:#e3bc6213;border-color:#efd19580}.room-hit.selected{border-color:#efca85;box-shadow:inset 0 0 18px #ffd18725,0 0 12px #ffbf6233;background:#ffd18a06}.room-hit .room-tag,.room-hit .room-level{margin:5px;padding:2px 6px;border-radius:4px;background:#071724dc;font-size:clamp(7px,.65vw,11px);backdrop-filter:blur(5px)}.room-hit .room-level{color:#ebc990}.room-hit.build-slot{border:1px dashed #c1c9c65e;background:#0b1a2455;align-items:center;justify-content:center;flex-direction:column;gap:3px;color:#d1e0e6;font-size:11px}.room-hit.build-slot b{font-size:25px;line-height:1}.world-help{position:absolute;bottom:4%;left:50%;transform:translateX(-50%);font-size:10px;color:#e4d7bd;background:#0a1c29d9;padding:5px 13px;border:1px solid #3b4d52;border-radius:25px;white-space:nowrap;pointer-events:none}.world-bottom{padding:8px 16px}.world-bottom button{background:transparent;font-size:11px;padding:4px 9px}.sidebar{background:linear-gradient(145deg,#162935,#0e1d28);border:1px solid var(--border);border-radius:15px;overflow:hidden;display:flex;flex-direction:column}.tabs{display:flex;gap:3px;padding:9px;border-bottom:1px solid var(--border)}.tabs button{flex:1;border:0;background:transparent;font-size:11px;padding:10px 5px;color:#9cb1bd}.tabs button.active{color:var(--gold);background:#253747}.side-content{padding:21px 20px}.room-icon{height:43px;width:43px;border:1px solid #566057;background:#3d3a2d;color:var(--gold);border-radius:12px;font-size:23px;display:grid;place-items:center;margin-bottom:12px}h1,h2,h3,p{margin:0}.side-content h2{font-size:22px;font-weight:600;line-height:1.2;margin-bottom:7px}.eyebrow{color:var(--gold);font-size:10px;letter-spacing:1.3px;margin-bottom:8px}.description{font-size:12px;color:var(--muted);margin-bottom:19px;line-height:1.7}.detail-row{display:flex;justify-content:space-between;font-size:12px;margin:11px 0;color:#a0b5c2}.detail-row b{color:#e5ecee;font-weight:500}.worker-controls{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:20px 0}.worker-controls button{height:31px;width:33px;padding:0;font-size:20px}.worker-controls span{font-size:12px}.primary{background:var(--gold);color:#30291b;border-color:var(--gold);font-weight:650;display:block;width:100%;margin-top:16px}.primary:hover{background:#ffdda0}.subcost{display:block;color:#9fadb0;font-size:10px;text-align:center;margin-top:7px}.sidebar-note{margin:auto 18px 18px;padding:14px;background:#172e37;border-left:2px solid #b2945c;border-radius:0 8px 8px 0}.sidebar-note span{font-size:9px;letter-spacing:1.4px;color:#dcbf80}.sidebar-note p{font-size:11px;line-height:1.7;color:#9eb6c1;margin-top:6px}.resident{display:flex;gap:10px;align-items:center;margin:9px 0;font-size:12px}.resident small{display:block;color:var(--muted);font-size:10px}.avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#304a56;color:#e6c89b;font-size:11px}.resident-list{max-height:285px;overflow:auto}.build-card{display:flex;width:100%;gap:10px;align-items:center;margin:8px 0;text-align:left}.build-card i{font-size:20px;font-style:normal;color:var(--gold)}.build-card strong{font-size:12px;font-weight:500}.build-card small{display:block;font-size:10px;color:var(--muted)}.section-title{display:flex;justify-content:space-between;align-items:flex-end;margin:27px 0 14px}.section-title small{font-size:9px;color:#9aabb5;letter-spacing:1.7px}.section-title h2{font-size:19px;font-weight:500;margin-top:5px}.section-title>span{font-size:11px;color:var(--muted)}.quest-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.quest{border:1px solid var(--border);background:#11222ec9;padding:16px;border-radius:12px;display:grid;grid-template-columns:1fr auto;gap:5px 12px;align-items:center}.quest h3{font-size:13px;font-weight:550}.quest p{font-size:11px;color:var(--muted)}.quest .reward{grid-column:2;grid-row:1/3;color:var(--gold);font-size:14px}.quest progress{grid-column:1/-1;width:100%;height:4px;accent-color:var(--green);border:0;margin-top:10px}.quest button{grid-column:1/-1;padding:6px;font-size:10px;background:#1a303c}.quest button.ready{background:#ddbc79;color:#31291a}.quest button.done{color:var(--green);opacity:1}footer{display:flex;justify-content:space-between;gap:15px;align-items:center;color:#657f8d;font-size:10px;margin-top:24px}footer button{font-size:10px;background:none;border:none;color:#8ea0a9;padding:4px}.loading,.paused{position:absolute;inset:0;background:#0a1b2bc9;display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--gold);z-index:3;flex-direction:column;backdrop-filter:blur(4px)}.paused{font-size:23px;letter-spacing:5px}.paused span{font-size:11px;letter-spacing:0;margin-top:8px}#toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:8;max-width:90%;background:#e8c990;color:#273038;font-weight:600;font-size:12px;border-radius:10px;padding:13px 22px;box-shadow:0 12px 50px #0007;transition:opacity .2s,transform .2s}#toast.visible{opacity:1;transform:translate(-50%,0)}
@media(min-width:1500px){.side-content{padding:27px}.game-layout{grid-template-columns:minmax(0,1fr) 325px}.room-hit .room-tag,.room-hit .room-level{font-size:11px}}
@media(max-width:1000px){.app{padding:16px}.game-layout{grid-template-columns:minmax(0,1fr) 250px;gap:12px}.resources{gap:8px}.resource{padding:10px;gap:7px}.resource i{font-size:22px;width:auto}.resource strong{font-size:18px}.resource>span{display:none}.side-content{padding:17px}.side-content h2{font-size:19px}.world-help{font-size:8px}.brand>div{display:none}}
@media(max-width:760px){.app{padding:12px 9px}.top{margin-bottom:15px}.brand>b{font-size:28px}.prototype{font-size:8px;letter-spacing:1px}.top-right{gap:6px}.quiet{padding:7px 9px;font-size:10px}.resources{grid-template-columns:repeat(5,1fr);gap:5px;margin-bottom:12px}.resource{padding:7px 4px;justify-content:center;gap:3px;border-radius:8px}.resource i{font-size:18px}.resource small{font-size:8px}.resource strong{font-size:14px}.game-layout{grid-template-columns:1fr}.world-heading{padding:10px}.world-heading>span{display:none}.world-bottom>span{font-size:9px}.room-hit .room-tag{font-size:7px;margin:2px;padding:1px 3px}.room-hit .room-level{display:none}.world-help{font-size:7px;padding:3px 8px}.sidebar-note{display:none}.side-content{padding:18px}.side-content .description{margin-bottom:10px}.worker-controls{margin:12px 0;padding:8px 0}.room-icon{float:right;margin-left:10px}.quest-grid{grid-template-columns:1fr}.quest{padding:12px}.section-title h2{font-size:17px}.section-title>span{font-size:9px}.section-title small{font-size:8px}.resident-list{display:grid;grid-template-columns:1fr 1fr;max-height:210px}.build-card{padding:10px}.world-panel{border-radius:11px}footer{flex-wrap:wrap;font-size:9px}footer>span:first-child{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Wide game field; the management panel stays on the left. */
.app{max-width:none;padding:18px 22px 12px}.game-layout{grid-template-columns:294px minmax(0,1fr)}.sidebar{grid-column:1;grid-row:1}.world-panel{grid-column:2;grid-row:1}.world{aspect-ratio:2/1}.settings{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 18px 18px}.settings button{font-size:10px}.room-hit .room-tag{font-size:clamp(8px,.7vw,12px)}
@media(min-width:1500px){.game-layout{grid-template-columns:310px minmax(0,1fr)}}
@media(max-width:1000px){.game-layout{grid-template-columns:245px minmax(0,1fr)}.app{padding:12px}.room-hit .room-tag{font-size:8px}}
@media(max-width:760px){.game-layout{display:flex;flex-direction:column}.world-panel{order:0}.sidebar{order:1}.app{padding:10px 8px}.room-hit .room-tag{font-size:6px}.room-hit.build-slot{font-size:7px}.room-hit.build-slot b{font-size:15px}.world-help{display:none}.settings{grid-template-columns:repeat(4,1fr)}}

.brand-logo{width:52px;height:52px;object-fit:contain;border-radius:50%;flex-shrink:0}@media(max-width:760px){.brand-logo{width:38px;height:38px}.brand{gap:10px}}
/* Branded entrance: each leaf clips its half of the same original emblem. */
.entrance{position:fixed;inset:0;z-index:50;display:grid;grid-template-columns:minmax(300px,34%) 1fr;background:#07141e;overflow:auto}.entrance-copy{padding:clamp(25px,4vw,80px);align-self:center}.entry-logo{width:78px;height:78px}.entrance h1{font-size:clamp(30px,3.3vw,58px);line-height:1.07;letter-spacing:-1.8px;margin:20px 0}.entrance p{color:#b5c4ce;font-size:16px;line-height:1.7}.entrance label{display:block;margin-top:26px;margin-bottom:8px}.entrance input{display:block;width:100%;padding:14px;border:1px solid #526674;border-radius:10px;background:#122631;color:#fff;font:inherit}.entrance .primary{margin-top:14px}.entrance small{display:block;color:#9baebb;margin-top:18px;line-height:1.6}.entrance-art{position:relative;background:linear-gradient(90deg,#07141e 0%,transparent 25%),url('assets/shelter.png') center/cover}.gate{position:relative;overflow:hidden;background:linear-gradient(#03090e,#1c4253);padding:0;border-radius:4px}.entry-gate{position:absolute;width:42%;height:46%;left:29%;top:25%;border:12px solid #584b36;box-shadow:0 0 60px #e4b46444}.gate-leaf{position:absolute;top:0;bottom:0;width:50%;overflow:hidden;background:repeating-linear-gradient(0deg,#3a4348 0,#3a4348 13%,#4b5558 13.5%,#3a4348 14%);border:2px solid #706e5c;transition:transform 1.25s cubic-bezier(.4,0,.2,1)}.gate-left{left:0;border-right-color:#171b1e}.gate-right{right:0;border-left-color:#171b1e}.gate-leaf img{position:absolute;top:50%;width:140%;max-width:none;aspect-ratio:1;transform:translateY(-50%)}.gate-left img{left:30%}.gate-right img{right:30%}.gate.open .gate-left{transform:translateX(-100%)}.gate.open .gate-right{transform:translateX(100%)}.shelter-gate{position:absolute;left:56.1%;top:11.4%;width:4.4%;height:7.1%;z-index:3;border:2px solid #453727;min-width:0;border-radius:0}.shelter-gate:hover{background:#152e3b}.shelter-gate .gate-leaf{border-width:1px}.flag-logo{position:absolute;left:84.3%;top:6.7%;width:2%;height:auto;pointer-events:none}.room-buttons{pointer-events:none}.room-hit{pointer-events:auto}.entrance-opening .entrance-copy{opacity:.3;pointer-events:none;transition:opacity .3s}@media(max-width:760px){.entrance{grid-template-columns:1fr}.entrance-copy{z-index:1;background:#07141ee8;margin:15px;border-radius:20px;padding:25px}.entrance-art{position:absolute;inset:0}.entry-gate{display:none}.entry-logo{width:55px;height:55px}.entrance h1{font-size:36px}.entrance .eyebrow{font-size:11px}}@media(prefers-reduced-motion:reduce){.gate-leaf{transition:none}}
/* Entrance architecture follows the doorway already painted into the shelter. */
.entrance-art{display:flex;align-items:center;background:radial-gradient(ellipse at center,#17303b,#07141e 72%);overflow:hidden}.entrance-landscape{position:relative;width:100%;aspect-ratio:1586/992;background:url('assets/shelter.png') center/100% 100% no-repeat;box-shadow:0 35px 100px #0008}.entry-gate{left:56.1%;top:11.4%;width:4.4%;height:7.1%;border:2px solid #473c2d;box-shadow:0 0 15px #e4b46455}.gate-leaf{background:linear-gradient(90deg,#272f30,#536269 18%,#333e42 48%,#48565c 85%,#202a2d);box-shadow:inset 2px 0 4px #e5c98c33,inset -2px 0 4px #0009}.entry-gate .gate-leaf{border-width:1px}.entry-logo{width:96px;height:96px;filter:drop-shadow(0 7px 10px #0008)}@media(max-width:760px){.entrance-art{display:flex}.entrance-landscape{position:absolute;inset:0;aspect-ratio:auto;background-size:auto 100%;opacity:.45}.entry-logo{width:64px;height:64px}}

.entrance .name-error{color:#ffc08f;margin:8px 0;font-size:14px}.entrance input[aria-invalid=true]{border-color:#ffc08f}
/* The monogram has its natural wide proportions, without a circular container. */
.brand-logo{width:66px;height:auto;border-radius:0}.entry-logo{width:120px;height:auto}.gate-leaf img{aspect-ratio:auto}.flag-logo{width:2.2%;top:8%}@media(max-width:760px){.brand-logo{width:46px;height:auto}.entry-logo{width:85px;height:auto}}

.balance-logo{width:40px;height:30px;object-fit:contain;flex-shrink:0}.reward img{width:25px;height:18px;vertical-align:middle;object-fit:contain}@media(max-width:760px){.balance-logo{width:23px;height:20px}}
/* Guided onboarding spotlights actual controls without cloning or reparenting them. */
.tutorial-overlay{position:fixed;inset:0;z-index:100;pointer-events:none}.tutorial-shade{position:fixed;background:rgba(2,8,14,.78);pointer-events:auto}.tutorial-outline{position:fixed;border:2px solid #ffd28b;border-radius:12px;box-shadow:0 0 0 3px #ffd28b33,0 0 25px #e9ad6244;pointer-events:none}.tutorial-tip{position:fixed;width:330px;max-width:calc(100vw - 24px);padding:19px 21px;background:linear-gradient(145deg,#213c48,#10222d);border:1px solid #b79059;border-radius:15px;box-shadow:0 15px 45px #0009;pointer-events:auto;color:#eff5f2}.tutorial-tip>small{font-size:10px;letter-spacing:2px;color:#f1c880}.tutorial-tip h2{font-size:20px;line-height:1.25;margin:9px 0}.tutorial-tip p{font-size:14px;line-height:1.55;color:#c6d4d9;margin:10px 0 17px}.tutorial-actions{display:flex;gap:10px;justify-content:space-between}.tutorial-actions button{font-size:13px;padding:8px 12px}.tutorial-done{background:#ad7b3d;border-color:#e0b579}.tutorial-skip{background:transparent}.tutorial-tip button:focus-visible{outline:2px solid #ffe2a1}@media(max-width:760px){.tutorial-tip{width:280px;padding:14px 16px}.tutorial-tip h2{font-size:18px}.tutorial-tip p{font-size:13px}}

.floor-navigation{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#142733;border-bottom:1px solid #35434a}.floor-navigation button{font-size:11px;padding:7px}.floor-navigation span{flex:1;text-align:center;color:#a9babd;font-size:11px}.lift-site{border:2px dashed #ddbc79!important;background:#13232ac9!important;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#ffe0a5}.lift-site b{font-size:26px}.lift-site span{font-size:10px}.world{overflow:hidden}

.elevator-hit{border-color:transparent;background:transparent}.elevator-hit:hover,.elevator-hit:focus-visible{border-color:#e6c17d;background:#e6c17d12}

.daily-reward{display:flex;flex-wrap:wrap;gap:14px 24px;align-items:center;margin:0 0 16px;padding:14px 18px;background:#152934;border:1px solid #3b5058;border-radius:10px;color:#dce6e8;font-size:12px}.daily-reward>div{display:grid;gap:5px}.daily-reward small,.daily-reward span{color:#a4b6bd;font-size:11px}.daily-reward strong{color:#edcf98}.daily-reward details{flex:1;min-width:190px}.daily-reward summary{cursor:pointer;color:#b8cece}.daily-reward p{font-size:11px;line-height:1.6;margin:8px 0}

/* Scroll the shelter at its original room scale. */
.world{touch-action:pan-x pinch-zoom;outline-offset:3px}.world:focus-visible{outline:2px solid #e6c17d}
.floor-scroll{position:absolute;z-index:4;right:5px;top:13%;height:72%;width:18px;writing-mode:vertical-lr;direction:ltr;accent-color:#e4bb70;opacity:.85;cursor:ns-resize;touch-action:none;padding:0;background:#16272bd9;border-radius:9px}.floor-scroll:hover,.floor-scroll:focus{opacity:1}.floor-scroll:disabled{display:none}
.floor-navigation{flex-wrap:wrap}.floor-navigation button{min-height:34px}.floor-navigation span{min-width:130px}

.lift-site.lift-extension{flex-direction:row;gap:4px;padding:2px;border:1px solid #c5a366!important;border-radius:4px;background:linear-gradient(#35454a,#172d37)!important}.lift-extension b{font-size:16px}.lift-extension span{font-size:9px;line-height:1.1}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.welcome-overlay{position:fixed;inset:0;z-index:80;background:#030a10e8;display:grid;place-items:center;padding:24px}.welcome-card{max-width:590px;text-align:center;padding:36px;background:#142630;border:1px solid #bca77855;border-radius:18px;box-shadow:0 20px 90px #0008}.welcome-portrait{width:112px;height:112px;object-fit:contain;border-radius:50%;margin-bottom:16px}.welcome-card h2{font-size:26px}.welcome-card p{color:#bdccd1;line-height:1.8}.welcome-card audio{display:block;width:100%;margin:20px 0}.welcome-card .primary{margin-top:20px}.room-hit{border-radius:0!important;clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px)}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.top{margin-bottom:12px}.brand{gap:15px}.brand-logo{width:48px;height:42px;object-fit:contain}.brand>b{font-size:29px}.brand>div{padding-left:15px;line-height:23px}.resources{margin-bottom:12px}.resource{padding:7px 13px;min-height:56px}.resource strong{font-size:21px}.resource i{font-size:26px}.resource .balance-logo{height:34px;width:38px}.tabs{gap:1px;padding:7px 5px}.tabs button{min-width:0;padding:9px 3px;font-size:10px;white-space:nowrap}.daily-reward{display:grid;gap:21px;padding:0;margin:0;background:none;border:0;border-radius:0}.daily-reward>div{padding-bottom:16px;border-bottom:1px solid #30454d}.daily-reward strong{font-size:17px}.daily-reward details{min-width:0;max-width:100%}.daily-reward small{overflow-wrap:anywhere}footer a{color:#8299a7;text-decoration:none}footer a:hover{text-decoration:underline}
@media(min-width:761px){.app{padding-top:11px}.world-heading{padding-top:10px;padding-bottom:10px}}
@media(max-width:760px){.brand-logo{width:37px;height:34px}.brand>b{font-size:24px}.resource{padding:6px 3px;min-height:49px}.resource strong{font-size:14px}.resource i{font-size:17px}.tabs button{font-size:11px}.daily-reward{grid-template-columns:1fr 1fr}.daily-reward details{grid-column:1/-1}}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.top{display:grid;grid-template-columns:294px minmax(0,1fr);gap:18px;align-items:center;margin-bottom:14px}.brand{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;row-gap:2px;align-items:center}.brand-logo{grid-column:1;grid-row:1/3;width:44px;height:43px}.brand>b{grid-column:2;grid-row:1;font-size:29px;letter-spacing:-1px}.brand>div{display:block;grid-column:2;grid-row:2;border:0;padding:0;font-size:8px;line-height:13px;letter-spacing:2px}.top .resources{grid-column:2;grid-row:1;gap:8px;margin:0}.top .resource{padding:7px 10px;gap:8px;border-radius:10px;min-height:58px}.top .resource i{width:22px;font-size:22px}.top .resource small{font-size:10px}.top .resource strong{font-size:21px}.top .resource>span{font-size:9px;margin-left:auto;white-space:nowrap}.top .resource .balance-logo{width:29px;height:29px}.top .resource.score>span{display:none}
@media(max-width:1200px){.top .resource>span{display:none}.top .resource{padding:7px 8px;gap:6px}}
@media(max-width:1000px){.top{grid-template-columns:245px minmax(0,1fr);gap:12px}.brand>b{font-size:26px}.top .resource i{display:none}.top .resource .balance-logo{width:23px}.top .resource strong{font-size:18px}.top .resources{gap:5px}}
@media(max-width:760px){.top{grid-template-columns:1fr;gap:11px}.brand{width:245px}.top .resources{grid-column:1;grid-row:2}.top .resource{min-height:47px;padding:5px;justify-content:center}.top .resource small{font-size:8px}.top .resource strong{font-size:14px}.top .resource .balance-logo{width:20px}.brand>div{display:block}}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.brand{grid-template-columns:92px max-content;column-gap:10px;row-gap:0}.brand-logo{width:92px;height:58px;transform:none}.brand>b{font-size:34px;line-height:38px}.brand>div{font-size:8px;line-height:13px;letter-spacing:0;display:flex;justify-content:space-between;width:0;min-width:100%;white-space:nowrap}
@media(max-width:1000px){.brand{grid-template-columns:78px max-content;column-gap:8px}.brand-logo{width:78px;height:50px}.brand>b{font-size:28px;line-height:35px}.brand>div{font-size:8px;line-height:13px}}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.top .resource small{font-size:12px;line-height:16px}.top .resource>span{font-size:12px;line-height:17px;color:#c0ced3}.build-card small,.subcost,.resident small{font-size:12px;line-height:18px}.daily-reward small,.daily-reward span,.daily-reward p{font-size:13px;line-height:1.6}.daily-reward strong{font-size:19px}.detail-row{font-size:13px}.description{font-size:13px;line-height:1.6}
@media(max-width:760px){.top .resource small{font-size:10px;line-height:14px}}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.brand{grid-template-columns:max-content max-content;column-gap:14px}.brand-logo{height:53px;width:auto;max-width:none;object-fit:contain}
@media(max-width:1000px){.brand{column-gap:10px}.brand-logo{height:49px;width:auto}}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.surface-hit{z-index:2;align-items:flex-end}.surface-hit .room-tag{font-size:11px}.world>.flag-logo{width:3%;min-height:30px;z-index:5;pointer-events:auto}.world>.flag-logo:focus-visible{opacity:1!important;outline:2px solid #efc47d;outline-offset:4px}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
/* The scene sets the desktop row height; long menus scroll inside that row. */
@media(min-width:761px){
  .world-panel{align-self:start}
  .sidebar{contain:size;min-height:0;overflow-y:auto;scrollbar-gutter:stable}
  .sidebar>*{flex-shrink:0}
}
/* Keep language selection below account and tutorial controls, including async inserts. */
.settings>.language-switch{order:100;grid-column:1/-1;justify-content:flex-start;margin-top:4px}
.settings #exit-game{order:1}.settings #pause{order:2}.settings #save{order:3}.settings #sound{order:4}.settings #fullscreen{order:5}.settings #tutorial-repeat{order:6}.settings #open-map{order:7}.settings #server-logout{order:8}
.settings{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:auto}
/* Only the active entrance scrolls; the game underneath cannot create a second scrollbar. */
body:has(.entrance:not([hidden])){overflow:hidden}
.entrance{grid-template-rows:auto minmax(min-content,1fr);overscroll-behavior:contain}
.entry-header{grid-column:1/-1;display:flex;align-items:center;gap:35px;padding:18px 32px;border-bottom:1px solid #2b4149;background:#0b1c25;z-index:2}
.entry-brand{display:flex;align-items:center;gap:15px;text-decoration:none;color:#f1e7cf;flex-shrink:0}
.entry-brand img{width:86px;height:58px;object-fit:contain}.entry-brand>span{font-size:29px;font-weight:800;line-height:1.05}.entry-brand small{display:block;font-size:9px;letter-spacing:2.2px;margin-top:8px;color:#a8bdbd}
.entry-nav{display:flex;gap:24px}.entry-nav a{color:#d6e0da;text-decoration:none;font-size:14px}.entry-nav a:hover{color:#efc47d}
.entry-header>.language-switch{margin-left:auto;display:flex;gap:7px}.entry-header .quiet{min-width:42px;text-align:center;text-decoration:none}
.entrance-copy>.entry-logo,.entrance-copy>.eyebrow{display:none}
@media(max-width:760px){.entry-header{padding:12px 16px;gap:14px;flex-wrap:wrap}.entry-brand{gap:10px}.entry-brand img{width:58px;height:44px}.entry-brand>span{font-size:23px}.entry-brand small{font-size:7px;letter-spacing:1.5px}.entry-nav{order:3;flex-basis:100%;gap:22px}.entry-nav a{font-size:13px}.entry-header>.language-switch{gap:4px}.entry-header .quiet{min-width:33px;padding:7px}.entrance-copy{grid-row:2;align-self:start}}
.entrance{grid-template-rows:auto minmax(min-content,1fr) auto}.entry-nav{flex:1;justify-content:center}.entry-header>.language-switch{margin-left:0;flex-shrink:0}.entry-footer{grid-column:1/-1;grid-row:3;z-index:2;margin:0;padding:17px 32px;background:#0b1c25;border-top:1px solid #2b4149;color:#8fa7ad;font-size:11px}.entry-footer>span:nth-child(2){text-align:center;flex:1}.entry-footer>span:first-child{display:block}@media(max-width:760px){.entry-header>.language-switch{margin-left:auto}.entry-footer{padding:15px 18px;gap:12px;font-size:10px}.entry-footer>span:nth-child(2){order:3;flex-basis:100%}}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.surface-requirements{border-top:1px solid #30484d;padding-top:12px}.surface-requirements h3{font-size:13px;margin:0 0 8px}.surface-requirements .met,.surface-requirements .met b{color:#92d5ac}.surface-requirements .missing b{color:#e8ba82}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.settings>.language-switch{grid-column:2;justify-content:flex-end}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.candidate-label{display:block;margin:16px 0 8px;font-size:12px;color:var(--muted)}#candidate{display:block;width:100%;max-width:100%;margin-top:7px;padding:10px 6px;background:#172b34;color:#e4e9e9;border:1px solid #42616b;border-radius:8px;font:inherit}.resident-traits{line-height:1.7;color:#c5d6c9!important}.resident>div{min-width:0}.resident small{white-space:normal}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.resident-name{padding:0;border:0;background:none;color:#e6d09a;font:inherit;text-align:left;cursor:pointer}.resident-name:hover{text-decoration:underline}#resident-dialog{box-sizing:border-box;width:min(520px,calc(100vw - 24px));max-height:90vh;overflow:auto;border:1px solid #728876;border-radius:18px;background:linear-gradient(135deg,#20383b,#14232e);color:#ecf1ef;padding:30px;box-shadow:0 25px 100px #000b}#resident-dialog::backdrop{background:#041017bb;backdrop-filter:blur(3px)}#resident-dialog h2{font-size:30px;margin:10px 0}.resident-close{position:absolute;right:12px;top:10px;font-size:24px;background:none;border:0;color:#d7e8e7;cursor:pointer}.trait-bars{display:grid;gap:12px;margin:22px 0}.trait-bars label{display:grid;grid-template-columns:1fr auto;gap:5px}.trait-bars progress{grid-column:1 / -1;width:100%;height:10px;accent-color:#b6cfa9}#resident-job{display:block;width:100%;padding:10px;margin:8px 0;background:#213740;color:#eef1ec;border:1px solid #5d777c;border-radius:8px}.resident-actions{display:flex;gap:8px;flex-wrap:wrap}.resident-actions button{padding:10px;border:1px solid #597174;border-radius:8px;background:#29454b;color:#e9efea;cursor:pointer}.resident-actions button:disabled{opacity:.45;cursor:default}#resident-dialog .description{color:#acc0c4;font-size:12px;line-height:1.6}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
.assignment-modes{display:grid;grid-template-columns:1fr 1fr;border:1px solid #617b79;border-radius:9px;overflow:hidden;margin:14px 0 8px}.assignment-modes button{border:0;border-radius:0;padding:12px;color:#bfcecd;background:#172b34;cursor:pointer}.assignment-modes button[aria-pressed=true]{background:#b6c99a;color:#142626;font-weight:700}
/* Preserve the player's scroll position during live panel updates. */
.sidebar,.world,.missions{overflow-anchor:none}
.missions[hidden]{display:none}

/* Программист: Тахир Тухтаров. Код — собственность компании X-WORLD. */
html.language-pending body{visibility:hidden}.language-switch{display:flex;gap:6px;align-items:center}.entrance-copy>.language-switch{margin:0 0 18px}.language-switch button{min-width:44px}.language-switch button[aria-pressed="true"]{border-color:var(--gold);color:var(--gold)}.settings>.language-switch{grid-column:2}
/* X-WORLD: city name hint and turret keyboard focus. */
.entrance .xcity-hint{font-size:11px;line-height:1.5;color:#aebdb6;margin:8px 0}.turret-hover:focus-visible{outline:2px solid #e8c780!important;border-radius:8px}
