/* ============================================================================
   shell.css — the 2.0 frame: one dark top bar + one light working surface.
   Based on the first prototype (dark "MERIDIAN REIT" bar, text tabs,
   light map surface).

   Control-kind rule (design doc B.12a):
     NAVIGATION  = plain text tabs with an underline, only in the dark bar
     VIEW CONTROL = small segmented pills, only inside a screen (map panel)
     ACTION       = solid filled buttons
   ========================================================================== */

body { background: #eef2f7; }

/* ---------------------------------------------------------------- top bar */
#topbar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 22px;
  height: 58px; padding: 0 18px;
  background: linear-gradient(180deg, #0e2233, #0a1420);
  color: #e6edf5;
  border-bottom: 1px solid #06101a;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
#topbar .tb-brand { min-width: 170px; line-height: 1.15; }
#topbar .tb-co  { font-weight: 800; letter-spacing: 1.4px; font-size: 14px; color: #fff; text-transform: uppercase; }
#topbar .tb-sub { font-size: 11.5px; color: #8aa0b6; margin-top: 2px; }

/* navigation: text only, underline marks the current screen */
#topbar .tb-nav { display: flex; align-self: stretch; gap: 2px; }
#topbar .tb-tab {
  background: none; border: none; cursor: pointer;
  padding: 0 12px; height: 100%;
  font: inherit; font-size: 13.5px; font-weight: 600; color: #8aa0b6;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
#topbar .tb-tab:hover { color: #dbe6f1; }
#topbar .tb-tab.on    { color: #fff; border-bottom-color: #4ea1ff; }

/* the five core numbers */
#topbar .tb-hud { display: flex; gap: 20px; margin-left: auto; }
#topbar .hud { line-height: 1.1; text-align: right; white-space: nowrap; }
#topbar .hud .k { font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: #6f869d; }
#topbar .hud .v { font-size: 15px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
#topbar .hud .s { font-size: 10.5px; font-weight: 600; margin-left: 4px; }
#topbar .up   { color: #4cd38a; }
#topbar .down { color: #ff8a65; }
#topbar .hud .v.sit-crisis      { color: #ff6b5a; }
#topbar .hud .v.sit-distress    { color: #ffb347; }
#topbar .hud .v.sit-stable      { color: #cfe0f0; }
#topbar .hud .v.sit-opportunity { color: #4cd38a; }
#topbar .hud .v.sit-overheated  { color: #ffd166; }

#topbar .tb-act { display: flex; align-items: center; gap: 10px; }
#topbar .tb-help {
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: 1px solid #36506a; color: #8aa0b6;
  font-weight: 700; cursor: pointer;
}
#topbar .tb-help:hover { color: #fff; border-color: #8aa0b6; }
/* action: overrides v1's full-width sidebar button */
#topbar #btn-advance-quarter {
  width: auto; padding: 9px 16px; font-size: 13.5px; border-radius: 6px;
  position: static; margin: 0;
  background: #2f7de1; box-shadow: none;
}
#topbar #btn-advance-quarter:hover { background: #3b8cf2; }
#topbar #btn-advance-quarter:disabled { opacity: .5; cursor: default; }

/* ---------------------------------------------------------- light surface */
#views {
  --bg: #eef2f7; --surface: #ffffff; --surface2: #f4f7fb; --border: #d8e0ea;
  --text: #1c2b3a; --text-muted: #62748a;
  --green: #18794e; --yellow: #b8860b; --red: #c2410c; --blue: #2f6fb0;
  --purple: #6b4fbb; --teal: #0f8a7e; --orange: #c2560c;
  --shadow: 0 1px 3px rgba(20,40,60,.08);
  color: var(--text);
  padding: 16px 18px 40px;
  max-width: 1500px; margin: 0 auto;
  width: 100%; box-sizing: border-box;   /* #app is a flex column: without this, auto margins shrink it to content */
}
#views .view.hidden { display: none; }
#views .panel { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
#views .panel-header { background: var(--surface2); border-bottom: 1px solid var(--border); }
#views .panel-title { color: #34495e; }
#views input, #views select { background: #fff; color: var(--text); border: 1px solid var(--border); }

/* Map screen: map + a narrow rail for "This quarter" */
#views .home { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; align-items: start; }
#views .home-rail { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; }
#views .home-rail .panel { margin: 0; }

/* ------------------------------------------------------------------ inbox */
#views .home { grid-template-columns: minmax(0,1fr) 360px; }
#views .inbox .panel-header { display: flex; justify-content: space-between; align-items: center; }
#views .ib-count { font-size: 11px; font-weight: 700; color: #b45309; }
#views .ib-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
#views .ib-empty { color: var(--text-muted); font-size: 13px; padding: 8px 4px; }

#views .ib { border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px;
             background: #fff; padding: 9px 11px; font-size: 12.5px; line-height: 1.45; }
#views .ib-title { font-weight: 700; color: var(--text); }
#views .ib-body  { color: #45586c; margin-top: 3px; }
#views .ib-tag   { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 3px; }

/* decision: pinned, amber, the only item with a button */
#views .ib-decision { border-color: #f0c36d; border-left-color: #d97706; background: #fffaf0; }
#views .ib-decision .ib-tag { color: #b45309; }
#views .ib-btn { margin-top: 8px; background: #d97706; color: #fff; border: 0; border-radius: 5px;
                 padding: 6px 14px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
#views .ib-btn:hover { background: #b45309; }
#views .ib-decided { border-left-color: #94a3b8; background: #f8fafc; }
#views .ib-decided .ib-tag { color: #64748b; }

/* quarter bottom line */
#views .ib-summary { border-left-color: var(--green); background: #f3faf6; }
#views .ib-summary.down { border-left-color: var(--red); background: #fdf5f2; }
#views .ib-sum-row { display: flex; justify-content: space-between; align-items: baseline; }
#views .ib-sum-k { font-weight: 800; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: #34495e; }
#views .ib-sum-v { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--green); }
#views .ib-summary.down .ib-sum-v { color: var(--red); }
#views .ib-sum-d { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
#views .ib-acts { margin-top: 6px; font-size: 11px; color: #7a8a9b; }

/* events: loud colour, no chrome */
#views .ib-event.ib-bad     { border-left-color: #dc2626; }
#views .ib-event.ib-good    { border-left-color: #16a34a; }
#views .ib-event.ib-neutral { border-left-color: #2f6fb0; }

/* messages from people: two lines until opened */
#views .ib-msg { border-left-color: #64748b; cursor: pointer; }
#views .ib-msg.unread { border-left-color: #1d4ed8; background: #f5f8ff; }
#views .ib-msg .ib-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#views .ib-msg.open .ib-body { display: block; }
#views .ib-from { font-size: 11px; font-weight: 700; color: #34495e; }
#views .ib-from span { font-weight: 500; color: var(--text-muted); }
#views .ib-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1d4ed8; margin-right: 5px; vertical-align: 1px; }

/* turn groups */
#views .ib-turn { display: flex; flex-direction: column; gap: 8px; }
#views .ib-turn-h { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
                    color: #6f869d; padding: 4px 2px 0; cursor: pointer; display: flex; justify-content: space-between; }
#views .ib-turn:first-of-type .ib-turn-h { cursor: default; }
#views .ib-turn-n { font-weight: 600; letter-spacing: 0; text-transform: none; }
#views .ib-turn.shut .ib-turn-h { border-top: 1px solid var(--border); padding-top: 7px; }

