/*
 * Server-projection compatibility only.
 *
 * The recovered game.css is the canonical presentation contract.  Every rule in
 * this compatibility sheet must bridge secure server-rendered DOM to that
 * contract or style a genuinely new account/achievement control.  It must not
 * redesign recovered game content.
 */
/* Exact local copy of the recovered newspaper typeface; this declaration
 * wins when the external stylesheet is unavailable or delayed. */
@font-face {
  font-family: "UnifrakturMaguntia";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/unifraktur-maguntia.ttf") format("truetype");
}
[hidden] { display: none !important; }

/* The no-session screen keeps the recovered game's original start menu visible
 * until the server issues a game session. */
#landing-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--link-color);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#landing-menu li:hover,
#landing-menu li:focus-within { background: var(--link-hover-color); }
body.landing-page #landing-menu button,
body.landing-page #scene-choices .choice {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
}
body.landing-page #landing-start,
body.landing-page #scene-choices > li:first-child .choice,
body.landing-page #new-session {
  font-weight: 700;
}

/* Reversible landing-menu image experiment. Remove
 * `landing-menu-image-experiment` from <body> to restore the original menu. */
body.landing-page.landing-menu-image-experiment #content {
  isolation: isolate;
  overflow: visible;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}
body.landing-page.landing-menu-image-experiment #content::before,
body.landing-page.landing-menu-image-experiment #content::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
body.landing-page.landing-menu-image-experiment #content::before {
  inset: -4.75em -7em;
  background:
    radial-gradient(ellipse 68% 45% at 34% 18%, rgb(248 246 239 / 97%) 0 38%, transparent 76%),
    radial-gradient(ellipse 58% 62% at 70% 49%, rgb(243 243 243 / 94%) 0 42%, transparent 78%),
    radial-gradient(ellipse 74% 42% at 42% 84%, rgb(248 246 239 / 91%) 0 34%, transparent 76%),
    radial-gradient(ellipse 54% 86% at 50% 50%, rgb(243 243 243 / 98%) 0 43%, rgb(243 243 243 / 64%) 66%, transparent 91%);
  -webkit-mask-image: radial-gradient(
    ellipse closest-side at 50% 49%,
    #000 0 42%,
    rgb(0 0 0 / 92%) 55%,
    rgb(0 0 0 / 58%) 70%,
    rgb(0 0 0 / 16%) 86%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse closest-side at 50% 49%,
    #000 0 42%,
    rgb(0 0 0 / 92%) 55%,
    rgb(0 0 0 / 58%) 70%,
    rgb(0 0 0 / 16%) 86%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: blur(1.2em);
  transform: translateZ(0);
}
body.landing-page.landing-menu-image-experiment #content::after {
  inset: -3.5em -6em;
  background:
    radial-gradient(ellipse 37% 27% at 16% 34%, rgb(255 253 245 / 66%) 0 28%, transparent 76%),
    radial-gradient(ellipse 44% 31% at 86% 62%, rgb(255 253 245 / 61%) 0 24%, transparent 74%),
    radial-gradient(ellipse 38% 23% at 48% 94%, rgb(255 253 245 / 57%) 0 22%, transparent 72%);
  -webkit-mask-image: radial-gradient(
    ellipse closest-side at center,
    #000 0 35%,
    rgb(0 0 0 / 78%) 57%,
    rgb(0 0 0 / 25%) 79%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse closest-side at center,
    #000 0 35%,
    rgb(0 0 0 / 78%) 57%,
    rgb(0 0 0 / 25%) 79%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: blur(1.8em);
  animation: landing-content-mist 14s ease-in-out infinite alternate;
}
@keyframes landing-content-mist {
  from { opacity: 0.84; transform: translate3d(-0.35em, -0.2em, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0.45em, 0.3em, 0) scale(1.015); }
}
body.landing-page.landing-menu-image-experiment #content > .scene-heading {
  position: relative;
  isolation: isolate;
}
body.landing-page.landing-menu-image-experiment #content > .scene-heading::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.8em -6.5em -2.4em;
  background: radial-gradient(
    ellipse closest-side at center,
    rgb(255 253 245 / 100%) 0 38%,
    rgb(255 253 245 / 88%) 55%,
    rgb(255 253 245 / 48%) 72%,
    rgb(255 253 245 / 12%) 88%,
    transparent 100%
  );
  filter: blur(0.9em);
  pointer-events: none;
}
body.landing-page.landing-menu-image-experiment :is(#game-title-2, #game-author-2) {
  display: none !important;
}
body.landing-page.landing-menu-image-experiment :is(#landing-menu, #scene-choices) {
  background: url("/img/hiiii.jpeg") center 72% / cover no-repeat;
}
body.landing-page.landing-menu-image-experiment :is(#landing-menu, #scene-choices) li {
  background-color: transparent;
  background-image: radial-gradient(
    ellipse 40% 76% at center,
    rgb(248 245 235 / 84%) 0%,
    rgb(248 245 235 / 60%) 42%,
    rgb(248 245 235 / 0%) 75%
  );
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color 180ms ease, backdrop-filter 180ms ease;
}
body.landing-page.landing-menu-image-experiment :is(#landing-menu, #scene-choices) li:hover,
body.landing-page.landing-menu-image-experiment :is(#landing-menu, #scene-choices) li:focus-within {
  background-color: rgb(243 243 243 / 28%);
  -webkit-backdrop-filter: blur(1.5px) saturate(94%) contrast(96%);
  backdrop-filter: blur(1.5px) saturate(94%) contrast(96%);
}
@media (prefers-reduced-motion: reduce) {
  body.landing-page.landing-menu-image-experiment :is(#landing-menu, #scene-choices) li {
    transition: none;
  }
  body.landing-page.landing-menu-image-experiment #content::after {
    animation: none;
  }
}
body.landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -98;
  background: var(--bg-color);
  opacity: 0.10;
  pointer-events: none;
}
body.landing-page.intro-gated::before {
  opacity: 0;
}
body.landing-page.intro-revealing::before {
  animation: landing-veil-fade-in 1400ms ease both;
}
#intro-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  pointer-events: auto;
}
#intro-gate-action {
  min-height: 44px;
  border: 2px solid var(--border-color);
  border-radius: 0;
  background: rgb(243 243 243 / 72%);
  padding: 0.5em 1em;
  color: var(--text-color);
  font-family: "Minion Pro", Georgia, serif;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#intro-gate-action:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.intro-gate-keyboard-label { display: none; }
.intro-gate-touch-label { display: inline; }
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  .intro-gate-keyboard-label { display: inline; }
  .intro-gate-touch-label { display: none; }
}
html.touch-input .intro-gate-keyboard-label { display: none; }
html.touch-input .intro-gate-touch-label { display: inline; }
body.intro-gated #intro-gate {
  display: flex;
}
body.intro-gated #page,
body.intro-gated #contentSpriteContainer,
body.intro-gated #news-fab,
body.intro-gated #advisors-fab,
body.intro-gated #achievement-toast {
  visibility: hidden;
  opacity: 0;
}
body.intro-revealing #intro-gate {
  display: flex;
  animation: intro-gate-fade-out 1400ms ease both;
}
body.intro-revealing #page,
body.intro-revealing #contentSpriteContainer,
body.intro-revealing #news-fab,
body.intro-revealing #advisors-fab,
body.intro-revealing #achievement-toast {
  animation: intro-ui-fade-in 1400ms ease both;
}
@keyframes landing-veil-fade-in {
  from { opacity: 0; }
  to { opacity: 0.10; }
}
@keyframes intro-gate-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes intro-ui-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
#scene-title.landing-title {
  font-weight: 700;
  text-shadow: 2px 2px 3px rgb(0 0 0 / 35%);
}
#stats_sidebar.landing-poster-mode {
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 0.8em));
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-7.05rem);
}
#stats_sidebar.landing-poster-mode #status-tabs { display: none; }
body.landing-page #native-news,
body.opening-campaign-screen #stats_sidebar {
  display: none !important;
}
#landing-status-poster {
  box-sizing: border-box;
  border: 3px solid #000;
}
@media (max-width: 1024px) {
  #stats_sidebar.landing-poster-mode {
    width: calc(100vw - 0.8em);
    transform: none;
  }
}
.landing-status h2 {
  margin: 0.75em 0;
  text-align: center;
  font-size: 1.15em;
  letter-spacing: 0.08em;
}
.landing-status p { margin-bottom: 0.9em; font-weight: normal; }
.landing-status p b { font-weight: bold; }
.landing-economics {
  width: fit-content;
  margin: 0.8em auto 1em !important;
  border: 2px solid var(--border-color);
  padding: 0.35em 0.65em;
  text-indent: 0;
  letter-spacing: 0.04em;
}

#campaign-radio-organizer {
  display: none;
  box-sizing: border-box;
  width: 16rem;
  border: 0;
  color: #000;
  font-size: 1.08em;
  transform: translateX(-1rem);
}
html.pre-game body:not(.landing-page) #campaign-radio-organizer {
  display: block;
}
#campaign-radio-organizer h2 {
  margin: 0.75em 0;
  font-size: 1.15em;
  letter-spacing: 0.08em;
  text-align: center;
}
#campaign-radio-tracks {
  margin-top: 0;
  border: 2px solid #000;
  border-radius: 0;
}
.campaign-radio-track {
  position: relative;
  display: grid;
  grid-template-columns: 0.9em minmax(0, 1fr);
  gap: 0.25em;
  align-items: center;
  border-bottom: 2px solid #000 !important;
  color: #000;
  cursor: default;
}
#campaign-radio-tracks .campaign-radio-track.is-added {
  background-color: rgb(45 90 27 / 24%);
}
#campaign-radio-tracks .campaign-radio-track.is-excluded {
  background-color: rgb(176 0 0 / 20%);
}
#campaign-radio-tracks .campaign-radio-track.is-locked {
  background-color: #ddd;
}
.campaign-radio-track.is-partition { border-bottom-width: 4px !important; }
.campaign-radio-track:last-child { border-bottom: 0 !important; }
.campaign-radio-track:focus { outline: none; }
.campaign-radio-track:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
.campaign-radio-track.dragging { opacity: 0.45; }
.campaign-radio-track.drop-before::before,
.campaign-radio-track.drop-after::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 2px;
  background: #000;
}
.campaign-radio-track.drop-before::before { top: -1px; }
.campaign-radio-track.drop-after::after { bottom: -1px; }
.campaign-radio-grip {
  color: inherit;
  font-family: sans-serif;
  line-height: 1;
  cursor: grab;
  user-select: none;
}
.campaign-radio-grip:active { cursor: grabbing; }
.campaign-radio-track.is-locked .campaign-radio-grip { cursor: not-allowed; }
.campaign-radio-details {
  min-width: 0;
  align-self: center;
  text-align: center;
}
.campaign-radio-name {
  display: block;
  min-width: 0;
  list-style: none;
  font-size: 1em;
  font-style: italic;
  text-align: center;
  cursor: pointer;
}
.campaign-radio-name::-webkit-details-marker { display: none; }
.campaign-radio-context {
  margin: 0.45em 0 0.1em;
  color: inherit;
  font-size: 0.8em;
  font-style: normal;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.campaign-radio-requirement {
  margin: 0.45em 0 0.25em;
  font-size: 0.8em;
  font-style: italic;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}
@media screen and (max-width: 767px) {
  html.pre-game body:not(.landing-page) #campaign-radio-organizer {
    float: none;
    width: auto;
    margin: 0.4em;
    transform: none;
  }
}

html.hugenberg-mode {
  --bg-color: #0b1426 !important;
  --content-bg-color: rgb(14 26 56 / 95%) !important;
  --border-color: #0a111f !important;
  --text-color: #fff !important;
  --link-color: #fff !important;
  --link-hover-color: rgb(255 255 255 / 12%) !important;
  --tab-bg-color: #0b1426 !important;
  --tab-color: #080f1a !important;
  --tab-hover-color: #122340 !important;
  --card-border-color: #0a111f !important;
  --card-bg-color: rgb(20 36 74 / 95%) !important;
}
#hugenberg-bg {
  position: fixed;
  inset: -10vh 0 0;
  z-index: -50;
  height: 110vh;
  overflow: hidden;
  background: #0b1426;
  pointer-events: none;
}
.hugenberg-bg-layer {
  position: absolute;
  inset: 0;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 3s ease;
}
.hugenberg-bg-layer.active { opacity: 1; }
html.hugenberg-mode #content,
html.hugenberg-mode .tools,
html.hugenberg-mode footer,
html.hugenberg-mode #native-news { background-color: rgb(14 26 56 / 95%) !important; }
html.hugenberg-mode #dnvp_dashboard,
html.hugenberg-mode #native-news { display: none !important; }
html.hugenberg-mode header { background-color: transparent !important; }
html.hugenberg-mode #header-links,
html.hugenberg-mode .tab_container,
html.hugenberg-mode .tab_button { background-color: rgb(8 15 28 / 95%) !important; color: #fff !important; }
html.hugenberg-mode .tab_button.active { background-color: rgb(14 26 56 / 95%) !important; }
html.hugenberg-mode .tab_button:hover { background-color: #122340 !important; }
html.hugenberg-mode #content,
html.hugenberg-mode .tools,
html.hugenberg-mode header { color: #fff !important; }
html.hugenberg-mode #content ul.choices li.unavailable,
html.hugenberg-mode #content ul.choices li.unavailable * { color: #6d7c99 !important; }
html.hugenberg-mode #content ul.choices li.unavailable {
  border-color: rgb(255 255 255 / 8%) !important;
  background: rgb(0 0 0 / 30%) !important;
}
html.hugenberg-mode #content ul.choices li:not(.unavailable) {
  border-color: rgb(255 255 255 / 42%) !important;
  background: rgb(255 255 255 / 5%) !important;
}
html.hugenberg-mode #content ul.choices li:not(.unavailable):hover {
  background: rgb(255 255 255 / 13%) !important;
}

/* Recovery's Left Rubicon cascade: all ordinary chrome and prose becomes white,
 * while authored inline colours (party names, warnings, outcomes) stay intact. */
