:root {
    --bg: #0f0c09;
    --bg-soft: rgba(22, 17, 12, 0.92);
    --panel: rgba(26, 20, 14, 0.9);
    --panel-2: rgba(35, 27, 18, 0.88);
    --border: rgba(180, 132, 64, 0.7);
    --border-soft: rgba(123, 92, 44, 0.55);
    --text: #f1e7d2;
    --muted: #c3b18a;
    --gold: #d7af62;
    --gold-strong: #f0c978;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text);
    background:
        linear-gradient(rgba(10, 8, 6, 0.76), rgba(10, 8, 6, 0.9)),
        url('/assets/img/login_bg.jpg') center/cover fixed no-repeat;
}

a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 16px 26px;
    background: rgba(12, 9, 6, 0.9);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(12px);
}
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark {
    width: 48px; height: 48px; border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(180deg, rgba(119,86,35,.95), rgba(69,47,19,.95));
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow);
    color: var(--gold-strong); font-weight: 700;
}
.eyebrow, .panel-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--gold); }
.topnav { display: flex; flex-wrap: wrap; gap: 14px; }
.topnav a {
    padding: 10px 14px; border-radius: 12px;
    border: 1px solid transparent;
}
.topnav a:hover { border-color: var(--border-soft); background: rgba(255,255,255,.03); }
.page-shell { width: min(1360px, calc(100vw - 32px)); margin: 28px auto 40px; }
.panel, .framed-panel, .hero-card, .stat-panel {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.panel, .framed-panel { padding: 28px; }
.hero-panel {
    display: grid; grid-template-columns: 1.3fr .8fr; gap: 28px; align-items: stretch;
    padding: 36px; border-radius: 28px; box-shadow: var(--shadow);
    border: 1px solid var(--border); background: linear-gradient(140deg, rgba(24,18,12,.93), rgba(13,10,7,.92));
}
.hero-copy h1, .panel h1, .framed-panel h1 { margin: 10px 0 14px; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; }
.hero-copy p, .panel p, .framed-panel p { color: var(--muted); line-height: 1.6; }
.hero-card { padding: 26px; }
.feature-list { margin: 18px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.65; }
.feature-list.compact { margin-top: 8px; }
.content-grid { display: grid; gap: 22px; }
.content-grid.two-col { grid-template-columns: 1.3fr .9fr; }
.content-grid.three-col { grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; }
.stat-panel { padding: 20px 22px; }
.stat-panel h2 { margin: 0 0 8px; font-size: 16px; color: var(--gold); }
.stat-panel p { margin: 0; font-size: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 14px; font-weight: 700; }
.btn-primary { background: linear-gradient(180deg, #c89943, #8c6022); color: #1f1409; border: 1px solid rgba(255, 219, 146, .28); }
.btn-secondary { border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.cta-row { display: flex; gap: 14px; margin-top: 24px; }
.login-stage { display: grid; place-items: center; min-height: calc(100vh - 190px); }
.login-panel { width: min(560px, 100%); }
.kernel-form { display: grid; gap: 16px; margin-top: 20px; }
.kernel-form label { display: grid; gap: 8px; color: var(--muted); }
.kernel-form input {
    width: 100%; padding: 14px 16px; color: var(--text);
    background: rgba(8, 7, 5, .72);
    border: 1px solid rgba(180, 132, 64, .42); border-radius: 14px; outline: none;
}
.kernel-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,175,98,.12); }
.muted-note { color: var(--muted); opacity: .95; }
.game-layout { display: grid; gap: 18px; }
.world-stage {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: stretch;
    min-height: 540px; padding: 26px; border-radius: 26px;
    border: 1px solid var(--border); background: linear-gradient(180deg, rgba(17,13,9,.92), rgba(31,23,15,.9)); box-shadow: var(--shadow);
}
.world-preview {
    border-radius: 24px; border: 1px solid rgba(184, 138, 68, .45); padding: 18px; background: rgba(9, 8, 6, .55);
}
.world-preview-map {
    position: relative; width: 100%; min-height: 100%; height: 100%;
    border-radius: 22px; overflow: hidden;
    background: radial-gradient(circle at 52% 52%, rgba(123, 92, 38, .38), transparent 22%),
                linear-gradient(180deg, #2d261f, #19140f);
    border: 1px solid rgba(184, 138, 68, .25);
}
.zone {
    position: absolute; display: grid; place-items: center; color: #1d1308;
    font-weight: 700; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(215,175,98,.88), rgba(146,106,49,.88));
}
.zone-core { width: 180px; height: 120px; left: 41%; top: 38%; }
.zone-forest { width: 170px; height: 104px; left: 12%; top: 24%; }
.zone-mountain { width: 190px; height: 108px; right: 8%; top: 18%; }
.zone-field { width: 210px; height: 110px; right: 10%; bottom: 15%; }
.buildbar-shell { padding: 18px 22px; }
.buildbar-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tab {
    padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-soft); color: var(--muted);
    background: rgba(255,255,255,.03);
}
.tab.active { color: #22170b; background: linear-gradient(180deg, var(--gold-strong), #b98539); border-color: rgba(255,255,255,.1); }
.narrow-panel { max-width: 720px; margin: 0 auto; }
@media (max-width: 980px) {
    .hero-panel, .world-stage, .content-grid.two-col, .content-grid.three-col { grid-template-columns: 1fr; }
    .page-shell { width: min(100vw - 18px, 1360px); }
    .topbar { padding: 14px 16px; }
}

.topbar-user { display:flex; align-items:center; gap:12px; }
.user-badge { display:grid; gap:2px; text-align:right; }
.btn-small { padding: 10px 14px; font-size: 14px; }
.flash {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
}
.flash-success { background: rgba(84, 134, 74, .18); border-color: rgba(140, 201, 124, .35); }
.flash-error { background: rgba(125, 54, 42, .18); border-color: rgba(216, 108, 86, .35); }
.auth-help-grid {
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 22px;
}
.auth-help-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
}
code {
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--gold-strong);
}
@media (max-width: 980px) {
    .topbar-user { width: 100%; justify-content: space-between; }
    .auth-help-grid { grid-template-columns: 1fr; }
}

