:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf2f7;
  background: #0b111d;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #0b111d;
  --surface: #131d2d;
  --surface-2: #1a2638;
  --surface-3: #243249;
  --text: #edf2f7;
  --muted: #9eabc0;
  --accent: #d8aa58;
  --accent-2: #df6c80;
  --border: rgba(255,255,255,.1);
  --danger: #da5f67;
}
* { box-sizing: border-box; }
html, body, #root { min-height: 100%; margin: 0; }
body { min-width: 320px; background: radial-gradient(circle at 50% 0%, #1a2941 0, var(--bg) 38rem); }
button, select { font: inherit; }
button { min-height: 44px; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 13px; }
.primary-button, .menu-actions button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; border: 1px solid var(--border); border-radius: 14px; padding: .8rem 1rem; color: var(--text); background: var(--surface-2); font-weight: 800; }
.primary-button { background: linear-gradient(135deg, #a97038, #d3a257); color: #10151d; border: 0; }
.primary-button.full { width: 100%; }
.primary-button.small { min-height: 40px; padding: .55rem .8rem; }
.danger-button { background: rgba(218,95,103,.12); color: #ff969d; }
.menu-screen { min-height: 100dvh; max-width: 560px; margin: 0 auto; padding: max(2rem, env(safe-area-inset-top)) 1.25rem 1.25rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand-mark { width: 104px; height: 104px; position: relative; margin: 1.5rem 0 1.25rem; }
.brand-mark span { position: absolute; inset: 10px; border: 2px solid rgba(216,170,88,.8); border-radius: 50%; }
.brand-mark span:nth-child(2) { inset: 25px; border-color: rgba(223,108,128,.75); }
.brand-mark i { position: absolute; width: 18px; height: 18px; left: 43px; top: 43px; border-radius: 50%; background: #f4d48f; box-shadow: 0 0 24px #e0ac5e; }
.menu-screen h1 { font-family: Georgia, serif; font-size: clamp(2.35rem, 10vw, 4.2rem); line-height: .92; margin: .6rem 0 1rem; letter-spacing: -.04em; }
.menu-screen h1 span { color: var(--accent); }
.tagline { color: #c7d0de; font-size: 1.05rem; max-width: 430px; }
.disclaimer { margin: 1rem 0 1.4rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 14px; color: var(--muted); font-size: .82rem; line-height: 1.5; background: rgba(19,29,45,.72); }
.menu-actions { width: 100%; display: grid; gap: .65rem; }
.menu-actions button { width: 100%; }
.menu-screen footer { margin-top: auto; padding-top: 2rem; color: var(--muted); font-size: .75rem; }
.form-screen { min-height: 100dvh; max-width: 780px; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1rem 2rem; }
.screen-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.screen-header h1 { margin: .15rem 0 0; font-size: clamp(1.55rem, 6vw, 2.4rem); }
.form-card, .empty-card { background: rgba(19,29,45,.92); border: 1px solid var(--border); border-radius: 20px; padding: 1rem; box-shadow: 0 18px 60px rgba(0,0,0,.24); }
.form-card label { display: grid; gap: .45rem; margin-bottom: 1rem; font-weight: 750; }
.form-card select { width: 100%; min-height: 48px; padding: 0 .8rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.form-card small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.info-callout { display: flex; gap: .8rem; align-items: flex-start; margin: .5rem 0 1rem; padding: .9rem; border-radius: 13px; background: rgba(216,170,88,.08); color: #decba8; }
.info-callout p { margin: 0; line-height: 1.45; }
.prose { line-height: 1.65; }
.save-list { display: grid; gap: .75rem; }
.save-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem; }
.save-card h2 { margin: 0 0 .35rem; font-size: 1rem; }
.save-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.save-card > div:last-child { display: flex; gap: .5rem; }
.game-screen { min-height: 100dvh; padding-bottom: 78px; }
.game-topbar { height: 66px; display: grid; grid-template-columns: 44px auto 1fr 44px; gap: .65rem; align-items: center; padding: max(.55rem, env(safe-area-inset-top)) .75rem .55rem; background: rgba(11,17,29,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.turn-badge { display: grid; line-height: 1; }
.turn-badge span, .turn-badge small { color: var(--muted); font-size: .62rem; }
.turn-badge strong { color: var(--accent); font-size: 1.1rem; }
.religion-title { min-width: 0; display: grid; }
.religion-title span { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.religion-title small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-bar { display: flex; overflow-x: auto; gap: .45rem; padding: .65rem .75rem; scrollbar-width: none; border-bottom: 1px solid var(--border); background: #0e1726; }
.resource-chip { flex: 0 0 auto; display: flex; align-items: center; gap: .35rem; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .45rem .6rem; font-size: .76rem; }
.resource-chip svg { color: var(--accent); }
.resource-chip .resource-label { color: var(--muted); }
.layer-tabs { display: flex; gap: .5rem; padding: .65rem .75rem 0; overflow-x: auto; }
.layer-tabs button { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); padding: .45rem .75rem; }
.layer-tabs button.active { color: #121822; background: var(--accent); border-color: transparent; font-weight: 850; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: .75rem; padding: .75rem; }
.map-shell { position: relative; min-height: 520px; overflow: hidden; background: #111b2b; border: 1px solid var(--border); border-radius: 18px; }
.map-toolbar { position: absolute; z-index: 5; top: .65rem; left: .65rem; right: .65rem; display: flex; align-items: center; gap: .4rem; pointer-events: none; }
.map-toolbar button { width: 40px; min-height: 40px; border: 1px solid var(--border); border-radius: 11px; background: rgba(11,17,29,.88); color: var(--text); pointer-events: auto; }
.map-toolbar span { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: #c1cad8; background: rgba(11,17,29,.74); border: 1px solid var(--border); border-radius: 999px; padding: .45rem .7rem; font-size: .72rem; }
.world-map { width: 100%; height: 100%; min-height: 520px; display: block; touch-action: none; user-select: none; }
.ocean { fill: #101b2d; }
.country { stroke: rgba(255,255,255,.25); stroke-width: .35; vector-effect: non-scaling-stroke; transition: filter .15s, opacity .15s; }
.country:hover { filter: brightness(1.25); }
.country.selected { stroke: #ffe3a7; stroke-width: 2; filter: brightness(1.25) drop-shadow(0 0 4px rgba(255,218,140,.8)); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1rem; }
.region-panel header { display: flex; justify-content: space-between; align-items: flex-start; }
.region-panel h2 { margin: .25rem 0 0; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin: 1rem 0; }
.stat-grid div { display: grid; gap: .25rem; padding: .7rem; background: var(--surface-2); border-radius: 12px; }
.stat-grid span, .meter-row span { color: var(--muted); font-size: .72rem; }
.stat-grid strong { font-size: .9rem; }
.meter-row { display: grid; grid-template-columns: 78px 1fr 28px; gap: .5rem; align-items: center; margin: .65rem 0; }
.meter-row progress { width: 100%; accent-color: var(--accent); }
.meter-row b { font-size: .75rem; text-align: right; }
.change-box { margin: 1rem 0; padding: .8rem; border-radius: 12px; background: rgba(216,170,88,.08); border: 1px solid rgba(216,170,88,.18); }
.change-box p { margin: .35rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.action-list { display: grid; gap: .55rem; }
.action-list button { display: flex; align-items: center; gap: .65rem; text-align: left; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 12px; padding: .7rem; }
.action-list button svg { color: var(--accent); flex: 0 0 auto; }
.action-list button span { display: grid; }
.action-list small { color: var(--muted); margin-top: .15rem; }
.bottom-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: 70px; display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr; background: rgba(11,17,29,.96); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(16px); }
.bottom-nav button { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; align-content: center; gap: .2rem; font-size: .68rem; }
.bottom-nav button svg { width: 20px; }
.bottom-nav button.active { color: var(--accent); }
.bottom-nav .turn-button { margin: .45rem; min-height: 50px; border-radius: 14px; color: #121822; background: linear-gradient(135deg, #bd8747, #e1b96c); font-weight: 900; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.2); border-top-color: #111; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-backdrop { position: fixed; z-index: 60; inset: 0; background: rgba(0,0,0,.66); display: grid; place-items: end center; padding: 1rem; }
.modal { width: min(680px, 100%); max-height: 88dvh; overflow: auto; background: #131d2d; border: 1px solid var(--border); border-radius: 22px; padding: 1rem; box-shadow: 0 24px 90px #000; }
.modal header { display: flex; justify-content: space-between; align-items: start; }
.modal h2 { margin: .25rem 0 0; }
.report-total { display: flex; gap: .8rem; align-items: center; margin: 1rem 0; padding: 1rem; border-radius: 14px; background: var(--surface-2); }
.report-total div { display: grid; }
.report-total span { color: var(--muted); }
.report-total strong { font-size: 1.5rem; color: var(--accent); }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.report-columns > div { background: var(--surface-2); border-radius: 14px; padding: .8rem; }
.report-columns h3 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .9rem; }
.report-columns p { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .8rem; }
.report-columns b { color: var(--text); }
.event-card { margin: .8rem 0; padding: .9rem; background: rgba(216,170,88,.08); border-radius: 14px; }
.event-card p { margin: .35rem 0 0; color: var(--muted); }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: calc(100% - 2rem); min-height: 44px; border: 1px solid var(--border); border-radius: 999px; background: #27354b; color: var(--text); padding: .65rem 1rem; box-shadow: 0 8px 28px #000; }
.update-banner { position: fixed; z-index: 90; top: .75rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); border-radius: 13px; padding: .7rem; background: #243249; }
.update-banner button { border: 0; border-radius: 9px; background: var(--accent); font-weight: 800; padding: 0 .7rem; }
@media (max-width: 860px) {
  .game-layout { grid-template-columns: 1fr; }
  .map-shell, .world-map { min-height: 52dvh; }
  .panel { margin-bottom: .75rem; }
}
@media (max-width: 520px) {
  .resource-label { display: none; }
  .game-topbar { grid-template-columns: 42px auto minmax(0,1fr) 42px; }
  .map-toolbar span { display: none; }
  .report-columns { grid-template-columns: 1fr; }
  .save-card { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.settings-card fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.settings-card legend { font-weight: 850; margin-bottom: .6rem; }
.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.segmented-control button { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.segmented-control button.active { background: var(--accent); color: #111824; border-color: transparent; font-weight: 850; }
.toggle-row { grid-template-columns: 1fr auto !important; align-items: center; gap: 1rem !important; padding: .85rem 0; border-top: 1px solid var(--border); }
.toggle-row > span { display: grid; grid-template-columns: 24px 1fr; column-gap: .45rem; align-items: center; }
.toggle-row small { grid-column: 2; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin: 1rem 0; }
.summary-grid article { display: grid; gap: .3rem; padding: .85rem; background: var(--surface-2); border-radius: 14px; }
.summary-grid article svg { color: var(--accent); }
.summary-grid article span { color: var(--muted); font-size: .76rem; }
.summary-grid article strong { font-size: 1.05rem; }
.founder-stats, .management-list { display: grid; gap: .45rem; }
.founder-stats div, .management-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; background: var(--surface-2); border-radius: 10px; }
.founder-stats span, .management-list span { color: var(--muted); }
.muted-copy { color: var(--muted); line-height: 1.5; font-size: .82rem; }
html[data-theme='light'] {
  --bg: #edf1f6;
  --surface: #ffffff;
  --surface-2: #e8edf4;
  --surface-3: #d9e0ea;
  --text: #172033;
  --muted: #5f6d82;
  --border: rgba(23,32,51,.16);
  color: var(--text);
  background: var(--bg);
}
html[data-theme='light'] body { background: radial-gradient(circle at 50% 0%, #ffffff 0, var(--bg) 38rem); }
html[data-theme='light'] .game-topbar,
html[data-theme='light'] .bottom-nav { background: rgba(244,247,251,.94); }
html[data-theme='light'] .resource-bar { background: #e5ebf3; }
html[data-theme='light'] .map-shell { background: #cbd8e9; }
html[data-theme='light'] .ocean { fill: #b8cce4; }
html[data-font='large'] { font-size: 112%; }
html[data-motion='reduced'] *, html[data-motion='reduced'] *::before, html[data-motion='reduced'] *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
html[data-contrast='high'] { --border: rgba(255,255,255,.3); }
html[data-theme='light'][data-contrast='high'] { --border: rgba(0,0,0,.35); }
@media (max-width: 520px) { .bottom-nav { grid-template-columns: repeat(4, 1fr) 1.35fr; } .segmented-control { grid-template-columns: 1fr; } }

/* v0.2 — Din oluşturma, doktrin, ritüel ve ibadet yeri arayüzleri */
input, textarea { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
input[type='number'], input[type='text'], .rename-editor input { width: 100%; min-height: 48px; padding: 0 .8rem; }
input[type='range'] { width: 100%; accent-color: var(--accent); }
.secondary-button, .danger-solid { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; border-radius: 12px; padding: .65rem .85rem; font-weight: 800; }
.secondary-button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.secondary-button.full { width: 100%; }
.secondary-button.compact { min-height: 40px; padding: .45rem .65rem; }
.danger-solid { border: 0; background: var(--danger); color: #fff; }
.icon-button.subtle { width: 38px; height: 38px; min-height: 38px; border-radius: 11px; background: transparent; }
.form-row.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.form-card input[type='number'] { width: 100%; }
.founder-builder { margin: .35rem 0 1rem; padding: 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.section-heading-row h2, .section-heading-row h3 { margin: .2rem 0 0; }
.point-budget { margin: .75rem 0; padding: .65rem .75rem; color: #f2c37c; background: rgba(216,170,88,.09); border-radius: 10px; }
.point-budget.complete { color: #8ee1b1; background: rgba(77,190,125,.1); }
.allocation-list { display: grid; gap: .6rem; }
.form-card .allocation-row { display: grid; grid-template-columns: 105px 1fr 32px; align-items: center; gap: .6rem; margin: 0; font-size: .82rem; }
.allocation-row b { text-align: right; color: var(--accent); }
.loading-screen { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: .8rem; color: var(--muted); }
.loading-screen .spinner { width: 30px; height: 30px; border-color: var(--border); border-top-color: var(--accent); }
.bottom-nav { grid-template-columns: repeat(4, 1fr) 1.35fr; }
.nav-with-badge { position: relative; }
.nav-with-badge i { position: absolute; top: 5px; right: calc(50% - 22px); min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 999px; background: var(--accent-2); color: #fff; font-style: normal; font-size: .62rem; font-weight: 900; }
.modal { background: var(--surface); }
.religion-modal, .management-modal { width: min(760px, 100%); }
.modal-tabs { display: flex; gap: .35rem; margin: .9rem -0.2rem 1rem; padding: .2rem; overflow-x: auto; scrollbar-width: none; }
.modal-tabs button { flex: 0 0 auto; min-height: 38px; padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.modal-tabs button.active { background: var(--accent); color: #121822; border-color: transparent; font-weight: 900; }
.identity-hero { display: flex; align-items: center; gap: .85rem; margin: .9rem 0; padding: 1rem; border-radius: 16px; background: linear-gradient(135deg, rgba(216,170,88,.12), rgba(223,108,128,.08)); border: 1px solid rgba(216,170,88,.2); }
.identity-hero > svg { color: var(--accent); flex: 0 0 auto; }
.identity-hero div { display: grid; gap: .2rem; min-width: 0; }
.identity-hero small, .identity-hero p { color: var(--muted); }
.identity-hero strong { font-size: 1.08rem; }
.identity-hero p { margin: 0; font-size: .78rem; }
.symbol-orb { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(216,170,88,.45); border-radius: 50%; color: var(--accent); font-size: 2rem; }
.doctrine-budget { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center; margin: .8rem 0; padding: .8rem; border-radius: 14px; background: var(--surface-2); }
.doctrine-budget strong { grid-row: span 2; color: var(--accent); font-size: 2rem; }
.doctrine-budget span { font-weight: 850; }
.doctrine-budget small { color: var(--muted); }
.warning-callout { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .75rem; padding: .8rem; border: 1px solid rgba(218,95,103,.28); border-radius: 13px; background: rgba(218,95,103,.08); color: #efb4b8; }
.warning-callout svg { flex: 0 0 auto; }
.warning-callout p { margin: 0; line-height: 1.45; font-size: .82rem; }
.identity-list { display: grid; gap: .55rem; }
.identity-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .7rem; padding: .75rem; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.identity-row > div:first-child { display: grid; gap: .2rem; }
.identity-row small { color: var(--muted); }
.locked-label { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.rename-editor { grid-column: 1 / -1; margin-top: .2rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.rename-editor label { display: grid; gap: .4rem; font-size: .8rem; color: var(--muted); }
.inline-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: .75rem; }
.permanent-confirmation { margin-top: .7rem; padding: .8rem; border-radius: 12px; background: rgba(218,95,103,.1); border: 1px solid rgba(218,95,103,.28); }
.permanent-confirmation p { color: var(--muted); line-height: 1.45; font-size: .8rem; }
.doctrine-section { padding-bottom: 5rem; }
.doctrine-category { margin: 1rem 0; }
.doctrine-category > header { align-items: center; margin-bottom: .55rem; }
.doctrine-category h3 { margin: 0; font-size: 1rem; }
.doctrine-options { display: grid; gap: .55rem; }
.doctrine-option { display: grid; gap: .4rem; padding: .85rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.doctrine-option.selected { border-color: rgba(216,170,88,.42); background: rgba(216,170,88,.08); }
.doctrine-option p { margin: 0; color: var(--muted); line-height: 1.45; font-size: .8rem; }
.doctrine-option small { color: var(--muted); line-height: 1.35; }
.sticky-confirmation { position: sticky; bottom: 0; z-index: 4; padding: .9rem; border: 1px solid rgba(216,170,88,.35); border-radius: 15px; background: var(--surface-3); box-shadow: 0 -12px 36px rgba(0,0,0,.35); }
.sticky-confirmation p { margin: .35rem 0; color: var(--muted); font-size: .82rem; }
.ritual-list { display: grid; gap: .75rem; }
.ritual-card { padding: .85rem; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); }
.ritual-card > header { display: flex; gap: .75rem; align-items: flex-start; }
.ritual-card header div { display: grid; gap: .2rem; }
.ritual-card header small { color: var(--muted); }
.participation-badge { margin-left: auto; padding: .35rem .5rem; border-radius: 999px; background: rgba(216,170,88,.12); color: var(--accent); font-size: .7rem; font-weight: 850; white-space: nowrap; }
.ritual-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: .75rem 0; }
.ritual-controls label { display: grid; gap: .3rem; color: var(--muted); font-size: .72rem; }
.ritual-controls select { min-height: 44px; padding: 0 .5rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.management-section { margin: 1rem 0 1.25rem; }
.maintenance-badge { padding: .35rem .55rem; border-radius: 999px; background: rgba(216,170,88,.1); color: var(--accent); font-size: .72rem; font-weight: 850; white-space: nowrap; }
.place-type-list { display: grid; gap: .55rem; margin: .75rem 0; }
.place-type-card { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: .55rem .75rem; text-align: left; padding: .8rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); }
.place-type-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(216,170,88,.3); }
.place-type-card > div:first-child { display: grid; gap: .25rem; }
.place-type-card small { color: var(--muted); line-height: 1.35; }
.place-type-card > b { color: var(--accent); font-size: .75rem; }
.place-metrics { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem; }
.place-metrics span { padding: .3rem .45rem; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: .68rem; }
.management-list span small { color: var(--muted); }
.compact-grid { margin-bottom: 0; }
.regional-place-summary { display: flex; align-items: center; gap: .65rem; margin: .75rem 0; padding: .7rem; border-radius: 12px; background: rgba(216,170,88,.08); }
.regional-place-summary svg { color: var(--accent); }
.regional-place-summary div { display: grid; gap: .15rem; }
.regional-place-summary small { color: var(--muted); }
.action-list .build-action { border-color: rgba(216,170,88,.3); background: rgba(216,170,88,.07); }
.founder-event strong, .doctrine-event strong { display: inline-flex; align-items: center; gap: .35rem; }
.founder-event { background: rgba(223,108,128,.08); }
.doctrine-event { background: rgba(90,145,220,.1); }
.maintenance-line { display: flex; align-items: center; gap: .5rem; margin: .75rem 0; padding: .7rem .8rem; border-radius: 11px; background: var(--surface-2); color: var(--muted); }
.maintenance-line b { margin-left: auto; color: var(--text); }
html[data-theme='light'] .form-card, html[data-theme='light'] .empty-card { background: rgba(255,255,255,.95); }
html[data-theme='light'] .modal { background: var(--surface); }

@media (min-width: 680px) {
  .doctrine-options { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .form-row.two-columns, .ritual-controls { grid-template-columns: 1fr; }
  .section-heading-row { align-items: flex-start; }
  .form-card .allocation-row { grid-template-columns: 92px 1fr 30px; }
  .inline-actions { flex-direction: column-reverse; }
  .inline-actions button { width: 100%; }
  .place-type-card { grid-template-columns: 1fr; }
  .place-type-card > b { grid-column: 1; }
}

/* v0.2.1 — Android harita etkileşimi ve mobil performans düzeltmeleri */
.map-shell {
  contain: layout paint;
  isolation: isolate;
}
.world-map {
  overscroll-behavior: contain;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.map-transform-layer {
  will-change: transform;
}
.country {
  cursor: pointer;
}
@media (pointer: coarse) {
  .country:hover { filter: none; }
}

/* v0.3 — Demografi, nüfuz katmanları ve özgün vektör görsel paketi */
.world-influence-hero { width: min(520px, 104vw); height: 205px; margin: -1.1rem 0 -4.2rem; pointer-events: none; opacity: .94; }
.world-influence-hero svg { width: 100%; height: 100%; display: block; }
.menu-screen > .world-influence-hero + .brand-mark { transform: scale(.72); margin-top: 0; margin-bottom: .2rem; }
.map-legend { position: absolute; z-index: 5; left: .65rem; right: .65rem; bottom: .65rem; display: flex; flex-wrap: wrap; gap: .3rem .55rem; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 11px; background: rgba(11,17,29,.82); backdrop-filter: blur(8px); pointer-events: none; }
.map-legend span { display: inline-flex; align-items: center; gap: .3rem; color: #d6deea; font-size: .62rem; }
.map-legend i { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 3px; border: 1px solid rgba(255,255,255,.28); }
.influence-emblem { width: 58px; min-height: 58px; display: grid; grid-template-columns: auto auto; align-content: center; justify-content: center; gap: 0 .25rem; border-radius: 50%; background: radial-gradient(circle, rgba(216,170,88,.16), rgba(216,170,88,.04)); border: 1px solid rgba(216,170,88,.28); }
.influence-emblem svg { color: var(--accent); }
.influence-emblem b { color: var(--accent); }
.influence-emblem small { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .55rem; }
.region-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin: .85rem 0; padding: .25rem; border-radius: 12px; background: var(--surface-2); }
.region-tabs button { min-height: 36px; padding: .3rem .2rem; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .68rem; }
.region-tabs button.active { background: var(--surface-3); color: var(--text); font-weight: 850; }
.change-box strong { display: inline-flex; align-items: center; gap: .4rem; }
.change-box.negative { background: rgba(218,95,103,.08); border-color: rgba(218,95,103,.2); }
.religion-distribution-list { display: grid; gap: .55rem; }
.religion-distribution-list > div { display: grid; grid-template-columns: minmax(105px, 1fr) 1fr 52px; gap: .55rem; align-items: center; padding: .55rem .6rem; border-radius: 11px; background: var(--surface-2); }
.religion-distribution-list span { display: grid; min-width: 0; }
.religion-distribution-list span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.religion-distribution-list small { color: var(--muted); font-size: .66rem; }
.religion-distribution-list progress { width: 100%; accent-color: #738cc4; }
.religion-distribution-list > div > strong { text-align: right; font-size: .72rem; }
.religion-distribution-list .player-religion-row { border: 1px solid rgba(216,170,88,.25); background: rgba(216,170,88,.08); }
.religion-distribution-list .player-religion-row progress { accent-color: var(--accent-2); }
.demography-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.demography-grid article { display: grid; gap: .2rem; padding: .75rem; border-radius: 12px; background: var(--surface-2); }
.demography-grid article span, .demography-grid article small { color: var(--muted); font-size: .68rem; }
.demography-grid article strong { color: var(--text); }
.demography-equation { display: grid; gap: .25rem; margin: .75rem 0; padding: .8rem; border-radius: 12px; border: 1px solid rgba(216,170,88,.2); background: rgba(216,170,88,.07); }
.demography-equation span, .demography-equation small { color: var(--muted); }
.demography-equation b { color: var(--accent); font-size: 1.2rem; }
.demography-equation small { line-height: 1.4; }
.factor-list { display: grid; gap: .55rem; }
.factor-list > div:not(.rate-summary) { display: grid; grid-template-columns: 110px 1fr 30px; gap: .5rem; align-items: center; }
.factor-list span { color: var(--muted); font-size: .72rem; }
.factor-list progress { width: 100%; accent-color: var(--accent); }
.factor-list b { text-align: right; font-size: .72rem; }
.rate-summary { display: grid; grid-template-columns: 1fr auto; gap: .45rem .7rem; margin-top: .4rem; padding: .75rem; border-radius: 12px; background: var(--surface-2); }
.report-total small { color: var(--muted); }
.report-demography-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; margin-bottom: .75rem; }
.report-demography-grid article { display: grid; grid-template-columns: auto 1fr; gap: .1rem .55rem; align-items: center; padding: .75rem; border-radius: 12px; background: var(--surface-2); }
.report-demography-grid svg { grid-row: span 3; color: var(--accent); }
.report-demography-grid span, .report-demography-grid small { color: var(--muted); font-size: .67rem; }
.report-demography-grid strong { font-size: .92rem; }
.report-columns p span { display: grid; }
.report-columns p small { color: var(--muted); font-size: .62rem; }
.influence-ranking { margin: .75rem 0; padding: .8rem; border-radius: 14px; background: var(--surface-2); }
.influence-ranking h3 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .65rem; font-size: .9rem; }
.influence-ranking > div { display: grid; grid-template-columns: minmax(90px, 1fr) 1fr 28px; gap: .5rem; align-items: center; margin: .45rem 0; }
.influence-ranking span { color: var(--muted); font-size: .72rem; }
.influence-ranking progress { width: 100%; accent-color: var(--accent-2); }
.influence-ranking b { text-align: right; font-size: .72rem; }
.founder-portrait { margin: 0; display: grid; gap: .55rem; }
.founder-portrait svg { width: min(240px, 100%); height: auto; display: block; border-radius: 24px; box-shadow: 0 18px 45px rgba(0,0,0,.28); }
.founder-portrait figcaption { display: grid; }
.founder-portrait figcaption small { color: var(--muted); }
.founder-portrait.compact { width: 58px; height: 68px; flex: 0 0 auto; overflow: hidden; border-radius: 13px; }
.founder-portrait.compact svg { width: 58px; height: 68px; object-fit: cover; border-radius: 13px; box-shadow: none; }
.visual-identity-hero { align-items: center; }
.founder-profile { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 1rem; align-items: center; margin: .7rem 0 1rem; padding: 1rem; border-radius: 18px; background: linear-gradient(135deg, rgba(216,170,88,.1), rgba(223,108,128,.07)); border: 1px solid rgba(216,170,88,.2); }
.founder-profile-copy { display: grid; gap: .35rem; }
.founder-profile-copy svg { color: var(--accent); }
.founder-profile-copy small, .founder-profile-copy p { color: var(--muted); }
.founder-profile-copy strong { font-size: 1.35rem; }
.place-illustration { grid-column: 1 / -1; width: 100%; height: 104px; display: block; border-radius: 12px; }
.place-type-card > div:nth-of-type(1) { display: grid; gap: .25rem; }
html[data-theme='light'] .map-legend { background: rgba(244,247,251,.88); }
html[data-theme='light'] .map-legend span { color: #263348; }

@media (max-width: 620px) {
  .world-influence-hero { height: 165px; margin-top: -.6rem; margin-bottom: -3.2rem; }
  .map-legend { right: .45rem; left: .45rem; bottom: .45rem; max-height: 56px; overflow: hidden; }
  .map-legend span { font-size: .57rem; }
  .demography-grid, .report-demography-grid { grid-template-columns: 1fr 1fr; }
  .founder-profile { grid-template-columns: 116px 1fr; padding: .75rem; }
  .founder-profile .founder-portrait svg { width: 116px; }
  .religion-distribution-list > div { grid-template-columns: minmax(92px, 1fr) .8fr 48px; }
}
@media (max-width: 410px) {
  .region-tabs button { font-size: .62rem; }
  .demography-grid, .report-demography-grid { grid-template-columns: 1fr; }
  .founder-profile { grid-template-columns: 1fr; }
  .founder-profile .founder-portrait svg { width: min(190px, 100%); margin: 0 auto; }
}

/* v0.4 — Devlet yapay zekâsı, din politikaları ve diplomasi */
.state-policy-button { width: 100%; display: flex; align-items: center; gap: .7rem; margin: .75rem 0; padding: .75rem .8rem; border: 1px solid rgba(101,145,194,.3); border-radius: 13px; background: linear-gradient(135deg, rgba(71,122,176,.13), rgba(117,89,170,.08)); color: var(--text); text-align: left; }
.state-policy-button > svg { flex: 0 0 auto; color: #82aee0; }
.state-policy-button span { min-width: 0; display: grid; gap: .12rem; }
.state-policy-button small, .state-policy-button em { color: var(--muted); font-style: normal; font-size: .68rem; }
.state-policy-button b { font-size: .9rem; }
.diplomacy-modal { width: min(780px, 100%); }
.diplomacy-modal header small { color: var(--muted); }
.policy-hero { display: flex; align-items: center; gap: .85rem; margin: .65rem 0 .9rem; padding: .9rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.policy-hero > svg { flex: 0 0 auto; }
.policy-hero div { min-width: 0; display: grid; gap: .15rem; }
.policy-hero span, .policy-hero small { color: var(--muted); }
.policy-hero strong { font-size: 1.1rem; }
.policy-banned, .policy-restricted { border-color: rgba(196,70,86,.38); background: rgba(159,48,69,.12); }
.policy-banned > svg, .policy-restricted > svg { color: #e47382; }
.policy-registered, .policy-tolerated { border-color: rgba(164,135,72,.35); background: rgba(138,107,71,.12); }
.policy-registered > svg, .policy-tolerated > svg { color: #d4b172; }
.policy-legal, .policy-recognized { border-color: rgba(63,137,117,.36); background: rgba(63,137,117,.11); }
.policy-legal > svg, .policy-recognized > svg { color: #74c3a9; }
.policy-supported, .policy-official, .policy-influential, .policy-theocratic { border-color: rgba(117,89,170,.4); background: rgba(117,89,170,.12); }
.policy-supported > svg, .policy-official > svg, .policy-influential > svg, .policy-theocratic > svg { color: #b69ae0; }
.state-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-bottom: .85rem; }
.state-facts div { display: grid; gap: .18rem; padding: .7rem; border-radius: 12px; background: var(--surface-2); }
.state-facts span { color: var(--muted); font-size: .7rem; }
.state-facts b { font-size: .82rem; }
.diplomacy-meters { display: grid; gap: .55rem; }
.diplomacy-meters > div { display: grid; grid-template-columns: 112px 1fr 34px; align-items: center; gap: .55rem; font-size: .75rem; }
.diplomacy-meters span { color: var(--muted); }
.diplomacy-meters b { text-align: right; }
.diplomacy-meters progress { width: 100%; accent-color: #6f91bd; }
.diplomacy-meters .good progress { accent-color: #48a67c; }
.diplomacy-meters .bad progress { accent-color: #c45162; }
.permit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .9rem 0; }
.permit-grid article { display: grid; grid-template-columns: auto 1fr; gap: .2rem .5rem; align-items: center; padding: .7rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(159,48,69,.06); }
.permit-grid article svg { grid-row: span 2; color: #b96a77; }
.permit-grid article span { color: var(--muted); font-size: .68rem; }
.permit-grid article b { font-size: .78rem; }
.permit-grid article.granted { background: rgba(63,137,117,.08); }
.permit-grid article.granted svg { color: #62bd9b; }
.state-support-card { display: flex; gap: .7rem; align-items: center; margin: .75rem 0; padding: .8rem; border: 1px solid rgba(183,141,55,.36); border-radius: 13px; background: rgba(183,141,55,.09); }
.state-support-card > svg { color: #d2aa59; flex: 0 0 auto; }
.state-support-card div { display: grid; gap: .2rem; }
.state-support-card small { color: var(--muted); line-height: 1.4; }
.diplomatic-actions { display: grid; gap: .55rem; padding-bottom: 2rem; }
.diplomatic-actions > button { width: 100%; min-height: 76px; display: flex; align-items: flex-start; gap: .75rem; padding: .8rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); text-align: left; }
.diplomatic-actions > button > svg { flex: 0 0 auto; margin-top: .1rem; color: #82aee0; }
.diplomatic-actions > button span { min-width: 0; display: grid; gap: .2rem; }
.diplomatic-actions b { font-size: .88rem; }
.diplomatic-actions small { color: var(--muted); line-height: 1.35; }
.diplomatic-actions em { color: var(--accent); font-style: normal; font-size: .68rem; font-weight: 800; }
.diplomatic-actions i { color: #d88691; font-style: normal; font-size: .65rem; }
.diplomatic-actions > button:disabled { opacity: .48; filter: saturate(.6); }
.diplomatic-history { display: grid; gap: .55rem; }
.diplomatic-history article { display: grid; grid-template-columns: auto 1fr auto; gap: .55rem; align-items: start; padding: .75rem; border-radius: 12px; background: var(--surface-2); }
.diplomatic-history article > span { color: var(--accent); font-size: .68rem; font-weight: 850; white-space: nowrap; }
.diplomatic-history p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.diplomatic-history b { color: #65bc98; font-size: .68rem; white-space: nowrap; }
.diplomatic-history b.negative { color: #d66b78; }
.empty-state { display: grid; place-items: center; gap: .6rem; min-height: 180px; color: var(--muted); text-align: center; }
.state-report-section { margin: .9rem 0; padding: .8rem; border: 1px solid rgba(71,122,176,.25); border-radius: 14px; background: rgba(71,122,176,.07); }
.state-report-section h3 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .55rem; font-size: .9rem; }
.state-report-section article { display: grid; grid-template-columns: minmax(90px, .7fr) 1.3fr; gap: .6rem; padding: .48rem 0; border-top: 1px solid var(--border); }
.state-report-section article:first-of-type { border-top: 0; }
.state-report-section span { font-weight: 800; font-size: .76rem; }
.state-report-section small { color: var(--muted); line-height: 1.35; }
@media (max-width: 520px) {
  .state-facts, .permit-grid { grid-template-columns: 1fr 1fr; }
  .diplomacy-meters > div { grid-template-columns: 92px 1fr 30px; gap: .4rem; font-size: .68rem; }
  .state-report-section article { grid-template-columns: 1fr; gap: .2rem; }
}

/* v0.4.1 — yalnızca yatay, tek ekranlı grand-strategy arayüzü */
html, body, #root { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
body { min-width: 560px; }
button { min-height: 40px; }
.icon-button { width: 40px; height: 40px; min-height: 40px; border-radius: 7px; }
.primary-button, .menu-actions button, .danger-button { border-radius: 7px; padding: .48rem .7rem; }

.orientation-gate {
  position: fixed; z-index: 9999; inset: 0; display: grid; place-items: center; align-content: center; gap: .65rem;
  padding: 2rem; text-align: center; background: radial-gradient(circle at 50% 35%, #233653, #090f19 70%); color: var(--text);
}
.orientation-gate svg { width: 58px; height: 58px; color: var(--accent); animation: orientation-pulse 1.6s ease-in-out infinite; }
.orientation-gate strong { font: 800 clamp(1.25rem, 5vw, 2rem) Georgia, serif; }
.orientation-gate p { margin: 0; color: var(--muted); }
@keyframes orientation-pulse { 50% { transform: rotate(90deg) scale(1.08); } }

/* Ana menü */
.menu-screen.landscape-menu {
  width: 100%; max-width: none; height: 100dvh; min-height: 0; margin: 0; padding: clamp(.7rem, 2vh, 1rem);
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: clamp(.7rem, 1.5vw, 1.2rem);
  align-items: stretch; text-align: left;
}
.menu-identity, .menu-command-panel { min-height: 0; position: relative; overflow: hidden; border: 1px solid var(--border); background: rgba(13,22,36,.86); }
.menu-identity { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(280px, 1.1fr); grid-template-rows: 1fr auto; align-items: center; padding: 1rem; }
.menu-identity .world-influence-hero { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-height: 210px; margin: 0; opacity: .95; }
.menu-identity .brand-mark { position: absolute; left: clamp(1rem, 3vw, 2.5rem); top: 50%; transform: translateY(-50%); width: 86px; height: 86px; margin: 0; }
.menu-identity .brand-mark i { left: 34px; top: 34px; }
.menu-title-block { grid-column: 2; grid-row: 1; z-index: 2; padding: 1rem; }
.menu-screen h1 { font-size: clamp(2rem, 5.3vw, 4.7rem); margin: .35rem 0 .6rem; }
.menu-screen .tagline { font-size: clamp(.83rem, 1.6vw, 1.08rem); margin: 0; }
.menu-identity .disclaimer { grid-column: 1 / -1; grid-row: 2; margin: .5rem 0 0; padding: .55rem .7rem; border-radius: 5px; font-size: .7rem; }
.menu-command-panel { display: grid; grid-template-rows: auto 1fr auto; gap: .55rem; padding: .85rem; }
.menu-command-panel > .eyebrow { align-self: end; }
.menu-actions { display: grid; grid-template-columns: 1fr; gap: .42rem; align-content: center; }
.menu-actions button { width: 100%; min-height: 48px; display: grid; grid-template-columns: 28px 1fr; justify-content: start; text-align: left; }
.menu-actions button svg { width: 20px; }
.menu-actions button span { display: grid; gap: .08rem; }
.menu-actions button small { color: var(--muted); font-size: .65rem; font-weight: 500; }
.menu-command-panel footer { margin: 0; padding: .2rem 0 0; font-size: .65rem; color: var(--muted); }

/* Genel yatay ekranlar */
.form-screen.landscape-form-screen { width: 100%; max-width: none; height: 100dvh; min-height: 0; padding: .55rem; display: grid; grid-template-rows: 42px minmax(0, 1fr); gap: .45rem; overflow: hidden; }
.landscape-form-screen .screen-header { height: 42px; margin: 0; gap: .65rem; }
.landscape-form-screen .screen-header h1 { margin: 0; font-size: 1.15rem; }
.landscape-form-screen .screen-header .eyebrow { font-size: .58rem; }
.landscape-form-screen .form-card, .save-workbench { min-height: 0; height: 100%; overflow: hidden; border-radius: 8px; padding: .65rem; }
.new-game-card { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(330px, 1.15fr); grid-template-rows: minmax(0, 1fr) 42px; gap: .6rem .8rem; }
.new-game-options { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .55rem; align-content: start; min-height: 0; }
.new-game-options label { margin: 0; gap: .2rem; font-size: .7rem; }
.new-game-options label:nth-child(2), .new-game-options .info-callout { grid-column: 1 / -1; }
.new-game-options select, .new-game-options input { min-height: 34px; height: 34px; border-radius: 5px; font-size: .75rem; }
.new-game-options .info-callout { margin: 0; padding: .45rem; font-size: .68rem; }
.new-game-card .founder-builder { min-height: 0; margin: 0; padding: .55rem; border: 1px solid var(--border); background: var(--surface-2); }
.new-game-card .section-heading-row { margin-bottom: .2rem; }
.new-game-card .section-heading-row h2 { margin: .1rem 0; font-size: .95rem; }
.new-game-card .point-budget { margin: .15rem 0 .35rem; padding: .35rem .5rem; font-size: .7rem; }
.new-game-card .allocation-list { gap: .16rem; }
.new-game-card .allocation-row { grid-template-columns: 76px 1fr 28px; min-height: 28px; margin: 0; font-size: .68rem; }
.create-world-button { grid-column: 1 / -1; min-height: 42px; }
.save-workbench { display: grid; grid-template-rows: 1fr auto; gap: .4rem; border: 1px solid var(--border); background: var(--surface); }
.save-list { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.save-card { min-width: 0; min-height: 0; padding: .6rem; border-radius: 6px; flex-direction: column; align-items: stretch; justify-content: space-between; }
.save-card h2 { font-size: .82rem; }
.save-card p { font-size: .62rem; }
.save-card > div:last-child { justify-content: flex-end; }
.settings-card { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: .6rem; align-items: stretch; }
.settings-card fieldset, .settings-card .toggle-row { margin: 0; min-height: 0; padding: .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.settings-card .segmented-control { grid-template-columns: 1fr; }
.settings-card .toggle-row { grid-template-columns: 1fr auto; }
.landscape-form-screen .prose { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; align-content: center; line-height: 1.35; }
.landscape-form-screen .prose h2 { grid-column: 1 / -1; margin: 0; }
.landscape-form-screen .prose p { margin: 0; padding: .65rem; border: 1px solid var(--border); background: var(--surface-2); }

/* Grand strategy oyun kabuğu */
.game-screen.grand-strategy-screen { width: 100%; height: 100dvh; min-height: 0; padding: 0; display: grid; grid-template-rows: 46px minmax(0, 1fr); overflow: hidden; background: #080e18; }
.game-topbar { position: static; z-index: 40; height: 46px; min-height: 46px; display: grid; grid-template-columns: 38px 52px minmax(108px, 170px) minmax(260px, 1fr) 38px 104px; gap: .35rem; padding: 3px max(5px, env(safe-area-inset-right)) 3px max(5px, env(safe-area-inset-left)); align-items: center; border-bottom: 1px solid rgba(216,170,88,.22); background: #0b1320; }
.game-topbar .topbar-icon { width: 36px; height: 36px; min-height: 36px; }
.game-topbar .turn-badge { grid-template-columns: auto auto; column-gap: .25rem; align-items: center; line-height: .92; }
.game-topbar .turn-badge span { grid-column: 1; }
.game-topbar .turn-badge strong { grid-row: span 2; grid-column: 2; font-size: .98rem; }
.game-topbar .turn-badge small { grid-column: 1; }
.game-topbar .religion-title span { font-size: .78rem; }
.game-topbar .religion-title small { font-size: .58rem; }
.game-topbar .resource-bar { min-width: 0; height: 38px; display: grid; grid-template-columns: repeat(8, minmax(31px, 1fr)); gap: 2px; overflow: hidden; padding: 0; border: 0; background: transparent; }
.game-topbar .resource-chip { min-width: 0; height: 34px; padding: 2px 3px; display: grid; grid-template-columns: auto; place-items: center; align-content: center; gap: 0; border-radius: 4px; font-size: .64rem; }
.game-topbar .resource-chip svg { width: 13px; height: 13px; }
.game-topbar .resource-label { display: none; }
.top-turn-button { height: 38px; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: .25rem; border: 1px solid #e6bd72; border-radius: 5px; color: #111722; background: linear-gradient(180deg, #e3bd76, #b77b39); font-size: .7rem; font-weight: 900; }
.top-turn-button svg { width: 17px; }
.strategy-workspace { min-height: 0; height: 100%; display: grid; grid-template-columns: 50px minmax(0, 1fr) minmax(250px, 29vw); gap: 5px; padding: 5px; overflow: hidden; }
.strategy-rail { min-height: 0; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--border); background: #0c1523; }
.strategy-rail button { position: relative; min-height: 0; display: grid; place-items: center; align-content: center; gap: 2px; padding: 2px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-size: .55rem; }
.strategy-rail button svg { width: 19px; height: 19px; }
.strategy-rail button.active, .strategy-rail button:hover { color: var(--accent); border-color: rgba(216,170,88,.28); background: rgba(216,170,88,.08); }
.strategy-rail .nav-with-badge i { top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: .55rem; }
.map-column { position: relative; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.map-column .map-shell { width: 100%; height: 100%; min-height: 0; border-radius: 3px; }
.map-column .world-map { width: 100%; height: 100%; min-height: 0; }
.map-toolbar { top: 5px; left: 5px; right: 5px; gap: 3px; }
.map-toolbar button { width: 34px; min-height: 34px; border-radius: 4px; }
.map-toolbar span { padding: .25rem .45rem; font-size: .58rem; border-radius: 4px; }
.layer-dock { position: absolute; z-index: 12; left: 6px; right: 6px; bottom: 6px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 3px; border: 1px solid var(--border); background: rgba(7,13,22,.88); backdrop-filter: blur(8px); }
.layer-dock button { min-width: 0; min-height: 36px; display: grid; grid-template-columns: auto; place-items: center; align-content: center; gap: 0; padding: 1px 2px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #aeb8c8; font-size: .51rem; }
.layer-dock button svg { width: 15px; height: 15px; }
.layer-dock button.active { color: #161b22; background: var(--accent); border-color: #f0cf8e; font-weight: 900; }
.map-legend { left: auto; right: 6px; bottom: 49px; max-width: min(72%, 520px); padding: .3rem .4rem; border-radius: 3px; }
.map-legend span { font-size: .52rem; }
.map-legend i { width: 8px; height: 8px; border-radius: 1px; }

/* Sağ bölge müfettişi */
.panel.region-panel { min-width: 0; min-height: 0; height: 100%; margin: 0; padding: 6px; display: grid; grid-template-rows: 34px 28px minmax(0, 1fr); overflow: hidden; border-radius: 3px; }
.region-panel > header { min-height: 0; align-items: center; }
.region-panel h2 { margin: 0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .eyebrow { font-size: .5rem; }
.influence-emblem { width: 42px; min-height: 30px; height: 30px; border-radius: 4px; grid-template-columns: auto auto; gap: 0 3px; }
.influence-emblem svg { width: 13px; }
.influence-emblem b { font-size: .68rem; }
.influence-emblem small { grid-column: 1 / -1; font-size: .45rem; }
.region-tabs { margin: 2px 0; padding: 2px; gap: 2px; border-radius: 3px; }
.region-tabs button { min-height: 24px; height: 24px; padding: 0 2px; border-radius: 2px; font-size: .55rem; }
.region-panel-body, .region-tab-content { min-height: 0; height: 100%; overflow: hidden; }
.overview-tab { display: grid; grid-template-rows: auto auto auto auto minmax(72px, 1fr); gap: 3px; }
.region-panel .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin: 3px 0; }
.region-panel .stat-grid div { min-width: 0; gap: 0; padding: 3px; border-radius: 3px; }
.region-panel .stat-grid span { font-size: .48rem; }
.region-panel .stat-grid strong { font-size: .61rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .meter-row { grid-template-columns: 62px 1fr 22px; gap: 3px; height: 15px; margin: 0; }
.region-panel .meter-row span, .region-panel .meter-row b { font-size: .52rem; }
.region-panel .state-policy-button { min-height: 34px; height: 34px; margin: 1px 0; padding: 3px 5px; border-radius: 3px; gap: 5px; }
.region-panel .state-policy-button > svg { width: 15px; }
.region-panel .state-policy-button small, .region-panel .state-policy-button em { font-size: .48rem; }
.region-panel .state-policy-button b { font-size: .62rem; }
.region-panel .change-box { min-height: 30px; margin: 1px 0; padding: 4px; border-radius: 3px; overflow: hidden; }
.region-panel .change-box strong { display: flex; align-items: center; gap: 3px; font-size: .58rem; }
.region-panel .change-box p { margin: 1px 0 0; font-size: .48rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .regional-place-summary { display: none; }
.region-panel .action-list { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.region-panel .action-list button { min-height: 0; height: 100%; padding: 3px 4px; gap: 4px; border-radius: 3px; }
.region-panel .action-list button svg { width: 14px; height: 14px; }
.region-panel .action-list b { font-size: .57rem; }
.region-panel .action-list small { font-size: .45rem; line-height: 1.05; }
.religion-distribution-list { display: grid; grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 2px; }
.religion-distribution-list > div { min-height: 0; display: grid; grid-template-columns: 86px 1fr 43px; gap: 3px; align-items: center; padding: 2px 3px; }
.religion-distribution-list b, .religion-distribution-list strong { font-size: .55rem; }
.religion-distribution-list small { font-size: .45rem; }
.demography-tab { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
.region-panel .demography-grid { min-height: 0; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.region-panel .demography-grid article { padding: 5px; border-radius: 3px; }
.region-panel .demography-grid article span, .region-panel .demography-grid article small { font-size: .5rem; }
.region-panel .demography-grid article strong { font-size: .68rem; }
.region-panel .demography-equation { padding: 5px; margin: 0; border-radius: 3px; }
.region-panel .demography-equation span, .region-panel .demography-equation small { font-size: .5rem; }
.region-panel .demography-tab > .muted-copy { display: none; }
.region-panel .factor-list { display: grid; grid-template-rows: repeat(10, minmax(0, 1fr)) auto; gap: 1px; }
.region-panel .factor-list > div:not(.rate-summary) { display: grid; grid-template-columns: 88px 1fr 22px; gap: 3px; align-items: center; margin: 0; font-size: .52rem; }
.region-panel .rate-summary { margin: 2px 0 0; padding: 4px; font-size: .5rem; }

/* Açılır strateji pencereleri: kaydırma yok, sekme/panel mantığı */
.modal-backdrop { z-index: 70; place-items: center; padding: 8px; }
.modal.strategy-window { position: relative; width: calc(100vw - 28px); height: calc(100dvh - 16px); max-width: 1180px; max-height: none; min-height: 0; overflow: hidden; padding: 7px; display: grid; grid-template-rows: 39px 31px minmax(0, 1fr); border-radius: 5px; }
.report-modal.strategy-window { grid-template-rows: 39px 31px minmax(0, 1fr) 34px; }
.window-header { min-height: 0; height: 39px; align-items: center !important; border-bottom: 1px solid var(--border); }
.window-header h2 { margin: 0; font-size: .95rem; }
.window-header small { font-size: .58rem; color: var(--muted); }
.window-header .eyebrow { font-size: .5rem; }
.window-header .icon-button { width: 32px; height: 32px; min-height: 32px; }
.modal-tabs { min-height: 0; height: 31px; margin: 0; padding: 2px 0; overflow: hidden; gap: 2px; }
.modal-tabs button { min-height: 27px; height: 27px; padding: 0 .65rem; border-radius: 3px; font-size: .62rem; }
.modal-content { min-height: 0; height: 100%; overflow: hidden; padding-top: 4px; }
.window-footer-button { min-height: 30px; height: 30px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #111722; font-weight: 900; }

/* Dinim */
.religion-overview-layout { height: 100%; display: grid; grid-template-columns: 1.15fr 1.25fr .8fr; gap: 7px; align-items: stretch; }
.religion-overview-layout .summary-grid { height: 100%; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 5px; margin: 0; }
.summary-grid article { min-height: 0; padding: .5rem; border-radius: 4px; }
.summary-grid article svg { width: 18px; height: 18px; }
.summary-grid article span { font-size: .58rem; }
.summary-grid article strong { font-size: .82rem; }
.religion-overview-layout .identity-hero { height: 100%; margin: 0; padding: .6rem; border-radius: 4px; }
.religion-overview-layout .doctrine-budget { height: 100%; margin: 0; border-radius: 4px; align-content: center; }
.identity-workbench { position: relative; height: 100%; display: grid; grid-template-rows: 30px minmax(0, 1fr); gap: 4px; }
.identity-workbench .warning-callout { min-height: 0; height: 30px; margin: 0; padding: 4px 7px; align-items: center; border-radius: 3px; }
.identity-workbench .warning-callout svg { width: 15px; }
.identity-workbench .warning-callout p { font-size: .56rem; }
.identity-list { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 3px; }
.identity-row { min-width: 0; min-height: 0; height: 100%; padding: 3px 5px; gap: 4px; border-radius: 3px; }
.identity-row small { font-size: .48rem; }
.identity-row strong { font-size: .59rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.identity-row .icon-button { width: 27px; height: 27px; min-height: 27px; }
.identity-row .locked-label { font-size: .48rem; }
.rename-overlay { position: absolute; z-index: 12; inset: 0; display: grid; place-items: center; background: rgba(4,8,14,.78); }
.rename-dialog { width: min(470px, 72%); padding: .8rem; border: 1px solid var(--accent); border-radius: 5px; background: var(--surface); box-shadow: 0 18px 70px #000; }
.rename-dialog h3 { margin: .2rem 0 .55rem; }
.rename-dialog label { display: grid; gap: .25rem; font-size: .65rem; }
.rename-dialog input { min-height: 36px; padding: 0 .55rem; }
.rename-dialog .permanent-confirmation { margin-top: .5rem; padding: .55rem; }
.doctrine-workbench { height: 100%; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 6px; }
.doctrine-category-nav { min-height: 0; display: grid; grid-template-rows: 52px repeat(6, minmax(0, 1fr)); gap: 3px; padding: 4px; border: 1px solid var(--border); background: var(--surface-2); }
.doctrine-category-nav .doctrine-budget { margin: 0; padding: 4px; border-radius: 3px; }
.doctrine-category-nav .doctrine-budget strong { font-size: 1.25rem; }
.doctrine-category-nav button { min-height: 0; display: flex; justify-content: space-between; align-items: center; padding: 3px 6px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); color: var(--muted); font-size: .58rem; text-align: left; }
.doctrine-category-nav button.active { color: #111722; background: var(--accent); border-color: var(--accent); font-weight: 900; }
.doctrine-focus { min-height: 0; display: grid; grid-template-rows: 34px minmax(0, 1fr) auto; gap: 4px; }
.doctrine-focus > header { display: flex; justify-content: space-between; align-items: center; }
.doctrine-focus h3 { margin: 0; font-size: .86rem; }
.doctrine-focus .doctrine-options { min-height: 0; height: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.doctrine-focus .doctrine-option { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto 30px; gap: 3px; padding: 6px; border-radius: 4px; overflow: hidden; }
.doctrine-focus .doctrine-option.pending { border-color: var(--accent); background: rgba(216,170,88,.12); }
.doctrine-focus .doctrine-option strong { font-size: .72rem; }
.doctrine-focus .doctrine-option p { font-size: .56rem; line-height: 1.2; overflow: hidden; }
.doctrine-focus .doctrine-option small { font-size: .5rem; line-height: 1.15; }
.doctrine-focus .doctrine-option button { min-height: 29px; height: 29px; font-size: .58rem; }
.doctrine-selected-card { height: 100%; grid-template-rows: auto 1fr auto auto !important; }
.doctrine-confirmation { min-height: 34px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px; padding: 3px 5px; border: 1px solid var(--accent); background: var(--surface-3); font-size: .58rem; }
.doctrine-confirmation button { min-height: 28px; height: 28px; font-size: .56rem; }
.ritual-workbench { height: 100%; display: grid; grid-template-rows: 30px minmax(0, 1fr); gap: 4px; }
.ritual-workbench .info-callout { height: 30px; margin: 0; padding: 4px 7px; align-items: center; border-radius: 3px; }
.ritual-workbench .info-callout p { font-size: .55rem; }
.ritual-list { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.ritual-card { min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) 31px; gap: 4px; padding: 6px; border-radius: 4px; }
.ritual-card header strong { font-size: .68rem; }
.ritual-card header small { font-size: .51rem; }
.participation-badge { padding: 2px 4px; font-size: .5rem; }
.ritual-controls { align-self: center; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
.ritual-controls label { gap: 2px; font-size: .5rem; }
.ritual-controls select { min-height: 32px; height: 32px; padding: 0 3px; border-radius: 3px; font-size: .58rem; }
.ritual-card .secondary-button { min-height: 30px; height: 30px; font-size: .55rem; }
.founder-workbench { height: 100%; display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr); gap: 7px; }
.founder-workbench .founder-profile { height: 100%; margin: 0; padding: .6rem; border-radius: 4px; }
.founder-workbench .founder-stats { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(7, minmax(0, 1fr)); gap: 3px; }
.founder-workbench .founder-stats div { min-height: 0; padding: 3px 6px; border-radius: 3px; font-size: .58rem; }

/* Yönetim */
.construction-workbench { height: 100%; display: grid; grid-template-rows: 48px 32px minmax(0, 1fr); gap: 4px; }
.management-summary { height: 48px; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; }
.management-summary article { grid-template-columns: auto 1fr; grid-template-rows: 1fr 1fr; gap: 0 5px; align-items: center; padding: 4px 6px; }
.management-summary article svg { grid-row: span 2; }
.construction-workbench .section-heading-row { align-items: center; }
.construction-workbench .section-heading-row h3 { margin: 0; font-size: .76rem; }
.place-type-list { min-height: 0; height: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; }
.place-type-card { min-height: 0; height: 100%; grid-template-columns: 1fr; grid-template-rows: 70px auto minmax(0, 1fr) auto; gap: 3px; padding: 4px; border-radius: 4px; }
.place-type-card .place-illustration { grid-column: 1; width: 100%; height: 70px; border-radius: 3px; }
.place-type-card > div:first-of-type strong { font-size: .64rem; }
.place-type-card > div:first-of-type small { font-size: .49rem; line-height: 1.15; }
.place-metrics { grid-column: 1; align-content: start; gap: 2px; }
.place-metrics span { padding: 2px 3px; border-radius: 2px; font-size: .45rem; }
.place-type-card > b { grid-column: 1; font-size: .52rem; }
.network-workbench { height: 100%; display: grid; grid-template-rows: 54px minmax(0, 1fr); gap: 5px; }
.network-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.network-overview article { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr 1fr; gap: 0 6px; align-items: center; padding: 5px; background: var(--surface-2); }
.network-overview article svg { grid-row: span 2; color: var(--accent); }
.network-overview span { font-size: .56rem; color: var(--muted); }
.network-grid { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 3px; }
.network-grid div { min-height: 0; display: grid; grid-template-columns: 110px 1fr 25px; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 3px; font-size: .57rem; }
.network-grid small { font-size: .47rem; }

/* Diplomasi */
.state-status-workbench { height: 100%; display: grid; grid-template-columns: 1.1fr .9fr 1.1fr; grid-template-rows: auto 1fr auto; gap: 5px; }
.state-status-workbench .policy-hero { grid-column: 1 / 3; margin: 0; padding: 6px; border-radius: 4px; }
.state-status-workbench .policy-hero span, .state-status-workbench .policy-hero small { font-size: .52rem; }
.state-status-workbench .policy-hero strong { font-size: .8rem; }
.state-status-workbench .state-facts { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; gap: 3px; margin: 0; }
.state-status-workbench .state-facts div { padding: 4px 6px; border-radius: 3px; }
.state-status-workbench .diplomacy-meters { grid-column: 2; grid-row: 2; display: grid; grid-template-rows: repeat(4, 1fr); gap: 3px; }
.state-status-workbench .diplomacy-meters div { grid-template-columns: 80px 1fr 24px; margin: 0; font-size: .55rem; }
.state-status-workbench .permit-grid { grid-column: 3; grid-row: 1 / 3; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; margin: 0; }
.state-status-workbench .permit-grid article { min-height: 0; padding: 5px; border-radius: 3px; }
.state-status-workbench .state-support-card { grid-column: 1 / -1; grid-row: 3; margin: 0; padding: 5px 7px; border-radius: 3px; }
.state-status-workbench .state-support-card small { font-size: .52rem; }
.diplomatic-actions { min-height: 0; height: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 0; }
.diplomatic-actions > button { min-width: 0; min-height: 0; height: 100%; padding: 5px; gap: 5px; border-radius: 3px; }
.diplomatic-actions > button > svg { width: 16px; }
.diplomatic-actions b { font-size: .61rem; }
.diplomatic-actions small { font-size: .48rem; line-height: 1.12; }
.diplomatic-actions em, .diplomatic-actions i { font-size: .46rem; }
.history-workbench { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
.diplomatic-history { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 3px; }
.diplomatic-history article { min-height: 0; display: grid; grid-template-columns: 30px 1fr 28px; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 3px; }
.diplomatic-history article span, .diplomatic-history article b { font-size: .52rem; }
.diplomatic-history article p { margin: 0; font-size: .54rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager { min-height: 30px; display: flex; align-items: center; justify-content: center; gap: .55rem; }
.pager button { min-height: 29px; height: 29px; display: inline-flex; align-items: center; gap: 3px; padding: 0 .6rem; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-2); color: var(--text); font-size: .58rem; }
.pager button svg { width: 14px; }
.pager span { font-size: .6rem; color: var(--muted); }

/* Tur raporu */
.report-summary-workbench { height: 100%; display: grid; grid-template-columns: 180px 1fr; grid-template-rows: 60px minmax(0, 1fr) auto; gap: 5px; }
.report-summary-workbench .report-total { grid-column: 1; grid-row: 1; height: 60px; margin: 0; padding: 6px; border-radius: 4px; }
.report-summary-workbench .report-total strong { font-size: 1rem; }
.report-summary-workbench .report-demography-grid { grid-column: 2; grid-row: 1; height: 60px; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; }
.report-summary-workbench .report-demography-grid article { min-height: 0; padding: 4px; border-radius: 3px; }
.report-summary-workbench .report-columns { grid-column: 1 / -1; grid-row: 2; min-height: 0; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.report-summary-workbench .report-columns > div { min-height: 0; padding: 5px; border-radius: 3px; overflow: hidden; }
.report-summary-workbench .report-columns h3 { margin: 0 0 3px; font-size: .62rem; }
.report-summary-workbench .report-columns p { margin: 2px 0; font-size: .53rem; }
.report-summary-workbench .influence-ranking div { grid-template-columns: 90px 1fr 24px; margin: 3px 0; font-size: .52rem; }
.report-summary-workbench .maintenance-line { grid-column: 1 / -1; grid-row: 3; min-height: 27px; margin: 0; padding: 3px 6px; border-radius: 3px; font-size: .56rem; }
.report-events-workbench { height: 100%; display: grid; grid-template-columns: .85fr .95fr 1.2fr; gap: 5px; }
.report-events-workbench .state-report-section { min-height: 0; height: 100%; margin: 0; padding: 5px; border-radius: 3px; overflow: hidden; }
.report-events-workbench .state-report-section h3 { margin: 0 0 4px; font-size: .62rem; }
.report-events-workbench .state-report-section article { padding: 3px 4px; font-size: .52rem; }
.report-events-workbench .event-grid { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 3px; }
.report-events-workbench .event-card { min-height: 0; margin: 0; padding: 5px; border-radius: 3px; overflow: hidden; }
.report-events-workbench .event-card strong { display: flex; align-items: center; gap: 3px; font-size: .55rem; }
.report-events-workbench .event-card p { margin: 2px 0 0; font-size: .49rem; line-height: 1.15; }

.toast { bottom: 12px; min-height: 34px; padding: .4rem .75rem; border-radius: 4px; font-size: .65rem; }
.update-banner { top: 5px; padding: .35rem; border-radius: 4px; font-size: .65rem; }
.update-banner button { min-height: 30px; height: 30px; }

@media (max-width: 820px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 36px 47px minmax(90px, 125px) minmax(225px, 1fr) 36px 88px; }
  .top-turn-button span { font-size: .62rem; }
  .strategy-workspace { grid-template-columns: 45px minmax(0, 1fr) 240px; }
  .strategy-rail button span { display: none; }
  .layer-dock button span { display: none; }
  .region-panel .action-list small { display: none; }
  .state-status-workbench { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-height: 390px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen { grid-template-rows: 42px minmax(0, 1fr); }
  .game-topbar { height: 42px; min-height: 42px; }
  .game-topbar .resource-bar { height: 34px; }
  .game-topbar .resource-chip { height: 31px; }
  .region-panel .change-box p, .place-type-card > div:first-of-type small, .diplomatic-actions small { display: none; }
  .region-panel .overview-tab { grid-template-rows: auto auto auto auto minmax(62px, 1fr); }
  .modal.strategy-window { height: calc(100dvh - 10px); }
  .place-type-card { grid-template-rows: 54px auto 1fr auto; }
  .place-type-card .place-illustration { height: 54px; }
}

.menu-version-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.compact-update-button {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  min-height: 28px;
  padding: .28rem .55rem;
  border-radius: 6px;
  font-size: .72rem;
  line-height: 1;
}
.spin-icon { animation: update-spin .8s linear infinite; }
@keyframes update-spin { to { transform: rotate(360deg); } }

/* v0.5 — Kurucu, mağaza, teşkilat ve maliye */
.founder-portrait img { width: min(240px, 100%); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%; display: block; border-radius: 8px; border: 1px solid rgba(216,170,88,.28); box-shadow: 0 16px 40px rgba(0,0,0,.34); user-select: none; }
.founder-portrait.compact img { width: 58px; height: 68px; border-radius: 4px; box-shadow: none; }
.founder-profile .founder-portrait img { width: min(210px, 100%); max-height: calc(100dvh - 165px); }

.new-game-card.new-game-v5 { grid-template-columns: minmax(230px,.72fr) minmax(310px,1fr) minmax(190px,.58fr); grid-template-rows: minmax(0,1fr) 40px; gap: 6px; }
.new-game-v5 .create-world-button { grid-column: 1 / -1; }
.new-game-v5 .new-game-options { grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--border); background: var(--surface-2); }
.new-game-v5 .founder-builder { display: grid; grid-template-rows: auto auto minmax(0,1fr) 72px; overflow: hidden; }
.archetype-strip { min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 3px; }
.archetype-strip button { position: relative; min-width: 0; min-height: 0; padding: 3px 4px; display: grid; place-items: center; align-content: center; gap: 1px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); color: var(--text); font-size: .51rem; text-align: center; }
.archetype-strip button.selected { border-color: var(--accent); background: rgba(216,170,88,.13); color: var(--accent); }
.archetype-strip button:disabled { opacity: .45; }
.archetype-strip button svg { width: 13px; height: 13px; }
.archetype-strip small { font-size: .4rem; color: var(--muted); }
.portrait-picker-panel { min-height: 0; display: grid; grid-template-rows: minmax(100px,1fr) 68px 31px auto; gap: 4px; padding: 5px; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; }
.portrait-preview { min-height: 0; overflow: hidden; border-radius: 4px; background: #0b1320; }
.portrait-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.portrait-mini-grid { min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; }
.portrait-mini-grid button { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 3px; background: #111a28; }
.portrait-mini-grid button.selected { border: 2px solid var(--accent); }
.portrait-mini-grid button:disabled { opacity: .42; }
.portrait-mini-grid img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.portrait-mini-grid svg { position: absolute; right: 2px; bottom: 2px; width: 13px; height: 13px; padding: 2px; border-radius: 50%; background: rgba(0,0,0,.72); color: #f2cf89; }
.portrait-picker-panel > small, .portrait-change-workbench > small { font-size: .47rem; line-height: 1.15; color: var(--muted); text-align: center; }
.field-error { color: #ef8798 !important; }

.founder-workbench.founder-v5 { grid-template-columns: minmax(220px,.7fr) minmax(210px,.64fr) minmax(0,1.25fr); }
.founder-v5 .founder-profile { min-height: 0; display: grid; grid-template-columns: minmax(90px,.7fr) 1fr; align-items: center; }
.founder-v5 .founder-profile .founder-portrait img { max-height: calc(100dvh - 160px); width: 100%; }
.founder-v5 .founder-profile-copy { min-width: 0; }
.founder-v5 .founder-profile-copy strong { font-size: .82rem; }
.founder-v5 .founder-profile-copy p, .founder-v5 .founder-profile-copy small { font-size: .49rem; line-height: 1.15; }
.portrait-change-workbench { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) 31px auto; gap: 4px; padding: 5px; border: 1px solid var(--border); background: var(--surface-2); }
.portrait-change-workbench .portrait-mini-grid { grid-template-rows: repeat(2,minmax(0,1fr)); }

.store-screen .screen-header { grid-template-columns: auto 1fr auto; }
.store-credit { display: flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--border); background: var(--surface-2); font-size: .6rem; }
.store-credit svg { width: 16px; color: var(--accent); }
.store-layout { min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(220px,.62fr) minmax(0,1.38fr); gap: 6px; overflow: hidden; }
.store-explainer { min-height: 0; display: grid; grid-template-rows: auto auto auto auto auto 34px 34px; gap: 5px; align-content: center; padding: 10px; border: 1px solid var(--border); background: var(--surface); }
.store-explainer > svg { width: 34px; height: 34px; color: var(--accent); }
.store-explainer h2, .store-explainer p { margin: 0; }
.store-explainer h2 { font-size: 1rem; }
.store-explainer p { font-size: .62rem; line-height: 1.35; color: var(--muted); }
.store-rule { display: flex; gap: 5px; align-items: center; padding: 5px; border: 1px solid var(--border); background: var(--surface-2); font-size: .55rem; }
.store-rule svg { width: 15px; color: var(--accent); }
.store-products { min-height: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 5px; }
.store-product { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 4px; padding: 7px; border: 1px solid var(--border); background: var(--surface); }
.store-product.owned { border-color: rgba(94,198,145,.6); background: rgba(94,198,145,.05); }
.store-product header, .store-product footer { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.store-product header div { display: grid; }
.store-product header small { font-size: .43rem; color: var(--accent); }
.store-product header strong { font-size: .72rem; }
.store-product header svg { width: 17px; color: var(--accent); }
.store-product p { margin: 0; font-size: .52rem; line-height: 1.2; color: var(--muted); }
.store-product ul { margin: 0; padding-left: 15px; font-size: .5rem; line-height: 1.35; }
.store-product footer span { font-size: .48rem; color: var(--muted); }
.store-product footer button { min-height: 28px; height: 28px; font-size: .5rem; }

.clergy-workbench { height: 100%; min-height: 0; display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 5px; }
.clergy-command-card { min-height: 0; display: grid; grid-template-rows: auto auto auto auto 34px 26px auto; gap: 5px; align-content: center; padding: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.clergy-command-card > svg { width: 32px; height: 32px; color: var(--accent); }
.clergy-command-card strong { font-size: .92rem; }
.clergy-command-card p { margin: 0; font-size: .56rem; color: var(--muted); }
.clergy-command-card small { font-size: .47rem; line-height: 1.2; color: var(--muted); }
.clergy-grid { min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px; }
.clergy-card { min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) 31px; gap: 4px; padding: 5px; border: 1px solid var(--border); background: var(--surface-2); }
.clergy-card header { display: flex; justify-content: space-between; gap: 4px; }
.clergy-card header div { min-width: 0; display: grid; }
.clergy-card header strong { font-size: .61rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clergy-card header small { font-size: .45rem; color: var(--muted); }
.clergy-card header > span { font-size: .5rem; color: var(--accent); }
.clergy-metrics { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; align-content: center; }
.clergy-metrics span { display: flex; justify-content: space-between; padding: 3px; border: 1px solid var(--border); font-size: .46rem; }
.clergy-actions { display: grid; grid-template-columns: 1fr 30px; gap: 3px; }
.clergy-actions select { min-width: 0; height: 30px; min-height: 30px; padding: 0 3px; font-size: .48rem; }
.clergy-actions button { min-height: 30px; height: 30px; }
.empty-management-state { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); text-align: center; }
.empty-management-state svg { width: 34px; color: var(--accent); }
.empty-management-state p { margin: 0; font-size: .55rem; }

.finance-workbench { height: 100%; min-height: 0; display: grid; grid-template-columns: 190px minmax(300px,.95fr) minmax(0,1.05fr); gap: 5px; }
.finance-summary-card { min-height: 0; display: grid; grid-template-rows: auto auto auto repeat(4,1fr) 34px 26px; gap: 4px; padding: 7px; border: 1px solid var(--border); background: var(--surface-2); }
.finance-summary-card > svg { width: 28px; color: var(--accent); }
.finance-summary-card > strong { font-size: .78rem; }
.finance-summary-card > div { display: flex; justify-content: space-between; align-items: center; padding: 3px 5px; border: 1px solid var(--border); font-size: .52rem; }
.finance-policy-grid { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3,minmax(0,1fr)); gap: 4px; }
.finance-policy-grid button { min-height: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 3px; padding: 5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; }
.finance-policy-grid button.selected { border-color: var(--accent); background: rgba(216,170,88,.12); }
.finance-policy-grid strong { font-size: .6rem; }
.finance-policy-grid small { font-size: .46rem; line-height: 1.15; color: var(--muted); }
.finance-policy-grid span { font-size: .46rem; color: var(--accent); }
.ledger-grid { min-height: 0; display: grid; grid-template-rows: repeat(8,minmax(0,1fr)); gap: 3px; }
.ledger-grid article { min-height: 0; display: grid; grid-template-columns: 26px 1fr 40px; align-items: center; gap: 4px; padding: 3px 5px; border: 1px solid var(--border); background: var(--surface-2); font-size: .48rem; }
.ledger-grid article.income b { color: #68d59e; }
.ledger-grid article.loss b, .ledger-grid article.expense b { color: #ef8798; }
.ledger-grid article strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.economy-report-line { grid-column: 1 / -1; min-height: 30px; display: grid; grid-template-columns: auto repeat(4,1fr); align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--border); background: var(--surface-2); font-size: .52rem; }
.economy-report-line svg { color: var(--accent); }

@media (max-height: 390px) {
  .new-game-card.new-game-v5 { grid-template-columns: minmax(210px,.72fr) minmax(290px,1fr) minmax(170px,.55fr); }
  .portrait-picker-panel { grid-template-rows: minmax(78px,1fr) 54px 28px auto; }
  .archetype-strip { height: 58px; }
  .store-explainer { padding: 6px; }
  .store-product { padding: 5px; }
  .founder-workbench.founder-v5 { grid-template-columns: 205px 190px 1fr; }
}
.advisor-analysis { display: grid; gap: 4px; padding: 5px; border: 1px solid rgba(216,170,88,.35); background: rgba(216,170,88,.07); }
.advisor-analysis > div { display: flex; align-items: center; gap: 5px; }
.advisor-analysis svg { width: 16px; height: 16px; color: var(--accent); }
.advisor-analysis span { display: grid; min-width: 0; }
.advisor-analysis b { font-size: .54rem; }
.advisor-analysis small, .advisor-analysis p { margin: 0; font-size: .46rem; line-height: 1.25; color: var(--muted); }
.advisor-analysis button { justify-self: stretch; min-height: 28px; height: 28px; font-size: .48rem; }
.compact-pager { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; gap: 3px; }
.compact-pager button { width: 28px; min-width: 28px; height: 26px; min-height: 26px; padding: 0; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.compact-pager button:disabled { opacity: .32; }
.compact-pager svg { width: 14px; height: 14px; }
.compact-pager span { text-align: center; font-size: .48rem; color: var(--muted); }

/* v0.5.1 — International UI, responsive landscape shell and locked founders */
.orientation-gate { padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: rgba(5,10,18,.96); }
.orientation-card { width: min(88vw, 420px); display: grid; justify-items: center; gap: 10px; padding: 24px; border: 1px solid rgba(216,170,88,.45); border-radius: 14px; background: linear-gradient(145deg,#142238,#0d1522); box-shadow: 0 26px 80px rgba(0,0,0,.55); }
.orientation-card p { max-width: 330px; line-height: 1.45; }
.language-gate { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(4,9,16,.94); backdrop-filter: blur(14px); }
.language-card { width: min(92vw, 430px); display: grid; gap: 10px; padding: 22px; border: 1px solid rgba(216,170,88,.42); border-radius: 14px; background: linear-gradient(145deg,#17243a,#0d1522); box-shadow: 0 30px 90px rgba(0,0,0,.58); text-align: center; }
.language-card h2, .language-card p { margin: 0; }
.language-card p { color: var(--muted); font-size: .82rem; }
.language-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.language-card button { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-weight: 800; }
.language-card button.selected { border-color: var(--accent); color: var(--accent); background: rgba(216,170,88,.11); }

/* Main menu rebuilt to prevent overlap at 16:9, 20:9 and tablet ratios. */
.menu-screen.landscape-menu { padding: max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); grid-template-columns: minmax(0, 1.52fr) minmax(320px, .72fr); gap: 10px; }
.menu-identity { isolation: isolate; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; align-items: stretch; padding: 0; background: radial-gradient(circle at 28% 42%,rgba(54,77,111,.44),transparent 35%),linear-gradient(135deg,#0b1422,#111d2f); }
.menu-identity .world-influence-hero { position: absolute; z-index: -1; inset: 4% 42% 13% 1%; width: 56%; height: 78%; min-height: 0; opacity: .82; filter: saturate(.86) contrast(1.05); }
.menu-atmosphere { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,transparent 32%,rgba(10,17,29,.38) 50%,rgba(10,17,29,.96) 83%),linear-gradient(0deg,rgba(4,8,15,.7),transparent 45%); pointer-events: none; }
.menu-title-block { position: relative; grid-column: 1; grid-row: 1; align-self: center; justify-self: end; width: min(57%, 610px); min-width: 0; padding: clamp(14px,2.4vw,34px); }
.menu-screen h1 { display: grid; gap: 0; max-width: 100%; margin: 5px 0 10px; font-size: clamp(2rem,5.25vw,5rem); line-height: .83; letter-spacing: -.035em; overflow: visible; }
.menu-screen h1 strong, .menu-screen h1 span { display: block; min-width: 0; overflow-wrap: normal; word-break: keep-all; white-space: normal; }
.menu-screen h1 span { max-width: 100%; font-size: .78em; line-height: .9; }
.menu-screen h1.english-title span { font-size: .67em; letter-spacing: -.025em; }
.menu-screen .tagline { max-width: 490px; font-size: clamp(.75rem,1.25vw,1rem); line-height: 1.3; }
.menu-identity .disclaimer { align-self: end; margin: 0 12px 12px; padding: 8px 10px; background: rgba(10,18,30,.82); font-size: clamp(.56rem,.78vw,.72rem); white-space: normal; overflow: visible; }
.menu-command-panel { padding: clamp(9px,1.3vw,15px); gap: 6px; }
.menu-actions { gap: 5px; min-height: 0; align-content: stretch; grid-auto-rows: minmax(0,1fr); }
.menu-actions button { min-height: 0; height: 100%; padding: 6px 10px; grid-template-columns: 24px minmax(0,1fr); border-radius: 8px; overflow: hidden; }
.menu-actions button svg { width: 18px; height: 18px; }
.menu-actions button b { font-size: clamp(.72rem,1.1vw,.98rem); line-height: 1.05; }
.menu-actions button small { font-size: clamp(.48rem,.72vw,.66rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-version-footer { min-width: 0; font-size: .54rem !important; }
.menu-version-footer > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-update-button { flex: 0 0 auto; min-height: 27px; white-space: nowrap; font-size: .55rem; }
@media (min-width: 1180px) and (min-height: 620px) {
  .menu-actions { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3,minmax(0,1fr)); }
  .menu-command-panel { grid-template-rows: auto minmax(0,1fr) auto; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .menu-screen.landscape-menu { grid-template-columns: minmax(0,1.3fr) minmax(300px,.78fr); }
  .menu-identity .world-influence-hero { inset-right: 45%; width: 54%; }
  .menu-title-block { width: 62%; padding: 10px; }
  .menu-screen h1 { font-size: clamp(1.75rem,5.4vw,3.1rem); }
  .menu-identity .disclaimer { margin: 0 7px 7px; padding: 5px 7px; }
}

/* Labelled resource command bar. */
.game-screen.grand-strategy-screen { grid-template-rows: 54px minmax(0,1fr); }
.game-topbar { height: 54px; min-height: 54px; grid-template-columns: 38px 54px minmax(115px,165px) minmax(390px,1fr) 38px 100px; gap: 4px; }
.game-topbar .resource-bar { height: 46px; grid-template-columns: repeat(8,minmax(43px,1fr)); gap: 3px; }
.game-topbar .resource-chip { height: 42px; min-height: 0; padding: 3px; grid-template-columns: 13px minmax(0,1fr); justify-items: stretch; align-items: center; gap: 3px; border-radius: 5px; }
.game-topbar .resource-chip > span { min-width: 0; display: grid; line-height: .92; }
.game-topbar .resource-chip small { display: block; min-width: 0; color: var(--muted); font-size: clamp(.36rem,.48vw,.48rem); font-weight: 800; letter-spacing: .025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-topbar .resource-chip strong { font-size: clamp(.55rem,.72vw,.72rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-topbar .resource-chip svg { width: 12px; height: 12px; }
.game-topbar .religion-title small { font-size: .52rem; }
@media (max-width: 930px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 34px 48px minmax(88px,110px) minmax(350px,1fr) 34px 84px; }
  .game-topbar .religion-title small { display: none; }
  .game-topbar .resource-chip { grid-template-columns: 11px minmax(0,1fr); padding: 2px; }
  .game-topbar .resource-chip small { font-size: .34rem; }
  .game-topbar .resource-chip strong { font-size: .53rem; }
}

/* Three-stage campaign builder. */
.new-campaign-screen .campaign-header { display: grid; grid-template-columns: 42px minmax(180px,.7fr) minmax(360px,1.3fr); }
.campaign-stepper { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.campaign-stepper button { min-height: 32px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: .62rem; font-weight: 800; }
.campaign-stepper button.active { border-color: var(--accent); color: var(--accent); background: rgba(216,170,88,.1); }
.campaign-workbench { display: grid; grid-template-rows: minmax(0,1fr) 39px; gap: 6px; padding: 6px !important; }
.founder-selection-workbench { min-height: 0; display: grid; grid-template-columns: minmax(230px,.72fr) minmax(255px,.86fr) minmax(360px,1.42fr); gap: 6px; }
.founder-hero-card, .founder-gallery-workbench, .archetype-catalog, .attribute-summary-card, .allocation-board, .attribute-impact-card, .world-settings-grid, .campaign-summary-card { min-height: 0; border: 1px solid var(--border); background: var(--surface-2); }
.founder-hero-card { display: grid; grid-template-columns: minmax(105px,.62fr) 1fr; gap: 7px; padding: 7px; align-items: center; }
.founder-hero-portrait { min-height: 0; height: 100%; max-height: calc(100dvh - 130px); overflow: hidden; border-radius: 7px; border: 1px solid rgba(216,170,88,.35); background: #080f19; }
.founder-hero-portrait img { width: 100%; height: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; display: block; filter: contrast(1.04) saturate(.94); }
.founder-hero-copy { min-width: 0; display: grid; align-content: center; gap: 5px; }
.founder-hero-copy h2, .founder-hero-copy p { margin: 0; }
.founder-hero-copy h2 { font-size: clamp(.85rem,1.35vw,1.16rem); }
.founder-hero-copy p { color: var(--muted); font-size: .58rem; line-height: 1.32; }
.founder-lock-note { display: grid; grid-template-columns: 18px 1fr; gap: 5px; padding: 6px; border: 1px solid rgba(216,170,88,.28); background: rgba(216,170,88,.07); color: #d9c7a1; font-size: .5rem; line-height: 1.25; }
.founder-lock-note svg { width: 17px; color: var(--accent); }
.founder-gallery-workbench { display: grid; grid-template-rows: minmax(0,1fr) 31px auto; gap: 4px; padding: 5px; overflow: hidden; }
.portrait-gallery-large { min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px; }
.portrait-gallery-large button { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: #080f19; color: var(--text); }
.portrait-gallery-large button.selected { border: 2px solid var(--accent); box-shadow: 0 0 0 1px rgba(216,170,88,.18); }
.portrait-gallery-large img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; filter: contrast(1.05) saturate(.94); }
.portrait-gallery-large button > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px; background: linear-gradient(transparent,rgba(0,0,0,.92)); font-size: .44rem; font-weight: 800; }
.portrait-gallery-large button > svg { position: absolute; right: 3px; top: 3px; width: 14px; padding: 2px; border-radius: 50%; background: rgba(0,0,0,.78); color: var(--accent); }
.portrait-upload-button { min-height: 30px; height: 30px; font-size: .52rem; }
.founder-gallery-workbench > small { color: var(--muted); font-size: .44rem; line-height: 1.15; text-align: center; }
.archetype-catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr)); gap: 4px; padding: 5px; overflow: hidden; }
.archetype-catalog > button { min-height: 0; display: grid; grid-template-rows: auto auto auto auto; gap: 2px; padding: 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); text-align: left; overflow: hidden; }
.archetype-catalog > button.selected { border-color: var(--accent); background: rgba(216,170,88,.09); }
.archetype-catalog header { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.archetype-catalog header strong { min-width: 0; font-size: .56rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archetype-catalog header small { flex: 0 0 auto; color: var(--accent); font-size: .38rem; }
.archetype-catalog header svg { width: 12px; }
.archetype-catalog p, .archetype-catalog span { margin: 0; font-size: .43rem; line-height: 1.15; overflow: hidden; }
.archetype-catalog p { color: var(--muted); }
.positive { color: #79d6a4; }.negative { color: #ef8798; }
.attribute-workbench { min-height: 0; display: grid; grid-template-columns: minmax(220px,.65fr) minmax(380px,1.25fr) minmax(250px,.8fr); gap: 6px; }
.attribute-summary-card { display: grid; grid-template-rows: minmax(0,1fr) auto auto auto auto; gap: 4px; padding: 7px; text-align: center; }
.attribute-summary-card img { justify-self: center; min-height: 0; height: 100%; max-height: calc(100dvh - 225px); aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; border-radius: 6px; }
.attribute-summary-card h2, .attribute-summary-card p { margin: 0; }
.attribute-summary-card .secondary-button { min-height: 31px; }
.allocation-board { display: grid; grid-template-rows: repeat(5,minmax(0,1fr)); gap: 6px; padding: 10px; align-content: center; }
.allocation-row-large { min-height: 0; display: grid; grid-template-columns: 110px 1fr 42px; gap: 9px; align-items: center; padding: 7px 9px; border: 1px solid var(--border); background: var(--surface); font-size: .7rem; }
.allocation-row-large input { width: 100%; }
.allocation-row-large b { text-align: center; color: var(--accent); font-size: .88rem; }
.attribute-impact-card { display: grid; align-content: center; gap: 7px; padding: 10px; }
.attribute-impact-card h3, .attribute-impact-card p { margin: 0; }
.attribute-impact-card article { padding: 8px; border: 1px solid var(--border); background: var(--surface); }
.attribute-impact-card article p, .attribute-impact-card small { color: var(--muted); font-size: .56rem; line-height: 1.35; }
.world-setup-workbench { min-height: 0; display: grid; grid-template-columns: minmax(400px,1.4fr) minmax(260px,.6fr); gap: 6px; }
.world-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px; align-content: center; }
.world-settings-grid label { display: grid; gap: 4px; margin: 0; font-size: .64rem; font-weight: 800; }
.world-settings-grid select, .world-settings-grid input { width: 100%; height: 37px; min-height: 37px; padding: 0 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); }
.world-settings-grid label:nth-child(2), .world-settings-grid .info-callout { grid-column: 1/-1; }
.world-settings-grid .info-callout { margin: 0; }
.campaign-summary-card { display: grid; grid-template-columns: minmax(90px,.55fr) 1fr; grid-template-rows: minmax(0,1fr) auto auto; gap: 7px; padding: 9px; align-items: center; }
.campaign-summary-card img { width: 100%; height: 100%; min-height: 0; grid-row: 1/4; object-fit: cover; object-position: 50% 18%; border-radius: 6px; }
.campaign-summary-card div { display: grid; }
.campaign-summary-card span, .campaign-summary-card small { color: var(--muted); font-size: .55rem; }
.campaign-summary-card strong { font-size: 1rem; }
.campaign-summary-card p { margin: 0; font-size: .55rem; line-height: 1.25; }
.campaign-footer { display: grid; grid-template-columns: 110px minmax(0,1fr) 150px; gap: 7px; align-items: center; }
.campaign-footer button { min-height: 36px; height: 36px; }
.campaign-progress { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.campaign-progress i { display: block; height: 100%; background: linear-gradient(90deg,#9b6b34,var(--accent)); transition: width .2s ease; }
.founder-lock-workbench { min-height: 0; display: grid; place-items: center; align-content: center; gap: 6px; padding: 12px; border: 1px solid rgba(216,170,88,.32); background: rgba(216,170,88,.07); text-align: center; }
.founder-lock-workbench svg { width: 34px; height: 34px; color: var(--accent); }
.founder-lock-workbench strong { font-size: .78rem; }
.founder-lock-workbench p { max-width: 270px; margin: 0; color: var(--muted); font-size: .52rem; line-height: 1.35; }

/* Atlas styling and strategic city foundation. */
.ocean { fill: url(#ocean-gradient); }
.map-graticule { fill: none; stroke: rgba(159,184,211,.12); stroke-width: .45; pointer-events: none; }
.country { stroke: rgba(218,229,241,.34); stroke-width: .48; paint-order: stroke fill; }
.country:not(.selected) { filter: drop-shadow(0 .35px .25px rgba(0,0,0,.22)); }
.strategic-city-layer { pointer-events: none; }
.city-marker > circle:first-child { fill: #f2d48d; stroke: #101722; stroke-width: .9; vector-effect: non-scaling-stroke; }
.city-marker.capital > circle:first-child { fill: #fff1bd; stroke: #b57c38; stroke-width: 1.2; }
.city-marker .city-halo { fill: none; stroke: rgba(242,212,141,.42); stroke-width: .75; vector-effect: non-scaling-stroke; }
.city-marker text { fill: #eef3f8; stroke: rgba(5,9,15,.94); stroke-width: 2px; paint-order: stroke fill; font-size: 6px; font-weight: 800; letter-spacing: .02em; vector-effect: non-scaling-stroke; }
.city-rank-2 text { display: none; }
.world-map.map-zoomed .city-rank-2 text { display: block; }
.world-map.map-zoomed .city-marker text { font-size: 5px; }
.theopolitics-preview { display: grid; grid-template-columns: 30px 1fr; gap: 7px; padding: 7px; border: 1px solid rgba(216,170,88,.34); background: rgba(216,170,88,.07); }
.theopolitics-preview > svg { width: 27px; color: var(--accent); }
.theopolitics-preview strong { font-size: .64rem; }
.theopolitics-preview p { margin-top: 3px; font-size: .48rem; }
.settings-card-v051 { grid-template-columns: 1.15fr 1.2fr 1fr 1fr 1fr; }
.settings-card-v051 fieldset small { display: block; margin-bottom: 7px; color: var(--muted); font-size: .55rem; }
.settings-card-v051 legend { display: inline-flex; align-items: center; gap: 5px; }
.language-control { grid-template-columns: 1fr 1fr !important; }

@media (max-height: 410px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen { grid-template-rows: 48px minmax(0,1fr); }
  .game-topbar { height: 48px; min-height: 48px; }
  .game-topbar .resource-bar { height: 40px; }
  .game-topbar .resource-chip { height: 37px; }
  .founder-selection-workbench { grid-template-columns: 205px 240px minmax(335px,1fr); }
  .founder-hero-copy p { display: none; }
  .founder-lock-note { font-size: .43rem; }
  .portrait-gallery-large button > span { display: none; }
  .archetype-catalog > button { padding: 3px; }
  .archetype-catalog p { display: none; }
  .attribute-summary-card img { max-height: 120px; }
}

.portrait-gallery-toolbar { min-width: 0; display: grid; grid-template-columns: 30px 38px 30px minmax(0,1fr); gap: 4px; align-items: center; }
.portrait-gallery-toolbar > span { text-align: center; color: var(--muted); font-size: .52rem; font-weight: 800; }
.portrait-gallery-toolbar .icon-button { width: 30px; min-width: 30px; height: 30px; min-height: 30px; }
.portrait-gallery-toolbar .portrait-upload-button { width: 100%; min-width: 0; }

/* v0.5.1.1 — compact command bar, collision fixes and atlas polish */
.game-topbar {
  grid-template-columns: 40px 78px minmax(104px, 148px) minmax(292px, 1fr) 40px 96px;
  gap: 4px;
  min-width: 0;
}
.game-topbar > * { min-width: 0; }
.game-topbar .turn-badge {
  height: 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 5px;
  align-items: center;
  padding: 3px 5px;
  overflow: hidden;
  border-left: 1px solid rgba(216,170,88,.22);
  border-right: 1px solid rgba(216,170,88,.12);
}
.game-topbar .turn-badge span { grid-column: 1; grid-row: 1; font-size: .44rem; letter-spacing: .08em; color: var(--muted); }
.game-topbar .turn-badge strong { grid-column: 2; grid-row: 1; justify-self: end; font-size: .88rem; line-height: 1; white-space: nowrap; }
.game-topbar .turn-badge small { grid-column: 1 / -1; grid-row: 2; font-size: .48rem; color: var(--accent); white-space: nowrap; }
.game-topbar .religion-title { min-width: 0; display: grid; align-content: center; gap: 2px; overflow: hidden; padding: 0 3px; }
.game-topbar .religion-title span,
.game-topbar .religion-title small { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-topbar .religion-title span { font-size: clamp(.62rem, 1vw, .78rem); font-weight: 900; }
.game-topbar .religion-title small { font-size: .46rem; color: var(--muted); }
.game-topbar .resource-bar { min-width: 0; width: 100%; grid-template-columns: repeat(8, minmax(34px, 1fr)); gap: 2px; }
.game-topbar .resource-chip { min-width: 0; height: 40px; grid-template-columns: 12px minmax(0,1fr); gap: 2px; padding: 2px 3px; align-items: center; justify-items: stretch; overflow: hidden; }
.game-topbar .resource-chip > span { min-width: 0; display: grid; align-content: center; gap: 1px; line-height: .95; }
.game-topbar .resource-chip small { min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .34rem; font-weight: 900; letter-spacing: .015em; }
.game-topbar .resource-chip strong { min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .56rem; }
.game-topbar .resource-label-short { display: none !important; }
.game-topbar .resource-chip svg { width: 11px; height: 11px; }

.strategy-workspace { grid-template-columns: 54px minmax(0,1fr) minmax(270px, 30vw); gap: 5px; }
.region-panel { min-width: 0; overflow: hidden; }
.region-panel > header { min-height: 42px; height: 42px; padding: 5px 7px; }
.region-panel > header h2 { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-tabs { min-height: 31px; height: 31px; }
.region-tabs button { min-height: 29px; height: 29px; padding: 2px 4px; font-size: .53rem; }
.region-panel-body { min-height: 0; overflow: hidden; }
.region-panel .overview-tab {
  min-height: 0;
  grid-template-rows: 43px repeat(3, 18px) 36px 31px minmax(72px,1fr);
  gap: 3px;
  overflow: hidden;
}
.region-panel .stat-grid { min-height: 0; height: 43px; }
.region-panel .stat-grid > div { min-width: 0; padding: 3px 4px; }
.region-panel .stat-grid span { font-size: .44rem; }
.region-panel .stat-grid strong { font-size: .61rem; }
.region-panel .meter-row { min-height: 18px; height: 18px; grid-template-columns: 66px minmax(0,1fr) 23px; }
.region-panel .state-policy-button { min-height: 36px; height: 36px; }
.region-panel .state-policy-button span { min-width: 0; overflow: hidden; }
.region-panel .state-policy-button b,
.region-panel .state-policy-button em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .change-box { min-height: 31px; height: 31px; }
.region-panel .change-box p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .action-list { min-height: 72px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.region-panel .action-list button { min-width: 0; min-height: 0; height: 100%; padding: 3px 5px; overflow: hidden; }
.region-panel .action-list button > span { min-width: 0; overflow: hidden; }
.region-panel .action-list b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .56rem; }
.region-panel .action-list small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .43rem; }

.map-column .map-shell { background: radial-gradient(circle at 50% 42%, #1d344a 0, #0a1726 72%); box-shadow: inset 0 0 50px rgba(0,0,0,.55); }
.world-map { background: linear-gradient(180deg,#14283b,#081522); }
.terrain-texture { pointer-events: none; mix-blend-mode: soft-light; opacity: .22; }
.country { stroke: rgba(235,240,245,.46); stroke-width: .56; }
.country.selected { stroke: #f4d08a; stroke-width: 1.45; filter: drop-shadow(0 0 2px rgba(244,208,138,.65)); }
.city-marker text { font-size: 5.4px; }
.world-map:not(.map-zoomed) .city-rank-2 text { display: none; }
.world-map.map-zoomed .city-marker text { font-size: 4.8px; }
.map-legend { max-width: calc(100% - 18px); overflow: hidden; }
.map-legend span { white-space: nowrap; }

.store-layout { grid-template-columns: minmax(230px,.66fr) minmax(0,1.34fr); gap: 6px; }
.store-explainer { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 6px; align-content: stretch; padding: 8px; overflow: hidden; }
.store-explainer-heading { min-width: 0; display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 7px; align-items: center; }
.store-explainer-heading > svg { width: 32px; height: 32px; color: var(--accent); }
.store-explainer-heading h2,
.store-explainer-heading p { margin: 0; }
.store-explainer-heading h2 { font-size: .92rem; }
.store-explainer-heading p { font-size: .53rem; line-height: 1.2; color: var(--muted); }
.store-rule-list { display: grid; gap: 4px; }
.store-rule { min-height: 34px; padding: 5px; overflow: hidden; }
.store-rule span { min-width: 0; font-size: .52rem; line-height: 1.18; }
.theopolitics-preview { min-height: 0; align-content: center; overflow: hidden; }
.theopolitics-preview div { min-width: 0; overflow: hidden; }
.theopolitics-preview strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theopolitics-preview p { max-height: 3.5em; overflow: hidden; }
.store-primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.store-primary-actions button { min-width: 0; min-height: 34px; height: 34px; padding: 4px 6px; font-size: .54rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-products { min-height: 0; overflow: hidden; }
.store-product { min-width: 0; min-height: 0; overflow: hidden; }
.store-product header strong { min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-product footer { min-width: 0; }
.store-product footer button { min-width: 86px; white-space: nowrap; }

@media (max-width: 980px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 38px 70px minmax(92px,115px) minmax(292px,1fr) 36px 88px; }
  .game-topbar .resource-label-full { display: none !important; }
  .game-topbar .resource-label-short { display: block !important; }
  .strategy-workspace { grid-template-columns: 50px minmax(0,1fr) minmax(262px,31vw); }
}

@media (max-width: 800px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 36px 66px minmax(82px,100px) minmax(278px,1fr) 34px 82px; gap: 3px; }
  .game-topbar .religion-title small { display: none; }
  .game-topbar .resource-chip { grid-template-columns: 10px minmax(0,1fr); padding: 2px; }
  .game-topbar .resource-chip small { font-size: .31rem; }
  .game-topbar .resource-chip strong { font-size: .51rem; }
  .strategy-workspace { grid-template-columns: 48px minmax(0,1fr) minmax(255px,33vw); }
  .strategy-rail button span { font-size: .49rem; }
}

@media (max-height: 430px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen { grid-template-rows: 48px minmax(0,1fr); }
  .game-topbar { height: 48px; min-height: 48px; }
  .game-topbar .turn-badge { height: 38px; }
  .game-topbar .resource-bar { height: 40px; }
  .game-topbar .resource-chip { height: 38px; }
  .region-panel > header { height: 38px; min-height: 38px; }
  .region-panel .overview-tab { grid-template-rows: 40px repeat(3,17px) 33px 28px minmax(62px,1fr); }
  .region-panel .state-policy-button em,
  .region-panel .change-box p,
  .region-panel .action-list small { display: none; }
  .region-panel .action-list b { font-size: .53rem; }
  .store-explainer { padding: 6px; gap: 4px; }
  .store-rule-list { grid-template-columns: 1fr 1fr; gap: 3px; }
  .store-rule { min-height: 30px; }
  .store-rule span { font-size: .46rem; }
  .theopolitics-preview p { display: none; }
  .store-primary-actions button { height: 31px; min-height: 31px; }
  .store-product { padding: 5px; gap: 2px; }
  .store-product p { font-size: .48rem; max-height: 2.4em; overflow: hidden; }
  .store-product ul { display: none; }
  .store-product footer button { min-width: 76px; height: 27px; min-height: 27px; }
}

/* v0.5.1.1 atlas-depth layer; static SVG only, no GPU-heavy turbulence */
.terrain-country { stroke: rgba(19,27,25,.48); stroke-width: .78; }
.country { fill-opacity: .79; mix-blend-mode: color; }
.country.selected { fill-opacity: .92; mix-blend-mode: normal; }
.terrain-texture { mix-blend-mode: overlay; opacity: .38; }
.map-graticule { opacity: .28; stroke: rgba(153,183,204,.28); }
.city-marker text {
  paint-order: stroke fill;
  stroke: rgba(4,10,15,.95);
  stroke-width: 1.9px;
  stroke-linejoin: round;
  fill: #f2e9d4;
  font-weight: 800;
  letter-spacing: .02em;
}
.city-marker circle:first-child { fill: #e4bd69; stroke: #151b24; stroke-width: 1.1; }
.city-marker.capital circle:first-child { fill: #fff1bd; }

/* --------------------------------------------------------------------------
   v0.5.2 — Grand Strategy Interface & Living World Map
   -------------------------------------------------------------------------- */
.game-screen.grand-strategy-screen.v052-interface {
  height: 100dvh;
  min-height: 0;
  grid-template-rows: 72px minmax(0, 1fr);
  background: #050a0f;
  color: #e7e1d5;
}

.v052-interface .strategy-command-bar {
  height: 72px;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(225px, 285px) minmax(0, 1fr) 235px;
  gap: 7px;
  padding: 5px max(7px, env(safe-area-inset-right)) 5px max(7px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(212, 163, 78, .48);
  background: linear-gradient(180deg, #111a20 0%, #080e13 100%);
  box-shadow: 0 5px 24px rgba(0,0,0,.48);
}

.strategy-brand {
  min-width: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 50px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border: 1px solid rgba(210,163,79,.3);
  background: radial-gradient(circle at 15% 20%, rgba(205,154,66,.12), transparent 45%), #090f14;
  overflow: hidden;
}
.strategy-brand-emblem {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid #b98736;
  border-radius: 50%;
  color: #e4b75d;
  background: radial-gradient(circle, rgba(213,166,75,.18), transparent 65%);
  box-shadow: inset 0 0 0 3px rgba(218,170,88,.08);
}
.strategy-brand-emblem svg { width: 27px; height: 27px; }
.strategy-brand > span:last-child { min-width: 0; display: grid; line-height: .94; }
.strategy-brand strong { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.05rem, 1.55vw, 1.48rem); letter-spacing: .055em; color: #e2bd77; white-space: nowrap; }
.strategy-brand small { font-family: Georgia, 'Times New Roman', serif; font-size: .66rem; letter-spacing: .17em; color: #b8ad9a; white-space: nowrap; }
.strategy-brand em { margin-top: 4px; font-style: normal; color: #82909e; font-size: .52rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.v052-interface .game-topbar .resource-bar {
  min-width: 0;
  width: 100%;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(8, minmax(62px, 1fr));
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.v052-interface .game-topbar .resource-chip {
  min-width: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  align-items: center;
  justify-items: stretch;
  gap: 4px;
  padding: 5px 6px;
  border: 1px solid rgba(154,167,174,.32);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(26,37,44,.96), rgba(10,18,23,.96));
  overflow: hidden;
}
.v052-interface .game-topbar .resource-chip svg { width: 20px; height: 20px; color: #d7a950; filter: drop-shadow(0 0 3px rgba(213,164,72,.25)); }
.v052-interface .game-topbar .resource-chip > span { min-width: 0; display: grid; grid-template-rows: auto auto; gap: 2px; line-height: 1; }
.v052-interface .game-topbar .resource-chip small { display: block; min-width: 0; color: #c6c2b9; font-size: clamp(.42rem,.55vw,.58rem); font-weight: 800; letter-spacing: .045em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v052-interface .game-topbar .resource-chip strong { color: #f4f0e7; font-size: clamp(.72rem,.9vw,.94rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v052-interface .resource-label-short { display: none !important; }

.turn-command-cluster {
  min-width: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 72px 42px minmax(105px,1fr);
  gap: 4px;
  align-items: stretch;
}
.turn-command-cluster .turn-badge {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0 4px;
  padding: 5px 7px;
  border: 1px solid rgba(154,167,174,.32);
  background: #0c141a;
}
.turn-command-cluster .turn-badge span { grid-column: 1; grid-row: 1; font-size: .54rem; letter-spacing: .08em; color: #a9a79f; }
.turn-command-cluster .turn-badge strong { grid-column: 2; grid-row: 1; font-size: 1rem; color: #e5bd70; }
.turn-command-cluster .turn-badge small { grid-column: 1 / -1; grid-row: 2; color: #b9c2c8; font-size: .58rem; }
.turn-command-cluster .topbar-icon { width: 42px; height: 60px; min-height: 60px; border-radius: 2px; border: 1px solid rgba(154,167,174,.32); background: #111c24; }
.turn-command-cluster .top-turn-button { height: 60px; min-height: 60px; border-radius: 2px; border-color: #d2a34f; background: linear-gradient(180deg,#d7a84f,#9d671f); box-shadow: inset 0 1px rgba(255,255,255,.2); font-size: .74rem; }

.strategy-stage {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0,1fr) 118px;
  gap: 5px;
  padding: 5px 6px max(5px, env(safe-area-inset-bottom));
  overflow: hidden;
}
.v052-interface .strategy-workspace {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 190px minmax(0,1fr) minmax(285px, 300px);
  gap: 5px;
  padding: 0;
  overflow: hidden;
}

.strategy-command-menu {
  min-height: 0;
  display: grid;
  grid-template-rows: 32px minmax(0,1fr) auto;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(168,178,184,.34);
  background: linear-gradient(180deg,#101a20,#080e13);
  overflow: hidden;
}
.strategy-command-menu > header,
.command-news > header,
.intel-card > header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #d6a957;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .075em;
}
.strategy-command-menu > header svg,
.command-news > header svg,
.intel-card > header svg { width: 15px; height: 15px; }
.strategy-command-menu nav { min-height: 0; display: grid; grid-template-rows: repeat(6,minmax(0,1fr)); gap: 4px; }
.strategy-command-menu nav button {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(138,153,163,.3);
  border-radius: 2px;
  color: #e5e7e4;
  background: linear-gradient(180deg,rgba(27,41,49,.9),rgba(13,22,28,.92));
  text-align: left;
  overflow: hidden;
}
.strategy-command-menu nav button:hover,
.strategy-command-menu nav button.active { border-color: #3d91b2; background: linear-gradient(180deg,rgba(23,61,79,.95),rgba(11,35,49,.95)); }
.strategy-command-menu nav button > svg { width: 25px; height: 25px; color: #d9b064; }
.strategy-command-menu nav button > span { min-width: 0; display: grid; gap: 2px; }
.strategy-command-menu nav button b { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strategy-command-menu nav button small { color: #9da7ae; font-size: .47rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strategy-command-menu .nav-with-badge i { position: absolute; right: 4px; top: 4px; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #ba4960; color: white; font-size: .48rem; font-style: normal; }
.command-news { display: grid; gap: 4px; padding-top: 5px; border-top: 1px solid rgba(168,178,184,.22); }
.command-news p { margin: 0; padding: 4px 5px; color: #b8c0c5; background: rgba(255,255,255,.025); font-size: .47rem; line-height: 1.22; max-height: 2.55em; overflow: hidden; }

.v052-interface .map-column { min-width: 0; min-height: 0; height: 100%; position: relative; overflow: hidden; }
.v052-interface .map-shell { height: 100%; min-height: 0; border: 1px solid rgba(168,178,184,.34); border-radius: 1px; background: #07121b; box-shadow: inset 0 0 70px rgba(0,0,0,.55); }
.v052-interface .world-map { height: 100%; min-height: 0; background: #07121b; }
.terrain-raster { pointer-events: none; image-rendering: auto; }
.map-graticule { fill: none; stroke: rgba(176,202,215,.15); stroke-width: .32; vector-effect: non-scaling-stroke; }
.river-layer { pointer-events: none; }
.atlas-river { fill: none; stroke: rgba(101,164,195,.64); stroke-width: .7; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 .6px rgba(17,56,78,.85)); }
.atlas-river.major { stroke: rgba(118,182,211,.78); stroke-width: 1.0; }
.country-influence-layer { isolation: isolate; }
.v052-interface .country {
  stroke: rgba(235,225,202,.58);
  stroke-width: .62;
  fill-opacity: .32;
  mix-blend-mode: color;
  vector-effect: non-scaling-stroke;
  transition: fill-opacity .12s, filter .12s;
}
.v052-interface .map-layer-majority .country,
.v052-interface .map-layer-statePolicy .country { fill-opacity: .46; }
.v052-interface .country:hover { fill-opacity: .57; filter: brightness(1.18); }
.v052-interface .country.selected { fill-opacity: .66; mix-blend-mode: color; stroke: #ffd985; stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(255,207,113,.8)); }

.v052-interface .map-toolbar { top: 7px; left: auto; right: 7px; width: auto; display: grid; grid-template-columns: 38px; gap: 3px; }
.v052-interface .map-toolbar button { width: 38px; height: 38px; min-height: 38px; border-radius: 2px; background: rgba(7,14,19,.88); border-color: rgba(203,180,136,.45); }
.v052-interface .map-toolbar span { display: none; }
.v052-interface .layer-dock { left: 50%; right: auto; bottom: 7px; width: min(690px, calc(100% - 28px)); transform: translateX(-50%); grid-template-columns: repeat(8,minmax(0,1fr)); gap: 2px; padding: 4px; border-color: rgba(201,173,119,.42); border-radius: 2px; background: rgba(5,11,15,.9); }
.v052-interface .layer-dock button { min-height: 43px; grid-template-columns: auto; gap: 1px; font-size: .49rem; }
.v052-interface .layer-dock button svg { width: 17px; height: 17px; }
.v052-interface .map-legend { left: 8px; right: auto; bottom: 58px; max-width: min(720px,calc(100% - 70px)); background: rgba(5,11,15,.84); border-color: rgba(201,173,119,.35); }

.strategic-city-layer { pointer-events: auto; }
.city-marker { cursor: pointer; outline: none; }
.city-marker .city-halo { fill: rgba(238,188,85,.12); stroke: rgba(232,185,91,.55); stroke-width: .6; vector-effect: non-scaling-stroke; }
.city-marker .city-core { fill: #e0b25d; stroke: #090d10; stroke-width: 1; vector-effect: non-scaling-stroke; }
.city-marker .city-glyph { fill: #13171a; stroke: none; font-size: 3.4px; font-weight: 900; pointer-events: none; }
.city-marker .city-label { fill: #f1eadc; stroke: rgba(4,8,10,.96); stroke-width: 2.2px; paint-order: stroke fill; font-size: 5.2px; font-weight: 800; letter-spacing: .015em; pointer-events: none; }
.city-marker.selected .city-halo { fill: rgba(255,213,119,.38); stroke: #ffe09b; stroke-width: 1.4; }
.city-marker.selected .city-core { fill: #fff0bd; }
.world-map:not(.map-zoomed) .city-rank-2 .city-label,
.world-map:not(.map-deep-zoom) .city-rank-3 { display: none; }
.world-map.map-zoomed .city-rank-3 .city-label { display: none; }
.world-map.map-deep-zoom .city-rank-3 .city-label { display: block; }
.world-map.map-zoomed .city-label { font-size: 4.6px; }

.v052-interface .panel.region-panel { border-color: rgba(168,178,184,.34); background: linear-gradient(180deg,#101a20,#080e13); }
.city-region-line { display: block; max-width: 205px; margin-top: 2px; color: #aeb6ba; font-size: .47rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-inspection-mode > header { background: linear-gradient(90deg,rgba(205,154,64,.12),transparent); }

.strategy-bottom-dock {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.24fr .9fr .86fr .9fr 1.2fr;
  gap: 5px;
  overflow: hidden;
}
.intel-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 24px minmax(0,1fr);
  gap: 3px;
  padding: 5px 7px;
  border: 1px solid rgba(168,178,184,.34);
  background: linear-gradient(180deg,#101a20,#080e13);
  overflow: hidden;
}
.intel-card > header { justify-content: flex-start; border-bottom: 1px solid rgba(168,178,184,.17); }
.intel-card > header b { margin-left: auto; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #26343c; color: #d9b463; font-size: .5rem; }
.event-list { min-height: 0; display: grid; grid-template-rows: repeat(3,minmax(0,1fr)); gap: 2px; }
.event-list > div { min-width: 0; display: grid; grid-template-columns: 13px minmax(0,1fr) auto; align-items: center; gap: 4px; font-size: .47rem; }
.event-list svg { width: 11px; height: 11px; color: #d5a954; }
.event-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-list small { color: #8f9ba2; font-size: .43rem; }
.world-summary-visual { min-height: 0; display: grid; grid-template-columns: 70px 1fr; grid-template-rows: 1fr 1fr; gap: 3px 7px; align-items: center; }
.mini-globe { grid-row: 1 / -1; position: relative; width: 66px; height: 66px; align-self: center; border-radius: 50%; overflow: hidden; border: 1px solid #5b7581; background: radial-gradient(circle at 32% 30%,#39586b,#132734 65%,#07131a); box-shadow: inset -8px -8px 16px rgba(0,0,0,.42); }
.mini-globe::before { content:''; position:absolute; inset:14px 7px 11px 12px; border-radius: 48% 52% 45% 55%; background:#78875d; transform:rotate(-16deg); opacity:.72; }
.mini-globe i { position:absolute; left:0; bottom:0; height:5px; background:#b34e73; z-index:2; }
.world-summary-visual > div:not(.mini-globe) { min-width: 0; display:grid; }
.world-summary-visual span { color:#9ba6ac; font-size:.47rem; }
.world-summary-visual strong { font-size:.7rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.turn-metrics { display:grid; grid-template-rows:1fr 1fr; gap:4px; }
.turn-metrics > div { min-width:0; display:grid; grid-template-columns:23px minmax(0,1fr); align-items:center; gap:5px; padding:3px 5px; background:rgba(255,255,255,.025); }
.turn-metrics svg { width:19px; color:#d6aa54; }
.turn-metrics span { min-width:0; display:grid; }
.turn-metrics b { font-size:.68rem; color:#8fcf83; }
.turn-metrics small { color:#9da7ad; font-size:.46rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.advisor-content { min-height:0; display:grid; grid-template-columns:62px minmax(0,1fr); gap:7px; align-items:center; }
.advisor-content .founder-portrait.compact { width:58px; height:76px; margin:0; border-radius:2px; overflow:hidden; }
.advisor-content .founder-portrait.compact img { width:100%; height:100%; object-fit:cover; }
.advisor-content p { margin:0; color:#c3c8c9; font-size:.49rem; line-height:1.35; max-height:4.1em; overflow:hidden; }
.victory-card { grid-template-rows:24px auto auto minmax(24px,1fr); }
.victory-card > strong { color:#bd77d2; font-size:.58rem; letter-spacing:.04em; }
.victory-card p { margin:2px 0; color:#b9c0c4; font-size:.47rem; }
.victory-progress { position:relative; min-height:23px; margin-top:3px; background:#1b2429; border:1px solid rgba(168,178,184,.2); overflow:hidden; }
.victory-progress i { position:absolute; inset:0 auto 0 0; background:linear-gradient(90deg,#70448d,#aa5cc0); }
.victory-progress span { position:absolute; inset:0; display:grid; place-items:center; font-size:.52rem; font-weight:900; }

@media (max-width: 1180px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar { grid-template-columns: 190px minmax(0,1fr) 205px; }
  .strategy-brand { grid-template-columns: 39px minmax(0,1fr); padding:3px 5px; }
  .strategy-brand-emblem { width:36px; height:36px; }
  .strategy-brand strong { font-size:1rem; }
  .strategy-brand small { font-size:.53rem; }
  .strategy-brand em { display:none; }
  .v052-interface .game-topbar .resource-bar { grid-template-columns:repeat(8,minmax(45px,1fr)); }
  .v052-interface .game-topbar .resource-chip { grid-template-columns:15px minmax(0,1fr); padding:3px; }
  .v052-interface .game-topbar .resource-chip svg { width:14px; height:14px; }
  .v052-interface .resource-label-full { display:none !important; }
  .v052-interface .resource-label-short { display:block !important; }
  .v052-interface .strategy-workspace { grid-template-columns: 64px minmax(0,1fr) minmax(258px,29vw); }
  .strategy-command-menu { grid-template-rows:28px minmax(0,1fr); padding:3px; }
  .strategy-command-menu > header span, .command-news { display:none; }
  .strategy-command-menu nav button { grid-template-columns:1fr; place-items:center; padding:2px; text-align:center; }
  .strategy-command-menu nav button > svg { width:21px; height:21px; }
  .strategy-command-menu nav button small { display:none; }
  .strategy-command-menu nav button b { font-size:.5rem; }
  .strategy-bottom-dock { grid-template-columns:1.25fr .85fr .85fr 1fr; }
  .world-summary-card { display:none; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface { grid-template-rows:56px minmax(0,1fr); }
  .v052-interface .strategy-command-bar { height:56px; min-height:56px; }
  .strategy-brand, .v052-interface .game-topbar .resource-bar, .turn-command-cluster { height:46px; }
  .v052-interface .game-topbar .resource-chip { height:46px; }
  .turn-command-cluster .turn-badge, .turn-command-cluster .topbar-icon, .turn-command-cluster .top-turn-button { height:46px; min-height:46px; }
  .strategy-stage { grid-template-rows:minmax(0,1fr) 88px; }
  .strategy-command-menu nav button small, .command-news { display:none; }
  .strategy-command-menu nav button { grid-template-columns:27px minmax(0,1fr); }
  .intel-card { grid-template-rows:19px minmax(0,1fr); padding:3px 5px; }
  .intel-card > header { font-size:.48rem; }
  .event-list > div:nth-child(3) { display:none; }
  .event-list { grid-template-rows:1fr 1fr; }
  .advisor-content .founder-portrait.compact { width:44px; height:57px; }
  .advisor-content { grid-template-columns:46px minmax(0,1fr); }
  .mini-globe { width:48px; height:48px; }
  .world-summary-visual { grid-template-columns:52px 1fr; }
}

/* v0.5.2.1 — half-month calendar, persistent map compositor and compact dock */
.map-transform-layer {
  transform-box: view-box;
  transform-origin: 0 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.world-map .city-marker,
.world-map .city-label { transition: opacity .16s ease; }
.world-map .city-rank-2 { opacity: 0; pointer-events: none; }
.world-map.map-zoom-1 .city-rank-2 { opacity: .9; pointer-events: auto; }
.world-map .city-rank-2 .city-label { opacity: 0; }
.world-map.map-zoom-2 .city-rank-2 .city-label { opacity: 1; }
.world-map .city-rank-3 { opacity: 0; pointer-events: none; }
.world-map.map-zoom-3 .city-rank-3 { opacity: .9; pointer-events: auto; }
.world-map .city-rank-3 .city-label { opacity: 0; }
.world-map.map-zoom-4 .city-rank-3 .city-label { opacity: 1; }
.world-map.map-zoom-2 .city-label { font-size: 4.6px; }

.turn-command-cluster {
  grid-template-columns: minmax(146px, 1fr) 48px 42px 42px minmax(105px, 1fr);
}
.turn-command-cluster .date-badge {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}
.turn-command-cluster .date-badge span,
.turn-command-cluster .date-badge strong { grid-column: 1; }
.turn-command-cluster .date-badge strong { font-size: .78rem; white-space: nowrap; }
.turn-count-badge {
  height: 60px;
  display: grid;
  place-content: center;
  gap: 3px;
  border: 1px solid rgba(154,167,174,.32);
  background: #0c141a;
  text-align: center;
}
.turn-count-badge span { color: #a9a79f; font-size: .48rem; letter-spacing: .08em; text-transform: uppercase; }
.turn-count-badge strong { color: #e5bd70; font-size: 1rem; }
.strategy-stage { grid-template-rows: minmax(0,1fr) 82px; }
.strategy-command-menu nav button b { overflow: visible; text-overflow: clip; }

.strategy-bottom-dock.tabbed-bottom-dock {
  display: grid;
  grid-template-columns: minmax(520px, 44%) minmax(0, 1fr);
  gap: 5px;
  border: 1px solid rgba(168,178,184,.34);
  background: linear-gradient(180deg,#101a20,#080e13);
  padding: 4px;
}
.bottom-dock-tabs { min-width: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; }
.bottom-dock-tabs button { position: relative; min-width: 0; display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: center; gap: 4px; padding: 4px 5px; border: 1px solid rgba(138,153,163,.28); border-radius: 2px; color: #b9c1c5; background: rgba(20,32,39,.9); font-size: .52rem; }
.bottom-dock-tabs button.active { color: #f1eadc; border-color: #3d91b2; background: rgba(20,62,81,.86); }
.bottom-dock-tabs svg { width: 15px; height: 15px; color: #d6aa54; }
.bottom-dock-tabs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-dock-tabs b { position: absolute; right: 2px; top: 2px; min-width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; background: #ba4960; font-size: .42rem; }
.bottom-dock-panel { min-width: 0; min-height: 0; display: grid; align-items: center; padding: 2px 7px; overflow: hidden; }
.compact-events { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.compact-events > div { min-width: 0; display: grid; grid-template-columns: 14px minmax(0,1fr); align-items: center; gap: 4px; color: #c3c8c9; font-size: .49rem; }
.compact-events svg { width: 12px; color: #d5a954; }
.compact-events span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-world, .compact-turn, .compact-victory { min-width: 0; display: flex; align-items: center; gap: 16px; }
.compact-world > svg, .compact-victory > svg { width: 25px; color: #d6aa54; }
.compact-world span { color: #9da7ad; font-size: .52rem; white-space: nowrap; }
.compact-world b { color: #f1eadc; margin-left: 4px; }
.compact-turn { justify-content: space-around; }
.compact-turn > span { min-width: 0; display: grid; grid-template-columns: 18px auto; grid-template-rows: auto auto; column-gap: 5px; align-items: center; }
.compact-turn svg { grid-row: 1 / -1; width: 16px; color: #d6aa54; }
.compact-turn b { color: #8fcf83; font-size: .65rem; }
.compact-turn small { color: #9da7ad; font-size: .44rem; white-space: nowrap; }
.compact-turn .negative b { color: #e17777; }
.compact-advisor { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 7px; }
.compact-advisor .founder-portrait.compact { width: 38px; height: 50px; overflow: hidden; }
.compact-advisor p { margin: 0; color: #c3c8c9; font-size: .51rem; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.compact-victory strong { color: #bd77d2; font-size: .55rem; white-space: nowrap; }
.compact-victory p { margin: 0; color: #b9c0c4; font-size: .48rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-victory .victory-progress { flex: 1; min-width: 90px; margin: 0; }
.fixed-calendar-cadence { min-height: 40px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-raised); color: var(--text); font-weight: 700; }

@media (max-width: 1180px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar { grid-template-columns: 150px minmax(0,1fr) minmax(340px, 39vw); }
  .v052-interface .strategy-workspace { grid-template-columns: 118px minmax(0,1fr) minmax(245px,27vw); }
  .strategy-command-menu > header span { display: none; }
  .strategy-command-menu nav button { grid-template-columns: 24px minmax(0,1fr); place-items: center start; padding: 3px 4px; text-align: left; }
  .strategy-command-menu nav button > svg { width: 19px; height: 19px; }
  .strategy-command-menu nav button b { font-size: .52rem; }
  .strategy-command-menu nav button small, .command-news { display: none; }
  .strategy-bottom-dock.tabbed-bottom-dock { grid-template-columns: minmax(430px,50%) minmax(0,1fr); }
  .bottom-dock-tabs button { grid-template-columns: 14px minmax(0,1fr); padding: 3px; font-size: .45rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .strategy-stage { grid-template-rows: minmax(0,1fr) 68px; }
  .turn-command-cluster .turn-badge, .turn-count-badge, .turn-command-cluster .topbar-icon, .turn-command-cluster .top-turn-button { height:46px; min-height:46px; }
  .strategy-bottom-dock.tabbed-bottom-dock { grid-template-columns: minmax(390px,52%) minmax(0,1fr); }
  .bottom-dock-tabs button { font-size: .42rem; }
}
.world-map .city-rank-2, .world-map .city-rank-3 { display: inline !important; }
.finance-detail-grid { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.finance-detail-grid article { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: .56rem; }
.finance-detail-grid span { color: var(--muted); }
.finance-detail-grid b { color: #e8d39f; }
.finance-summary-card b.negative { color: #e17777; }

/* v0.5.4 premium founder flow, resource popovers and report theming */
.v052-interface.lang-en .strategy-brand strong {
  font-size: clamp(.78rem, 1.05vw, 1rem) !important;
  letter-spacing: .04em !important;
}
.v052-interface.lang-en .strategy-brand small {
  font-size: .48rem !important;
  letter-spacing: .1em !important;
}
.v052-interface .strategy-brand > span:last-child { min-width: 0; overflow: hidden; }
.v052-interface .strategy-brand strong, .v052-interface .strategy-brand small { overflow: hidden; text-overflow: ellipsis; }

.resource-bar { position: relative; }
.resource-chip-shell { position: relative; min-width: 0; }
.resource-chip-shell.is-open { z-index: 4; }
.resource-detail-popover {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: min(235px, 38vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(216,170,88,.35);
  background: linear-gradient(180deg, rgba(11,19,31,.98), rgba(16,27,43,.98));
  box-shadow: 0 20px 32px rgba(0,0,0,.35);
  color: #eef2f6;
}
.resource-detail-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: 1px solid rgba(216,170,88,.35);
  border-top: 1px solid rgba(216,170,88,.35);
  transform: rotate(45deg);
}
.resource-detail-popover strong { display: block; margin-bottom: 6px; color: #f0c877; font-size: .72rem; }
.resource-detail-popover p { margin: 0 0 6px; font-size: .63rem; line-height: 1.45; color: #d8dfe7; }
.resource-detail-popover small { display: block; color: #98a8b7; font-size: .57rem; line-height: 1.4; }
.game-topbar .resource-bar .resource-label-full { display: block; }
.game-topbar .resource-bar .resource-label-short { display: none; }
@media (max-width: 1180px) {
  .game-topbar .resource-bar .resource-label-full { display: none; }
  .game-topbar .resource-bar .resource-label-short { display: block; }
  .resource-detail-popover { width: min(215px, 44vw); }
}

.founder-hero-refined {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}
.founder-hero-refined .founder-hero-portrait {
  position: relative;
  min-height: 280px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.founder-hero-refined .founder-hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: saturate(.92) contrast(1.04);
}
.founder-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(4,8,14,0), rgba(4,8,14,.88) 40%, rgba(4,8,14,.95));
}
.founder-hero-overlay strong { display: block; margin-top: 4px; font-size: 1.15rem; color: #f2e0b5; }
.founder-hero-refined .founder-hero-copy { padding: 12px 14px 14px; display: grid; gap: 11px; }
.founder-hero-summary { margin: 0; font-size: .68rem; line-height: 1.55; color: var(--text-soft); }
.founder-lock-strip {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(216,170,88,.2);
  background: linear-gradient(180deg, rgba(216,170,88,.10), rgba(216,170,88,.05));
}
.founder-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(216,170,88,.12);
  color: #f1c676;
}
.founder-lock-strip small { color: var(--text-soft); font-size: .61rem; line-height: 1.45; }


.founder-prelude-backdrop { backdrop-filter: blur(8px) saturate(1.05); }
.founder-prelude-modal {
  width: min(980px, 94vw);
  max-width: 980px;
  max-height: min(88vh, 760px);
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  border: 1px solid rgba(184,145,76,.28);
  border-radius: 24px;
  overflow: hidden;
  background: #101318;
}
.founder-prelude-stage {
  position: relative;
  min-height: 520px;
  background:
    radial-gradient(circle at 50% 14%, rgba(236,194,112,.20), rgba(236,194,112,0) 30%),
    radial-gradient(circle at 50% 60%, rgba(31,58,87,.24), rgba(31,58,87,0) 52%),
    linear-gradient(180deg, #19263a 0%, #0f1a28 45%, #091119 100%);
  overflow: hidden;
}
.founder-prelude-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.10), transparent 2%),
    radial-gradient(circle at 74% 26%, rgba(255,255,255,.10), transparent 2%),
    radial-gradient(circle at 60% 10%, rgba(255,255,255,.08), transparent 1.8%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  opacity: .65;
}
.founder-prelude-halo {
  position: absolute;
  left: 50%;
  top: 78px;
  width: 180px;
  height: 180px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,212,143,.22) 0%, rgba(244,212,143,.10) 38%, rgba(244,212,143,0) 72%);
  filter: blur(1px);
}
.founder-prelude-medallion {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid rgba(225,182,101,.75);
  background: linear-gradient(180deg, rgba(15,24,36,.98), rgba(8,14,23,.98));
  box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
}
.founder-prelude-medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.founder-prelude-ground {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -42px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 20%, rgba(7,11,18,.22), rgba(4,8,12,.96) 72%);
}
.founder-prelude-figure {
  position: absolute;
  left: 50%;
  bottom: 88px;
  width: 132px;
  height: 236px;
  transform: translateX(-50%);
}
.founder-prelude-head, .founder-prelude-body, .founder-prelude-cloak, .founder-prelude-staff { position: absolute; display: block; }
.founder-prelude-head { left: 50px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #171c22, #06090d); }
.founder-prelude-body { left: 46px; top: 42px; width: 38px; height: 76px; border-radius: 24px 24px 16px 16px; background: linear-gradient(180deg, #171d24, #090d12); }
.founder-prelude-cloak {
  left: 18px;
  top: 58px;
  width: 96px;
  height: 154px;
  clip-path: polygon(18% 0%, 82% 0%, 96% 100%, 4% 100%);
  border-radius: 24px 24px 16px 16px;
  background: linear-gradient(180deg, #112033 0%, #0b1624 52%, #09111a 100%);
  box-shadow: inset 0 0 18px rgba(255,255,255,.05);
}
.founder-prelude-staff { right: 14px; top: 12px; width: 6px; height: 186px; border-radius: 999px; background: linear-gradient(180deg, #bf9352, #6d4c28 42%, #352313); box-shadow: 0 0 16px rgba(183,141,73,.24); }
.founder-prelude-caption {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 1;
  width: min(560px, calc(100% - 56px));
  transform: translateX(-50%);
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(5,9,14,.58), rgba(5,9,14,.92));
  border: 1px solid rgba(225,182,101,.18);
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}
.founder-prelude-caption strong { font-family: Georgia, 'Times New Roman', serif; font-size: 1.08rem; color: #f2d39a; letter-spacing: .03em; }
.founder-prelude-caption small { color: #d7dce2; letter-spacing: .06em; text-align: center; }
.founder-prelude-caption p { margin: 2px 0 0; font-size: .78rem; line-height: 1.55; color: #e6dcc8; text-align: center; max-width: 46ch; }
.founder-prelude-scroll {
  position: relative;
  overflow: auto;
  padding: 30px 28px 24px;
  background: linear-gradient(180deg, #e2ca97, #d7bd88 26%, #d0b57f 100%);
}
.founder-prelude-scroll::before,
.founder-prelude-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(180deg, rgba(96,70,33,.22), rgba(96,70,33,.06));
}
.founder-prelude-scroll::before { left: 0; }
.founder-prelude-scroll::after { right: 0; }
.founder-prelude-scroll-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(86,59,25,.10);
  color: #6c4d23;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .10em;
}
.founder-prelude-scroll h2 { margin: 0 0 12px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.95rem; color: #352411; }
.founder-prelude-scroll p { margin: 0 0 15px; font-size: .93rem; line-height: 1.72; color: #49331b; }
.founder-prelude-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.founder-prelude-meta > div { padding: 10px 12px; border-radius: 10px; background: rgba(94,67,33,.08); }
.founder-prelude-meta span { display: block; margin-bottom: 4px; font-size: .62rem; text-transform: uppercase; letter-spacing: .09em; color: #7d5c2d; }
.founder-prelude-meta strong { display: block; font-size: .74rem; line-height: 1.45; color: #332413; }
.founder-prelude-scroll blockquote { margin: 0; padding: 14px 16px; border-left: 4px solid rgba(120,84,34,.45); background: rgba(92,63,26,.08); font-style: italic; font-size: .92rem; line-height: 1.6; color: #3a2814; }
.founder-prelude-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.founder-prelude-actions span { display: inline-flex; align-items: center; gap: 8px; color: #6c5331; font-size: .66rem; }

@media (max-width: 900px) {
  .founder-prelude-modal { grid-template-columns: 1fr; width: min(94vw, 720px); max-height: 92vh; }
  .founder-prelude-stage { min-height: 240px; }
  .founder-prelude-medallion { width: 66px; height: 66px; top: 18px; left: 18px; }
  .founder-prelude-halo { width: 138px; height: 138px; top: 42px; }
  .founder-prelude-figure { width: 102px; height: 184px; bottom: 58px; }
  .founder-prelude-head { left: 38px; top: 14px; width: 24px; height: 24px; }
  .founder-prelude-body { left: 35px; top: 34px; width: 30px; height: 60px; }
  .founder-prelude-cloak { left: 15px; top: 48px; width: 72px; height: 120px; }
  .founder-prelude-staff { height: 144px; right: 10px; }
  .founder-prelude-caption { left: 50%; width: min(92%, 440px); transform: translateX(-50%); bottom: 16px; padding: 10px 12px; }
  .founder-prelude-caption strong { font-size: .98rem; }
  .founder-prelude-caption small { font-size: .74rem; }
  .founder-prelude-scroll { padding: 22px 18px 18px; }
  .founder-prelude-scroll h2 { font-size: 1.55rem; }
  .founder-prelude-actions { flex-direction: column; align-items: stretch; }
  .founder-prelude-meta { grid-template-columns: 1fr; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .founder-prelude-modal {
    width: min(980px, 96vw);
    max-height: 94vh;
    grid-template-columns: 300px minmax(0,1fr);
  }
  .founder-prelude-stage { min-height: 0; }
  .founder-prelude-medallion { width: 58px; height: 58px; top: 14px; left: 14px; }
  .founder-prelude-halo { width: 118px; height: 118px; top: 26px; }
  .founder-prelude-figure { width: 92px; height: 162px; bottom: 56px; }
  .founder-prelude-head { left: 34px; top: 12px; width: 22px; height: 22px; }
  .founder-prelude-body { left: 32px; top: 30px; width: 28px; height: 54px; }
  .founder-prelude-cloak { left: 13px; top: 42px; width: 66px; height: 108px; }
  .founder-prelude-staff { height: 130px; right: 9px; top: 10px; }
  .founder-prelude-caption { left: 50%; width: min(92%, 420px); transform: translateX(-50%); bottom: 14px; gap: 3px; padding: 8px 10px; }
  .founder-prelude-caption strong { font-size: .9rem; }
  .founder-prelude-caption small { font-size: .68rem; }
  .founder-prelude-scroll { padding: 18px 18px 16px; }
  .founder-prelude-scroll-mark { padding: 8px 12px; margin-bottom: 14px; font-size: .64rem; }
  .founder-prelude-scroll h2 { margin-bottom: 8px; font-size: 1.32rem; }
  .founder-prelude-scroll p { margin-bottom: 10px; font-size: .82rem; line-height: 1.54; }
  .founder-prelude-meta { gap: 8px; margin-bottom: 12px; }
  .founder-prelude-meta > div { padding: 8px 10px; }
  .founder-prelude-scroll blockquote { padding: 10px 12px; font-size: .84rem; }
  .founder-prelude-actions { margin-top: 12px; gap: 10px; }
  .founder-prelude-actions span { font-size: .61rem; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .menu-screen.landscape-menu { grid-template-columns: minmax(0,1.3fr) minmax(300px,.78fr); }
  .menu-identity .world-influence-hero { inset-right: 45%; width: 54%; }
  .menu-title-block { width: 62%; padding: 10px; }
  .menu-screen h1 { font-size: clamp(1.75rem,5.4vw,3.1rem); }
  .menu-identity .disclaimer { margin: 0 7px 7px; padding: 5px 7px; }
}

/* Labelled resource command bar. */
.game-screen.grand-strategy-screen { grid-template-rows: 54px minmax(0,1fr); }
.game-topbar { height: 54px; min-height: 54px; grid-template-columns: 38px 54px minmax(115px,165px) minmax(390px,1fr) 38px 100px; gap: 4px; }
.game-topbar .resource-bar { height: 46px; grid-template-columns: repeat(8,minmax(43px,1fr)); gap: 3px; }
.game-topbar .resource-chip { height: 42px; min-height: 0; padding: 3px; grid-template-columns: 13px minmax(0,1fr); justify-items: stretch; align-items: center; gap: 3px; border-radius: 5px; }
.game-topbar .resource-chip > span { min-width: 0; display: grid; line-height: .92; }
.game-topbar .resource-chip small { display: block; min-width: 0; color: var(--muted); font-size: clamp(.36rem,.48vw,.48rem); font-weight: 800; letter-spacing: .025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-topbar .resource-chip strong { font-size: clamp(.55rem,.72vw,.72rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-topbar .resource-chip svg { width: 12px; height: 12px; }
.game-topbar .religion-title small { font-size: .52rem; }
@media (max-width: 930px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 34px 48px minmax(88px,110px) minmax(350px,1fr) 34px 84px; }
  .game-topbar .religion-title small { display: none; }
  .game-topbar .resource-chip { grid-template-columns: 11px minmax(0,1fr); padding: 2px; }
  .game-topbar .resource-chip small { font-size: .34rem; }
  .game-topbar .resource-chip strong { font-size: .53rem; }
}

/* Three-stage campaign builder. */
.new-campaign-screen .campaign-header { display: grid; grid-template-columns: 42px minmax(180px,.7fr) minmax(360px,1.3fr); }
.campaign-stepper { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.campaign-stepper button { min-height: 32px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: .62rem; font-weight: 800; }
.campaign-stepper button.active { border-color: var(--accent); color: var(--accent); background: rgba(216,170,88,.1); }
.campaign-workbench { display: grid; grid-template-rows: minmax(0,1fr) 39px; gap: 6px; padding: 6px !important; }
.founder-selection-workbench { min-height: 0; display: grid; grid-template-columns: minmax(230px,.72fr) minmax(255px,.86fr) minmax(360px,1.42fr); gap: 6px; }
.founder-hero-card, .founder-gallery-workbench, .archetype-catalog, .attribute-summary-card, .allocation-board, .attribute-impact-card, .world-settings-grid, .campaign-summary-card { min-height: 0; border: 1px solid var(--border); background: var(--surface-2); }
.founder-hero-card { display: grid; grid-template-columns: minmax(105px,.62fr) 1fr; gap: 7px; padding: 7px; align-items: center; }
.founder-hero-portrait { min-height: 0; height: 100%; max-height: calc(100dvh - 130px); overflow: hidden; border-radius: 7px; border: 1px solid rgba(216,170,88,.35); background: #080f19; }
.founder-hero-portrait img { width: 100%; height: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; display: block; filter: contrast(1.04) saturate(.94); }
.founder-hero-copy { min-width: 0; display: grid; align-content: center; gap: 5px; }
.founder-hero-copy h2, .founder-hero-copy p { margin: 0; }
.founder-hero-copy h2 { font-size: clamp(.85rem,1.35vw,1.16rem); }
.founder-hero-copy p { color: var(--muted); font-size: .58rem; line-height: 1.32; }
.founder-lock-note { display: grid; grid-template-columns: 18px 1fr; gap: 5px; padding: 6px; border: 1px solid rgba(216,170,88,.28); background: rgba(216,170,88,.07); color: #d9c7a1; font-size: .5rem; line-height: 1.25; }
.founder-lock-note svg { width: 17px; color: var(--accent); }
.founder-gallery-workbench { display: grid; grid-template-rows: minmax(0,1fr) 31px auto; gap: 4px; padding: 5px; overflow: hidden; }
.portrait-gallery-large { min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px; }
.portrait-gallery-large button { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; background: #080f19; color: var(--text); }
.portrait-gallery-large button.selected { border: 2px solid var(--accent); box-shadow: 0 0 0 1px rgba(216,170,88,.18); }
.portrait-gallery-large img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; filter: contrast(1.05) saturate(.94); }
.portrait-gallery-large button > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px; background: linear-gradient(transparent,rgba(0,0,0,.92)); font-size: .44rem; font-weight: 800; }
.portrait-gallery-large button > svg { position: absolute; right: 3px; top: 3px; width: 14px; padding: 2px; border-radius: 50%; background: rgba(0,0,0,.78); color: var(--accent); }
.portrait-upload-button { min-height: 30px; height: 30px; font-size: .52rem; }
.founder-gallery-workbench > small { color: var(--muted); font-size: .44rem; line-height: 1.15; text-align: center; }
.archetype-catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr)); gap: 4px; padding: 5px; overflow: hidden; }
.archetype-catalog > button { min-height: 0; display: grid; grid-template-rows: auto auto auto auto; gap: 2px; padding: 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); text-align: left; overflow: hidden; }
.archetype-catalog > button.selected { border-color: var(--accent); background: rgba(216,170,88,.09); }
.archetype-catalog header { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.archetype-catalog header strong { min-width: 0; font-size: .56rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archetype-catalog header small { flex: 0 0 auto; color: var(--accent); font-size: .38rem; }
.archetype-catalog header svg { width: 12px; }
.archetype-catalog p, .archetype-catalog span { margin: 0; font-size: .43rem; line-height: 1.15; overflow: hidden; }
.archetype-catalog p { color: var(--muted); }
.positive { color: #79d6a4; }.negative { color: #ef8798; }
.attribute-workbench { min-height: 0; display: grid; grid-template-columns: minmax(220px,.65fr) minmax(380px,1.25fr) minmax(250px,.8fr); gap: 6px; }
.attribute-summary-card { display: grid; grid-template-rows: minmax(0,1fr) auto auto auto auto; gap: 4px; padding: 7px; text-align: center; }
.attribute-summary-card img { justify-self: center; min-height: 0; height: 100%; max-height: calc(100dvh - 225px); aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; border-radius: 6px; }
.attribute-summary-card h2, .attribute-summary-card p { margin: 0; }
.attribute-summary-card .secondary-button { min-height: 31px; }
.allocation-board { display: grid; grid-template-rows: repeat(5,minmax(0,1fr)); gap: 6px; padding: 10px; align-content: center; }
.allocation-row-large { min-height: 0; display: grid; grid-template-columns: 110px 1fr 42px; gap: 9px; align-items: center; padding: 7px 9px; border: 1px solid var(--border); background: var(--surface); font-size: .7rem; }
.allocation-row-large input { width: 100%; }
.allocation-row-large b { text-align: center; color: var(--accent); font-size: .88rem; }
.attribute-impact-card { display: grid; align-content: center; gap: 7px; padding: 10px; }
.attribute-impact-card h3, .attribute-impact-card p { margin: 0; }
.attribute-impact-card article { padding: 8px; border: 1px solid var(--border); background: var(--surface); }
.attribute-impact-card article p, .attribute-impact-card small { color: var(--muted); font-size: .56rem; line-height: 1.35; }
.world-setup-workbench { min-height: 0; display: grid; grid-template-columns: minmax(400px,1.4fr) minmax(260px,.6fr); gap: 6px; }
.world-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px; align-content: center; }
.world-settings-grid label { display: grid; gap: 4px; margin: 0; font-size: .64rem; font-weight: 800; }
.world-settings-grid select, .world-settings-grid input { width: 100%; height: 37px; min-height: 37px; padding: 0 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); }
.world-settings-grid label:nth-child(2), .world-settings-grid .info-callout { grid-column: 1/-1; }
.world-settings-grid .info-callout { margin: 0; }
.campaign-summary-card { display: grid; grid-template-columns: minmax(90px,.55fr) 1fr; grid-template-rows: minmax(0,1fr) auto auto; gap: 7px; padding: 9px; align-items: center; }
.campaign-summary-card img { width: 100%; height: 100%; min-height: 0; grid-row: 1/4; object-fit: cover; object-position: 50% 18%; border-radius: 6px; }
.campaign-summary-card div { display: grid; }
.campaign-summary-card span, .campaign-summary-card small { color: var(--muted); font-size: .55rem; }
.campaign-summary-card strong { font-size: 1rem; }
.campaign-summary-card p { margin: 0; font-size: .55rem; line-height: 1.25; }
.campaign-footer { display: grid; grid-template-columns: 110px minmax(0,1fr) 150px; gap: 7px; align-items: center; }
.campaign-footer button { min-height: 36px; height: 36px; }
.campaign-progress { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.campaign-progress i { display: block; height: 100%; background: linear-gradient(90deg,#9b6b34,var(--accent)); transition: width .2s ease; }
.founder-lock-workbench { min-height: 0; display: grid; place-items: center; align-content: center; gap: 6px; padding: 12px; border: 1px solid rgba(216,170,88,.32); background: rgba(216,170,88,.07); text-align: center; }
.founder-lock-workbench svg { width: 34px; height: 34px; color: var(--accent); }
.founder-lock-workbench strong { font-size: .78rem; }
.founder-lock-workbench p { max-width: 270px; margin: 0; color: var(--muted); font-size: .52rem; line-height: 1.35; }

/* Atlas styling and strategic city foundation. */
.ocean { fill: url(#ocean-gradient); }
.map-graticule { fill: none; stroke: rgba(159,184,211,.12); stroke-width: .45; pointer-events: none; }
.country { stroke: rgba(218,229,241,.34); stroke-width: .48; paint-order: stroke fill; }
.country:not(.selected) { filter: drop-shadow(0 .35px .25px rgba(0,0,0,.22)); }
.strategic-city-layer { pointer-events: none; }
.city-marker > circle:first-child { fill: #f2d48d; stroke: #101722; stroke-width: .9; vector-effect: non-scaling-stroke; }
.city-marker.capital > circle:first-child { fill: #fff1bd; stroke: #b57c38; stroke-width: 1.2; }
.city-marker .city-halo { fill: none; stroke: rgba(242,212,141,.42); stroke-width: .75; vector-effect: non-scaling-stroke; }
.city-marker text { fill: #eef3f8; stroke: rgba(5,9,15,.94); stroke-width: 2px; paint-order: stroke fill; font-size: 6px; font-weight: 800; letter-spacing: .02em; vector-effect: non-scaling-stroke; }
.city-rank-2 text { display: none; }
.world-map.map-zoomed .city-rank-2 text { display: block; }
.world-map.map-zoomed .city-marker text { font-size: 5px; }
.theopolitics-preview { display: grid; grid-template-columns: 30px 1fr; gap: 7px; padding: 7px; border: 1px solid rgba(216,170,88,.34); background: rgba(216,170,88,.07); }
.theopolitics-preview > svg { width: 27px; color: var(--accent); }
.theopolitics-preview strong { font-size: .64rem; }
.theopolitics-preview p { margin-top: 3px; font-size: .48rem; }
.settings-card-v051 { grid-template-columns: 1.15fr 1.2fr 1fr 1fr 1fr; }
.settings-card-v051 fieldset small { display: block; margin-bottom: 7px; color: var(--muted); font-size: .55rem; }
.settings-card-v051 legend { display: inline-flex; align-items: center; gap: 5px; }
.language-control { grid-template-columns: 1fr 1fr !important; }

@media (max-height: 410px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen { grid-template-rows: 48px minmax(0,1fr); }
  .game-topbar { height: 48px; min-height: 48px; }
  .game-topbar .resource-bar { height: 40px; }
  .game-topbar .resource-chip { height: 37px; }
  .founder-selection-workbench { grid-template-columns: 205px 240px minmax(335px,1fr); }
  .founder-hero-copy p { display: none; }
  .founder-lock-note { font-size: .43rem; }
  .portrait-gallery-large button > span { display: none; }
  .archetype-catalog > button { padding: 3px; }
  .archetype-catalog p { display: none; }
  .attribute-summary-card img { max-height: 120px; }
}

.portrait-gallery-toolbar { min-width: 0; display: grid; grid-template-columns: 30px 38px 30px minmax(0,1fr); gap: 4px; align-items: center; }
.portrait-gallery-toolbar > span { text-align: center; color: var(--muted); font-size: .52rem; font-weight: 800; }
.portrait-gallery-toolbar .icon-button { width: 30px; min-width: 30px; height: 30px; min-height: 30px; }
.portrait-gallery-toolbar .portrait-upload-button { width: 100%; min-width: 0; }

/* v0.5.1.1 — compact command bar, collision fixes and atlas polish */
.game-topbar {
  grid-template-columns: 40px 78px minmax(104px, 148px) minmax(292px, 1fr) 40px 96px;
  gap: 4px;
  min-width: 0;
}
.game-topbar > * { min-width: 0; }
.game-topbar .turn-badge {
  height: 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 5px;
  align-items: center;
  padding: 3px 5px;
  overflow: hidden;
  border-left: 1px solid rgba(216,170,88,.22);
  border-right: 1px solid rgba(216,170,88,.12);
}
.game-topbar .turn-badge span { grid-column: 1; grid-row: 1; font-size: .44rem; letter-spacing: .08em; color: var(--muted); }
.game-topbar .turn-badge strong { grid-column: 2; grid-row: 1; justify-self: end; font-size: .88rem; line-height: 1; white-space: nowrap; }
.game-topbar .turn-badge small { grid-column: 1 / -1; grid-row: 2; font-size: .48rem; color: var(--accent); white-space: nowrap; }
.game-topbar .religion-title { min-width: 0; display: grid; align-content: center; gap: 2px; overflow: hidden; padding: 0 3px; }
.game-topbar .religion-title span,
.game-topbar .religion-title small { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-topbar .religion-title span { font-size: clamp(.62rem, 1vw, .78rem); font-weight: 900; }
.game-topbar .religion-title small { font-size: .46rem; color: var(--muted); }
.game-topbar .resource-bar { min-width: 0; width: 100%; grid-template-columns: repeat(8, minmax(34px, 1fr)); gap: 2px; }
.game-topbar .resource-chip { min-width: 0; height: 40px; grid-template-columns: 12px minmax(0,1fr); gap: 2px; padding: 2px 3px; align-items: center; justify-items: stretch; overflow: hidden; }
.game-topbar .resource-chip > span { min-width: 0; display: grid; align-content: center; gap: 1px; line-height: .95; }
.game-topbar .resource-chip small { min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .34rem; font-weight: 900; letter-spacing: .015em; }
.game-topbar .resource-chip strong { min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .56rem; }
.game-topbar .resource-label-short { display: none !important; }
.game-topbar .resource-chip svg { width: 11px; height: 11px; }

.strategy-workspace { grid-template-columns: 54px minmax(0,1fr) minmax(270px, 30vw); gap: 5px; }
.region-panel { min-width: 0; overflow: hidden; }
.region-panel > header { min-height: 42px; height: 42px; padding: 5px 7px; }
.region-panel > header h2 { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-tabs { min-height: 31px; height: 31px; }
.region-tabs button { min-height: 29px; height: 29px; padding: 2px 4px; font-size: .53rem; }
.region-panel-body { min-height: 0; overflow: hidden; }
.region-panel .overview-tab {
  min-height: 0;
  grid-template-rows: 43px repeat(3, 18px) 36px 31px minmax(72px,1fr);
  gap: 3px;
  overflow: hidden;
}
.region-panel .stat-grid { min-height: 0; height: 43px; }
.region-panel .stat-grid > div { min-width: 0; padding: 3px 4px; }
.region-panel .stat-grid span { font-size: .44rem; }
.region-panel .stat-grid strong { font-size: .61rem; }
.region-panel .meter-row { min-height: 18px; height: 18px; grid-template-columns: 66px minmax(0,1fr) 23px; }
.region-panel .state-policy-button { min-height: 36px; height: 36px; }
.region-panel .state-policy-button span { min-width: 0; overflow: hidden; }
.region-panel .state-policy-button b,
.region-panel .state-policy-button em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .change-box { min-height: 31px; height: 31px; }
.region-panel .change-box p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-panel .action-list { min-height: 72px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.region-panel .action-list button { min-width: 0; min-height: 0; height: 100%; padding: 3px 5px; overflow: hidden; }
.region-panel .action-list button > span { min-width: 0; overflow: hidden; }
.region-panel .action-list b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .56rem; }
.region-panel .action-list small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .43rem; }

.map-column .map-shell { background: radial-gradient(circle at 50% 42%, #1d344a 0, #0a1726 72%); box-shadow: inset 0 0 50px rgba(0,0,0,.55); }
.world-map { background: linear-gradient(180deg,#14283b,#081522); }
.terrain-texture { pointer-events: none; mix-blend-mode: soft-light; opacity: .22; }
.country { stroke: rgba(235,240,245,.46); stroke-width: .56; }
.country.selected { stroke: #f4d08a; stroke-width: 1.45; filter: drop-shadow(0 0 2px rgba(244,208,138,.65)); }
.city-marker text { font-size: 5.4px; }
.world-map:not(.map-zoomed) .city-rank-2 text { display: none; }
.world-map.map-zoomed .city-marker text { font-size: 4.8px; }
.map-legend { max-width: calc(100% - 18px); overflow: hidden; }
.map-legend span { white-space: nowrap; }

.store-layout { grid-template-columns: minmax(230px,.66fr) minmax(0,1.34fr); gap: 6px; }
.store-explainer { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 6px; align-content: stretch; padding: 8px; overflow: hidden; }
.store-explainer-heading { min-width: 0; display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 7px; align-items: center; }
.store-explainer-heading > svg { width: 32px; height: 32px; color: var(--accent); }
.store-explainer-heading h2,
.store-explainer-heading p { margin: 0; }
.store-explainer-heading h2 { font-size: .92rem; }
.store-explainer-heading p { font-size: .53rem; line-height: 1.2; color: var(--muted); }
.store-rule-list { display: grid; gap: 4px; }
.store-rule { min-height: 34px; padding: 5px; overflow: hidden; }
.store-rule span { min-width: 0; font-size: .52rem; line-height: 1.18; }
.theopolitics-preview { min-height: 0; align-content: center; overflow: hidden; }
.theopolitics-preview div { min-width: 0; overflow: hidden; }
.theopolitics-preview strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theopolitics-preview p { max-height: 3.5em; overflow: hidden; }
.store-primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.store-primary-actions button { min-width: 0; min-height: 34px; height: 34px; padding: 4px 6px; font-size: .54rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-products { min-height: 0; overflow: hidden; }
.store-product { min-width: 0; min-height: 0; overflow: hidden; }
.store-product header strong { min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-product footer { min-width: 0; }
.store-product footer button { min-width: 86px; white-space: nowrap; }

@media (max-width: 980px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 38px 70px minmax(92px,115px) minmax(292px,1fr) 36px 88px; }
  .game-topbar .resource-label-full { display: none !important; }
  .game-topbar .resource-label-short { display: block !important; }
  .strategy-workspace { grid-template-columns: 50px minmax(0,1fr) minmax(262px,31vw); }
}

@media (max-width: 800px) and (orientation: landscape) {
  .game-topbar { grid-template-columns: 36px 66px minmax(82px,100px) minmax(278px,1fr) 34px 82px; gap: 3px; }
  .game-topbar .religion-title small { display: none; }
  .game-topbar .resource-chip { grid-template-columns: 10px minmax(0,1fr); padding: 2px; }
  .game-topbar .resource-chip small { font-size: .31rem; }
  .game-topbar .resource-chip strong { font-size: .51rem; }
  .strategy-workspace { grid-template-columns: 48px minmax(0,1fr) minmax(255px,33vw); }
  .strategy-rail button span { font-size: .49rem; }
}

@media (max-height: 430px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen { grid-template-rows: 48px minmax(0,1fr); }
  .game-topbar { height: 48px; min-height: 48px; }
  .game-topbar .turn-badge { height: 38px; }
  .game-topbar .resource-bar { height: 40px; }
  .game-topbar .resource-chip { height: 38px; }
  .region-panel > header { height: 38px; min-height: 38px; }
  .region-panel .overview-tab { grid-template-rows: 40px repeat(3,17px) 33px 28px minmax(62px,1fr); }
  .region-panel .state-policy-button em,
  .region-panel .change-box p,
  .region-panel .action-list small { display: none; }
  .region-panel .action-list b { font-size: .53rem; }
  .store-explainer { padding: 6px; gap: 4px; }
  .store-rule-list { grid-template-columns: 1fr 1fr; gap: 3px; }
  .store-rule { min-height: 30px; }
  .store-rule span { font-size: .46rem; }
  .theopolitics-preview p { display: none; }
  .store-primary-actions button { height: 31px; min-height: 31px; }
  .store-product { padding: 5px; gap: 2px; }
  .store-product p { font-size: .48rem; max-height: 2.4em; overflow: hidden; }
  .store-product ul { display: none; }
  .store-product footer button { min-width: 76px; height: 27px; min-height: 27px; }
}

/* v0.5.1.1 atlas-depth layer; static SVG only, no GPU-heavy turbulence */
.terrain-country { stroke: rgba(19,27,25,.48); stroke-width: .78; }
.country { fill-opacity: .79; mix-blend-mode: color; }
.country.selected { fill-opacity: .92; mix-blend-mode: normal; }
.terrain-texture { mix-blend-mode: overlay; opacity: .38; }
.map-graticule { opacity: .28; stroke: rgba(153,183,204,.28); }
.city-marker text {
  paint-order: stroke fill;
  stroke: rgba(4,10,15,.95);
  stroke-width: 1.9px;
  stroke-linejoin: round;
  fill: #f2e9d4;
  font-weight: 800;
  letter-spacing: .02em;
}
.city-marker circle:first-child { fill: #e4bd69; stroke: #151b24; stroke-width: 1.1; }
.city-marker.capital circle:first-child { fill: #fff1bd; }

/* --------------------------------------------------------------------------
   v0.5.2 — Grand Strategy Interface & Living World Map
   -------------------------------------------------------------------------- */
.game-screen.grand-strategy-screen.v052-interface {
  height: 100dvh;
  min-height: 0;
  grid-template-rows: 72px minmax(0, 1fr);
  background: #050a0f;
  color: #e7e1d5;
}

.v052-interface .strategy-command-bar {
  height: 72px;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(225px, 285px) minmax(0, 1fr) 235px;
  gap: 7px;
  padding: 5px max(7px, env(safe-area-inset-right)) 5px max(7px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(212, 163, 78, .48);
  background: linear-gradient(180deg, #111a20 0%, #080e13 100%);
  box-shadow: 0 5px 24px rgba(0,0,0,.48);
}

.strategy-brand {
  min-width: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 50px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border: 1px solid rgba(210,163,79,.3);
  background: radial-gradient(circle at 15% 20%, rgba(205,154,66,.12), transparent 45%), #090f14;
  overflow: hidden;
}
.strategy-brand-emblem {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid #b98736;
  border-radius: 50%;
  color: #e4b75d;
  background: radial-gradient(circle, rgba(213,166,75,.18), transparent 65%);
  box-shadow: inset 0 0 0 3px rgba(218,170,88,.08);
}
.strategy-brand-emblem svg { width: 27px; height: 27px; }
.strategy-brand > span:last-child { min-width: 0; display: grid; line-height: .94; }
.strategy-brand strong { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.05rem, 1.55vw, 1.48rem); letter-spacing: .055em; color: #e2bd77; white-space: nowrap; }
.strategy-brand small { font-family: Georgia, 'Times New Roman', serif; font-size: .66rem; letter-spacing: .17em; color: #b8ad9a; white-space: nowrap; }
.strategy-brand em { margin-top: 4px; font-style: normal; color: #82909e; font-size: .52rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.v052-interface .game-topbar .resource-bar {
  min-width: 0;
  width: 100%;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(8, minmax(62px, 1fr));
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.v052-interface .game-topbar .resource-chip {
  min-width: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  align-items: center;
  justify-items: stretch;
  gap: 4px;
  padding: 5px 6px;
  border: 1px solid rgba(154,167,174,.32);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(26,37,44,.96), rgba(10,18,23,.96));
  overflow: hidden;
}
.v052-interface .game-topbar .resource-chip svg { width: 20px; height: 20px; color: #d7a950; filter: drop-shadow(0 0 3px rgba(213,164,72,.25)); }
.v052-interface .game-topbar .resource-chip > span { min-width: 0; display: grid; grid-template-rows: auto auto; gap: 2px; line-height: 1; }
.v052-interface .game-topbar .resource-chip small { display: block; min-width: 0; color: #c6c2b9; font-size: clamp(.42rem,.55vw,.58rem); font-weight: 800; letter-spacing: .045em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v052-interface .game-topbar .resource-chip strong { color: #f4f0e7; font-size: clamp(.72rem,.9vw,.94rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v052-interface .resource-label-short { display: none !important; }

.turn-command-cluster {
  min-width: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 72px 42px minmax(105px,1fr);
  gap: 4px;
  align-items: stretch;
}
.turn-command-cluster .turn-badge {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0 4px;
  padding: 5px 7px;
  border: 1px solid rgba(154,167,174,.32);
  background: #0c141a;
}
.turn-command-cluster .turn-badge span { grid-column: 1; grid-row: 1; font-size: .54rem; letter-spacing: .08em; color: #a9a79f; }
.turn-command-cluster .turn-badge strong { grid-column: 2; grid-row: 1; font-size: 1rem; color: #e5bd70; }
.turn-command-cluster .turn-badge small { grid-column: 1 / -1; grid-row: 2; color: #b9c2c8; font-size: .58rem; }
.turn-command-cluster .topbar-icon { width: 42px; height: 60px; min-height: 60px; border-radius: 2px; border: 1px solid rgba(154,167,174,.32); background: #111c24; }
.turn-command-cluster .top-turn-button { height: 60px; min-height: 60px; border-radius: 2px; border-color: #d2a34f; background: linear-gradient(180deg,#d7a84f,#9d671f); box-shadow: inset 0 1px rgba(255,255,255,.2); font-size: .74rem; }

.strategy-stage {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0,1fr) 118px;
  gap: 5px;
  padding: 5px 6px max(5px, env(safe-area-inset-bottom));
  overflow: hidden;
}
.v052-interface .strategy-workspace {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 190px minmax(0,1fr) minmax(285px, 300px);
  gap: 5px;
  padding: 0;
  overflow: hidden;
}

.strategy-command-menu {
  min-height: 0;
  display: grid;
  grid-template-rows: 32px minmax(0,1fr) auto;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(168,178,184,.34);
  background: linear-gradient(180deg,#101a20,#080e13);
  overflow: hidden;
}
.strategy-command-menu > header,
.command-news > header,
.intel-card > header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #d6a957;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .075em;
}
.strategy-command-menu > header svg,
.command-news > header svg,
.intel-card > header svg { width: 15px; height: 15px; }
.strategy-command-menu nav { min-height: 0; display: grid; grid-template-rows: repeat(6,minmax(0,1fr)); gap: 4px; }
.strategy-command-menu nav button {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(138,153,163,.3);
  border-radius: 2px;
  color: #e5e7e4;
  background: linear-gradient(180deg,rgba(27,41,49,.9),rgba(13,22,28,.92));
  text-align: left;
  overflow: hidden;
}
.strategy-command-menu nav button:hover,
.strategy-command-menu nav button.active { border-color: #3d91b2; background: linear-gradient(180deg,rgba(23,61,79,.95),rgba(11,35,49,.95)); }
.strategy-command-menu nav button > svg { width: 25px; height: 25px; color: #d9b064; }
.strategy-command-menu nav button > span { min-width: 0; display: grid; gap: 2px; }
.strategy-command-menu nav button b { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strategy-command-menu nav button small { color: #9da7ae; font-size: .47rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strategy-command-menu .nav-with-badge i { position: absolute; right: 4px; top: 4px; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #ba4960; color: white; font-size: .48rem; font-style: normal; }
.command-news { display: grid; gap: 4px; padding-top: 5px; border-top: 1px solid rgba(168,178,184,.22); }
.command-news p { margin: 0; padding: 4px 5px; color: #b8c0c5; background: rgba(255,255,255,.025); font-size: .47rem; line-height: 1.22; max-height: 2.55em; overflow: hidden; }

.v052-interface .map-column { min-width: 0; min-height: 0; height: 100%; position: relative; overflow: hidden; }
.v052-interface .map-shell { height: 100%; min-height: 0; border: 1px solid rgba(168,178,184,.34); border-radius: 1px; background: #07121b; box-shadow: inset 0 0 70px rgba(0,0,0,.55); }
.v052-interface .world-map { height: 100%; min-height: 0; background: #07121b; }
.terrain-raster { pointer-events: none; image-rendering: auto; }
.map-graticule { fill: none; stroke: rgba(176,202,215,.15); stroke-width: .32; vector-effect: non-scaling-stroke; }
.river-layer { pointer-events: none; }
.atlas-river { fill: none; stroke: rgba(101,164,195,.64); stroke-width: .7; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 .6px rgba(17,56,78,.85)); }
.atlas-river.major { stroke: rgba(118,182,211,.78); stroke-width: 1.0; }
.country-influence-layer { isolation: isolate; }
.v052-interface .country {
  stroke: rgba(235,225,202,.58);
  stroke-width: .62;
  fill-opacity: .32;
  mix-blend-mode: color;
  vector-effect: non-scaling-stroke;
  transition: fill-opacity .12s, filter .12s;
}
.v052-interface .map-layer-majority .country,
.v052-interface .map-layer-statePolicy .country { fill-opacity: .46; }
.v052-interface .country:hover { fill-opacity: .57; filter: brightness(1.18); }
.v052-interface .country.selected { fill-opacity: .66; mix-blend-mode: color; stroke: #ffd985; stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(255,207,113,.8)); }

.v052-interface .map-toolbar { top: 7px; left: auto; right: 7px; width: auto; display: grid; grid-template-columns: 38px; gap: 3px; }
.v052-interface .map-toolbar button { width: 38px; height: 38px; min-height: 38px; border-radius: 2px; background: rgba(7,14,19,.88); border-color: rgba(203,180,136,.45); }
.v052-interface .map-toolbar span { display: none; }
.v052-interface .layer-dock { left: 50%; right: auto; bottom: 7px; width: min(690px, calc(100% - 28px)); transform: translateX(-50%); grid-template-columns: repeat(8,minmax(0,1fr)); gap: 2px; padding: 4px; border-color: rgba(201,173,119,.42); border-radius: 2px; background: rgba(5,11,15,.9); }
.v052-interface .layer-dock button { min-height: 43px; grid-template-columns: auto; gap: 1px; font-size: .49rem; }
.v052-interface .layer-dock button svg { width: 17px; height: 17px; }
.v052-interface .map-legend { left: 8px; right: auto; bottom: 58px; max-width: min(720px,calc(100% - 70px)); background: rgba(5,11,15,.84); border-color: rgba(201,173,119,.35); }

.strategic-city-layer { pointer-events: auto; }
.city-marker { cursor: pointer; outline: none; }
.city-marker .city-halo { fill: rgba(238,188,85,.12); stroke: rgba(232,185,91,.55); stroke-width: .6; vector-effect: non-scaling-stroke; }
.city-marker .city-core { fill: #e0b25d; stroke: #090d10; stroke-width: 1; vector-effect: non-scaling-stroke; }
.city-marker .city-glyph { fill: #13171a; stroke: none; font-size: 3.4px; font-weight: 900; pointer-events: none; }
.city-marker .city-label { fill: #f1eadc; stroke: rgba(4,8,10,.96); stroke-width: 2.2px; paint-order: stroke fill; font-size: 5.2px; font-weight: 800; letter-spacing: .015em; pointer-events: none; }
.city-marker.selected .city-halo { fill: rgba(255,213,119,.38); stroke: #ffe09b; stroke-width: 1.4; }
.city-marker.selected .city-core { fill: #fff0bd; }
.world-map:not(.map-zoomed) .city-rank-2 .city-label,
.world-map:not(.map-deep-zoom) .city-rank-3 { display: none; }
.world-map.map-zoomed .city-rank-3 .city-label { display: none; }
.world-map.map-deep-zoom .city-rank-3 .city-label { display: block; }
.world-map.map-zoomed .city-label { font-size: 4.6px; }

.v052-interface .panel.region-panel { border-color: rgba(168,178,184,.34); background: linear-gradient(180deg,#101a20,#080e13); }
.city-region-line { display: block; max-width: 205px; margin-top: 2px; color: #aeb6ba; font-size: .47rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-inspection-mode > header { background: linear-gradient(90deg,rgba(205,154,64,.12),transparent); }

.strategy-bottom-dock {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.24fr .9fr .86fr .9fr 1.2fr;
  gap: 5px;
  overflow: hidden;
}
.intel-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 24px minmax(0,1fr);
  gap: 3px;
  padding: 5px 7px;
  border: 1px solid rgba(168,178,184,.34);
  background: linear-gradient(180deg,#101a20,#080e13);
  overflow: hidden;
}
.intel-card > header { justify-content: flex-start; border-bottom: 1px solid rgba(168,178,184,.17); }
.intel-card > header b { margin-left: auto; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #26343c; color: #d9b463; font-size: .5rem; }
.event-list { min-height: 0; display: grid; grid-template-rows: repeat(3,minmax(0,1fr)); gap: 2px; }
.event-list > div { min-width: 0; display: grid; grid-template-columns: 13px minmax(0,1fr) auto; align-items: center; gap: 4px; font-size: .47rem; }
.event-list svg { width: 11px; height: 11px; color: #d5a954; }
.event-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-list small { color: #8f9ba2; font-size: .43rem; }
.world-summary-visual { min-height: 0; display: grid; grid-template-columns: 70px 1fr; grid-template-rows: 1fr 1fr; gap: 3px 7px; align-items: center; }
.mini-globe { grid-row: 1 / -1; position: relative; width: 66px; height: 66px; align-self: center; border-radius: 50%; overflow: hidden; border: 1px solid #5b7581; background: radial-gradient(circle at 32% 30%,#39586b,#132734 65%,#07131a); box-shadow: inset -8px -8px 16px rgba(0,0,0,.42); }
.mini-globe::before { content:''; position:absolute; inset:14px 7px 11px 12px; border-radius: 48% 52% 45% 55%; background:#78875d; transform:rotate(-16deg); opacity:.72; }
.mini-globe i { position:absolute; left:0; bottom:0; height:5px; background:#b34e73; z-index:2; }
.world-summary-visual > div:not(.mini-globe) { min-width: 0; display:grid; }
.world-summary-visual span { color:#9ba6ac; font-size:.47rem; }
.world-summary-visual strong { font-size:.7rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.turn-metrics { display:grid; grid-template-rows:1fr 1fr; gap:4px; }
.turn-metrics > div { min-width:0; display:grid; grid-template-columns:23px minmax(0,1fr); align-items:center; gap:5px; padding:3px 5px; background:rgba(255,255,255,.025); }
.turn-metrics svg { width:19px; color:#d6aa54; }
.turn-metrics span { min-width:0; display:grid; }
.turn-metrics b { font-size:.68rem; color:#8fcf83; }
.turn-metrics small { color:#9da7ad; font-size:.46rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.advisor-content { min-height:0; display:grid; grid-template-columns:62px minmax(0,1fr); gap:7px; align-items:center; }
.advisor-content .founder-portrait.compact { width:58px; height:76px; margin:0; border-radius:2px; overflow:hidden; }
.advisor-content .founder-portrait.compact img { width:100%; height:100%; object-fit:cover; }
.advisor-content p { margin:0; color:#c3c8c9; font-size:.49rem; line-height:1.35; max-height:4.1em; overflow:hidden; }
.victory-card { grid-template-rows:24px auto auto minmax(24px,1fr); }
.victory-card > strong { color:#bd77d2; font-size:.58rem; letter-spacing:.04em; }
.victory-card p { margin:2px 0; color:#b9c0c4; font-size:.47rem; }
.victory-progress { position:relative; min-height:23px; margin-top:3px; background:#1b2429; border:1px solid rgba(168,178,184,.2); overflow:hidden; }
.victory-progress i { position:absolute; inset:0 auto 0 0; background:linear-gradient(90deg,#70448d,#aa5cc0); }
.victory-progress span { position:absolute; inset:0; display:grid; place-items:center; font-size:.52rem; font-weight:900; }

@media (max-width: 1180px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar { grid-template-columns: 190px minmax(0,1fr) 205px; }
  .strategy-brand { grid-template-columns: 39px minmax(0,1fr); padding:3px 5px; }
  .strategy-brand-emblem { width:36px; height:36px; }
  .strategy-brand strong { font-size:1rem; }
  .strategy-brand small { font-size:.53rem; }
  .strategy-brand em { display:none; }
  .v052-interface .game-topbar .resource-bar { grid-template-columns:repeat(8,minmax(45px,1fr)); }
  .v052-interface .game-topbar .resource-chip { grid-template-columns:15px minmax(0,1fr); padding:3px; }
  .v052-interface .game-topbar .resource-chip svg { width:14px; height:14px; }
  .v052-interface .resource-label-full { display:none !important; }
  .v052-interface .resource-label-short { display:block !important; }
  .v052-interface .strategy-workspace { grid-template-columns: 64px minmax(0,1fr) minmax(258px,29vw); }
  .strategy-command-menu { grid-template-rows:28px minmax(0,1fr); padding:3px; }
  .strategy-command-menu > header span, .command-news { display:none; }
  .strategy-command-menu nav button { grid-template-columns:1fr; place-items:center; padding:2px; text-align:center; }
  .strategy-command-menu nav button > svg { width:21px; height:21px; }
  .strategy-command-menu nav button small { display:none; }
  .strategy-command-menu nav button b { font-size:.5rem; }
  .strategy-bottom-dock { grid-template-columns:1.25fr .85fr .85fr 1fr; }
  .world-summary-card { display:none; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface { grid-template-rows:56px minmax(0,1fr); }
  .v052-interface .strategy-command-bar { height:56px; min-height:56px; }
  .strategy-brand, .v052-interface .game-topbar .resource-bar, .turn-command-cluster { height:46px; }
  .v052-interface .game-topbar .resource-chip { height:46px; }
  .turn-command-cluster .turn-badge, .turn-command-cluster .topbar-icon, .turn-command-cluster .top-turn-button { height:46px; min-height:46px; }
  .strategy-stage { grid-template-rows:minmax(0,1fr) 88px; }
  .strategy-command-menu nav button small, .command-news { display:none; }
  .strategy-command-menu nav button { grid-template-columns:27px minmax(0,1fr); }
  .intel-card { grid-template-rows:19px minmax(0,1fr); padding:3px 5px; }
  .intel-card > header { font-size:.48rem; }
  .event-list > div:nth-child(3) { display:none; }
  .event-list { grid-template-rows:1fr 1fr; }
  .advisor-content .founder-portrait.compact { width:44px; height:57px; }
  .advisor-content { grid-template-columns:46px minmax(0,1fr); }
  .mini-globe { width:48px; height:48px; }
  .world-summary-visual { grid-template-columns:52px 1fr; }
}

/* v0.5.2.1 — half-month calendar, persistent map compositor and compact dock */
.map-transform-layer {
  transform-box: view-box;
  transform-origin: 0 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.world-map .city-marker,
.world-map .city-label { transition: opacity .16s ease; }
.world-map .city-rank-2 { opacity: 0; pointer-events: none; }
.world-map.map-zoom-1 .city-rank-2 { opacity: .9; pointer-events: auto; }
.world-map .city-rank-2 .city-label { opacity: 0; }
.world-map.map-zoom-2 .city-rank-2 .city-label { opacity: 1; }
.world-map .city-rank-3 { opacity: 0; pointer-events: none; }
.world-map.map-zoom-3 .city-rank-3 { opacity: .9; pointer-events: auto; }
.world-map .city-rank-3 .city-label { opacity: 0; }
.world-map.map-zoom-4 .city-rank-3 .city-label { opacity: 1; }
.world-map.map-zoom-2 .city-label { font-size: 4.6px; }

.turn-command-cluster {
  grid-template-columns: minmax(146px, 1fr) 48px 42px 42px minmax(105px, 1fr);
}
.turn-command-cluster .date-badge {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}
.turn-command-cluster .date-badge span,
.turn-command-cluster .date-badge strong { grid-column: 1; }
.turn-command-cluster .date-badge strong { font-size: .78rem; white-space: nowrap; }
.turn-count-badge {
  height: 60px;
  display: grid;
  place-content: center;
  gap: 3px;
  border: 1px solid rgba(154,167,174,.32);
  background: #0c141a;
  text-align: center;
}
.turn-count-badge span { color: #a9a79f; font-size: .48rem; letter-spacing: .08em; text-transform: uppercase; }
.turn-count-badge strong { color: #e5bd70; font-size: 1rem; }
.strategy-stage { grid-template-rows: minmax(0,1fr) 82px; }
.strategy-command-menu nav button b { overflow: visible; text-overflow: clip; }

.strategy-bottom-dock.tabbed-bottom-dock {
  display: grid;
  grid-template-columns: minmax(520px, 44%) minmax(0, 1fr);
  gap: 5px;
  border: 1px solid rgba(168,178,184,.34);
  background: linear-gradient(180deg,#101a20,#080e13);
  padding: 4px;
}
.bottom-dock-tabs { min-width: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; }
.bottom-dock-tabs button { position: relative; min-width: 0; display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: center; gap: 4px; padding: 4px 5px; border: 1px solid rgba(138,153,163,.28); border-radius: 2px; color: #b9c1c5; background: rgba(20,32,39,.9); font-size: .52rem; }
.bottom-dock-tabs button.active { color: #f1eadc; border-color: #3d91b2; background: rgba(20,62,81,.86); }
.bottom-dock-tabs svg { width: 15px; height: 15px; color: #d6aa54; }
.bottom-dock-tabs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-dock-tabs b { position: absolute; right: 2px; top: 2px; min-width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; background: #ba4960; font-size: .42rem; }
.bottom-dock-panel { min-width: 0; min-height: 0; display: grid; align-items: center; padding: 2px 7px; overflow: hidden; }
.compact-events { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.compact-events > div { min-width: 0; display: grid; grid-template-columns: 14px minmax(0,1fr); align-items: center; gap: 4px; color: #c3c8c9; font-size: .49rem; }
.compact-events svg { width: 12px; color: #d5a954; }
.compact-events span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-world, .compact-turn, .compact-victory { min-width: 0; display: flex; align-items: center; gap: 16px; }
.compact-world > svg, .compact-victory > svg { width: 25px; color: #d6aa54; }
.compact-world span { color: #9da7ad; font-size: .52rem; white-space: nowrap; }
.compact-world b { color: #f1eadc; margin-left: 4px; }
.compact-turn { justify-content: space-around; }
.compact-turn > span { min-width: 0; display: grid; grid-template-columns: 18px auto; grid-template-rows: auto auto; column-gap: 5px; align-items: center; }
.compact-turn svg { grid-row: 1 / -1; width: 16px; color: #d6aa54; }
.compact-turn b { color: #8fcf83; font-size: .65rem; }
.compact-turn small { color: #9da7ad; font-size: .44rem; white-space: nowrap; }
.compact-turn .negative b { color: #e17777; }
.compact-advisor { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 7px; }
.compact-advisor .founder-portrait.compact { width: 38px; height: 50px; overflow: hidden; }
.compact-advisor p { margin: 0; color: #c3c8c9; font-size: .51rem; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.compact-victory strong { color: #bd77d2; font-size: .55rem; white-space: nowrap; }
.compact-victory p { margin: 0; color: #b9c0c4; font-size: .48rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-victory .victory-progress { flex: 1; min-width: 90px; margin: 0; }
.fixed-calendar-cadence { min-height: 40px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-raised); color: var(--text); font-weight: 700; }

@media (max-width: 1180px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar { grid-template-columns: 150px minmax(0,1fr) minmax(340px, 39vw); }
  .v052-interface .strategy-workspace { grid-template-columns: 118px minmax(0,1fr) minmax(245px,27vw); }
  .strategy-command-menu > header span { display: none; }
  .strategy-command-menu nav button { grid-template-columns: 24px minmax(0,1fr); place-items: center start; padding: 3px 4px; text-align: left; }
  .strategy-command-menu nav button > svg { width: 19px; height: 19px; }
  .strategy-command-menu nav button b { font-size: .52rem; }
  .strategy-command-menu nav button small, .command-news { display: none; }
  .strategy-bottom-dock.tabbed-bottom-dock { grid-template-columns: minmax(430px,50%) minmax(0,1fr); }
  .bottom-dock-tabs button { grid-template-columns: 14px minmax(0,1fr); padding: 3px; font-size: .45rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .strategy-stage { grid-template-rows: minmax(0,1fr) 68px; }
  .turn-command-cluster .turn-badge, .turn-count-badge, .turn-command-cluster .topbar-icon, .turn-command-cluster .top-turn-button { height:46px; min-height:46px; }
  .strategy-bottom-dock.tabbed-bottom-dock { grid-template-columns: minmax(390px,52%) minmax(0,1fr); }
  .bottom-dock-tabs button { font-size: .42rem; }
}
.world-map .city-rank-2, .world-map .city-rank-3 { display: inline !important; }
.finance-detail-grid { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.finance-detail-grid article { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: .56rem; }
.finance-detail-grid span { color: var(--muted); }
.finance-detail-grid b { color: #e8d39f; }
.finance-summary-card b.negative { color: #e17777; }

/* v0.5.4 premium founder flow, resource popovers and report theming */
.v052-interface.lang-en .strategy-brand strong {
  font-size: clamp(.78rem, 1.05vw, 1rem) !important;
  letter-spacing: .04em !important;
}
.v052-interface.lang-en .strategy-brand small {
  font-size: .48rem !important;
  letter-spacing: .1em !important;
}
.v052-interface .strategy-brand > span:last-child { min-width: 0; overflow: hidden; }
.v052-interface .strategy-brand strong, .v052-interface .strategy-brand small { overflow: hidden; text-overflow: ellipsis; }

.resource-bar { position: relative; }
.resource-chip-shell { position: relative; min-width: 0; }
.resource-chip-shell.is-open { z-index: 4; }
.resource-detail-popover {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: min(235px, 38vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(216,170,88,.35);
  background: linear-gradient(180deg, rgba(11,19,31,.98), rgba(16,27,43,.98));
  box-shadow: 0 20px 32px rgba(0,0,0,.35);
  color: #eef2f6;
}
.resource-detail-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: 1px solid rgba(216,170,88,.35);
  border-top: 1px solid rgba(216,170,88,.35);
  transform: rotate(45deg);
}
.resource-detail-popover strong { display: block; margin-bottom: 6px; color: #f0c877; font-size: .72rem; }
.resource-detail-popover p { margin: 0 0 6px; font-size: .63rem; line-height: 1.45; color: #d8dfe7; }
.resource-detail-popover small { display: block; color: #98a8b7; font-size: .57rem; line-height: 1.4; }
.game-topbar .resource-bar .resource-label-full { display: block; }
.game-topbar .resource-bar .resource-label-short { display: none; }
@media (max-width: 1180px) {
  .game-topbar .resource-bar .resource-label-full { display: none; }
  .game-topbar .resource-bar .resource-label-short { display: block; }
  .resource-detail-popover { width: min(215px, 44vw); }
}

.founder-hero-refined {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}
.founder-hero-refined .founder-hero-portrait {
  position: relative;
  min-height: 280px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.founder-hero-refined .founder-hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: saturate(.92) contrast(1.04);
}
.founder-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(4,8,14,0), rgba(4,8,14,.88) 40%, rgba(4,8,14,.95));
}
.founder-hero-overlay strong { display: block; margin-top: 4px; font-size: 1.15rem; color: #f2e0b5; }
.founder-hero-refined .founder-hero-copy { padding: 12px 14px 14px; display: grid; gap: 11px; }
.founder-hero-summary { margin: 0; font-size: .68rem; line-height: 1.55; color: var(--text-soft); }
.founder-lock-strip {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(216,170,88,.2);
  background: linear-gradient(180deg, rgba(216,170,88,.10), rgba(216,170,88,.05));
}
.founder-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(216,170,88,.12);
  color: #f1c676;
}
.founder-lock-strip small { color: var(--text-soft); font-size: .61rem; line-height: 1.45; }

/* Duplicate founder-prelude block removed in v0.5.5.10. */
.report-window-header .report-era-copy { display: block; margin-top: 4px; color: #98a4b0; letter-spacing: .08em; text-transform: uppercase; }
.report-modal.report-era-antique { background: linear-gradient(180deg, #2e2115 0%, #1c140f 100%); border-color: rgba(145,106,63,.45); }
.report-modal.report-era-antique .report-content,
.report-modal.report-era-antique .modal-tabs { background-image: linear-gradient(180deg, rgba(91,63,34,.12), rgba(31,22,15,.08)), radial-gradient(circle at 14% 9%, rgba(196,149,90,.08), transparent 38%); }
.report-modal.report-era-medieval { background: linear-gradient(180deg, #2f2416 0%, #21170d 100%); border-color: rgba(205,170,109,.42); }
.report-modal.report-era-medieval .report-content,
.report-modal.report-era-medieval .modal-tabs { background-image: linear-gradient(180deg, rgba(201,168,98,.09), rgba(51,36,19,.06)); }
.report-modal.report-era-industrial { background: linear-gradient(180deg, #1f252d 0%, #171c24 100%); border-color: rgba(140,146,156,.45); }
.report-modal.report-era-industrial .report-content,
.report-modal.report-era-industrial .modal-tabs { background-image: linear-gradient(180deg, rgba(173,173,173,.07), rgba(33,33,33,.05)); }
.report-modal.report-era-modern { background: linear-gradient(180deg, #0d1624 0%, #111f33 100%); border-color: rgba(104,135,177,.45); }
.report-modal.report-era-modern .report-content,
.report-modal.report-era-modern .modal-tabs { background-image: linear-gradient(180deg, rgba(74,118,173,.09), rgba(12,22,36,.04)); }
.report-modal .economy-report-line {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(216,170,88,.16);
  background: rgba(255,255,255,.03);
  font-size: .6rem;
  color: var(--text-soft);
}
.report-modal .economy-report-line svg { color: #e0b86e; }
.report-events-workbench { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-events-workbench .state-report-section { min-height: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.report-events-workbench .state-report-section.compact { grid-column: 2; }
.report-events-workbench .state-report-section h3,
.report-events-workbench .event-card strong { display: flex; align-items: center; gap: 7px; }
.report-events-workbench .state-report-section article { display: grid; gap: 4px; margin-top: 10px; }
.report-events-workbench .state-report-section p { margin-top: 10px; color: var(--text-soft); }
.report-events-workbench .event-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-events-workbench .event-card { padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.report-events-workbench .event-card p { margin: 8px 0 0; font-size: .64rem; line-height: 1.52; color: var(--text-soft); }
.report-events-workbench .doctrine-event { grid-column: 1 / -1; background: linear-gradient(180deg, rgba(216,170,88,.13), rgba(216,170,88,.06)); }

@media (max-width: 980px) {
  .founder-prelude-modal { grid-template-columns: 1fr; width: min(94vw, 720px); }
  .founder-prelude-stage { min-height: 280px; }
  .founder-prelude-actions { flex-direction: column; align-items: stretch; }
  .founder-prelude-meta { grid-template-columns: 1fr; }
  .report-events-workbench { grid-template-columns: 1fr; }
  .report-events-workbench .state-report-section.compact,
  .report-events-workbench .event-grid,
  .report-events-workbench .doctrine-event { grid-column: auto; }
  .report-events-workbench .event-grid { grid-template-columns: 1fr; }
}

/* v0.5.5 map appearance system and premium atlas polish */
.world-map-surface {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 48% 38%, rgba(42, 110, 132, .48), transparent 34%), linear-gradient(180deg, #0d2331 0%, #08141d 48%, #071018 100%);
}
.world-map-surface::before,
.world-map-surface::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.world-map-surface::before {
  z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(74, 146, 176, .22), transparent 19%),
    radial-gradient(circle at 82% 76%, rgba(56, 108, 138, .18), transparent 20%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 28%, rgba(0,0,0,.12) 76%, rgba(0,0,0,.28));
}
.world-map-surface::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 22%, rgba(0,0,0,.18));
}
.world-map-viewport,
.world-map-surface,
.world-map-vector { min-height: 0; height: 100%; }
.world-map-vector,
.terrain-raster { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-map-vector { z-index: 2; }
.terrain-raster {
  z-index: 1;
  object-fit: cover;
  opacity: .52;
  mix-blend-mode: screen;
  filter: saturate(.95) brightness(.94) contrast(1.02);
}
.map-style-atlas .terrain-raster {
  opacity: .5;
  mix-blend-mode: screen;
  filter: saturate(1.02) brightness(.94) contrast(1.02);
}
.map-style-relief {
  background: radial-gradient(circle at 48% 40%, rgba(113, 150, 118, .24), transparent 36%), linear-gradient(180deg, #203540 0%, #13242f 54%, #0b151d 100%);
}
.map-style-relief .terrain-raster {
  opacity: .76;
  mix-blend-mode: normal;
  filter: saturate(1.18) brightness(.93) contrast(1.08);
}
.map-style-relief .country {
  fill-opacity: .4;
  mix-blend-mode: multiply;
  stroke: rgba(227, 233, 214, .45);
}
.map-style-relief .country.selected {
  fill-opacity: .7;
  stroke: #ffe3a1;
}
.map-style-night {
  background: radial-gradient(circle at 42% 22%, rgba(52, 76, 112, .28), transparent 24%), linear-gradient(180deg, #071018 0%, #050b12 48%, #03070c 100%);
}
.map-style-night::before {
  background:
    radial-gradient(circle at 20% 18%, rgba(85, 124, 172, .17), transparent 18%),
    radial-gradient(circle at 74% 32%, rgba(42, 84, 149, .13), transparent 16%),
    radial-gradient(circle at 82% 78%, rgba(23, 66, 126, .14), transparent 18%),
    radial-gradient(circle at 16% 82%, rgba(17, 57, 115, .14), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 16%, rgba(0,0,0,.24));
}
.map-style-night::after {
  background:
    radial-gradient(circle at 27% 31%, rgba(255, 206, 96, .07), transparent 8%),
    radial-gradient(circle at 41% 37%, rgba(255, 216, 124, .06), transparent 7%),
    radial-gradient(circle at 54% 46%, rgba(255, 191, 90, .055), transparent 8%),
    radial-gradient(circle at 67% 39%, rgba(255, 204, 118, .05), transparent 7%),
    radial-gradient(circle at 77% 64%, rgba(255, 222, 133, .045), transparent 8%);
}
.map-style-night .terrain-raster {
  opacity: .18;
  mix-blend-mode: soft-light;
  filter: grayscale(.18) brightness(.54) saturate(.55) contrast(1.1);
}
.map-style-night .map-graticule { stroke: rgba(140, 174, 205, .14); }
.map-style-night .atlas-river { stroke: rgba(90, 160, 198, .36); }
.map-style-night .atlas-river.major { stroke: rgba(109, 183, 225, .48); }
.map-style-night .country {
  stroke: rgba(208, 222, 235, .44);
  fill-opacity: .38;
  mix-blend-mode: screen;
}
.map-style-night .country:hover { filter: brightness(1.22); }
.map-style-night .country.selected {
  stroke: #ffe39a;
  fill-opacity: .68;
  filter: drop-shadow(0 0 5px rgba(255, 214, 108, .72));
}
.map-style-night .city-marker .city-halo {
  fill: rgba(255, 207, 109, .18);
  stroke: rgba(255, 218, 140, .82);
}
.map-style-night .city-marker .city-core {
  fill: #ffdf9c;
  stroke: #483517;
}
.map-style-night .city-marker .city-label {
  fill: #fff2d2;
  stroke: rgba(3, 7, 10, .98);
}
.map-style-strip {
  position: absolute;
  z-index: 13;
  left: 7px;
  top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 64px);
  padding: 5px;
  border: 1px solid rgba(201, 173, 119, .34);
  border-radius: 2px;
  background: rgba(5, 11, 15, .9);
  backdrop-filter: blur(8px);
}
.map-style-strip button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(173, 179, 186, .26);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: #c9d0d6;
  font-size: .53rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.map-style-strip button.active {
  color: #1a1a18;
  background: linear-gradient(180deg, #e0bb77, #bb8740);
  border-color: #f2d59f;
  box-shadow: inset 0 1px rgba(255,255,255,.2);
}
.v052-interface .map-style-strip {
  left: 7px;
  top: 7px;
}
.v052-interface .map-style-strip button {
  min-height: 26px;
  padding: 3px 8px;
  font-size: .5rem;
}
.v052-interface .map-toolbar { top: 52px; }
@media (max-width: 1180px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar { grid-template-columns: 205px minmax(0,1fr) 205px; }
}
.v052-interface.lang-en .strategy-brand strong {
  font-size: clamp(.72rem, .95vw, .92rem) !important;
  letter-spacing: .035em !important;
}
.v052-interface.lang-en .strategy-brand small {
  font-size: .45rem !important;
  letter-spacing: .08em !important;
}


/* v0.5.5.7 — controlled founder-screen rollback
   Restores the stable three-column structure from v0.5.5.2 and removes the
   stacked founder-layout experiments introduced afterwards. */
.founder-selection-workbench {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(250px,.78fr) minmax(270px,.88fr) minmax(370px,1.34fr) !important;
  grid-template-rows: minmax(0,1fr) !important;
  grid-template-areas: none !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.founder-hero-card,
.founder-gallery-workbench,
.archetype-catalog {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}
.founder-hero-card.founder-hero-refined {
  display: grid !important;
  grid-template-columns: minmax(108px,.46fr) minmax(0,.54fr) !important;
  grid-template-rows: minmax(0,1fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 8px !important;
}
.founder-hero-refined .founder-hero-portrait {
  position: relative !important;
  min-height: 0 !important;
  max-height: none !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(216,170,88,.30) !important;
  border-radius: 9px !important;
  background: #080f19 !important;
  box-shadow: none !important;
}
.founder-hero-refined .founder-hero-portrait img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: 50% 19% !important;
  transform: none !important;
  filter: contrast(1.03) saturate(.95) brightness(.99) !important;
}
.founder-hero-overlay {
  inset: auto 0 0 0 !important;
  padding: 8px 9px !important;
  background: linear-gradient(180deg, transparent, rgba(3,7,12,.90)) !important;
}
.founder-hero-overlay .eyebrow {
  margin: 0 0 3px !important;
  padding: 0 !important;
  background: none !important;
  font-size: .48rem !important;
}
.founder-hero-overlay strong {
  margin: 0 !important;
  font-size: clamp(.8rem,1.15vw,1rem) !important;
  line-height: 1.05 !important;
}
.founder-hero-refined .founder-hero-copy {
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  align-content: center !important;
  gap: 7px !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.founder-name-field {
  display: grid !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(216,170,88,.18) !important;
  background: rgba(255,255,255,.018) !important;
}
.founder-name-field > span {
  font-size: .51rem !important;
  line-height: 1.1 !important;
  letter-spacing: .05em !important;
  color: var(--accent) !important;
}
.founder-name-field input {
  width: 100% !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 9px !important;
  border-radius: 7px !important;
  font-size: .71rem !important;
}
.founder-name-field small {
  display: block !important;
  font-size: .47rem !important;
  line-height: 1.22 !important;
  color: var(--muted) !important;
}
.founder-hero-summary {
  display: block !important;
  margin: 0 !important;
  font-size: .48rem !important;
  line-height: 1.25 !important;
  color: var(--muted) !important;
  max-height: 3.75em !important;
  overflow: hidden !important;
}
.founder-lock-strip {
  display: grid !important;
  gap: 4px !important;
  padding: 7px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(216,170,88,.16) !important;
  background: rgba(216,170,88,.055) !important;
}
.founder-lock-badge {
  padding: 2px 6px !important;
  font-size: .43rem !important;
}
.founder-lock-badge svg {
  width: 11px !important;
  height: 11px !important;
}
.founder-lock-strip small {
  font-size: .45rem !important;
  line-height: 1.2 !important;
}
.founder-gallery-workbench {
  display: grid !important;
  grid-template-rows: minmax(0,1fr) 30px auto !important;
  gap: 4px !important;
  padding: 5px !important;
}
.portrait-gallery-large {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  grid-template-rows: repeat(2,minmax(0,1fr)) !important;
  gap: 4px !important;
}
.portrait-gallery-large button {
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: auto !important;
  border-radius: 5px !important;
  overflow: hidden !important;
}
.portrait-gallery-large img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: 50% 18% !important;
  filter: contrast(1.04) saturate(.95) !important;
}
.portrait-gallery-large button > span {
  display: none !important;
}
.portrait-gallery-toolbar {
  display: grid !important;
  grid-template-columns: 30px 38px 30px minmax(0,1fr) !important;
  gap: 4px !important;
  align-items: center !important;
}
.portrait-gallery-toolbar .icon-button {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
}
.portrait-gallery-toolbar > span {
  font-size: .54rem !important;
  text-align: center !important;
}
.portrait-upload-button {
  height: 30px !important;
  min-height: 30px !important;
  font-size: .5rem !important;
}
.founder-gallery-workbench > small {
  font-size: .43rem !important;
  line-height: 1.15 !important;
  text-align: center !important;
}
.archetype-catalog {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  grid-template-rows: repeat(4,minmax(0,1fr)) !important;
  gap: 4px !important;
  padding: 5px !important;
  overflow: hidden !important;
}
.archetype-catalog > button {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  gap: 2px !important;
  padding: 5px !important;
  border-radius: 5px !important;
  overflow: hidden !important;
  align-content: start !important;
}
.archetype-catalog header strong {
  font-size: .55rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.archetype-catalog header small {
  font-size: .37rem !important;
}
.archetype-catalog p,
.archetype-catalog span {
  margin: 0 !important;
  font-size: .42rem !important;
  line-height: 1.14 !important;
  overflow: hidden !important;
}
.campaign-workbench {
  grid-template-rows: minmax(0,1fr) 40px !important;
  gap: 6px !important;
  padding: 6px !important;
}
.campaign-footer {
  grid-template-columns: 110px minmax(0,1fr) 180px !important;
  gap: 8px !important;
}
.campaign-footer button {
  height: 38px !important;
  min-height: 38px !important;
}
@media (max-height: 520px) and (orientation: landscape) {
  .founder-selection-workbench {
    grid-template-columns: 215px 235px minmax(315px,1fr) !important;
  }
  .founder-hero-card.founder-hero-refined {
    grid-template-columns: 92px minmax(0,1fr) !important;
    gap: 6px !important;
    padding: 6px !important;
  }
  .founder-hero-summary {
    display: none !important;
  }
  .founder-lock-strip {
    padding: 5px 6px !important;
  }
  .founder-lock-badge {
    display: none !important;
  }
  .founder-name-field {
    padding: 6px !important;
    gap: 3px !important;
  }
  .founder-name-field input {
    min-height: 30px !important;
    height: 30px !important;
    font-size: .64rem !important;
  }
  .founder-name-field small,
  .founder-lock-strip small,
  .founder-gallery-workbench > small {
    font-size: .4rem !important;
    line-height: 1.12 !important;
  }
  .archetype-catalog p {
    display: none !important;
  }
  .archetype-catalog > button {
    padding: 4px !important;
  }
  .campaign-workbench {
    grid-template-rows: minmax(0,1fr) 36px !important;
  }
  .campaign-footer button {
    height: 34px !important;
    min-height: 34px !important;
  }
}

/* v0.5.6.6 — twelve-character founder selection */
.character-campaign-workbench {
  grid-template-rows: minmax(0, 1fr) 42px !important;
  gap: 7px !important;
  padding: 7px !important;
}
.character-selection-workbench {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(245px, .86fr) minmax(360px, 1.22fr) minmax(285px, .92fr);
  gap: 8px;
  overflow: hidden;
}
.character-stage-card,
.character-control-card,
.character-profile-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.character-stage-card {
  background: #070d13;
}
.character-stage-card > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 20%;
  filter: saturate(.97) contrast(1.03) brightness(.96);
}
.character-stage-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.02) 45%, rgba(3,7,11,.93) 100%),
    linear-gradient(90deg, rgba(0,0,0,.13), transparent 28%, transparent 75%, rgba(0,0,0,.09));
}
.character-stage-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  display: grid;
  gap: 3px;
  text-shadow: 0 2px 8px #000;
}
.character-stage-caption span {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(226,185,105,.45);
  border-radius: 999px;
  background: rgba(8,14,20,.72);
  color: var(--accent);
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.character-stage-caption strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.08rem, 1.8vw, 1.55rem);
  line-height: 1;
  color: #f3e4c4;
}
.character-stage-caption small {
  color: #e3c78d;
  font-size: .56rem;
  font-weight: 800;
}
.character-control-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 7px;
  padding: 8px;
}
.character-identity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.character-control-card .founder-name-field {
  padding: 7px !important;
  gap: 4px !important;
}
.character-control-card .founder-name-field input {
  height: 32px !important;
  min-height: 32px !important;
}
.character-control-card .founder-name-field small {
  min-height: 1.15em;
  font-size: .41rem !important;
}
.character-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}
.character-gallery-heading h2 {
  margin: 2px 0 0;
  font-size: .68rem;
  line-height: 1.15;
}
.character-gallery-heading .eyebrow {
  font-size: .42rem;
}
.character-selection-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid rgba(216,170,88,.24);
  border-radius: 999px;
  color: var(--accent);
  font-size: .47rem;
  font-weight: 800;
}
.character-selection-count svg {
  width: 11px;
  height: 11px;
}
.character-portrait-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.character-portrait-grid button {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(159,169,180,.28);
  border-radius: 7px;
  background: #081018;
  color: #fff;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.character-portrait-grid button:hover {
  border-color: rgba(216,170,88,.72);
  transform: translateY(-1px);
}
.character-portrait-grid button.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(216,170,88,.28), 0 0 14px rgba(216,170,88,.16);
}
.character-portrait-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(.94) contrast(1.04);
}
.character-portrait-grid button > span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 11px 3px 3px;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(2,5,8,.92));
  font-size: .4rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.character-portrait-grid button > i {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #10151a;
  box-shadow: 0 2px 8px #0008;
}
.character-portrait-grid button > i svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}
.character-lock-strip {
  grid-template-columns: auto minmax(0,1fr) !important;
  align-items: center;
  gap: 7px !important;
  padding: 6px 7px !important;
}
.character-lock-strip small {
  min-width: 0;
}
.character-profile-card {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
  align-content: start;
  gap: 7px;
  padding: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.character-profile-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(216,170,88,.17);
}
.character-profile-card > header div > span {
  color: var(--accent);
  font-size: .45rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.character-profile-card > header h2 {
  margin: 2px 0 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.08rem;
  color: #f0dfba;
}
.character-profile-card > header > strong {
  flex: 0 0 auto;
  max-width: 42%;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(216,170,88,.1);
  color: var(--accent);
  font-size: .46rem;
  line-height: 1.25;
  text-align: right;
}
.character-profile-summary {
  margin: 0;
  color: var(--muted);
  font-size: .53rem;
  line-height: 1.42;
}
.character-stat-list {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(159,169,180,.16);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
}
.character-stat-row {
  display: grid;
  grid-template-columns: 74px minmax(0,1fr) 22px;
  align-items: center;
  gap: 6px;
}
.character-stat-row > span {
  color: var(--text-soft);
  font-size: .45rem;
  font-weight: 700;
}
.character-stat-row > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.character-stat-row > div i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #96662f, #e2bc73);
}
.character-stat-row > b {
  color: #e8d5aa;
  font-size: .46rem;
  text-align: right;
}
.character-effect-card {
  padding: 7px 8px;
  border: 1px solid rgba(159,169,180,.16);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
}
.character-effect-card > span {
  display: block;
  margin-bottom: 3px;
  font-size: .44rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.character-effect-card.positive > span { color: #8cd3aa; }
.character-effect-card.negative > span { color: #e5a0a0; }
.character-effect-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: .48rem;
  line-height: 1.35;
}
.character-starting-effect {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(216,170,88,.28);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(216,170,88,.11), rgba(216,170,88,.025));
}
.character-starting-effect > svg {
  flex: 0 0 auto;
  width: 17px;
  color: var(--accent);
}
.character-starting-effect div {
  display: grid;
  gap: 2px;
}
.character-starting-effect span {
  color: var(--muted);
  font-size: .4rem;
  text-transform: uppercase;
}
.character-starting-effect strong {
  color: #efd9a7;
  font-size: .52rem;
}
.character-world-workbench {
  grid-template-columns: minmax(420px, 1.1fr) minmax(330px, .9fr) !important;
}
.character-campaign-summary {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(160px, .46fr) minmax(0, .54fr) !important;
  grid-template-rows: minmax(0,1fr) !important;
  padding: 0 !important;
  overflow: hidden;
}
.character-campaign-summary > img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  border-radius: 0 !important;
}
.character-summary-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: 43%;
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid rgba(216,170,88,.35);
  border-radius: 8px;
  background: rgba(5,10,15,.83);
  backdrop-filter: blur(6px);
}
.character-summary-overlay span {
  color: var(--accent);
  font-size: .43rem;
  font-weight: 900;
  text-transform: uppercase;
}
.character-summary-overlay h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
}
.character-summary-overlay strong { color: #e8cc91; font-size: .6rem; }
.character-summary-overlay small { color: var(--muted); font-size: .43rem; line-height: 1.25; }
.character-campaign-summary > section {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}
.character-campaign-summary > section p {
  margin: 0;
  font-size: .57rem;
  line-height: 1.5;
}
.character-campaign-summary > section > span {
  width: max-content;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(216,170,88,.25);
  border-radius: 999px;
  color: var(--accent);
  font-size: .52rem;
  font-weight: 800;
}

@media (max-width: 1120px) and (orientation: landscape) {
  .character-selection-workbench {
    grid-template-columns: minmax(210px,.72fr) minmax(340px,1.18fr) minmax(250px,.88fr);
  }
  .character-stage-caption { left: 10px; right: 10px; bottom: 10px; }
  .character-profile-card { padding: 8px; gap: 5px; }
  .character-profile-summary { font-size: .47rem; }
  .character-stat-row { grid-template-columns: 64px minmax(0,1fr) 20px; }
  .character-effect-card { padding: 6px; }
  .character-effect-card p { font-size: .44rem; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .character-campaign-workbench {
    grid-template-rows: minmax(0,1fr) 36px !important;
    gap: 5px !important;
    padding: 5px !important;
  }
  .character-selection-workbench {
    grid-template-columns: minmax(190px,.7fr) minmax(330px,1.24fr) minmax(245px,.86fr);
    gap: 6px;
  }
  .character-control-card { padding: 6px; gap: 5px; }
  .character-identity-fields { gap: 5px; }
  .character-control-card .founder-name-field { padding: 5px !important; gap: 2px !important; }
  .character-control-card .founder-name-field input { height: 27px !important; min-height: 27px !important; font-size: .61rem !important; }
  .character-control-card .founder-name-field small { display: none !important; }
  .character-gallery-heading h2 { font-size: .57rem; }
  .character-portrait-grid { gap: 3px; }
  .character-portrait-grid button > span { font-size: .34rem; padding-top: 8px; }
  .character-lock-strip { padding: 4px 5px !important; }
  .character-lock-strip small { font-size: .37rem !important; }
  .character-profile-card { padding: 7px; gap: 4px; }
  .character-profile-card > header { padding-bottom: 4px; }
  .character-profile-card > header h2 { font-size: .83rem; }
  .character-profile-summary { display: none; }
  .character-stat-list { gap: 3px; padding: 5px; }
  .character-stat-row { grid-template-columns: 58px minmax(0,1fr) 19px; gap: 4px; }
  .character-stat-row > span, .character-stat-row > b { font-size: .39rem; }
  .character-effect-card { padding: 5px; }
  .character-effect-card p { font-size: .39rem; line-height: 1.2; }
  .character-starting-effect { padding: 5px; }
  .character-starting-effect strong { font-size: .44rem; }
  .character-stage-caption strong { font-size: .92rem; }
  .character-stage-caption small { font-size: .46rem; }
  .character-campaign-workbench .campaign-footer button { height: 34px !important; min-height: 34px !important; }
}


/* v0.5.2.3 — mobile command layout and HTML compositor map surface */

:root {
  --ui-scrollbar: rgba(216, 170, 88, .52);
}

*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { min-width: 0; line-height: 1.18; }
button > span, button > b, button > small { min-width: 0; }

/* ---------- Main game command surface ---------- */
.game-screen.grand-strategy-screen.v052-interface {
  grid-template-rows: 58px minmax(0, 1fr);
}

.v052-interface .strategy-command-bar {
  height: 58px;
  min-height: 58px;
  grid-template-columns: minmax(170px, 205px) minmax(360px, 1fr) minmax(360px, 395px);
  gap: 5px;
  padding: 4px max(6px, env(safe-area-inset-right)) 4px max(6px, env(safe-area-inset-left));
  overflow: hidden;
}

.v052-interface .strategy-command-bar > * { min-width: 0; }

.v052-interface .strategy-brand {
  height: 50px;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px;
  padding: 4px 7px;
  overflow: hidden;
}

.v052-interface .strategy-brand-emblem { width: 40px; height: 40px; }
.v052-interface .strategy-brand-emblem svg { width: 24px; height: 24px; }
.v052-interface .strategy-brand > span:last-child { min-width: 0; overflow: hidden; }
.v052-interface .strategy-brand strong,
.v052-interface .strategy-brand small,
.v052-interface .strategy-brand em {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
.v052-interface .strategy-brand strong { font-size: clamp(.92rem, 1.35vw, 1.25rem); }
.v052-interface .strategy-brand small { font-size: .54rem; letter-spacing: .13em; }
.v052-interface .strategy-brand em { margin-top: 2px; font-size: .46rem; text-overflow: ellipsis; }

.v052-interface .game-topbar .resource-bar {
  height: 50px;
  grid-template-columns: repeat(8, minmax(39px, 1fr));
  gap: 3px;
  overflow: hidden;
}
.v052-interface .game-topbar .resource-chip {
  height: 50px;
  min-height: 0;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 3px;
  padding: 4px;
  overflow: hidden;
}
.v052-interface .game-topbar .resource-chip svg {
  width: 15px;
  height: 15px;
  filter: none;
}
.v052-interface .game-topbar .resource-chip > span { min-width: 0; overflow: hidden; }
.v052-interface .game-topbar .resource-chip small {
  font-size: clamp(.36rem, .48vw, .5rem);
  letter-spacing: .015em;
  text-overflow: ellipsis;
}
.v052-interface .game-topbar .resource-chip strong {
  font-size: clamp(.62rem, .72vw, .8rem);
  text-overflow: clip;
}

.v052-interface .turn-command-cluster {
  height: 50px;
  grid-template-columns: minmax(112px, 1fr) 42px 36px 36px minmax(96px, 108px);
  gap: 3px;
}
.v052-interface .turn-command-cluster .turn-badge,
.v052-interface .turn-count-badge,
.v052-interface .turn-command-cluster .topbar-icon,
.v052-interface .turn-command-cluster .top-turn-button {
  height: 50px;
  min-height: 50px;
}
.v052-interface .turn-command-cluster .date-badge {
  min-width: 0;
  grid-template-columns: 1fr;
  grid-template-rows: 14px minmax(0, 1fr);
  padding: 4px 6px;
  overflow: hidden;
}
.v052-interface .turn-command-cluster .date-badge span,
.v052-interface .turn-command-cluster .date-badge strong { grid-column: 1; min-width: 0; }
.v052-interface .turn-command-cluster .date-badge span { font-size: .43rem; }
.v052-interface .turn-command-cluster .date-badge strong {
  align-self: center;
  font-size: clamp(.58rem, .7vw, .72rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v052-interface .turn-count-badge { gap: 1px; padding: 3px; }
.v052-interface .turn-count-badge span { font-size: .4rem; }
.v052-interface .turn-count-badge strong { font-size: .83rem; }
.v052-interface .turn-command-cluster .topbar-icon { width: 36px; padding: 0; }
.v052-interface .turn-command-cluster .topbar-icon svg { width: 17px; height: 17px; }
.v052-interface .turn-command-cluster .top-turn-button {
  min-width: 0;
  padding: 3px 5px;
  gap: 3px;
  font-size: .61rem;
  white-space: normal;
  text-align: center;
}
.v052-interface .turn-command-cluster .top-turn-button svg { flex: 0 0 auto; width: 15px; height: 15px; }

.v052-interface .strategy-stage {
  grid-template-rows: minmax(0, 1fr) 74px;
  gap: 5px;
  padding: 5px 6px max(5px, env(safe-area-inset-bottom));
}

.v052-interface .strategy-workspace {
  grid-template-columns: 168px minmax(0, 1fr) minmax(265px, 292px);
  gap: 5px;
}

.v052-interface .strategy-command-menu {
  grid-template-rows: 30px minmax(0, 1fr) auto;
  gap: 4px;
  padding: 4px;
}
.v052-interface .strategy-command-menu > header { white-space: nowrap; overflow: hidden; }
.v052-interface .strategy-command-menu nav { gap: 3px; }
.v052-interface .strategy-command-menu nav button {
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 6px;
  padding: 4px 6px;
  overflow: visible;
}
.v052-interface .strategy-command-menu nav button > svg { width: 21px; height: 21px; }
.v052-interface .strategy-command-menu nav button > span { overflow: hidden; }
.v052-interface .strategy-command-menu nav button b {
  font-size: .63rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.v052-interface .strategy-command-menu nav button small { font-size: .43rem; }
.v052-interface .command-news p { font-size: .44rem; }

/* ---------- Map compositor ---------- */
.v052-interface .map-shell,
.v052-interface .world-map-viewport {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.v052-interface .world-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  contain: strict;
  background: #07121b;
  cursor: grab;
}
.v052-interface .world-map-viewport:active { cursor: grabbing; }

.v052-interface .world-map-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 0 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint style;
  isolation: isolate;
}

/* These effects forced the SVG to be repainted on every movement frame. */
.v052-interface .world-map-surface .country,
.v052-interface .world-map-surface .atlas-river,
.v052-interface .world-map-surface .map-graticule,
.v052-interface .world-map-surface .city-marker * {
  vector-effect: none;
}
.v052-interface .world-map-surface .country {
  mix-blend-mode: normal;
  filter: none;
  transition: fill-opacity .1s ease;
}
.v052-interface .world-map-surface .country.selected {
  mix-blend-mode: normal;
  filter: none;
  stroke: #ffe09a;
  stroke-width: 1.7;
}
.v052-interface .world-map-surface .atlas-river { filter: none; }
.v052-interface .world-map-viewport.is-interacting .country,
.v052-interface .world-map-viewport.is-interacting .city-marker,
.v052-interface .world-map-viewport.is-interacting .city-label { transition: none !important; }

@media (hover: hover) and (pointer: fine) {
  .v052-interface .world-map-surface .country:hover { fill-opacity: .58; filter: brightness(1.08); }
}

/* Progressive city density. Rules deliberately override legacy forced display. */
.v052-interface .world-map-surface .city-rank-1 { opacity: 1; pointer-events: auto; }
.v052-interface .world-map-surface .city-rank-2,
.v052-interface .world-map-surface .city-rank-3 { display: inline !important; opacity: 0; pointer-events: none; }
.v052-interface .world-map-surface.map-zoom-1 .city-rank-2 { opacity: .92; pointer-events: auto; }
.v052-interface .world-map-surface .city-rank-2 .city-label { opacity: 0; }
.v052-interface .world-map-surface.map-zoom-2 .city-rank-2 .city-label { opacity: 1; }
.v052-interface .world-map-surface.map-zoom-3 .city-rank-3 { opacity: .92; pointer-events: auto; }
.v052-interface .world-map-surface .city-rank-3 .city-label { opacity: 0; }
.v052-interface .world-map-surface.map-zoom-4 .city-rank-3 .city-label { opacity: 1; }

.v052-interface .map-toolbar { z-index: 20; }
.v052-interface .layer-dock { z-index: 18; }
.v052-interface .map-legend { z-index: 17; }

/* ---------- Region inspector: scroll instead of collision ---------- */
.v052-interface .panel.region-panel {
  grid-template-rows: 40px 30px minmax(0, 1fr);
  padding: 5px;
  overflow: hidden;
}
.v052-interface .region-panel > header { min-height: 40px; height: 40px; padding: 4px 5px; }
.v052-interface .region-panel > header h2 { max-width: none; font-size: .78rem; }
.v052-interface .region-tabs { min-height: 30px; height: 30px; margin: 0; }
.v052-interface .region-tabs button { min-height: 26px; height: 26px; font-size: .5rem; }
.v052-interface .region-panel-body {
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-scrollbar) transparent;
  padding-right: 2px;
}
.v052-interface .region-tab-content,
.v052-interface .region-panel .overview-tab,
.v052-interface .region-panel .demography-tab,
.v052-interface .region-panel .factor-list,
.v052-interface .religion-distribution-list {
  min-height: min-content;
  height: auto;
  display: grid;
  grid-template-rows: none;
  align-content: start;
  overflow: visible;
}
.v052-interface .region-panel .overview-tab { gap: 4px; }
.v052-interface .region-panel .stat-grid { height: auto; min-height: 45px; }
.v052-interface .region-panel .meter-row { min-height: 19px; height: auto; }
.v052-interface .region-panel .state-policy-button { min-height: 39px; height: auto; }
.v052-interface .region-panel .change-box { min-height: 34px; height: auto; overflow: visible; }
.v052-interface .region-panel .change-box p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
}
.v052-interface .region-panel .action-list {
  min-height: 0;
  height: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: minmax(52px, auto);
  gap: 4px;
}
.v052-interface .region-panel .action-list button {
  min-height: 52px;
  height: auto;
  align-items: center;
  overflow: hidden;
}
.v052-interface .region-panel .action-list b,
.v052-interface .region-panel .action-list small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.12;
}
.v052-interface .religion-distribution-list { gap: 3px; }
.v052-interface .religion-distribution-list > div { min-height: 24px; }
.v052-interface .region-panel .demography-grid { min-height: 190px; grid-auto-rows: minmax(85px, auto); }
.v052-interface .region-panel .factor-list { gap: 4px; }
.v052-interface .region-panel .factor-list > div:not(.rate-summary) { min-height: 18px; }

/* ---------- Compact bottom dock ---------- */
.v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
  min-height: 0;
  height: 74px;
  grid-template-columns: minmax(440px, 46%) minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
}
.v052-interface .bottom-dock-tabs { gap: 3px; }
.v052-interface .bottom-dock-tabs button {
  min-height: 0;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 3px;
  padding: 3px 4px;
  font-size: .48rem;
  overflow: hidden;
}
.v052-interface .bottom-dock-tabs span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.08;
}
.v052-interface .bottom-dock-panel { overflow: hidden; }
.v052-interface .compact-events { gap: 4px; }
.v052-interface .compact-events > div { font-size: .46rem; }
.v052-interface .compact-advisor p { font-size: .47rem; }

/* ---------- Strategy windows and management ---------- */
.modal.strategy-window {
  width: min(1180px, calc(100vw - 16px));
  height: min(760px, calc(100dvh - 12px));
  grid-template-rows: 42px 34px minmax(0, 1fr);
  padding: 6px;
  overflow: hidden;
}
.modal.strategy-window .window-header { height: 42px; min-height: 42px; overflow: hidden; }
.modal.strategy-window .window-header > div { min-width: 0; overflow: hidden; }
.modal.strategy-window .window-header h2,
.modal.strategy-window .window-header small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal.strategy-window .modal-tabs {
  height: 34px;
  min-height: 34px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.modal.strategy-window .modal-tabs button {
  height: 30px;
  min-height: 30px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.modal.strategy-window .modal-content {
  min-height: 0;
  height: auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-scrollbar) transparent;
}

.management-content > * { min-width: 0; }
.construction-workbench {
  min-width: 760px;
  height: 100%;
  min-height: 280px;
  grid-template-rows: 52px 34px minmax(190px, 1fr);
  overflow: hidden;
}
.management-summary { min-width: 0; height: 52px; }
.management-summary article { min-width: 0; overflow: hidden; }
.management-summary article span,
.management-summary article strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.construction-workbench .section-heading-row { min-width: 0; overflow: hidden; }
.construction-workbench .section-heading-row > div { min-width: 0; }
.construction-workbench .section-heading-row h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-type-list {
  min-width: 0;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  grid-template-rows: minmax(190px, 1fr);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.place-type-card {
  min-width: 145px;
  grid-template-rows: 62px auto minmax(50px, 1fr) auto;
  overflow: hidden;
}
.place-type-card .place-illustration { height: 62px; }
.place-type-card > div:first-of-type { min-width: 0; }
.place-type-card > div:first-of-type strong,
.place-type-card > div:first-of-type small { overflow-wrap: anywhere; }
.place-type-card > div:first-of-type small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.clergy-workbench {
  min-width: 760px;
  min-height: 280px;
  grid-template-columns: 200px minmax(0, 1fr);
  overflow: hidden;
}
.clergy-command-card {
  grid-template-rows: auto auto auto auto minmax(48px, auto) 28px auto;
  align-content: start;
  overflow-y: auto;
}
.clergy-command-card .primary-button {
  height: auto;
  min-height: 48px;
  padding: 6px 7px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.clergy-command-card .compact-pager { min-height: 28px; }
.clergy-grid {
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  grid-template-rows: repeat(2, minmax(128px, 1fr));
  overflow: auto;
  align-content: start;
  scrollbar-width: thin;
}
.clergy-card { min-width: 135px; min-height: 128px; }
.clergy-card header strong { max-width: 100%; }
.clergy-metrics span { min-width: 0; gap: 3px; }

.finance-workbench {
  min-width: 820px;
  min-height: 305px;
  height: 100%;
  grid-template-columns: 202px minmax(290px, .95fr) minmax(290px, 1.05fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "summary detail detail"
    "summary policies ledger";
  gap: 5px;
  overflow: hidden;
}
.finance-summary-card {
  grid-area: summary;
  grid-template-rows: auto auto auto repeat(6, minmax(25px, 1fr)) minmax(39px, auto) 28px;
  align-content: stretch;
  overflow-y: auto;
}
.finance-summary-card > div { min-height: 25px; gap: 5px; }
.finance-summary-card > div span,
.finance-summary-card > div b { min-width: 0; white-space: nowrap; }
.finance-summary-card .secondary-button { height: auto; min-height: 39px; white-space: normal; }
.finance-detail-grid {
  grid-area: detail;
  grid-column: auto;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  overflow-x: auto;
}
.finance-detail-grid article { min-width: 105px; align-items: center; }
.finance-policy-grid {
  grid-area: policies;
  grid-template-columns: repeat(2, minmax(135px, 1fr));
  grid-template-rows: repeat(3, minmax(70px, 1fr));
  overflow: auto;
}
.finance-policy-grid button {
  min-width: 135px;
  min-height: 70px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.finance-policy-grid small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.ledger-grid {
  grid-area: ledger;
  grid-template-rows: repeat(8, minmax(28px, 1fr));
  overflow: auto;
}
.ledger-grid article { min-height: 28px; }

.network-workbench { min-width: 700px; min-height: 280px; overflow: hidden; }
.network-grid { overflow: auto; grid-auto-rows: minmax(34px, auto); }
.network-grid div { min-height: 34px; }

/* ---------- Remaining application screens ---------- */
.landscape-menu,
.landscape-form-screen,
.landscape-form-screen .form-card,
.save-workbench,
.settings-card,
.store-layout,
.prose {
  min-width: 0;
}

.landscape-form-screen .form-card,
.save-workbench,
.landscape-form-screen .prose,
.store-explainer,
.store-grid {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-scrollbar) transparent;
}

.save-card, .settings-card fieldset, .settings-card .toggle-row,
.store-card, .campaign-card { min-width: 0; overflow: hidden; }
.save-card button, .settings-card button, .store-card button,
.campaign-card button { white-space: normal; overflow-wrap: anywhere; }

/* ---------- Tablet / phone landscape ---------- */
@media (max-width: 1180px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface { grid-template-rows: 54px minmax(0, 1fr); }
  .v052-interface .strategy-command-bar {
    height: 54px;
    min-height: 54px;
    grid-template-columns: 136px minmax(250px, 1fr) minmax(318px, 350px);
    gap: 4px;
  }
  .v052-interface .strategy-brand,
  .v052-interface .game-topbar .resource-bar,
  .v052-interface .turn-command-cluster { height: 46px; }
  .v052-interface .strategy-brand { grid-template-columns: 34px minmax(0, 1fr); gap: 5px; padding: 3px 5px; }
  .v052-interface .strategy-brand-emblem { width: 32px; height: 32px; }
  .v052-interface .strategy-brand-emblem svg { width: 20px; height: 20px; }
  .v052-interface .strategy-brand strong { font-size: .88rem; }
  .v052-interface .strategy-brand small { font-size: .43rem; letter-spacing: .08em; }
  .v052-interface .strategy-brand em { display: none; }

  .v052-interface .game-topbar .resource-bar { grid-template-columns: repeat(8, minmax(29px, 1fr)); }
  .v052-interface .game-topbar .resource-chip {
    height: 46px;
    grid-template-columns: 1fr;
    place-items: center;
    align-content: center;
    gap: 1px;
    padding: 2px;
  }
  .v052-interface .game-topbar .resource-chip svg { width: 13px; height: 13px; }
  .v052-interface .game-topbar .resource-chip > span { display: block; text-align: center; }
  .v052-interface .game-topbar .resource-chip small { display: none !important; }
  .v052-interface .game-topbar .resource-chip strong { font-size: .59rem; }

  .v052-interface .turn-command-cluster {
    height: 46px;
    grid-template-columns: minmax(92px, 1fr) 37px 32px 32px minmax(82px, 94px);
  }
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-count-badge,
  .v052-interface .turn-command-cluster .topbar-icon,
  .v052-interface .turn-command-cluster .top-turn-button {
    height: 46px;
    min-height: 46px;
  }
  .v052-interface .turn-command-cluster .date-badge { grid-template-rows: 12px 1fr; padding: 3px 4px; }
  .v052-interface .turn-command-cluster .date-badge strong { font-size: .55rem; }
  .v052-interface .turn-command-cluster .topbar-icon { width: 32px; }
  .v052-interface .turn-command-cluster .top-turn-button { font-size: .53rem; padding: 2px 3px; }

  .v052-interface .strategy-workspace { grid-template-columns: 112px minmax(0, 1fr) minmax(232px, 26vw); }
  .v052-interface .strategy-command-menu { grid-template-rows: 25px minmax(0, 1fr); padding: 3px; }
  .v052-interface .strategy-command-menu > header span,
  .v052-interface .strategy-command-menu .command-news { display: none; }
  .v052-interface .strategy-command-menu nav button {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 4px;
    padding: 3px 4px;
    place-items: center start;
    text-align: left;
  }
  .v052-interface .strategy-command-menu nav button > svg { width: 18px; height: 18px; }
  .v052-interface .strategy-command-menu nav button b { font-size: .54rem; }
  .v052-interface .strategy-command-menu nav button small { display: none; }

  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    grid-template-columns: minmax(375px, 51%) minmax(0, 1fr);
  }
  .v052-interface .bottom-dock-tabs button { grid-template-columns: 13px minmax(0, 1fr); font-size: .43rem; }
  .v052-interface .bottom-dock-tabs svg { width: 13px; height: 13px; }

  .v052-interface .region-panel .action-list { grid-template-columns: 1fr; grid-auto-rows: minmax(48px, auto); }

  .modal.strategy-window { width: calc(100vw - 10px); height: calc(100dvh - 8px); }
  .modal.strategy-window .window-header h2 { font-size: .86rem; }
}

@media (max-width: 860px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar { grid-template-columns: 124px minmax(224px, 1fr) 318px; }
  .v052-interface .strategy-brand small { display: none; }
  .v052-interface .strategy-brand > span:last-child { align-content: center; }
  .v052-interface .strategy-workspace { grid-template-columns: 106px minmax(0, 1fr) 225px; }
  .v052-interface .strategy-stage { grid-template-rows: minmax(0, 1fr) 66px; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { height: 66px; grid-template-columns: minmax(350px, 53%) minmax(0, 1fr); }
  .v052-interface .compact-events > div:nth-child(3) { display: none; }
  .v052-interface .compact-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface { grid-template-rows: 50px minmax(0, 1fr); }
  .v052-interface .strategy-command-bar { height: 50px; min-height: 50px; padding-top: 2px; padding-bottom: 2px; }
  .v052-interface .strategy-brand,
  .v052-interface .game-topbar .resource-bar,
  .v052-interface .turn-command-cluster { height: 44px; }
  .v052-interface .game-topbar .resource-chip,
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-count-badge,
  .v052-interface .turn-command-cluster .topbar-icon,
  .v052-interface .turn-command-cluster .top-turn-button { height: 44px; min-height: 44px; }
  .v052-interface .strategy-stage { grid-template-rows: minmax(0, 1fr) 62px; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { height: 62px; }
  .v052-interface .strategy-command-menu { grid-template-rows: 22px minmax(0, 1fr); }
  .v052-interface .strategy-command-menu > header { font-size: .48rem; }
  .v052-interface .strategy-command-menu nav button { min-height: 0; }
  .v052-interface .map-legend { display: none; }
  .v052-interface .layer-dock { bottom: 5px; }
  .v052-interface .layer-dock button { min-height: 35px; }
  .v052-interface .region-panel > header { height: 36px; min-height: 36px; }
  .v052-interface .panel.region-panel { grid-template-rows: 36px 28px minmax(0, 1fr); }
  .v052-interface .region-tabs { height: 28px; min-height: 28px; }
  .v052-interface .region-tabs button { height: 24px; min-height: 24px; }
  .v052-interface .compact-advisor .founder-portrait.compact { width: 32px; height: 42px; }

  .modal.strategy-window { grid-template-rows: 38px 31px minmax(0, 1fr); padding: 4px; }
  .modal.strategy-window .window-header { height: 38px; min-height: 38px; }
  .modal.strategy-window .modal-tabs { height: 31px; min-height: 31px; }
  .modal.strategy-window .modal-tabs button { height: 27px; min-height: 27px; }
}

@media (max-height: 390px) and (orientation: landscape) {
  .v052-interface .strategy-stage { grid-template-rows: minmax(0, 1fr) 56px; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { height: 56px; }
  .v052-interface .bottom-dock-tabs button { font-size: .39rem; padding: 2px; }
  .v052-interface .bottom-dock-panel { padding: 1px 4px; }
  .v052-interface .compact-advisor p { max-height: 2.35em; font-size: .43rem; }
  .v052-interface .map-toolbar button { width: 32px; height: 32px; min-height: 32px; }
}

/* ---------- Targeted second-pass corrections from visual measurement ---------- */
.settings-card.settings-card-v051 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 7px;
  overflow: auto;
}
.settings-card-v051 > fieldset { grid-column: span 3; }
.settings-card-v051 > .toggle-row { grid-column: span 2; }
.settings-card-v051 fieldset,
.settings-card-v051 .toggle-row { min-width: 0; min-height: 118px; }
.settings-card-v051 .segmented-control { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-card-v051 fieldset:first-child .segmented-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-card-v051 .segmented-control button {
  min-width: 0;
  min-height: 40px;
  padding: 5px 7px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.settings-card-v051 .toggle-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-content: center;
  overflow: hidden;
}
.settings-card-v051 .toggle-row > span { min-width: 0; grid-template-columns: 22px minmax(0, 1fr); }
.settings-card-v051 .toggle-row b,
.settings-card-v051 .toggle-row small { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.settings-card-v051 .toggle-row input { flex: 0 0 auto; }

.save-workbench { overflow: auto; }
.save-workbench .save-list {
  min-height: 287px;
  grid-template-rows: repeat(2, minmax(140px, 1fr));
  overflow: auto;
}
.save-workbench .save-card { min-height: 140px; overflow: hidden; }
.save-workbench .save-card > div:first-child { min-width: 0; }
.save-workbench .save-card h2 { overflow-wrap: anywhere; }
.save-workbench .save-card > div:last-child { flex-wrap: wrap; }

.store-primary-actions button {
  height: auto;
  min-height: 40px;
  padding: 5px 6px;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

.construction-workbench {
  height: max(100%, 325px);
  min-height: 325px;
  grid-template-rows: 52px 34px minmax(225px, 1fr);
}
.place-type-list { grid-template-rows: minmax(225px, 1fr); overflow: auto; }
.place-type-card { min-height: 225px; height: 100%; grid-template-rows: 58px auto minmax(48px, 1fr) auto; }
.place-type-card .place-illustration { height: 58px; }

.campaign-footer { min-width: 0; }
.campaign-footer > * { min-width: 0; }
.campaign-footer button { padding: 4px 8px; white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 930px) and (orientation: landscape) {
  .attribute-workbench {
    grid-template-columns: minmax(185px, .62fr) minmax(330px, 1.18fr) minmax(170px, .58fr);
    gap: 6px;
    overflow: hidden;
  }
  .attribute-summary-card { min-width: 0; padding: 7px; }
  .attribute-summary-card h2 { font-size: clamp(.88rem, 2vw, 1.18rem); }
  .attribute-impact-card { min-width: 0; padding: 8px; overflow: auto; }
  .attribute-impact-card h3 { font-size: .86rem; }
  .attribute-impact-card article { padding: 5px; }
  .attribute-impact-card p,
  .attribute-impact-card small { font-size: .47rem; line-height: 1.18; }
  .allocation-board { min-width: 0; grid-template-rows: repeat(5, minmax(32px, 1fr)); padding: 7px; gap: 5px; }
  .allocation-row-large {
    min-width: 0;
    min-height: 32px;
    grid-template-columns: 92px minmax(0, 1fr) 34px;
    gap: 7px;
    padding: 4px 7px;
    overflow: hidden;
    font-size: .61rem;
  }
  .allocation-row-large b { font-size: .78rem; }

  .world-setup-workbench {
    grid-template-columns: minmax(470px, 1.45fr) minmax(220px, .55fr);
    overflow: hidden;
  }
  .world-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(42px, auto);
    gap: 5px;
    padding: 7px;
    align-content: start;
    overflow: hidden;
  }
  .world-settings-grid label { min-width: 0; gap: 2px; font-size: .55rem; }
  .world-settings-grid label:nth-child(2) { grid-column: span 2; }
  .world-settings-grid label:nth-child(3),
  .world-settings-grid label:nth-child(4),
  .world-settings-grid label:nth-child(5) { grid-column: auto; }
  .world-settings-grid select,
  .world-settings-grid input,
  .fixed-calendar-cadence { height: 33px; min-height: 33px; padding: 0 6px; font-size: .58rem; }
  .world-settings-grid .info-callout {
    grid-column: 1 / -1;
    min-height: 42px;
    max-height: 48px;
    padding: 5px 7px;
    overflow: hidden;
  }
  .world-settings-grid .info-callout p {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: .52rem;
    line-height: 1.15;
  }
  .campaign-summary-card { min-width: 0; padding: 7px; }
  .campaign-summary-card p { max-height: 2.5em; overflow: hidden; }
}

@media (max-height: 390px) and (orientation: landscape) {
  .settings-card.settings-card-v051 { grid-template-rows: repeat(2, minmax(112px, 1fr)); }
  .settings-card-v051 fieldset,
  .settings-card-v051 .toggle-row { min-height: 112px; padding: 7px; }
  .settings-card-v051 legend { margin-bottom: 3px; }
  .settings-card-v051 fieldset small { margin-bottom: 4px; }
  .settings-card-v051 .segmented-control button { min-height: 34px; }
  .save-workbench .save-list { min-height: 282px; grid-template-rows: repeat(2, minmax(137px, 1fr)); }
  .save-workbench .save-card { min-height: 137px; padding: 7px; }
}

.campaign-workbench { grid-template-rows: minmax(0, 1fr) 44px; }
.campaign-footer button { height: auto; min-height: 40px; line-height: 1.08; }
.v052-interface .world-map-viewport.is-interacting .country { filter: none !important; }
.finance-summary-card .secondary-button { min-height: 52px; height: auto; padding: 6px; line-height: 1.12; }

/* ========================================================================== */
/* v0.5.2.3 — mobile landscape command redesign and Android map compositor   */
/* ========================================================================== */

.topbar-utility,
.mobile-inspector-trigger,
.region-panel-close { display: none; }

.region-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

/* The transformed surface is now an HTML compositor layer. The raster and
   vector atlas move together without asking Android to repaint one giant SVG. */
.v052-interface .world-map-surface {
  --map-inverse-scale: 1;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 0 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint style;
  isolation: isolate;
}

.v052-interface .terrain-raster,
.v052-interface .world-map-vector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
}

.v052-interface .terrain-raster {
  z-index: 0;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform: translateZ(0);
}

.v052-interface .world-map-vector {
  z-index: 1;
  overflow: visible;
  background: transparent;
}

/* Markers remain screen-sized instead of becoming giant coins at deep zoom. */
.v052-interface .city-marker-visual {
  transform: scale(var(--map-inverse-scale));
  transform-origin: 0 0;
  transform-box: view-box;
  transition: opacity .12s ease;
}

.v052-interface .city-marker .city-halo { r: 4.3; }
.v052-interface .city-marker.city-capital .city-halo { r: 4.8; }
.v052-interface .city-marker .city-core { r: 1.8; }
.v052-interface .city-marker.city-capital .city-core { r: 2.2; }
.v052-interface .city-marker .city-label { font-size: 4.6px; }
.v052-interface .city-marker .city-glyph { font-size: 3.1px; }

.v052-interface .world-map-surface:not(.map-zoom-1) .city-rank-1 .city-label { opacity: 0; }
.v052-interface .world-map-surface .city-marker.selected .city-label { opacity: 1 !important; }
.v052-interface .world-map-viewport.is-interacting .city-label,
.v052-interface .world-map-viewport.is-interacting .map-graticule,
.v052-interface .world-map-viewport.is-interacting .river-layer {
  opacity: 0 !important;
}
.v052-interface .world-map-viewport.is-interacting .country { stroke-width: .35; }

@media (max-width: 980px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    grid-template-rows: 46px minmax(0, 1fr);
  }

  .v052-interface .strategy-command-bar {
    z-index: 80;
    height: 46px;
    min-height: 46px;
    grid-template-columns: 76px minmax(0, 1fr) 238px;
    gap: 3px;
    padding: 3px max(4px, env(safe-area-inset-right)) 3px max(4px, env(safe-area-inset-left));
    overflow: visible;
  }

  .v052-interface .strategy-brand {
    height: 40px;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 0;
    padding: 3px 2px;
    border-color: rgba(216, 170, 88, .32);
  }
  .v052-interface .strategy-brand > span:last-child { display: none; }
  .v052-interface .strategy-brand-emblem { width: 27px; height: 27px; }
  .v052-interface .strategy-brand-emblem svg { width: 17px; height: 17px; }
  .v052-interface .strategy-brand strong { font-size: .69rem; letter-spacing: .035em; }
  .v052-interface .strategy-brand small,
  .v052-interface .strategy-brand em { display: none; }

  .v052-interface .game-topbar .resource-bar {
    height: 40px;
    grid-template-columns: repeat(4, minmax(38px, 1fr));
    gap: 2px;
  }
  .v052-interface .game-topbar .resource-chip {
    display: none;
    height: 40px;
    min-height: 40px;
    grid-template-columns: 14px minmax(0, 1fr);
    place-items: center stretch;
    gap: 3px;
    padding: 3px 4px;
  }
  .v052-interface .game-topbar .resource-chip:nth-child(1),
  .v052-interface .game-topbar .resource-chip:nth-child(2),
  .v052-interface .game-topbar .resource-chip:nth-child(4),
  .v052-interface .game-topbar .resource-chip:nth-child(5) { display: grid; }
  .v052-interface .game-topbar .resource-chip svg { width: 14px; height: 14px; }
  .v052-interface .game-topbar .resource-chip > span { display: grid; text-align: left; }
  .v052-interface .game-topbar .resource-chip small { display: none !important; }
  .v052-interface .game-topbar .resource-chip strong { font-size: .66rem; }

  .v052-interface .turn-command-cluster {
    height: 40px;
    grid-template-columns: minmax(86px, 1fr) 31px 31px minmax(78px, 88px);
    gap: 2px;
  }
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-count-badge,
  .v052-interface .turn-command-cluster .topbar-icon,
  .v052-interface .turn-command-cluster .top-turn-button {
    height: 40px;
    min-height: 40px;
  }
  .v052-interface .turn-command-cluster .date-badge {
    grid-template-rows: 10px 1fr;
    padding: 3px 5px;
  }
  .v052-interface .turn-command-cluster .date-badge span { font-size: .39rem; }
  .v052-interface .turn-command-cluster .date-badge strong { font-size: .55rem; }
  .v052-interface .turn-count-badge { width: 31px; padding: 2px; }
  .v052-interface .turn-count-badge span { font-size: .34rem; }
  .v052-interface .turn-count-badge strong { font-size: .72rem; }
  .v052-interface .turn-command-cluster .topbar-save,
  .v052-interface .turn-command-cluster .topbar-exit { display: none; }
  .v052-interface .turn-command-cluster .top-turn-button {
    padding: 2px 4px;
    font-size: .54rem;
    line-height: 1.05;
  }
  .v052-interface .turn-command-cluster .top-turn-button svg { width: 13px; height: 13px; }

  .v052-interface .topbar-utility {
    position: relative;
    display: block;
    width: 31px;
    height: 40px;
  }
  .v052-interface .topbar-utility .utility-trigger {
    display: grid;
    width: 31px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }
  .v052-interface .topbar-utility-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 120;
    width: 138px;
    display: grid;
    gap: 3px;
    padding: 5px;
    border: 1px solid rgba(216, 170, 88, .55);
    background: rgba(7, 13, 18, .98);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .12s ease, transform .12s ease;
  }
  .v052-interface .topbar-utility.open .topbar-utility-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .v052-interface .topbar-utility-menu button {
    min-height: 34px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border: 1px solid rgba(154, 167, 174, .3);
    background: #111c24;
    color: #edf0eb;
    text-align: left;
    font-size: .65rem;
  }
  .v052-interface .topbar-utility-menu svg { width: 16px; height: 16px; }

  .v052-interface .strategy-stage {
    position: relative;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 3px max(3px, env(safe-area-inset-right)) max(3px, env(safe-area-inset-bottom)) max(3px, env(safe-area-inset-left));
  }

  .v052-interface .strategy-workspace {
    position: relative;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 3px;
    overflow: visible;
  }

  .v052-interface .strategy-command-menu {
    z-index: 35;
    grid-template-rows: minmax(0, 1fr);
    padding: 3px;
    border-radius: 2px;
  }
  .v052-interface .strategy-command-menu > header,
  .v052-interface .strategy-command-menu .command-news { display: none; }
  .v052-interface .strategy-command-menu nav {
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }
  .v052-interface .strategy-command-menu nav button {
    grid-template-columns: 1fr;
    grid-template-rows: 18px auto;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 2px;
    text-align: center;
    overflow: hidden;
  }
  .v052-interface .strategy-command-menu nav button > svg { width: 18px; height: 18px; }
  .v052-interface .strategy-command-menu nav button > span { overflow: visible; }
  .v052-interface .strategy-command-menu nav button b {
    max-width: 100%;
    font-size: .49rem;
    line-height: 1;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .v052-interface .strategy-command-menu nav button small { display: none; }
  .v052-interface .strategy-command-menu .nav-with-badge i {
    right: 2px;
    top: 2px;
    min-width: 14px;
    height: 14px;
    font-size: .42rem;
  }

  .v052-interface .map-column,
  .v052-interface .map-shell { border-radius: 2px; }
  .v052-interface .map-shell { box-shadow: none; }

  .v052-interface .mobile-inspector-trigger {
    position: absolute;
    z-index: 31;
    top: 5px;
    left: 5px;
    max-width: min(220px, 42vw);
    min-height: 31px;
    display: grid;
    grid-template-columns: 17px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(216, 170, 88, .55);
    border-radius: 3px;
    background: rgba(7, 13, 18, .88);
    color: #f0e8d7;
    backdrop-filter: blur(6px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .35);
    font-size: .59rem;
    text-align: left;
  }
  .v052-interface .mobile-inspector-trigger svg { width: 16px; height: 16px; color: #d9ae5f; }
  .v052-interface .mobile-inspector-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .v052-interface .map-toolbar {
    top: 5px;
    right: 5px;
    grid-template-columns: 31px;
    gap: 3px;
  }
  .v052-interface .map-toolbar button {
    width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;
  }
  .v052-interface .map-toolbar button svg { width: 16px; height: 16px; }

  .v052-interface .layer-dock {
    left: 50%;
    right: auto;
    bottom: 43px;
    width: auto;
    max-width: calc(100% - 20px);
    grid-template-columns: repeat(8, 29px);
    gap: 2px;
    padding: 2px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: rgba(5, 11, 15, .82);
  }
  .v052-interface .layer-dock button {
    width: 29px;
    min-width: 29px;
    min-height: 29px;
    height: 29px;
    padding: 0;
  }
  .v052-interface .layer-dock button svg { width: 15px; height: 15px; }
  .v052-interface .layer-dock button span { display: none; }
  .v052-interface .map-legend { display: none; }

  /* Right inspector is a drawer. It no longer permanently consumes half of
     the map on a phone. */
  .v052-interface .panel.region-panel {
    position: absolute;
    z-index: 45;
    top: 3px;
    right: 3px;
    bottom: 3px;
    width: min(326px, 47vw);
    height: auto;
    grid-template-rows: 46px 32px minmax(0, 1fr);
    padding: 5px;
    border-color: rgba(216, 170, 88, .52);
    box-shadow: -14px 0 32px rgba(0, 0, 0, .5);
    transform: translate3d(calc(100% + 8px), 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease-out, opacity .14s ease-out;
  }
  .v052-interface .strategy-workspace.inspector-open > .region-panel {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
  }
  .v052-interface .region-panel > header {
    min-height: 46px;
    height: 46px;
    padding: 3px 4px;
  }
  .v052-interface .region-panel > header h2 { font-size: .9rem; }
  .v052-interface .region-panel .eyebrow { font-size: .52rem; }
  .v052-interface .city-region-line { max-width: 175px; font-size: .51rem; }
  .v052-interface .region-header-actions { gap: 4px; }
  .v052-interface .influence-emblem { min-width: 48px; }
  .v052-interface .region-panel-close {
    width: 29px;
    height: 29px;
    min-height: 29px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(154, 167, 174, .35);
    background: #111c24;
    color: #dde2df;
  }
  .v052-interface .region-panel-close svg { width: 16px; height: 16px; }
  .v052-interface .region-tabs { height: 32px; min-height: 32px; }
  .v052-interface .region-tabs button { height: 28px; min-height: 28px; font-size: .57rem; }
  .v052-interface .region-panel-body { padding-right: 3px; }
  .v052-interface .region-panel .stat-grid {
    min-height: 76px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .v052-interface .region-panel .stat-grid div { min-height: 35px; padding: 5px; }
  .v052-interface .region-panel .stat-grid span { font-size: .54rem; }
  .v052-interface .region-panel .stat-grid strong { font-size: .7rem; }
  .v052-interface .region-panel .meter-row {
    min-height: 23px;
    grid-template-columns: 74px minmax(0, 1fr) 25px;
  }
  .v052-interface .region-panel .meter-row span,
  .v052-interface .region-panel .meter-row b { font-size: .58rem; }
  .v052-interface .region-panel .state-policy-button { min-height: 45px; }
  .v052-interface .region-panel .state-policy-button b { font-size: .69rem; }
  .v052-interface .region-panel .state-policy-button small,
  .v052-interface .region-panel .state-policy-button em { font-size: .5rem; }
  .v052-interface .region-panel .change-box strong { font-size: .63rem; }
  .v052-interface .region-panel .change-box p { font-size: .52rem; }
  .v052-interface .region-panel .action-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(50px, auto);
  }
  .v052-interface .region-panel .action-list b { font-size: .61rem; }
  .v052-interface .region-panel .action-list small { display: block; font-size: .48rem; }

  /* Bottom information is a 36px command strip. Its content appears only when
     the user deliberately expands a tab. */
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    position: absolute;
    z-index: 34;
    left: 76px;
    right: 3px;
    bottom: max(3px, env(safe-area-inset-bottom));
    width: auto;
    height: 36px;
    min-height: 36px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 32px;
    gap: 3px;
    padding: 2px;
    overflow: hidden;
    box-shadow: 0 -7px 22px rgba(0, 0, 0, .3);
    transition: height .16s ease-out;
  }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock.is-expanded {
    height: min(106px, 34vh);
    grid-template-rows: 32px minmax(0, 1fr);
  }
  .v052-interface .bottom-dock-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }
  .v052-interface .bottom-dock-tabs button {
    min-height: 30px;
    height: 30px;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 3px;
    padding: 2px 4px;
    font-size: .46rem;
  }
  .v052-interface .bottom-dock-tabs button svg { width: 14px; height: 14px; }
  .v052-interface .bottom-dock-tabs button b { min-width: 13px; height: 13px; font-size: .39rem; }
  .v052-interface .bottom-dock-tabs span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v052-interface .strategy-bottom-dock.is-collapsed .bottom-dock-panel { display: none; }
  .v052-interface .bottom-dock-panel {
    min-height: 0;
    padding: 3px 5px;
    overflow: auto;
  }
  .v052-interface .compact-events > div { font-size: .52rem; }

  .v052-interface .strategy-stage:has(.strategy-bottom-dock.is-expanded) .layer-dock { bottom: 112px; }

  /* City density is deliberately restrained on phone-size maps. */
  .v052-interface .world-map-surface .city-rank-2,
  .v052-interface .world-map-surface .city-rank-3 { opacity: 0; pointer-events: none; }
  .v052-interface .world-map-surface.map-zoom-2 .city-rank-2 { opacity: .95; pointer-events: auto; }
  .v052-interface .world-map-surface.map-zoom-3 .city-rank-2 .city-label { opacity: 1; }
  .v052-interface .world-map-surface.map-zoom-4 .city-rank-3 { opacity: .9; pointer-events: auto; }
  .v052-interface .world-map-surface.map-zoom-4 .city-rank-3 .city-label { opacity: 0; }

  /* Management is laid out inside the viewport; only the dense card/list
     sections scroll. The entire window no longer becomes a slightly wider
     desktop canvas that is clipped on Android. */
  .management-modal .management-content { overflow: hidden; }
  .management-modal .construction-workbench,
  .management-modal .clergy-workbench,
  .management-modal .finance-workbench,
  .management-modal .network-workbench {
    min-width: 0;
    min-height: 0;
    width: 100%;
  }
  .management-modal .construction-workbench {
    height: 100%;
    grid-template-rows: 52px 34px minmax(0, 1fr);
  }
  .management-modal .construction-workbench .section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .management-modal .maintenance-badge {
    max-width: 210px;
    padding: 4px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .58rem;
  }
  .management-modal .place-type-list {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }
  .management-modal .clergy-workbench { grid-template-columns: 174px minmax(0, 1fr); }
  .management-modal .clergy-command-card { min-width: 0; }
  .management-modal .clergy-train-button {
    min-height: 52px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    text-align: left;
  }
  .management-modal .clergy-train-button > svg { width: 17px; height: 17px; }
  .management-modal .clergy-train-button > span {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .management-modal .clergy-train-button b { font-size: .61rem; line-height: 1.05; }
  .management-modal .clergy-train-button small {
    min-width: 0;
    color: rgba(10, 18, 24, .76);
    font-size: .46rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }
  .management-modal .clergy-grid {
    min-width: 0;
    grid-template-columns: repeat(4, minmax(132px, 1fr));
  }
  .management-modal .finance-workbench {
    grid-template-columns: 178px minmax(220px, 1.08fr) minmax(190px, .92fr);
    grid-template-rows: 48px minmax(0, 1fr);
  }
  .management-modal .finance-summary-card {
    min-width: 0;
    padding: 5px;
    grid-template-rows: auto repeat(6, 22px) 34px 24px;
    gap: 3px;
    overflow: hidden;
  }
  .management-modal .finance-summary-card > svg,
  .management-modal .finance-summary-card > .eyebrow { display: none; }
  .management-modal .finance-summary-card > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .7rem;
  }
  .management-modal .finance-summary-card > div {
    min-height: 22px;
    height: 22px;
    padding: 2px 4px;
    font-size: .53rem;
  }
  .management-modal .finance-summary-card .secondary-button {
    min-height: 34px;
    height: 34px;
    padding: 3px 5px;
    overflow: hidden;
    font-size: .5rem;
    line-height: 1.05;
  }
  .management-modal .finance-summary-card .compact-pager {
    min-height: 24px;
    height: 24px;
  }
  .management-modal .finance-detail-grid {
    grid-column: 2 / 4;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
  }
  .management-modal .finance-detail-grid article {
    min-width: 0;
    padding: 3px 4px;
    overflow: hidden;
  }
  .management-modal .finance-detail-grid article span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: .47rem;
    line-height: 1.05;
  }
  .management-modal .finance-detail-grid article b { font-size: .56rem; }
  .management-modal .finance-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }
  .management-modal .finance-policy-grid button {
    min-width: 0;
    min-height: 0;
    padding: 4px 6px;
  }
  .management-modal .finance-policy-grid button strong { font-size: .58rem; }
  .management-modal .finance-policy-grid button small { font-size: .45rem; }
  .management-modal .finance-policy-grid button span { font-size: .46rem; }
  .management-modal .ledger-grid { min-width: 0; }
  .management-modal .network-workbench { height: 100%; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    grid-template-columns: 64px minmax(0, 1fr) 222px;
  }
  .v052-interface .strategy-brand {
    grid-template-columns: 1fr;
    place-items: center;
    padding-inline: 2px;
  }
  .v052-interface .strategy-brand > span:last-child { display: none; }
  .v052-interface .strategy-brand-emblem { width: 24px; height: 24px; }
  .v052-interface .strategy-brand strong { font-size: .59rem; }
  .v052-interface .turn-command-cluster { grid-template-columns: minmax(78px, 1fr) 29px 29px minmax(74px, 82px); }
  .v052-interface .turn-count-badge,
  .v052-interface .topbar-utility,
  .v052-interface .topbar-utility .utility-trigger { width: 29px; }
  .v052-interface .strategy-workspace { grid-template-columns: 64px minmax(0, 1fr); }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { left: 70px; }
  .v052-interface .strategy-command-menu nav button b { font-size: .45rem; }
  .v052-interface .panel.region-panel { width: min(314px, 52vw); }
}

@media (max-height: 390px) and (orientation: landscape) {
  .v052-interface .strategy-stage { grid-template-rows: minmax(0, 1fr); }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { height: 34px; min-height: 34px; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock.is-expanded { height: 94px; }
  .v052-interface .bottom-dock-tabs button { min-height: 28px; height: 28px; }
  .v052-interface .layer-dock { bottom: 40px; }
  .v052-interface .strategy-stage:has(.strategy-bottom-dock.is-expanded) .layer-dock { bottom: 100px; }
}

/* ========================================================================== */
/* v0.5.2.4 — readable mobile strategy HUD and focused atlas                  */
/* ========================================================================== */

.mobile-layer-control { display: none; }

/* The raster and vector atlas use the same proportional crop. The previous
   object-fit:fill + preserveAspectRatio:none combination visibly distorted the
   world whenever the map viewport was wider than the 1000×520 atlas. */
.v052-interface .terrain-raster {
  object-fit: cover;
  opacity: .8;
  filter: saturate(.82) brightness(.78) contrast(1.08);
}
.v052-interface .world-map-vector { overflow: hidden; }
.v052-interface .country {
  fill-opacity: .7;
  stroke: rgba(224, 232, 229, .58);
  stroke-width: .64;
}
.v052-interface .country.selected {
  fill-opacity: .9;
  stroke: #ffe19a;
  stroke-width: 2.1;
}
.v052-interface .map-graticule { opacity: .12; }
.v052-interface .atlas-river { opacity: .6; }

/* Marker geometry is compensated both for map zoom and for the SVG-to-screen
   scale, so a label remains approximately 11 CSS pixels on a phone. */
.v052-interface .city-marker-visual {
  transform: scale(var(--map-marker-scale, 1));
  transform-origin: 0 0;
  transform-box: view-box;
}
.v052-interface .city-marker .city-halo {
  r: 5.2;
  fill: rgba(9, 16, 20, .82);
  stroke: #e5b654;
  stroke-width: 1.4;
}
.v052-interface .city-marker.city-capital .city-halo { r: 6.1; }
.v052-interface .city-marker .city-core {
  r: 2.2;
  fill: #ffd36e;
  stroke: #10161a;
  stroke-width: 1;
}
.v052-interface .city-marker.city-capital .city-core { r: 2.8; }
.v052-interface .city-marker .city-glyph { display: none; }
.v052-interface .city-marker .city-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  stroke: rgba(4, 8, 10, .98);
  stroke-width: 3.6px;
  paint-order: stroke fill;
}
.v052-interface .world-map-surface:not(.map-zoom-1) .city-rank-1 .city-label {
  opacity: 1;
}

/* Visible map-control text. Icons are supplementary, never the only clue. */
.v052-interface .map-toolbar button > span {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}
.v052-interface .map-toolbar > em {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(11,17,29,.74);
  color: #c1cad8;
  font-size: .72rem;
  font-style: normal;
}

@media (max-width: 980px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    grid-template-rows: 74px minmax(0, 1fr);
  }

  /* Two-row command bar: campaign controls above, every resource named below. */
  .v052-interface .strategy-command-bar {
    height: 74px;
    min-height: 74px;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: 36px 32px;
    gap: 3px 5px;
    padding: 3px max(5px, env(safe-area-inset-right)) 3px max(5px, env(safe-area-inset-left));
    overflow: visible;
  }
  .v052-interface .strategy-brand {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 68px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    place-items: center start;
    gap: 7px;
    padding: 6px 7px;
  }
  .v052-interface .strategy-brand > span:last-child {
    display: grid;
    align-content: center;
    overflow: visible;
  }
  .v052-interface .strategy-brand-emblem { width: 32px; height: 32px; }
  .v052-interface .strategy-brand-emblem svg { width: 20px; height: 20px; }
  .v052-interface .strategy-brand strong {
    display: block;
    font-size: 14px;
    line-height: 1;
    letter-spacing: .045em;
    text-overflow: clip;
  }
  .v052-interface .strategy-brand small {
    display: block;
    margin-top: 4px;
    font-size: 8px;
    line-height: 1.05;
    letter-spacing: .055em;
  }
  .v052-interface .strategy-brand em { display: none; }

  .v052-interface .turn-command-cluster {
    grid-column: 2;
    grid-row: 1;
    height: 36px;
    grid-template-columns: minmax(150px, 1fr) 48px 40px minmax(106px, 124px);
    gap: 3px;
  }
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-count-badge,
  .v052-interface .turn-command-cluster .topbar-icon,
  .v052-interface .turn-command-cluster .top-turn-button,
  .v052-interface .topbar-utility,
  .v052-interface .topbar-utility .utility-trigger {
    height: 36px;
    min-height: 36px;
  }
  .v052-interface .turn-command-cluster .date-badge {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
  }
  .v052-interface .turn-command-cluster .date-badge span {
    grid-column: 1;
    font-size: 9px;
    letter-spacing: .07em;
  }
  .v052-interface .turn-command-cluster .date-badge strong {
    grid-column: 2;
    justify-self: start;
    font-size: 12px;
    overflow: visible;
    text-overflow: clip;
  }
  .v052-interface .turn-count-badge {
    width: 48px;
    gap: 1px;
    padding: 2px;
  }
  .v052-interface .turn-count-badge span { font-size: 8px; }
  .v052-interface .turn-count-badge strong { font-size: 13px; }
  .v052-interface .turn-command-cluster .topbar-save,
  .v052-interface .turn-command-cluster .topbar-exit { display: none; }
  .v052-interface .topbar-utility { width: 40px; }
  .v052-interface .topbar-utility .utility-trigger {
    width: 40px;
    padding: 0;
  }
  .v052-interface .turn-command-cluster .top-turn-button {
    min-width: 106px;
    padding: 3px 9px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .v052-interface .game-topbar .resource-bar {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 32px;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 3px;
    overflow: hidden;
  }
  .v052-interface .game-topbar .resource-chip,
  .v052-interface .game-topbar .resource-chip:nth-child(n) {
    display: grid;
    height: 32px;
    min-height: 32px;
    grid-template-columns: 13px minmax(0, 1fr);
    place-items: center stretch;
    gap: 3px;
    padding: 2px 4px;
    border-radius: 3px;
  }
  .v052-interface .game-topbar .resource-chip svg {
    width: 12px;
    height: 12px;
  }
  .v052-interface .game-topbar .resource-chip > span {
    display: grid;
    align-content: center;
    gap: 1px;
    text-align: left;
  }
  .v052-interface .game-topbar .resource-chip .resource-label-full { display: none !important; }
  .v052-interface .game-topbar .resource-chip .resource-label-short {
    display: block !important;
    font-size: 8px;
    line-height: 1;
    letter-spacing: .015em;
    overflow: visible;
    text-overflow: clip;
  }
  .v052-interface .game-topbar .resource-chip strong {
    display: block;
    font-size: 11px;
    line-height: 1;
  }

  .v052-interface .strategy-stage {
    padding: 3px max(3px, env(safe-area-inset-right)) max(3px, env(safe-area-inset-bottom)) max(3px, env(safe-area-inset-left));
  }
  .v052-interface .strategy-workspace {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 4px;
  }

  /* Navigation is text-first. Six commands fit at 36–39 px each on a
     345px-tall Android landscape viewport. */
  .v052-interface .strategy-command-menu {
    padding: 4px;
    grid-template-rows: minmax(0, 1fr);
  }
  .v052-interface .strategy-command-menu nav {
    grid-template-rows: repeat(6, minmax(34px, 1fr));
    gap: 4px;
  }
  .v052-interface .strategy-command-menu nav button {
    grid-template-columns: 20px minmax(0, 1fr);
    grid-template-rows: 1fr;
    place-items: center start;
    align-content: center;
    gap: 7px;
    padding: 4px 7px;
    text-align: left;
    overflow: visible;
  }
  .v052-interface .strategy-command-menu nav button > svg {
    width: 18px;
    height: 18px;
  }
  .v052-interface .strategy-command-menu nav button > span {
    display: block;
    overflow: visible;
  }
  .v052-interface .strategy-command-menu nav button b {
    display: block;
    max-width: none;
    font-size: 12px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: visible;
    overflow-wrap: normal;
  }
  .v052-interface .strategy-command-menu nav button small { display: none; }
  .v052-interface .strategy-command-menu .nav-with-badge i {
    right: 3px;
    top: 3px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
  }

  .v052-interface .map-column { overflow: hidden; }

  /* One explicit layer selector replaces eight unexplained glyphs. */
  .v052-interface .mobile-layer-control {
    position: absolute;
    z-index: 32;
    top: 6px;
    left: 6px;
    width: 168px;
    min-height: 45px;
    display: grid;
    grid-template-rows: 14px 25px;
    gap: 2px;
    padding: 4px 6px;
    border: 1px solid rgba(216, 170, 88, .62);
    border-radius: 4px;
    background: rgba(7, 13, 18, .93);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .38);
    color: #f0e8d7;
  }
  .v052-interface .mobile-layer-control > span {
    color: #d7ab5b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .v052-interface .mobile-layer-control select {
    width: 100%;
    height: 25px;
    min-height: 25px;
    padding: 2px 24px 2px 6px;
    border: 1px solid rgba(154, 167, 174, .38);
    border-radius: 3px;
    background: #101b23;
    color: #f4f0e8;
    font-size: 12px;
    font-weight: 800;
  }
  .v052-interface .layer-dock { display: none; }

  .v052-interface .mobile-inspector-trigger {
    top: 57px;
    left: 6px;
    width: 168px;
    max-width: 168px;
    min-height: 45px;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 7px;
    padding: 5px 7px;
  }
  .v052-interface .mobile-inspector-trigger > span {
    display: grid;
    gap: 2px;
    overflow: hidden;
  }
  .v052-interface .mobile-inspector-trigger b {
    display: block;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v052-interface .mobile-inspector-trigger small {
    display: block;
    color: #aeb9bd;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
  }

  .v052-interface .map-toolbar {
    top: 6px;
    right: 6px;
    left: auto;
    width: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 104px));
    gap: 4px;
  }
  .v052-interface .map-toolbar button {
    width: auto;
    height: 31px;
    min-height: 31px;
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
  }
  .v052-interface .map-toolbar button svg { width: 14px; height: 14px; }
  .v052-interface .map-toolbar > em { display: none; }

  .v052-interface .map-legend { display: none; }

  /* Bottom strip uses readable text; the icons disappear on phone because the
     labels already state the action. */
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    left: 131px;
    right: 3px;
    height: 39px;
    min-height: 39px;
    grid-template-rows: 35px;
    padding: 2px;
  }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock.is-expanded {
    height: min(112px, 36vh);
    grid-template-rows: 35px minmax(0, 1fr);
  }
  .v052-interface .bottom-dock-tabs { gap: 3px; }
  .v052-interface .bottom-dock-tabs button {
    height: 33px;
    min-height: 33px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 800;
  }
  .v052-interface .bottom-dock-tabs button svg { display: none; }
  .v052-interface .bottom-dock-tabs button span {
    overflow: visible;
    text-overflow: clip;
  }
  .v052-interface .bottom-dock-tabs button b {
    right: 3px;
    top: 2px;
    min-width: 15px;
    height: 15px;
    font-size: 9px;
  }
  .v052-interface .bottom-dock-panel {
    padding: 5px 8px;
  }
  .v052-interface .compact-events > div,
  .v052-interface .compact-world span,
  .v052-interface .compact-turn small,
  .v052-interface .compact-advisor p,
  .v052-interface .compact-victory p { font-size: 10px; }

  .v052-interface .panel.region-panel {
    width: min(340px, 55vw);
  }

  /* Selected-region focus makes the first screen useful instead of presenting
     an unreadable postage-stamp world map. */
  .v052-interface .world-map-viewport {
    background: radial-gradient(circle at 55% 42%, #173148 0, #07131d 70%);
  }
  .v052-interface .world-map-surface .city-rank-1 {
    opacity: 1;
    pointer-events: auto;
  }
  .v052-interface .world-map-surface .city-rank-2,
  .v052-interface .world-map-surface .city-rank-3 {
    opacity: 0;
    pointer-events: none;
  }
  .v052-interface .world-map-surface.map-zoom-2 .city-rank-2 {
    opacity: .95;
    pointer-events: auto;
  }
  .v052-interface .world-map-surface.map-zoom-3 .city-rank-2 .city-label { opacity: 1; }
  .v052-interface .world-map-surface.map-zoom-4 .city-rank-3 {
    opacity: .9;
    pointer-events: auto;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    grid-template-columns: 104px minmax(0, 1fr);
  }
  .v052-interface .strategy-workspace { grid-template-columns: 116px minmax(0, 1fr); }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { left: 123px; }
  .v052-interface .strategy-command-menu nav button b { font-size: 11px; }
  .v052-interface .turn-command-cluster {
    grid-template-columns: minmax(136px, 1fr) 44px 36px minmax(96px, 108px);
  }
  .v052-interface .game-topbar .resource-chip .resource-label-short { font-size: 7px; }
  .v052-interface .game-topbar .resource-chip strong { font-size: 10px; }
  .v052-interface .map-toolbar { grid-template-columns: repeat(2, minmax(84px, 94px)); }
  .v052-interface .map-toolbar button { font-size: 9px; }
}

@media (max-height: 390px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    grid-template-rows: 72px minmax(0, 1fr);
  }
  .v052-interface .strategy-command-bar {
    height: 72px;
    min-height: 72px;
    grid-template-rows: 35px 31px;
  }
  .v052-interface .strategy-brand { height: 66px; }
  .v052-interface .turn-command-cluster,
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-count-badge,
  .v052-interface .turn-command-cluster .top-turn-button,
  .v052-interface .topbar-utility,
  .v052-interface .topbar-utility .utility-trigger { height: 35px; min-height: 35px; }
  .v052-interface .game-topbar .resource-bar,
  .v052-interface .game-topbar .resource-chip,
  .v052-interface .game-topbar .resource-chip:nth-child(n) { height: 31px; min-height: 31px; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { height: 37px; min-height: 37px; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock.is-expanded { height: 108px; }
  .v052-interface .bottom-dock-tabs button { height: 31px; min-height: 31px; }
}

/* v0.5.2.4 visual audit corrections */
@media (max-width: 980px) and (orientation: landscape) {
  .v052-interface .strategy-brand {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .v052-interface .strategy-brand > span:last-child { align-content: center; }
  .v052-interface .strategy-brand small { display: none; }
  .v052-interface .strategy-brand strong { font-size: 15px; }

  .v052-interface .topbar-utility .utility-trigger,
  .v052-interface .map-toolbar button {
    color: #f4f0e8 !important;
  }
  .v052-interface .topbar-utility .utility-trigger svg,
  .v052-interface .map-toolbar button svg { color: #e0b35e !important; }
  .v052-interface .map-toolbar button > span {
    display: inline !important;
    color: #f4f0e8 !important;
  }
  .v052-interface .map-toolbar button:disabled {
    opacity: .55;
    color: #c2c8c8 !important;
  }

  .v052-interface .city-marker .city-label { opacity: 0 !important; }
  .v052-interface .city-marker.city-in-selected-region .city-label,
  .v052-interface .city-marker.selected .city-label { opacity: 1 !important; }
  .v052-interface .world-map-surface.map-zoom-4 .city-rank-1 .city-label,
  .v052-interface .world-map-surface.map-zoom-4 .city-rank-2 .city-label { opacity: 1 !important; }

  .v052-interface .city-marker:not(.city-in-selected-region) .city-halo {
    r: 3.7;
    fill: rgba(9, 16, 20, .68);
    stroke: rgba(229, 182, 84, .7);
    stroke-width: 1;
  }
  .v052-interface .city-marker:not(.city-in-selected-region) .city-core {
    r: 1.45;
    opacity: .82;
  }
  .v052-interface .city-marker.city-in-selected-region .city-halo {
    r: 5.6;
    fill: rgba(54, 38, 12, .88);
    stroke: #ffd978;
    stroke-width: 1.6;
  }
  .v052-interface .city-marker.city-in-selected-region .city-core {
    r: 2.35;
    fill: #fff0b5;
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  .v052-interface .city-marker.city-in-selected-region {
    display: inline !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .v052-interface .city-marker.city-in-selected-region .city-label,
  .v052-interface .city-marker.selected .city-label {
    display: block !important;
  }
  .v052-interface .map-toolbar button > span {
    white-space: normal;
    line-height: 1.05;
  }
  .v052-interface .map-toolbar button {
    height: 34px;
    min-height: 34px;
  }
}

/* v0.5.2.4 strategic windows keep one coherent high-contrast palette even
   when the surrounding application preference is light. */
.v052-interface {
  --bg: #080e13;
  --surface: #101922;
  --surface-2: #182632;
  --surface-3: #223442;
  --text: #f1ede4;
  --muted: #aeb8c2;
  --border: rgba(174, 190, 198, .28);
  --accent: #e0b35e;
}
.v052-interface .modal-backdrop {
  z-index: 200;
  background: rgba(2, 6, 9, .84);
}
.v052-interface .modal.strategy-window {
  background: linear-gradient(180deg, #14212a, #0b1218);
  color: var(--text);
  border-color: rgba(224, 179, 94, .52);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .78);
}
.v052-interface .modal-tabs button,
.v052-interface .region-tabs button {
  background: #172530;
  color: #b9c3cc;
  border-color: rgba(174, 190, 198, .24);
}
.v052-interface .modal-tabs button.active,
.v052-interface .region-tabs button.active {
  background: #d9ac59;
  color: #111820;
  border-color: #e9c477;
}
.v052-interface .region-panel .stat-grid > div,
.v052-interface .summary-grid article,
.v052-interface .management-overview article,
.v052-interface .finance-detail-grid article,
.v052-interface .place-type-card,
.v052-interface .clergy-card,
.v052-interface .clergy-command-card,
.v052-interface .finance-summary-card,
.v052-interface .network-overview article {
  background: #182632;
  color: #f1ede4;
  border-color: rgba(174, 190, 198, .26);
}
.v052-interface .region-panel .stat-grid span,
.v052-interface .place-type-card small,
.v052-interface .clergy-card small,
.v052-interface .finance-detail-grid span,
.v052-interface .management-overview span {
  color: #aeb8c2;
}
.v052-interface .region-panel .stat-grid strong,
.v052-interface .place-type-card strong,
.v052-interface .finance-detail-grid b {
  color: #f4ead4;
}


/* v0.5.2.4 diplomacy header: preserve the state name and its context instead
   of clipping the subtitle beneath the tab row on short landscape phones. */
@media (max-width: 980px) and (orientation: landscape) {
  .v052-interface .diplomacy-modal.strategy-window {
    grid-template-rows: 50px 31px minmax(0, 1fr);
  }
  .v052-interface .diplomacy-modal.strategy-window .window-header {
    height: 50px;
    min-height: 50px;
    align-items: center;
  }
  .v052-interface .diplomacy-modal.strategy-window .window-header > div {
    display: grid;
    align-content: center;
    gap: 0;
  }
  .v052-interface .diplomacy-modal.strategy-window .window-header .eyebrow {
    font-size: 8px;
    line-height: 1;
  }
  .v052-interface .diplomacy-modal.strategy-window .window-header h2 {
    font-size: 14px;
    line-height: 1.08;
    margin: 1px 0;
  }
  .v052-interface .diplomacy-modal.strategy-window .window-header small {
    display: block;
    font-size: 9px;
    line-height: 1.05;
    color: #aeb8c2;
  }
}

/* v0.5.2.5 English/Turkish topbar fit corrections */
@media (max-width: 980px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .v052-interface .strategy-brand {
    height: 68px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 5px;
    padding: 5px 6px;
  }
  .v052-interface .strategy-brand-emblem {
    width: 26px;
    height: 26px;
  }
  .v052-interface .strategy-brand-emblem svg {
    width: 16px;
    height: 16px;
  }
  .v052-interface .strategy-brand > span:last-child {
    display: grid;
    align-content: center;
    gap: 1px;
    overflow: hidden;
  }
  .v052-interface .strategy-brand strong {
    font-size: 13px;
    line-height: 1;
    letter-spacing: .035em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v052-interface .strategy-brand small {
    display: block;
    font-size: 6.5px;
    line-height: 1.05;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v052-interface.lang-en .strategy-brand strong {
    font-size: 12px;
    letter-spacing: .025em;
  }
  .v052-interface.lang-en .strategy-brand small {
    font-size: 6px;
    letter-spacing: .03em;
  }

  .v052-interface .game-topbar .resource-chip > span {
    gap: 0;
  }
  .v052-interface .game-topbar .resource-chip .resource-label-full {
    display: block !important;
    font-size: 6.1px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v052-interface .game-topbar .resource-chip .resource-label-short {
    display: none !important;
  }
  .v052-interface .game-topbar .resource-chip strong {
    font-size: 10px;
    line-height: 1;
  }
  .v052-interface.lang-en .game-topbar .resource-chip .resource-label-full {
    font-size: 5.65px;
    letter-spacing: -.01em;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    grid-template-columns: 114px minmax(0, 1fr);
  }
  .v052-interface .strategy-brand {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 4px;
    padding: 5px;
  }
  .v052-interface .strategy-brand strong {
    font-size: 12px;
  }
  .v052-interface.lang-en .strategy-brand strong {
    font-size: 11px;
  }
  .v052-interface .strategy-brand small {
    font-size: 6px;
  }
  .v052-interface.lang-en .strategy-brand small {
    font-size: 5.5px;
  }
  .v052-interface .game-topbar .resource-chip .resource-label-full {
    font-size: 5.75px;
  }
  .v052-interface.lang-en .game-topbar .resource-chip .resource-label-full {
    font-size: 5.25px;
  }
  .v052-interface .game-topbar .resource-chip strong {
    font-size: 9.5px;
  }
}

/* ========================================================================== 
   v0.5.2.6 — Premium strategy presentation pass
   Goal: move the HUD away from a generic dashboard and toward a game-grade
   command table with richer framing, depth and hierarchy.
   ========================================================================== */

.v052-interface {
  --premium-gold: #d8b36a;
  --premium-gold-soft: rgba(216, 179, 106, .22);
  --premium-gold-line: rgba(216, 179, 106, .42);
  --premium-ink: #071018;
  --premium-surface: rgba(10, 17, 23, .92);
  --premium-surface-2: rgba(14, 24, 33, .94);
  --premium-blue: rgba(36, 74, 96, .34);
  --premium-shadow: 0 10px 28px rgba(0, 0, 0, .34), 0 2px 8px rgba(0, 0, 0, .28);
}

.game-screen.grand-strategy-screen.v052-interface {
  background:
    radial-gradient(circle at 50% -8%, rgba(216,179,106,.09), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(50,92,120,.09), transparent 24%),
    linear-gradient(180deg, #070b10 0%, #04070b 100%);
}

.v052-interface .strategy-command-bar {
  position: relative;
  border-bottom-color: rgba(216,179,106,.3);
  background:
    linear-gradient(180deg, rgba(19,27,34,.96) 0%, rgba(8,13,18,.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(216,179,106,.18),
    0 10px 28px rgba(0,0,0,.42);
}
.v052-interface .strategy-command-bar::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,179,106,.6), transparent);
  pointer-events: none;
}

.v052-interface .strategy-brand,
.v052-interface .game-topbar .resource-chip,
.v052-interface .turn-command-cluster .turn-badge,
.v052-interface .turn-command-cluster .topbar-icon,
.v052-interface .turn-command-cluster .top-turn-button,
.v052-interface .strategy-command-menu,
.v052-interface .strategy-command-menu nav button,
.v052-interface .map-shell,
.v052-interface .panel.region-panel,
.v052-interface .strategy-bottom-dock.tabbed-bottom-dock,
.v052-interface .bottom-dock-tabs button,
.v052-interface .bottom-dock-panel,
.v052-interface .layer-dock,
.v052-interface .layer-dock button,
.v052-interface .map-toolbar button {
  border-radius: 10px;
}

.v052-interface .strategy-brand {
  position: relative;
  border-color: rgba(216,179,106,.24);
  background:
    linear-gradient(180deg, rgba(16,24,31,.96), rgba(8,13,18,.98)),
    radial-gradient(circle at 18% 20%, rgba(216,179,106,.14), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(216,179,106,.06), var(--premium-shadow);
}
.v052-interface .strategy-brand::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.03);
  pointer-events: none;
}
.v052-interface .strategy-brand strong {
  color: #f0cf8c;
  text-shadow: 0 1px 0 rgba(0,0,0,.8), 0 0 18px rgba(216,179,106,.08);
}
.v052-interface .strategy-brand small {
  color: #c9b89a;
}
.v052-interface .strategy-brand-emblem {
  border-color: rgba(216,179,106,.72);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,230,177,.2), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(216,179,106,.15), transparent 75%),
    #0b1319;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(216,179,106,.18), 0 8px 18px rgba(0,0,0,.35);
}

.v052-interface .game-topbar .resource-chip {
  position: relative;
  border-color: rgba(185, 163, 124, .26);
  background:
    linear-gradient(180deg, rgba(25,34,42,.98) 0%, rgba(10,16,22,.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -10px 24px rgba(0,0,0,.14), var(--premium-shadow);
}
.v052-interface .game-topbar .resource-chip::before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(216,179,106,.68), transparent);
  opacity: .86;
}
.v052-interface .game-topbar .resource-chip svg {
  color: #e0b767;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.7));
}
.v052-interface .game-topbar .resource-chip small {
  color: #c7c1b3;
  letter-spacing: .03em;
}
.v052-interface .game-topbar .resource-chip strong {
  color: #f6f0e1;
  text-shadow: 0 1px 0 rgba(0,0,0,.85);
}

.v052-interface .turn-command-cluster .turn-badge,
.v052-interface .turn-command-cluster .topbar-icon {
  border-color: rgba(185,163,124,.26);
  background: linear-gradient(180deg, rgba(21,31,39,.98), rgba(9,15,20,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--premium-shadow);
}
.v052-interface .turn-command-cluster .turn-badge strong,
.v052-interface .turn-command-cluster .turn-count-badge strong { color: #f0cb84; }
.v052-interface .turn-command-cluster .topbar-icon {
  color: #e8e1d5;
}
.v052-interface .turn-command-cluster .top-turn-button {
  border-color: rgba(239,196,113,.72);
  background:
    linear-gradient(180deg, #deb35d 0%, #b67c31 58%, #8d5f20 100%);
  color: #20170c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -1px 0 rgba(80,40,10,.45),
    0 10px 20px rgba(0,0,0,.32);
}
.v052-interface .turn-command-cluster .top-turn-button span,
.v052-interface .turn-command-cluster .top-turn-button svg {
  color: #20170c;
}

.v052-interface .strategy-command-menu,
.v052-interface .panel.region-panel,
.v052-interface .bottom-dock-panel,
.v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
  position: relative;
  border-color: rgba(185,163,124,.22);
  background:
    linear-gradient(180deg, rgba(16,24,31,.96) 0%, rgba(8,13,18,.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 0 1px rgba(216,179,106,.04), var(--premium-shadow);
}
.v052-interface .strategy-command-menu::before,
.v052-interface .panel.region-panel::before,
.v052-interface .strategy-bottom-dock.tabbed-bottom-dock::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.03);
  pointer-events: none;
}
.v052-interface .strategy-command-menu > header,
.v052-interface .command-news > header,
.v052-interface .intel-card > header {
  color: #f0cb84;
  text-shadow: 0 1px 0 rgba(0,0,0,.72);
}

.v052-interface .strategy-command-menu nav button {
  position: relative;
  border-color: rgba(128,148,160,.24);
  background:
    linear-gradient(180deg, rgba(23,34,42,.95), rgba(12,20,26,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 -1px 0 rgba(0,0,0,.16);
}
.v052-interface .strategy-command-menu nav button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(216,179,106,.12), rgba(72,147,178,.08));
  opacity: .65;
}
.v052-interface .strategy-command-menu nav button:hover,
.v052-interface .strategy-command-menu nav button.active {
  border-color: rgba(216,179,106,.4);
  background:
    linear-gradient(180deg, rgba(31,53,65,.98), rgba(12,29,39,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 1px rgba(216,179,106,.08);
}
.v052-interface .strategy-command-menu nav button:hover::before,
.v052-interface .strategy-command-menu nav button.active::before {
  background: linear-gradient(180deg, rgba(246,211,140,.95), rgba(69,152,188,.4));
  opacity: 1;
}
.v052-interface .strategy-command-menu nav button b {
  color: #f3efe6;
  font-size: .74rem;
}
.v052-interface .strategy-command-menu nav button small {
  color: #96a5ad;
}
.v052-interface .command-news {
  border-top-color: rgba(216,179,106,.14);
}
.v052-interface .command-news p {
  border: 1px solid rgba(216,179,106,.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.v052-interface .map-shell {
  position: relative;
  overflow: hidden;
  border-color: rgba(185,163,124,.28);
  background:
    radial-gradient(circle at 50% 0%, rgba(216,179,106,.05), transparent 24%),
    #07121b;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    inset 0 0 80px rgba(0,0,0,.52),
    0 16px 40px rgba(0,0,0,.34);
}
.v052-interface .map-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.03);
  pointer-events: none;
  z-index: 2;
}
.v052-interface .map-shell::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,179,106,.32), transparent);
  pointer-events: none;
  z-index: 2;
}
.v052-interface .world-map {
  background:
    radial-gradient(circle at 50% 12%, rgba(121,151,170,.06), transparent 35%),
    #07121b;
}
.v052-interface .country.selected {
  filter: drop-shadow(0 0 5px rgba(255,214,133,.7));
}

.v052-interface .map-toolbar button,
.v052-interface .layer-dock,
.v052-interface .layer-dock button,
.v052-interface .bottom-dock-tabs button {
  border-color: rgba(185,163,124,.22);
  background: linear-gradient(180deg, rgba(23,33,41,.96), rgba(10,16,22,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.v052-interface .map-toolbar button:hover,
.v052-interface .layer-dock button:hover,
.v052-interface .bottom-dock-tabs button:hover {
  border-color: rgba(216,179,106,.42);
}
.v052-interface .layer-dock {
  box-shadow: 0 12px 28px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.05);
}
.v052-interface .layer-dock button.active,
.v052-interface .bottom-dock-tabs button.active {
  color: #f6f0e0;
  border-color: rgba(216,179,106,.5);
  background:
    linear-gradient(180deg, rgba(44,72,88,.98), rgba(17,33,43,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 0 1px rgba(216,179,106,.08);
}
.v052-interface .layer-dock button.active svg,
.v052-interface .bottom-dock-tabs button.active svg {
  color: #f0cb84;
}
.v052-interface .bottom-dock-tabs button span {
  color: inherit;
}
.v052-interface .bottom-dock-tabs button b {
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

.v052-interface .panel.region-panel > header,
.v052-interface .modal.strategy-window .window-header {
  background: linear-gradient(90deg, rgba(216,179,106,.1), transparent 55%);
  border-radius: 8px;
}
.v052-interface .region-tabs button,
.v052-interface .modal.strategy-window .modal-tabs button {
  border-radius: 8px;
}
.v052-interface .region-tabs button.active,
.v052-interface .modal.strategy-window .modal-tabs button.active {
  border-color: rgba(216,179,106,.4);
  background: linear-gradient(180deg, rgba(41,69,86,.98), rgba(16,34,44,.98));
  color: #f6efde;
}

.modal.strategy-window {
  border-radius: 16px;
  border-color: rgba(185,163,124,.24);
  background:
    linear-gradient(180deg, rgba(18,27,34,.98), rgba(9,15,20,.99));
  box-shadow: 0 24px 60px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.05);
}

@media (max-width: 980px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .v052-interface .strategy-brand,
  .v052-interface .game-topbar .resource-chip,
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-command-cluster .topbar-icon,
  .v052-interface .turn-command-cluster .top-turn-button,
  .v052-interface .strategy-command-menu,
  .v052-interface .strategy-command-menu nav button,
  .v052-interface .map-shell,
  .v052-interface .panel.region-panel,
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock,
  .v052-interface .bottom-dock-tabs button,
  .v052-interface .layer-dock,
  .v052-interface .layer-dock button,
  .v052-interface .map-toolbar button {
    border-radius: 8px;
  }
  .v052-interface .strategy-command-menu nav button b { font-size: 12px; }
  .v052-interface .strategy-command-menu nav button small { font-size: 8px; }
  .v052-interface .map-toolbar button,
  .v052-interface .layer-dock button,
  .v052-interface .bottom-dock-tabs button {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 6px 14px rgba(0,0,0,.18);
  }
}

/* ========================================================================== 
   v0.5.2.7 — Final premium presentation pass
   Scope: cinematic main menu, unified premium modals/panels, stronger map art,
   and a less dashboard-like strategy shell.
   ========================================================================== */

/* ---------- Cinematic main menu ---------- */
.menu-screen.landscape-menu {
  background:
    radial-gradient(circle at 18% 28%, rgba(216,179,106,.12), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(72,123,159,.11), transparent 26%),
    linear-gradient(135deg, #060a10 0%, #0b131c 48%, #070b10 100%);
}
.menu-identity,
.menu-command-panel,
.new-game-card.new-game-v5,
.store-screen,
.settings-screen,
.about-screen,
.saves-screen {
  position: relative;
  border: 1px solid rgba(214, 178, 104, .22);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
.menu-identity::before,
.menu-command-panel::before,
.new-game-card.new-game-v5::before,
.store-screen::before,
.settings-screen::before,
.about-screen::before,
.saves-screen::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.03);
  pointer-events: none;
}
.menu-identity {
  background:
    linear-gradient(135deg, rgba(10,18,29,.95) 0%, rgba(11,21,35,.98) 52%, rgba(8,13,20,.98) 100%);
}
.menu-identity .world-influence-hero {
  opacity: .94;
  filter: saturate(.96) contrast(1.08) drop-shadow(0 10px 32px rgba(0,0,0,.36));
}
.menu-atmosphere {
  background:
    radial-gradient(circle at 26% 35%, rgba(214,178,104,.14), transparent 28%),
    linear-gradient(90deg, transparent 16%, rgba(9,16,26,.46) 42%, rgba(8,14,21,.94) 79%),
    linear-gradient(0deg, rgba(4,8,15,.74), transparent 48%);
}
.menu-title-block {
  backdrop-filter: blur(2px);
}
.menu-title-block .eyebrow,
.menu-command-panel > .eyebrow,
.screen-shell .eyebrow,
.window-header .eyebrow {
  color: #d8b36a;
  text-shadow: 0 1px 0 rgba(0,0,0,.72);
}
.menu-screen h1 strong,
.menu-screen h1 span {
  text-shadow: 0 2px 0 rgba(0,0,0,.68), 0 0 28px rgba(216,179,106,.08);
}
.menu-screen h1 strong { color: #f4d397; }
.menu-screen h1 span { color: #efe1c2; }
.menu-screen .tagline {
  color: #d2d6db;
}
.menu-identity .disclaimer {
  border: 1px solid rgba(216,179,106,.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11,19,29,.86), rgba(8,14,22,.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.menu-command-panel {
  background:
    linear-gradient(180deg, rgba(15,23,31,.96), rgba(8,14,20,.98));
}
.menu-actions button,
.menu-version-footer,
.compact-update-button,
.screen-shell header,
.screen-shell .back-button {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.menu-actions button {
  position: relative;
  border: 1px solid rgba(157, 149, 127, .24);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(24,35,43,.98), rgba(11,18,25,.98));
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.menu-actions button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(216,179,106,.1), rgba(72,142,179,.08));
}
.menu-actions button:hover,
.menu-actions button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216,179,106,.42);
  background: linear-gradient(180deg, rgba(31,50,61,.98), rgba(15,27,36,.98));
}
.menu-actions button:hover::before,
.menu-actions button:focus-visible::before,
.menu-actions .primary-button::before {
  background: linear-gradient(180deg, rgba(246,211,140,.96), rgba(72,142,179,.48));
}
.menu-actions .primary-button {
  border-color: rgba(216,179,106,.48);
  background: linear-gradient(180deg, rgba(45,67,82,.98), rgba(18,34,43,.98));
}
.menu-actions button b { color: #f4efe4; }
.menu-actions button small { color: #96a4ad; }
.menu-actions button svg,
.compact-update-button svg,
.screen-shell .back-button svg { color: #e1b96d; }
.menu-version-footer {
  border: 1px solid rgba(216,179,106,.15);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8,15,22,.9), rgba(7,12,18,.95));
}
.compact-update-button {
  border-radius: 12px;
  border-color: rgba(216,179,106,.28);
  background: linear-gradient(180deg, rgba(27,41,50,.96), rgba(12,20,27,.98));
}

/* ---------- Shared premium shells for non-game screens ---------- */
.new-game-card.new-game-v5,
.store-screen,
.settings-screen,
.about-screen,
.saves-screen {
  background: linear-gradient(180deg, rgba(14,22,30,.97), rgba(8,14,20,.98));
}
.founder-hero-card, .founder-gallery-workbench, .archetype-catalog, .attribute-summary-card,
.allocation-board, .attribute-impact-card, .world-settings-grid, .campaign-summary-card,
.store-product, .settings-card, .save-entry, .about-screen article {
  border-radius: 14px;
  border-color: rgba(216,179,106,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  background: linear-gradient(180deg, rgba(24,34,42,.96), rgba(11,17,23,.98));
}
.founder-hero-portrait {
  box-shadow: 0 14px 34px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.04);
}
.archetype-strip button,
.portrait-tile,
.finance-policy-grid button,
.clergy-card,
.ledger-grid article,
.economy-report-line,
.clergy-command-card,
.finance-summary-card,
.state-card,
.diplomacy-action,
.reports-grid > article {
  border-radius: 12px;
  border-color: rgba(216,179,106,.18);
  background: linear-gradient(180deg, rgba(22,32,40,.96), rgba(11,18,24,.98));
}
.finance-policy-grid button.selected,
.archetype-strip button.active,
.portrait-tile.selected {
  border-color: rgba(216,179,106,.42);
  box-shadow: 0 0 0 1px rgba(216,179,106,.06), inset 0 1px 0 rgba(255,255,255,.04);
}

/* ---------- Modal / strategy window unification ---------- */
.modal.strategy-window {
  border-radius: 18px;
  border-width: 1px;
}
.v052-interface .modal.strategy-window,
.modal.strategy-window {
  position: relative;
  background:
    radial-gradient(circle at 16% 0%, rgba(216,179,106,.08), transparent 22%),
    linear-gradient(180deg, rgba(16,25,32,.985), rgba(8,13,19,.99));
  box-shadow: 0 28px 72px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
}
.v052-interface .modal.strategy-window::before,
.modal.strategy-window::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.03);
  pointer-events: none;
}
.v052-interface .modal.strategy-window .window-header,
.modal.strategy-window .window-header {
  padding: 0 10px;
  border: 1px solid rgba(216,179,106,.12);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(216,179,106,.12), transparent 28%),
    linear-gradient(180deg, rgba(20,30,38,.96), rgba(11,17,23,.98));
}
.v052-interface .modal.strategy-window .window-header h2,
.modal.strategy-window .window-header h2 { color: #f3d59b; }
.v052-interface .modal.strategy-window .window-header small,
.modal.strategy-window .window-header small { color: #aeb9c1; }
.v052-interface .modal.strategy-window .modal-tabs,
.modal.strategy-window .modal-tabs {
  gap: 4px;
  padding: 1px;
}
.v052-interface .modal.strategy-window .modal-tabs button,
.modal.strategy-window .modal-tabs button {
  border-radius: 12px;
  border-color: rgba(216,179,106,.14);
  background: linear-gradient(180deg, rgba(24,35,42,.96), rgba(10,16,22,.98));
  color: #b8c1c7;
}
.v052-interface .modal.strategy-window .modal-tabs button.active,
.modal.strategy-window .modal-tabs button.active {
  color: #f5efdf;
  border-color: rgba(216,179,106,.44);
  background: linear-gradient(180deg, rgba(45,72,88,.98), rgba(16,32,41,.98));
}
.v052-interface .modal.strategy-window .modal-content,
.modal.strategy-window .modal-content {
  padding: 6px;
}

/* ---------- Stronger map staging ---------- */
.v052-interface .map-shell {
  background:
    radial-gradient(circle at 50% 12%, rgba(161,193,214,.08), transparent 35%),
    radial-gradient(circle at 18% 78%, rgba(216,179,106,.06), transparent 22%),
    linear-gradient(180deg, rgba(6,13,20,.98), rgba(5,11,17,.99));
}
.v052-interface .world-map {
  background:
    radial-gradient(circle at 50% 10%, rgba(127,160,181,.08), transparent 32%),
    linear-gradient(180deg, #091520 0%, #07111a 100%);
}
.v052-interface .world-map-surface .country {
  stroke: rgba(245,236,215,.62);
}
.v052-interface .world-map-surface .country.selected {
  stroke: #ffe1a1;
  filter: drop-shadow(0 0 6px rgba(255,219,138,.55));
}
.v052-interface .world-map-surface .city-core {
  fill: #e0b866;
}
.v052-interface .world-map-surface .city-halo {
  fill: rgba(255,217,132,.16);
  stroke: rgba(232,185,91,.65);
}
.v052-interface .world-map-surface .city-label {
  fill: #f6efdf;
  stroke: rgba(3,8,11,.98);
}
.v052-interface .map-toolbar {
  gap: 6px;
}
.v052-interface .map-toolbar button {
  background: linear-gradient(180deg, rgba(24,34,42,.98), rgba(11,17,23,.98));
}
.v052-interface .map-toolbar button > span {
  color: #eee4cf !important;
}
.v052-interface .layer-dock {
  padding: 6px;
  gap: 4px;
  background: linear-gradient(180deg, rgba(10,16,22,.92), rgba(7,12,18,.96));
}
.v052-interface .layer-dock button {
  min-height: 46px;
}
.v052-interface .map-legend,
.v052-interface .panel.region-panel {
  border-radius: 14px;
}

/* ---------- Mobile landscape refinements for premium pass ---------- */
@media (max-width: 980px) and (orientation: landscape) {
  .menu-screen.landscape-menu,
  .new-game-screen,
  .screen-shell {
    padding-top: max(7px, env(safe-area-inset-top));
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }
  .menu-identity,
  .menu-command-panel,
  .new-game-card.new-game-v5,
  .store-screen,
  .settings-screen,
  .about-screen,
  .saves-screen,
  .modal.strategy-window,
  .v052-interface .modal.strategy-window {
    border-radius: 14px;
  }
  .menu-actions button,
  .menu-version-footer,
  .compact-update-button,
  .founder-hero-card, .founder-gallery-workbench, .archetype-catalog,
  .attribute-summary-card, .allocation-board, .attribute-impact-card,
  .world-settings-grid, .campaign-summary-card,
  .v052-interface .layer-dock,
  .v052-interface .layer-dock button,
  .v052-interface .map-toolbar button,
  .v052-interface .panel.region-panel,
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock,
  .v052-interface .bottom-dock-tabs button {
    border-radius: 10px;
  }
  .menu-actions button::before { width: 3px; top: 8px; bottom: 8px; }
}

/* ========================================================================== 
   v0.5.2.8 — Android landscape structural repair
   The bottom console is absolutely positioned on phones. Legacy responsive
   rules were still reserving a second grid row for it, which cut the map in
   half and produced the large empty black band seen on real devices.
   ========================================================================== */
@media (max-width: 980px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-rows: 74px minmax(0, 1fr) !important;
    overflow: hidden;
  }

  .v052-interface .strategy-command-bar {
    grid-template-columns: 128px minmax(0, 1fr) !important;
  }

  .v052-interface .strategy-brand {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 5px;
    padding-inline: 6px;
    overflow: hidden;
  }
  .v052-interface .strategy-brand-emblem {
    width: 24px;
    height: 24px;
  }
  .v052-interface .strategy-brand-emblem svg {
    width: 15px;
    height: 15px;
  }
  .v052-interface .strategy-brand > span:last-child {
    display: grid !important;
    min-width: 0;
    overflow: hidden;
  }
  .v052-interface .strategy-brand strong {
    display: block;
    max-width: 100%;
    font-size: 10.5px;
    letter-spacing: .015em;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
  .v052-interface .strategy-brand small {
    display: block;
    max-width: 100%;
    margin-top: 3px;
    font-size: 5.6px;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  /* Authoritative one-row stage. No invisible row may remain below the map. */
  .v052-interface .strategy-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 0 !important;
    overflow: hidden;
  }
  .v052-interface .strategy-workspace {
    width: 100%;
    height: 100% !important;
    min-height: 0;
    align-self: stretch;
    grid-template-columns: 124px minmax(0, 1fr) !important;
    gap: 4px;
    overflow: hidden;
  }
  .v052-interface .strategy-command-menu,
  .v052-interface .strategy-command-menu nav,
  .v052-interface .map-column,
  .v052-interface .map-shell,
  .v052-interface .world-map,
  .v052-interface .world-map-viewport {
    height: 100% !important;
    min-height: 0 !important;
  }
  .v052-interface .strategy-command-menu nav {
    grid-template-rows: repeat(6, minmax(0, 1fr)) !important;
  }

  /* The console must fit the map width exactly; inherited desktop columns are
     explicitly neutralised so the fifth tab cannot escape off-screen. */
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    left: 131px !important;
    right: 3px !important;
    bottom: max(3px, env(safe-area-inset-bottom));
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden;
  }
  .v052-interface .bottom-dock-tabs {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    overflow: hidden;
  }
  .v052-interface .bottom-dock-tabs button {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    padding-inline: 4px;
    overflow: hidden;
  }
  .v052-interface .bottom-dock-tabs button span {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Dense Asian and European city clusters must not print several labels on
     top of one another at the opening zoom level. */
  .v052-interface .city-marker .city-label {
    opacity: 0 !important;
  }
  .v052-interface .city-marker.selected .city-label,
  .v052-interface .city-marker.capital.city-in-selected-region .city-label,
  .v052-interface .world-map-surface.map-zoom-3 .city-rank-1.city-in-selected-region .city-label,
  .v052-interface .world-map-surface.map-zoom-4 .city-rank-2.city-in-selected-region .city-label {
    opacity: 1 !important;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    grid-template-columns: 120px minmax(0, 1fr) !important;
  }
  .v052-interface .strategy-workspace {
    grid-template-columns: 116px minmax(0, 1fr) !important;
  }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    left: 123px !important;
  }
  .v052-interface .strategy-brand strong { font-size: 9.8px; }
  .v052-interface .strategy-brand small { font-size: 5.2px; }
}

/* ========================================================================== 
   v0.5.2.9 — Mobile landscape space-optimization pass
   Goal: reclaim vertical room for the map and stop the bottom strip from
   visually dominating short Android landscape screens.
   ========================================================================== */
@media (max-width: 980px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    grid-template-rows: 66px minmax(0, 1fr) !important;
  }

  .v052-interface .strategy-command-bar {
    height: 66px !important;
    min-height: 66px !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    grid-template-rows: 32px 28px !important;
    gap: 3px 4px !important;
    padding: 2px max(4px, env(safe-area-inset-right)) 2px max(4px, env(safe-area-inset-left)) !important;
  }
  .v052-interface .strategy-brand {
    height: 62px !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 5px 6px !important;
  }
  .v052-interface .strategy-brand-emblem {
    width: 27px !important;
    height: 27px !important;
  }
  .v052-interface .strategy-brand-emblem svg {
    width: 16px !important;
    height: 16px !important;
  }
  .v052-interface .strategy-brand strong { font-size: 11.5px !important; }
  .v052-interface .strategy-brand small { font-size: 6.2px !important; margin-top: 2px !important; }

  .v052-interface .turn-command-cluster {
    height: 32px !important;
    grid-template-columns: minmax(128px, 1fr) 44px 36px minmax(94px, 112px) !important;
    gap: 3px !important;
  }
  .v052-interface .turn-command-cluster .turn-badge,
  .v052-interface .turn-count-badge,
  .v052-interface .turn-command-cluster .topbar-icon,
  .v052-interface .turn-command-cluster .top-turn-button,
  .v052-interface .topbar-utility,
  .v052-interface .topbar-utility .utility-trigger {
    height: 32px !important;
    min-height: 32px !important;
  }
  .v052-interface .turn-command-cluster .date-badge { padding: 3px 7px !important; gap: 6px !important; }
  .v052-interface .turn-command-cluster .date-badge span { font-size: 8px !important; }
  .v052-interface .turn-command-cluster .date-badge strong { font-size: 11px !important; }
  .v052-interface .turn-count-badge { width: 44px !important; }
  .v052-interface .turn-count-badge span { font-size: 7px !important; }
  .v052-interface .turn-count-badge strong { font-size: 12px !important; }
  .v052-interface .topbar-utility { width: 36px !important; }
  .v052-interface .topbar-utility .utility-trigger { width: 36px !important; }
  .v052-interface .turn-command-cluster .top-turn-button {
    min-width: 94px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
  }

  .v052-interface .game-topbar .resource-bar {
    height: 28px !important;
    gap: 2px !important;
  }
  .v052-interface .game-topbar .resource-chip,
  .v052-interface .game-topbar .resource-chip:nth-child(n) {
    height: 28px !important;
    min-height: 28px !important;
    grid-template-columns: 11px minmax(0, 1fr) !important;
    gap: 2px !important;
    padding: 2px 3px !important;
  }
  .v052-interface .game-topbar .resource-chip svg {
    width: 11px !important;
    height: 11px !important;
  }
  .v052-interface .game-topbar .resource-chip .resource-label-short { font-size: 7px !important; }
  .v052-interface .game-topbar .resource-chip strong { font-size: 10px !important; }

  .v052-interface .strategy-stage {
    padding: 2px max(2px, env(safe-area-inset-right)) max(2px, env(safe-area-inset-bottom)) max(2px, env(safe-area-inset-left)) !important;
  }
  .v052-interface .strategy-workspace {
    grid-template-columns: 108px minmax(0, 1fr) !important;
    gap: 3px !important;
  }

  .v052-interface .strategy-command-menu { padding: 3px !important; }
  .v052-interface .strategy-command-menu nav {
    grid-template-rows: repeat(6, minmax(31px, 1fr)) !important;
    gap: 3px !important;
  }
  .v052-interface .strategy-command-menu nav button {
    grid-template-columns: 18px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 3px 6px !important;
  }
  .v052-interface .strategy-command-menu nav button > svg {
    width: 16px !important;
    height: 16px !important;
  }
  .v052-interface .strategy-command-menu nav button b {
    font-size: 10px !important;
    line-height: 1 !important;
  }
  .v052-interface .strategy-command-menu .nav-with-badge i {
    min-width: 14px !important;
    height: 14px !important;
    font-size: 8px !important;
  }

  .v052-interface .mobile-layer-control {
    top: 5px !important;
    left: 5px !important;
    width: 150px !important;
    min-height: 39px !important;
    grid-template-rows: 11px 22px !important;
    gap: 1px !important;
    padding: 3px 5px !important;
  }
  .v052-interface .mobile-layer-control > span { font-size: 8px !important; }
  .v052-interface .mobile-layer-control select {
    height: 22px !important;
    min-height: 22px !important;
    padding: 1px 20px 1px 5px !important;
    font-size: 11px !important;
  }
  .v052-interface .mobile-inspector-trigger {
    top: 48px !important;
    left: 5px !important;
    width: 150px !important;
    max-width: 150px !important;
    min-height: 39px !important;
    grid-template-columns: 16px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 4px 6px !important;
  }
  .v052-interface .mobile-inspector-trigger svg {
    width: 14px !important;
    height: 14px !important;
  }
  .v052-interface .mobile-inspector-trigger b { font-size: 11px !important; }
  .v052-interface .mobile-inspector-trigger small { font-size: 8px !important; }

  .v052-interface .map-toolbar {
    top: 5px !important;
    right: 5px !important;
    grid-template-columns: repeat(2, minmax(80px, 92px)) !important;
    gap: 3px !important;
  }
  .v052-interface .map-toolbar button {
    height: 28px !important;
    min-height: 28px !important;
    grid-template-columns: 13px minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
  .v052-interface .map-toolbar button svg {
    width: 12px !important;
    height: 12px !important;
  }

  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    left: 113px !important;
    right: 2px !important;
    bottom: max(2px, env(safe-area-inset-bottom)) !important;
    height: 34px !important;
    min-height: 34px !important;
    grid-template-rows: 30px !important;
    padding: 2px !important;
  }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock.is-expanded {
    height: min(96px, 31vh) !important;
    grid-template-rows: 30px minmax(0, 1fr) !important;
  }
  .v052-interface .bottom-dock-tabs {
    gap: 2px !important;
    width: 100% !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  .v052-interface .bottom-dock-tabs button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }
  .v052-interface .bottom-dock-tabs button span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .v052-interface .bottom-dock-tabs button b {
    min-width: 13px !important;
    height: 13px !important;
    font-size: 8px !important;
  }
  .v052-interface .bottom-dock-panel { padding: 4px 7px !important; }
  .v052-interface .strategy-stage:has(.strategy-bottom-dock.is-expanded) .layer-dock { bottom: 100px !important; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    grid-template-rows: 62px minmax(0, 1fr) !important;
  }
  .v052-interface .strategy-command-bar {
    height: 62px !important;
    min-height: 62px !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    grid-template-rows: 30px 26px !important;
  }
  .v052-interface .strategy-brand { height: 58px !important; }
  .v052-interface .strategy-brand strong { font-size: 10.6px !important; }
  .v052-interface .strategy-brand small { font-size: 5.8px !important; }
  .v052-interface .turn-command-cluster {
    grid-template-columns: minmax(118px, 1fr) 41px 34px minmax(88px, 102px) !important;
  }
  .v052-interface .game-topbar .resource-bar { height: 26px !important; }
  .v052-interface .game-topbar .resource-chip,
  .v052-interface .game-topbar .resource-chip:nth-child(n) { height: 26px !important; min-height: 26px !important; }
  .v052-interface .strategy-workspace { grid-template-columns: 102px minmax(0, 1fr) !important; }
  .v052-interface .mobile-layer-control,
  .v052-interface .mobile-inspector-trigger { width: 142px !important; max-width: 142px !important; }
  .v052-interface .map-toolbar { grid-template-columns: repeat(2, minmax(76px, 88px)) !important; }
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock { left: 107px !important; }
  .v052-interface .bottom-dock-tabs button { font-size: 9px !important; }
}

/* ========================================================================== 
   v0.5.3.0 — Definitive mobile stage geometry repair
   The premium pass had restored the floating dock to position: relative.
   That created an implicit second grid row, shortened the map, shifted the
   full-width dock to the right and pushed the fifth tab beyond the viewport.
   This final override makes the dock a true overlay and locks the stage to a
   single full-height workspace row.
   ========================================================================== */
@media (max-width: 980px) and (orientation: landscape) {
  .game-screen.grand-strategy-screen.v052-interface {
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .v052-interface .strategy-stage {
    position: relative !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-rows: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  .v052-interface .strategy-stage > .strategy-workspace {
    grid-row: 1 !important;
    align-self: stretch !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .v052-interface .strategy-command-menu,
  .v052-interface .map-column,
  .v052-interface .map-shell,
  .v052-interface .world-map-viewport {
    height: 100% !important;
    min-height: 0 !important;
  }

  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    position: absolute !important;
    z-index: 45 !important;
    left: 113px !important;
    right: max(2px, env(safe-area-inset-right)) !important;
    bottom: max(2px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .v052-interface .bottom-dock-tabs {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    overflow: hidden !important;
  }

  .v052-interface .bottom-dock-tabs button,
  .v052-interface .bottom-dock-tabs button:last-child {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .v052-interface .bottom-dock-tabs button span {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface .strategy-bottom-dock.tabbed-bottom-dock {
    left: 107px !important;
  }
}

/* ========================================================================== 
   v0.5.3.1 — Compact inspector drawer architecture
   The premium surface rule sets .region-panel to position: relative. When the
   compact workspace has two columns, a third in-flow RegionPanel becomes an
   implicit second grid row and cuts the map in half. Compact mode now renders
   the inspector in a dedicated absolute drawer outside the workspace grid.
   ========================================================================== */
.mobile-region-drawer { display: none; }

@media (max-width: 980px) and (orientation: landscape) {
  .v052-interface.is-compact-layout .strategy-stage {
    position: relative !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-rows: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .v052-interface.is-compact-layout .strategy-stage > .strategy-workspace {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 108px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-rows: 0 !important;
    grid-auto-flow: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .v052-interface.is-compact-layout .strategy-workspace > .strategy-command-menu,
  .v052-interface.is-compact-layout .strategy-workspace > .map-column {
    grid-row: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }

  .v052-interface.is-compact-layout .strategy-workspace > .region-panel {
    display: none !important;
  }

  .v052-interface.is-compact-layout .mobile-region-drawer {
    position: absolute !important;
    z-index: 60 !important;
    top: 3px !important;
    right: max(3px, env(safe-area-inset-right)) !important;
    bottom: max(38px, calc(env(safe-area-inset-bottom) + 36px)) !important;
    width: min(340px, 52vw) !important;
    min-width: 0 !important;
    max-width: calc(100% - 118px) !important;
    display: block !important;
    overflow: hidden !important;
    transform: translate3d(calc(100% + 12px), 0, 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform .18s ease-out, opacity .14s ease-out !important;
  }

  .v052-interface.is-compact-layout .mobile-region-drawer.is-open {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .v052-interface.is-compact-layout .mobile-region-drawer > .panel.region-panel {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: grid !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    box-shadow: -14px 0 32px rgba(0, 0, 0, .5) !important;
  }

  .v052-interface.is-compact-layout .strategy-bottom-dock.tabbed-bottom-dock {
    position: absolute !important;
    z-index: 55 !important;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface.is-compact-layout .strategy-stage > .strategy-workspace {
    grid-template-columns: 102px minmax(0, 1fr) !important;
  }
  .v052-interface.is-compact-layout .mobile-region-drawer {
    width: min(320px, 56vw) !important;
    max-width: calc(100% - 110px) !important;
    bottom: max(36px, calc(env(safe-area-inset-bottom) + 34px)) !important;
  }
}

/* ========================================================================== 
   v0.5.3.2 — Founder identity, localization and progression foundation
   ========================================================================== */
.founder-name-field {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(216,179,106,.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18,29,37,.94), rgba(9,16,22,.98));
}
.founder-name-field > span {
  color: #d8b36a;
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.founder-name-field input {
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid rgba(163,176,184,.32);
  border-radius: 7px;
  background: #0b151d;
  color: #f6efe0;
  font-weight: 800;
}
.founder-name-field small {
  min-height: 1.1em;
  color: #9da9b0;
  font-size: .47rem;
  line-height: 1.15;
}
.founder-name-field small.field-error { color: #ef8798; }

.diplomacy-lock-banner {
  grid-column: 1 / -1;
  min-height: 54px;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(216,179,106,.28);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(65,48,25,.34), rgba(20,24,27,.94));
}
.diplomacy-lock-banner svg { color: #e0b767; }
.diplomacy-lock-banner div { min-width: 0; display: grid; gap: 2px; }
.diplomacy-lock-banner strong { color: #f1d39a; font-size: .67rem; }
.diplomacy-lock-banner small { color: #b6bec3; font-size: .52rem; line-height: 1.25; }
.state-policy-button:disabled { opacity: .68; cursor: not-allowed; }

@media (max-width: 980px) and (orientation: landscape) {
  /* Reserve enough real width for the complete English game name. */
  .v052-interface .strategy-command-bar {
    grid-template-columns: 120px minmax(0, 1fr) !important;
  }
  .v052-interface .strategy-brand {
    grid-template-columns: 27px minmax(0, 1fr) !important;
    gap: 5px !important;
    padding-inline: 6px !important;
  }
  .v052-interface.lang-en .strategy-brand strong {
    display: block !important;
    width: max-content !important;
    max-width: none !important;
    font-size: 9.7px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    transform: scaleX(.94);
    transform-origin: left center;
  }
  .v052-interface.lang-en .strategy-brand small {
    font-size: 5.6px !important;
    letter-spacing: .01em !important;
  }
  .founder-name-field { padding: 4px 5px; gap: 2px; }
  .founder-name-field input { height: 27px; min-height: 27px; font-size: 10px; }
  .founder-name-field > span { font-size: 8px; }
  .founder-name-field small { font-size: 7px; }
  .diplomacy-lock-banner { min-height: 44px; padding: 5px 7px; }
  .diplomacy-lock-banner strong { font-size: 10px; }
  .diplomacy-lock-banner small { font-size: 8px; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .v052-interface .strategy-command-bar {
    grid-template-columns: 112px minmax(0, 1fr) !important;
  }
  .v052-interface.lang-en .strategy-brand strong {
    font-size: 9px !important;
    transform: scaleX(.91);
  }
}

/* ========================================================================== 
   v0.5.6.8 — Main menu placement repair
   Scope: fix the opening menu layout so buttons sit cleanly on the image.
   ========================================================================== */
.epic-main-menu {
  position: relative;
  isolation: isolate;
  max-width: none;
  width: 100%;
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

.epic-main-menu__background,
.epic-main-menu__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.epic-main-menu__background {
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(10, 14, 20, .06) 0%, rgba(9, 12, 18, .18) 52%, rgba(8, 11, 16, .56) 100%),
    url('/menu/main-menu-v0567.png') center center / cover no-repeat;
  transform: scale(1.02);
}

.epic-main-menu__veil {
  z-index: -2;
  background:
    radial-gradient(circle at 16% 18%, rgba(242, 212, 150, .12), transparent 26%),
    linear-gradient(90deg, rgba(6, 10, 17, .42) 0%, rgba(6, 10, 17, .22) 24%, rgba(6, 10, 17, .08) 44%, rgba(6, 10, 17, .40) 100%),
    linear-gradient(180deg, rgba(6, 10, 17, .12) 0%, rgba(6, 10, 17, .06) 34%, rgba(6, 10, 17, .52) 100%);
}

.epic-main-menu__content {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
}

.epic-main-menu__layout {
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.epic-main-menu__header {
  max-width: min(100%, 420px);
  padding: .35rem 0 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.epic-main-menu__header .eyebrow {
  margin: 0 0 .55rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}

.epic-main-menu__title {
  display: grid;
  gap: .1rem;
  margin: 0;
  text-align: left;
  text-shadow: 0 4px 18px rgba(0,0,0,.55);
}

.epic-main-menu__title strong,
.epic-main-menu__title span {
  display: block;
}

.epic-main-menu__tagline {
  margin: .8rem 0 0;
  max-width: 26ch;
  color: rgba(245, 241, 233, .96);
  font-size: clamp(.95rem, 1.2vw, 1.04rem);
  line-height: 1.42;
  text-align: left;
  text-shadow: 0 3px 14px rgba(0,0,0,.52);
}

.epic-main-menu__panel {
  width: min(100%, 360px);
  display: grid;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid rgba(216, 182, 110, .22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8, 14, 21, .58), rgba(7, 11, 17, .44));
  box-shadow: 0 20px 44px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
}

.epic-main-menu__actions {
  gap: .5rem;
}

.epic-main-menu__actions button {
  min-height: 48px;
  justify-content: flex-start;
  padding: .72rem .88rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 19, 29, .86), rgba(8, 14, 22, .84));
  border: 1px solid rgba(233, 199, 137, .18);
  box-shadow: 0 8px 16px rgba(0,0,0,.18);
}

.epic-main-menu__actions button::before {
  top: 7px;
  bottom: 7px;
  width: 3px;
}

.epic-main-menu__actions button svg {
  width: 18px;
  height: 18px;
}

.epic-main-menu__actions .primary-button:not(:disabled) {
  background: linear-gradient(135deg, rgba(214, 171, 94, .98), rgba(242, 211, 148, .98));
  color: #191309;
  border-color: rgba(255,255,255,.06);
}

.epic-main-menu__actions .primary-button:disabled {
  background: linear-gradient(180deg, rgba(47, 57, 68, .82), rgba(28, 36, 45, .82));
  color: rgba(227, 232, 238, .72);
  border-color: rgba(255,255,255,.08);
}

.epic-main-menu__actions button span {
  display: grid;
  gap: .08rem;
  text-align: left;
}

.epic-main-menu__actions button b {
  font-size: .92rem;
  line-height: 1.1;
}

.epic-main-menu__actions button small {
  font-size: .69rem;
  line-height: 1.15;
  opacity: .88;
}

.epic-main-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding-top: .15rem;
}

.epic-main-menu__footer span {
  font-size: .74rem;
}

.epic-main-menu__disclaimer {
  max-width: min(100%, 360px);
  padding: .55rem .7rem;
  border: 1px solid rgba(233, 199, 137, .12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(7, 12, 18, .40), rgba(6, 10, 17, .28));
  color: rgba(228, 231, 235, .82);
  font-size: .72rem;
  line-height: 1.38;
  text-align: left;
  backdrop-filter: blur(6px);
}

@media (min-width: 981px) {
  .epic-main-menu__layout {
    padding: .35rem 0;
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  .epic-main-menu__header {
    max-width: 360px;
  }

  .epic-main-menu__title strong {
    font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  }

  .epic-main-menu__title span {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
  }

  .epic-main-menu__tagline {
    max-width: 23ch;
    font-size: .92rem;
  }

  .epic-main-menu__panel {
    width: min(100%, 340px);
    padding: .7rem;
    gap: .55rem;
  }

  .epic-main-menu__actions {
    gap: .42rem;
  }

  .epic-main-menu__actions button {
    min-height: 44px;
    padding: .62rem .78rem;
  }

  .epic-main-menu__actions button b {
    font-size: .88rem;
  }

  .epic-main-menu__actions button small {
    font-size: .64rem;
  }

  .epic-main-menu__disclaimer {
    display: none;
  }
}

@media (max-width: 700px) {
  .epic-main-menu__background {
    background-position: 64% center;
  }

  .epic-main-menu__veil {
    background:
      linear-gradient(180deg, rgba(7, 12, 18, .14) 0%, rgba(7, 12, 18, .24) 30%, rgba(6, 10, 17, .62) 100%),
      linear-gradient(90deg, rgba(6, 10, 17, .52) 0%, rgba(6, 10, 17, .24) 45%, rgba(6, 10, 17, .46) 100%);
  }

  .epic-main-menu__layout {
    gap: .85rem;
  }

  .epic-main-menu__header {
    max-width: min(100%, 320px);
  }

  .epic-main-menu__title strong {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .epic-main-menu__title span {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .epic-main-menu__tagline {
    max-width: 22ch;
    font-size: .88rem;
  }

  .epic-main-menu__panel {
    width: min(100%, 320px);
  }

  .epic-main-menu__footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .epic-main-menu {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .epic-main-menu__content {
    min-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(18px, env(safe-area-inset-bottom)));
  }

  .epic-main-menu__header .eyebrow {
    font-size: .68rem;
    letter-spacing: .22em;
  }

  .epic-main-menu__panel {
    width: min(100%, 300px);
    padding: .62rem;
  }

  .epic-main-menu__actions button {
    min-height: 42px;
    padding: .56rem .7rem;
  }

  .epic-main-menu__actions button b {
    font-size: .84rem;
  }

  .epic-main-menu__actions button small {
    font-size: .62rem;
  }
}