html.hugenberg-mode #content *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode .tools *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode #dnvp_dashboard *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode header *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]) {
  color: #fff !important;
}
html.hugenberg-mode #dnvp_dashboard { color: #fff !important; }
html.hugenberg-mode #content hr {
  border-color: #fff !important;
  background-color: #fff !important;
  color: #fff !important;
}

/* Bold and italic descendants of an authored coloured span inherit that colour
 * instead of being captured by the ordinary-white rule above. */
html.hugenberg-mode #content [style^="color:"] *,
html.hugenberg-mode #content [style*=";color:"] *,
html.hugenberg-mode #content [style*="; color:"] *,
html.hugenberg-mode .tools [style^="color:"] *,
html.hugenberg-mode .tools [style*=";color:"] *,
html.hugenberg-mode .tools [style*="; color:"] *,
html.hugenberg-mode #dnvp_dashboard [style^="color:"] *,
html.hugenberg-mode #dnvp_dashboard [style*=";color:"] *,
html.hugenberg-mode #dnvp_dashboard [style*="; color:"] *,
html.hugenberg-mode header [style^="color:"] *,
html.hugenberg-mode header [style*=";color:"] *,
html.hugenberg-mode header [style*="; color:"] * {
  color: inherit !important;
}

/* The secure projection replaces recovery's #economics-link anchor with this
 * button; preserve the same white Rubicon control and outline. */
html.hugenberg-mode #qualities .sidebar-economics-link button {
  border-color: #fff !important;
  background: transparent !important;
  color: #fff !important;
}
html.hugenberg-mode #content .spd-list-expand-btn,
html.hugenberg-mode #content .dnvp-list-expand-btn,
html.hugenberg-mode #content .cnbl-expand-btn,
html.hugenberg-mode #content #others-expand-btn,
html.hugenberg-mode [class$="-expand-btn"] {
  border-color: #fff !important;
  background: transparent !important;
  color: #fff !important;
}

/* Keep disabled choices distinct after the broad ordinary-white cascade. */
html.hugenberg-mode #content ul.choices li.unavailable,
html.hugenberg-mode #content ul.choices li.unavailable * {
  color: #6d7c99 !important;
}
html.hugenberg-mode .native-tooltip,
html.hugenberg-mode .card-tooltip,
html.hugenberg-mode .rw-tip-div,
html.hugenberg-mode [class$="-tip"],
html.hugenberg-mode [class*="-tip "],
html.hugenberg-mode [class^="tip-"],
html.hugenberg-mode .ideology-tooltip-card {
  border-color: rgb(14 26 56 / 95%) !important;
  background: rgb(14 26 56 / 95%) !important;
  color: #fff !important;
  box-shadow: 2px 2px 10px rgb(0 0 0 / 55%) !important;
}
html.hugenberg-mode .native-tooltip *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode .card-tooltip *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode .rw-tip-div *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode [class$="-tip"] *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode [class*="-tip "] *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode [class^="tip-"] *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]),
html.hugenberg-mode .ideology-tooltip-title,
html.hugenberg-mode .ideology-tooltip-description {
  color: #fff !important;
}
html.hugenberg-mode .ideology-tooltip-card::after {
  border-top-color: rgb(14 26 56 / 95%) !important;
}
html.hugenberg-mode .ideology-tooltip-anchor.has-ideology-tooltip {
  text-decoration-color: #8fa6cc !important;
}

/* Recovery's cabinet remains a cream exception within the Rubicon shell. */
html.hugenberg-mode #cabinet_overview#cabinet_overview,
html.hugenberg-mode #cabinet_overview#cabinet_overview *:not([style^="color:"]):not([style*=";color:"]):not([style*="; color:"]) {
  color: #1a1a1a !important;
}
html.hugenberg-mode #exec_overview .exec-meter-label,
html.hugenberg-mode #exec_overview .exec-portrait-role,
html.hugenberg-mode #exec_overview .exec-portrait-name,
html.hugenberg-mode #exec_overview .exec-portrait-party,
html.hugenberg-mode #exec_overview .exec-priorities-text {
  color: #e6e6e6 !important;
}
html.hugenberg-mode #exec_overview .exec-meter-track,
html.hugenberg-mode #exec_overview .exec-meter-row.exec-meter-divider {
  border-color: #888 !important;
}

/* Native elements that replace the recovered client's inline JavaScript links. */
#header-links button {
  border: 0;
  background: transparent;
  padding: 0 0.75em 0 0;
  color: var(--link-color);
  font: inherit;
  cursor: pointer;
}
#header-links button:hover,
#header-links button:focus-visible { background: var(--link-hover-color); }

#status-tabs { margin-bottom: 0; }
.status-tab-row { display: flex; width: 100%; }
.status-tab-row .tab_button { flex: 1; }

#game-nav:empty { display: none; }
.nav-button {
  border: 0;
  background: var(--tab-color);
  padding: 10px;
  color: var(--text-color);
  font: inherit;
  cursor: pointer;
}
.nav-button:hover,
.nav-button:focus-visible { background: var(--tab-hover-color); }
.nav-button[aria-current="page"] { background: var(--content-bg-color); }

#scene-title:empty,
#scene-subtitle:empty,
#scene-choices:empty { display: none; }
html.native-scene-typing #scene-choices { display: none !important; }
#scene-subtitle { text-align: center; text-indent: 0; }
#game-error { border: 2px solid #900; padding: 0.5em; color: #900; text-indent: 0; }

/* Server-generated status fragments use the recovered sidebar's typography. */
#qualities .sidebar-metric { margin: 0 0 1em; }
#qualities .sidebar-office,
#qualities .sidebar-parliament { text-indent: 0; }
#qualities .sidebar-parliament { line-height: 1.3em; }
#qualities .backing-wrap {
  position: relative;
  display: inline;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
}
#content .economy-backing-wrap {
  position: relative;
  display: inline;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
#content .economy-backing-tip,
body > .economy-backing-tip.viewport-tooltip-visible {
  position: absolute;
  bottom: 125%;
  left: 0;
  z-index: 100;
  display: none;
  box-sizing: border-box;
  width: 260px;
  border: 2px solid #999;
  background: #fff;
  padding: 10px;
  color: #431;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 20%);
  font-size: 13px;
  font-weight: normal;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}
#content .economy-backing-wrap:hover .economy-backing-tip,
#content .economy-backing-wrap:focus-within .economy-backing-tip { display: block; }
#qualities .backing-wrap .backing-tip,
body > .backing-tip.viewport-tooltip-visible {
  position: absolute;
  bottom: 125%;
  left: 50%;
  z-index: 100;
  display: none;
  box-sizing: border-box;
  width: 260px;
  border: 2px solid #999;
  background: #fff;
  padding: 10px;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 20%);
  color: #431;
  /* The recovered tooltip is a normal-size paper inset.  A reduced font here
     made the party names in Others look like a different UI. */
  font-size: 1em;
  font-weight: normal;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transform: translateX(-50%);
  white-space: normal;
}
#qualities .backing-wrap:hover .backing-tip,
#qualities .backing-wrap:focus-within .backing-tip { display: block; }
#qualities .backing-tip-image,
body > .backing-tip.viewport-tooltip-visible .backing-tip-image {
  display: block;
  width: 100%;
  margin: 0 auto 4px;
  border: 1px solid #999;
}
#qualities .backing-tip-rows,
body > .backing-tip-rows.viewport-tooltip-visible { width: 260px !important; text-align: left !important; }
#qualities .backing-tip-row,
body > .backing-tip.viewport-tooltip-visible .backing-tip-row { display: block; line-height: 1.5; font-size: 1em; }
#qualities .sidebar-economics-link { margin-top: 8px; text-align: center; }
#qualities .sidebar-economics-link button,
#qualities .sidebar-action {
  border: 1px solid #431;
  background: transparent;
  padding: 4px 10px;
  color: #431;
  cursor: pointer;
}
#qualities .sidebar-economics-link button {
  font-family: Georgia, serif;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#qualities .sidebar-action { font: inherit; }
#qualities .sidebar-economy { margin-top: 1em; }
#qualities .sidebar-economy .sidebar-metric { margin: 0.3em 0; }
#qualities .sidebar-trend-up { color: #b00000; }
#qualities .sidebar-trend-down { color: #2d5a1b; }
#qualities .sidebar-radio { margin-top: 0.8em; margin-bottom: 15px; text-align: center; }
#qualities .sidebar-song {
  margin-bottom: 6px;
  color: #4a3728;
  font: italic 1em Georgia, serif;
  text-indent: 0;
}
#qualities .sidebar-radio-controls { display: flex; gap: 6px; justify-content: center; }
#qualities .sidebar-radio-controls button {
  border: 1px solid #000;
  border-radius: 0;
  background: none;
  padding: 2px 8px;
  color: #000;
  font-family: Georgia, serif;
  cursor: pointer;
}
#qualities .kaiser-wrap {
  position: relative;
  display: inline;
  cursor: help;
  text-decoration: underline dotted;
}
#qualities .kaiser-wrap .kaiser-tip,
body > .kaiser-tip.viewport-tooltip-visible {
  display: none;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #999;
  padding: 10px;
  width: 220px;
  font-size: 1em;
  text-align: center;
  z-index: 100;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}
#qualities .kaiser-wrap:hover .kaiser-tip,
#qualities .kaiser-wrap:focus .kaiser-tip { display: block; }
/* Status prose deliberately inherits the recovered game.css h1/p rhythm. */

#qualities .status-mission-heading {
  margin: 1em 0 0.5em;
  text-align: center;
}
#qualities .status-mission-title {
  margin: -8px 0 16px;
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
  padding: 15px;
  color: #000435;
  font-size: 1em;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  word-break: break-word;
}
#qualities .status-mission-title-join {
  margin: 2px 0;
  color: #000;
  font-size: 0.8em;
  letter-spacing: 0.2em;
}
#qualities .status-mission-image {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  height: 200px;
  margin: 16px auto;
  border: 2px solid #000435;
  object-fit: cover;
  cursor: pointer;
}
#qualities .status-mission-card.secondary .status-mission-image {
  height: auto;
  margin: 0 auto 8px;
  border: 1px solid #000;
  cursor: default;
}
#qualities .status-mission-metric { margin-top: 8px; text-align: center; }
#qualities .status-mission-metrics.primary .status-mission-metric {
  margin-top: 0;
  text-align: left;
}
#qualities .status-mission-metric-label,
#qualities .status-mission-metric-value { font-size: 0.85em; font-weight: 700; }
#qualities .status-mission-portrait {
  display: block;
  width: 100%;
  max-width: 150px !important;
  margin: 8px auto 0;
  border: 2px solid #000435;
}
#qualities .status-mission-caption { margin-top: 4px; font-size: 0.85em; font-weight: 700; text-align: center; }
#qualities .status-mission-office { font-size: 0.75em; letter-spacing: 0.1em; text-align: center; }

.entente-panel-handle {
  position: absolute;
  z-index: 50;
  display: flex;
  width: 20px;
  height: 60px;
  align-items: center;
  justify-content: center;
  border: 1px solid #431;
  border-right: 0;
  background: #f3f3f3;
  padding: 0;
  box-shadow: -2px 2px 6px rgb(0 0 0 / 10%);
  cursor: pointer;
}
.entente-panel-bars { display: flex; height: 100%; gap: 4px; padding: 4px 0; }
.entente-panel-bars i { display: block; width: 2px; background: #431; }
.entente-side-panel {
  position: absolute;
  z-index: 49;
  box-sizing: content-box;
  width: 220px;
  border: 1px solid #431;
  background: #f3f3f3;
  padding: 0.6em;
  box-shadow: -2px 2px 12px rgb(0 0 0 / 20%);
  color: #431;
  font: 0.9em Georgia, serif;
}
.entente-panel-title { margin-bottom: 8px; font-weight: 700; text-align: center; }
.entente-flag { width: 90px; height: 56px; border: 2px solid #000; object-fit: cover; }
.entente-side-panel > .entente-flag { display: block; margin: 0 auto 8px; }
.entente-cards { display: flex; min-height: 60px; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px; margin-bottom: 8px; }
.entente-card { width: 38px; height: 52px; border: 1px solid #333; background: #fff; }
.entente-deterrence { padding: 8px 4px; color: #8b0000; font-style: italic; font-weight: bold; line-height: 1.3; text-align: center; }
.entente-allied-flags { display: flex; justify-content: space-around; margin-bottom: 8px; }
.entente-alerts { margin-bottom: 10px; font-size: 0.85em; text-align: center; }
.entente-description { margin-bottom: 8px; font-size: 0.85em; text-align: center; }
.entente-footnote { color: #666; font-size: 0.7em; font-style: italic; text-align: center; }

#qualities .status-taming-metric { margin: 2px 0 6px; text-align: center; }
#qualities .status-taming-label { color: #000; font-size: 0.85em; font-weight: 700; letter-spacing: 0.01em; }
#qualities .status-taming-value { font-size: 0.85em; font-weight: 300; }
#qualities .status-taming-relationship { margin-top: 2px; }
#qualities .status-taming-relationship .status-taming-value { font-weight: 700; }
#qualities .status-taming-party-nsdap { color: #5a2e0c; }
#qualities .status-taming-party-volkisch { color: #06402b; }
#qualities .status-taming-party-dvfp { color: #c4a484; }
#qualities .status-taming-electoral { margin-top: 8px; margin-bottom: 0; }
#qualities .status-taming-electoral .status-taming-value { font-weight: 400; }
#qualities .status-taming-image-frame {
  max-width: 400px;
  height: 200px;
  margin: 0 auto 6px;
  overflow: hidden;
  border: 2px solid #000435;
}
#qualities .status-taming-image { width: 100%; }
#qualities .status-taming-portraits {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  margin: 16px 0 8px;
}
#qualities .status-taming-portrait-item { width: 45%; text-align: center; }
#qualities .status-taming-portrait {
  display: block;
  width: 100%;
  max-width: 120px !important;
  height: 150px;
  margin: 0 auto;
  border: 2px solid #000435;
  filter: grayscale(100%);
  object-fit: cover;
  object-position: top;
}
#qualities .status-taming-portrait-name { margin-top: 4px; font-size: 0.7em; font-weight: 300; }
#qualities .status-map-details {
  display: block;
  max-width: 800px;
  margin-top: 16px;
}
#qualities .status-map-details[hidden] { display: none; }
#qualities .status-map-details h3 {
  margin: 0 0 4px;
  font-size: 1.2em;
  text-align: center;
}
#qualities .status-map-detail-image,
#qualities .status-map-image {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #000;
}
#qualities .status-card-description,
#qualities .status-map-details > p {
  text-align: center;
  text-indent: 0;
}
#qualities .status-map-details > p {
  margin: 0 0 10px;
  font-size: 0.8em;
}
#qualities .status-map-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-top: 16px;
  line-height: 0;
}
#qualities .w-hs {
  position: absolute;
  z-index: 10;
  border: 0;
  background: transparent;
  padding: 0;
  transform: translate(-50%, -50%);
  cursor: pointer;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
}
#qualities .w-hs-dot {
  display: block;
  width: 5px;
  height: 5px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: rgb(62 136 179 / 90%);
  transition: transform 0.15s, background 0.15s;
}
#qualities .w-hs:hover .w-hs-dot,
#qualities .w-hs-active .w-hs-dot {
  border-color: #fff;
  background: rgb(201 169 110);
  transform: scale(1.6);
}
#qualities .status-map-detail-image { height: 200px; margin-bottom: 12px; object-fit: cover; }
#qualities .status-map-stats p { margin: 4px 0; text-align: center; text-indent: 0; }
#qualities .status-map-stats strong { font-size: 1em; }
#qualities .status-map-stats span { font-size: 0.85em; }
#qualities .status-map-government { margin-top: 8px; text-align: center; }
#qualities .status-map-government .sidebar-action {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#qualities .status-government { margin-top: -8px; line-height: 1.5; text-align: center; }
#qualities .status-government-message { margin-top: 4px; }
#qualities .status-government-label { margin-top: 8px; font-weight: 700; }
#qualities .status-government-track {
  height: 14px;
  margin-top: 4px;
  border: 2px solid #000;
  background: #f3f3f3;
}
#qualities .status-government-fill { height: 100%; }
#qualities .status-government-action-title { margin-top: 6px; font-style: italic; }
#qualities .status-government-minister { margin-top: 4px; }
#qualities .status-government-action-description { margin-top: 6px; font-size: 0.9em; }
#qualities .status-government .sidebar-action {
  margin-top: 8px;
  border: 2px solid #000;
  padding: 4px 14px;
  color: #431;
  font-family: Georgia, serif;
  font-size: 1em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#qualities .status-government-none { font-style: italic; }