.player-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.meta-row strong { color: var(--gold); }
.player-progress-box {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
}
.progress-track {
    margin: 10px 0 12px;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.06);
}
.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(180deg, var(--gold-strong), #aa7a34);
}
.profile-card-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: start;
    margin-top: 18px;
}
.profile-avatar-frame {
    padding: 12px;
    border-radius: 22px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
}
.profile-avatar-placeholder {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 38px;
    font-weight: 700;
    color: #23170b;
    background: linear-gradient(180deg, var(--gold-strong), #9a6e2f);
}
.profile-details-grid { display: grid; gap: 4px; }
@media (max-width: 980px) {
    .player-hero-grid, .profile-card-grid { grid-template-columns: 1fr; }
}


.dashboard-resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.dashboard-resource-card,
.resource-card,
.transaction-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
}
.dashboard-resource-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
}
.resource-head,
.resource-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.resource-meta {
    color: var(--muted);
    font-size: 13px;
}
.resource-transaction-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.transaction-card {
    display: grid;
    gap: 4px;
}
@media (max-width: 980px) {
    .dashboard-resource-grid,
    .resource-grid { grid-template-columns: 1fr; }
}

.world-summary-grid { margin-bottom: 22px; }
.world-domain-layout {
    display: grid;
    grid-template-columns: 1.45fr .75fr;
    gap: 22px;
    align-items: start;
}
.world-domain-stage { padding: 24px; }
.world-stage-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.world-stage-meta {
    display: grid;
    gap: 10px;
    min-width: 260px;
}
.meta-chip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
}
.meta-chip strong { color: var(--gold); }
.world-domain-viewport {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(184, 138, 68, .35);
    background: linear-gradient(180deg, rgba(9,8,6,.82), rgba(14,11,8,.95));
    padding: 0;
}
.world-domain-canvas {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: calc(var(--world-width, 1600) / var(--world-height, 900));
    min-height: 320px;
    margin: 0 auto;
}
.world-domain-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 18px;
}
.world-slot {
    position: absolute;
    transform: translate(-50%, -100%);
    min-width: 118px;
    padding: 10px 12px;
    display: grid;
    gap: 2px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(39,28,18,.96), rgba(25,18,12,.96));
    color: var(--text);
    box-shadow: 0 12px 24px rgba(0,0,0,.32);
}
.world-slot-icon { font-size: 18px; color: var(--gold-strong); }
.world-slot-label { font-weight: 700; font-size: 13px; }
.world-slot-state { color: var(--muted); font-size: 11px; }
.slot-open { border-color: rgba(203, 175, 100, .45); }
.slot-locked {
    opacity: .82;
    border-color: rgba(112, 102, 86, .3);
    background: linear-gradient(180deg, rgba(34,28,23,.94), rgba(19,15,12,.94));
}
.world-domain-sidebar { display: grid; gap: 22px; }
.world-zone-list { display: grid; gap: 12px; margin-top: 12px; }
.world-zone-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
}
.world-zone-card p { margin: 6px 0 0; font-size: 14px; }
.zone-core { border-color: rgba(215,175,98,.4); }
.zone-forest { border-color: rgba(82,121,85,.35); }
.zone-mountain { border-color: rgba(153,140,117,.35); }
.zone-farmland { border-color: rgba(145,124,77,.35); }
.zone-military { border-color: rgba(153,104,86,.35); }
@media (max-width: 1100px) {
    .world-domain-layout,
    .world-stage-head { grid-template-columns: 1fr; display: grid; }
    .world-stage-meta { min-width: 0; }
}

.research-hero-grid { margin-bottom: 22px; }
.research-branch-grid {
    display: grid;
    gap: 22px;
}
.research-branch-head { margin-bottom: 18px; }
.research-card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.research-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
    display: grid;
    gap: 14px;
}
.research-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}
.research-status-badge,
.slot-inline-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.05);
}
.research-effect-box,
.research-info-grid > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.06);
    display: grid;
    gap: 4px;
}
.research-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.research-form { margin-top: auto; }
.research-maxed { border-color: rgba(120, 181, 111, .35); }
.research-ready { border-color: rgba(215,175,98,.45); }
.research-poor { border-color: rgba(180, 120, 64, .35); }
.research-locked { border-color: rgba(124, 94, 74, .35); }
.research-branch-growth { box-shadow: inset 0 0 0 1px rgba(154, 190, 106, .08), var(--shadow); }
.research-branch-economy { box-shadow: inset 0 0 0 1px rgba(215, 175, 98, .08), var(--shadow); }
.research-branch-battle { box-shadow: inset 0 0 0 1px rgba(176, 104, 88, .08), var(--shadow); }
@media (max-width: 980px) {
    .research-card-list,
    .research-info-grid { grid-template-columns: 1fr; }
}


