/* My-AI-Startup / Cobalt workspace */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-2: #f0f4fb;
  --border: #e3e9f2;
  --text: #172b4d;
  --muted: #66758d;
  --blue: #315fe9;
  --blue-dark: #2449bd;
  --blue-soft: #edf2ff;
  --purple: #8670d6;
  --orange: #d98449;
  --danger: #b5424e;
  --radius: 18px;
  --font: 'Avenir Next', 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:not(:disabled), a, input, textarea, select { transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #7899ff; outline-offset: 3px; }
svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 2.35vw, 36px); font-weight: 600; letter-spacing: -1px; line-height: 1.4; }
h2 { font-size: 21px; font-weight: 600; letter-spacing: -.5px; }
h3 { font-size: 16px; }
strong { font-weight: 600; }
button[hidden], [hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent-text, .accent { color: var(--blue); }
.danger { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: fixed; top: -80px; left: 230px; background: var(--blue); color: #fff; padding: 12px; z-index: 99; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* Navigation */
.rail { width: 212px; position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); padding: 28px 18px 20px; }
.brand { display: flex; align-items: center; gap: 12px; padding-left: 10px; }
.brand-mark { font-size: 31px; font-weight: 800; letter-spacing: -4px; width: 44px; height: 44px; flex-shrink: 0; display: grid; place-content: center; position: relative; background: var(--blue); color: #fff; border-radius: 13px; line-height: 1; box-shadow: 0 4px 12px #315fe929; }
.brand-mark span { position: absolute; font-size: 20px; right: 5px; bottom: 8px; }
.brand-name { font-size: 11px; letter-spacing: 2.3px; line-height: 1.55; color: #748098; }
.brand-name strong { font-size: 14px; letter-spacing: 1.2px; color: var(--text); }
.nav-caption { font-size: 11px; color: #7b879b; margin: 48px 14px 14px; letter-spacing: 1px; }
.rail nav { display: grid; gap: 7px; }
.rail-item { display: flex; align-items: center; gap: 13px; width: 100%; height: 46px; padding: 0 14px; text-align: left; color: #65748c; border-radius: 9px; font-size: 13px; position: relative; }
.rail-item svg { width: 19px; height: 19px; }
.rail-item:hover { background: #f6f8fc; color: var(--blue); }
.rail-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.rail-item.active:after { content: ''; position: absolute; right: 14px; width: 5px; height: 5px; background: var(--blue); border-radius: 50%; }
.rail-bottom { margin-top: auto; padding-top: 30px; }
.rail-note { padding: 18px 14px; border-radius: 12px; background: linear-gradient(135deg,#f0f5ff,#f7f9fd); }
.rail-note>span[data-icon] { display: block; color: var(--blue); margin-bottom: 14px; }
.rail-note strong { display: block; font-size: 12px; margin-bottom: 6px; }
.rail-note p { font-size: 11px; line-height: 1.9; color: var(--muted); }
.rail-version { display: block; font-size: 8px; letter-spacing: 1.1px; color: #72819a; margin-top: 22px; }
.founder-profile { border-top: 1px solid var(--border); padding: 20px 6px 0; margin-top: 22px; display: flex; gap: 10px; align-items: center; }
.founder-profile strong { display: block; font-size: 12px; }
.founder-profile span { display: block; font-size: 10px; color: var(--muted); }
.avatar { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 22px; font-weight: 600; }
.avatar.small { width: 35px; height: 35px; border-radius: 50%; font-size: 13px; background: #eef1f7; color: #64738c; }
.app-shell { margin-left: 212px; }
.topbar { height: 80px; padding: 0 36px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); background: #ffffffb3; }
.wordmark { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.desktop-breadcrumb { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.desktop-breadcrumb>span { color: #b6c0ce; }
.mobile-wordmark { display: none; }
.beta { font-size: 9px; letter-spacing: .8px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 3px 7px; border-radius: 5px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.connection { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-right: 6px; }
.connection:before { content: ''; width: 6px; height: 6px; background: #468886; border-radius: 50%; box-shadow: 0 0 0 3px #46888612; }
.connection.offline:before { background: var(--danger); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); border-radius: 8px; padding: 9px 14px; line-height: 1.5; white-space: nowrap; min-height: 40px; }
.button svg { width: 17px; height: 17px; }
.button:hover:not(:disabled) { background: var(--surface-2); }
.button.primary, .play-button { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 3px 6px #315fe916; }
.button.primary:hover:not(:disabled), .play-button:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.primary-outline { border-color: #d5e0ff; color: var(--blue); background: var(--blue-soft); }
.button.primary-outline:hover:not(:disabled) { background: #e1eaff; border-color: #b5c8ff; }
.button.quiet { color: var(--muted); background: transparent; border-color: transparent; }
.button.quiet:hover:not(:disabled) { background: #edf1f8; color: var(--text); }
.icon-button { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; color: #687991; flex-shrink: 0; }
.icon-button:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue); }
.text-link { font-size: 11px; padding: 0; text-decoration: underline; text-underline-offset: 4px; color: var(--blue); }
.text-link:hover { color: var(--blue-dark); }

/* Workspace overview */
main { max-width: 1720px; margin: auto; padding: 32px 36px 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { font-size: 9px; letter-spacing: 1.7px; color: #74829a; font-weight: 600; display: block; line-height: 1.5; }
.page-heading .eyebrow { color: var(--blue); margin-bottom: 10px; }
.page-heading p { color: var(--muted); margin-top: 10px; font-size: 13px; }
.heading-dot { color: var(--blue); }
.company-sign { display: flex; gap: 12px; align-items: center; padding: 11px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; flex-shrink: 0; }
.company-sign strong { font-size: 14px; letter-spacing: 1px; display: block; max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-sign div>span { font-size: 11px; color: var(--muted); }
.company-sign .icon-button { width: 28px; height: 28px; margin-left: 8px; }
.simulation-bar { display: flex; align-items: center; gap: 20px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 22px; }
.room-info { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; }
.status-pill { background: #f1f4f9; color: #526780; font-size: 11px; padding: 5px 8px; border-radius: 5px; white-space: nowrap; }
.room-code { font: 12px var(--font); font-variant-numeric: tabular-nums; letter-spacing: .8px; display: flex; align-items: center; gap: 6px; color: #50637e; padding: 4px 0; }
.room-code svg { width: 13px; height: 13px; color: #8290a3; }
.player-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.step-info { width: 145px; font-size: 10px; letter-spacing: .6px; flex-shrink: 0; }
.step-info>span { white-space: nowrap; }
.step-info strong { font-size: 16px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.step-track { height: 3px; background: #e8edf6; border-radius: 4px; margin-top: 5px; overflow: hidden; }
.step-track span { display: block; height: 100%; background: var(--blue); width: 0; transition: width .5s; }
.time-controls { display: flex; align-items: center; gap: 8px; }
.speed-control { display: flex; background: #f3f5f9; border-radius: 7px; padding: 3px; }
.speed-control button { font-size: 12px; width: 32px; height: 30px; color: #71809a; border-radius: 5px; }
.speed-control .selected { color: var(--blue); background: #fff; box-shadow: 0 1px 4px #213d7014; font-weight: 600; }
.notice { background: var(--blue-soft); border: 1px solid #ccdaff; padding: 13px 18px; border-radius: 10px; color: #385da6; margin-bottom: 20px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; overflow: hidden; }
.metric { padding: 20px 22px 16px; min-width: 0; position: relative; }
.metric+.metric:before { content: ''; position: absolute; left: 0; top: 25px; bottom: 25px; width: 1px; background: var(--border); }
.metric:last-child { background: linear-gradient(110deg,#f8faff,#f1f5ff); }
.metric-label { display: flex; justify-content: space-between; align-items: center; color: #687991; font-size: 12px; }
.metric-label svg { width: 17px; height: 17px; color: #8395b4; }
.metric-value { font-size: 33px; letter-spacing: -1.1px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 11px; line-height: 1.25; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; min-height: 24px; color: #6c7c93; font-size: 10px; gap: 7px; margin-top: 11px; white-space: nowrap; }
.sparkline { width: 62px; height: 24px; }
.mini-badge { color: #6f83a2; background: #f0f4f9; padding: 1px 6px; border-radius: 4px; font-size: 10px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 328px; gap: 22px; align-items: start; }
.main-column, .side-column { display: grid; gap: 22px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; box-shadow: 0 3px 8px #18375e02; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 23px 24px 0; gap: 12px; }
.panel-heading .eyebrow { font-size: 8px; margin-bottom: 5px; letter-spacing: 1.5px; }
.panel-heading.compact { padding: 21px 22px 0; }
.panel-heading.compact h2 { font-size: 16px; }
.tag { border: 1px solid #dce5f3; border-radius: 5px; padding: 4px 7px; font-size: 10px; line-height: 1.5; color: #667b9a; white-space: nowrap; display: flex; gap: 5px; align-items: center; }
.tag.subtle { color: #7b89a0; border-color: #e4e9f2; }
.tag svg { height: 13px; width: 13px; }

/* Earth and demographic explorer */
.world-panel { background: linear-gradient(170deg,#fff 28%,#f8faff 75%); }
.world-view-switch { display: flex; padding: 3px; border: 1px solid #e2e8f3; border-radius: 8px; background: #f0f4f9; flex-shrink: 0; }
.world-view-switch button { font-size: 11px; color: #718099; border-radius: 5px; padding: 6px 9px; min-height: 31px; }
.world-view-switch button.selected { background: #fff; color: var(--blue); box-shadow: 0 1px 5px #223d7012; font-weight: 600; }
.world-view-switch button:hover { color: var(--blue); }
.world-stats { display: flex; gap: 24px; align-items: center; padding: 22px 26px 0; position: relative; z-index: 2; }
.world-stats>div { display: flex; flex-direction: column; }
.world-stats strong { font-size: 39px; letter-spacing: -1.6px; font-weight: 500; line-height: 1.2; color: var(--text); }
.world-stats strong span { font-size: 24px; color: #8493ac; margin-left: 3px; }
.world-stats>div>span { font-size: 11px; color: var(--muted); margin-top: 5px; }
.world-stats .world-stat-small { padding-left: 24px; border-left: 1px solid #dfe7f3; }
.world-stat-small strong { font-size: 23px; color: #415b80; letter-spacing: -.5px; }
.map-legend { margin-left: auto; font-size: 8px; letter-spacing: 1px; color: #7e8fa9; display: flex; align-items: center; gap: 6px; }
.map-legend i { width: 5px; height: 5px; background: var(--blue); border-radius: 50%; }
.map-container { margin: 15px 20px 10px; position: relative; aspect-ratio: 900/385; }
.world-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .95; }
.map-grid { position: absolute; inset: 0; background-image: radial-gradient(#96afd038 1px,transparent 1px); background-size: 18px 18px; mask-image: radial-gradient(ellipse,#000 15%,transparent 75%); pointer-events: none; }
.map-container[data-view='globe'] { height: 390px; aspect-ratio: auto; margin-top: 0; margin-bottom: 0; isolation: isolate; }
.map-container[data-view='globe']:before { content: ''; position: absolute; width: 42%; height: 16px; bottom: 35px; left: 29%; border-radius: 50%; background: #89a4cc30; filter: blur(13px); z-index: -1; }
.map-container[data-view='globe'] .world-map, .map-container[data-view='globe'] .map-coordinate { display: none; }
#globe-canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; cursor: grab; touch-action: pan-y; border-radius: 12px; }
#globe-canvas.dragging { cursor: grabbing; }
#globe-canvas:focus-visible { outline: 2px solid #8aaaff; outline-offset: -3px; }
.map-container[data-view='flat'] #globe-canvas, .map-container[data-view='flat'] .globe-tools, .map-container[data-view='flat'] .globe-readout { display: none; }
.map-marker { position: absolute; transform: translate(-50%,-50%); width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; z-index: 3; padding: 0; }
.map-marker .pin { width: 7px; height: 7px; background: #7296d3; border: 1.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 4px #315fe91a; transition: .25s; }
.map-marker:hover .pin, .map-marker.selected .pin, .map-marker.focus .pin { background: var(--blue); box-shadow: 0 0 0 6px #315fe922; }
.map-marker.selected:after { content: ''; position: absolute; inset: 5px; border: 1px solid #6e98e785; border-radius: 50%; }
.map-marker .map-label { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); color: #406089; white-space: nowrap; font-size: 10px; background: #fffffff2; padding: 2px 7px; border: 1px solid #d5e1f6; border-radius: 5px; box-shadow: 0 2px 4px #102d5810; line-height: 1.5; }
.map-marker.selected .map-label { color: var(--blue); border-color: #b3c7fa; font-weight: 600; }
.map-container[data-view='globe'] .map-marker .pin { background: #e3eeff; border-color: #fff; box-shadow: 0 0 0 5px #cbdfff24; }
.map-container[data-view='globe'] .map-marker.selected .pin { background: #fff; box-shadow: 0 0 0 6px #fff3,0 0 20px #dbeaff55; }
.map-container[data-view='globe'] .map-marker.selected:after { border-color: #e2edff88; }
.map-corner { display: none; }
.map-coordinate { position: absolute; bottom: 3px; left: 5px; font-size: 9px; letter-spacing: 1.6px; color: #7a8fae; }
.globe-readout { position: absolute; left: 6px; top: 24px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.globe-readout>span { font-size: 8px; letter-spacing: 1.4px; color: #8999b1; }
.globe-readout strong { font-size: 11px; font-weight: 500; letter-spacing: .8px; color: #59759d; font-variant-numeric: tabular-nums; }
.globe-tools { position: absolute; right: 5px; bottom: 24px; display: flex; flex-direction: column; gap: 7px; z-index: 5; }
.globe-tools button { width: 34px; height: 34px; background: #fff; border: 1px solid #dee6f3; border-radius: 8px; color: #56719a; display: grid; place-items: center; font-size: 21px; line-height: 1; box-shadow: 0 2px 4px #26416b05; }
.globe-tools button:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue); }
.globe-tools button svg { width: 16px; height: 16px; }
.globe-navigation { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 24px 18px; min-height: 36px; }
.globe-rotation { display: flex; align-items: center; gap: 10px; min-width: 0; }
#globe-auto { display: flex; align-items: center; gap: 7px; color: #597294; background: #fff; border: 1px solid #dce5f3; border-radius: 7px; font-size: 11px; padding: 7px 9px; white-space: nowrap; min-height: 34px; }
#globe-auto[aria-pressed='true'] { border-color: #a6beff; color: var(--blue); background: var(--blue-soft); }
#globe-auto svg { width: 12px; height: 12px; }
#globe-hint { font-size: 10px; color: #8290a5; }
.market-picker { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #7b8da7; white-space: nowrap; }
.market-picker select { font-size: 12px; background: #fff; color: #415f8b; padding: 7px 8px; border: 1px solid #dce5f3; border-radius: 7px; max-width: 145px; min-height: 34px; }
.region-detail { border: 1px solid #dfe7f5; background: #f2f6fe; border-radius: 11px; margin: 0 24px 14px; display: flex; align-items: center; padding: 16px; gap: 21px; min-height: 80px; }
.region-title { min-width: 76px; }
.region-title strong { display: block; font-size: 15px; }
.region-title span { font-size: 10px; color: #6d86ab; }
.region-stat { display: flex; flex-direction: column; gap: 3px; }
.region-stat span { font-size: 10px; color: #7085a4; white-space: nowrap; }
.region-stat strong { font-size: 15px; font-weight: 600; }
.region-detail .button { margin-left: auto; font-size: 11px; padding: 8px 10px; min-height: 34px; background: #fff; }
.population-note { display: flex; gap: 6px; align-items: flex-start; font-size: 10px; color: #7d8ca3; margin: 0 26px 19px; line-height: 1.7; }
.population-note svg { width: 13px; height: 13px; margin-top: 2px; }

/* CEO console */
.ceo-panel { background: #fff; border-color: #cfddfc; padding: 24px; position: relative; }
.ceo-panel:before { content: ''; height: 3px; position: absolute; inset: 0 0 auto; background: linear-gradient(90deg,#315fe9,#a7c4ff); }
.ceo-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.ceo-label { font-size: 10px; color: var(--blue); font-weight: 700; letter-spacing: 1.2px; display: flex; align-items: center; gap: 7px; }
.ceo-label svg { width: 18px; height: 18px; }
.parser-mode { font-size: 9px; color: #7487a8; background: #f3f6fc; padding: 4px 6px; border-radius: 5px; white-space: nowrap; }
.ceo-panel h2 { font-size: 28px; line-height: 1.45; letter-spacing: -1px; margin-top: 23px; font-weight: 600; }
.ceo-description { color: #71819a; font-size: 12px; margin: 12px 0 22px; }
/* Strategy, competition and people */
.strategy-panel { padding-bottom: 22px; }
.strategy-panel .accent-text { font-size: 11px; }
.budget-bar { height: 8px; border-radius: 4px; overflow: hidden; display: flex; gap: 3px; margin: 22px 22px 12px; }
.budget-bar span { transition: width .4s; }
.budget-legend { display: flex; justify-content: space-between; gap: 8px; padding: 0 22px; font-size: 10px; color: #72839d; }
.budget-legend span { display: flex; align-items: center; gap: 5px; }
.budget-legend i { height: 6px; width: 6px; border-radius: 2px; }
.strategy-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 22px; }
.strategy-presets button { font-size: 12px; border: 1px solid #e1e8f3; border-radius: 7px; color: #6b7e9d; padding: 9px; }
.strategy-presets button.active { border-color: #bed0ff; background: var(--blue-soft); color: var(--blue); }
.strategy-presets button:hover { background: #f1f5ff; }
.strategy-detail { display: flex; align-items: center; justify-content: space-between; margin: 12px 22px; font-size: 12px; color: #76859b; }
.strategy-detail strong { font-size: 13px; color: var(--text); }
.strategy-detail select { border: 1px solid #e5eaf3; background: #f6f8fc; color: #506687; max-width: 148px; font-size: 11px; padding: 5px; border-radius: 5px; }
.quality-row { display: flex; justify-content: space-between; font-size: 11px; color: #7386a1; margin: 18px 22px 9px; }
.quality-track { margin: 0 22px; background: #edf1f8; height: 5px; border-radius: 4px; overflow: hidden; }
.quality-track span { display: block; height: 100%; background: #8d7cdc; width: 48%; transition: width .5s; }
.competitors { display: grid; grid-template-columns: 1fr 1fr; padding: 20px 24px 0; gap: 14px; }
.competitor { border: 1px solid #dfe8fa; background: #f8faff; border-radius: 11px; padding: 15px; min-width: 0; }
.competitor.opponent { border-color: #e8e2f4; background: #faf9fd; }
.competitor-header { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.competitor-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #e5ecff; color: var(--blue); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.opponent .competitor-icon { background: #eee9fa; color: #7b61be; }
.competitor-header strong { font-size: 12px; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.competitor-header .tag { margin-left: auto; padding: 2px 5px; font-size: 8px; }
.competitor-stats { display: flex; align-items: baseline; justify-content: space-between; }
.competitor-stats>strong { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.competitor-stats>span { color: #7c8fab; font-size: 11px; }
.share-track { height: 4px; background: #e5ecfa; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.share-track span { height: 100%; display: block; background: var(--blue); transition: width .5s; }
.opponent .share-track { background: #ebe5f6; }
.opponent .share-track span { background: var(--purple); }
.competitor-footer { margin-top: 9px; font-size: 9px; color: #7d8fab; display: flex; justify-content: space-between; gap: 5px; }
.opponent .competitor-footer { color: #9182a8; }
.chart-header { display: flex; justify-content: space-between; font-size: 11px; margin: 24px 25px 10px; color: #587297; }
.growth-chart { height: 130px; margin: 0 24px; position: relative; background: repeating-linear-gradient(to bottom,transparent,transparent 41px,#e9edf5 42px,transparent 43px); }
#growth-chart { width: 100%; height: 100%; overflow: visible; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8a9bb6; font-size: 11px; }
.chart-y { position: absolute; top: 0; right: 0; color: #8192ad; font-size: 10px; }
.chart-axis { display: flex; justify-content: space-between; color: #8999b0; font-size: 9px; letter-spacing: 1px; margin: 7px 25px 20px; }
.small-button { font-size: 10px; padding: 5px 7px; min-height: 32px; }
.talent-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; padding: 12px 24px 15px; }
.talent { display: flex; gap: 10px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.talent:nth-last-child(-n+2) { border-bottom: 0; }
.talent-avatar { width: 36px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: #e8eefb; color: #5d7ab0; font-size: 11px; }
.talent:nth-child(2) .talent-avatar { background: #fbefdf; color: #ad8149; }
.talent:nth-child(3) .talent-avatar { background: #f0e9fa; color: #9873bd; }
.talent:nth-child(4) .talent-avatar { background: #e7f1f2; color: #54868b; }
.talent-info { min-width: 0; flex: 1; }
.talent-info strong { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talent-info span { font-size: 10px; color: #8291a9; display: block; margin-top: 2px; }
.hire-button { font-size: 11px; border: 1px solid #d8e2f7; border-radius: 6px; padding: 7px 9px; color: var(--blue); white-space: nowrap; }
.hire-button:hover:not(:disabled) { background: var(--blue-soft); }
.log-panel { padding-bottom: 6px; }
.event-banner { background: #f3f6fc; border-left: 2px solid #86a4e0; margin: 19px 22px 15px; padding: 12px; border-radius: 0 7px 7px 0; }
.event-banner strong { font-size: 12px; display: block; color: #5d769d; }
.event-banner span { font-size: 11px; color: #7c8fab; display: block; margin-top: 5px; line-height: 1.8; }
.activity-log { max-height: 270px; overflow: auto; padding: 0 22px 12px; scrollbar-width: thin; scrollbar-color: #d1dced transparent; }
.log-entry { display: flex; gap: 10px; padding: 15px 0; border-top: 1px solid var(--border); }
.log-icon { width: 26px; height: 26px; display: grid; place-items: center; background: #f0f4fc; color: #7894c0; border-radius: 7px; flex-shrink: 0; }
.log-icon svg { width: 13px; height: 13px; }
.log-copy { flex: 1; min-width: 0; }
.log-copy strong { font-size: 12px; display: block; font-weight: 500; color: #5f7394; }
.log-copy p { font-size: 11px; color: #8494ad; margin-top: 4px; }
.log-copy>span { font-size: 9px; color: #8f9eb4; display: block; margin-top: 6px; letter-spacing: .6px; }
.log-copy .log-item + .log-item { margin-top: 1px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid var(--border); margin-top: 30px; padding: 24px 0; font-size: 9px; letter-spacing: .8px; }
footer .text-link { font-size: 11px; color: var(--danger); letter-spacing: 0; }
footer>.muted { font-size: 10px; letter-spacing: 0; }

/* Shared dialogs and feedback */
.company-exit-link { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 100%; margin: 7px 0 10px; padding: 7px 9px; border: 1px solid #efd6d9; border-radius: 7px; background: #fff6f5; color: #a14450; font-size: 10px; font-weight: 500; text-align: left; line-height: 1.6; white-space: normal; }
.company-exit-link span:last-child { font-size: 9px; color: #876774; }
.company-exit-link:hover { background: #fcebe9; border-color: #d7a4ab; }
.company-exit-link[data-exit-status='conceded'] { border-color: #e2ddef; background: #f7f5fb; color: #79658c; }
.company-exit-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#result-table .company-exit-link { min-width: 125px; margin-bottom: 0; }
.analytics-table-panel .company-exit-link { margin-bottom: 0; }
#company-exit-dialog { width: 500px; }
#company-exit-title { overflow-wrap: anywhere; }
#company-exit-reason { display: inline-block; margin-top: 18px; padding: 6px 10px; border-radius: 6px; background: #fff1ef; color: #a14450; font-size: 13px; font-weight: 600; }
#company-exit-dialog[data-status='conceded'] #company-exit-reason { background: #f1edf8; color: #79658c; }
#company-exit-week { margin-top: 8px; font-size: 12px; color: #788ba5; }
.company-exit-period { margin: 22px 0 8px; color: #7186a5; font-size: 11px; }
#company-exit-finances dl { margin: 0; font-size: 12px; }
#company-exit-finances dl>div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f7; }
#company-exit-finances dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
#company-exit-finances .exit-cost-item { padding: 7px 0 7px 12px; border: 0; color: #7a8ca5; font-size: 11px; }
#company-exit-finances [data-exit-metric='profit'] { border-top: 1px solid #edf1f7; }
#company-exit-private, #company-exit-source, .company-exit-note { margin-top: 15px; font-size: 11px; line-height: 1.8; color: #7a8ca5; }
.company-exit-note { background: #f5f8fc; padding: 10px 12px; border-radius: 7px; }
dialog { background: #fff; border: 1px solid #dce4f3; border-radius: 20px; color: var(--text); width: 480px; max-width: calc(100vw - 30px); max-height: 90vh; padding: 30px; box-shadow: 0 30px 100px #14285033; }
dialog::backdrop { background: #172e5366; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-heading h2 { font-size: 24px; }
.dialog-heading .eyebrow { margin-bottom: 7px; font-size: 9px; }
.dialog-intro { font-size: 13px; color: #7688a3; line-height: 1.8; margin: 16px 0 22px; }
.room-tabs { display: flex; background: #f0f4fa; border: 1px solid #e0e7f2; border-radius: 9px; padding: 4px; margin-bottom: 22px; }
.room-tabs button { flex: 1; padding: 9px; font-size: 13px; border-radius: 6px; color: #7185a3; }
.room-tabs button.selected { background: #fff; color: var(--blue); box-shadow: 0 1px 5px #19305b0f; }
#room-form>label { display: flex; flex-direction: column; gap: 8px; color: #5f7496; font-size: 12px; margin-bottom: 18px; }
input { background: #f9faff; color: var(--text); border: 1px solid #dce5f3; border-radius: 8px; padding: 11px 12px; min-width: 0; }
#join-code { text-transform: uppercase; letter-spacing: 4px; }
.full-width { width: 100%; margin-top: 12px; }
#room-form-note { font-size: 11px; line-height: 1.8; }
.dialog-error { font-size: 12px; color: var(--danger); margin-top: 10px; }
#rules-dialog { width: 620px; }
.rules-content { margin-top: 24px; }
.rule { display: flex; gap: 18px; padding: 19px 0; border-top: 1px solid var(--border); }
.rule>span { color: #7593c6; font-size: 13px; }
.rule h3 { font-size: 15px; margin-bottom: 8px; }
.rule p { font-size: 13px; color: #7284a0; line-height: 1.9; }
.rule p+p { margin-top: 10px; }
#result-dialog { width: 600px; text-align: center; }
.result-emblem { background: var(--blue-soft); width: 70px; height: 70px; margin: 3px auto 20px; display: grid; place-items: center; border: 1px solid #cfddff; border-radius: 50%; color: var(--blue); }
.result-emblem svg { width: 30px; height: 30px; }
#result-title { font-size: 28px; margin-top: 8px; }
#result-reason { font-size: 13px; color: #7287a8; margin: 10px 0 24px; }
#result-table { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
td, th { padding: 12px 9px; border-bottom: 1px solid var(--border); }
th { font-size: 11px; color: #728bb0; font-weight: 500; }
td:not(:first-child), th:not(:first-child) { text-align: right; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
#confirm-dialog>p { color: #7487a4; margin-top: 15px; }
.danger-button { background: #b84956; border-color: #b84956; color: #fff; }
.danger-button:hover:not(:disabled) { background: #a03c48; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translateX(-50%); background: #fff; border: 1px solid #c6d8ff; color: #305d9f; border-radius: 11px; padding: 14px 21px; box-shadow: 0 8px 32px #29497926; max-width: calc(100vw - 32px); font-size: 13px; }
.toast.error { background: #fff4f4; border-color: #f0c5ca; color: #a84955; }

/* Responsive workspace */
@media (min-width: 1600px) {
  main { padding: 40px 44px 0; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 370px; gap: 26px; }
  .main-column, .side-column { gap: 26px; }
  .map-container[data-view='globe'] { height: 450px; }
  .ceo-panel { padding: 28px; }
  .metric { padding: 24px 28px 20px; }
  .metric-value { font-size: 38px; }
  .metric-foot { font-size: 12px; }
  .talent-info strong { font-size: 13px; }
  .talent-info span { font-size: 11px; }
}
@media (max-width: 1380px) {
  .rail { width: 184px; padding-left: 13px; padding-right: 13px; }
  .brand { gap: 10px; padding-left: 5px; }
  .brand-name strong { font-size: 12px; }
  .brand-name { font-size: 10px; }
  .app-shell { margin-left: 184px; }
  .topbar { padding: 0 26px; }
  main { padding: 28px 26px 0; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 305px; gap: 18px; }
  .main-column, .side-column { gap: 18px; }
  .player-count { display: none; }
  .metric { padding: 19px 17px 16px; }
  .metric-value { font-size: 29px; }
  .metric-foot .text-link { font-size: 10px; }
  .sparkline { width: 45px; }
  .ceo-panel { padding: 21px; }
  .ceo-panel h2 { font-size: 27px; }
  .map-legend { display: none; }
  .globe-navigation { flex-wrap: wrap; }
  #globe-hint { display: none; }
  .region-detail { gap: 14px; padding: 14px; }
  .region-stat strong { font-size: 13px; }
  .region-title { min-width: 68px; }
  .talent-grid { grid-template-columns: 1fr; }
  .talent:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .talent-info strong { font-size: 13px; }
  .talent-info span { font-size: 11px; }
  .connection { display: none; }
  footer>.muted { display: none; }
}
@media (max-width: 1180px) {
  .rail { width: 76px; padding: 24px 12px; align-items: center; }
  .brand { padding: 0; }
  .brand-name, .nav-caption, .nav-label, .rail-note, .founder-profile>div:not(.avatar) { display: none; }
  .rail nav { margin-top: 38px; gap: 12px; width: 100%; }
  .rail-item { padding: 0; justify-content: center; }
  .rail-item.active:after { display: none; }
  .rail-bottom { width: 100%; }
  .founder-profile { padding: 20px 0 0; justify-content: center; }
  .app-shell { margin-left: 76px; }
  h1 { font-size: 28px; }
  .company-sign { padding: 9px; }
  .simulation-bar { gap: 12px; }
  .step-info { width: 120px; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 300px; }
  .panel-heading { padding-left: 20px; padding-right: 20px; }
  .map-container[data-view='globe'] { height: 365px; }
  .region-detail { flex-wrap: wrap; margin-left: 18px; margin-right: 18px; gap: 16px; }
  .region-title { flex: 1; }
  .region-detail .button { flex-basis: 100%; }
  .market-picker>span { display: none; }
}
@media (max-width: 980px) {
  .workspace-grid { grid-template-columns: minmax(0,1fr); }
  .main-column, .side-column { display: contents; }
  .world-panel { grid-row: 1; }
  .ceo-panel { grid-row: 2; }
  .strategy-panel { grid-row: 3; }
  .competition-panel { grid-row: 4; }
  .talent-panel { grid-row: 5; }
  .log-panel { grid-row: 6; }
  .ceo-panel h2 br { display: none; }
  .ceo-panel h2 { font-size: 26px; }
  .ceo-panel { padding: 25px; }
  .ceo-top { justify-content: flex-start; gap: 16px; }
  .ceo-description, textarea, .voice-button { font-size: 13px; }
  .voice-status { font-size: 12px; }
  .company-sign>div:not(.avatar), .company-sign .icon-button { display: none; }
  .company-sign { background: transparent; border: 0; padding: 0; }
  .metric { padding: 18px 15px 15px; }
  .metric-value { font-size: 26px; }
  .metric-foot .sparkline { display: none; }
  .simulation-bar { flex-wrap: wrap; }
  .room-info { flex: 1 1 55%; }
  .step-info { flex: 1 1 30%; }
  .time-controls { width: 100%; padding-top: 11px; border-top: 1px solid var(--border); }
  .play-button { margin-left: auto; }
  .speed-control button { width: 42px; }
  .world-stats { gap: 30px; }
  .map-container[data-view='globe'] { height: 400px; }
  .region-detail { margin-left: 24px; margin-right: 24px; }
  .region-detail .button { flex-basis: auto; }
  .region-title { flex: initial; min-width: 95px; }
  .region-stat strong { font-size: 15px; }
  #globe-hint, .market-picker>span { display: inline; }
  .globe-navigation { flex-wrap: nowrap; }
  .talent-grid { grid-template-columns: 1fr 1fr; }
  .talent:nth-last-child(2) { border-bottom: 0; }
  .strategy-presets { grid-template-columns: repeat(4,1fr); }
  .budget-legend, .strategy-detail, .quality-row { font-size: 12px; }
  .log-copy strong { font-size: 13px; }
  .log-copy p, .event-banner span { font-size: 12px; }
}
@media (max-width: 650px) {
  .rail { display: none; }
  .app-shell { margin-left: 0; }
  .topbar { height: 65px; padding: 0 20px; }
  .wordmark { font-size: 12px; gap: 7px; }
  .desktop-breadcrumb, .wordmark>strong { display: none; }
  .mobile-wordmark { display: inline; font-weight: 700; letter-spacing: .5px; }
  .beta { font-size: 8px; padding: 2px 5px; }
  .top-actions .quiet { display: none; }
  .top-actions .button { font-size: 11px; padding: 7px 9px; min-height: 36px; }
  main { padding: 26px 16px 0; }
  .page-heading { gap: 8px; align-items: flex-start; margin-bottom: 22px; }
  h1 { font-size: 23px; line-height: 1.5; letter-spacing: -.8px; }
  .page-heading .eyebrow { font-size: 8px; letter-spacing: 1.2px; margin-bottom: 8px; }
  .page-heading p { font-size: 12px; margin-top: 8px; max-width: 260px; }
  .heading-dot { display: none; }
  .company-sign { margin-top: 25px; }
  .company-sign .avatar { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
  .simulation-bar { padding: 12px; gap: 12px; margin-bottom: 17px; }
  .room-info { flex: 1 1 auto; gap: 8px; }
  .simulation-bar .step-info { flex: 0 0 108px; width: 108px; }
  .step-info { font-size: 9px; letter-spacing: 0; }
  .step-info strong { font-size: 14px; margin-left: 2px; }
  .status-pill { font-size: 10px; padding: 5px 6px; }
  .room-code { font-size: 10px; letter-spacing: .5px; }
  .time-controls { padding-top: 10px; gap: 7px; }
  .speed-control button { width: 35px; }
  .play-button { font-size: 12px; padding: 8px 12px; }
  .metrics { grid-template-columns: 1fr 1fr; margin-bottom: 18px; border-radius: 14px; }
  .metric { padding: 17px 16px 14px; }
  .metric-value { font-size: 29px; margin-top: 10px; }
  .metric-label { font-size: 11px; }
  .metric-foot { margin-top: 7px; font-size: 9px; min-height: 22px; white-space: normal; }
  .metric-foot .text-link { font-size: 9px; }
  .metric:nth-child(3), .metric:nth-child(4) { border-top: 1px solid var(--border); }
  .metric:nth-child(3):before { display: none; }
  .metric+.metric:before { top: 18px; bottom: 18px; }
  .workspace-grid { gap: 18px; }
  .panel { border-radius: 15px; }
  .panel-heading { padding: 20px 18px 0; gap: 8px; }
  .panel-heading h2 { font-size: 19px; }
  .panel-heading .eyebrow { font-size: 7px; letter-spacing: 1px; }
  .world-view-switch { padding: 3px; }
  .world-view-switch button { font-size: 10px; padding: 6px 7px; }
  .world-stats { padding: 21px 20px 0; gap: 23px; }
  .world-stats strong { font-size: 36px; }
  .world-stats .world-stat-small { padding-left: 23px; }
  .world-stat-small strong { font-size: 23px; }
  .world-stats>div>span { font-size: 10px; }
  .map-container { margin: 18px 10px 15px; min-height: 185px; }
  .map-container[data-view='globe'] { height: 315px; margin: 6px 10px 0; }
  .map-container[data-view='globe']:before { bottom: 27px; }
  .map-marker { width: 36px; height: 36px; }
  .map-marker .map-label { font-size: 9px; padding: 2px 5px; top: 29px; }
  .map-coordinate { display: none; }
  .globe-readout { top: 10px; left: 5px; gap: 4px; }
  .globe-readout>span { font-size: 7px; letter-spacing: 1px; }
  .globe-readout strong { font-size: 9px; }
  .globe-tools { right: 4px; bottom: 18px; gap: 5px; }
  .globe-tools button { width: 32px; height: 32px; }
  .globe-navigation { margin: 0 18px 16px; gap: 10px; }
  #globe-hint, .market-picker>span { display: none; }
  .market-picker select { max-width: 130px; font-size: 11px; }
  .region-detail { margin: 0 16px 13px; padding: 14px; gap: 12px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .region-title { grid-column: 1 / 3; min-width: 0; }
  .region-title strong { font-size: 15px; }
  .region-detail .button { grid-column: 3; grid-row: 1; padding: 7px 9px; font-size: 10px; white-space: normal; }
  .region-stat { padding-top: 10px; border-top: 1px solid #dfe7f5; }
  .region-stat strong { font-size: 14px; }
  .region-stat span { font-size: 9px; }
  .population-note { font-size: 9px; margin: 0 18px 17px; }
  .ceo-panel { padding: 23px 20px; }
  .ceo-top { justify-content: space-between; gap: 5px; }
  .ceo-panel h2 { font-size: 26px; margin-top: 20px; }
  .ceo-panel h2 br { display: inline; }
  .ceo-description { font-size: 12px; margin-bottom: 20px; }
  .voice-button { font-size: 13px; }
  .voice-status { font-size: 11px; }
  textarea { font-size: 13px; min-height: 112px; }
  .suggestions button { font-size: 11px; }
  .command-bottom .button { font-size: 12px; }
  .strategy-presets { grid-template-columns: 1fr 1fr; }
  .competition-panel .tag { font-size: 8px; padding: 3px 5px; }
  .competitors { padding: 18px 15px 0; gap: 9px; }
  .competitor { padding: 12px 10px; }
  .competitor-header { gap: 5px; }
  .competitor-header strong { font-size: 11px; }
  .competitor-icon { width: 23px; height: 23px; font-size: 10px; }
  .competitor-header .tag { font-size: 7px; padding: 2px 3px; }
  .competitor-stats>strong { font-size: 24px; }
  .competitor-stats>span { font-size: 10px; }
  .competitor-footer { font-size: 9px; display: block; line-height: 1.8; }
  .competitor-footer span { display: block; }
  .chart-header { margin-left: 18px; margin-right: 18px; font-size: 10px; }
  .chart-empty { font-size: 10px; }
  .talent-panel .small-button { font-size: 9px; padding: 4px; }
  .talent-grid { grid-template-columns: 1fr; padding: 10px 19px; }
  .talent:nth-child(n) { border-bottom: 1px solid var(--border); padding: 16px 0; }
  .talent:last-child { border-bottom: 0; }
  .talent-info strong { font-size: 13px; }
  .talent-info span { font-size: 11px; }
  .hire-button { font-size: 12px; padding: 7px 10px; }
  footer { flex-wrap: wrap; gap: 13px; font-size: 8px; padding-bottom: 22px; margin-top: 25px; }
  footer .text-link { font-size: 10px; }
  .toast { width: max-content; font-size: 12px; bottom: 16px; }
  dialog { padding: 23px; }
  .dialog-heading h2 { font-size: 22px; }
  .rules-content { margin-top: 17px; }
  .rule { gap: 13px; }
  .rule p { font-size: 12px; line-height: 1.9; }
  .result-emblem { width: 60px; height: 60px; }
  #result-title { font-size: 25px; }
  td, th { padding: 10px 6px; font-size: 10px; }
  .skip-link:focus { left: 16px; top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* v0.4: populated land and local information networks */
.map-container[data-view='flat'] #globe-canvas { display: block; cursor: default; }
.map-container[data-view='flat'] { background: #edf5fb; border-radius: 12px; }
.map-container[data-view='globe'] .map-marker .pin { background: #315fe9; border-color: #fff; box-shadow: 0 0 0 4px #315fe91a; }
.map-container[data-view='globe'] .map-marker.selected .pin { background: #315fe9; box-shadow: 0 0 0 6px #315fe91c; }
.map-container[data-view='globe'] .map-marker.selected:after { border-color: #315fe969; }
.population-explorer { margin: 0 24px 20px; border-top: 1px solid var(--border); padding-top: 15px; }
.population-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.population-layers { display: flex; gap: 14px; }
.population-layers label { display: flex; gap: 5px; align-items: center; font-size: 11px; color: #526b8d; cursor: pointer; }
.population-layers input { width: 13px; height: 13px; padding: 0; accent-color: var(--blue); margin: 0; }
#population-status { font-size: 9px; color: #7488a6; font-variant-numeric: tabular-nums; }
.population-legend { display: flex; gap: 13px; flex-wrap: wrap; margin: 11px 0 18px; }
.population-legend>span { display: flex; gap: 5px; align-items: center; font-size: 9px; color: #7185a2; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: block; }
.dot.unknown { background: #697c91; }.dot.own { background: #315fe9; }.dot.rival { background: #9161be; }.dot.both { background: #c27a32; }.dot.moving { background: #e78748; }
.population-metrics { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.population-metrics>div { padding: 13px 15px; background: #f1f5fc; border-radius: 10px; }
.population-metrics span, .population-metrics small { font-size: 10px; color: #6d83a1; display: block; }
.population-metrics strong { font-size: 19px; display: block; margin: 4px 0; font-variant-numeric: tabular-nums; }
.awareness-track { height: 4px; background: #dfe7f6; margin-top: 10px; border-radius: 4px; overflow: hidden; }
.awareness-track i { display: block; height: 100%; background: var(--blue); transition: width .3s; }
.community-inspector { margin-top: 17px; padding: 15px; border: 1px solid #e0e8f3; border-radius: 11px; background: #fff; }
.community-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12px; }
#community-select { width: 100%; border: 1px solid #dfe7f4; border-radius: 7px; padding: 8px; background: #f8faff; color: #365987; font-size: 12px; }
.community-stats { display: flex; gap: 12px; justify-content: space-between; margin: 12px 0 7px; font-size: 11px; color: #4d6b91; flex-wrap: wrap; }
.community-inspector p, .migration-settings p { font-size: 10px; line-height: 1.8; color: #768aa6; }
.migration-settings { margin-top: 15px; padding: 13px 15px; background: #f8faff; border: 1px solid #e2e9f5; border-radius: 10px; }
.migration-settings summary { cursor: pointer; font-size: 12px; }
.migration-settings summary>span { float: right; color: #7486a1; font-size: 10px; }
.migration-settings form>p { margin: 13px 0; }
.migration-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.migration-rate { display: grid; grid-template-columns: 1fr 55px 12px; align-items: center; gap: 4px; padding: 10px; border: 1px solid #e3e9f5; border-radius: 7px; background: #fff; }
.migration-rate>span { font-size: 11px; }
.migration-rate input { width: 55px; padding: 4px; font-size: 12px; }
.migration-rate small { grid-column: 1 / -1; font-size: 9px; color: #778ba8; }
.migration-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.migration-controls label { font-size: 11px; color: #607b9f; }
#migration-period { width: 66px; padding: 6px; margin: 0 5px; font-size: 12px; }
#save-migration { font-size: 11px; min-height: 35px; padding: 7px 10px; }
#migration-feedback { font-size: 10px; color: #6e85a8; margin-top: 12px; }
@media(max-width:650px) {
 .population-explorer { margin: 0 16px 18px; }
 .population-toolbar { gap: 10px; }
 .population-layers { gap: 18px; }
 .population-legend { gap: 10px; }
 .population-metrics { gap: 9px; }
 .population-metrics>div { padding: 12px; }
 .population-metrics strong { font-size: 17px; }
 .community-heading { font-size: 11px; }
 .community-heading .text-link { font-size: 10px; }
 .migration-rates { grid-template-columns: 1fr; }
 .world-stats { gap: 19px; }
 .world-stats .world-stat-small { padding-left: 19px; }
 .world-stat-small strong { font-size: 22px; }
}

/* v0.5: full-screen world and readable people */
.world-heading-actions { display: flex; align-items: center; gap: 10px; }
.world-heading { flex-wrap: wrap; }
#world-fullscreen { min-height: 37px; padding: 7px 10px; font-size: 11px; }
.expand-symbol { font-size: 20px; line-height: 1; }
#world-details { display: none; }
.world-layout, .world-scene, .world-sidebar { min-width: 0; }
.map-playback { margin: 0 24px 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.map-clock { min-width: 0; }
.map-clock strong { display: block; font-size: 12px; letter-spacing: .8px; font-variant-numeric: tabular-nums; }
#map-motion-state { display: block; margin-top: 4px; font-size: 10px; color: #7789a3; }
#map-motion-state.is-running { color: var(--blue); }
.map-playback-actions { display: flex; align-items: center; gap: 7px; }
.map-playback .speed-control button { width: 29px; }
.map-playback .play-button { font-size: 11px; min-height: 36px; padding: 7px 10px; }
.agent-view-caption { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; align-items: center; padding: 5px 9px; border-radius: 7px; background: #ffffffdf; border: 1px solid #e0e8f3; color: #5a7294; font-size: 9px; max-width: 90%; white-space: nowrap; pointer-events: none; }
.agent-view-caption svg { width: 13px; height: 13px; }
.agent-appearance { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 10px; color: #536f94; margin: 14px 0; }
.agent-appearance input { width: 92px; padding: 0; height: 16px; accent-color: var(--blue); background: transparent; border: 0; }
.agent-appearance output { font-variant-numeric: tabular-nums; }
.agent-appearance>span { margin-left: auto; color: #7a8da8; font-size: 9px; }
.world-is-expanded { overflow: hidden; }
#world-panel.world-expanded { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; z-index: 1000; border: 0; border-radius: 0; display: flex; flex-direction: column; background: #f7faff; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.world-expanded .world-heading { padding: 18px 28px; border-bottom: 1px solid var(--border); flex: 0 0 auto; background: #fff; }
.world-expanded .world-heading h2 { font-size: 22px; }
.world-expanded .world-layout { position: relative; display: grid; grid-template-columns: minmax(0,1fr); flex: 1; min-height: 0; overflow: hidden; }
.world-expanded.world-details-open .world-layout { grid-template-columns: minmax(0,1fr) 320px; }
.world-expanded .world-scene { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.world-expanded .world-stats { padding: 15px 30px 0; flex-shrink: 0; gap: 26px; }
.world-expanded .world-stats strong { font-size: 28px; }
.world-expanded .world-stats strong span { font-size: 18px; }
.world-expanded .world-stat-small strong { font-size: 20px; }
.world-expanded .world-stats>div>span { font-size: 10px; margin-top: 2px; }
.world-expanded #map-container { flex: 1 1 0; height: auto; min-height: 140px; aspect-ratio: auto; margin: 0 22px 7px; }
.world-expanded .globe-navigation { flex-shrink: 0; margin: 8px 30px 10px; }
.world-expanded .map-playback { flex-shrink: 0; margin: 0 30px; padding: 13px 0 18px; }
.world-expanded .map-playback .speed-control button { width: 42px; }
.world-expanded .map-playback .play-button { padding: 9px 17px; font-size: 13px; }
.world-expanded #map-motion-state { font-size: 12px; }
.world-expanded #map-step { font-size: 15px; }
.world-expanded .globe-tools { right: 12px; bottom: 40px; gap: 8px; }
.world-expanded .globe-tools button { width: 42px; height: 42px; font-size: 25px; }
.world-expanded .globe-readout { top: 24px; left: 15px; }
.world-expanded .globe-readout>span { font-size: 10px; }
.world-expanded .globe-readout strong { font-size: 13px; }
.world-expanded .agent-view-caption { font-size: 11px; bottom: 8px; padding: 6px 12px; }
.world-expanded #world-details { display: inline-flex; }
.world-expanded #world-fullscreen { min-width: 105px; background: #eff3ff; }
.world-expanded .world-sidebar { display: none; }
.world-expanded.world-details-open .world-sidebar { display: block; height: 100%; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--border); background: #fff; }
.world-expanded .population-explorer { margin: 20px 18px; padding-top: 0; border-top: 0; }
.world-expanded .population-toolbar { gap: 12px; }
.world-expanded .population-metrics { grid-template-columns: 1fr; gap: 9px; }
.world-expanded .population-metrics>div { padding: 12px; }
.world-expanded .agent-appearance>span { width: 100%; margin: 0; }
.world-expanded .population-legend { gap: 9px; }
.world-expanded .community-inspector { padding: 12px; }
.world-expanded .community-heading { font-size: 11px; }
.world-expanded .community-heading .text-link { font-size: 10px; }
.world-expanded .migration-rates { grid-template-columns: 1fr; }
.world-expanded .region-detail { margin: 0 18px 14px; gap: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.world-expanded .region-title { grid-column: 1 / 3; min-width: 0; }
.world-expanded .region-detail .button { grid-column: 3; grid-row: 1; padding: 7px; font-size: 10px; }
.world-expanded .region-stat { border-top: 1px solid #dfe7f5; padding-top: 8px; }
.world-expanded .region-stat span { font-size: 9px; }
.world-expanded .population-note { margin: 0 18px 20px; }
@media(max-width:1200px) {
 .map-playback { flex-wrap: wrap; }
 .map-playback-actions { margin-left: auto; }
}
@media(max-width:800px) {
 .world-expanded.world-details-open .world-layout { grid-template-columns: minmax(0,1fr); }
 .world-expanded.world-details-open .world-sidebar { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px,100%); z-index: 9; box-shadow: -12px 0 32px #20395920; }
 .world-expanded .world-heading { padding: 12px 18px; }
 .world-expanded .world-heading>.world-heading-actions { gap: 6px; }
 .world-expanded .map-playback { margin: 0 20px; padding-bottom: 12px; }
 .world-expanded #map-motion-state { font-size: 10px; }
 .world-expanded .world-stats { padding: 14px 22px 0; }
 .world-expanded #map-container { margin: 0 12px; }
 .world-expanded .globe-navigation { margin: 9px 22px; }
}
@media(max-width:650px) {
 .world-heading { row-gap: 12px; }
 .world-heading .eyebrow { display: none; }
 .world-heading-actions { gap: 5px; }
 .world-heading h2 { font-size: 17px; }
 #world-fullscreen { font-size: 10px; min-height: 36px; padding: 7px; gap: 4px; }
 .world-heading .world-view-switch button { padding: 5px; }
 .map-playback { margin: 0 18px 14px; gap: 10px; }
 .map-clock { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
 #map-motion-state { margin: 0; font-size: 9px; }
 .map-playback-actions { width: 100%; margin: 0; }
 .map-playback .play-button { margin-left: auto; }
 .map-playback .speed-control button { width: 35px; }
 .agent-view-caption { font-size: 8px; padding: 4px 6px; }
 .agent-appearance>span { font-size: 8px; margin-left: 0; }
 .world-expanded .world-heading { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
 .world-expanded .world-heading-actions { display: contents; }
 .world-expanded #world-fullscreen { grid-row: 1; grid-column: 2; justify-self: end; }
 .world-expanded .world-view-switch { grid-row: 2; grid-column: 1; justify-self: start; }
 .world-expanded #world-details { grid-row: 2; grid-column: 2; font-size: 11px; min-height: 32px; padding: 4px 7px; }
 .world-expanded .world-heading h2 { font-size: 19px; }
 .world-expanded #map-container { min-height: 120px; }
 .world-expanded .world-stats { gap: 20px; }
 .world-expanded .world-stats strong { font-size: 25px; }
 .world-expanded .world-stat-small strong { font-size: 19px; }
 .world-expanded .world-stats>div>span { font-size: 9px; }
 .world-expanded .globe-tools { right: 5px; bottom: 32px; }
 .world-expanded .globe-tools button { width: 35px; height: 35px; }
 .world-expanded .globe-readout { left: 8px; top: 14px; }
 .world-expanded .globe-readout>span { font-size: 8px; }
 .world-expanded .globe-readout strong { font-size: 10px; }
 .world-expanded .agent-view-caption { font-size: 8px; padding: 5px 7px; bottom: 2px; }
 .world-expanded .map-playback { gap: 9px; }
 .world-expanded .map-playback .play-button { font-size: 12px; padding: 8px 12px; }
 .world-expanded .map-playback .speed-control button { width: 36px; }
 .world-expanded #map-step { font-size: 12px; }
}
@media(max-height:550px) and (min-width:650px) {
 .world-expanded .world-heading { padding: 7px 20px; }
 .world-expanded .world-heading .eyebrow, .world-expanded .world-stats { display: none; }
 .world-expanded .globe-navigation { margin: 3px 24px; }
 .world-expanded .map-playback { padding: 6px 0; }
 .world-expanded #map-motion-state { display: none; }
}
/* City population inspection. */
.city-tools{display:grid;gap:10px;padding:14px 0;border-bottom:1px solid #e4ebf6;margin-bottom:14px;font-size:12px;color:#536b91}
.city-tools[hidden]{display:none}.city-tools strong{color:#1c355d;font-size:13px}.city-tools label{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:8px}.city-tools input,.city-tools select{width:100%;min-width:0;padding:8px;border:1px solid #dce5f3;border-radius:7px;background:#fff;color:#345378}.city-tools p{margin:0;line-height:1.7}.city-tools a{color:#315fe9;font-size:11px}.city-selection{position:absolute;right:16px;top:18px;max-width:65%;padding:7px 10px;border:1px solid #dce5f3;border-radius:8px;background:#fffffff2;color:#345378;font-size:11px;pointer-events:none;z-index:3}.city-selection[hidden]{display:none}
/* Starting cities and multi-company competition. */
#room-dialog{width:700px}#room-dialog .dialog-intro{margin:10px 0 16px}.setup-names,.location-selects{display:grid;grid-template-columns:1fr 1fr;gap:12px}#start-location{border:1px solid #dce5f3;border-radius:12px;padding:16px;margin:4px 0 18px;min-width:0}#start-location legend{font-size:11px;font-weight:650;color:#536b91;padding:0 6px;letter-spacing:.4px}#start-location label{margin-bottom:10px}#start-location select{width:100%;padding:9px;border:1px solid #dce5f3;border-radius:8px;background:#fff;color:#264467;font:inherit;min-width:0}#start-city-status{display:block;font-size:10px;color:#7184a2}.start-location-summary{margin-top:10px;padding:9px 12px;background:#edf3ff;border-radius:8px;color:#315fe9;font-size:12px}.setup-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:13px}.setup-section-title span{font-size:11px;color:#7184a2}.default-bots{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.default-bots article{position:relative;padding:12px;background:#f6f8fc;border:1px solid #e1e8f3;border-radius:10px;display:grid;gap:6px;min-width:0}.default-bots i{width:7px;height:7px;border-radius:50%;display:block}.default-bots strong{font-size:11px;letter-spacing:.3px}.default-bots span{font-size:11px;color:#536b91}.default-bots small{font-size:9px;color:#7e8ea7}.extra-bot-control{margin:16px 0 0!important}.extra-bot-control>span:first-child{display:flex;justify-content:space-between;align-items:center}.extra-bot-control output{font-size:20px;font-weight:600;color:#315fe9}.extra-bot-control input{padding:0!important;accent-color:#315fe9;box-shadow:none!important;border:0!important}.range-limits{display:flex;justify-content:space-between;color:#8796ac}.setup-help{font-size:11px;line-height:1.7;color:#7184a2;margin:8px 0}#bot-count-summary{display:block;font-size:12px;color:#315fe9;padding:10px 0}#bot-setup[hidden]{display:none}.company-sign #company-location{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.competitor .competitor-icon{color:var(--company-color);background:#fff}.competitor .share-track span{background:var(--company-color)}.company-home{font-size:11px;color:var(--company-color);text-align:left;margin:0 0 10px;padding:0;line-height:1.5}.company-style{font-size:10px;color:#7788a2;margin:0 0 12px}.competitor.is-eliminated{opacity:.55}#result-dialog{width:900px}#result-table{overflow-x:auto;margin:16px 0}#result-table table{width:100%;white-space:nowrap}#result-table th,#result-table td{min-width:100px}#result-table th small{display:block;color:#a17b7b;font-size:10px;font-weight:400}.population-legend{flex-wrap:wrap}
@media(max-width:550px){#room-dialog{padding:20px}.setup-names,.location-selects{grid-template-columns:1fr}.default-bots{gap:5px}.default-bots article{padding:9px 7px}.default-bots strong{font-size:9px}.default-bots small{font-size:8px}.company-sign #company-location{max-width:150px}.competitors{grid-template-columns:1fr}.competitor-header strong{font-size:12px}.competitor-footer{display:flex}}

/* Keep the create action visible while the setup fields scroll. */
#room-dialog[open]{display:flex;flex-direction:column;overflow:hidden;max-height:92dvh}#room-dialog>.dialog-heading,#room-dialog>.dialog-intro,#room-dialog>.room-tabs,.setup-footer{flex-shrink:0}#room-dialog .room-tabs{margin-bottom:15px}#room-form{overflow-y:auto;min-height:0;padding-right:7px}#room-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#476184;margin-bottom:12px}#room-form label[hidden]{display:none}#room-form input:not([type="range"]){width:100%;min-width:0;padding:10px 12px}#room-form input[type="range"]{width:100%;margin:6px 0}.setup-footer{border-top:1px solid #e4ebf6;padding-top:10px;margin-top:10px}.setup-footer .dialog-error:empty{display:none}.setup-names>*{min-width:0}.location-selects>*{min-width:0}

/* Live company rankings stay beside the world, including fullscreen. */
.workspace-grid > .world-panel { grid-column: 1 / -1; }
.world-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; align-items: start; }
.world-sidebar { grid-column: 1 / -1; }
.world-scene { min-width: 0; }
.company-leaderboard { align-self: stretch; min-width: 0; background: #fff; border-left: 1px solid var(--border); padding: 22px 18px 14px; display: flex; flex-direction: column; }
.leaderboard-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.leaderboard-heading .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
.leaderboard-heading h3 { font-size: 17px; font-weight: 600; margin: 3px 0 0; }
#leaderboard-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
#leaderboard-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #9aabc4; }
#leaderboard-status[data-status='live'] { color: #168270; }
#leaderboard-status[data-status='live']::before { background: #1caf92; box-shadow: 0 0 0 3px #1caf9214; }
#leaderboard-status[data-status='offline'] { color: var(--danger); }
#leaderboard-status[data-status='offline']::before { background: var(--danger); }
.leaderboard-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 10px; }
.leaderboard-controls select { background: #f6f8fc; border: 1px solid var(--border); border-radius: 7px; color: #455e82; padding: 7px 5px; font-size: 10px; min-width: 0; max-width: 65%; }
#leaderboard-step { color: #798aa4; font-size: 9px; letter-spacing: .5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.leaderboard-summary { color: var(--blue); background: var(--blue-soft); border-radius: 7px; padding: 7px 10px; font-size: 11px; }
.leaderboard-list { list-style: none; margin: 10px -6px 0; padding: 0 6px; max-height: 450px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.leaderboard-row { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 8px; padding: 13px 7px; border-bottom: 1px solid #edf1f7; border-radius: 8px; font-variant-numeric: tabular-nums; }
.leaderboard-row.is-mine { background: #f1f5ff; border-color: #e0e8fd; }
.leaderboard-row.is-eliminated { background: #f8f9fb; color: #8994a5; }
.leaderboard-rank { font-size: 16px; letter-spacing: -.8px; font-weight: 600; color: #a3b0c4; padding-top: 1px; }
.leaderboard-row:first-child:not(.is-eliminated) .leaderboard-rank { color: #b78a37; }
.leaderboard-row.is-mine .leaderboard-rank { color: var(--blue); }
.leaderboard-company { min-width: 0; }
.leaderboard-name { display: flex; align-items: center; gap: 6px; }
.leaderboard-name i { background: var(--company-color); border-radius: 50%; width: 6px; height: 6px; flex-shrink: 0; }
.leaderboard-name strong { min-width: 0; font-size: 11px; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-badge { margin-left: auto; flex-shrink: 0; font-size: 8px; color: #7b8ea9; }
.is-mine .leaderboard-badge { color: var(--blue); }
.leaderboard-home { display: block; max-width: 100%; padding: 0; margin: 1px 0 8px; font-size: 9px; color: #8291a6; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.leaderboard-home:hover { color: var(--blue); text-decoration: underline; }
.leaderboard-values { display: flex; justify-content: space-between; gap: 10px; }
.leaderboard-values > span { min-width: 0; }
.leaderboard-values > span:last-child { text-align: right; }
.leaderboard-values small { display: block; font-size: 8px; color: #8594aa; }
.leaderboard-values strong { font-size: 13px; font-weight: 600; }
[data-metric='users'] .leaderboard-users, [data-metric='revenue'] .leaderboard-revenue { color: var(--company-color); }
.leaderboard-share { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.leaderboard-share > span { height: 3px; flex: 1; background: #eaf0f8; border-radius: 3px; overflow: hidden; }
.leaderboard-share i { display: block; height: 100%; background: var(--company-color); border-radius: inherit; }
.leaderboard-share small { color: #8997ab; font-size: 8px; white-space: nowrap; }
.leaderboard-note { margin: 12px 0 0; font-size: 9px; color: #8c9ab0; line-height: 1.7; }
#leaderboard-empty { font-size: 12px; color: var(--muted); padding: 20px 0; }
.world-expanded .world-layout, .world-expanded.world-details-open .world-layout { grid-template-columns: minmax(0,1fr) 300px; align-items: stretch; }
.world-expanded .company-leaderboard { min-height: 0; padding-top: 24px; overflow: hidden; }
.world-expanded .leaderboard-list { max-height: none; flex: 1; min-height: 0; }
.world-expanded .leaderboard-heading, .world-expanded .leaderboard-controls, .world-expanded .leaderboard-summary, .world-expanded .leaderboard-note { flex-shrink: 0; }
.world-expanded.world-details-open .world-sidebar { grid-column: auto; position: absolute; right: 0; top: 0; bottom: 0; width: 320px; max-width: 100%; z-index: 9; box-shadow: -12px 0 32px #20395920; }
@media (max-width: 800px) {
 .world-layout { grid-template-columns: minmax(0,1fr); }
 .company-leaderboard { border-left: 0; border-top: 1px solid var(--border); padding: 18px 20px; }
 .leaderboard-list { max-height: 360px; }
 .leaderboard-heading .eyebrow { display: none; }
 .leaderboard-controls { margin-top: 10px; }
 .leaderboard-row { padding-top: 10px; padding-bottom: 10px; }
 .world-expanded .world-layout, .world-expanded.world-details-open .world-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) minmax(180px,32%); }
 .world-expanded .company-leaderboard { padding: 10px 18px; }
 .world-expanded .leaderboard-heading h3 { margin: 0; font-size: 14px; }
 .world-expanded .leaderboard-controls { margin: 6px 0; }
 .world-expanded .leaderboard-summary { padding: 4px 8px; font-size: 10px; }
 .world-expanded .leaderboard-note { display: none; }
 .world-expanded .leaderboard-list { margin-top: 4px; }
 .world-expanded .world-stats { padding-top: 8px; }
 .world-expanded .world-stats strong { font-size: 22px; }
 .world-expanded .world-stat-small strong { font-size: 17px; }
 .world-expanded .globe-navigation { margin-top: 4px; margin-bottom: 4px; }
 .world-expanded #map-container { min-height: 85px; }
 .world-expanded .map-playback { padding-top: 8px; padding-bottom: 8px; }
}
@media (max-height: 550px) and (min-width: 650px) {
 .world-expanded .world-layout, .world-expanded.world-details-open .world-layout { grid-template-columns: minmax(0,1fr) 260px; grid-template-rows: minmax(0,1fr); }
 .world-expanded .company-leaderboard { border-top: 0; border-left: 1px solid var(--border); padding: 10px 14px; }
}

/* Five default rivals wrap naturally inside the scrollable setup. */
.default-bots { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
@media(max-width:550px){.default-bots { grid-template-columns: repeat(2,minmax(0,1fr)); }.default-bots strong { font-size: 10px; }}

/* Simplified: immediate, button-based business decisions. */
.decision-panel { scroll-margin-top: 90px; }
.control-mode { font-size: 10px; color: #577593; background: #f1f6ff; padding: 5px 8px; border-radius: 5px; white-space: nowrap; }
.decision-panel .ceo-description { line-height: 1.8; margin-bottom: 20px; }
.decision-group { min-width: 0; padding: 0; margin: 0 0 20px; border: 0; }
.decision-group legend { display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 10px; font-size: 10px; color: #9aaac2; letter-spacing: .4px; }
.decision-group legend span { color: #476184; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.decision-group legend small { margin-left: auto; font-size: 10px; letter-spacing: 0; }
.strategy-choices, .market-choices, .amount-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.decision-panel button { border: 1px solid #dde6f4; border-radius: 8px; color: #5c7292; background: #fff; min-height: 40px; font-size: 11px; padding: 8px; transition: background .15s,border-color .15s; }
.decision-panel button:hover:not(:disabled) { background: #f6f9ff; border-color: #9bb8f9; }
.decision-panel button.active { background: #edf3ff; border-color: #aac2ff; color: var(--blue); }
.decision-panel button:focus-visible { outline: 3px solid #8faeff; outline-offset: 3px; }
.decision-panel button:disabled { opacity: .55; cursor: default; }
.strategy-choices button { position: relative; text-align: left; padding: 12px 10px; min-height: 105px; }
.strategy-choices strong { display: block; margin: 8px 0 5px; font-size: 12px; }
.strategy-choices small { display: block; font-size: 10px; line-height: 1.6; color: #7688a2; }
.choice-symbol { display: inline-flex; width: 22px; height: 22px; color: #6d8dc5; }
.choice-symbol svg { width: 20px; height: 20px; }
.choice-check { display: none; position: absolute; right: 10px; top: 12px; font-size: 12px; }
.active .choice-check { display: block; }
.active .choice-symbol { color: var(--blue); }
.customer-choices { display: grid; gap: 6px; }
.customer-choices button { text-align: left; padding: 10px 12px; }
.customer-choices button.active::after { content: '✓'; float: right; }
.value-stepper { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; gap: 8px; align-items: center; padding: 5px; border: 1px solid #e1e9f6; border-radius: 10px; background: #f8faff; }
.value-stepper button { font-size: 21px; color: var(--blue); padding: 0; min-height: 38px; }
.value-stepper output { text-align: center; font-size: 20px; font-weight: 600; color: #294b7e; font-variant-numeric: tabular-nums; }
.amount-choices { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 7px; }
.amount-choices button { min-height: 34px; font-size: 11px; padding: 5px; }
.decision-hint { margin: 8px 0 0; font-size: 10px; line-height: 1.7; color: #8293ac; }
.decision-status { padding: 12px; min-height: 45px; border-radius: 8px; background: #f1f6ff; color: #526f9b; font-size: 11px; line-height: 1.7; }
.decision-status.is-error { color: #b55a3d; background: #fff5ef; }
@media (min-width: 551px) and (max-width: 980px) {
 #decision-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; align-items: start; }
 .decision-group:first-child { grid-column: 1 / -1; }
 .strategy-choices { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 550px) {
 .decision-shortcut { font-size: 11px; min-height: 36px; padding: 6px 9px; }
 .decision-panel button { min-height: 44px; }
 .strategy-choices button { min-height: 108px; }
 .decision-panel .ceo-label { font-size: 9px; letter-spacing: .7px; }
 .decision-panel .control-mode { font-size: 9px; }
}

/* Two pages share the match clock and one continuous world scene. */
#page-title:focus { outline: none; }
.page-navigation { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0 0 18px; }
.page-navigation a { display: flex; align-items: center; gap: 13px; padding: 16px 20px; border: 1px solid #e0e8f5; border-radius: 12px; background: #fff; color: #75849c; }
.page-navigation a.active { color: var(--blue); border-color: #b9cdff; background: #edf3ff; box-shadow: 0 3px 12px #315fe906; }
.page-navigation a:hover { border-color: #adc4f5; }
.page-nav-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: #f5f8fd; }
.active .page-nav-icon { background: #dfeaff; }
.page-navigation strong { display: block; font-size: 14px; }
.page-navigation small { display: block; margin-top: 2px; font-size: 10px; color: #8494ae; }
.page-nav-arrow { margin-left: auto; font-size: 17px; }
.game-page { min-width: 0; }
.world-data-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 22px; margin-top: 22px; align-items: start; }
.world-data-sidebar { display: grid; gap: 22px; min-width: 0; }
.world-page .competition-panel, .world-page .strategy-panel, .world-page .log-panel { grid-row: auto; }
.company-workspace { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 22px; align-items: start; }
.company-main { display: grid; gap: 22px; min-width: 0; }
.company-page .decision-panel, .company-page .talent-panel { grid-row: auto; }
.company-page .decision-panel { padding: 26px; }
.company-page .ceo-panel h2 { font-size: 27px; margin-top: 17px; }
.company-page .ceo-panel h2 br { display: none; }
.company-page #decision-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; align-items: start; }
.company-page .decision-group:first-child { grid-column: 1 / -1; }
.company-page .strategy-choices { grid-template-columns: repeat(4,minmax(0,1fr)); }
.company-page .strategy-choices button { padding: 12px 9px; min-height: 112px; }
.company-page .customer-choices button { min-height: 43px; }
.company-page .talent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mini-world-panel { position: sticky; top: 22px; overflow: hidden; background: linear-gradient(165deg,#fff 15%,#f7faff 85%); }
.mini-world-panel .panel-heading { padding: 21px 19px 13px; gap: 10px; }
.mini-world-panel h2 { font-size: 18px; margin-top: 5px; }
.mini-world-panel .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
.mini-world-panel .text-link { font-size: 11px; white-space: nowrap; }
.mini-world-status { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 12px; color: #8293aa; font-size: 10px; }
.mini-world-status strong { font-size: 9px; font-weight: 500; letter-spacing: 1px; }
#mini-world-state::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #9cacc3; margin-right: 6px; vertical-align: middle; }
#mini-world-state.is-live { color: #188574; }
#mini-world-state.is-live::before { background: #20ab94; }
#mini-world-state.is-offline { color: var(--danger); }
#mini-world-slot .map-container { width: 100%; height: 280px; min-height: 0; margin: 0; border-radius: 0; }
#mini-world-slot .globe-readout, #mini-world-slot .map-coordinate, #mini-world-slot .city-selection, #mini-world-slot .agent-view-caption, #mini-world-slot .map-corner { display: none; }
#mini-world-slot .map-label { display: none; }
#mini-world-slot .globe-tools { right: 12px; bottom: 12px; gap: 5px; }
#mini-world-slot .globe-tools button { width: 29px; height: 29px; font-size: 15px; }
.mini-world-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 18px; font-size: 9px; color: #8999b1; line-height: 1.8; }
@media (min-width: 981px) and (max-width: 1200px) {
 .company-workspace { grid-template-columns: minmax(0,1fr) 280px; gap: 18px; }
 .company-page .decision-panel { padding: 20px; }
 .company-page .strategy-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
 #mini-world-slot .map-container { height: 250px; }
}
@media (max-width: 980px) {
 .company-workspace, .world-data-grid { grid-template-columns: minmax(0,1fr); }
 .mini-world-panel { grid-row: 1; position: static; }
 #mini-world-slot .map-container { height: 250px; }
 .company-main { grid-row: 2; }
 .world-data-sidebar { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 550px) {
 .page-navigation { gap: 8px; margin-bottom: 14px; }
 .page-navigation a { gap: 8px; padding: 11px 10px; }
 .page-navigation strong { font-size: 12px; }
 .page-navigation small { font-size: 8px; }
 .page-nav-icon { width: 27px; height: 30px; flex-shrink: 0; }
 .page-nav-icon svg { width: 16px; height: 16px; }
 .page-nav-arrow { display: none; }
 .company-workspace, .company-main, .world-data-grid, .world-data-sidebar { gap: 18px; }
 .company-page .decision-panel { padding: 23px 20px; }
 .company-page #decision-controls { grid-template-columns: minmax(0,1fr); }
 .company-page .strategy-choices, .company-page .talent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .company-page .talent-grid { grid-template-columns: minmax(0,1fr); }
 .company-page .ceo-panel h2 { font-size: 25px; }
 .company-page .ceo-panel h2 br { display: inline; }
 .mini-world-panel .panel-heading { padding: 17px 18px 10px; }
 #mini-world-slot .map-container { height: 220px; }
 .mini-world-caption { font-size: 9px; }
 .mini-world-caption .text-link { min-height: 30px; }
}
.company-playback { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.company-clock { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; font-variant-numeric: tabular-nums; }
.company-clock > span:first-child { color: #8b9bb3; font-size: 9px; letter-spacing: 1.2px; }
.company-clock > strong { font-size: 15px; font-weight: 600; letter-spacing: .5px; color: #315077; }
.company-clock small { color: #a1afc3; font-size: 10px; font-weight: 400; }
#company-clock-state { color: #7c8fa9; font-size: 11px; }
.company-time-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.company-time-buttons .button { gap: 8px; min-width: 145px; min-height: 44px; }
.company-time-buttons strong { font-size: 14px; }
.company-time-buttons .button > span:last-child { font-size: 11px; }
@media (max-width: 980px) {
 .company-clock { gap: 7px 10px; }
 .company-clock > span:first-child { display: none; }
 #company-clock-state { width: 100%; }
}
@media (max-width: 550px) {
 .company-playback { flex-direction: column; align-items: stretch; padding: 15px; gap: 12px; margin-bottom: 18px; }
 .company-clock { justify-content: space-between; }
 #company-clock-state { width: auto; font-size: 10px; }
 .company-time-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
 .company-time-buttons .button { min-width: 0; gap: 6px; padding: 9px 10px; }
 .company-time-buttons .button > span:last-child { font-size: 10px; }
}
.world-expanded #world-map-slot { display: flex; flex: 1 1 0; min-height: 0; }

/* Key figures remain visible while choosing strategies and hiring. */
.company-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin-bottom: 22px; border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.company-overview article { min-width: 0; padding: 20px 22px; border-right: 1px solid #eaf0f8; }
.company-overview article:last-child { border-right: 0; background: #f8faff; }
.overview-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: #6d809d; }
.overview-label svg { width: 16px; height: 16px; color: #8b9db8; }
.company-overview article > strong { display: block; margin: 8px 0; color: #294c7c; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.company-overview article > small { display: block; font-size: 10px; line-height: 1.6; color: #8697af; }
.talent-info .talent-salary { display: block; color: #496c9f; font-size: 11px; margin-top: 6px; }
.talent-info .talent-signing { display: block; color: #8a9bb3; font-size: 10px; margin-top: 2px; }
@media (max-width: 980px) {
 .company-overview article { padding: 17px 15px; }
 .company-overview article > strong { font-size: 25px; }
}
@media (max-width: 650px) {
 .company-overview { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 18px; }
 .company-overview article:nth-child(2) { border-right: 0; }
 .company-overview article:nth-child(-n+2) { border-bottom: 1px solid #eaf0f8; }
 .company-overview article > strong { font-size: 26px; }
 .overview-label { font-size: 10px; }
}

/* Registrations and paid subscriptions are distinct company metrics. */
.world-page > .metrics, .company-overview { grid-template-columns: repeat(5,minmax(0,1fr)); }
.company-overview article > strong { font-size: 26px; }
.competitor-registered { font-size: 10px; color: #899ab3; margin: 4px 0 9px; }
.billing-version-notice a { text-decoration: underline; font-weight: 600; }
.billing-version-notice small { display: block; margin-top: 5px; }
@media (min-width: 651px) and (max-width: 1100px) {
 .world-page > .metrics, .company-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 650px) {
 .world-page > .metrics, .company-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .world-page > .metrics > :last-child, .company-overview article:last-child { grid-column: 1 / -1; }
 .company-overview article:nth-child(4) { border-right: 0; }
 .company-overview article:nth-child(n+3) { border-top: 1px solid #eaf0f8; }
}

/* Make weekly decisions and staffing costs visible together. */
.budget-explainer { grid-column: 1 / -1; background: #f5f8ff; border: 1px solid #dfe8fa; border-radius: 12px; padding: 19px; margin: 4px 0 18px; }
.budget-explainer h3 { font-size: 15px; margin: 0 0 7px; color: #294b7a; }
.budget-explainer p { font-size: 11px; color: #7489a8; line-height: 1.7; margin: 7px 0 12px; }
.allocation-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.allocation-cards article { background: #fff; border-radius: 8px; padding: 12px; min-width: 0; }
.allocation-cards span { font-size: 11px; color: #617897; }
.allocation-cards strong { display: block; font-size: 20px; color: #315786; margin: 5px 0; }
.allocation-cards small { display: block; color: #8191a8; font-size: 10px; line-height: 1.6; }
.cost-equation { margin-top: 16px; }
.cost-equation > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 12px; color: #647d9e; padding: 7px 0; }
.cost-equation strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-equation .cost-total { border-top: 1px solid #dbe5f7; margin-top: 4px; color: #315fe9; font-size: 14px; }
.budget-explainer .last-week-costs { margin-bottom: 0; color: #496789; }
.workforce-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; align-items: start; }
.workforce-row .talent-grid { grid-template-columns: minmax(0,1fr); }
.workforce-row .talent:nth-child(n) { border-bottom: 1px solid var(--border); }
.workforce-row .talent:last-child { border-bottom: 0; }
.talent-refresh { padding: 0 24px; font-size: 12px; color: #315fe9; margin: 0 0 7px; }
.talent-explainer,.team-explainer { padding: 0 24px; font-size: 11px; line-height: 1.75; color: #8293aa; margin: 0 0 10px; }
.team-total { font-size: 11px; color: #496b99; text-align: right; }
#departments { padding: 0 20px 20px; display: grid; gap: 12px; }
.department-card { border: 1px solid #e1e9f6; border-radius: 10px; padding: 16px; min-width: 0; }
.department-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.department-heading h3 { font-size: 14px; margin: 0; }
.department-heading h3 span { font-size: 11px; font-weight: 400; color: #8395ae; margin-left: 6px; }
.department-heading > strong { font-size: 14px; color: #3b6091; }
.department-heading small { font-weight: 400; font-size: 10px; }
.department-benefit { font-size: 12px; color: #5b7598; margin: 9px 0; }
.department-benefit b { color: #228876; }
.department-benefit > span { display: block; font-size: 10px; color: #91a0b5; margin-top: 3px; }
.department-card details { font-size: 11px; color: #6981a2; margin: 9px 0; }
.department-card summary { cursor: pointer; }
.department-card ul { list-style: none; padding: 0; margin: 8px 0; }
.department-card li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.department-card li strong { white-space: nowrap; font-weight: 500; }
.department-card li small { color: #8b9bb2; }
.department-project { border-top: 1px solid #edf1f8; padding-top: 11px; }
.department-project > div { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #496789; }
.department-project progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 4px; overflow: hidden; margin: 9px 0; background: #eaf0fb; accent-color: #6286ef; }
.department-project progress::-webkit-progress-bar { background: #eaf0fb; }
.department-project progress::-webkit-progress-value { background: #6286ef; border-radius: 4px; }
.department-project p,.project-completed { display: block; font-size: 10px; line-height: 1.7; color: #8395ad; margin: 0; }
.project-completed { color: #2b8d7a; margin-top: 5px; }
.strategy-detail strong { text-align: right; overflow-wrap: anywhere; }
@media(max-width: 760px) { .workforce-row { grid-template-columns: minmax(0,1fr); } }
@media(max-width: 520px) {
 .budget-explainer { padding: 14px; }
 .allocation-cards { grid-template-columns: minmax(0,1fr); gap: 6px; }
 .allocation-cards article { display: grid; grid-template-columns: 1fr auto; padding: 10px; }
 .allocation-cards strong { font-size: 17px; margin: 0; }
 .allocation-cards small { grid-column: 1 / -1; }
 .team-panel .panel-heading { gap: 10px; }
 .team-total { max-width: 130px; line-height: 1.6; }
 #departments { padding: 0 15px 15px; }
 .department-card { padding: 12px; }
}

.company-decisions-row { grid-column: 1 / -1; display: grid; grid-template-columns: inherit; gap: inherit; align-items: start; min-width: 0; }

.decision-version-notice { background: #fff4e3; border: 1px solid #efdab5; border-radius: 9px; padding: 13px 15px; color: #916427; font-size: 12px; line-height: 1.8; margin: 0 0 20px; }
.decision-version-notice a { color: #315fe9; text-decoration: underline; font-weight: 600; margin-left: 5px; }
.decision-version-notice > span { display: block; font-size: 11px; }

/* Bonuses belong to the current company and its project groups. */
.team-bonus { margin: 0 20px 18px; padding: 15px; border: 1px solid #dce7fb; border-radius: 10px; background: #f5f8ff; }
.team-bonus-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; font-size: 12px; color: #496a95; }
.team-bonus-heading > span { font-size: 10px; }
.team-bonus .button { width: 100%; min-height: 42px; font-size: 12px; }
.team-bonus p { font-size: 11px; line-height: 1.7; color: #547299; margin: 8px 0; }
.team-bonus > small { display: block; font-size: 10px; color: #8295af; line-height: 1.7; }
.team-bonus .bonus-feedback { margin-bottom: 0; color: #287d71; overflow-wrap: anywhere; }
.bonus-version-notice a { text-decoration: underline; color: #315fe9; }
.department-card .staff-bonus { display: block; font-size: 9px; color: #7e95ae; text-align: right; }
.department-project .project-bonus { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 12px; }
.project-bonus .button { font-size: 11px; min-height: 36px; padding: 8px 11px; }
.project-bonus > small { font-size: 10px; color: #7890ad; }
@media(max-width:520px){ .team-bonus { margin: 0 15px 15px; padding: 12px; } }

.leaderboard-primary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 0 7px; }
.leaderboard-primary small { color: #7b8eaa; font-size: 9px; }
.leaderboard-primary strong { color: var(--company-color); font-size: 17px; font-weight: 600; }
.leaderboard-controls select { max-width: 72%; }
.company-subscriptions{margin:-4px 0 22px;padding:16px 20px;border:1px solid #dfe7f3;border-radius:14px;background:#f6f9ff;color:#536a8b}
.company-subscriptions>div{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.company-subscriptions strong{color:#315fe9}.company-subscriptions p{font-size:13px;line-height:1.9;margin:9px 0 4px}.company-subscriptions small{font-size:12px;line-height:1.7}
.subscription-panel{margin-bottom:24px;padding:0 24px 24px}.subscription-panel>.panel-heading{padding-left:0;padding-right:0;padding-bottom:20px}.subscription-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.subscription-stats article{display:flex;flex-direction:column;gap:8px;padding:18px;background:#f6f9ff;border-radius:12px}.subscription-stats span{font-size:13px;color:#60728d}.subscription-stats strong{font-size:27px;color:#203b63}.subscription-stats small{font-size:12px;color:#637995}
.subscription-explainer,.subscription-details p{font-size:13px;line-height:1.9;color:#657893;margin:16px 0 0}.subscription-details{margin-top:16px}.subscription-details summary{cursor:pointer;font-size:13px;color:#315fe9}.subscription-table-wrap{overflow-x:auto;margin-top:16px}.subscription-details table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}.subscription-details th,.subscription-details td{padding:12px 10px;border-bottom:1px solid #e5ebf4;text-align:right}.subscription-details th:first-child{text-align:left}.subscription-details thead{color:#647a97}
@media(max-width:600px){.subscription-panel{padding:0 18px 18px}.subscription-stats{grid-template-columns:1fr;gap:10px}.subscription-stats article{display:grid;grid-template-columns:1fr auto;align-items:center;padding:14px}.subscription-stats strong{font-size:24px;grid-row:span 2}.subscription-stats small{grid-column:1}.subscription-panel>.panel-heading{align-items:flex-start;gap:12px;flex-direction:column}.company-subscriptions{padding:14px}}

.company-subscriptions .acquisition-funnel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 12px}
.acquisition-funnel article{min-width:0;padding:14px;background:#fff;border:1px solid #e3eaf5;border-radius:10px;display:flex;flex-direction:column;gap:8px}
.acquisition-funnel article>span{font-size:12px}.acquisition-funnel strong{font-size:22px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.acquisition-funnel small{color:#75869f}
.acquisition-details summary,.service-cost-details summary{cursor:pointer;font-size:12px;color:#315fe9}.acquisition-details{margin-top:14px}.service-cost-details{margin:14px 0;color:#657893;font-size:12px;line-height:1.8}
.service-cost-details dl{margin:10px 0}.service-cost-details dl>div{display:flex;justify-content:space-between;gap:12px}.service-cost-details dd{margin:0;font-variant-numeric:tabular-nums}
@media(max-width:700px){.company-subscriptions .acquisition-funnel{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.acquisition-funnel article{padding:12px}.acquisition-funnel strong{font-size:20px}}

/* Replay server (replay_server.py): notice, intro dialog and read-only decisions. */
.replay-banner { margin: 16px max(36px, calc((100% - 1648px) / 2)) 0; padding: 12px 16px; display: flex; align-items: center; gap: 14px; border: 1px solid #d5e0ff; border-radius: 14px; background: var(--blue-soft); font-size: 14px; line-height: 1.5; }
.replay-banner[hidden] { display: none; }
.replay-banner p { flex: 1; margin: 0; }
.replay-banner a, .replay-trial a { color: var(--blue); font-weight: 600; overflow-wrap: anywhere; }
.replay-badge { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; }
.replay-facts { margin: 14px 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.replay-trial { margin: 16px 0; padding: 14px 16px; border: 1px solid #f3dcc0; border-radius: 14px; background: #fff7ec; font-size: 14px; line-height: 1.6; }
.replay-trial p { margin: 6px 0 0; }
/* NOVA's recorded choices stay at full strength (replay-decisions.js), also once the replay has ended and every
   button is disabled; only the action buttons fade. */
body.is-replay :is(#decision-panel [data-adjust], .hire-button, #bonus, .project-bonus .button, #migration-form, #surrender, #focus-region, .ops-button, .ops-hub) { opacity: .55; }
body.is-replay .decision-panel button:disabled { opacity: 1; }
body.is-replay .decision-panel button:hover:not(:disabled) { background: #fff; border-color: #dde6f4; }
body.is-replay .decision-panel button.active:hover:not(:disabled) { background: #edf3ff; border-color: #aac2ff; }
body.is-replay :is(#decision-panel, #talents, .team-bonus, .project-bonus, #migration-form, .ops-hub) :is(button, input, select), body.is-replay :is(#surrender, #focus-region, .ops-button) { cursor: not-allowed; }
.replay-tag { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: #eef3ff; color: var(--blue); font-size: 10px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.replay-tag::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body.is-replay .team-bonus-heading { flex-wrap: wrap; align-items: center; }
.team-bonus-heading .replay-tag { margin-right: auto; }
.replay-change-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: -8px 0 20px; padding: 10px 12px; border: 1px solid #e1e9ff; border-radius: 10px; background: #f5f8ff; color: #3c5680; font-size: 12px; line-height: 1.5; }
.replay-change-note[hidden] { display: none; }
#talent-change-note { margin: 0 24px 12px; }
.replay-change-label { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.replay-change-week, .replay-change-role { color: #6f82a0; font-variant-numeric: tabular-nums; }
.replay-change-item { min-width: 0; color: #22385c; font-weight: 600; overflow-wrap: anywhere; }
@keyframes nova-change { 0% { box-shadow: 0 0 0 0 rgba(49,95,233,.55); background-color: #dde7ff; } 65% { box-shadow: 0 0 0 9px rgba(49,95,233,0); } 100% { box-shadow: 0 0 0 0 rgba(49,95,233,0); } }
@keyframes nova-change-soft { 0% { box-shadow: 0 0 0 0 rgba(49,95,233,.4); } 65% { box-shadow: 0 0 0 7px rgba(49,95,233,0); } 100% { box-shadow: 0 0 0 0 rgba(49,95,233,0); } }
.nova-changed { animation: nova-change 1.3s ease-out 2; }
:is(.panel, .team-bonus).nova-changed { animation-name: nova-change-soft; }
@media (prefers-reduced-motion: reduce) { .nova-changed { animation: none; outline: 2px solid #8fb0ff; outline-offset: 2px; } }
@media (max-width: 650px) { #talent-change-note { margin: 0 18px 12px; } }
@media (min-width: 1600px) { .replay-banner { margin: 16px max(44px, calc((100% - 1632px) / 2)) 0; } }
@media (max-width: 1380px) { .replay-banner { margin: 16px 26px 0; } }
@media (max-width: 650px) { .replay-banner { margin: 12px 16px 0; flex-wrap: wrap; gap: 8px 12px; } .replay-banner p { flex-basis: 100%; order: 2; } .replay-banner .button { margin-left: auto; } }

/* Display language (i18n.js): English by default, Chinese on request. */
html.i18n-pending body { visibility: hidden; }
.language-switch { display: inline-flex; flex: none; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.language-switch button { min-height: 28px; padding: 4px 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.language-switch button.selected { background: var(--blue); color: #fff; }
.dialog-heading .language-switch { margin-left: auto; }
html[lang="en"] .replay-trial [lang="en"] { display: none; }

/* Company operations (operations.js): 招人 · J and 拉投资 · I under the Company overview. */
.operations-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; align-items: stretch; margin-bottom: 22px; }
.ops-card { position: relative; display: flex; flex-direction: column; padding: 22px 24px 16px; min-width: 0; container-type: inline-size; }
.ops-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg,#189b91,#9ad9ce); }
.ops-raise::before { background: linear-gradient(90deg,#c8961e,#f1d791); }
.ops-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ops-key, .ops-button kbd { display: inline-grid; place-items: center; font: 700 13px/1 var(--font); font-variant-numeric: normal; }
.ops-key { flex: none; min-width: 32px; height: 32px; padding: 0 7px; border: 1px solid #cfd9ea; border-bottom-width: 3px; border-radius: 8px; background: #fff; color: var(--text); }
.ops-title { min-width: 0; }
.ops-title .eyebrow { font-size: 8px; letter-spacing: 1.5px; margin-bottom: 3px; }
.ops-title h2 { font-size: 20px; line-height: 1.3; }
.ops-meter { margin-left: auto; width: 188px; flex: none; }
.ops-meter-label { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; font-size: 11px; color: #6d809d; white-space: nowrap; }
.ops-meter-label strong { font-size: 18px; letter-spacing: -.4px; color: var(--text); }
.ops-meter-track { height: 7px; margin-top: 6px; border-radius: 99px; background: #e4ebfa; overflow: hidden; }
.ops-meter-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,var(--blue),#6b8cff); transition: width .35s; }
.ops-meter[data-level='warn'] .ops-meter-track { background: #f6e7da; }
.ops-meter[data-level='warn'] .ops-meter-track i { background: #d98449; }
.ops-meter[data-level='full'] .ops-meter-track { background: #f8e2e5; }
.ops-meter[data-level='full'] .ops-meter-track i { background: linear-gradient(90deg,#d98449,#d75770); }
.ops-meter[data-level='full'] .ops-meter-label strong { color: #c2484f; }
.stage-pill, .ops-stage { display: inline-flex; align-items: center; flex: none; white-space: nowrap; font-weight: 700; color: #a0700a; background: #fff7e6; border: 1px solid #f1dcae; border-radius: 999px; }
.ops-stage { margin-left: auto; font-size: 12px; padding: 4px 12px; }
.stage-pill { font-size: 9px; line-height: 1.6; padding: 0 6px; }
:is(.stage-pill,.ops-stage)[data-stage='0'] { color: #6f7f96; background: #f3f5f9; border-color: #e1e7f0; }
:is(.stage-pill,.ops-stage)[data-stage='6'] { color: #7a5200; background: linear-gradient(120deg,#fff3d8,#fde3a6); border-color: #e3bd63; }
.ops-explainer { margin: 12px 0 14px; font-size: 11px; line-height: 1.75; color: #8293aa; }
.ops-body { flex: 1; min-width: 0; }
.ops-result { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 9px 12px; border-radius: 9px; background: #f5f8fd; font-size: 12px; line-height: 1.6; color: #5a7091; }
.ops-result[data-tone='quiet'] { color: #7c8da7; }
.ops-when { flex: none; margin-top: 1px; padding: 0 7px; border: 1px solid #dfe7f3; border-radius: 6px; background: #fff; font-size: 10px; line-height: 1.7; color: #6f83a1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ops-of { font-weight: 600; color: #3f5a80; }
.ops-result[data-tone='good'] .ops-of { color: #1d8577; }
/* Facts wrap freely; the "·" before the first fact of every line falls in the clipped gutter. */
.ops-facts { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; row-gap: 2px; margin-left: -15px; clip-path: inset(0 0 0 15px); }
.ops-facts > * { position: relative; padding-left: 15px; }
.ops-facts > *::before { content: '·'; position: absolute; left: 5px; color: #a8b5c8; font-weight: 400; }
.ops-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 16px 0 8px; font-size: 11px; font-weight: 600; color: #486688; }
.ops-subhead small { font-size: 10px; font-weight: 400; color: #8b9bb2; }
.ops-delta { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 9px; border-radius: 999px; background: #e9f6f3; color: #1d7a6e; font-size: 10px; font-weight: 400; white-space: nowrap; }
.ops-delta b { font-size: 11px; }
.ops-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.ops-person { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border: 1px solid #e6edf7; border-radius: 10px; background: #fff; }
.ops-avatar { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: 12px; font-weight: 600; background: #eaf0ff; color: var(--blue); }
.ops-person.is-new .ops-avatar::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #1caf92; box-shadow: 0 0 0 2px #fff; }
.ops-person[data-department='research'] .ops-avatar { background: #f0ecfb; color: #6d58c4; }
.ops-person[data-department='operations'] .ops-avatar { background: #fcf0e2; color: #b0702a; }
.ops-person-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ops-person-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: #6d809d; }
.ops-person-name strong { color: var(--text); }
.ops-role { font-size: 10px; color: #8293aa; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ops-person-side { flex: none; display: grid; justify-items: end; gap: 3px; }
.ops-person-side small { font-size: 10px; color: #496c9f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ops-tag { padding: 0 6px; border-radius: 999px; font-size: 9px; line-height: 1.7; background: #f1f4f8; color: #627089; white-space: nowrap; }
.ops-tag[data-source='referral'] { background: #edf2ff; color: #3d63d6; }
.ops-tag:is([data-source='fan'],[data-source='user'],[data-source='customer']) { background: #e8f6f2; color: #1d7a6e; }
.ops-none { margin: 0; padding: 14px; border: 1px dashed #dbe4f1; border-radius: 10px; font-size: 11px; color: #8293aa; text-align: center; }
.ops-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf1f7; }
.ops-summary { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 12px; color: #5f7596; }
.ops-total strong { font-size: 17px; color: var(--text); letter-spacing: -.3px; }
.ops-split { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: #7a8ca7; }
.ops-split > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ops-split i { width: 7px; height: 7px; border-radius: 2px; background: #315fe9; }
.ops-split [data-department='research'] i { background: #8d7cdc; }
.ops-split [data-department='operations'] i { background: #e2ac73; }
.ops-split b { font-weight: 600; color: #496789; }
.ops-button { flex: none; margin-left: auto; gap: 9px; min-height: 42px; padding: 9px 16px 9px 10px; font-size: 13px; font-weight: 600; }
.ops-button kbd { min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; border: 1px solid #ffffff6b; border-bottom-width: 2px; background: #ffffff26; font-size: 11px; color: inherit; }
.ops-button.is-blocked { background: var(--blue-soft); border-color: #d5e0ff; color: var(--blue); box-shadow: none; }
.ops-button.is-blocked:hover:not(:disabled) { background: #e1eaff; border-color: #b5c8ff; }
.ops-button.is-blocked kbd { border-color: #c4d3fb; background: #fff; }
.ops-button[aria-busy='true'] { cursor: progress; }
.ops-button.is-flashing { animation: ops-flash 1.3s ease-out; }
.ops-raise .ops-button.is-flashing { animation-name: ops-flash-gold; }
@keyframes ops-flash { 0% { box-shadow: 0 0 0 0 #315fe980; } 100% { box-shadow: 0 0 0 10px #315fe900; } }
@keyframes ops-flash-gold { 0%,40% { box-shadow: 0 0 0 3px #c8961e99; } 100% { box-shadow: 0 0 0 12px #c8961e00; } }
.ops-hub { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-size: 11px; color: #6d809d; }
.ops-hub > span { white-space: nowrap; }
.ops-hub select { min-width: 0; width: 100%; max-width: 250px; padding: 9px 10px; border: 1px solid #dce5f3; border-radius: 8px; background: #fff; color: #2f4a70; font-size: 12px; }
.ops-status { display: flex; flex-wrap: wrap; justify-content: flex-end; min-height: 17px; margin: 8px 0 0; font-size: 10px; line-height: 1.7; color: #8293aa; }
.ops-status span + span::before { content: '·'; margin: 0 6px; color: #b3bfd0; }
.ops-status [data-tone='warn'] { color: #c2484f; font-weight: 600; }
.ops-status [data-tone='replay'] { color: var(--blue); font-weight: 600; }
.ops-figures { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ops-figures > div { min-width: 0; padding: 10px 12px; border-radius: 10px; background: #f8f9fc; }
.ops-figures span { display: block; font-size: 11px; color: #6d809d; }
.ops-figures strong { display: block; margin-top: 2px; font-size: 24px; letter-spacing: -.6px; color: #294c7c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-figures strong small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: #6d809d; }
.ops-figures + .ops-result { margin-top: 12px; }
.ops-split-label { color: #8b9bb2; }
.ops-next { margin: 10px 0 0; font-size: 12px; color: #5b7598; }
.ops-captable-bar { display: flex; gap: 2px; height: 10px; }
.ops-captable-bar i { display: block; min-width: 3px; flex-basis: 0; }
.ops-captable-bar i:first-child { border-radius: 4px 0 0 4px; }
.ops-captable-bar i:last-child { border-radius: 0 4px 4px 0; }
.ops-captable-bar i:only-child { border-radius: 4px; }
.ops-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 10px; color: #6d809d; }
.ops-legend li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ops-legend i { width: 8px; height: 8px; border-radius: 2px; }
.ops-legend b { font-weight: 600; color: #3f5a80; font-variant-numeric: tabular-nums; }
.ops-rounds { list-style: none; margin: 0; padding: 0; }
.ops-round { position: relative; display: grid; grid-template-columns: 12px 64px 58px minmax(0,1fr) auto; align-items: center; column-gap: 8px; min-height: 30px; padding: 4px 0; font-size: 11px; color: #6d809d; }
.ops-round + .ops-round { border-top: 1px solid #f1f4f9; }
.ops-round:not(:last-child)::after { content: ''; position: absolute; left: 5px; top: calc(50% + 6px); bottom: calc(-50% + 6px); width: 1px; background: #e6d6b0; }
.ops-round > i { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--stage,#c9d3e2); background: #fff; }
.ops-round.is-closed > i { background: var(--stage); }
.ops-round > b { font-weight: 600; color: #7a5b16; white-space: nowrap; }
.ops-round-week { white-space: nowrap; font-variant-numeric: tabular-nums; color: #8293aa; }
.ops-round-place { display: flex; min-width: 0; overflow: hidden; white-space: nowrap; }
.ops-round-place span:first-child { overflow: hidden; text-overflow: ellipsis; }
.ops-round-place span + span { flex: none; color: #8b9bb2; }
.ops-round-place span + span::before { content: '·'; margin: 0 5px; color: #b9c3d1; }
.ops-round > strong { justify-self: end; font-size: 13px; font-weight: 600; letter-spacing: -.2px; color: #2b3f5e; font-variant-numeric: tabular-nums; }
.ops-round.is-more { grid-template-columns: 12px minmax(0,1fr); color: #8293aa; }
.ops-round.is-more > i { border-style: dotted; }
.ops-rounds-key { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 0; font-size: 10px; color: #8293aa; }
.ops-rounds-key span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ops-rounds-key i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #ad770c; background: #fff; }
.ops-rounds-key i.is-closed { background: #ad770c; }
.ops-pitch { margin-top: 12px; padding: 9px 12px; border-left: 3px solid #c8961e; border-radius: 0 9px 9px 0; background: #fbf8f0; }
.ops-pitch[data-tone='quiet'] { border-left-color: #c6d0de; background: #f6f8fb; }
.ops-pitch-line { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.6; color: #5a7091; }
.ops-pitch-line strong { color: #294c7c; }
.ops-backers { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.ops-backers li { display: inline-flex; gap: 6px; padding: 1px 8px; border: 1px solid #ece2c9; border-radius: 999px; background: #fff; font-size: 10px; color: #6b7a90; white-space: nowrap; }
.ops-backers li b { color: #3f5a80; font-weight: 600; }
.ops-backers li.is-more { border-style: dashed; }
.ops-empty { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px dashed #d6e0ef; border-radius: 12px; background: #f8faff; font-size: 12px; line-height: 1.75; color: #607593; }
.ops-empty-icon { color: #7f97c2; }
.ops-empty-icon svg { width: 18px; height: 18px; }
.ops-card.is-pulsing { animation: ops-pulse-green 1.3s ease-out; }
.ops-card.is-pulsing[data-pulse='gold'] { animation-name: ops-pulse-gold; }
@keyframes ops-pulse-green { 0% { box-shadow: 0 0 0 0 #189b9155; } 100% { box-shadow: 0 0 0 14px #189b9100; } }
@keyframes ops-pulse-gold { 0% { box-shadow: 0 0 0 0 #c8961e66; } 100% { box-shadow: 0 0 0 14px #c8961e00; } }
.leaderboard-name .stage-pill { margin-left: 2px; }
.leaderboard-values > span:nth-child(2) { text-align: center; }
/* Every value and label stays on one line; the team limit follows the head count in a smaller size, and a
   column that still does not fit moves under the others instead of breaking inside a number. */
.leaderboard-values { flex-wrap: wrap; row-gap: 4px; }
.leaderboard-values small, .leaderboard-values strong { white-space: nowrap; }
.leaderboard-values .leaderboard-cap { font-size: 10px; font-weight: 500; color: #5a6e8f; }  /* 4.7:1 on the blue "mine" row */
.leaderboard-row.is-eliminated .leaderboard-cap { color: inherit; }
html[lang='en'] #leaderboard-note span + span::before { content: ' '; }
.competitor-header .stage-pill { margin-left: 2px; }
.competitor-team { font-size: 10px; color: #899ab3; margin: -5px 0 9px; font-variant-numeric: tabular-nums; }
#result-table th .result-stage { display: block; width: fit-content; margin: 4px 0 0 auto; font-size: 9px; }
.toast[data-tone='good'], .toast[data-tone='gold'], .toast[data-tone='bad'] { border-left: 4px solid #189b91; }
.toast[data-tone='gold'] { border-left-color: #c8961e; }
.toast[data-tone='bad'] { border-left-color: #d75770; }
.toast > strong { display: block; font-weight: 600; }
.toast > span { display: block; margin-top: 2px; font-size: 12px; opacity: .85; }
@media (max-width: 1180px) { .ops-card { padding: 20px 20px 14px; } }
/* Below 981px the rail and gutters leave each side-by-side card under ~340px, so the cards stack. */
@media (max-width: 980px) { .operations-row { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 550px) {
 .operations-row { gap: 18px; margin-bottom: 18px; }
 .ops-card { padding: 20px 16px 14px; }
 .ops-heading { gap: 10px; }
 .ops-title h2 { font-size: 19px; }
 .ops-meter { width: 140px; }
 .ops-meter-label strong { font-size: 16px; }
 .ops-actions { flex-wrap: wrap; }
 .ops-actions .ops-button { width: 100%; }
 .ops-hub { flex-basis: 100%; }
 .ops-hub select { max-width: none; }
 .ops-status { justify-content: flex-start; }
 .ops-figures strong { font-size: 21px; }
}
/* Narrow cards (phones, and side by side just above 980px): one person per row, two-line rounds. */
@container (max-width: 440px) {
 .ops-people { grid-template-columns: minmax(0,1fr); }
 .ops-round { grid-template-columns: 12px auto minmax(0,1fr) auto; row-gap: 1px; padding: 5px 0; }
 .ops-round-week { justify-self: start; }
 .ops-round-place { grid-column: 2 / -1; grid-row: 2; font-size: 10px; }
 .ops-round:not(:last-child)::after { top: 18px; bottom: -12px; }
}
.department-card li.recruit-group { display: block; padding: 8px 0 2px; border-top: 1px dashed #e6ecf5; }
.recruit-group summary { color: #5f7899; }
.recruit-group summary small { color: #8b9bb2; }
.recruit-group summary > strong { float: right; font-weight: 500; color: #3b6091; }
.recruit-group ul { margin: 6px 0 0 14px; }
.recruit-group li { padding: 4px 0; }