#qualities .status-government-meters {
  display: flex;
  justify-content: space-around;
  gap: 4px;
  margin-top: 10px;
}
#qualities .status-government-meter {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}
#qualities .status-government-meter-track {
  display: flex;
  width: 26px;
  height: 130px;
  align-items: flex-end;
  border: 2px solid #000;
  background: #f3f3f3;
}
#qualities .status-government-meter-fill { width: 100%; }
#qualities .status-government-meter-label { margin-top: 4px; font-size: 0.7em; line-height: 1.1; white-space: nowrap; }

/* The recovered client used anchors for cards and choices.  Buttons keep native
   geometry while posting actions to the server. */
button.card {
  display: inline-block;
  position: relative;
  box-sizing: content-box;
  width: 120px;
  height: 150px;
  margin: 0 0 0.5em;
  border: 10px solid var(--card-border-color);
  background: transparent;
  padding: 0;
  box-shadow: 5px 5px 10px rgb(0 0 0 / 20%);
  color: inherit;
  font: inherit;
  vertical-align: top;
  cursor: pointer;
}
button.card:hover:not(:disabled),
button.card:focus-visible:not(:disabled) {
  left: -5px;
  top: -5px;
  box-shadow: 10px 10px 10px rgb(0 0 0 / 20%);
}
button.card:disabled { cursor: default; }
button.card .card-img {
  display: block;
  width: 120px;
  height: 150px;
  object-fit: cover;
}
button.card .card-face-placeholder {
  display: block;
  width: 120px;
  height: 150px;
  background: var(--card-bg-color);
}
.card-tooltip {
  visibility: hidden;
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 1000;
  width: 150px;
  max-width: min(320px, calc(100vw - 24px));
  border: 1px solid var(--border-color);
  background: var(--content-bg-color);
  padding: 0.5em;
  color: var(--text-color);
  text-align: left;
  white-space: normal;
}
button.card:hover .card-tooltip,
button.card:focus .card-tooltip { visibility: visible; }
button.card.passive-card { cursor: help; }
ul.pinned-cards button.card:hover .card-passive-tip,
ul.pinned-cards button.card:focus .card-passive-tip { display: block; }