.content-grid.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inline-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:16px; }
.panel-success { border-color: rgba(86, 166, 106, 0.45); }
.panel-danger { border-color: rgba(180, 78, 78, 0.45); }
.stack-form { display:grid; gap:12px; }
.stack-form input[type="text"] { width:100%; padding:12px 14px; border-radius:12px; border:1px solid rgba(201,168,96,.28); background:rgba(16,12,10,.72); color:#f3ead8; }
.admin-tools-grid { align-items:start; }
.inline-reset-form { display:inline; }
@media (max-width: 1100px) { .content-grid.four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .content-grid.four-col { grid-template-columns: 1fr; } }


.dashboard-stat-grid .stat-panel small,
.stat-panel small { display:block; margin-top:8px; color: var(--muted); }
.stat-panel-hero p { font-size: 1.9rem; }
.dashboard-hero-grid, .dashboard-lower-grid { align-items: stretch; }
.dashboard-hero-panel h1, .research-hero-panel h1, .quest-hero-panel h1 { margin-bottom: 10px; }
.dashboard-focus-panel, .research-side-panel, .quest-side-panel { background: linear-gradient(180deg, rgba(43,32,21,.92), rgba(24,18,12,.92)); }
.focus-list { display:grid; gap:12px; }
.focus-item { padding:14px 16px; border-radius:16px; border:1px solid var(--border-soft); background: rgba(255,255,255,.03); }
.focus-item strong { display:block; margin-bottom:4px; color: var(--gold-strong); }
.dashboard-lower-grid { margin-top: 22px; }
.world-stage-strip { display:flex; flex-wrap:wrap; gap:10px; margin: 0 0 16px; }
.stage-pill { display:flex; gap:8px; align-items:center; padding:8px 12px; border-radius:999px; border:1px solid var(--border-soft); background: rgba(255,255,255,.04); color: var(--muted); }
.stage-pill strong { color: var(--gold-strong); }
.bonus-list li { display:flex; justify-content:space-between; gap:12px; }
.buildbar-hint-row { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.cta-row.compact { margin-top:0; }
.world-domain-stage, .world-domain-sidebar .panel, .research-branch, .quest-group, .dashboard-hero-panel { overflow:hidden; }
.world-slot { min-width: 148px; text-align:center; backdrop-filter: blur(8px); }
.world-slot-label { display:block; font-weight:700; margin-top:4px; }
.world-slot-state { display:block; font-size:.8rem; color: var(--muted); margin-top:2px; }
.slot-inline-badge { display:inline-block; margin-top:8px; padding:4px 8px; border-radius:999px; border:1px solid var(--border-soft); background: rgba(0,0,0,.22); font-size:.78rem; color: var(--text); }
.research-card, .quest-card { position:relative; }
.research-card::after, .quest-card::after { content:''; position:absolute; inset:0; border-radius:18px; pointer-events:none; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.research-card-head strong { font-size:1.04rem; }
.research-effect-box { margin: 14px 0; padding: 12px 14px; border-radius:14px; background: rgba(255,255,255,.035); border:1px solid var(--border-soft); }
.research-effect-box strong { display:block; margin-bottom:4px; color: var(--gold-strong); }
.quest-card .progress-track { margin: 12px 0 14px; }
.topnav a:hover { color: var(--gold-strong); }
@media (max-width: 1100px) {
  .buildbar-hint-row { flex-direction:column; align-items:flex-start; }
}


.world-stat-ribbon { margin-bottom: 22px; }
.ribbon-panel { position: relative; overflow: hidden; }
.ribbon-panel::after { content:""; position:absolute; inset:auto 0 0 0; height:3px; background: linear-gradient(90deg, rgba(201,168,96,0), rgba(201,168,96,.9), rgba(201,168,96,0)); }
.polished-game-layout { align-items: stretch; }
.polished-world-stage { background: linear-gradient(180deg, rgba(34,24,16,.94), rgba(18,13,10,.96)); }
.polished-world-viewport { position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 18px 40px rgba(0,0,0,.28); }
.world-map-vignette { position:absolute; inset:0; pointer-events:none; border-radius: 18px; background: radial-gradient(circle at center, rgba(0,0,0,0) 40%, rgba(8,6,4,.34) 100%); }
.world-stage-legend { display:flex; flex-wrap:wrap; gap:10px; margin: 0 0 16px; }
.legend-item { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background: rgba(255,255,255,.04); border:1px solid var(--border-soft); color: var(--muted); }
.legend-item i { display:inline-block; width:10px; height:10px; border-radius:999px; background: var(--gold); box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.legend-open i { background: #c9a860; }
.legend-built i { background: #78a76f; }
.legend-queued i { background: #c98152; }
.legend-locked i { background: #6d6456; }
.world-slot { width: 166px; min-width:166px; padding: 12px 12px 10px; gap: 4px; border-color: rgba(255,255,255,.06); background: linear-gradient(180deg, rgba(42,31,20,.98), rgba(22,17,12,.98)); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.world-slot:hover { transform: translate(-50%, -102%); box-shadow: 0 18px 28px rgba(0,0,0,.38); }
.world-slot.slot-actionable { border-color: rgba(201,168,96,.42); box-shadow: 0 14px 26px rgba(0,0,0,.35), 0 0 0 1px rgba(201,168,96,.08); }
.world-slot.slot-built { border-color: rgba(120,167,111,.34); }
.world-slot.slot-queued { border-color: rgba(201,129,82,.42); }
.world-slot.slot-locked { opacity:.88; }
.world-slot-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.world-slot-level { font-size:11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.world-slot-category { display:block; font-size: 11px; color: var(--gold); opacity:.88; text-transform: uppercase; letter-spacing:.08em; }
.slot-cost-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; justify-content:center; }
.cost-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 7px; border-radius:999px; background: rgba(0,0,0,.22); border:1px solid rgba(255,255,255,.06); font-size:11px; color: var(--text); }
.slot-footer { margin-top:8px; display:flex; justify-content:center; }
.slot-badge-lock { border-color: rgba(148,111,86,.35); }
.slot-badge-queue { border-color: rgba(201,129,82,.35); }
.polished-world-sidebar .panel { background: linear-gradient(180deg, rgba(37,27,19,.93), rgba(20,15,11,.95)); }
.sidebar-highlight-panel { box-shadow: inset 0 0 0 1px rgba(201,168,96,.08), var(--shadow); }
.world-focus-list .focus-item span { color: var(--muted); }
.compact-resource-grid { gap:10px; }
.compact-resource-card { padding: 12px 14px; min-height: auto; }
.compact-resource-card strong { font-size: 13px; }
.polished-queue-list { gap: 10px; }
.polished-queue-card { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.035); border:1px solid var(--border-soft); }
.polished-buildbar { background: linear-gradient(180deg, rgba(41,29,20,.9), rgba(22,16,12,.94)); }
.polished-buildbar .tab.active { box-shadow: inset 0 -2px 0 var(--gold); }
@media (max-width: 1100px) {
  .world-slot { width: 154px; min-width:154px; }
}
@media (max-width: 860px) {
  .world-stage-legend { margin-top: 6px; }
  .world-slot { width: 146px; min-width:146px; padding:10px; }
  .world-slot-category, .cost-chip { font-size:10px; }
}


/* World marker anchoring pass */
.world-domain-canvas { overflow: visible; }

.world-slot {
  --marker-scale: 1;
  --ground-width: 86px;
  --ground-height: 28px;
  --post-top: -64px;
  --post-height: 52px;
  --crest-top: -96px;
  --crest-size: 54px;
  --plaque-offset: 58px;
}
.world-slot {
  width: 0;
  min-width: 0;
  padding: 0;
  gap: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
  backdrop-filter: none;
}
.world-slot:hover { transform: translate(-50%, -100%); box-shadow: none; }
.world-slot-anchor {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 0;
}
.world-slot-ground {
  position: absolute;
  left: 50%;
  top: -18px;
  width: var(--ground-width);
  height: var(--ground-height);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(201,168,96,.34) 0%, rgba(111,83,39,.22) 42%, rgba(20,16,12,.08) 72%, rgba(20,16,12,0) 100%);
  border: 1px solid rgba(201,168,96,.18);
  box-shadow: 0 8px 18px rgba(0,0,0,.28);
}
.world-slot-post {
  position: absolute;
  left: 50%;
  top: var(--post-top);
  width: 5px;
  height: var(--post-height);
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #8f6a34, #402b16);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.world-slot-crest {
  position: absolute;
  left: 50%;
  top: var(--crest-top);
  width: var(--crest-size);
  height: var(--crest-size);
  transform: translateX(-50%);
  border-radius: 16px 16px 14px 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(66,48,28,.98), rgba(30,22,14,.98));
  border: 1px solid rgba(201,168,96,.42);
  box-shadow: 0 12px 24px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06);
}
.world-slot-crest::before {
  content: '';
  position: absolute;
  inset: 4px 6px auto 6px;
  height: 10px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, rgba(214,177,104,.95), rgba(146,106,49,.92));
  opacity: .9;
}
.world-slot-silhouette {
  position: relative;
  z-index: 1;
  width: calc(34px * var(--marker-scale));
  height: calc(34px * var(--marker-scale));
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.28));
}
.marker-castle .world-slot-silhouette,
.marker-barracks .world-slot-silhouette { width: calc(36px * var(--marker-scale)); height: calc(36px * var(--marker-scale)); }
.marker-market .world-slot-crest::before { background: linear-gradient(180deg, rgba(164,66,66,.96), rgba(92,34,34,.94)); }
.marker-sawmill .world-slot-crest::before,
.marker-farm .world-slot-crest::before { background: linear-gradient(180deg, rgba(117,138,68,.96), rgba(63,86,34,.94)); }
.marker-quarry .world-slot-crest::before,
.marker-iron_mine .world-slot-crest::before { background: linear-gradient(180deg, rgba(129,127,124,.96), rgba(74,71,67,.94)); }
.world-slot.slot-built .world-slot-crest { border-color: rgba(120,167,111,.46); }
.world-slot.slot-queued .world-slot-crest { border-color: rgba(201,129,82,.48); }
.world-slot.slot-locked .world-slot-crest { opacity: .88; border-color: rgba(116,103,89,.30); }
.world-slot.slot-locked .world-slot-silhouette { filter: grayscale(.4) brightness(.82); }

.world-slot.level-band-1 {
  --marker-scale: 1;
  --ground-width: 88px;
  --ground-height: 28px;
  --post-top: -64px;
  --post-height: 52px;
  --crest-top: -96px;
  --crest-size: 54px;
  --plaque-offset: 58px;
}
.world-slot.level-band-2 {
  --marker-scale: 1.12;
  --ground-width: 96px;
  --ground-height: 30px;
  --post-top: -70px;
  --post-height: 58px;
  --crest-top: -106px;
  --crest-size: 60px;
  --plaque-offset: 62px;
}
.world-slot.level-band-3 {
  --marker-scale: 1.24;
  --ground-width: 104px;
  --ground-height: 32px;
  --post-top: -76px;
  --post-height: 64px;
  --crest-top: -116px;
  --crest-size: 66px;
  --plaque-offset: 66px;
}
.world-slot.level-band-4 {
  --marker-scale: 1.34;
  --ground-width: 112px;
  --ground-height: 34px;
  --post-top: -82px;
  --post-height: 70px;
  --crest-top: -126px;
  --crest-size: 72px;
  --plaque-offset: 72px;
}
.world-slot.level-band-2 .world-slot-ground,
.world-slot.level-band-3 .world-slot-ground,
.world-slot.level-band-4 .world-slot-ground {
  box-shadow: 0 10px 20px rgba(0,0,0,.30);
}
.world-slot.level-band-3 .world-slot-crest,
.world-slot.level-band-4 .world-slot-crest {
  box-shadow: 0 16px 28px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.06);
}
.world-slot.level-band-4 .world-slot-crest {
  border-width: 2px;
}
.world-slot-growth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}
.world-slot-growth i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(201,168,96,.18);
  border: 1px solid rgba(201,168,96,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.world-slot-growth i.active {
  background: linear-gradient(180deg, rgba(230,198,126,.98), rgba(173,129,59,.96));
  border-color: rgba(230,198,126,.42);
}
.world-slot.slot-built.level-band-3 .world-slot-state,
.world-slot.slot-built.level-band-4 .world-slot-state {
  color: #d7caa8;
}
.world-slot.slot-built.level-band-4 .world-slot-label {
  color: #f1e3b7;
}

.world-slot-plaque {
  position: absolute;
  left: 50%;
  bottom: var(--plaque-offset);
  width: 176px;
  padding: 10px 12px 10px;
  transform: translateX(-50%);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(42,31,20,.96), rgba(24,18,12,.96));
  border: 1px solid rgba(201,168,96,.18);
  box-shadow: 0 14px 28px rgba(0,0,0,.34);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.world-slot:hover .world-slot-plaque {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 18px 32px rgba(0,0,0,.38);
}
.world-slot.slot-actionable .world-slot-plaque { border-color: rgba(201,168,96,.42); }
.world-slot.slot-built .world-slot-plaque { border-color: rgba(120,167,111,.34); }
.world-slot.slot-queued .world-slot-plaque { border-color: rgba(201,129,82,.42); }
.world-slot.slot-locked .world-slot-plaque { border-color: rgba(116,103,89,.28); opacity: .92; }
.world-slot.slot-built .world-slot-ground { background: radial-gradient(circle at center, rgba(120,167,111,.30) 0%, rgba(68,92,64,.18) 42%, rgba(20,16,12,.06) 72%, rgba(20,16,12,0) 100%); border-color: rgba(120,167,111,.16); }
.world-slot.slot-queued .world-slot-ground { background: radial-gradient(circle at center, rgba(201,129,82,.30) 0%, rgba(112,69,45,.18) 42%, rgba(20,16,12,.06) 72%, rgba(20,16,12,0) 100%); border-color: rgba(201,129,82,.16); }
.world-slot.slot-locked .world-slot-ground { background: radial-gradient(circle at center, rgba(110,102,90,.22) 0%, rgba(62,56,49,.14) 42%, rgba(20,16,12,.04) 72%, rgba(20,16,12,0) 100%); border-color: rgba(110,102,90,.12); }
.world-slot-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.world-slot-label { display:block; margin-top:0; font-size:13px; line-height:1.2; }
.world-slot-category { margin-top:3px; }
.world-slot-state { display:block; margin-top:3px; font-size:11px; }
.slot-cost-row { margin-top:8px; }
.slot-footer { margin-top:8px; }
.slot-build-form { display:flex; justify-content:center; }
.world-slot .btn-small { padding: 8px 12px; font-size: 12px; min-height: 0; }
@media (max-width: 1100px) {
  .world-slot-plaque { width: 164px; }
  .world-slot-ground { width: 76px; }
}
@media (max-width: 860px) {
  .world-slot { --crest-size: 46px; --crest-top: -88px; --post-top: -58px; --post-height: 46px; --plaque-offset: 54px; }
  .world-slot-crest::before { height: 8px; }
  .world-slot-silhouette { width: calc(28px * var(--marker-scale)); height: calc(28px * var(--marker-scale)); }
  .world-slot-plaque { width: 152px; padding: 9px 10px; }
  .world-slot-category, .cost-chip, .world-slot-level { font-size: 10px; }
}


/* Type-specific building growth pass */
.world-slot.slot-built .world-slot-crest,
.world-slot.slot-queued .world-slot-crest {
  overflow: visible;
}
.crest-ornament {
  position: absolute;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.world-slot.slot-built .crest-ornament,
.world-slot.slot-queued .crest-ornament {
  opacity: .95;
}
.crest-ornament-left,
.crest-ornament-right {
  bottom: 10px;
  width: 8px;
  height: 22px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, rgba(188,150,82,.95), rgba(95,65,28,.92));
  box-shadow: 0 5px 10px rgba(0,0,0,.20);
}
.crest-ornament-left { left: -6px; transform: translateY(0) scaleY(.7); }
.crest-ornament-right { right: -6px; transform: translateY(0) scaleY(.7); }
.crest-ornament-top {
  left: 50%;
  top: -8px;
  width: 16px;
  height: 10px;
  transform: translateX(-50%) scale(.72);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(223,192,124,.98), rgba(140,103,48,.96));
  box-shadow: 0 4px 8px rgba(0,0,0,.18);
}
.world-slot.level-band-2 .crest-ornament-left,
.world-slot.level-band-2 .crest-ornament-right { height: 26px; width: 9px; }
.world-slot.level-band-3 .crest-ornament-left,
.world-slot.level-band-3 .crest-ornament-right { height: 30px; width: 10px; }
.world-slot.level-band-4 .crest-ornament-left,
.world-slot.level-band-4 .crest-ornament-right { height: 34px; width: 11px; }
.world-slot.level-band-2 .crest-ornament-top { width: 18px; height: 12px; }
.world-slot.level-band-3 .crest-ornament-top { width: 22px; height: 14px; }
.world-slot.level-band-4 .crest-ornament-top { width: 26px; height: 16px; }