/* top bar: unread badge on Map, Advance blocked by a decision */
#topbar .tb-badge { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 6px; border-radius: 8px;
                    background: #d97706; color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; vertical-align: 1px; }
#topbar #btn-advance-quarter.tb-wait { background: #d97706; }
#topbar #btn-advance-quarter.tb-wait:hover { background: #b45309; }

/* v1 set numbers and labels in a typewriter font. Normal UI font here;
   tabular digits keep columns of numbers aligned. */
#views .pnl-table, #views .ratio-value, #views .bs-value, #views .action-meta,
#views .tranche-meta, #views .goal-target, #views input[type="number"],
#views input[type="text"], #views .event-impact {
  font-family: inherit; font-variant-numeric: tabular-nums;
}

/* Finance, row 1: the money moves side by side, equal height */
#views .fin-moves { margin: 0 0 16px; }
#views .fin-moves .actions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px; padding: 12px;
}
#views .action-group { display: flex; flex-direction: column; margin: 0; padding: 12px; border: 1px solid var(--border); }
#views .action-group-debt { border-color: var(--blue); }
#views .action-group-title { font-size: 12px; color: #34495e; margin-bottom: 6px; }
#views .ag-sub { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); }
#views .action-group .input-row { margin-top: auto; }
#views .action-group .input-row + .input-row,
#views .action-group .dividend-quick-row { margin-top: 6px; }
#views .input-row-lg input { font-size: 15px; }
#views .dividend-current { font-size: 18px; font-weight: 700; margin-bottom: 6px; }

/* Finance, row 2: three columns, no dead space */
#views .fin-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; align-items: start; }
#views .fin-col  { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#views .fin-col .panel { margin: 0; }
#views .sml-note { font-size: 11.5px; color: var(--text-muted); }
#views #debt-tranches-list { max-height: 300px; }

/* Finance, row 3: charts three across */
#views .charts-grid { margin-top: 16px; grid-template-columns: repeat(3, minmax(0,1fr)); }
#views .chart-wrap { background: var(--surface); border: 1px solid var(--border); }
#views .chart-wrap.chart-wide { grid-column: span 3; }
#views .chart-wrap canvas { height: 180px; }

/* Board */
#views .board-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
#views .board-grid .panel { margin: 0; }

@media (max-width: 1100px) {
  #topbar .tb-hud .hud.opt { display: none; }
  #views .home, #views .board-grid { grid-template-columns: 1fr; }
  #views .fin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #views .fin-grid .fin-col:last-child { grid-column: span 2; }
  #views .charts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #views .chart-wrap.chart-wide { grid-column: span 2; }
  #views .home-rail { position: static; max-height: none; }
}
@media (max-width: 760px) {
  #topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  #topbar .tb-nav { order: 3; width: 100%; overflow-x: auto; height: 38px; }
  #topbar .tb-hud { display: none; }
  #views .fin-grid, #views .charts-grid { grid-template-columns: 1fr; }
  #views .fin-grid .fin-col:last-child, #views .chart-wrap.chart-wide { grid-column: auto; }
}
#views .ib-tag-from { font-weight: 600; letter-spacing: 0; text-transform: none; color: #92400e; }

/* inbox: on the clock (inbox.js pendingRows) */
#views .ib-pend { border: 1px solid var(--border); border-radius: 6px; background: #f8fafc; padding: 7px 10px; }
#views .ib-pend-h { font-size: 10px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #6f869d; margin-bottom: 3px; }
#views .ib-pr { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 2px 0; color: #34495e; }
#views .ib-pr b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
#views .ib-pr.pr-warn b { color: #b45309; }
#views .ib-pr.pr-bad  { color: #b91c1c; } #views .ib-pr.pr-bad b { color: #b91c1c; }
#views .ib-pr.pr-good b { color: #15803d; }

/* start screen: continue (save.js) */
#start-overlay #btn-continue { background: #1f9d55; border-color: #1f9d55; }
#start-overlay .continue-label { font-size: 12px; color: var(--text-muted); margin-top: -8px; }
#start-overlay .hidden { display: none; }

/* ------------------------------------------------ dialogs: light, like 2.0 */
#modal-overlay {
  --surface: #ffffff; --surface2: #f4f7fb; --border: #d8e0ea;
  --text: #1c2b3a; --text-muted: #62748a;
  --green: #18794e; --yellow: #b8860b; --red: #c2410c; --blue: #2f6fb0;
}
#modal-overlay .modal-box { color: var(--text); max-width: 540px; }
#modal-overlay #modal-body { font-family: inherit; color: #34495e; }

