/* Oiligarchy JS — Authentic 1:1 Original SWF Art, Fonts & UI Styling */

@font-face {
  font-family: "ConduitITC";
  src: url("../assets/fonts/ConduitITC-Medium.ttf?v=9") format("truetype");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ConduitITC";
  src: url("../assets/fonts/ConduitITC-Bold.ttf?v=9") format("truetype");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, #23201b 0%, #0d0c0a 100%);
  color: #f4f1ea;
  font-family: "ConduitITC", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#stage-wrapper {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.85), 0 0 0 2px #342f28;
}

.site-credit {
  flex-shrink: 0;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: #a89f91;
  text-align: center;
  line-height: 1.2;
}
.site-credit a {
  color: #f4f1ea;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 204, 0, 0.55);
  transition: color 0.12s ease, text-decoration-color 0.12s ease;
}
.site-credit a:hover,
.site-credit a:focus-visible {
  color: #ffcc00;
  text-decoration-color: #ffcc00;
  outline: none;
}

#stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 750px;
  height: 300px;
  flex-shrink: 0;
  background: #141210;
  overflow: hidden;
  transform-origin: top left;
}

#world-canvas,
#election-canvas,
#cutscene-canvas {
  position: absolute;
  inset: 0;
  width: 750px;
  height: 300px;
  display: block;
  touch-action: none;
}
#cutscene-canvas {
  z-index: 65;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

#time-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.22s ease-out;
}
#time-flash.flash {
  opacity: 0.85;
  transition: none;
}

/* ---- World Hover Tooltip & Popover (Crisp White Box matching Screenshot #4) ---- */
#world-tooltip {
  position: absolute;
  z-index: 35;
  background: #ffffff;
  color: #000000;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.05;
  padding: 3px 10px 4px;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  white-space: nowrap;
}

#world-popover {
  position: absolute;
  z-index: 38;
  background: #ffffff;
  color: #111111;
  box-shadow: 2px 3px 9px rgba(0, 0, 0, 0.38);
  padding: 6px 10px 7px;
  min-width: 108px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  line-height: 1.1;
}
#world-popover .pop-title {
  font-weight: 500;
  font-size: 15px;
  text-transform: uppercase;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
#world-popover .pop-item {
  margin-bottom: 8px;
}
#world-popover .pop-item:last-child {
  margin-bottom: 0;
}
#world-popover .pop-lbl {
  color: #888888;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.05;
}
#world-popover .pop-val {
  color: #000000;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
}

/* ==================== AUTHENTIC TOP BLACK TABS (Image #2) ==================== */
.top-tab {
  position: absolute;
  top: 0;
  z-index: 27;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 0 0 11px 11px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.25px;
  padding: 4px 16px 5px;
  cursor: pointer;
  line-height: 1.0;
}
.top-tab:hover {
  color: #ffcc00;
}
#btn-menu { left: 42px; }
#btn-stats { right: 40px; }

/* ---- Top-Center Sliding ACTIONS Bar (Image #4: Big 46px circles linked by golden spine!) ---- */
#action-bar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#action-drawer {
  position: relative;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.16s ease-out, opacity 0.12s ease-out, padding 0.16s ease-out;
  background: transparent;
  border: none;
  padding: 0 6px;
}

#action-bar:hover #action-drawer,
#action-bar.pinned #action-drawer {
  max-height: 56px;
  opacity: 1;
  padding: 2px 6px 4px;
}

/* Hide dangling black ACTIONS tab cleanly while the big circular bar is open (matching Image #4!) */
#action-bar:hover #action-tab,
#action-bar.pinned #action-tab {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

#action-tab {
  background: #000000;
  color: #ffffff;
  border-radius: 0 0 11px 11px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.25px;
  padding: 4px 17px 5px;
  cursor: pointer;
  line-height: 1.0;
  max-height: 32px;
  transition: max-height 0.12s ease-out, opacity 0.1s ease-out, padding 0.12s ease-out;
}

#action-buttons {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sleek horizontal golden connecting spine behind the big circular buttons (Image #4!) */
#action-buttons::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 22px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #ffe73b 0%, #f5c400 58%, #d49600 100%);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 0;
  pointer-events: none;
}

.act-btn {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: url('../assets/svg/ui_action_btn_normal.svg?v=6') center/contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.32));
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease;
}
.act-btn:hover {
  background-image: url('../assets/svg/ui_action_btn_roll.svg?v=6');
  transform: scale(1.06);
}
.act-btn.active {
  background-image: url('../assets/svg/ui_action_btn_active.svg?v=6');
}
.act-btn.cant-afford {
  opacity: 0.45;
}
.act-btn img {
  max-width: 28px;
  max-height: 28px;
  pointer-events: none;
}

#action-tooltip {
  position: relative;
  margin-top: 6px;
  background: #ffffff;
  color: #000000;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.05;
  padding: 4px 11px 4px;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.38);
  white-space: nowrap;
}
#action-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #ffffff;
}
#action-tooltip.too-expensive {
  color: #999;
}