.world-slot.building-castle.slot-built .crest-ornament-left,
.world-slot.building-castle.slot-built .crest-ornament-right,
.world-slot.building-barracks.slot-built .crest-ornament-left,
.world-slot.building-barracks.slot-built .crest-ornament-right {
  bottom: 8px;
  border-radius: 4px 4px 0 0;
}
.world-slot.building-castle.level-band-3.slot-built .crest-ornament-left,
.world-slot.building-castle.level-band-3.slot-built .crest-ornament-right,
.world-slot.building-castle.level-band-4.slot-built .crest-ornament-left,
.world-slot.building-castle.level-band-4.slot-built .crest-ornament-right {
  top: 10px;
  bottom: auto;
}
.world-slot.building-castle.slot-built .crest-ornament-top {
  top: -10px;
  width: 20px;
  height: 12px;
  clip-path: polygon(50% 0, 100% 42%, 86% 100%, 14% 100%, 0 42%);
}
.world-slot.building-castle.level-band-4.slot-built .crest-ornament-top {
  width: 30px;
  height: 18px;
}

.world-slot.building-market.slot-built .crest-ornament-left,
.world-slot.building-market.slot-built .crest-ornament-right {
  width: 16px;
  height: 10px;
  bottom: 16px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(178,64,64,.98), rgba(103,36,36,.96));
  clip-path: polygon(0 0, 100% 0, 84% 100%, 16% 100%);
}
.world-slot.building-market.slot-built .crest-ornament-left { left: -14px; }
.world-slot.building-market.slot-built .crest-ornament-right { right: -14px; }
.world-slot.building-market.slot-built .crest-ornament-top {
  top: -6px;
  width: 26px;
  height: 12px;
  background: linear-gradient(180deg, rgba(203,82,82,.98), rgba(124,41,41,.96));
  clip-path: polygon(0 0, 100% 0, 84% 100%, 16% 100%);
}
.world-slot.building-market.level-band-4.slot-built .crest-ornament-top {
  width: 34px;
  height: 16px;
}