/* deal preview (deal.js) */
.dp { font-size: 13px; line-height: 1.45; }
.dp-lead { margin-bottom: 10px; color: #1c2b3a; }
.dp table { width: 100%; border-collapse: collapse; }
.dp td { padding: 5px 0; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.dp td:last-child { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.dp tr.dp-up td:last-child { color: #15803d; }
.dp tr.dp-down td:last-child { color: #c2410c; }
.dp-note { font-size: 11px; color: #7a8a9b; font-weight: 400; }
.dp-h { margin: 12px 0 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #6f869d; }
.dp-risk { font-size: 12px; padding: 4px 8px; border-left: 3px solid #94a3b8; margin-bottom: 4px; background: #f8fafc; }
.dp-r-bad  { border-left-color: #dc2626; }
.dp-r-warn { border-left-color: #d97706; }
.dp-r-good { border-left-color: #16a34a; }

/* faces in the inbox and decision dialog */
#views .ib.has-av { position: relative; padding-left: 52px; }
#views .ib-av { position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid #d8e0ea; }
#modal-overlay .decision-who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: #34495e; }
#modal-overlay .decision-who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid #d8e0ea; }

/* inbox: "because" lines (round 2) */
#views .ib-why { margin-top: 7px; padding-top: 6px; border-top: 1px dashed #cfd9e4; font-size: 11.5px; color: #45586c; }
#views .ib-why-h { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #7a8a9b; margin-bottom: 2px; }
#views .ib-why-r { margin: 2px 0; line-height: 1.4; }
#views .ib-why-r span { font-weight: 800; font-variant-numeric: tabular-nums; }
#views .ib-why-r span.up { color: #15803d; } #views .ib-why-r span.down { color: #c2410c; }

/* glossary tooltips (glossary.js) */
.has-tip { text-decoration: underline dotted rgba(98,116,138,.55); text-underline-offset: 3px; cursor: help; }
#topbar .has-tip { text-decoration-color: rgba(138,160,182,.5); }
#tipbox { position: fixed; z-index: 3000; display: none; max-width: 280px; pointer-events: none;
          background: #0e2233; color: #e6edf5; font-size: 12px; line-height: 1.45; padding: 7px 10px;
          border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* start screen (round 2) */

/* round 2: tutorial chips, run to year end */
#views .ib-chip { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 8px; vertical-align: 1px; margin-left: 4px; }
#views .ib-chip.todo { background: #fef3c7; color: #92400e; }
#views .ib-chip.ok   { background: #dcfce7; color: #166534; }
#topbar .tb-run { padding: 9px 12px; font-size: 12.5px; font-weight: 700; border-radius: 6px; border: 0; cursor: pointer;
                  background: #1d3f63; color: #dbe8f5; }
#topbar .tb-run:hover { background: #24507d; color: #fff; }

/* the start screen covers the whole game, top bar included */
#start-overlay { z-index: 1200; }
/* finance before the first quarter (shell.js noResultsYet) */
#views .fin-note { display: none; font-size: 12px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 6px 9px; margin-bottom: 8px; }
#views #view-finance.no-results .fin-note { display: block; }

/* credit line panel (shell.js creditLine) */
#views .rcf-bar { height: 8px; background: #e8eef5; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
#views .rcf-bar div { height: 100%; background: #2f6fb0; }
#views .rcf-bar div.hi { background: #c2410c; }
#views .rcf-r { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid #eef2f7; }
#views .rcf-r b { font-variant-numeric: tabular-nums; } #views .rcf-r b.down { color: #c2410c; }
#views .rcf-c { margin-top: 8px; font-size: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 6px 8px; color: #78350f; }
#views .rcf-c.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
#topbar .hud .v.down { color: #ff8a65; }

/* top bar: never wrap the buttons or tabs; the credit-line note sits under the cash figure */
#topbar .tb-tab, #topbar .tb-run, #topbar #btn-advance-quarter { white-space: nowrap; }
#topbar .hud .sub { font-size: 10px; font-weight: 600; color: #ffb4a0; margin-top: 1px; }

/* top bar spacing: everything fits at 1366 px and up */
#topbar { gap: 14px; padding: 0 14px; }
#topbar .tb-brand { min-width: 0; }
#topbar .tb-tab { padding: 0 9px; }
#topbar .tb-hud { gap: 14px; }
#topbar .tb-act { gap: 8px; }
#topbar .tb-run { padding: 9px 10px; }
#topbar #btn-advance-quarter { padding: 9px 13px; }
@media (max-width: 1365px) { #topbar .tb-hud .hud.opt { display: none; } }

/* ---------------------------------------------------------- Board tab (round 4) */
#views .bd-top { display: flex; gap: 22px; align-items: center; font-size: 12.5px; color: #34495e; margin-bottom: 12px; flex-wrap: wrap; }
#views .bd-prob { color: #b91c1c; font-weight: 700; } #views .bd-ok { color: #15803d; }
#views .bd-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
#views .bd-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; box-shadow: var(--shadow); font-size: 12px; }
#views .bd-head { display: flex; gap: 10px; align-items: center; margin-bottom: 9px; }
#views .bd-head img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 1px solid #d8e0ea; }
#views .bd-name { font-weight: 800; font-size: 13px; color: #1c2b3a; } #views .bd-role { color: #62748a; font-size: 11.5px; }
#views .bd-mood { display: inline-block; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 10px; margin-bottom: 6px; }
#views .bd-mood .up { color: #15803d; } #views .bd-mood .down { color: #b91c1c; } #views .bd-mood .flat { color: #94a3b8; font-size: 9px; }
#views .lv-5 { background: #dcfce7; color: #166534; } #views .lv-4 { background: #ecfccb; color: #3f6212; }
#views .lv-3 { background: #fef3c7; color: #92400e; } #views .lv-2 { background: #ffedd5; color: #9a3412; } #views .lv-1 { background: #fee2e2; color: #991b1b; }
#views .bd-cause { color: #34495e; line-height: 1.4; min-height: 34px; margin-bottom: 6px; }
#views .bd-meta { color: #62748a; font-size: 11.5px; margin-top: 2px; } #views .bd-meta.crossed { color: #b91c1c; }
#views .bd-mem { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #dbe3ec; font-size: 11px; color: #62748a; }
#views .bd-mem b { display: block; color: #6f869d; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
#views .bd-sc { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#views .bd-sc td { padding: 5px 6px; border-bottom: 1px solid #eef2f7; }
#views .bd-sc img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
#views .bd-sc .v { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; } #views .bd-sc .w { color: #62748a; }
#views .bd-sc .ok { color: #15803d; font-weight: 800; } #views .bd-sc .no { color: #b91c1c; font-weight: 800; } #views .bd-sc .na { color: #94a3b8; }
#views .ib-ytd { margin-top: 5px; font-size: 11.5px; color: #45586c; }
#views .ib-ytd b.up { color: #15803d; } #views .ib-ytd b.down { color: #c2410c; }
@media (max-width: 1100px) { #views .bd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ------------------------------------------------- the board meeting (meeting.js) */
#meeting { position: fixed; inset: 0; z-index: 1100; background: rgba(10,20,32,.72); display: flex; align-items: center; justify-content: center; padding: 18px; }
#meeting.hidden { display: none; }
#meeting .mt-box { width: min(980px, 100%); height: min(860px, 94vh); background: #f4f7fb; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4);
  display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; color: #1c2b3a; font-size: 13.5px; }
#meeting .mt-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: linear-gradient(180deg,#0e2233,#0a1420); color: #fff; font-weight: 800; letter-spacing: .4px; }
#meeting .mt-skip { background: #1d3f63; color: #dbe8f5; border: 0; border-radius: 6px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
#meeting .mt-portraits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 14px 18px 10px; background: #fff; border-bottom: 1px solid #d8e0ea; }
#meeting .mt-p { position: relative; text-align: center; padding: 6px 4px; border-radius: 8px; transition: background .2s, opacity .2s; opacity: .78; }
#meeting .mt-p.talking { background: #eef4fb; opacity: 1; }
#meeting .mt-p img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
#meeting .mt-pn { font-weight: 800; font-size: 12.5px; margin-top: 4px; }
#meeting .mt-mood { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 10px; margin-top: 3px; }
#meeting .lv-5 { background: #dcfce7; color: #166534; } #meeting .lv-4 { background: #ecfccb; color: #3f6212; }
#meeting .lv-3 { background: #fef3c7; color: #92400e; } #meeting .lv-2 { background: #ffedd5; color: #9a3412; } #meeting .lv-1 { background: #fee2e2; color: #991b1b; }
#meeting .mt-stamp { position: absolute; top: 18px; left: 50%; transform: translateX(-50%) rotate(-12deg); font-weight: 900; font-size: 13px; letter-spacing: 1px;
  padding: 2px 8px; border: 3px solid; border-radius: 4px; background: rgba(255,255,255,.85); }
#meeting .mt-stamp.for { color: #15803d; border-color: #15803d; } #meeting .mt-stamp.against { color: #b91c1c; border-color: #b91c1c; }
#meeting .mt-chat { overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 9px; cursor: pointer; }
#meeting .mt-line { display: flex; gap: 9px; align-items: flex-start; max-width: 82%; }
#meeting .mt-line img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
#meeting .mt-who { font-size: 11px; font-weight: 800; color: #6f869d; margin-bottom: 2px; }
#meeting .mt-bub { background: #fff; border: 1px solid #d8e0ea; border-radius: 10px; padding: 7px 11px; line-height: 1.45; }
#meeting .mt-line.you { align-self: flex-end; } #meeting .mt-line.you .mt-bub { background: #2f7de1; color: #fff; border-color: #2f7de1; }
#meeting .mt-typing { font-size: 11.5px; color: #8aa0b6; font-style: italic; }
#meeting .mt-note { align-self: center; background: #fff; border: 1px dashed #c7d3e0; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; color: #34495e; max-width: 92%; }
#meeting .mt-note .mt-sub { color: #6f869d; font-size: 11.5px; margin-top: 4px; }
#meeting .mt-sc { border-collapse: collapse; font-size: 12.5px; }
#meeting .mt-sc td { padding: 3px 8px; border-bottom: 1px solid #eef2f7; }
#meeting .mt-sc .v { font-weight: 800; text-align: right; } #meeting .mt-sc .w, #meeting .mt-sc .who { color: #6f869d; }
#meeting .mt-sc .ok { color: #15803d; font-weight: 800; } #meeting .mt-sc .no { color: #b91c1c; font-weight: 800; }
#meeting .mt-actions { padding: 12px 18px 16px; background: #fff; border-top: 1px solid #d8e0ea; min-height: 20px; }
#meeting .mt-prompt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #6f869d; margin-bottom: 8px; }
#meeting .mt-btns { display: flex; gap: 10px; flex-wrap: wrap; }
#meeting .mt-btn { flex: 1 1 200px; text-align: left; background: #f4f7fb; border: 1px solid #c7d3e0; border-radius: 8px; padding: 9px 12px; cursor: pointer; color: #1c2b3a; }
#meeting .mt-btn b { display: block; font-size: 13.5px; } #meeting .mt-btn span { display: block; font-size: 11.5px; color: #62748a; margin-top: 2px; }
#meeting .mt-btn.primary { border-color: #2f7de1; background: #eaf2fd; }
#meeting .mt-btn:hover:not([disabled]) { border-color: #2f7de1; }
#meeting .mt-btn[disabled] { opacity: .5; cursor: default; }

/* ---------------------------------------------------------- rivals (round 5) */
#views .bd-league-panel { margin-bottom: 16px; }
#views .bd-lg { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#views .bd-lg th { text-align: right; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: #6f869d; padding: 4px 8px; }
#views .bd-lg th:nth-child(3) { text-align: left; }
#views .bd-lg td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; }
#views .bd-lg td.n { text-align: right; font-variant-numeric: tabular-nums; }
#views .bd-lg td.rk { font-weight: 800; color: #6f869d; width: 18px; }
#views .bd-lg img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
#views .bd-lg tr.me td { background: #eaf2fd; font-weight: 700; }
#views .bd-lg tr.rv-row { cursor: pointer; } #views .bd-lg tr.rv-row:hover td { background: #f4f7fb; }
#views .bd-lg td.up { color: #15803d; font-weight: 800; } #views .bd-lg td.down { color: #c2410c; font-weight: 800; }
#views .rv-link { cursor: pointer; text-decoration: underline dotted; }
#modal-overlay .modal-box.wide { max-width: 640px; }
.rv-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.rv-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.rv-ceo { font-weight: 800; color: #1c2b3a; } .rv-quote { font-style: italic; color: #34495e; margin: 2px 0; } .rv-style { font-size: 12px; color: #62748a; }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 6px 0 10px; }
.rv-c { display: flex; justify-content: space-between; border-bottom: 1px solid #eef2f7; padding: 3px 0; font-size: 12.5px; }
.rv-c b { font-variant-numeric: tabular-nums; color: #1c2b3a; }
.rv-sub { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #6f869d; margin: 10px 0 4px; }
.rv-staff { display: flex; gap: 8px; align-items: center; margin: 4px 0; font-size: 12.5px; }
.rv-staff img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.rv-staff span { display: block; color: #62748a; font-size: 11.5px; }
.rv-move { font-size: 12px; color: #34495e; padding: 2px 0; }

/* map: SALE tag on listed buildings (map.js) */
#tab-map .mk { position: absolute; }
#tab-map .mk .mk-sale { position: absolute; top: -4px; right: -18px; transform: rotate(-30deg); background: #dc2626; color: #fff;
  font: 900 9px/1 system-ui, sans-serif; letter-spacing: .6px; padding: 3px 5px; border-radius: 3px; border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35); pointer-events: none; }
/* round 38: short labels under markers (map.js) */
#tab-map .mk .mk-lbl { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; white-space: nowrap; pointer-events: none;
  font: 700 9.5px/1 system-ui, sans-serif; padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.92); color: #1d3b5a; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
#tab-map .mk .mk-lbl.own { border: 1px solid #2f6fb0; }
#tab-map .mk .mk-lbl.sale { background: #dc2626; color: #fff; border: 1px solid #fff; }
#tab-map .mk:hover .mk-lbl { transform: translateX(-50%) scale(.77); }
#tab-map .lg-sale { display: inline-block; transform: rotate(-30deg); background: #dc2626; color: #fff; font: 900 8px/1 system-ui; padding: 2px 3px; border-radius: 2px; }
#tab-map .lot { width: 30px; height: 30px; font-size: 20px; line-height: 26px; }
#views .ib-count { cursor: pointer; } #views .ib-count:hover { text-decoration: underline; }

/* Finance: cash is the headline number; chart titles in HTML */
#views .bs-cash-item { grid-column: 1 / -1; display:flex; align-items:baseline; justify-content:space-between;
  background: var(--surface2); border:1px solid var(--border); border-left:4px solid var(--green); border-radius:6px; padding:8px 12px; margin-bottom:4px; }
#views .bs-cash-item .bs-label { font-size:13px; font-weight:700; color: var(--text); text-transform:uppercase; letter-spacing:.04em; }
#views .bs-cash-item #bs-cash { font-size:24px; font-weight:800; }
#views .bs-cash-item #bs-cash.text-green { color:#12924f; }
#views .chart-h { margin-bottom:6px; }
#views .chart-h b { display:block; font-size:13px; color: var(--text); }
#views .chart-h span { display:block; font-size:11px; color: var(--text-muted); line-height:1.35; }
#views .rcf-fav { font-size:10px; padding:1px 6px; margin-left:4px; border:1px solid var(--blue); color: var(--blue); background:#fff; border-radius:4px; cursor:pointer; }
#views .rcf-fav:disabled { opacity:.45; cursor:not-allowed; }
#views .bd-cards.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { #views .bd-cards.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ------------------------------------------------ start screen (2.0 redesign)
   Full-bleed city at night, one dark glass card. assets/start_bg.jpg if it
   exists; the city map underneath is the fallback. */
#start-overlay {
  background:
    linear-gradient(90deg, rgba(6,16,28,.92) 0%, rgba(6,16,28,.72) 45%, rgba(6,16,28,.35) 100%),
    url("../assets/start_bg.jpg") center / cover no-repeat,
    url("../assets/city_map.jpg") center / cover no-repeat,
    #0b1a2a;
  justify-content: flex-start; padding: 40px 6vw;
}
#start-overlay .start-inner { align-items: flex-start; max-width: 520px; gap: 10px; }
#start-overlay .start-card { width: 100%; display: flex; flex-direction: column; gap: 14px; color: #e6edf5;
  background: rgba(10,24,40,.72); border: 1px solid rgba(160,190,220,.18); border-radius: 14px; padding: 30px 30px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45); backdrop-filter: blur(6px); }
#start-overlay .start-logo { font-size: 44px; font-weight: 900; letter-spacing: -1.5px; line-height: 1;
  background: linear-gradient(135deg, #7cc4ff, #37d3b4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
#start-overlay .start-tag { font-size: 14px; letter-spacing: 0; vertical-align: 18px; -webkit-text-fill-color: #8fb3d4; font-weight: 800; }
#start-overlay .start-loop { font-size: 17px; font-weight: 700; line-height: 1.45; color: #f1f6fb; margin: 0; text-align: left; }
#start-overlay .start-subtitle { font-size: 13px; color: #9fb4c9; margin: -6px 0 0; text-align: left; max-width: none; }
#start-overlay .start-setup { background: rgba(255,255,255,.05); border: 1px solid rgba(160,190,220,.16); max-width: none; padding: 14px 16px; gap: 10px; }
#start-overlay .setup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#start-overlay .setup-row label { color: #9fb4c9; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
#start-overlay .start-setup input[type=text] { background: rgba(255,255,255,.95); color: #1c2b3a; border: 0; }
#start-overlay .reit-suffix { color: #9fb4c9; }
#start-overlay .tutorial-toggle { font-size: 12.5px; color: #c9d7e5; display: flex; gap: 8px; align-items: center; cursor: pointer; }
#start-overlay .btn-lg { width: 100%; padding: 13px; font-size: 15px; font-weight: 800; border-radius: 8px; }
#start-overlay #btn-new-game-go { background: #2f80d0; border-color: #2f80d0; }
#start-overlay .continue-label { color: #9fb4c9; margin-top: -8px; }
#start-overlay .start-more { display: flex; flex-direction: column; gap: 6px; }
#start-overlay details { border-top: 1px solid rgba(160,190,220,.14); padding-top: 6px; }
#start-overlay summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: #a9c6e4; list-style: none; }
#start-overlay summary::before { content: "▸ "; } #start-overlay details[open] summary::before { content: "▾ "; }
#start-overlay details ul { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#start-overlay details li { font-size: 12px; color: #b9c9d9; line-height: 1.45; }
#start-overlay .start-foot { font-size: 10.5px; color: rgba(200,215,230,.55); padding-left: 4px; }
#start-overlay .start-foot .start-version { font-size: inherit; color: inherit; font-weight: 400; letter-spacing: 0; }
@media (max-width: 700px) { #start-overlay { padding: 16px; justify-content: center; } #start-overlay .setup-pair { grid-template-columns: 1fr; } }
#start-overlay .reit-name-row input { flex: 1; min-width: 0; width: 100%; } #start-overlay .setup-row input { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
#start-overlay .setup-row input { font-family: inherit; }
#views .bd-bond { font-size: 11px; margin: 4px 0; padding: 4px 7px; border-radius: 5px; line-height: 1.35; }
#views .bd-bond.pos { background: #ecfdf3; color: #166534; } #views .bd-bond.neg { background: #fef2f2; color: #991b1b; }
/* voices inside a decision: who on the board says what */
.dv-wrap { margin: 10px 0 2px; display: flex; flex-direction: column; gap: 6px; }
.dv { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; background: #f6f8fb; border-radius: 8px; padding: 6px 8px; }
.dv img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.dv b { color: #1c2b3a; }
.dv-nums { margin-top: 8px; font-size: 12.5px; }
.dv-nums td { padding: 2px 10px 2px 0; } .dv-nums td:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
#views .ib-held { border-left-color: #b45309; background: #fffbeb; }
#modal-overlay .decision-hold { border: 1px dashed #b45309; background: #fffbeb; }
#modal-overlay .decision-hold .choice-label { color: #92400e; }
#views .ib-held { border-left-color: #b45309; background: #fffbeb; }
#modal-overlay .decision-hold { border: 1px dashed #b45309; background: #fffbeb; }
#modal-overlay .decision-hold .choice-label { color: #92400e; }
#modal-overlay .dv-nums td:first-child { white-space: nowrap; color: #62748a; }
/* reputation bar (round 8) */
#views .bd-rep { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; font-size: 10.5px; color: #62748a; }
#views .bd-rep-k { text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
#views .bd-rep-bar { position: relative; flex: 1; height: 6px; background: #e8eef5; border-radius: 3px; }
#views .bd-rep-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #2f6fb0; }
#views .bd-rep-bar i.mid { background: #d97706; } #views .bd-rep-bar i.low { background: #dc2626; }
#views .bd-rep-bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #b91c1c; }
#views .bd-hist div { font-size: 12px; padding: 3px 0; border-bottom: 1px solid #eef2f7; }
#views .bd-hq { display: inline-block; min-width: 54px; font-weight: 700; color: #62748a; }
#views .bd-esg { margin-top: 10px; font-size: 12px; }
#views .bd-esg-r { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px solid #eef2f7; }
#views .bd-esg-x { font-size: 10px; padding: 1px 6px; border: 1px solid #c2410c; color: #c2410c; background: #fff; border-radius: 4px; cursor: pointer; }
/* round 9: the date sits next to the buttons that move it */
#topbar .tb-date { display: flex; align-items: baseline; gap: 5px; padding: 6px 10px; border-radius: 6px; background: #13314f; color: #dbe8f5;
  font-size: 13px; font-weight: 700; white-space: nowrap; }
#topbar .tb-date b { font-size: 17px; color: #fff; }
#topbar .tb-date span { font-size: 10.5px; font-weight: 600; color: #8fb0cf; }
#views .ib-event.has-more { cursor: pointer; }
#views .ib-more-k { display: inline-block; margin-top: 3px; font-size: 11px; color: #2f6fb0; font-weight: 700; }
#views .ib-more { margin-top: 5px; font-size: 12px; line-height: 1.45; color: #34495e; border-top: 1px dashed #cfd9e4; padding-top: 5px; }
#meeting .mt-p.guest { opacity: 1; background: #fff7ed; }
#meeting .mt-mood.mt-guest { background: #fde68a; color: #78350f; }
#meeting .mt-line.guest .mt-bub { background: #fffbeb; border-color: #fcd34d; }
#gameover-reason { white-space: pre-line; }

/* round 13: the Rennick war panel on his profile */
.war-panel { background: #fbf6f2; border: 1px solid #ecd9cc; border-radius: 8px; padding: 10px 12px; }
.war-heat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b5a50; margin-bottom: 8px; }
.war-heat .bar { flex: 1; height: 6px; background: #eadfd8; border-radius: 3px; overflow: hidden; }
.war-heat .bar i { display: block; height: 100%; background: linear-gradient(90deg, #e8a33d, #c0392b); }
.war-btn { display: block; width: 100%; text-align: left; margin: 4px 0; padding: 7px 10px; border: 1px solid #c9b5a8; border-radius: 6px;
  background: #fff; color: #3d2b22; font: 600 13px/1.3 inherit; cursor: pointer; }
.war-btn:hover:not([disabled]) { background: #fff3ea; border-color: #c0392b; }
.war-btn[disabled] { opacity: .45; cursor: not-allowed; }
.war-panel .sml-note { font-size: 12px; color: #6b5a50; }

/* round 14: the ending, like a visual novel (ending.js) */
#ending-overlay { position: fixed; inset: 0; z-index: 9000; background: #0b0f16; display: flex; align-items: center; justify-content: center; }
#ending-overlay.hidden { display: none; }
.en-box { width: min(1100px, 94vw); background: #10151f; color: #e9edf3; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); display: grid; grid-template-columns: 1.35fr 1fr; min-height: 520px; }
.en-box.en-big { grid-template-columns: 1fr; grid-template-rows: 420px auto; }
.en-img { position: relative; background: linear-gradient(135deg, #1d2633, #33251c); min-height: 360px; }
.en-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.en-img img.en-fb { filter: saturate(.7) brightness(.85); }
.en-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8a96a8; font: 12px/1.4 monospace; padding: 20px; text-align: center; }
.en-ph.hidden { display: none; }
.en-text { padding: 32px 36px 26px; display: flex; flex-direction: column; }
.en-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #c9a45c; margin-bottom: 10px; }
.en-text h1 { font: 700 38px/1.1 Georgia, serif; margin: 0 0 16px; color: #fff; }
.en-text p { font: 17px/1.55 Georgia, serif; margin: 0 0 10px; color: #d7dde6; }
.en-nav { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; align-items: center; }
.en-dots { flex: 1; display: flex; gap: 6px; }
.en-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a4556; }
.en-dots i.on { background: #c9a45c; }
.en-nav button { border: 1px solid #c9a45c; background: transparent; color: #f2e3c2; padding: 8px 16px; border-radius: 6px; font: 600 13px inherit; cursor: pointer; }
.en-nav .en-next { background: #c9a45c; color: #1a1408; }
.en-nav .en-skip { border-color: #3a4556; color: #8a96a8; }
.en-faces { background: linear-gradient(135deg, #1d2633, #161b24); display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 30px; }
.en-faces div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.en-faces span { width: 70px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a96a8; }
.en-faces img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #3a4556; }

/* round 17: macro news as a front page / a central bank notice (inbox.js) */
#views .ib-macro { background: #fbf8f1; border: 1px solid #e3dccb; border-left: 4px solid #1f2937; padding: 10px 12px; cursor: default; }
#views .ib-macro.has-more { cursor: pointer; }
#views .ib-macro.ib-src-fed { background: #f3f6fa; border-color: #d6dfea; border-left-color: #1e3a5f; }
#views .ib-macro.ib-bad { border-left-color: #b91c1c; }
#views .ib-macro.ib-good { border-left-color: #15803d; }
#views .ib-mast { display: flex; align-items: center; gap: 6px; font: 700 10px/1 Georgia, serif; letter-spacing: .12em; text-transform: uppercase; color: #6b5d45; border-bottom: 1px solid #e3dccb; padding-bottom: 5px; margin-bottom: 6px; }
#views .ib-src-fed .ib-mast { color: #1e3a5f; border-bottom-color: #d6dfea; }
#views .ib-mast img { width: 18px; height: 18px; object-fit: contain; }
#views .ib-head { font: 700 15px/1.25 Georgia, 'Times New Roman', serif; color: #111827; margin-bottom: 4px; }
#views .ib-factors { margin: 4px 0 2px 16px; padding: 0; font-size: 12px; line-height: 1.5; color: #374151; }
/* round 17: one more HUD cell (rating and base rate): tighten the gaps so 1440px fits */
@media (max-width: 1520px) { #topbar .tb-hud { gap: 9px !important; } #topbar .hud .v { font-size: 13.5px; } #topbar .hud .k { font-size: 9px; letter-spacing: .3px; } }

/* round 20: the Stories tab (journal.js) */
#stories-body .jr-sec { font: 800 10.5px/1 inherit; letter-spacing: .6px; text-transform: uppercase; color: #6f869d; margin: 6px 0 8px; }
#stories-body .jr-card { display: flex; gap: 12px; padding: 12px; border: 1px solid #e3e8ef; border-left: 4px solid #2f6fb0; border-radius: 8px; background: #fff; margin-bottom: 10px; }
#stories-body .jr-card.jr-done { border-left-color: #a0aec0; background: #fafbfc; }
#stories-body .jr-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
#stories-body .jr-main { flex: 1; min-width: 0; }
#stories-body .jr-h { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
#stories-body .jr-chip { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #e8f0f9; color: #2f6fb0; }
#stories-body .jr-done .jr-chip { background: #edf0f3; color: #6b7785; }
#stories-body .jr-now { font-size: 13px; color: #1f2937; }
#stories-body .jr-next { font-size: 12px; color: #374151; margin-top: 3px; }
#stories-body .jr-log { margin-top: 6px; font-size: 11.5px; color: #6b7785; border-top: 1px dashed #e3e8ef; padding-top: 5px; }
#stories-body .jr-log span { display: inline-block; width: 48px; color: #94a3b8; }
/* round 20: a sixth tab (Stories). Keep the brand on one line and the tabs a little tighter */
#topbar .tb-brand { flex: none; white-space: nowrap; }
@media (max-width: 1520px) { #topbar .tb-tab { padding: 0 7px; font-size: 13px; } #topbar { gap: 10px; } #topbar .tb-co { font-size: 13px; letter-spacing: 1px; } }
@media (max-width: 1520px) { #topbar .tb-hud .hud.hud-rc { display: none; } }

/* round 22: the Dealroom */
#stories-body .dr-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #e3e8ef; border-left: 4px solid #c8892b; border-radius: 8px; background: #fff; margin-bottom: 8px; }
#stories-body .dr-main { flex: 1; min-width: 0; }
#stories-body .dr-acts { flex: none; display: flex; gap: 6px; align-items: center; }
#stories-body .dr-ag { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: #2f6fb0; font-weight: 700; }
#stories-body .dr-done { font-size: 12px; color: #5a6b7d; margin: 2px 0 12px; }
#stories-body .dr-done span { color: #8393a3; margin-right: 6px; }
.ag-face { position: relative; display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: #d8e2ec; overflow: hidden; flex: none; align-items: center; justify-content: center; }
.ag-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ag-ini { font: 800 11px/1 inherit; color: #3a4756; }
.ag-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef2f6; }
.ag-row .ag-face { width: 40px; height: 40px; }
.ag-row.ag-off { opacity: .55; }
.ag-m { flex: 1; min-width: 0; }
.ag-r { text-align: right; flex: none; }
.dl-offer { margin: 10px 0; }
.dl-offer .big { font-size: 20px; font-weight: 800; }
.lot.lot-locked { background: #7a8796 !important; }

/* round 23: feedback */
.fb-q { font-weight: 800; margin: 10px 0 6px; }
.fb-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-b { border: 1px solid #c9d4e0; background: #fff; border-radius: 6px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 13px; color: #2b3a4a; }
.fb-b.on { background: #2f6fb0; border-color: #2f6fb0; color: #fff; }

/* round 24: the share price chart leads, two columns wide */
#views .chart-wrap.chart-two { grid-column: span 2; }
#views .chart-wrap.chart-two canvas { height: 220px; }
@media (max-width: 1280px) { #views .chart-wrap.chart-two { grid-column: span 2; } }
@media (max-width: 900px) { #views .chart-wrap.chart-two { grid-column: auto; } }
.mt-spark { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 10px; margin: 4px 0; }
.mt-spark-h { font-size: 13px; margin-bottom: 4px; }

/* round 24: who pays your rent */
.tn-panel { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: 10px 14px; margin: 10px 0 12px; }
.tn-list { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.tn-list .tn-h, .tn-list .tn-warn { grid-column: 1 / -1; }
.tn-h { margin-bottom: 6px; font-size: 13px; }
.tn-h .sml { color: #7a8796; font-size: 11px; margin-left: 6px; }
.tn-r { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid #f0f3f7; }
.tn-r i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.tn-nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-pc { font-weight: 700; width: 48px; text-align: right; }
.tn-cv { width: 120px; text-align: right; font-weight: 700; font-size: 12px; }
.tn-warn { margin-top: 6px; color: #b45309; font-size: 12px; font-weight: 700; }

/* round 24: Continue sits below New game */
.continue-box { margin-top: 18px; }
.continue-or { display: flex; align-items: center; gap: 10px; color: #8393a3; font-size: 12px; margin-bottom: 10px; }
.continue-or::before, .continue-or::after { content: ''; flex: 1; height: 1px; background: #d8e2ec; }
.continue-box .continue-label { margin-top: 8px; }

/* round 25: the ending gallery (title screen) and the unlock badge */
.eg { margin-top: 16px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }
.eg-h { font-size: 13px; color: #dbe7f3; margin-bottom: 8px; }
.eg-h span { color: #8fa6bd; font-size: 12px; }
.eg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eg-c { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 6px; opacity: .6; }
.eg-c.on { opacity: 1; border-color: #e6b34a; background: rgba(230,179,74,.12); }
.eg-img { position: relative; height: 38px; border-radius: 4px; background: rgba(0,0,0,.25); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.eg-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eg-img span { position: relative; font-size: 18px; font-weight: 800; color: #e6b34a; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.eg-c:not(.on) .eg-img span { color: #8fa6bd; }
.eg-t { font-size: 11.5px; font-weight: 800; color: #eef4fb; margin-top: 5px; }
.eg-s { font-size: 10px; color: #8fa6bd; line-height: 1.3; margin-top: 2px; }
.en-badge { display: inline-block; background: #e6b34a; color: #2b2410; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 4px 12px; margin-bottom: 8px; }
.eg summary { cursor: pointer; list-style: none; }
.eg summary::-webkit-details-marker { display: none; }
.eg[open] summary { margin-bottom: 8px; }
.eg-stars { color: #e6b34a; letter-spacing: 2px; font-size: 14px; }
#stories-body .dr-end { background: #fbf6ea; border: 1px solid #ecd9a8; color: #6b5413; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; font-size: 13px; }
#stories-body .dr-end span { font-weight: 800; margin-left: 6px; }
#start-overlay .continue-box #continue-label { margin-top: 10px !important; display: block; }

/* round 28: the 2.0 leaderboard */
.lb2-d summary { cursor: pointer; font-weight: 800; color: #dbe7f3; font-size: 13px; padding: 8px 0; }
.lb2 { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.lb2 th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #8fa6bd; padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
.lb2 td { padding: 5px 6px; border-bottom: 1px solid rgba(255,255,255,.06); color: #eef4fb; vertical-align: top; }
.lb2 td span { display: block; font-size: 10.5px; color: #8fa6bd; }
.lb2 td.w { color: #e6b34a; font-weight: 800; }
.lb2 tr.me td { background: rgba(230,179,74,.15); }
.lb2-empty { color: #8fa6bd; font-size: 12px; padding: 6px 0; }
#gameover-overlay .lb2-post { max-width: 820px; margin: 14px auto; background: rgba(15,25,40,.8); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 12px 14px; color: #dbe7f3; font-size: 13px; }
.lb2-row { display: flex; gap: 8px; margin-top: 8px; }
.lb2-row input { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid #3a4756; background: #0f1a28; color: #fff; }
.lb2-msg { margin-top: 6px; color: #e6b34a; font-weight: 700; }

/* round 29: the ending pictures drift slowly, like the end of a film */
@keyframes enDrift { from { transform: scale(1.0) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
.en-img { overflow: hidden; }
.en-img img:not(.en-fb) { animation: enDrift 14s ease-out forwards; transform-origin: 60% 45%; }
@media (prefers-reduced-motion: reduce) { .en-img img { animation: none !important; } }
#ending-overlay .en-nav { flex-wrap: wrap; row-gap: 8px; } #ending-overlay .en-nav button { white-space: nowrap; }
#stories-body .dr-row.dr-warn { border-left-color: #c2410c; }
#views .input-row-lg input { min-width: 56px; flex: 1 1 56px; } #views .input-row-lg .input-suffix { white-space: nowrap; flex: none; }

/* round 32: meeting guests waiting their turn; why a choice is locked */
.mt-p.guest.waiting { opacity: .55; }
.mt-p.guest.on { opacity: 1; }
.mt-btn .mt-why { display: block; margin-top: 6px; color: #b45309; font-weight: 700; font-size: 12px; }
#gameover-overlay .pm { max-width: 820px; margin: 14px auto 0; background: rgba(60,20,20,.55); border: 1px solid rgba(239,68,68,.45); border-radius: 8px; padding: 12px 16px; color: #f3e4e4; font-size: 14px; text-align: left; }
#gameover-overlay .pm-h { font-weight: 800; letter-spacing: .5px; text-transform: uppercase; font-size: 12px; color: #fca5a5; margin-bottom: 6px; }
#gameover-overlay .pm-r { margin: 4px 0; line-height: 1.45; }
#gameover-overlay .pm-f { margin-top: 8px; font-size: 12px; color: #d1b3b3; }

/* round 34: preferred stock gets its own full-width strip under the four money moves */
#views .fin-moves #preferred-redeem-group { grid-column: 1 / -1; display: grid; grid-template-columns: 160px 1fr; column-gap: 16px; align-items: start; }
#views .fin-moves #preferred-redeem-group > .action-group-title { grid-row: 1 / span 3; margin: 2px 0 0; }
#views .fin-moves #preferred-redeem-group[style*="display: none"] { display: none !important; }
#views .fin-moves #preferred-redeem-group > .action-meta, #views .fin-moves #preferred-redeem-group > .input-row { grid-column: 2; margin-top: 0; }
#views .fin-moves #action-preferred-info > div:first-child { max-width: 720px; }
#views .input-row-lg .input-suffix { font-size: 12px; }
/* round 34: four money moves share the row (preferred shares sit underneath) */
#views .fin-moves .actions-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { #views .fin-moves .actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* round 35: the guests sit apart */
.mt-gdiv { display: flex; align-items: center; justify-content: center; border-left: 2px dashed #d9c9a8; margin: 6px 0; }
.mt-gdiv span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #a08350; font-weight: 600; }
.mt-grole { font-size: 11px; color: #7a6a4a; margin: -2px 0 4px; text-align: center; line-height: 1.25; }

/* round 38: Properties rows open on click */
#tab-properties .nm .chev { display: inline-block; width: 12px; color: #2f6fb0; font-size: 12px; margin-right: 4px; flex: none; }
#tab-properties .cond { font-weight: 700; } .cond-new { color: #18794e; } .cond-good { color: #2f6fb0; } .cond-worn { color: #b8860b; } .cond-tired { color: #c2410c; }

/* round 39: 'put it on hold' is a small link, not a fifth option */
.decision-hold-sm { margin: 6px 2px 0; padding: 6px 8px; font-size: 12.5px; color: #2f6fb0; cursor: pointer; border: 1px dashed #b8c8da; border-radius: 6px; background: transparent; }
.decision-hold-sm:hover { background: #eef4fb; }
#meeting .mt-mood.mt-chairyou { background: #dbeafe; color: #1e3a8a; }   /* round 40 */

/* round 41: your wealth under the company name */
#topbar .tb-sub.tb-you { color: #fbbf24; font-weight: 700; cursor: help; }

/* round 42: a small '?' that explains on click (never on hover) */
.why-q { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 4px; border-radius: 50%; border: 1px solid #8fa3b8; background: transparent; color: #4b6480; font: 800 11px/1 system-ui, sans-serif; cursor: pointer; padding: 0; vertical-align: 1px; }
.why-q:hover { background: #2f6fb0; color: #fff; border-color: #2f6fb0; }
#tab-properties .flt-chip { display: inline-flex; gap: 8px; align-items: center; background: #fff4d6; border: 1px solid #e0b84a; color: #6b4e00; font-weight: 700; padding: 3px 4px 3px 10px; border-radius: 14px; margin-left: 10px; }
#tab-properties .flt-chip button { border: 0; background: #e0b84a; color: #3a2a00; font-weight: 800; border-radius: 10px; padding: 2px 8px; cursor: pointer; }

/* round 42: meeting speed */
#meeting .mt-speed { display: inline-flex; gap: 2px; margin-left: auto; margin-right: 10px; background: #0b1a28; border-radius: 6px; padding: 2px; }
#meeting .mt-speed button { background: transparent; color: #9db3c8; border: 0; border-radius: 4px; padding: 4px 8px; font: 700 11.5px/1 system-ui, sans-serif; cursor: pointer; }
#meeting .mt-speed button.on { background: #2f6fb0; color: #fff; }
#meeting .mt-jen { display: flex; gap: 10px; align-items: flex-start; background: #fff8e1; border: 1px solid #f0d58a; border-radius: 8px; padding: 8px 10px; color: #4a3b10; text-align: left; }
#meeting .mt-jen img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
#ending-overlay .en-ai { font-size: 10.5px; color: rgba(160,175,190,.75); margin-top: 6px; text-align: right; }

/* round 42: simple line icons on the tabs */
#topbar .tb-tab .tb-ic { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
@media (max-width: 1365px) { #topbar .tb-tab { padding: 0 5px; font-size: 12.5px; } #topbar { gap: 7px; } #topbar .tb-hud { gap: 7px !important; } }   /* round 42: 1280 px screens fit the whole bar */

/* round 43: the quarterly results card */
#views .ib-summary.rc .ib-sum-v small { font-size: 10px; font-weight: 700; color: var(--text-muted); margin-left: 4px; }
#views .rc-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 6px; }
#views .rc-t { background: #fff; border: 1px solid #dfe6ee; border-radius: 6px; padding: 6px 7px; border-top: 3px solid #18794e; }
#views .rc-t.bad { border-top-color: #c2410c; }
#views .rc-k { font-size: 9.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #62748a; }
#views .rc-v { font-size: 17px; font-weight: 900; color: #1d3b5a; font-variant-numeric: tabular-nums; }
#views .rc-ch { font-size: 10.5px; font-weight: 700; color: #7a8796; }
#views .rc-ch.up { color: #18794e; } #views .rc-ch.down { color: #c2410c; }
#views .rc-big { font-size: 12px; font-weight: 700; padding: 5px 8px; border-radius: 5px; margin: 4px 0; }
#views .rc-big.bad { background: #fde8e1; color: #9a2f0a; } #views .rc-big.good { background: #e3f4ea; color: #12613d; }
#views .rc-jen { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #34495e; margin: 6px 0 2px; }
#views .rc-jen img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
#views .rc-more { font-size: 11.5px; color: #2f6fb0; cursor: pointer; font-weight: 700; margin-top: 4px; }
#views .rc-detail { margin-top: 6px; border-top: 1px dashed #d3dce6; padding-top: 6px; }

/* round 43: the inbox drawer on every tab but the Map */
#views #ib-drawer { position: fixed; top: 64px; right: 0; bottom: 8px; z-index: 60; pointer-events: none; }
#views #ib-drawer.hidden { display: none; }
#views #ibd-handle { pointer-events: auto; position: absolute; right: 0; top: 40px; transform-origin: right top; transform: rotate(-90deg) translateY(-100%);
  background: #1d3f63; color: #fff; border: 0; border-radius: 6px 6px 0 0; padding: 7px 14px; font: 800 12px/1 system-ui, sans-serif; letter-spacing: .5px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
#views #ibd-handle b { background: #e69500; color: #fff; border-radius: 9px; padding: 1px 6px; margin-left: 4px; }
#views #ib-drawer .ibd-box { pointer-events: auto; position: absolute; right: 0; top: 0; bottom: 0; width: 380px; overflow: auto; background: #f4f7fa; box-shadow: -4px 0 14px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .18s ease; }
body.ib-open #views #ib-drawer .ibd-box { transform: translateX(0); }
body.ib-open #views #ibd-handle { right: 380px; }
#views #ib-drawer .inbox { margin: 0; min-height: 100%; }

/* round 43: staff seats */
#views .seats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; }
#views .seat { background: #fff; border: 1px solid #dbe3ec; border-radius: 10px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
#views .seat img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto 4px; border: 3px solid #e6edf4; }
#views .seat.filled img { border-color: #2f6fb0; }
#views .seat.empty { border-style: dashed; cursor: pointer; background: #f8fafc; }
#views .seat.empty:hover, #views .seat.on { border-color: #2f6fb0; box-shadow: 0 0 0 2px rgba(47,111,176,.15); }
#views .seat-role { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #2f6fb0; }
#views .seat-name { font-weight: 800; font-size: 13.5px; color: #1d3b5a; }
#views .seat-un { font-size: 11px; color: #62748a; line-height: 1.35; flex: 1; }
#views .seat-tr { font-size: 11px; font-weight: 700; }
#views .seat-foot { display: flex; justify-content: center; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; color: #34495e; margin-top: 4px; }
@media (max-width: 1100px) { #views .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#views .ib-msg .ib-gist { font-size: 12.5px; color: #4a5a6c; line-height: 1.4; }
#views .ib-msg .ib-gist .ib-more-k { color: #2f6fb0; font-weight: 700; font-size: 11px; white-space: nowrap; }

/* round 43: stats for nerds */
#views details.nerd { margin: 14px 0 6px; }
#views details.nerd > summary { cursor: pointer; padding: 10px 14px; font-weight: 800; color: #62748a; letter-spacing: .5px; font-size: 12px; text-transform: uppercase; list-style: none; }
#views details.nerd[open] > summary { color: #1d3b5a; }
.nd-sec { margin: 10px 0 4px; } .nd-sec b { display: block; font-size: 13px; color: #1d3b5a; } .nd-sec span { font-size: 11.5px; color: #62748a; }
.nd-legend { font-size: 11.5px; color: #34495e; margin-top: 2px; } .nd-empty { font-size: 12px; color: #7a8796; padding: 6px 0; }
.nd-t { width: 100%; border-collapse: collapse; font-size: 12px; } .nd-t th { text-align: left; font-size: 10px; text-transform: uppercase; color: #62748a; padding: 4px 6px; border-bottom: 1px solid #dfe6ee; }
.nd-t td { padding: 4px 6px; border-bottom: 1px solid #eef2f6; } .nd-t td.up { color: #18794e; font-weight: 700; } .nd-t td.down { color: #c2410c; font-weight: 700; }
.nd-t tr.nd-best td { background: #eef9f2; } .nd-t tr.nd-worst td { background: #fdf0ec; }
.nd-tot { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; } .nd-tot div { background: #f4f7fa; border-radius: 6px; padding: 6px 8px; } .nd-tot span { display: block; font-size: 10px; text-transform: uppercase; color: #62748a; font-weight: 700; } .nd-tot b { font-size: 14px; color: #1d3b5a; }
#nerd-career .nd-career { max-width: 560px; margin: 8px auto; text-align: left; } #nerd-career .nd-tot div { background: rgba(255,255,255,.06); } #nerd-career .nd-tot b, #nerd-career .nd-sec b { color: #e8eef5; } #nerd-career .nd-tot span { color: #9db3c8; }

/* round 43: the top bar fits itself (shell.js fitBar): steps that apply only while it overflows */
#topbar.fit1 .hud.hud-rc { display: none; }
#topbar.fit2 .tb-tab .tb-ic { display: none; }
#topbar.fit3 .tb-tab { padding: 0 5px; font-size: 12.5px; } #topbar.fit3 { gap: 7px; } #topbar.fit3 .tb-hud { gap: 7px !important; }
#topbar.fit4 .hud.opt { display: none; }

/* round 44: a note for phones on the start screen */
#start-overlay .start-phone { display: none; background: #fff4d6; color: #6b4e00; border: 1px solid #e0b84a; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; margin: 8px 0; }
@media (max-width: 760px) { #start-overlay .start-phone { display: block; } }