/* ==================== AUTHENTIC BOTTOM-LEFT GLOBE (Screenshot #1) ==================== */
#hud-globe {
  position: absolute;
  left: 4px;
  top: 185px;
  width: 114px;
  height: 114px;
  z-index: 27;
}
.globe-art {
  width: 114px;
  height: 114px;
  display: block;
  pointer-events: none;
}
.globe-pin {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: none;
  background: url('../assets/svg/ui_pin_hud.svg') center/contain no-repeat;
  border-radius: 50%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, filter 0.12s ease;
}
.globe-pin:hover {
  transform: translate(-50%, -50%) scale(1.2);
  filter: drop-shadow(0 0 4px rgba(255, 224, 50, 0.9));
}
.globe-pin.active {
  background-image: url('../assets/svg/ui_pin_hud_active.svg');
  filter: drop-shadow(0 0 5px rgba(255, 238, 40, 0.95));
  transform: translate(-50%, -50%) scale(1.12);
}
.globe-pin-space {
  box-shadow: 0 0 0 2px rgba(66, 232, 255, 0.85), 0 0 8px rgba(66, 232, 255, 0.9);
}
.el-sub-banner {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(16, 24, 38, 0.88);
  color: #ffdd33;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Bottom-left Feed tab and communicator */
#communicator {
  position: absolute;
  bottom: 0;
  left: 112px;
  z-index: 28;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

#comm-archive-btn {
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 10px 10px 0 0;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.25px;
  padding: 4px 14px 3px;
  line-height: 1.0;
  cursor: pointer;
  pointer-events: auto;
}
#comm-archive-btn:hover {
  color: #ffcc00;
}

/* Keep the Feed tab reachable while a message is visible. */
#comm-card {
  position: absolute;
  left: 2px;
  bottom: 29px;
  width: max-content;
  display: flex;
  align-items: flex-end;
  gap: 0;
  cursor: pointer;
  pointer-events: auto;
  animation: commSlideUp 0.22s cubic-bezier(0.2, 1.12, 0.32, 1);
}
@keyframes commSlideUp {
  from { transform: translateY(34px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.comm-portrait-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  background: #ffffff;
  border: 4.5px solid #ffd200;
  border-radius: 11px;
  box-shadow: 0 0 0 1px #c79200, 0 3px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
#comm-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  padding: 2px;
  display: block;
}

/* Cute circular mini archive badge tucked at bottom-left of portrait (Image #6!) */
.comm-mini-archive {
  position: absolute;
  left: -10px;
  bottom: -4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #ffd200;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comm-mini-archive::before {
  content: "";
  width: 7px;
  height: 8px;
  background: #111111;
  border-radius: 1px;
  box-shadow: inset 0 2px 0 #111, inset 0 3px 0 #fff, inset 0 5px 0 #111;
}
.comm-mini-archive:hover {
  transform: scale(1.12);
}

/* Event headline */
#comm-bubble {
  position: relative;
  margin-left: 11px;
  margin-bottom: 5px;
  background: #ffffff;
  color: #000000;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 16.5px;
  font-weight: 600;
  padding: 6px 14px 6px;
  border-radius: 7px;
  box-shadow: 2px 3px 9px rgba(0, 0, 0, 0.42);
  min-width: 0;
  max-width: 258px;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
#comm-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #ffffff;
}
#comm-card:hover #comm-bubble {
  background: #fff6d6;
}
#comm-card:hover #comm-bubble::before {
  border-right-color: #fff6d6;
}

@media (max-width: 600px) and (orientation: portrait) {
  #comm-card {
    left: -92px;
    max-width: min(330px, calc(100vw - 30px));
    scale: calc(1 / var(--stage-scale, 1));
    transform-origin: left bottom;
  }
  .comm-portrait-wrap {
    width: 38px;
    height: 38px;
    border-width: 3px;
  }
  #comm-bubble {
    margin-bottom: 1px;
    font-size: 16px;
  }
}

/* ==================== AUTHENTIC YELLOW L-SHAPED GIZMO (Image #2) ==================== */
#hud-gizmo {
  position: absolute;
  left: 441px;
  top: 161px;
  width: 310px;
  height: 140px;
  z-index: 27;
  pointer-events: none;
}
.gizmo-art {
  position: absolute;
  inset: 0;
  width: 310px;
  height: 140px;
  display: block;
  pointer-events: none;
}

.gizmo-val {
  position: absolute;
  color: #000000;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 20px;
  height: 20px;
  pointer-events: auto;
  cursor: default;
  font-variant-numeric: tabular-nums;
}
/* Pixel-exact alignment inside the white rounded slots of ui_gizmo.svg */
#val-money  { left: 25px;  top: 110px; width: 68px; text-align: center; }
#val-price  { left: 109px; top: 110px; width: 39px; text-align: center; }
#val-addict { left: 162px; top: 110px; width: 39px; text-align: center; }
#val-gdp    { left: 219px; top: 110px; width: 36px; text-align: center; }
#val-year   { left: 207px; top: 85px;  width: 58px; height: 19px; line-height: 19px; text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: -0.25px; }