.world-slot.building-quarry.slot-built .crest-ornament-left,
.world-slot.building-quarry.slot-built .crest-ornament-right,
.world-slot.building-iron_mine.slot-built .crest-ornament-left,
.world-slot.building-iron_mine.slot-built .crest-ornament-right {
  width: 14px;
  height: 18px;
  bottom: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(126,124,122,.98), rgba(72,70,67,.94));
  clip-path: polygon(22% 0, 78% 0, 100% 36%, 82% 100%, 18% 100%, 0 36%);
}
.world-slot.building-quarry.slot-built .crest-ornament-left { left: -12px; }
.world-slot.building-quarry.slot-built .crest-ornament-right { right: -12px; }
.world-slot.building-iron_mine.slot-built .crest-ornament-left { left: -13px; }
.world-slot.building-iron_mine.slot-built .crest-ornament-right { right: -13px; }
.world-slot.building-quarry.slot-built .crest-ornament-top,
.world-slot.building-iron_mine.slot-built .crest-ornament-top {
  top: auto;
  bottom: -8px;
  width: 22px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(110,105,100,.96), rgba(63,60,56,.92));
}

.world-slot.building-farm.slot-built .crest-ornament-left,
.world-slot.building-farm.slot-built .crest-ornament-right,
.world-slot.building-sawmill.slot-built .crest-ornament-left,
.world-slot.building-sawmill.slot-built .crest-ornament-right {
  width: 6px;
  height: 26px;
  bottom: 8px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(102,136,69,.98), rgba(49,81,31,.94));
}
.world-slot.building-farm.slot-built .crest-ornament-left { left: -8px; transform: rotate(-16deg); }
.world-slot.building-farm.slot-built .crest-ornament-right { right: -8px; transform: rotate(16deg); }
.world-slot.building-sawmill.slot-built .crest-ornament-left,
.world-slot.building-sawmill.slot-built .crest-ornament-right {
  background: linear-gradient(180deg, rgba(123,99,60,.98), rgba(72,50,24,.94));
  width: 5px;
  height: 24px;
}
.world-slot.building-sawmill.slot-built .crest-ornament-top {
  width: 24px;
  height: 10px;
  top: auto;
  bottom: -6px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(127,102,62,.98), rgba(77,53,25,.94));
}
.world-slot.building-farm.slot-built .crest-ornament-top {
  width: 18px;
  height: 18px;
  top: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(125,162,72,.98) 0%, rgba(65,101,34,.94) 70%, rgba(46,71,25,.90) 100%);
}