button.card[data-faction="authcon"] { border-color: #000435; }
button.card[data-faction="christsoc"] { border-color: #dab1da; }
button.card[data-faction="volkskons"] { border-color: #90d5ff; }
button.card[data-faction="volkisch"] { border-color: #06402b; background: #06402b; }
button.card[data-faction][data-role="deputy"] { width: 80px; height: 100px; border-width: 5px; }
button.card[data-faction][data-role="deputy"] .card-img { width: 80px; height: 100px; }
body.empowered-authcon button.card[data-faction="authcon"],
body.empowered-christsoc button.card[data-faction="christsoc"],
body.empowered-volkskons button.card[data-faction="volkskons"],
body.empowered-volkisch button.card[data-faction="volkisch"] {
  border-color: #daa520;
  box-shadow: 0 0 12px rgb(218 165 32 / 50%), 3px 3px 8px rgb(0 0 0 / 30%);
}
ul.hand.has-executive > li.executive-fixed button.card { border-color: #b0b0b0; }

.choice-image {
  float: left;
  width: 90px;
  height: 90px;
  margin: 0 1em 0.4em 0;
  object-fit: cover;
}
#scene-choices li .choice-opt-tip,
body > .choice-opt-tip.viewport-tooltip-visible {
  display: none;
  position: fixed;
  top: 0;
  left: -9999px;
  z-index: 100;
  border: 2px solid #999;
  background: #fff;
  min-width: 150px;
  padding: 8px 12px;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 20%);
  color: #000;
  font-size: 0.95em;
  font-style: normal;
  font-weight: normal;
  line-height: 1.7;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: none;
}
#scene-choices .reichswehr-choice-gif,
body > .reichswehr-choice-gif.viewport-tooltip-visible {
  display: none;
  position: fixed;
  top: 0;
  left: -9999px;
  z-index: 9999;
  width: 350px;
  max-width: calc(100vw - 16px);
  height: auto;
  border: 3px solid #888;
  pointer-events: none;
}
#scene-choices li:hover .choice-opt-tip,
#scene-choices li:focus-within .choice-opt-tip { display: block; }
#new-game {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.5em;
  border: 2px solid #876;
  border-radius: 4px;
  background: transparent;
  padding: 0.5em;
  color: var(--link-color);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Authored event markup is projected in original order. */
#scene-body::after { display: block; clear: both; content: ""; }
#scene-body p { margin: 0 0 1em; text-indent: 1em; }
.rich-image { max-width: 100%; }
.rich-image-left { float: left; }
.rich-image-right { float: right; }
.rich-image-center { display: block; float: none; margin-right: auto; margin-left: auto; }
.scene-table-wrap { clear: both; width: 100%; margin: 0; overflow: visible; }
.scene-table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: inherit; }
.scene-table th,
.scene-table td { border: 0; padding: 6px 10px; text-align: left; text-indent: 0; vertical-align: middle; white-space: nowrap; }
.scene-table th { font-weight: normal; }
.scene-table tr[hidden] { display: none; }
body.dsr-parliaments-screen .scene-table td,
body.dsr-parliaments-screen .scene-table th { white-space: normal; }
body.freedom-act-provisions-screen .scene-table-wrap { overflow: hidden; }
body.freedom-act-provisions-screen .scene-table { table-layout: fixed; }
body.freedom-act-provisions-screen .scene-table td,
body.freedom-act-provisions-screen .scene-table th {
  white-space: normal;
  overflow-wrap: anywhere;
}
.scene-table-wrap.election-results-table { width: 100%; }
.scene-table.election-results-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}
.scene-table.election-results-table th,
.scene-table.election-results-table td {
  padding: 4px 10px;
  font-size: 1em;
  white-space: nowrap;
}
.party-swatch { margin-right: 0.3em; vertical-align: -0.08em; }
.table-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  border: 1px solid #000;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin: 0 0.4em 0 -1.4em;
  color: inherit;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}
.scene-parliament-flow { display: block; max-width: 100%; margin: 0.6em auto; overflow: visible; }
.scene-parliament-flow.state-parliament { width: 400px; height: 220px; margin: 5px auto 4px; }
body.french-election-screen .scene-table-wrap.election-results-table { overflow: hidden; }
body.french-election-screen .scene-table.election-results-table { table-layout: fixed; }
body.french-election-screen .scene-table.election-results-table th,
body.french-election-screen .scene-table.election-results-table td {
  box-sizing: border-box;
  padding: 4px 3px;
  text-align: center;
  white-space: nowrap;
}
body.french-election-screen .scene-table.election-results-table th:first-child,
body.french-election-screen .scene-table.election-results-table td:first-child { width: 24%; text-align: left; }
body.french-election-screen .scene-table.election-results-table th:nth-child(2),
body.french-election-screen .scene-table.election-results-table td:nth-child(2) { width: 18%; }
body.french-election-screen .scene-table.election-results-table th:nth-child(3),
body.french-election-screen .scene-table.election-results-table td:nth-child(3) { width: 16%; }
body.french-election-screen .scene-table.election-results-table th:nth-child(4),
body.french-election-screen .scene-table.election-results-table td:nth-child(4) { width: 26%; }
body.french-election-screen .scene-table.election-results-table th:nth-child(5),
body.french-election-screen .scene-table.election-results-table td:nth-child(5) { width: 16%; }
@media (max-width: 1024px) {
  body.french-election-screen .scene-table.election-results-table th,
  body.french-election-screen .scene-table.election-results-table td { padding: 3px 2px; font-size: 0.82em; }
}
#scene-body .state-flag { margin: 0 0 5px; text-align: center; text-indent: 0; }
#scene-body .state-monarch,
#scene-body .state-office,
#scene-body .state-government,
#scene-body .state-president { text-align: center; font-size: 0.9em; text-indent: 0; }
#scene-body .state-monarch,
#scene-body .state-office { margin: 0 0 2px; }
#scene-body .state-government { margin: 0 0 -30px; }
#scene-body .state-president { margin: -10px 0 0; }

.election-region-map-wrap { position: relative; margin: 0 0 1em; text-indent: 0; }
.election-region-map {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 0 auto;
  border: 4px solid #000;
  border-radius: 4px;
}
.election-region-hitbox { fill: transparent; stroke: none; cursor: pointer; pointer-events: all; }
.election-region-hitbox:focus-visible { fill: rgb(255 255 255 / 14%); outline: none; }
.election-region-tooltip {
  position: fixed;
  z-index: 99999;
  min-width: 280px;
  max-width: 340px;
  border: 1px solid #999;
  border-radius: 5px;
  padding: 8px 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgb(0 0 0 / 25%);
  color: #000;
  font-family: Georgia, serif;
  pointer-events: none;
}
.election-region-tooltip[hidden] { display: none; }
.election-region-tooltip-title { margin-bottom: 5px; border-bottom: 1px solid #ddd; padding-bottom: 4px; font-weight: bold; text-align: center; }
.election-region-tooltip-columns { display: flex; gap: 14px; }
.election-region-tooltip-columns > div { flex: 1; min-width: 110px; }
.election-region-tooltip-columns > div > b { display: block; margin-bottom: 3px; font-size: 14px; text-align: center; }
.election-region-tooltip-columns > div > div { display: flex; align-items: center; gap: 4px; margin: 3px 0; font-size: 14px; }
.election-region-tooltip-columns i { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.election-region-tooltip canvas { display: block; margin: 6px auto 2px; }
.election-region-map-mecklenburg {
  max-width: 320px;
  border: 2px solid #999;
}
.election-region-map-wrap-mecklenburg .election-region-tooltip {
  min-width: 160px;
  max-width: none;
  padding: 4px 10px;
}
.election-region-map-wrap-mecklenburg .election-region-tooltip-title {
  margin-bottom: 0;
  padding-bottom: 3px;
  font-size: 13px;
}
.election-region-map-wrap-mecklenburg .election-region-tooltip > div:last-child > div {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 1px 0;
  font-size: 11px;
}
.election-region-map-wrap-mecklenburg .election-region-tooltip > div:last-child i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.election-region-map-wrap-mecklenburg .election-region-tooltip canvas { margin: 4px auto; }
#scene-body .election-region-map-caption { margin: 0.7em 0 0; text-indent: 0; }

.native-tooltip-wrap {
  position: relative;
  display: inline;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: help;
}
.native-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  z-index: 1000;
  width: 200px;
  max-width: min(200px, calc(100vw - 24px));
  border: 2px solid #999;
  background: #fff;
  padding: 10px;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 20%);
  color: #000;
  font-size: 0.95em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transform: translateX(-50%);
  white-space: normal;
}
.native-tooltip-above { bottom: 125%; }
.native-tooltip-below { top: 125%; }
.native-tooltip-wrap:hover > .native-tooltip,
.native-tooltip-wrap:focus-within > .native-tooltip { display: block; }
.vote-share-tooltip-wrap { text-decoration: none; }
.vote-share-native-tooltip {
  box-sizing: border-box;
  width: 106px;
  max-width: 106px;
  height: 106px;
  padding: 5px;
}
.vote-share-tooltip-pie { display: block; width: 94px; height: 94px; }
.vote-share-key-native-tooltip { width: 128px; max-width: min(128px, calc(100vw - 24px)); padding: 8px; }
.vote-share-tooltip-key,
.vote-share-tooltip-key > span { display: block; }
.vote-share-tooltip-key > span {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin: 1px 0;
  color: #431;
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}
.vote-share-tooltip-key i { width: 11px; height: 11px; border: 1px solid #000; }
.table-group-toggle + .party-swatch,
.table-group-toggle + .party-swatch + span { vertical-align: middle; }
.minor-party-native-tooltip { width: 280px; max-width: min(280px, calc(100vw - 24px)); }
.minor-party-native-tooltip > span { display: block; }
.minor-party-native-tooltip img { display: block; width: 100px; height: 100px; margin: 0 auto 8px; object-fit: contain; }

/* Server-projection compatibility only. Recovery authors these rules inside
 * the referendum scene's <style> element; structured markup deliberately
 * strips executable/style nodes, so mirror the same declarations here. */
.kratzig-wrap {
  position: relative;
  display: inline-block;
  cursor: help;
  text-decoration: underline dotted;
}
.kratzig-wrap .kratzig-tip {
  display: none;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #999;
  padding: 8px;
  width: 220px;
  font-size: 0.85em;
  text-align: left;
  z-index: 100;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 20%);
}
.kratzig-wrap:hover .kratzig-tip { display: block; }

/* Tooltips are temporarily portaled to body while open. This preserves their
 * recovered styling while escaping every transformed or overflowed scene,
 * dashboard, card, modal, and sidebar container. */
body > .viewport-tooltip-visible {
  display: inline-block !important;
  box-sizing: border-box !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  max-height: calc(100vh - 16px);
  overflow: auto;
  transform: none !important;
  z-index: 2147483647 !important;
  pointer-events: none;
}

/* Recovered party leader and news containers filled with server-projected data. */
#dnvp_dashboard:not([hidden]) { display: block; }
.party-dashboard-heading {
  margin-bottom: 0.7em;
  border-bottom: 1.5px solid #000;
  padding-bottom: 0.5em;
  color: #4a3728;
  font: 1.3em Georgia, serif;
  letter-spacing: 0.05em;
  text-align: center;
}
.party-dashboard-leaders { display: flex; align-items: flex-start; justify-content: center; gap: 12px; text-align: center; }
.party-dashboard-leader { flex: 0 1 210px; min-width: 0; }
.party-dashboard-leader img {
  display: block;
  box-sizing: border-box;
  width: 170px;
  height: 210px;
  margin: 0 auto;
  border: 2px solid #000;
  object-fit: cover;
  object-position: top;
}
.party-dashboard-leader strong,
.party-dashboard-leader span { display: block; }
.party-dashboard-leader strong { margin-top: 0.4em; color: #4a3728; font-size: 0.9em; }
.party-dashboard-leader span { color: #666; font-size: 0.85em; }
.party-dashboard-congress { margin-top: 0.8em; text-align: center; }
.party-dashboard-congress h3 {
  margin: 0 0 0.2em;
  color: #4a3728;
  font-size: 1em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.party-dashboard-congress-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}
.party-dashboard-congress-chart { min-width: 0; flex: 1 1 auto; }
.party-dashboard-congress svg { display: block; width: 100%; max-width: 400px; height: 145px; margin: 0 auto; }
.party-dashboard-laender-card {
  flex: 0 0 92px;
  margin-top: 0.5em;
  text-align: center;
}
button.card.party-dashboard-laender {
  width: 100px;
  height: 120px;
  margin-right: 0;
  border-width: 6px;
  font: inherit;
}
button.card.party-dashboard-laender .card-img { width: 100px; height: 120px; }
button.card.party-dashboard-laender .card-img { object-position: center; }
.party-dashboard-laender-caption {
  margin-top: 0.28em;
  padding-left: 12px;
  color: #431;
  font-size: 0.75em;
  font-weight: bold;
}
.party-dashboard-congress-legend {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.6em;
  margin-top: 0.5em;
  font-size: 0.75em;
}
.party-dashboard-congress-legend > span {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
.party-dashboard-congress-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 3px;
  border-radius: 50%;
}

#native-news:not([hidden]) { display: block; }
#newsbox-frame {
  position: relative;
  min-height: 200px;
  background: rgb(255 255 255 / 95%);
  padding: 1em;
  color: #333;
  font: 0.95em/1.6 Georgia, serif;
  text-align: center;
}
#newsbox-frame h3 {
  margin: 0 0 0.5em;
  border-bottom: 1px solid #ffffffff;
  padding-bottom: 0.3em;
  color: #4a3728;
  font: 1.7em UnifrakturMaguntia, cursive;
  letter-spacing: 1px;
}
#newsbox-frame.language-picker .language-picker-title {
  display: flex;
  min-height: 1.7em;
  align-items: center;
  justify-content: center;
  margin: 0.7em 0 0.6em;
  border: 0;
  padding: 0;
  color: #431;
  font: normal 1.35em "Minion Pro", Georgia, serif;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.language-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 100px);
  align-items: center;
  justify-content: center;
  gap: 1.15em 1.1em;
  width: 100%;
  margin: 0 auto 0.9em;
  border-spacing: 0;
}
.language-picker-grid tbody,
.language-picker-grid tr { display: contents; }
.language-picker-grid td {
  display: flex;
  width: 100px;
  height: 67px;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
}
.language-picker-flag {
  display: flex;
  box-sizing: border-box;
  width: 100px;
  height: 67px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 3px solid transparent;
  background: transparent;
  padding: 3px;
  line-height: 0;
  cursor: pointer;
}
.language-picker-flag[aria-pressed="true"] { border-color: #000; }
.language-picker-flag:focus-visible { outline: 1px dotted #000; outline-offset: 2px; }
.language-picker-flag img { display: block; width: 88px; min-width: 88px; height: 55px; object-fit: cover; }
#newsbox-frame p { min-height: 80px; margin: 0 0 1.5em; color: #333; font-size: 1em; text-align: left; text-indent: 0; white-space: pre-wrap; }
#newsbox-frame .news-line { display: block; margin-bottom: 0.6em; }
#newsbox-frame .news-line-last { margin-bottom: 0; }
#newsbox-frame .news-seal { margin-top: 0.5em; text-align: center; }
#newsbox-frame .news-seal img { width: 60px; opacity: 0.7; }
#newsbox-frame .nb-arrow-btn {
  position: absolute;
  right: 8px;
  bottom: 6px;
  border: 0;
  background: transparent;
  color: #4a4a4a;
  padding: 4px;
  font: inherit;
  user-select: none;
  outline: none;
  cursor: pointer;
}
#newsbox-frame .nb-arrow-btn svg { display: block; pointer-events: none; image-rendering: pixelated; }
#newsbox-frame .nb-arrow-btn-back { right: auto; left: 8px; }

/* Server-only structured widgets use plain recovered paper/border vocabulary. */
#scene-dashboard,
#scene-map,
#scene-government,
#scene-referendum,
#scene-election-chart,
#scene-history-charts,
#scene-supplement { clear: both; margin: 1em auto 1.5em; }

/* Recovery's Government Priorities scene uses four external stacked panels;
 * these values mirror the authored onDisplay presentation verbatim. */
body.government-priorities-screen .tools.left,
body.government-priorities-screen .tools.right,
body.government-priorities-screen #dnvp_dashboard,
body.cvp-negotiation-screen .tools.left,
body.cvp-negotiation-screen .tools.right,
body.cvp-negotiation-screen #dnvp_dashboard,
body.panzercruiser-screen .tools.left,
body.panzercruiser-screen #dnvp_dashboard,
body.economic-crisis-screen .tools.right,
body.economic-crisis-screen #dnvp_dashboard { display: none !important; }

.economic-crisis-panel {
  position: absolute;
  z-index: 48;
  box-sizing: content-box;
  width: 380px;
  border: 1px solid #431;
  padding: 0.8em;
  background-color: #f3f3f3;
  box-shadow: 2px 2px 12px rgb(0 0 0 / 20%);
  color: var(--text-color, #000);
  font-family: Georgia, serif;
  font-size: 0.85em;
}
.economic-crisis-row {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.economic-crisis-row-last { margin-bottom: 0; }
.economic-crisis-portrait {
  width: 150px;
  height: 200px;
  flex-shrink: 0;
  margin-right: 10px;
  border: 2px solid #000;
  object-fit: cover;
}
.economic-crisis-copy {
  font-size: 1.15em;
  font-style: italic;
  line-height: 1.4;
}
body.cvp-negotiation-screen #content { background-color: #a9aba9 !important; }
body.cvp-negotiation-screen #content ul.choices li.unavailable,
body.cvp-negotiation-screen #content ul.choices li.unavailable * { color: #57534d !important; }
.panzer-left-panel {
  position: absolute;
  z-index: 48;
  box-sizing: content-box;
  width: 220px;
  border: 5px solid #ccc;
  padding: 1.8em 0.8em 1.2em;
  background-color: #f3f3f3;
  box-shadow: 2px 2px 12px rgb(0 0 0 / 20%);
  color: var(--text-color, #000);
  font-family: "Minion Pro", Georgia, serif;
  font-size: 1em;
  text-align: center;
}
.panzer-panel-flag,
.panzer-panel-portrait {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #000;
  margin: 0 auto 6px;
  background: #fff;
}
.panzer-panel-portrait {
  max-height: 220px;
  object-fit: cover;
  object-position: center top;
}
.panzer-panel-flag-caption { margin-bottom: 18px; }
.panzer-tip-wrap {
  position: relative;
  display: inline;
  cursor: help;
  text-decoration: underline dotted;
}
.panzer-tip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  z-index: 100;
  display: none;
  width: 200px;
  transform: translateX(-50%);
  border: 2px solid #999;
  padding: 10px;
  background: #fff;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 20%);
  font-size: 0.95em;
  text-align: center;
}
.panzer-tip-wrap:hover .panzer-tip,
.panzer-tip-wrap:focus-within .panzer-tip { display: block; }
.recovered-priority-panel {
  position: absolute;
  z-index: 48;
  display: flex;
  box-sizing: border-box;
  width: 240px;
  height: 420px;
  overflow: hidden;
  flex-direction: column;
  border: 3px solid #000;
  padding: 0.5em;
  background-color: #fff;
  box-shadow: 2px 2px 12px rgb(0 0 0 / 20%);
  font-size: 0.9em;
  transition: background-color 0.4s ease;
}
.recovered-priority-top { border-bottom: 0; }
.recovered-priority-title-wrap {
  flex-shrink: 0;
  margin-bottom: 5px;
  text-align: center;
}
.recovered-priority-title {
  color: #000;
  font-size: 1.25em;
}
.recovered-priority-image-frame {
  box-sizing: border-box;
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  border: 4px solid #000;
}
.recovered-priority-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}
.recovered-priority-description {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin-top: 0.4em;
}
.recovered-priority-description-copy {
  font-size: 0.9em;
  line-height: 1.4;
  text-align: center;
}
.recovered-priority-panel.is-selected,
.recovered-priority-panel.is-hovered { background-color: #f4ecdc; }
.recovered-priority-panel.is-selected .recovered-priority-image-frame img,
.recovered-priority-panel.is-hovered .recovered-priority-image-frame img { filter: none; }

/* Recovery's CVP negotiation presentation, including its two external party
 * panels and gray central paper. */
.cvp-negotiation-panel {
  position: absolute;
  z-index: 48;
  box-sizing: content-box;
  width: 220px;
  height: 690px;
  overflow: hidden;
  border: 3px solid #000;
  padding: 0.8em;
  box-shadow: 2px 2px 12px rgb(0 0 0 / 20%);
  font-family: Georgia, serif;
  font-size: 0.8em;
}
.cvp-negotiation-party-wrap {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  text-align: center;
}
.cvp-negotiation-party {
  font-size: 1.5em;
  line-height: normal;
}
.cvp-negotiation-panel-right .cvp-negotiation-party-wrap {
  display: block;
  min-height: 0;
}
.cvp-negotiation-portrait {
  display: block;
  width: 100%;
  height: 240px;
  margin: 0 auto 6px;
  border: 3px solid #000;
  object-fit: cover;
  object-position: center top;
}
.cvp-negotiation-leader {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1em;
  text-align: center;
}
.cvp-negotiation-factions-title {
  display: block;
  margin: 4px 0 2px;
  font-size: 1.15em;
  text-align: center;
}
.cvp-negotiation-columns {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 6px;
  border-bottom: 3px solid #000;
  padding-bottom: 3px;
  color: #000;
  font-size: 1em;
}
.cvp-negotiation-faction { margin: 6px 0; }
.cvp-negotiation-faction > strong {
  display: block;
  margin-bottom: 3px;
  text-align: center;
  text-decoration: underline;
  text-decoration-style: dashed;
}
.cvp-negotiation-faction > div { display: flex; justify-content: space-between; }
.cvp-negotiation-faction > div > b { font-size: 0.95em; }
.dashboard-tabs { display: flex; border: 2px solid #876; }
.dashboard-tab {
  flex: 1;
  border: 0;
  border-right: 1px solid #876;
  background: var(--tab-color);
  padding: 0.5em;
  color: inherit;
  font: inherit;
}
.dashboard-tab:last-child { border-right: 0; }
.dashboard-tab[aria-selected="true"] { background: var(--content-bg-color); }
.dashboard-panel[hidden] { display: none; }
.dashboard-cards,
.supplement-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75em; }
.dashboard-card,
.supplement-card,
.government-action,
.map-state-panel { border: 1px solid #876; background: var(--content-bg-color); padding: 0.6em; }
.dashboard-card h3,
.supplement-card h3 { margin-top: 0; text-align: center; }
.dashboard-card img,
.supplement-card img { display: block; max-width: 100%; margin: 0 auto; }
.dashboard-metrics,
.supplement-card dl,
.map-stats { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.dashboard-metrics dt,
.dashboard-metrics dd,
.supplement-card dt,
.supplement-card dd,
.map-stats dt,
.map-stats dd { margin: 0; border-bottom: 1px dotted #876; padding: 0.2em 0; }
.dashboard-metrics dd,
.supplement-card dd,
.map-stats dd { padding-left: 0.5em; text-align: right; }
[data-tone="positive"] { color: #286f28; }
[data-tone="negative"] { color: #a00000; }
[data-tone="warning"] { color: #a55e00; }

/* Recovered Executive Affairs presentation. */
#exec_overview {
  max-width: 700px;
  margin: 1em auto;
  color: #000;
}
#exec_overview,
#exec_overview * { font-weight: normal; }
.exec-portraits-row {
  display: flex;
  gap: 2em;
  justify-content: center;
  margin-bottom: 2em;
}
.exec-portrait-card { width: 200px; text-align: center; }
.exec-portrait-frame {
  display: flex;
  width: 180px;
  height: 220px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 6px solid #000;
  background: #f3f3f3;
}
.exec-portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.exec-portrait-empty { font-size: 2em; }
.exec-portrait-role { margin-top: 0.5em; font-size: 0.95em; font-style: italic; }
.exec-portrait-name { margin-top: 0.1em; font-size: 1.1em; }
.exec-portrait-party { margin-top: 0.1em; font-size: 0.9em; }
.exec-reichsbank {
  max-width: 480px;
  margin: 1em auto;
  border: 3px solid #000;
  background: rgba(255, 255, 255, 0.6);
  padding: 1em 1.5em;
}
.exec-reichsbank-title {
  margin-bottom: 0.6em;
  font-size: 1.3em;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.exec-reichsbank-table { width: 100%; border-collapse: collapse; }
.exec-reichsbank-table td {
  border-bottom: 1px dotted #000;
  padding: 0.25em 0.4em;
  font-size: 0.95em;
}
.exec-reichsbank-table td:first-child { width: 50%; }
.exec-reichsbank-table td:last-child { text-align: right; }
.exec-priorities-text {
  margin: 1.5em auto 0.5em;
  font-size: 1em;
  line-height: 1.6;
  text-align: center;
}
.exec-meters { max-width: 480px; margin: 0.5em auto 1em; }
.exec-meter-row {
  display: grid;
  grid-template-columns: 9em 1fr;
  align-items: center;
  gap: 0.8em;
  padding: 0.45em 0;
  font-size: 0.95em;
}
.exec-meter-row.exec-meter-divider { border-bottom: 1px solid #000; }
.exec-meter-label { text-align: left; }
.exec-meter-track {
  height: 14px;
  overflow: hidden;
  border: 2px solid #000;
  background: transparent;
}
.exec-meter-fill { height: 100%; transition: width 0.4s ease, background 0.4s ease; }

/* Recovery uses semantic triangles for economic movement: green is favorable
   movement, red is unfavorable movement. */
.economy-trend-good { color: #1a7a1a; }
.economy-trend-bad { color: #b00000; }

/* The recovered economy is a wide, self-contained special screen. */
body.economy-screen #stats_sidebar,
body.economy-screen #native-news,
body.economy-screen #dnvp_dashboard { display: none !important; }
body.economy-screen #content { max-width: 800px; }
body.economy-screen #content > .scene-heading { display: none; }
body.economy-screen #scene-dashboard {
  margin: -1em -1.5em 1em;
  color: #000;
  font-family: Georgia, serif;
}
.economy-dashboard .dashboard-tabs {
  border: 0;
  background: var(--tab-bg-color);
}
.economy-dashboard .dashboard-tab {
  border: 0;
  background: var(--tab-color);
  padding: 10px;
  font-family: "Minion Pro", Georgia, serif;
}
.economy-dashboard .dashboard-tab[aria-selected="true"] { background: var(--content-bg-color); }
.economy-panel { padding: 0 1.5em 1em; }
.economy-heading {
  margin: 14px 0;
  color: #431;
  font: 1.35em Georgia, serif;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.economy-overview-stack { display: flex; flex-direction: column; gap: 10px; }
.economy-row { display: flex; align-items: stretch; gap: 10px; }
.economy-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  border: 2px solid #431;
  background: var(--content-bg-color);
  padding: 9px 11px;
  text-align: center;
}
.economy-card h3 {
  margin: 0 0 1px;
  color: #431;
  font-size: 0.72em;
  font-weight: bold;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.economy-card img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 8px 0 0;
  border: 2px solid #000;
  object-fit: cover;
  order: 3;
}
.economy-card .dashboard-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  flex: 1;
  margin: 4px 0 0;
  font-size: 0.8em;
  order: 2;
}
.economy-card .dashboard-metrics dt,
.economy-card .dashboard-metrics dd {
  margin: 0;
  border-bottom: 1px dotted #000;
  padding: 1px 0;
}
.economy-card .dashboard-metrics dt { text-align: left; }
.economy-card .dashboard-metrics dd { padding-left: 5px; text-align: right; white-space: nowrap; }
.economy-primary {
  display: block;
  margin: 1px 0;
  font-size: 1.2em;
  white-space: nowrap;
  order: 1;
}
.economy-primary-unit { color: #000; font-size: 0.55em; font-weight: normal; }
.economy-row-top > * { flex: 1; }
.economy-row-middle > :nth-child(4) { flex: 1.15; }
.economy-row-bottom > :nth-child(1) { flex: 1.25; }
.economy-row-bottom > :nth-child(3) { flex: 1.1; }
.economy-cover img {
  width: auto;
  height: 90px;
  margin: 4px auto;
  border: 0;
  order: 1;
}
.economy-cover small { order: 3; color: #000; font-size: 0.76em; }
.economy-labour-market img,
.economy-inflation img { max-height: 150px; }
.economy-mini-chart {
  display: block;
  width: 100%;
  max-width: 190px;
  height: 96px;
  margin: 3px auto 0;
  order: 1;
}
.economy-chart-label {
  display: block;
  margin: 23px 0 0;
  color: #431;
  font-size: 0.58em;
  text-transform: uppercase;
}
.economy-mini-chart path { fill: none; stroke: #999; stroke-width: 1; }
.economy-mini-chart polyline { fill: none; stroke: #1a4d2e; stroke-width: 1.5; }
.economy-mini-chart text { fill: #431; font: 8px Georgia, serif; }
.economy-world-economy .economy-primary { margin-top: 4px; text-align: left; }
.economy-gold .economy-primary { margin-top: auto; }
.economy-gold .dashboard-metrics { flex: 0 0 auto; margin: 14px 0 auto; }
.economy-labour-market .dashboard-metrics dt { white-space: nowrap; }
.economy-labour-market .dashboard-metrics dt:nth-of-type(3),
.economy-labour-market .dashboard-metrics dd:nth-of-type(3) { grid-column: 1 / -1; text-align: left; }
.economy-sector-mood .dashboard-metrics { font-size: 0.78em; }
.economy-sector-mood .dashboard-metrics dt,
.economy-balance-of-payments .dashboard-metrics dt,
.economy-public-debt .dashboard-metrics dt,
.economy-public-debt .dashboard-metrics dd { white-space: nowrap; }
.economy-inflation .dashboard-metrics { display: block; text-align: center; }
.economy-inflation .dashboard-metrics dt,
.economy-inflation .dashboard-metrics dd { border: 0; text-align: center; }
.economy-inflation .dashboard-metrics dd { margin-top: 5px; padding: 0; }
.economy-reparations .economy-primary { margin-top: 34px; }
.economy-reparations .dashboard-metrics { flex: 0 0 auto; margin-top: auto; }
.economy-reich-budget .dashboard-metrics { display: block; }
.economy-reich-budget .dashboard-metrics dt,
.economy-reich-budget .dashboard-metrics dd { display: inline; border: 0; }
.economy-reich-budget .dashboard-metrics dd::after { display: block; content: ""; }
.economy-balance-of-payments .dashboard-metrics dt:last-of-type,
.economy-balance-of-payments .dashboard-metrics dd:last-of-type { font-weight: bold; }
.economy-public-debt { position: relative; }
.economy-debt-pie {
  position: absolute;
  bottom: 18px;
  left: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: conic-gradient(#9b1b18 0 50.2%, #2d7046 50.2% 77.6%, #8b1111 77.6% 100%);
}
.economy-public-debt .dashboard-metrics { margin-left: 45px; }
.economy-alerts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.economy-alerts article {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 2px solid #b00000;
  padding: 7px 11px;
  font-size: 0.9em;
}
.economy-alerts img {
  flex: 0 0 auto;
  width: 66px;
  height: 46px;
  border: 1px solid #000;
  object-fit: cover;
}
.economy-native-table { color: #000; font-size: 0.9em; }
.economy-native-table th { font-weight: normal; }
.economy-native-table td { white-space: nowrap; }
.economy-table-heading {
  border: 0;
  padding: 0 0 0.25em;
  color: #431;
  font-size: 1em;
  font-weight: bold !important;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.economy-table-heading[data-heading-tone="revenue"] { color: #2d7a2d; }
.economy-table-heading[data-heading-tone="expenditure"] { color: #b00000; }
.economy-table-total { font-weight: bold; }
[data-economy-band="0"] { color: #1a7a1a; }
[data-economy-band="1"] { color: #4e8a1e; }
[data-economy-band="2"] { color: #9a7d00; }
[data-economy-band="3"] { color: #b06800; }
[data-economy-band="4"] { color: #b03800; }
[data-economy-band="5"] { color: #b00000; }

.economy-sector-table {
  width: 100%;
  border-collapse: collapse;
  color: #000;
  font-size: 0.95em;
}
.economy-sector-table th {
  border-bottom: 2px solid #431;
  padding: 0.4em 0.45em;
  color: #431;
  font: bold 0.8em Georgia, serif;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.economy-sector-table td {
  border-bottom: 1px dotted #000;
  padding: 0.45em;
  text-align: center;
  vertical-align: middle;
}
.economy-sector-table td:first-child { text-align: left; }
.economy-sector-row:hover { background: rgba(67, 49, 17, 0.08); cursor: help; }
.economy-sector-detail { display: none; }
.economy-sector-row:hover + .economy-sector-detail,
.economy-sector-detail:hover { display: table-row; }
.economy-sector-detail > td { padding: 0.6em 0.8em; }
.economy-sector-detail > td > div { display: flex; align-items: center; gap: 18px; }
.economy-sector-detail img {
  flex: 0 0 auto;
  width: 170px;
  height: 125px;
  border: 2px solid #000;
  object-fit: cover;
}
.economy-sector-detail p { margin: 0; line-height: 1.45; text-align: left; }
.economy-sector-detail p + p { margin-top: 6px; }

.economy-budget-columns { display: flex; align-items: flex-start; gap: 14px; color: #000; font-size: 0.9em; }
.economy-budget-columns > section { flex: 1; min-width: 0; }
.economy-budget-columns .economy-native-table { font-size: 0.95em; }
.economy-budget-columns .economy-native-table td { padding: 0.25em 0.4em; }
.economy-budget-columns > section:nth-child(3) .economy-native-table + .economy-native-table { margin-top: 16px; }
.economy-budget-chart { margin-top: 16px; text-align: center; }
.economy-budget-chart h3 {
  margin: 0 0 3px;
  color: #431;
  font-size: 0.8em;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.economy-budget-chart p { margin: 5px 0 0; font-size: 0.9em; }
.economy-finance-minister {
  display: block;
  width: auto;
  height: 172px;
  margin: 18px auto 0;
  border: 2px solid #000;
}
.economy-line-chart { display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.economy-line-chart .economy-chart-axis { fill: none; stroke: #888; stroke-width: 1; }
.economy-line-chart .economy-chart-zero { stroke: #999; stroke-width: 1; stroke-dasharray: 3 2; }
.economy-line-chart .economy-chart-grid { stroke: #e2e2e2; stroke-width: 1; }
.economy-line-chart .economy-chart-line { fill: none; stroke: #431; stroke-width: 1.5; }
.economy-line-chart circle[data-tone="positive"] { fill: #2d7a2d; }
.economy-line-chart circle[data-tone="negative"] { fill: #b00000; }
.economy-line-chart text { fill: #777; font: 9px Georgia, serif; }

.economy-monetary-layout { display: flex; align-items: stretch; gap: 26px; color: #000; }
.economy-monetary-layout > section:first-child { flex: 1.5; min-width: 0; }
.economy-monetary-layout > section:last-child { flex: 1; min-width: 0; }
.economy-reichsbank-portraits { display: flex; align-items: flex-start; justify-content: center; gap: 18px; margin-bottom: 10px; }
.economy-reichsbank-portraits img { display: block; width: auto; height: 120px; }
.economy-reichsbank-portraits img:last-child { border: 2px solid #000; }
.economy-monetary-layout .economy-native-table { font-size: 0.82em; }
.economy-reichsbank-ledgers { display: flex; align-items: flex-start; gap: 18px; margin-top: 8px; }
.economy-reichsbank-ledgers > table { flex: 1; }
.economy-bank-list { display: flex; flex-direction: column; justify-content: space-between; }
.economy-bank-list article { display: flex; align-items: center; gap: 14px; }
.economy-bank-list article > img {
  flex: 0 0 96px;
  width: 96px;
  max-height: 84px;
  object-fit: contain;
}
.economy-bank-list article:nth-child(3) > img { max-height: 67px; }
.economy-bank-list article > div { flex: 1; min-width: 0; }
.economy-bank-list strong { display: block; font-size: 0.95em; }
.economy-bank-list span { display: block; font-size: 1.45em; font-weight: bold; line-height: 1.05; white-space: nowrap; }
.economy-bank-list span > span { display: inline; font-size: 1em; }
.economy-bank-list .economy-bank-unit {
  display: inline;
  color: #000;
  font-size: 0.6em;
  font-weight: normal;
}
.economy-bank-list article:first-child > img,
.economy-bank-list article:last-child > img { transform: scale(1.15); }

.economy-panel-foreign .economy-heading { margin-bottom: 0; }
.economy-dow h3 {
  margin: 12px 0 2px;
  color: #431;
  font: normal 0.95em Georgia, serif;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.economy-dow .economy-line-chart { width: 520px; max-width: 100%; margin-bottom: 26px; }
.economy-dow .economy-chart-line { stroke: #1a4d2e; }
.economy-world-condition { margin: 2px 0 12px; color: #000; text-align: center; }
.economy-foreign-columns { display: flex; align-items: flex-start; gap: 18px; color: #000; font-size: 0.9em; }
.economy-foreign-columns > section { flex: 1; min-width: 0; }
.economy-foreign-columns > section:last-child { flex: 1.3; }
.economy-debt-maturity { margin-top: 10px; font-size: 0.85em; text-align: center; }
.economy-maturity-pie { display: block; width: 76px; height: 76px; margin: 5px auto 3px; }
.economy-pie-long { fill: #1a4d2e; }
.economy-pie-short { fill: #b00000; }
.economy-debt-maturity p { margin: 0; }
.economy-debt-maturity i { display: inline-block; width: 0.75em; height: 0.75em; }
.economy-legend-long { background: #1a4d2e; }
.economy-legend-short { background: #b00000; }
.economy-reparations-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  margin: 0 0.4em 0 0;
  border: 1px solid #000;
  border-radius: 0;
  background: none;
  padding: 0;
  color: #000;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
}
.economy-reparations-detail { display: none; }
.economy-reparations-open .economy-reparations-detail { display: table-row; }
.economy-trade-table th:not(.economy-table-heading) {
  color: #431;
  font-size: 0.8em;
  font-weight: normal;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}
.economy-trade-table td:not(:first-child) { text-align: center; }

@media (max-width: 760px) {
  .economy-budget-columns,
  .economy-monetary-layout,
  .economy-foreign-columns { flex-direction: column; }
  .economy-budget-columns > section,
  .economy-monetary-layout > section,
  .economy-foreign-columns > section { width: 100%; }
  .economy-bank-list { gap: 16px; }
  .economy-sector-table { font-size: 0.78em; }
  .economy-sector-table th,
  .economy-sector-table td { padding-right: 0.2em; padding-left: 0.2em; }
}
.map-frame { position: relative; border: 2px solid #000; line-height: 0; }
.map-image { display: block; width: 100%; height: auto; }
.map-marker {
  position: absolute;
  width: 1em;
  height: 1em;
  border: 1px solid #000;
  border-radius: 50%;
  background: #ddd;
  transform: translate(-50%, -50%);
}
.map-marker-selected { background: #900; }
#scene-referendum {
  padding: 12px;
  color: #3b2a1a;
  font-family: "Minion Pro", Georgia, serif;
  text-align: center;
}
.referendum-caption {
  margin-bottom: 20px;
  font-size: 0.85em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.referendum-bars { display: flex; align-items: flex-end; justify-content: center; gap: 60px; margin-bottom: 16px; }
.referendum-column { display: flex; flex-direction: column; align-items: center; }
.referendum-count { margin-bottom: 6px; font-size: 1.4em; font-weight: bold; }
.referendum-track { display: flex; height: 200px; align-items: flex-end; }
.referendum-fill { display: block; width: 60px; height: 0; }
.referendum-fill-yes { background: #2d5a1b; }
.referendum-fill-no { background: var(--kpd-color); }
.referendum-name { margin-top: 8px; font-size: 0.9em; font-weight: bold; letter-spacing: 0.08em; }
.referendum-detail { color: #666; font-size: 0.7em; }
.referendum-turnout { font-size: 0.82em; line-height: 2; }
.referendum-verdict {
  margin-top: 12px;
  font-size: 0.95em;
  font-weight: 900;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 1.5s;
}
.referendum-verdict-passed { color: #2d5a1b; }
.referendum-verdict-failed { color: #8b0000; }
.election-bars { display: flex; align-items: end; justify-content: center; gap: 2em; min-height: 14em; }
.election-candidate { display: flex; flex-direction: column; align-items: center; }
.election-candidate-bar { display: block; width: 100%; min-height: 1px; }
.election-result-list article { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px dotted #876; padding: 0.3em 0; }
.history-chart {
  margin: 0;
  padding: 1.25em 1.35em 1.6em;
  background: rgb(255 255 255 / 78%);
}
.history-chart + .history-chart { border-top: 1px solid #c8c0b2; }
.history-chart h2 {
  margin: 0.2em 0 0.45em;
  color: #3c321e;
  font-family: Georgia, serif;
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.history-chart-unit {
  margin: 0 0 0.75em;
  color: #675b48;
  font: italic 0.82em Georgia, serif;
  text-align: center;
}
.history-chart-empty {
  min-height: 8em;
  margin: 1.25em 0 0;
  color: #3c321e;
  font: 1em Georgia, serif;
  text-indent: 0;
}
.history-chart svg { display: block; width: 100%; max-width: 680px; margin: 0 auto; overflow: visible; }
.history-chart-axis { fill: none; stroke: #776b57; stroke-width: 1.25; }
.history-chart-grid line { stroke: #d8d2c6; stroke-width: 1; }
.history-chart text { fill: #3c321e; font: 12px Georgia, serif; }
.history-chart-line { filter: drop-shadow(0 0 0.2px rgb(0 0 0 / 35%)); }
.history-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em 0.85em;
  margin: 0.5em auto 0.7em;
  color: #3c321e;
  font: 0.78em Georgia, serif;
}
.history-chart-legend-item { display: inline-flex; align-items: center; gap: 0.32em; white-space: nowrap; }
.history-chart-legend-item i {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  border: 1px solid rgb(0 0 0 / 42%);
}
body.history-retrospective-screen .tools.left,
body.history-retrospective-screen .tools.right,
body.history-retrospective-screen #dnvp_dashboard { display: none !important; }
/* Browser zoom reduces the CSS viewport width. Keep the desktop triptych on
   one row and let the page scroll horizontally instead of dropping both side
   histories below the Reichstag panel. True phone layouts still stack below. */
body.history-retrospective-screen { min-width: 1700px; }
body.history-retrospective-screen #mid_panel { margin: 0 auto; }
body.history-retrospective-screen #content {
  max-width: 540px;
  overflow: visible;
}
body.history-retrospective-screen #scene-history-charts {
  display: block;
  width: auto;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.history-retrospective-screen .history-chart,
body.history-retrospective-screen .history-chart + .history-chart {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
body.history-retrospective-screen .history-chart:not(:first-child) > h1:first-child {
  margin-top: 2em;
}
body.history-retrospective-screen .history-charts-right-panel > .history-chart + .history-chart {
  padding-top: 1.25em;
}
body.history-retrospective-screen .history-charts-right-panel,
body.history-retrospective-screen .history-charts-left-panel {
  position: absolute;
  top: 0;
  box-sizing: content-box;
  width: 480px;
  margin: 0;
  background: var(--content-bg-color);
  padding: 1em 1em 1.5em;
  box-shadow: 2px 2px 12px rgb(0 0 0 / 20%);
}
body.history-retrospective-screen .history-charts-right-panel {
  left: calc(100% + 2em);
}
body.history-retrospective-screen .history-charts-left-panel {
  right: calc(100% + 2em);
}
body.history-retrospective-screen .history-charts-right-panel > .history-chart:first-child > h1:first-child {
  margin-top: 0.5em;
}
body.history-retrospective-screen .history-charts-left-panel > .history-chart:first-child > h1:first-child {
  margin-top: 0.5em;
}
body.history-retrospective-screen .history-chart-empty {
  min-height: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-indent: 1em;
}
body.history-retrospective-screen .history-chart svg {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0;
  overflow: visible;
}
body.history-retrospective-screen .history-chart svg.history-retrospective-parliament {
  position: relative;
  left: 50%;
  width: 500px;
  height: 250px;
  margin: 0;
  transform: translateX(-50%);
}
body.history-retrospective-screen .history-reichstag-table {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  border-spacing: 0.15em 0.05em;
}
body.history-retrospective-screen .history-reichstag-table .history-party-header {
  text-align: left;
}
body.history-retrospective-screen .history-reichstag-table .history-party-column {
  text-align: left;
}
body.history-retrospective-screen .history-reichstag-table td:nth-child(n + 3) {
  text-align: right;
}
body.history-retrospective-screen .history-reichstag-table .history-share-column,
body.history-retrospective-screen .history-reichstag-table .history-seats-column {
  text-align: right;
}
body.history-retrospective-screen .history-reichstag-table .history-share-column,
body.history-retrospective-screen .history-reichstag-table td:nth-child(3) {
  min-width: 4.75em;
}
body.history-retrospective-screen .history-reichstag-table .history-seats-column,
body.history-retrospective-screen .history-reichstag-table td:nth-child(4) {
  min-width: 3.5em;
}
body.history-retrospective-screen .history-reichstag-table td:nth-child(4) {
  padding-left: 0.45em;
}
body.history-retrospective-screen .history-reichstag-table .history-seats-column {
  padding-left: 0.45em;
}
body.history-retrospective-screen .history-leadership {
  display: flex;
  justify-content: center;
  gap: 1.25em;
  margin-bottom: 0;
}
body.history-retrospective-screen .history-leadership > span {
  text-align: center;
  text-indent: 0;
}
body.history-retrospective-screen .history-cabinet-name {
  margin: 0.45em 0 0;
  color: #000;
  text-align: center;
  text-indent: 0;
}
body.history-retrospective-screen .history-cabinet-name + .history-cabinet-name {
  margin-top: 0.15em;
  margin-bottom: 0.65em;
}
body.history-retrospective-screen .history-results-tables {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.4em;
  font-size: 0.92em;
}
body.history-retrospective-screen .history-demographic-column {
  flex: 0 0 16.5em;
  width: 16.5em;
}
body.history-retrospective-screen .history-demographic-table {
  width: 100%;
  margin: 0;
  border-spacing: 0.15em 0.14em;
  table-layout: fixed;
}
body.history-retrospective-screen .history-demographic-table caption {
  margin-bottom: -0.09em;
  padding-top: 0.08em;
  text-align: left;
}
body.history-retrospective-screen .history-demographic-table th {
  height: 1.7em;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
body.history-retrospective-screen .history-demographic-table tr:first-of-type th:last-child {
  width: 5.5em;
  text-align: center;
}
body.history-retrospective-screen .history-demographic-table td {
  width: 5.5em;
  height: 1.7em;
  padding: 0.12em 0.3em;
  text-align: center;
  vertical-align: middle;
}
body.history-retrospective-screen .history-economic-table {
  width: 100%;
  margin: 0.2em 0 0;
  border-spacing: 0.15em 0.14em;
  table-layout: fixed;
  font-size: 0.92em;
}
body.history-retrospective-screen .history-economic-table > tbody > tr > th {
  height: 1.7em;
  text-align: left;
  vertical-align: middle;
}
body.history-retrospective-screen .history-economic-table > tbody > tr > td {
  position: relative;
  width: 9.25em;
  height: 1.7em;
  padding: 0.12em 0.45em;
  background: rgb(45 90 27 / 12%);
  text-align: center;
  vertical-align: middle;
}
body.history-retrospective-screen .history-economic-table > tbody > tr > td[data-tone="negative"] {
  background: rgb(176 0 0 / 18%);
}
body.history-retrospective-screen .history-economic-table > tbody > tr > td[data-tone="warning"] {
  background: rgb(197 139 0 / 18%);
}
body.history-retrospective-screen .history-economic-table > tbody > tr > td[data-tone="positive"] {
  background: rgb(45 122 40 / 16%);
}
body.history-retrospective-screen .history-inverted-delta-icon {
  display: inline-block;
  width: 11px;
  height: 11px;
  -webkit-mask-image: var(--history-delta-mask);
  mask-image: var(--history-delta-mask);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
body.history-retrospective-screen .history-economic-output-cell {
  cursor: help;
}
body.history-retrospective-screen .history-economic-output-cell > .history-economic-value {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}
body.history-retrospective-screen .history-economic-tooltip {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: calc(100% + 0.35em);
  width: 21em;
  padding: 0.45em;
  border: 1px solid #8b7e6a;
  background: var(--content-bg-color, #f4f2ed);
  color: #000;
  box-shadow: 0 0.3em 0.8em rgb(0 0 0 / 24%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}
body.history-retrospective-screen .history-economic-output-cell:hover .history-economic-tooltip,
body.history-retrospective-screen .history-economic-output-cell:focus-visible .history-economic-tooltip {
  visibility: visible;
  opacity: 1;
}
body.history-retrospective-screen .history-economic-tooltip-table {
  width: 100%;
  border-spacing: 0.15em 0.14em;
  table-layout: fixed;
  font-size: 0.9em;
}
body.history-retrospective-screen .history-economic-tooltip-table th {
  height: 1.7em;
  color: #000;
  text-align: left;
  white-space: nowrap;
}
body.history-retrospective-screen .history-economic-tooltip-table td {
  width: 7em;
  height: 1.7em;
  padding: 0.12em 0.35em;
  background: rgb(45 90 27 / 12%);
  color: #000;
  text-align: center;
}
body.history-retrospective-screen .history-economic-tooltip-table td[data-tone="negative"] {
  background: rgb(176 0 0 / 18%);
}
body.history-retrospective-screen .history-economic-tooltip-table td[data-tone="warning"] {
  background: rgb(197 139 0 / 18%);
}
body.history-retrospective-screen .history-economic-tooltip-table td[data-tone="positive"] {
  background: rgb(45 122 40 / 16%);
}
body.history-retrospective-screen .history-party-profile {
  margin: 0.3em 0.15em 0;
  font-weight: normal;
  line-height: 1.35;
}
body.history-retrospective-screen .history-party-profile p {
  margin: 0.25em 0;
  font-weight: normal;
  text-align: center;
  text-indent: 0;
}
body.history-retrospective-screen .history-party-profile span {
  font-weight: normal;
}
body.history-retrospective-screen .history-state-browser {
  margin-top: 1.1em;
  padding-bottom: 1.1em;
}
body.history-retrospective-screen .history-state-browser-layout {
  display: block;
}
body.history-retrospective-screen .history-state-detail {
  min-width: 0;
}
body.history-retrospective-screen .history-state-summary {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  transform: translateY(0.45em);
}
body.history-retrospective-screen .history-state-summary p {
  margin: 0.04em 0;
  font-size: 0.58em;
  line-height: 1.12;
  text-indent: 0;
  white-space: nowrap;
}
body.history-retrospective-screen .history-state-summary strong {
  font-weight: bold;
}
body.history-retrospective-screen .history-state-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(176px, 0.7fr);
  align-items: start;
  gap: 0.35em;
}
body.history-retrospective-screen .history-state-landtag-panel,
body.history-retrospective-screen .history-state-election-panel {
  min-width: 0;
}
body.history-retrospective-screen .history-state-landtag-panel {
  position: relative;
}
body.history-retrospective-screen .history-state-election-panel {
  box-sizing: border-box;
}
body.history-retrospective-screen .history-state-election-panel .recovered-history-graph {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin-bottom: 0;
  overflow: visible;
  clip-path: inset(-100% 0 -100% -100%);
}
body.history-retrospective-screen .history-state-name {
  margin: 0 0 0.7em;
  font-size: 1em;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  text-indent: 0;
  transform: translateY(0.6em);
}
body.history-retrospective-screen .history-state-name.is-long {
  font-size: 0.88em;
}
body.history-retrospective-screen .history-state-election-panel .party-label {
  display: none;
}
body.history-retrospective-screen .history-state-footer {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  align-items: center;
  gap: 0.8em;
  width: min(100%, 280px);
  margin: 0.5em auto 0;
  transform: translateY(-0.35em);
}
body.history-retrospective-screen .history-state-flag-panel {
  display: grid;
  place-items: center start;
}
body.history-retrospective-screen .history-state-flag-panel .state-flag {
  display: block;
  max-width: 125px;
  height: auto;
  margin: 0;
  border: 2px solid #000;
}
body.history-retrospective-screen .history-state-parliament {
  max-width: 100%;
  transform: translateY(0.45em);
}
body.history-retrospective-screen .history-state-cabinet-name,
body.history-retrospective-screen .history-state-cabinet-parties {
  margin: 0.12em 0;
  font-size: 0.78em;
  font-weight: normal;
  line-height: 1.25;
  text-align: center;
  text-indent: 0;
}
body.history-retrospective-screen .history-state-cabinet-parties strong {
  font-weight: bold;
}
body.history-retrospective-screen .history-state-selector {
  display: grid;
  grid-template-columns: repeat(4, 2.5em);
  justify-content: center;
  gap: 0;
  margin-top: 2.8em;
}
body.history-retrospective-screen .history-state-selector button {
  display: grid;
  place-items: center;
  font: inherit;
  width: 2.5em;
  height: 2.5em;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0.05em;
  cursor: pointer;
}
body.history-retrospective-screen .history-state-selector button:hover,
body.history-retrospective-screen .history-state-selector button:focus-visible {
  border-color: #8b7e6a;
  background: rgb(111 98 80 / 10%);
}
body.history-retrospective-screen .history-state-selector button.is-selected {
  border-color: #777;
  background: rgb(128 128 128 / 24%);
  box-shadow: inset 0 0 0 1px rgb(96 96 96 / 40%);
}
body.history-retrospective-screen .history-state-selector img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.history-retrospective-screen .recovered-history-graph text {
  fill: #000;
  font: 10px sans-serif;
}
body.history-retrospective-screen .recovered-history-graph .party-label {
  font: 12px Georgia, serif;
}
body.history-retrospective-screen .recovered-history-empty-axis {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
@media (max-width: 620px) {
  body.history-retrospective-screen { min-width: 0; }
  body.history-retrospective-screen #content { overflow-x: hidden; }
  body.history-retrospective-screen .history-charts-right-panel,
  body.history-retrospective-screen .history-charts-left-panel {
    position: static;
    box-sizing: border-box;
    width: auto;
    margin: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
  body.history-retrospective-screen .history-charts-right-panel > .history-chart:first-child > h1:first-child {
    margin-top: 2em;
  }
  body.history-retrospective-screen .history-charts-left-panel > .history-chart:first-child > h1:first-child {
    margin-top: 2em;
  }
  .history-chart { padding: 1em 0.55em 1.25em; }
  .history-chart h2 { font-size: 1.05em; }
  .history-chart text { font-size: 11px; }
  .history-chart-legend { gap: 0.3em 0.55em; font-size: 0.72em; }
  body.history-retrospective-screen .history-state-browser-layout { display: block; }
  body.history-retrospective-screen .history-state-overview {
    grid-template-columns: minmax(0, 1fr);
  }
  body.history-retrospective-screen .history-state-election-panel {
    width: min(220px, 100%);
    margin: 0 auto;
  }
  body.history-retrospective-screen .history-state-selector {
    justify-content: center;
    margin-top: 2.8em;
  }
}

/* Native overlay shell. game.css supplies .overlay_top and table geometry. */
dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  background: rgb(0 0 0 / 70%);
  padding: 0;
  color: #fff;
  overflow: auto;
}
dialog::backdrop { background: transparent; }
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-bottom: 1px solid #aaa;
  padding: 0.5em;
}
.dialog-header h2 { margin: 0; font-size: 1em; font-weight: normal; text-transform: uppercase; letter-spacing: 0.08em; }
.dialog-header h2::before { content: none; }
.dialog-close { font: initial; }
#cheat-dialog .dialog-header { position: relative; }
#cheat-dialog .cheat-dialog-close {
  position: absolute;
  top: 50%;
  right: 0.5em;
  border: 0;
  background: transparent;
  padding: 0.15em 0.35em;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transform: translateY(-50%);
}
.options input[type="text"] { width: 2.5em; text-align: center; text-transform: uppercase; }
.native-save-table { width: 100%; border-spacing: 0.35em; }
.native-save-table td { white-space: nowrap; }
.native-save-table time { display: inline; color: inherit; font-size: inherit; }
.native-save-table .save_info { width: 100%; min-width: 10em; white-space: normal; text-align: left; }
.save-slot-label { min-width: 1.8em; font-weight: normal; }
.native-save-table { font-weight: normal; }
#saves_dialog_root { overflow-x: auto; }
.save-dialog-actions { display: flex; gap: 8px; margin: 6px 10px 8px; }
.developer-month-skip-label {
  margin: 10px 10px 3px;
  color: #777;
  font-size: 0.72em;
  letter-spacing: 0.08em;
}
.developer-month-skip { display: flex; gap: 4px; margin: 0 10px 8px; }
.developer-month-skip button { min-width: 38px; }
.delete-button { color: #900; }
.empty-message { margin: 1em; text-align: center; font-style: italic; text-indent: 0; }
#account-summary,
.community-columns { padding: 1em; }

/* The recovered Achievements special scene, with its catalog supplied by the Worker. */
body.achievement-view #tools_wrapper,
body.achievement-view #dnvp_dashboard { display: none !important; }
body.achievement-view #content { max-width: 800px !important; }
body.achievement-view #content > :not(#achievement-page) { display: none !important; }
#achievement-page[hidden] { display: none !important; }
#achievement-page > h1:first-child { color: #3e88b3; }
.achievement-banner {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  object-position: center;
  border: 5px solid #000;
  margin-bottom: 16px;
}
.achievement-counts {
  margin-bottom: 12px;
  font-family: Georgia, serif;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ach-card { display: flex; align-items: center; gap: 10px; border: 3px solid #876; padding: 8px; background: #ede8d8; }
.ach-card.locked { filter: grayscale(1); opacity: 0.5; }
.ach-icon { width: 60px; height: 60px; border: 3px solid #876; object-fit: cover; flex-shrink: 0; background: #ccc; }
.ach-info strong { display: block; font-size: 0.85em; color: #3b2a1a; }
.ach-info span { font-size: 0.9em; color: #666; }
.achievement-section-title {
  grid-column: 1 / -1;
  margin: 18px 0 8px;
  font-family: Georgia, serif;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#achievement-actions { grid-column: 1 / -1; margin-top: 18px; }
#account-dialog .overlay_top { border-color: #aaa; }
#account-summary { padding: 1.1em 1em 0.8em; text-align: center; }
#account-summary strong { display: block; font-size: 1.15em; letter-spacing: 0.04em; }
#account-summary p { margin: 0.25em 0 0; color: #ddd; text-indent: 0; }
.account-notice {
  margin: 0.8em 1em 0;
  border: 1px solid currentColor;
  padding: 0.55em 0.7em;
  text-align: center;
  text-indent: 0;
}
.account-notice[data-tone="positive"] { color: #a9d99a; }
.account-notice[data-tone="negative"] { color: #ffb2aa; }
.account-options-table { margin: 0.2em auto 1em; border-spacing: 0.45em 0.35em; }
.account-option-label { min-width: 9em; }
.account-action { min-width: 5.5em; }
.account-name-form { display: flex; align-items: center; gap: 0.5em; margin: 1em; }
.account-name-form[hidden] { display: none; }
.community-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1em;
}
.community-columns > section {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid #aaa;
  padding: 0.75em;
}
.community-columns > .community-profile { position: relative; grid-column: 1 / -1; }
.community-profile-login {
  display: flex;
  min-height: 8em;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
  text-indent: 0;
}
.community-profile-layout {
  display: grid;
  grid-template-columns: minmax(16em, 0.8fr) minmax(0, 1.2fr);
  gap: 1.25em;
  align-items: start;
}
.community-profile-identity {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.8em;
  align-items: center;
}
.community-profile-portrait {
  display: flex;
  width: 92px;
  height: 92px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 2px solid #aaa;
  color: #bbb;
  font-size: 0.7em;
  text-align: center;
}
.community-profile-portrait img { width: 100%; height: 100%; object-fit: cover; }
.community-profile-identity dl { min-width: 0; margin: 0; }
.community-profile-identity dt { color: #bbb; font-size: 0.75em; }
.community-profile-identity dd { margin: 0 0 0.5em; overflow-wrap: anywhere; }
.community-profile-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.45em; align-items: start; min-width: 0; }
.community-profile-settings textarea {
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  border: 1px solid #aaa;
  padding: 0.35em 0.5em;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
}
.community-profile-privacy { display: flex; flex-wrap: wrap; gap: 0.35em 0.8em; margin: 0; border: 0; padding: 0; }
.community-profile-privacy legend { width: 100%; margin: 0; }
.community-profile-save {
  position: absolute;
  top: 0.75em;
  left: 0.75em;
}
.community-profile-notice { align-self: center; color: #a9d99a; font-size: 0.8em; }
.community-columns h3 { margin-top: 0; text-align: center; text-transform: uppercase; }
.community-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6em;
}
.community-section-heading h3 { margin-bottom: 0.65em; }
#community-achievement-sort { display: flex; gap: 0.45em; }
.community-sort-button {
  border: 0;
  background: transparent;
  padding: 0 0.2em;
  color: #fff;
  font: inherit;
  font-size: 0.7em;
  cursor: pointer;
}
.community-sort-button:hover,
.community-sort-button:focus-visible { background: rgb(255 255 255 / 18%); }
.community-search {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 0.65em;
  border: 1px solid #aaa;
  padding: 0.35em 0.5em;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
}
.community-search::placeholder { color: #bbb; }
#community-leaderboard,
#community-achievements {
  max-height: min(26rem, calc(100vh - 15rem));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
.community-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.community-table th:first-child,
.community-table td:first-child { width: 2.6em; }
.community-table th:last-child,
.community-table td:last-child { width: 3.7em; }
.community-table th,
.community-table td { border-bottom: 1px dotted #aaa; padding: 0.3em; text-align: left; }
.community-table td:last-child { text-align: center; }
.community-player { cursor: help; text-decoration: underline dotted; text-underline-offset: 0.18em; }
.community-player:focus { outline: 1px dotted currentColor; outline-offset: 2px; }
.community-rank { position: relative; }
.community-presence {
  position: absolute;
  top: 50%;
  right: 0.2em;
  display: block;
  width: 0.55em;
  height: 0.55em;
  margin: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translateY(-50%);
}
.community-presence-online { background: #2d7a2d; color: #2d7a2d; }
.community-presence-offline { background: #b00000; color: #b00000; }
.community-player-tooltip {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.65em;
  border: 2px solid #aaa;
  padding: 0.5em 0.65em;
  background: #222;
  color: #fff;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.community-player-tooltip[hidden] { display: none; }
.community-player-tooltip img { width: 48px; height: 48px; object-fit: cover; }
.community-player-tooltip strong { display: block; }
.community-player-tooltip-description { max-width: 16em; margin: 0.2em 0 0; color: #ddd; font-size: 0.8em; text-indent: 0; }
.community-achievement-tooltip {
  position: fixed;
  z-index: 11;
  box-sizing: border-box;
  width: 260px;
  max-width: calc(100vw - 16px);
  border: 2px solid #999;
  background: #fff;
  padding: 10px;
  color: #000;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 35%);
  font-size: 0.95em;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
.community-achievement-tooltip[hidden] { display: none; }
.community-achievement {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0.75em;
  border-bottom: 1px dotted #aaa;
  padding: 0.65em 0;
}
.community-achievement:last-child { border-bottom: 0; }
.community-achievement-icon {
  grid-row: 1 / 3;
  width: 64px;
  height: 64px;
  border: 2px solid #aaa;
  background: #eee;
  object-fit: cover;
}
.community-achievement-icon-locked { filter: grayscale(100%); opacity: 0.55; }
.community-achievement-rarity {
  min-width: 0;
  color: #bbb;
  font-size: 0.82em;
  font-style: italic;
  line-height: 1.2;
}
.community-achievement-name {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  min-width: 0;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}
.community-achievement-name-trigger {
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
  cursor: help;
}

#achievement-toast {
  display: contents;
}

.background { pointer-events: none; }
#page { position: relative; }
#page > footer:empty { display: none; }

#spectator-cursor {
  position: fixed;
  z-index: 10001;
  transform: translate(-0.2rem, -0.2rem) rotate(-45deg);
  color: #8e130b;
  filter: drop-shadow(0 1px 1px #fff);
  pointer-events: none;
}

#spectator-cursor[hidden] { display: none; }
.spectator-cursor-arrow { font-size: 1.5rem; }
.spectator-mode .choice,
.spectator-mode button.card { cursor: default; pointer-events: none; }

.spectator-correspondence {
  position: fixed;
  z-index: 10002;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 2rem));
  grid-template-rows: auto minmax(5rem, 1fr) auto;
  border: 2px solid #aaa;
  background: rgb(32 32 32 / 94%);
  color: #fff;
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  transform: translate(-50%, -50%);
}

.spectator-mode .spectator-correspondence {
  top: auto;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  transform: none;
}

.spectator-correspondence[hidden] { display: none; }
.spectator-correspondence > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border-bottom: 0;
  background: transparent;
  letter-spacing: 0.08em;
}
.spectator-correspondence > header strong { color: #fff; font-size: 0.92rem; }
.spectator-correspondence-dismiss {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}
.spectator-correspondence-transcript {
  min-height: 6rem;
  padding: 0.55rem;
  overflow-y: auto;
}
.spectator-correspondence-message {
  width: auto;
  max-width: none;
  margin: 0 0 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
}
.spectator-correspondence-message-player { margin-left: 0; background: transparent; }
.spectator-correspondence-message strong {
  display: inline;
  margin: 0;
  color: #fff;
  font-size: inherit;
  letter-spacing: 0;
}
.spectator-correspondence-message strong::after { content: ": "; }
.spectator-correspondence-message p {
  display: inline;
  margin: 0;
  white-space: pre-wrap;
}
.spectator-correspondence-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.55rem;
  border-top: 0;
  background: transparent;
}
.spectator-correspondence-form textarea {
  min-width: 0;
  resize: vertical;
  border: 1px solid #aaa;
  background: #fff;
  color: #000;
  font: inherit;
  line-height: 1.25;
}
.spectator-correspondence-form button {
  align-self: stretch;
  border: 1px solid #aaa;
  background: #eee;
  color: #111;
  padding: 0.35rem 0.65rem;
  font: initial;
  cursor: pointer;
}

/* Recovered street map and state tooltip. */
#streetfighting-map-test { max-width: 980px; margin: 18px auto 8px; }
#streetfighting-map-test svg { display: block; width: 100%; height: auto; overflow: visible; }
#streetfighting-map-test .streetfighting-region {
  fill: var(--streetfighting-fill, #fff) !important;
  stroke: #000 !important;
  stroke-width: 1.05;
  vector-effect: non-scaling-stroke;
  cursor: help;
}
#streetfighting-map-test #sf-sudetenland-9 { stroke-width: 1.2705; }
#streetfighting-map-test .streetfighting-region:focus { outline: none; }
#streetfighting-map-modes { max-width: 760px; margin: 12px auto 20px; text-align: center; }
#streetfighting-map-modes .streetfighting-active-poster { width: min(620px, 96vw); margin: 0 auto 12px; }
#streetfighting-balance { width: 100%; margin: 2px auto 10px; text-align: center; font-size: 0.9em; line-height: 1.3; }
#streetfighting-map-modes .streetfighting-active-poster > strong {
  display: block; width: 100%; margin: 0 auto 11px; font-size: 1.22em; line-height: 1.12;
  text-align: center; transform: translateX(-30px);
}
#streetfighting-map-modes .streetfighting-active-poster-body {
  display: grid; grid-template-columns: minmax(180px, 240px) minmax(230px, 270px);
  justify-content: center; align-items: center; gap: 0; text-align: left;
}
#streetfighting-map-modes .streetfighting-active-poster-art {
  display: flex; flex-direction: column; align-items: center; min-width: 0; transform: translateX(-16px);
}
#streetfighting-map-modes .streetfighting-active-poster-art > img {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover;
  object-position: center; box-sizing: border-box; border: 4px solid #111;
}
#streetfighting-map-modes .streetfighting-active-poster dl {
  display: flex; flex-direction: column; justify-content: center; align-self: stretch;
  margin: 0; text-align: center; transform: translateX(-18px);
}
#streetfighting-map-modes .streetfighting-active-poster dl > div { margin: 0 0 15px; font-size: 1.04em; line-height: 1.18; }
#streetfighting-map-modes .streetfighting-active-poster dl > div:last-child { margin-bottom: 0; }
#streetfighting-map-modes .streetfighting-active-poster dt { margin-bottom: 2px; font-weight: bold; }
#streetfighting-map-modes .streetfighting-active-poster dd { min-width: 0; margin: 0; }
#streetfighting-map-modes [data-profile-field="leader"] { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
#streetfighting-map-modes .streetfighting-active-poster-art > img.showing-leader-portrait { object-position: center top; }
#streetfighting-state-tooltip {
  position: fixed; top: 0; left: 0; z-index: 10000; box-sizing: border-box; display: grid;
  grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 12px; width: 250px;
  max-width: calc(100vw - 24px); padding: 12px; border: 2px solid #999; background: #fff;
  color: #2b2b2b; box-shadow: 2px 2px 6px rgb(0 0 0 / 25%); text-align: center;
  visibility: hidden; opacity: 0; pointer-events: none; contain: layout paint;
  will-change: transform, opacity; transition: opacity 100ms ease;
}
#streetfighting-state-tooltip.visible { visibility: visible; opacity: 1; }
#streetfighting-state-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #999;
}
#streetfighting-state-tooltip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #999; }
#streetfighting-state-tooltip strong { display: block; margin-bottom: 6px; font-size: 0.82em; line-height: 1.15; }
#streetfighting-state-tooltip p { margin: 0; font-size: 0.67em; line-height: 1.22; }
#streetfighting-state-tooltip img { display: block; width: 82px; height: 82px; margin: 0 auto; object-fit: contain; object-position: center; }
html.hugenberg-mode #streetfighting-state-tooltip,
html.hugenberg-mode #streetfighting-state-tooltip * { color: #2b2b2b !important; }

#news-fab, #advisors-fab { display: none; }

body.event-queue-screen #joint-lists-panel {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
  border-top: 1px solid #8b7d6b;
  background: transparent;
  padding: 0;
  cursor: default;
}
body.event-queue-screen #scene-choices > li.has-joint-lists {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
  padding: 0;
  align-items: stretch;
}
body.event-queue-screen .has-joint-lists > .joint-lists-primary-choice {
  grid-column: 1;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.6em 0.5em;
}
body.event-queue-screen .joint-lists-toggle {
  grid-column: 2;
  box-sizing: border-box;
  width: 100%;
  border: 0;
  border-left: 2px solid #876;
  border-radius: 0;
  background: transparent;
  padding: 0.6em 0.5em;
  color: #a00000;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
}
body.event-queue-screen .joint-lists-toggle:hover,
body.event-queue-screen .joint-lists-toggle:focus-visible { background: rgb(67 17 17 / 5%); }
body.event-queue-screen .has-joint-lists > .subtitle { grid-column: 1 / -1; }
body.event-queue-screen .joint-lists-explanation { margin: 0; padding: 0.7em 0.5em 0; }
body.event-queue-screen .joint-lists-summary { margin: 0; padding: 0.7em 0.5em; }
body.event-queue-screen .joint-list-options {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

@media screen and (max-width: 1024px) {
  html, body { overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-y; }
  body { min-height: 100dvh; }
  img, table, .card-img { max-width: 100%; height: auto; }
  #page, #content, #mid_panel, #tools_wrapper { position: static; }
  #mid_panel { margin: 0 auto; }
  header, #content, #dnvp_dashboard, footer {
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 720px);
    max-width: 720px;
  }
  #tools_wrapper {
    box-sizing: border-box;
    width: min(calc(100% - 2rem), 720px);
    max-width: 720px;
  }
  #content { padding: 1em 1em 1.5em; line-height: 1.55; }
  body.landing-page.landing-menu-image-experiment #content { overflow: hidden; }
  body.landing-page.landing-menu-image-experiment #content::before,
  body.landing-page.landing-menu-image-experiment #content::after,
  body.landing-page.landing-menu-image-experiment #content > .scene-heading::before {
    right: 0;
    left: 0;
  }
  header, #content, #dnvp_dashboard, footer, #mid_panel, #tools_wrapper, #qualities,
  #stats_sidebar, .tools, .tools.left { overflow-y: visible !important; overflow-x: hidden; }
  .tools.left, .tools.right { float: none; width: auto; margin: 0.4em; }
  .tab_button { min-height: 44px; padding: 0.4em 0.3em; font-size: 0.95em; }
  #header-links { display: flex; flex-wrap: wrap; gap: 0.4em; justify-content: center; }
  ul.choices li a { padding: 0.6em 0.5em; }
  ul.hand.has-executive { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0.5em; }
  .tools.right { display: none !important; }
  html.pre-game body:not(.landing-page) #native-news {
    display: block !important;
    position: static !important;
    width: auto !important;
    margin: 0.4em !important;
  }
  .tools.right.state-mode { display: block !important; position: static !important; width: auto !important; margin: 0.4em !important; }
  body.news-open .tools.right {
    display: block !important; position: fixed !important; inset: 0; width: 100vw; height: 100vh;
    margin: 0 !important; border: 0; z-index: 9999; background: var(--content-bg-color);
    overflow-y: auto !important; overscroll-behavior: contain; box-sizing: border-box; padding: 1em 1em 6em;
  }
  body.news-open, body.advisors-open { overflow: hidden !important; }
  body.news-open header, body.news-open #stats_sidebar, body.news-open #content,
  body.news-open #dnvp_dashboard, body.news-open footer { display: none !important; }
  #news-fab:not([hidden]), #advisors-fab:not([hidden]) {
    display: inline-block; position: fixed; bottom: 16px; padding: 10px 16px; background: #fff;
    color: #000; border: 2px solid #000; font: bold 0.95em/1 "Minion Pro", Georgia, serif;
    letter-spacing: 0.05em; box-shadow: 2px 2px 8px rgb(0 0 0 / 25%); cursor: pointer; z-index: 10000;
  }
  #news-fab { left: 16px; }
  #advisors-fab { left: 110px; }
  #news-fab:active, #advisors-fab:active { transform: translate(1px, 1px); }
  #news-fab-dot, #advisors-fab-dot {
    position: absolute; top: -4px; right: -4px; width: 8px; height: 8px; background: #c00;
    image-rendering: pixelated;
  }
  .advisor-panel-wrap { display: none !important; }
  body.advisors-open .advisor-panel-wrap {
    display: block !important; position: fixed; inset: 0; width: 100vw; height: 100vh;
    margin: 0; padding: 1em 1em 6em; background: var(--content-bg-color); overflow-y: auto;
    overscroll-behavior: contain; box-sizing: border-box; z-index: 9999;
  }
  #streetfighting-map-modes .streetfighting-active-poster-body { grid-template-columns: 1fr; }
  #streetfighting-map-modes .streetfighting-active-poster-art { width: min(240px, 78vw); margin: 0 auto; transform: none; }
  #streetfighting-map-modes .streetfighting-active-poster > strong,
  #streetfighting-map-modes .streetfighting-active-poster dl { transform: none; }
  #header-links button { min-height: 44px; padding: 0.4em 0.8em; }
  .choice { min-height: 44px; }
  .community-columns { grid-template-columns: 1fr; }
  .community-profile-layout { grid-template-columns: 1fr; }
  .community-profile-settings { grid-template-columns: 1fr; }
  .community-profile-settings > * { grid-column: 1; }
  body.event-queue-screen #scene-choices > li.has-joint-lists {
    grid-template-columns: minmax(0, 1.45fr) minmax(112px, 0.75fr);
  }
  #community-leaderboard,
  #community-achievements { max-height: 14rem; }
  .account-name-form { align-items: stretch; flex-direction: column; }
  button.card { width: 100px; height: 125px; border-width: 8px; }
  button.card .card-img,
  button.card .card-face-placeholder { width: 100px; height: 125px; }
  dialog { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  dialog .overlay_top {
    box-sizing: border-box;
    width: min(calc(100vw - 2rem), 720px);
    max-width: 720px;
    max-height: calc(100dvh - 2rem);
    margin: 1rem auto;
    overflow: auto;
  }
  .spectator-mode .spectator-correspondence {
    top: auto;
    right: max(0.5rem, env(safe-area-inset-right));
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    left: max(0.5rem, env(safe-area-inset-left));
    width: auto;
    max-height: min(46dvh, 420px);
  }
  .scene-external-embed { height: calc(100dvh - 7rem); max-height: none; }
}

@media screen and (max-width: 520px) {
  header, #content, #dnvp_dashboard, footer, #tools_wrapper {
    width: calc(100% - 0.75rem);
  }
  #content { padding: 0.75em 0.7em 1.25em; }
  #content h1 { margin-right: 0.5em; margin-left: 0.5em; }
  ul.hand.has-executive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.event-queue-screen #scene-choices > li.has-joint-lists { grid-template-columns: 1fr; }
  body.event-queue-screen .has-joint-lists > .joint-lists-primary-choice,
  body.event-queue-screen .joint-lists-toggle { grid-column: 1; }
  body.event-queue-screen .joint-lists-toggle { border-top: 1px solid #8b7d6b; border-left: 0; }
  .spectator-correspondence-form { grid-template-columns: 1fr; }
  .spectator-correspondence-form button { min-height: 44px; }
  dialog .overlay_top { width: calc(100vw - 0.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.scene-external-embed {
  display: block;
  width: 100%;
  height: 790px;
  max-height: calc(100vh - 190px);
  min-height: 0;
  border: 1px solid #000;
  background: #fff;
}
body.wikipedia-ending-screen #tools_wrapper,
body.wikipedia-ending-screen #dnvp_dashboard,
body.wikipedia-ending-screen #stats_sidebar,
body.wikipedia-ending-screen #native-news { display: none !important; }
body.wikipedia-ending-screen #mid_panel { margin: 0 auto !important; }
body.wikipedia-ending-screen #content {
  box-sizing: border-box;
  width: calc(100vw - 48px);
  max-width: 1180px !important;
}
body.wikipedia-ending-screen #content > .scene-heading { display: none; }