/* Live vertical demand/extraction thermometer bar inside the yellow tube */
#hud-histogram {
  position: absolute;
  left: 270px;
  top: 8px;
  width: 26px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2px 2px 0;
  pointer-events: auto;
  cursor: default;
}
#hud-histogram.deficit-blink {
  animation: deficitBlink 0.45s infinite alternate;
}
@keyframes deficitBlink {
  from { background: transparent; }
  to { background: rgba(255, 80, 80, 0.3); }
}
.hist-col {
  width: 10px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hist-bar {
  width: 100%;
  transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.hist-demand { background: #a82020; }
.hist-actual { background: #111111; }
.hist-max    { background: #b4b4b4; }

/* Circular White Play Button (Next Year) */
#btn-next-year {
  position: absolute;
  left: 261px;
  top: 89px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: url('../assets/svg/ui_fast_normal.svg') center/contain no-repeat;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  transition: transform 0.08s;
}
#btn-next-year:hover {
  background-image: url('../assets/svg/ui_fast_roll.svg');
  transform: scale(1.06);
}
#btn-next-year:active {
  transform: scale(0.95);
}

/* ==================== BUTTONS & SHARED MODAL CHROME ==================== */
.oil-btn {
  background: #1a1815;
  color: #ffffff;
  border: 1.5px solid #555;
  border-radius: 5px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
}
.oil-btn:hover { background: #333; border-color: #ffcc00; color: #ffcc00; }
.oil-btn.primary {
  background: #000000;
  border-color: #ffcc00;
  color: #ffcc00;
}
.oil-btn.primary:hover {
  background: #ffcc00;
  color: #000000;
}
.oil-btn.danger {
  background: #a81c1c;
  border-color: #ff6b6b;
  color: #fff;
}
.oil-btn.small { padding: 4px 10px; font-size: 10px; }

#modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  z-index: 40;
}

.full-overlay {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: #000000;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: 560px;
  max-height: 292px;
  background: #ffffff;
  color: #111111;
  border-radius: 0;
  padding: 12px 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.48);
  overflow: visible;
}
.modal.wide { width: 690px; }
.modal.dark-modal {
  background: #1c1a17;
  color: #f3efe6;
  border: 1.5px solid #555;
}

/* Authentic Floating Circular Black X Close Button (ui_close_btn.svg) */
.modal-close-svg {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.1s;
}
.modal-close-svg:hover { transform: scale(1.12); }
.modal-close-svg img { width: 100%; height: 100%; display: block; }

.modal-title {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ---- Authentic Intro Screen (1:1 Molleindustria Art) ---- */
.intro-hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #000000;
}
.intro-sky {
  position: relative;
  height: 214px;
  background: linear-gradient(180deg, #ffdd22 0%, #ffcc00 65%, #ffbe00 100%);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.intro-sun {
  position: absolute;
  bottom: -95px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff9900 0%, #ff7700 65%, rgba(255, 130, 0, 0) 100%);
  pointer-events: none;
}
.intro-logo-art {
  position: relative;
  z-index: 2;
  width: 750px;
  height: auto;
  display: block;
  margin-bottom: -4px;
  pointer-events: none;
}
.intro-oil-ground {
  position: relative;
  flex: 1;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intro-buttons {
  display: flex;
  align-items: baseline;
  gap: 36px;
  z-index: 3;
}
.intro-link {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1.0;
  transition: color 0.1s, transform 0.1s;
}
#btn-play.intro-link {
  font-size: 40px;
}
.intro-link:hover {
  color: #ff9900;
  transform: scale(1.04);
}
.intro-ver {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #555555;
  letter-spacing: 0.6px;
}
#credits-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 390px;
  background: #ffffff;
  color: #111;
  border: 2px solid #000;
  padding: 16px 20px;
  text-align: center;
  z-index: 5;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
#credits-panel h3 { margin: 0 0 8px; color: #000; }
#credits-panel p { margin: 6px 0 10px; line-height: 1.4; }
#credits-panel a {
  color: #111;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#credits-panel a:hover {
  color: #c26d00;
}

/* ---- Sleek 5-Slide Executive Briefing Tutorial Modal ---- */
.tut-modal {
  width: 510px;
  height: 244px;
  max-height: 256px;
  padding: 12px 14px 10px;
  background: #ffffff;
  border: 2px solid #161b26;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
}
.tut-modal .tut-close {
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
}
.tut-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}
.tut-card-body {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.tut-img-box {
  width: 196px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1.5px solid #d5dce6;
  background: linear-gradient(155deg, #1b2434 0%, #0f1622 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tut-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  display: block;
}
.tut-copy-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.tut-top-lbl {
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: #111827;
  letter-spacing: 0.25px;
  line-height: 1.05;
}
.tut-layout p {
  margin: 2px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.42;
  color: #334155;
}
.tut-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5eaf1;
  padding-top: 8px;
  gap: 8px;
}
.tut-skip-link {
  background: none;
  border: none;
  padding: 2px 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #64748b;
  cursor: pointer;
}
.tut-skip-link:hover {
  color: #0f172a;
}
.tut-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tut-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.14s ease, background-color 0.14s ease;
}
.tut-dot.active {
  width: 20px;
  background: #111827;
}
.tut-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tut-btn-go {
  background: #ffdd33;
  color: #111111;
}
.tut-btn-go:hover {
  background: #f5c800;
  color: #000000;
}
.tut-footer-spacer {
  flex: 1;
}
.tut-btn {
  padding: 3px 14px 4px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 13px;
  letter-spacing: 0.2px;
  line-height: 1.0;
}
.menu-pill.small {
  padding: 4px 12px;
  font-size: 13px;
}

/* ==================== AUTHENTIC WHITE STATS WINDOW (Screenshot #2) ==================== */
.stats-modal {
  width: 750px;
  height: 300px;
  max-height: 300px;
  padding: 10px 14px;
  background: #ffffff;
  color: #222;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  border: none;
  border-radius: 0;
}
.stats-modal .modal-close-svg {
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
}
.stats-grid {
  display: flex;
  height: 100%;
  gap: 12px;
}
.stats-left {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.stats-top-notes {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: #c2c2c2;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  padding-right: 4px;
}
#stats-legend {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 5px 14px;
  margin-bottom: 6px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #222;
  cursor: pointer;
}
.legend-item.off { opacity: 0.3; }
.legend-swatch {
  width: 11px;
  height: 11px;
  display: inline-block;
  flex-shrink: 0;
}
#stats-chart {
  width: 470px;
  height: 168px;
  display: block;
}