.world-slot.building-warehouse.slot-built .crest-ornament-left,
.world-slot.building-warehouse.slot-built .crest-ornament-right {
  width: 10px;
  height: 22px;
  bottom: 10px;
  background: linear-gradient(180deg, rgba(150,116,63,.98), rgba(89,63,28,.94));
}
.world-slot.building-warehouse.slot-built .crest-ornament-top {
  width: 26px;
  height: 8px;
  top: auto;
  bottom: -5px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(145,106,52,.98), rgba(83,57,26,.94));
}

.world-slot.building-barracks.slot-built .crest-ornament-top {
  top: -8px;
  width: 24px;
  height: 12px;
  background: linear-gradient(180deg, rgba(86,104,130,.98), rgba(45,58,79,.94));
  clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%, 54% 72%, 46% 72%);
}
.world-slot.building-barracks.slot-built .crest-ornament-left,
.world-slot.building-barracks.slot-built .crest-ornament-right {
  background: linear-gradient(180deg, rgba(134,141,151,.96), rgba(71,77,86,.94));
}

.world-slot.slot-built.level-band-4.building-castle .world-slot-label,
.world-slot.slot-built.level-band-4.building-barracks .world-slot-label {
  letter-spacing: .03em;
}
.world-slot.slot-built.level-band-3.building-market .world-slot-state,
.world-slot.slot-built.level-band-4.building-market .world-slot-state {
  color: #efd7c3;
}


/* World living detail pass + 100% map */
.polished-world-viewport {
  width: 100%;
}
.world-domain-canvas {
  height: auto;
}
.world-slot-anchor {
  isolation: isolate;
}
.world-slot-env {
  position: absolute;
  left: 50%;
  top: -36px;
  width: 132px;
  height: 72px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
.world-slot-env .env-detail {
  position: absolute;
  opacity: 0;
}
.world-slot.slot-built .world-slot-env .env-detail,
.world-slot.slot-queued .world-slot-env .env-detail {
  opacity: 1;
}
.env-smoke {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.38), rgba(124,124,124,.18) 52%, rgba(40,40,40,0) 72%);
  filter: blur(1px);
}
.env-smoke-a { left: 22px; top: -8px; }
.env-smoke-b { left: 34px; top: -20px; width: 18px; height: 18px; }
.env-banner {
  width: 6px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(154,116,58,.96), rgba(72,47,22,.92));
}
.env-banner::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 14px;
  height: 10px;
  clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(179,52,52,.98), rgba(101,28,28,.94));
}
.env-banner-left { left: 10px; top: 18px; }
.env-banner-right { right: 10px; top: 16px; }
.env-crate {
  width: 14px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(144,110,61,.98), rgba(83,58,27,.94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.env-crate-a { left: 16px; top: 42px; }
.env-crate-b { right: 16px; top: 44px; }
.env-field {
  width: 26px;
  height: 16px;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, rgba(136,114,55,.86) 0 3px, rgba(109,146,60,.96) 3px 6px);
  box-shadow: 0 3px 8px rgba(0,0,0,.16);
}
.env-field-a { left: 6px; top: 46px; transform: rotate(-10deg); }
.env-field-b { right: 6px; top: 46px; transform: rotate(10deg); }
.env-rubble {
  width: 18px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 25% 45%, rgba(154,151,145,.98) 0 16%, rgba(105,102,96,.96) 17% 38%, rgba(77,74,70,.92) 39% 100%);
}
.env-rubble-a { left: 10px; top: 48px; }
.env-rubble-b { right: 10px; top: 48px; }
.env-shield {
  width: 12px;
  height: 16px;
  background: linear-gradient(180deg, rgba(110,123,148,.98), rgba(53,62,83,.94));
  clip-path: polygon(50% 0, 100% 20%, 100% 62%, 50% 100%, 0 62%, 0 20%);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}
.env-shield-a { left: 12px; top: 40px; }
.env-shield-b { right: 12px; top: 40px; }
.world-slot.level-band-2 .world-slot-env { transform: translateX(-50%) scale(1.08); }
.world-slot.level-band-3 .world-slot-env { transform: translateX(-50%) scale(1.16); }
.world-slot.level-band-4 .world-slot-env { transform: translateX(-50%) scale(1.24); }
.world-slot-env.env-settlement .env-banner,
.world-slot-env.env-settlement .env-crate { opacity: 1; }
.world-slot-env.env-settlement .env-field,
.world-slot-env.env-settlement .env-rubble,
.world-slot-env.env-settlement .env-shield,
.world-slot-env.env-settlement .env-smoke { opacity: 0; }
.world-slot.building-market .world-slot-env.env-settlement .env-banner::after {
  background: linear-gradient(180deg, rgba(196,70,70,.98), rgba(117,34,34,.94));
}
.world-slot.building-warehouse .world-slot-env.env-settlement .env-banner::after {
  background: linear-gradient(180deg, rgba(165,124,58,.98), rgba(99,64,22,.94));
}
.world-slot-env.env-rural .env-field,
.world-slot-env.env-rural .env-crate { opacity: 1; }
.world-slot.building-sawmill .world-slot-env.env-rural .env-field { opacity: 0; }
.world-slot.building-sawmill .world-slot-env.env-rural .env-crate {
  width: 18px;
  height: 6px;
  border-radius: 999px;
  top: 48px;
  background: linear-gradient(180deg, rgba(132,100,57,.98), rgba(72,48,20,.94));
}
.world-slot.building-sawmill .world-slot-env.env-rural .env-crate-a { left: 10px; transform: rotate(14deg); }
.world-slot.building-sawmill .world-slot-env.env-rural .env-crate-b { right: 10px; transform: rotate(-14deg); }
.world-slot.building-farm .world-slot-env.env-rural .env-field,
.world-slot.building-farm .world-slot-env.env-rural .env-field-b { opacity: 1; }
.world-slot-env.env-industrial .env-rubble,
.world-slot-env.env-industrial .env-smoke { opacity: 1; }
.world-slot.building-quarry .world-slot-env.env-industrial .env-smoke,
.world-slot.building-iron_mine .world-slot-env.env-industrial .env-smoke { left: 28px; }
.world-slot.building-iron_mine .world-slot-env.env-industrial .env-rubble {
  background: radial-gradient(circle at 25% 45%, rgba(121,124,135,.98) 0 16%, rgba(78,81,90,.96) 17% 38%, rgba(52,55,61,.92) 39% 100%);
}
.world-slot-env.env-military .env-banner,
.world-slot-env.env-military .env-shield { opacity: 1; }
.world-slot.building-castle .world-slot-env.env-military .env-banner::after,
.world-slot.building-barracks .world-slot-env.env-military .env-banner::after {
  background: linear-gradient(180deg, rgba(129,42,42,.98), rgba(70,21,21,.94));
}
.world-slot.building-castle .world-slot-env.env-military .env-banner-left { left: 2px; top: 10px; }
.world-slot.building-castle .world-slot-env.env-military .env-banner-right { right: 2px; top: 10px; }
.world-slot.slot-queued .world-slot-env .env-detail { opacity: .72; }
.world-slot.slot-locked .world-slot-env { display: none; }
@media (max-width: 860px) {
  .world-domain-viewport { border-radius: 18px; }
  .world-slot-env { width: 112px; height: 64px; }
}


/* Fullscreen game pass + subtle world life */
html, body { width: 100%; }
body.page-game {
  min-height: 100vh;
  overflow-x: hidden;
}
body.page-game .app-shell {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
body.page-game .page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 18px 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.page-game .world-stat-ribbon {
  margin: 0 0 16px;
}
body.page-game .polished-game-layout {
  flex: 1;
  min-height: 0;
}
body.page-game .world-domain-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  flex: 1;
  min-height: 0;
}
body.page-game .world-domain-stage,
body.page-game .world-domain-sidebar {
  min-height: 0;
}
body.page-game .world-domain-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px;
}
body.page-game .world-stage-head {
  margin-bottom: 14px;
}
body.page-game .polished-world-viewport {
  flex: 1;
  min-height: 0;
  height: 100%;
  border-radius: 22px;
}
body.page-game .world-domain-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}
body.page-game .world-domain-map,
body.page-game .world-map-vignette {
  border-radius: 20px;
}
body.page-game .world-domain-sidebar {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, auto));
  gap: 18px;
  align-content: start;
}
body.page-game .buildbar-shell {
  margin-top: 16px;
}
@media (max-width: 1180px) {
  body.page-game .page-shell { padding: 14px 14px 0; }
  body.page-game .world-domain-layout { grid-template-columns: 1fr; }
  body.page-game .world-domain-sidebar { grid-template-rows: none; }
}

@keyframes lf-smoke-rise {
  0% { transform: translateY(0) scale(.92); opacity: 0; }
  20% { opacity: .18; }
  55% { opacity: .34; }
  100% { transform: translateY(-20px) scale(1.14); opacity: 0; }
}
@keyframes lf-banner-wave {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(3deg) translateY(-1px); }
  50% { transform: rotate(-2deg) translateY(1px); }
  75% { transform: rotate(2deg) translateY(0); }
}
@keyframes lf-marker-breath {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.035); }
}
@keyframes lf-ring-pulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(0,0,0,.28); }
  50% { box-shadow: 0 10px 22px rgba(0,0,0,.34), 0 0 0 4px rgba(201,168,96,.05); }
}
.world-slot.slot-built .world-slot-crest,
.world-slot.slot-queued .world-slot-crest {
  animation: lf-marker-breath 5.8s ease-in-out infinite;
}
.world-slot.slot-actionable .world-slot-ground,
.world-slot.slot-queued .world-slot-ground {
  animation: lf-ring-pulse 4.6s ease-in-out infinite;
}
.world-slot .env-smoke {
  transform-origin: center bottom;
}
.world-slot.slot-built .env-smoke,
.world-slot.slot-queued .env-smoke {
  animation: lf-smoke-rise 4.2s ease-in-out infinite;
}
.world-slot .env-smoke-b {
  animation-delay: 1.4s !important;
}
.world-slot .env-banner,
.world-slot.slot-built .env-banner,
.world-slot.slot-queued .env-banner {
  transform-origin: top center;
  animation: lf-banner-wave 3.1s ease-in-out infinite;
}
.world-slot .env-banner-right {
  animation-delay: .35s;
}
.world-slot:hover .world-slot-crest {
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.28));
}
.world-slot:hover .world-slot-ground {
  transform: translateX(-50%) scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
  .world-slot.slot-built .world-slot-crest,
  .world-slot.slot-queued .world-slot-crest,
  .world-slot.slot-actionable .world-slot-ground,
  .world-slot.slot-queued .world-slot-ground,
  .world-slot .env-smoke,
  .world-slot .env-banner {
    animation: none !important;
  }
}