.stats-divider {
  width: 1px;
  background: #d0d0d0;
  margin: 2px 0;
}

.stats-right {
  width: 210px;
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}
.boardroom-frame {
  width: 206px;
  height: 84px;
  border-radius: 13px;
  overflow: hidden;
  background: #b5cbdb;
  margin-bottom: 6px;
}
#boardroom-canvas {
  width: 206px;
  height: 84px;
  display: block;
}
#shareholders-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #555;
  margin-bottom: 14px;
}
.balance-box {
  flex: 1;
}
#balance-title {
  font-size: 11px;
  font-weight: 700;
  color: #c8c8c8;
  margin-bottom: 5px;
}
.balance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-weight: 700;
  color: #555;
}
.balance-table td { padding: 1.5px 0; }
.balance-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.balance-table tr.sep td {
  border-top: 1px solid #d0d0d0;
  padding-top: 6px;
}

/* ==================== AUTHENTIC NIGERIAN RESTAURANT MENU (Screenshot #3) ==================== */
.africa-book-modal {
  width: 322px;
  height: 308px;
  max-height: 312px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  transform: translate(-50%, -50%) rotate(-1.2deg);
}
.africa-close {
  top: 10px;
  right: -12px;
  width: 28px;
  height: 28px;
}
.africa-book-art {
  position: absolute;
  inset: 0;
  width: 322px;
  height: 300px;
  display: block;
  pointer-events: none;
}
.africa-page-overlay {
  position: absolute;
  left: 100px;
  top: 63px;
  width: 196px;
  height: 228px;
  font-family: "Palatino", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: #1f1914;
  text-align: center;
  transform: rotate(-1deg);
}
.africa-today {
  font-size: 10.5px;
  color: #3a2e25;
  margin-bottom: 6px;
}
#africa-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 196px;
  overflow-y: auto;
}
.africa-item {
  cursor: pointer;
  padding: 3px 11px;
  border-radius: 4px;
  transition: background 0.12s;
  position: relative;
}
.africa-item:hover {
  background: rgba(255, 204, 0, 0.25);
}
.africa-item::before,
.africa-item::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 1.5px;
  background: linear-gradient(180deg, transparent, #3b2d22 20%, #3b2d22 80%, transparent);
}
.africa-item::before { left: 4px; }
.africa-item::after { right: 4px; }
.africa-item-head {
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: #1a1410;
  margin-bottom: 1px;
}
.africa-desc {
  font-size: 9.5px;
  line-height: 1.15;
}
.africa-price-tag {
  white-space: nowrap;
}
.africa-item.cant-afford {
  opacity: 0.55;
}
.africa-item.cant-afford .africa-price-tag {
  color: #a81c1c;
}
.africa-no-money {
  margin-top: 3px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #b81d1d;
  text-transform: uppercase;
}
.africa-desc {
  font-size: 11px;
  font-style: italic;
  line-height: 1.3;
  color: #2c241d;
}

/* ==================== AUTHENTIC CONGRESSIONAL ACT MODAL (Slate-Blue + Crisp White Text!) ==================== */
.act-modal {
  width: 590px;
  height: 256px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.act-modal .modal-close-svg { top: 0; right: 10px; }
.act-bg-art {
  position: absolute;
  right: 14px;
  top: 6px;
  width: 486px;
  height: 240px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}
.act-aid-badge {
  position: absolute;
  left: 4px;
  top: 42px;
  width: 94px;
  text-align: center;
  z-index: 3;
}
#act-aid-img { width: 76px; height: auto; display: block; margin: 0 auto 5px; }
#act-stamp-label {
  background: #ffffff;
  color: #111111;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 5px;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.4);
  line-height: 1.15;
}
.act-doc {
  position: relative;
  z-index: 2;
  margin-left: 112px;
  margin-right: 34px;
  padding-top: 26px;
  text-align: center;
  font-family: Georgia, "Palatino Linotype", serif;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
#act-title {
  margin: 0 0 4px;
  font-size: 17px;
  text-transform: uppercase;
  color: #ffffff;
}
.act-header {
  font-size: 10px;
  letter-spacing: 2px;
  color: #d6dfee;
  font-weight: 700;
  margin-bottom: 10px;
}
#act-desc {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.42;
  color: #f0f4fa;
}
.act-eff {
  font-family: "Arial Narrow", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffdd44;
  text-transform: uppercase;
}

/* Situation Room */
#modal-undercover {
  position: fixed;
  z-index: 70;
  width: 704px;
  max-height: none;
  padding: 0;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
  border: 2px solid #242b30;
  border-radius: 12px;
  background: #f4f2e9;
  color: #242b30;
  box-shadow: 0 12px 34px rgba(13, 18, 22, 0.55);
}
#modal-undercover:focus { outline: none; }
#modal-undercover :is(button, select):focus-visible {
  outline: 2px solid #27628a;
  outline-offset: 2px;
}
#modal-undercover .modal-close-svg {
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
}
.uc-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 9px 47px 8px 12px;
  border-bottom: 1px solid #d5d2c6;
  background: #fffdf7;
}
.uc-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}
.uc-month {
  color: #555b5e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.uc-layout {
  display: grid;
  grid-template-columns: 384px minmax(0, 1fr);
  gap: 11px;
  padding: 11px;
}
.uc-map-board {
  align-self: start;
  border: 1px solid #8ca6a4;
  border-radius: 8px;
  overflow: hidden;
  background: #fffdf7;
}
.uc-map-wrap { position: relative; }
.uc-map-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.uc-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.uc-pin::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid #386173;
  border-radius: 50%;
  background: #ffe37b;
  box-shadow: 0 1px 2px #294c5966;
}
.uc-pin:hover::before { background: #fff2a7; }
.uc-pin[aria-pressed="true"] { z-index: 1; }
.uc-pin[aria-pressed="true"]::before {
  background: #ffce36;
  border-color: #233d52;
  box-shadow: 0 0 0 2px #fff4ca, 0 0 0 4px #527e8b;
}
.uc-stability-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 6px 4px;
  border-top: 1px solid #b5c5be;
  font-size: 11.5px;
  text-align: center;
}
.uc-stability-bar > div + div { border-left: 1px solid #deddd2; }
.uc-stability-bar dt { color: #555b5e; line-height: 1.1; }
.uc-stability-bar dd {
  margin: 1px 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.stab-low { color: #2e6545; }
.stab-medium { color: #80531c; }
.stab-high { color: #953d26; }
.stab-critical { color: #a02e35; }
.uc-side { min-width: 0; }
.uc-briefing,
.uc-placeholder {
  min-height: 100%;
  margin: 0;
  border: 1px solid #d4cfc0;
  border-radius: 8px;
  background: #fffdf7;
}
.uc-briefing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 11px 12px;
}
.uc-placeholder {
  display: grid;
  align-content: center;
  padding: 16px;
  color: #535959;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}
.uc-briefing-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 5px 8px;
  width: 100%;
  margin: 0 0 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e1ded3;
}
.uc-location {
  margin: 0;
  color: #395e70;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.uc-operation-select {
  max-width: 100%;
  width: 113px;
  margin: 0;
  padding: 4px 5px;
  border: 1px solid #bbb8ae;
  border-radius: 5px;
  background: #ffffff;
  color: #242b30;
  font: 700 12px/1.2 "ConduitITC", sans-serif;
}
.uc-briefing-copy { flex: 1; }
.uc-briefing h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.uc-briefing-copy p {
  margin: 0 0 12px;
  color: #434a4d;
  font-size: 13.5px;
  line-height: 1.35;
}
#uc-launch-btn {
  min-height: 28px;
  background: #ffdd33;
  color: #1c1c1a;
  font-size: 14px;
}
#uc-launch-btn:hover:not(:disabled) { background: #f5c800; }
#uc-launch-btn:disabled {
  background: #ece9df;
  color: #595956;
  cursor: default;
}

@media (max-width: 550px) and (orientation: portrait) {
  #modal-undercover {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    transform: translate(-50%, -50%);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .uc-header { flex-wrap: wrap; }
  .uc-header h2 { font-size: 20px; }
  #modal-undercover .modal-close-svg { width: 30px; height: 30px; }
  .uc-layout { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 9px; }
  .uc-pin { width: 30px; height: 30px; }
  .uc-pin::before { width: 15px; height: 15px; }
  .uc-stability-bar, .uc-location { font-size: 13px; }
  .uc-briefing h3 { font-size: 19px; }
  .uc-briefing-copy p { font-size: 16px; }
  .uc-operation-select { width: 148px; min-height: 36px; font-size: 16px; }
  #uc-launch-btn { min-height: 42px; font-size: 16px; }
}

/* Silicon Feed — Modern Social Timeline (X / Bluesky aesthetic) */
.feed-modal {
  position: fixed;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 604px;
  height: 288px;
  max-height: none;
  padding: 0;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
  border: 1px solid #cfd9de;
  border-radius: 14px;
  background: #ffffff;
  color: #0f1419;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
}

.feed-modal:focus { outline: none; }
.feed-modal :is(button, .feed-list):focus-visible {
  outline: 2px solid #1d9bf0;
  outline-offset: 1px;
}

.feed-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 38px 0 12px;
  height: 36px;
  flex-shrink: 0;
  border-bottom: 1px solid #eff3f4;
  background: rgba(255, 255, 255, 0.96);
}

.feed-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.feed-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #0f1419;
  color: #ffffff;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

#feed-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #0f1419;
  line-height: 1;
}

.feed-tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 2px;
}

.feed-tab {
  position: relative;
  background: transparent;
  border: none;
  padding: 0 10px;
  font: 600 11.5px/1 inherit;
  color: #536471;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}
.feed-tab:hover {
  background: #f7f9f9;
  color: #0f1419;
}
.feed-tab.active {
  color: #0f1419;
  font-weight: 800;
}
.feed-tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: #1d9bf0;
}

.feed-header .modal-close-svg {
  top: 6px;
  right: 8px;
  width: 23px;
  height: 23px;
}

.feed-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  flex: 1;
  min-height: 0;
}

.feed-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid #eff3f4;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #ffffff;
}

.feed-empty {
  margin: 0;
  padding: 28px 14px;
  color: #536471;
  font-size: 12px;
  text-align: center;
}

#feed-posts {
  display: flex;
  flex-direction: column;
}

.feed-post {
  display: flex;
  gap: 9px;
  padding: 9px 12px 8px;
  border-bottom: 1px solid #eff3f4;
  background: #ffffff;
  transition: background-color 0.1s;
  overflow-wrap: anywhere;
}
.feed-post:hover {
  background: #fafcfd;
}
.feed-post-selected {
  background: #f0f7ff;
  box-shadow: inset 3px 0 0 #1d9bf0;
}