/* Game command rail + full buildbar polish */
body.page-game .world-domain-layout {
  align-items: stretch;
}
body.page-game .game-command-rail {
  height: 100%;
  grid-auto-rows: minmax(0, auto);
}
body.page-game .command-panel {
  position: relative;
  border-radius: 24px;
  padding: 18px 18px 16px;
  background:
    linear-gradient(180deg, rgba(44,31,21,.96), rgba(20,15,11,.98)),
    radial-gradient(circle at top right, rgba(201,168,96,.10), transparent 46%);
  box-shadow: inset 0 0 0 1px rgba(201,168,96,.10), 0 16px 34px rgba(0,0,0,.22);
}
body.page-game .command-panel::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(201,168,96,.08);
  pointer-events: none;
}
body.page-game .command-panel-primary {
  background:
    linear-gradient(180deg, rgba(49,34,22,.97), rgba(21,16,12,.98)),
    radial-gradient(circle at top right, rgba(201,168,96,.14), transparent 42%);
}
body.page-game .command-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
body.page-game .command-panel-head h2 { margin: 0; }
body.page-game .game-command-rail > .panel > * { position: relative; z-index: 1; }
body.page-game .game-buildbar-full {
  margin-top: 18px;
  border-radius: 28px 28px 0 0;
  padding: 20px 22px 22px;
  background:
    linear-gradient(180deg, rgba(48,34,22,.97), rgba(20,15,11,.98)),
    radial-gradient(circle at center top, rgba(201,168,96,.12), transparent 50%);
  box-shadow: inset 0 1px 0 rgba(255,230,170,.05), 0 -10px 26px rgba(0,0,0,.25);
}
body.page-game .buildbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
body.page-game .buildbar-head h2 { margin: 2px 0 0; }
body.page-game .buildbar-status-cluster {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.page-game .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,96,.18);
  background: rgba(14,11,9,.55);
  color: var(--parchment);
  font-size: .8rem;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
body.page-game .buildbar-tabs {
  padding: 10px;
  border-radius: 18px;
  background: rgba(13,10,8,.48);
  border: 1px solid rgba(201,168,96,.08);
}
body.page-game .buildbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr);
  gap: 16px;
  align-items: stretch;
}
body.page-game .buildbar-hint-row {
  min-height: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17,13,10,.58), rgba(10,8,6,.68));
  border: 1px solid rgba(201,168,96,.08);
}
body.page-game .buildbar-quick-panels {
  display: grid;
  gap: 12px;
}
body.page-game .buildbar-quick-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18,14,10,.68), rgba(10,8,6,.78));
  border: 1px solid rgba(201,168,96,.08);
  color: var(--muted);
}
body.page-game .buildbar-quick-card strong { color: var(--parchment); }
body.page-game .compact-resource-grid { gap: 10px; }
body.page-game .compact-resource-card {
  background: rgba(11,9,7,.54);
  border: 1px solid rgba(201,168,96,.08);
}
body.page-game .world-zone-card,
body.page-game .polished-queue-card {
  background: rgba(11,9,7,.48);
  border: 1px solid rgba(201,168,96,.08);
}
@media (max-width: 1320px) {
  body.page-game .world-domain-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  body.page-game .buildbar-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  body.page-game .buildbar-head { flex-direction: column; }
  body.page-game .buildbar-status-cluster { justify-content: flex-start; }
}


/* /game topbar fullscreen command deck */
body.page-game .topbar.game-topbar-shell {
  position: sticky;
  top: 0;
  z-index: 45;
  padding: 0;
  background: linear-gradient(180deg, rgba(11, 8, 6, .97), rgba(18, 13, 9, .95));
  border-bottom: 1px solid rgba(191, 149, 79, .34);
  box-shadow: 0 16px 38px rgba(0,0,0,.34);
}
body.page-game .game-topbar-frame {
  width: 100%;
  padding: 14px 18px 12px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(38, 28, 18, .22), rgba(0,0,0,0)),
    linear-gradient(90deg, rgba(173, 127, 56, .05), rgba(0,0,0,0) 22%, rgba(173,127,56,.04) 78%, rgba(0,0,0,0));
}
body.page-game .game-topbar-main {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) minmax(230px, 300px);
  gap: 18px;
  align-items: center;
}
body.page-game .game-brand-lockup {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(191,149,79,.22);
  background: linear-gradient(180deg, rgba(43,31,20,.72), rgba(25,18,12,.74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
body.page-game .game-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
}
body.page-game .game-topbar-center {
  display: grid;
  gap: 10px;
  min-width: 0;
}
body.page-game .game-topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
body.page-game .game-topnav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(191,149,79,.16);
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
body.page-game .game-topnav a:hover {
  border-color: rgba(191,149,79,.32);
  background: rgba(255,255,255,.05);
}
body.page-game .game-topnav a.is-active,
body.page-game .game-topnav-primary a[href="/game"] {
  color: #21160a;
  border-color: rgba(255,230,176,.18);
  background: linear-gradient(180deg, rgba(240, 201, 120, .96), rgba(181, 129, 55, .94));
}
body.page-game .game-topnav-secondary a {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
}
body.page-game .game-topbar-user {
  justify-content: flex-end;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(191,149,79,.18);
  background: linear-gradient(180deg, rgba(39,28,19,.74), rgba(21,15,11,.74));
}
body.page-game .game-user-badge {
  text-align: right;
  gap: 3px;
}
body.page-game .game-user-badge small {
  color: var(--muted);
}
body.page-game .game-topbar-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
body.page-game .game-deck-pill {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(191,149,79,.16);
  background: linear-gradient(180deg, rgba(34,25,17,.74), rgba(20,15,10,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
body.page-game .game-deck-pill strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
}
body.page-game .game-deck-pill-accent {
  background: linear-gradient(180deg, rgba(67,46,18,.82), rgba(28,19,11,.82));
  border-color: rgba(214,170,92,.26);
}
body.page-game .page-shell {
  padding-top: 12px;
}
@media (max-width: 1260px) {
  body.page-game .game-topbar-main {
    grid-template-columns: 1fr;
  }
  body.page-game .game-topbar-user {
    justify-content: space-between;
  }
}
@media (max-width: 860px) {
  body.page-game .game-topbar-frame {
    padding: 12px 12px 10px;
  }
  body.page-game .game-topbar-deck {
    grid-template-columns: 1fr;
  }
  body.page-game .game-topbar-user {
    flex-wrap: wrap;
  }
  body.page-game .game-user-badge {
    text-align: left;
  }
}