.feed-avatar-col {
  flex: none;
  padding-top: 1px;
}
.feed-avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feed-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feed-avatar-img[hidden],
.feed-avatar-glyph[hidden] {
  display: none;
}
.feed-avatar-glyph {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.feed-main-col {
  flex: 1;
  min-width: 0;
}

.feed-post-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.15;
  margin-bottom: 2px;
}

.feed-author {
  font-size: 12px;
  font-weight: 800;
  color: #0f1419;
}

.feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  font-size: 8.5px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
}
.feed-badge.blue { background: #1d9bf0; }
.feed-badge.gold { background: #e2a800; border-radius: 3px; }
.feed-badge.green { background: #76b900; }
.feed-badge.gray { background: #64748b; }
.feed-badge:empty { display: none; }

.feed-handle,
.feed-sep,
.feed-date {
  font-size: 11px;
  color: #536471;
  white-space: nowrap;
}

.feed-body {
  margin: 0;
  font-size: 11.8px;
  line-height: 1.36;
  color: #0f1419;
}

.feed-quote {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #cfd9de;
  border-radius: 9px;
  background: #f8fafc;
}
.feed-quote-tag {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1px;
}
.feed-quote-tag.pro { color: #0284c7; }
.feed-quote-tag.reg { color: #b91c1c; }
.feed-quote-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f1419;
  line-height: 1.2;
}
.feed-quote-desc {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.3;
  color: #475569;
}

.feed-note {
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  background: #f7f9fc;
}
.feed-note-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  color: #334155;
}
.feed-note-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  font-style: italic;
}
.feed-note-text {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.3;
  color: #334155;
}
.feed-note-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.feed-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
}
.feed-chip.pos { background: #dcfce7; color: #166534; }
.feed-chip.neg { background: #fee2e2; color: #991b1b; }
.feed-chip.neu { background: #e0f2fe; color: #075985; }

.feed-reply {
  margin-top: 6px;
  padding: 3px 0 3px 8px;
  border-left: 2px solid #cfd9de;
  font-size: 10.5px;
  line-height: 1.3;
  color: #475569;
}
.feed-reply-handle {
  color: #0f1419;
  font-weight: 700;
  margin-right: 4px;
}

.feed-eng-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  color: #536471;
  font-size: 10.5px;
}
.feed-eng-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.feed-like-btn {
  background: transparent;
  border: none;
  padding: 1px 4px;
  margin: -1px -4px;
  border-radius: 999px;
  font: inherit;
  color: #536471;
  cursor: pointer;
}
.feed-like-btn:hover {
  background: #fce7f3;
  color: #e11d48;
}
.feed-like-btn.liked {
  color: #f91880;
  font-weight: 700;
}

.feed-action {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid #cfd9de;
  border-radius: 999px;
  background: #ffffff;
  color: #1d9bf0;
  font: 700 10px/1.2 inherit;
  cursor: pointer;
  white-space: nowrap;
}
.feed-action:hover {
  background: #e8f5fd;
  border-color: #1d9bf0;
}

/* Right Sidebar: Trending Now + Timeline Vibe */
.feed-sidebar {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  overflow-y: auto;
}
.feed-side-card {
  background: #f7f9f9;
  border: 1px solid #eff3f4;
  border-radius: 10px;
  padding: 6px 8px;
}
.feed-side-title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: #0f1419;
}
.feed-trends {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feed-trend-item {
  line-height: 1.15;
}
.feed-trend-cat {
  font-size: 8.5px;
  color: #536471;
}
.feed-trend-tag {
  font-size: 11px;
  font-weight: 800;
  color: #0f1419;
}
.feed-trend-meta {
  font-size: 9px;
  color: #536471;
}
.feed-vibe-row {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #475569;
  margin-top: 3px;
}
.feed-vibe-row b {
  color: #0f1419;
}
.feed-vibe-bar {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 2px;
}
.feed-vibe-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}
.feed-vibe-fill.hype { background: #1d9bf0; }
.feed-vibe-fill.anx { background: #f43f5e; }

@media (max-width: 600px) and (orientation: portrait) {
  .feed-modal {
    width: calc(100% - 16px);
    height: min(560px, calc(100dvh - 20px));
    transform: translate(-50%, -50%);
  }
  .feed-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .feed-sidebar {
    display: none;
  }
  .feed-list {
    border-right: none;
  }
  .feed-header {
    height: 44px;
    padding: 0 42px 0 12px;
  }
  .feed-header .modal-close-svg { width: 28px; height: 28px; top: 8px; }
  .feed-body { font-size: 14px; }
  .feed-author { font-size: 14px; }
  .feed-handle, .feed-date { font-size: 12px; }
  .feed-eng-bar { font-size: 12px; }
  .feed-action { font-size: 12px; padding: 4px 10px; }
}

/* ==================== HELP & IN-GAME MENU ==================== */
.help-modal {
  width: 480px;
  padding: 14px 18px;
}
#help-text {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.4;
  text-align: justify;
}

.ingame-menu-modal {
  width: 175px;
  padding: 16px 14px;
  background: #ffffff;
  border-radius: 6px;
}
.menu-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-pill {
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 5px 14px 6px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.25px;
  line-height: 1.0;
  cursor: pointer;
}
.menu-pill:hover {
  color: #ff9900;
}

/* ==================== AUTHENTIC DEMOCRACY! ELECTION INTRO & WHITE 3-COL OUTRO ==================== */
.el-intro-modal {
  width: 750px;
  height: 300px;
  max-height: 300px;
  padding: 0;
  background: #cc0000;
  box-shadow: none;
  overflow: hidden;
}
.el-intro-art {
  position: absolute;
  inset: 0;
  width: 750px;
  height: 300px;
  display: block;
  pointer-events: none;
}
.el-democracy-banner {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.0;
  color: #ffffff;
  -webkit-text-stroke: 2px #0f3688;
  text-shadow:
    0 2px 0 #1b4399,
    0 4px 0 #16377e,
    0 6px 0 #112a61,
    0 8px 0 #0c1f49,
    0 11px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.el-vs-badge {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.0;
  color: #ffcc00;
  -webkit-text-stroke: 1.5px #8e5800;
  text-shadow: 0 3px 0 #7a3e00, 0 5px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.el-intro-animal {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}
.el-intro-animal.left {
  left: -46px;
  top: 44px;
  height: 214px;
  transform: rotate(6deg);
}
.el-intro-animal.right {
  right: -52px;
  top: 38px;
  height: 214px;
  transform: scaleX(-1) rotate(-4deg);
}
.el-intro-overlay {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 54px 152px 0;
}
.el-side {
  width: 175px;
  background: transparent;
  border: none;
  padding: 0;
  margin-top: -12px;
}
.el-side.left { text-align: left; }
.el-side.right { text-align: right; }
.el-party-lbl {
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #000000;
  line-height: 1.0;
}
.el-pop-lbl {
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #222222;
  margin-top: 2px;
  line-height: 1.0;
}
.el-pop-num {
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #000000;
  line-height: 1.0;
  margin-top: 1px;
}
.el-center-btns {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.el-part-btn {
  min-width: 158px;
  font-size: 22px;
  padding: 5px 22px 6px;
  border-radius: 17px;
}
.el-skip-btn {
  min-width: 78px;
  font-size: 17px;
  padding: 3px 18px 4px;
  border-radius: 13px;
}

/* Full-Stage Pure White 3-Column Election Results Modal (1:1 with Flash 15_election_results.png) */
.el-outro-modal {
  width: 750px;
  height: 300px;
  max-height: 300px;
  padding: 6px 14px 7px;
  background: #ffffff;
  color: #111111;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.el-outro-grid {
  display: grid;
  grid-template-columns: 218px 1px 1fr 1px 168px;
  gap: 0 12px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.el-vdiv {
  background: #e4e4e4;
  margin: 26px 0 6px;
  position: relative;
}
.el-vdiv-notch::before {
  content: "";
  position: absolute;
  left: 0;
  top: 44px;
  width: 11px;
  height: 11px;
  background: #ffffff;
  border-top: 1px solid #e4e4e4;
  border-right: 1px solid #e4e4e4;
  transform: translateX(-5.5px) rotate(45deg);
}
.el-col h3 {
  margin: 0 0 6px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #555555;
  letter-spacing: 0.2px;
  line-height: 1.05;
  text-transform: uppercase;
  text-align: left;
}
.el-col.left {
  display: flex;
  flex-direction: column;
}
#election-pie {
  width: 196px;
  height: 122px;
  display: block;
  margin: 0 auto;
}
.el-votes-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #666666;
  margin-top: 2px;
}
.el-votes-tbl th {
  font-size: 13px;
  font-weight: 500;
  color: #888888;
  text-align: right;
  padding-bottom: 2px;
}
.el-votes-tbl th:nth-child(2) { text-align: left; padding-left: 8px; }
.el-votes-tbl td {
  text-align: right;
  padding: 1px 0;
  line-height: 1.15;
}
.el-votes-tbl td:first-child {
  text-align: left;
  color: #666666;
  white-space: nowrap;
}
.el-votes-tbl td:nth-child(2) {
  text-align: left;
  padding-left: 8px;
}
.el-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  vertical-align: -1px;
}
.el-swatch.rep { background: #cc0000; }
.el-swatch.dem { background: #0038a8; }

.el-col.mid {
  padding: 0 4px;
  display: flex;
  flex-direction: column;
}
.sil-group {
  margin-bottom: 10px;
}
.sil-caption {
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #555555;
  margin-bottom: 4px;
  line-height: 1.05;
}
.sil-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.sil-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sil-q {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #6f6f6f;
  line-height: 1;
}
.sil-figures {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
}
.sil-person {
  display: inline-block;
  flex-shrink: 0;
}
.el-col.right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 4px;
}
.pres-note {
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.15;
  color: #555555;
  text-align: left;
  margin-bottom: 8px;
}
.pres-note.oiled { color: #555555; }
.pres-sil {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
}
.el-continue-wrap {
  text-align: center;
  padding-top: 4px;
  flex-shrink: 0;
}
.el-cont-btn {
  padding: 3px 24px 4px;
  font-size: 19px;
  border-radius: 15px;
}

/* ---- Authentic White Ending Card (matches Flash windowEnd) ---- */
.end-card-modal {
  width: 704px;
  height: 224px;
  padding: 14px 18px;
  background: #ffffff;
  color: #111111;
  border: 1px solid #bbb;
  z-index: 60;
}
.end-card-grid {
  display: flex;
  gap: 18px;
  height: 100%;
  align-items: stretch;
}
.end-art-box {
  width: 195px;
  height: 195px;
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #ccc;
  background: #e6eef5;
}
#end-art {
  width: 195px;
  height: 195px;
  display: block;
  object-fit: cover;
}
.end-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.end-text-col h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  color: #111111;
  line-height: 1.05;
}
.end-text-col p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: #222222;
  flex: 1;
}
.end-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
}
.end-stat-cell {
  background: #f4f6f9;
  border: 1px solid #dde3ec;
  border-radius: 5px;
  padding: 2px 6px 3px;
  min-width: 0;
}
.end-stat-lbl {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1.1;
}
.end-stat-val {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.end-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* ---- Bottom Controls Hint ---- */
#bottom-hints {
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: #9e9687;
}
kbd {
  background: #2b2722;
  color: #f0e8d8;
  border: 1px solid #524b40;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
}

/* ==================== POLISH ANIMATIONS & TACTILE FEEDBACK ==================== */
#world-canvas.scn-fade {
  animation: scnFade 0.16s ease-out;
}
@keyframes scnFade {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* Floating +$ / -$ cash delta popup above Gizmo */
.money-delta {
  position: absolute;
  left: 22px;
  top: 94px;
  width: 68px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3px;
  pointer-events: none;
  z-index: 40;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  animation: floatDelta 0.92s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.money-delta.pos { color: #39d956; }
.money-delta.neg { color: #ff4c3b; }
@keyframes floatDelta {
  0%   { opacity: 0; transform: translateY(4px) scale(0.85); }
  16%  { opacity: 1; transform: translateY(-4px) scale(1.06); }
  75%  { opacity: 1; transform: translateY(-20px) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.95); }
}

/* Crisp Flash-style modal & backdrop entrance animations */
#modal-backdrop {
  animation: backdropIn 0.16s ease-out;
}
@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card:not(.hidden) {
  animation: modalPop 0.19s cubic-bezier(0.2, 1.12, 0.32, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.africa-book-modal:not(.hidden) {
  animation: bookOpen 0.22s cubic-bezier(0.2, 1.1, 0.32, 1);
}
@keyframes bookOpen {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}

#world-popover:not(.hidden) {
  animation: popMini 0.13s ease-out;
}
@keyframes popMini {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.top-tab,
#comm-archive-btn,
.menu-pill {
  transition: color 0.1s ease, background-color 0.12s ease, transform 0.08s ease;
}
.top-tab:active,
#comm-archive-btn:active,
.menu-pill:active {
  transform: scale(0.96);
}


/* ==================== NVIDIA CIRCULAR FINANCING MODAL ==================== */
.nvidia-modal {
  width: 472px;
  max-height: 274px;
  background: #101712;
  color: #eef7e8;
  border: 2.5px solid #76b900;
  border-radius: 10px;
  padding: 10px 14px 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.72), 0 0 18px rgba(118, 185, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nv-header {
  text-align: center;
}
.nv-badge {
  display: inline-block;
  background: #76b900;
  color: #0b1208;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 2px;
}
.nv-header h3 {
  margin: 0;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #ffffff;
  line-height: 1.05;
}
.nv-loop-strip {
  margin-top: 2px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #a3e635;
}
.nv-metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #19241b;
  border: 1px solid #2e4231;
  border-radius: 6px;
  padding: 4px 10px;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 12px;
  color: #c5d6c3;
}
.nv-metrics b {
  color: #ffffff;
}
.nv-ready {
  color: #76b900 !important;
  font-weight: 700;
}
.nv-wait {
  color: #f59e0b !important;
  font-weight: 700;
}
.nv-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 162px;
  padding-right: 2px;
}
.nv-item {
  background: #17211a;
  border: 1.5px solid #304734;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.nv-item:hover:not(.disabled) {
  border-color: #76b900;
  background: #203024;
  transform: translateY(-1px);
}
.nv-item.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.nv-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}
.nv-cash-tag {
  background: #76b900;
  color: #0b1208;
  font-size: 12.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 4px;
}
.nv-desc {
  font-size: 10.5px;
  line-height: 1.25;
  color: #b7c9b6;
}

/* ==================== GUIDED OPENING BANNER ==================== */
#opening-guide {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  background: rgba(14, 20, 30, 0.90);
  color: #fff6d6;
  border: 1.5px solid #ffd200;
  border-radius: 999px;
  padding: 3px 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: opacity 0.12s ease;
}
#action-bar:hover ~ #opening-guide,
#action-bar.pinned ~ #opening-guide {
  opacity: 0;
}
#opening-guide b {
  color: #42f0ff;
}

/* ==================== APEX AI CONTRACT MODAL ==================== */
.apex-modal {
  width: 452px;
  background: #101926;
  color: #eef6ff;
  border: 2.5px solid #38bdf8;
  border-radius: 10px;
  padding: 12px 16px 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.apex-badge {
  display: inline-block;
  align-self: center;
  background: #38bdf8;
  color: #0b1624;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 1px 9px;
  border-radius: 999px;
}
.apex-quote {
  margin: 0;
  font-size: 12px;
  line-height: 1.32;
  color: #dbeafe;
  text-align: center;
  font-style: italic;
}
.apex-contract-box {
  background: #172436;
  border: 1.5px solid #2c4666;
  border-radius: 7px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.apex-contract-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "ConduitITC", "Arial Narrow", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}
.apex-advance {
  background: #38bdf8;
  color: #081320;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 800;
}
.apex-contract-desc {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.25;
}
.apex-btn-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}

/* ==================== ELECTION PAC ROI PUNCHLINE ==================== */
.el-roi-line {
  margin-top: 4px;
  background: #fff7d6;
  border: 1px solid #e0b800;
  border-radius: 5px;
  padding: 3px 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  color: #1a1608;
  text-align: center;
  line-height: 1.2;
}
