@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');

body {
  --bg-color: #f3f3e3;
  --border-color: #000;
  --content-bg-color: #f3f3f3;
  --text-color: #431;
  --link-color: #900;
  --link-hover-color: rgba(0, 0, 0, 0.05);
  --unavailable-bg-color: rgba(0, 0, 0, 0.1);
  --unavailable-color: #999;
  --tab-bg-color: #dedede;
  --tab-color: #ddd;
  --tab-hover-color: #ececec;
  --card-border-color: #ccc; 
  --card-bg-color: #ddd; 
  font-family: "Minion Pro", Georgia, serif;
  background-color: var(--bg-color);
  padding: 0;
  line-height: 155%;
  overflow-y: scroll;
  min-height: 1300px;
}
body.dark-mode {
  --bg-color: #000;
  --border-color: #fff;
  --content-bg-color: #242424;
  --text-color: #efefef;
  --link-color: #ff8080;
  --link-hover-color: rgba(255, 255, 255, 0.06);
  --tab-bg-color: #555555;
  --tab-color: #505050;
  --tab-hover-color: #242424;
  --card-border-color: #4c4c4c;
  --card-bg-color: #3f3f3f;
}
body.dark-mode #content {
  border-style: double;
  border-width: 4px;
  border-color: #888;
}
body.dark-mode .tools {
  border-style: double;
  border-width: 4px;
  border-color: #888;
}
header, #content, #dnvp_dashboard, footer {
  color: var(--text-color);
  max-width: 540px;
  margin: 0 auto;
  overflow: auto;
  overflow-x: hidden;    /* ADVISOR-WRAP-TINT: kill horizontal scrollbar caused by .advisor-panel-wrap's negative side margins. Remove this line to roll back. */
}
#content {
  position: relative;
  background-color: var(--content-bg-color);
  font-size: 1.1em;
  padding: 1em 1.5em 1.5em 1.5em;
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
  
  
}
/* ============================================================
   ADVISOR FACTION TIMER BAR (conjoined, centered header)
   ============================================================ */

/* Subtle tint to set the advisor section apart from the page bg.
   Wraps header + ul.pinned-cards so the tint is one continuous rect.
   Negative side margins pull the tint out to the content column edges. */
.advisor-panel-wrap {
    background-color: rgba(0, 0, 0, 0.035);
    padding: 12px 24px 28px;
    margin: -9px -28px -26px;
}

.advisor-panel-wrap .advisor-panel-head {
    margin: 0 0 4px !important;
}

.advisor-panel-wrap > ul.pinned-cards {
    margin: 0;
}

.advisor-header {
    font-size: 1em;
    margin-bottom: 4px;
    color: var(--text-color);
    text-align: center;
    font-weight: bold;
}

.advisor-timer-conjoined {
    display: flex;
    width: 100%;
    height: 16px;
    border: 3px solid #000;
    overflow: hidden;
    margin-bottom: 2px;
}

.advisor-timer-segment {
    flex: 1;
    height: 100%;
    background: #e0e0e0;
    overflow: hidden;
    position: relative;
    --tick-bg: #000;
    --tick-fill: #fff;
    --divider-color: #fff;
    --divider-width: 2px;
}

/* Divider drawn as an overlay at the right edge, doesn't affect layout, so the
   fill's `left: 50%` actually lands at the visual center of the segment. */
.advisor-timer-segment::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    right: 0;
    width: var(--divider-width, 2px);
    background: var(--divider-color, #000);
    z-index: 3;
}

.advisor-timer-segment:last-child::before {
    display: none;
}

/* Inverted: dark gray background, light fill (left two factions).
   Black separator matches the black filled-ticks scheme on these segments.
   Black needs to be 1px wider than the white separators to optically match
   (white halates against dark adjacent fills). */
.advisor-timer-segment.invert {
    background: #6a6a6a;
    --tick-bg: #fff;
    --tick-fill: #000;
    /* No tick shift, keeps the visible tick within a small fill centered on the
       fill's actual mid-point, so the fill reads as centered in the segment. */
    --tick-bg-shift: 0px;
    --tick-fill-shift: 0px;
}

.advisor-timer-segment:not(.invert) {
    --tick-bg-shift: 0px;
    --tick-fill-shift: 0px;
}

/* Shared 7-tick gradient, color is configurable via --tick-color.
   White ticks get a small left shift via --shift to keep them visually balanced
   when adjacent to a dark divider (white halates against dark; black does not). */
.advisor-timer-segment::after,
.advisor-timer-fill::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    background: linear-gradient(to right,
        transparent calc(12.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(12.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(12.5% + var(--shift, 0px) + 1px),
        transparent calc(12.5% + var(--shift, 0px) + 1px), transparent calc(25% + var(--shift, 0px) - 1px), var(--tick-color) calc(25% + var(--shift, 0px) - 1px), var(--tick-color) calc(25% + var(--shift, 0px) + 1px),
        transparent calc(25% + var(--shift, 0px) + 1px), transparent calc(37.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(37.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(37.5% + var(--shift, 0px) + 1px),
        transparent calc(37.5% + var(--shift, 0px) + 1px), transparent calc(50% + var(--shift, 0px) - 1px), var(--tick-color) calc(50% + var(--shift, 0px) - 1px), var(--tick-color) calc(50% + var(--shift, 0px) + 1px),
        transparent calc(50% + var(--shift, 0px) + 1px), transparent calc(62.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(62.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(62.5% + var(--shift, 0px) + 1px),
        transparent calc(62.5% + var(--shift, 0px) + 1px), transparent calc(75% + var(--shift, 0px) - 1px), var(--tick-color) calc(75% + var(--shift, 0px) - 1px), var(--tick-color) calc(75% + var(--shift, 0px) + 1px),
        transparent calc(75% + var(--shift, 0px) + 1px), transparent calc(87.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(87.5% + var(--shift, 0px) - 1px), var(--tick-color) calc(87.5% + var(--shift, 0px) + 1px),
        transparent calc(87.5% + var(--shift, 0px) + 1px), transparent 100%);
    pointer-events: none;
}

/* Background tick layer (visible in unfilled portion). */
.advisor-timer-segment::after {
    left: 0; right: 0;
    --tick-color: var(--tick-bg);
    --shift: var(--tick-bg-shift, 0px);
    z-index: 1;
}

/* Fill tick layer (covers same segment-wide tick grid but clipped to fill).
   --w is the fill percentage (numeric) set inline; scales/offsets the ::before
   so its tick grid aligns with the segment's grid. */
.advisor-timer-fill::before {
    left: calc(50% - 5000% / var(--w, 100));
    width: calc(10000% / var(--w, 100));
    --tick-color: var(--tick-fill);
    --shift: var(--tick-fill-shift, 0px);
    z-index: 2;
}

.advisor-timer-fill {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    transform: translateX(-50%);
    transition: width 0.4s ease;
    overflow: hidden;
    z-index: 2;
}

.advisor-timer-labels {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
    margin-left: -15px;
}

.advisor-timer-label {
    flex: 1;
    text-align: center;
    font-size: 0.75em;
    min-height: 1.2em;
    padding: 0;
    margin: 0;
}

.advisor-ready {
    color: #2d7a2d;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

footer {
  margin-top: 1em;
  font-size: 0.8em;
  position: relative;
}
footer a {
  padding-right: 1em;
}
header {
  text-align: right
}
#header-links {
  text-align: left;
  float: left;
  display: inline-block;
  margin-bottom: 0.5em;
  padding-left: 1em;
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color);
}
#header-links a {
  padding-right: 1em;
}
header h1, header h2 {
  display: inline-block;
  font-weight: normal;
  margin: 0;
  font-size: 1em;
}
header h1 {
  font-weight: bold;
}
header h2:before {
  content: "by";
  font-style: italic;
  padding: 0 0.3em 0 0;
}

#content #read-marker {
  border: none;
  border-top: 1px solid var(--border-color);
  height: 1px;
  width: 20%;
  clear: left;
}
#content h1:first-child {
  margin-top: 0.5em;
}
#content h1 {
  margin: 2em 0 1em 0;
  font-size: 1.35em;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: rgba(255, 255, 255, 0.75) 2px 2px 2px,
               rgba(0, 0, 0, 0.1) -1px -1px 2px;
}
a {
  color: var(--link-color);
  text-decoration: none;
}
p {
  margin: 0;
  margin-bottom: 1em;
  text-indent: 1em;
}
p.game-over {
  border: 2px solid #bbb;
  padding: 0.5em;
  margin: 0.5em 0 0 0;
  border-radius: 4px;
  color: #999;
}
ul.choices {
  border: 2px solid #876;
  padding: 0;
  margin: 0.25em 0 0 0;
  list-style-type: none;
  border-radius: 4px;
  clear: left;
}
ul.choices li {
  border-bottom: 1px solid #876;
  padding: 0.5em;
}
ul.choices li div.subtitle {
  margin-left: 2em;
  font-style: italic;
}
ul.choices.monarchismus {
  display: flex;
  flex-direction: column;
  height: 300px;
  clear: none;
  margin-right: 0;
}

ul.choices.monarchismus li {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

ul.choices li.unavailable {
  color: var(--unavailable-color);
  background-color: var(--unavailable-bg-color) !important;
  cursor: default !important;
}
ul.choices li:hover {
  background-color: var(--link-hover-color);
  cursor: pointer;
}
ul.choices li:last-child {
  border-bottom: none;
}
ul.choices a {
  text-decoration: none;
}
blockquote {
  margin: 1em 2em;
}
blockquote.attribution {
  margin-left: 4em;
}
blockquote + blockquote.attribution {
  margin-top: -1em;
}
/* This is mostly copied from undum. */
#mid_panel {
  margin: 0 16rem;
}
#page {
  margin: 0 auto;
  position: relative;
}
#tools_wrapper {
  position: absolute;
  width: 100%;
  max-width: 69em;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.tools {
  padding: 0.6em;
  width: 14rem;
  color: var(--text-color);
  background-color: var(--content-bg-color);
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
}
.tools.left {
  float: left;
  left: 0.4em;
}
.tools.right {
  float: right;
  right: 0.4em;
}
#qualities {
  text-indent: 0;
  line-height: 1.3em;
}
#qualities p {
  text-indent: 0;
}
#qualities h1 {
  font-size: 1.1em;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: rgba(255, 255, 255, 0.75) 2px 2px 2px,
               rgba(0, 0, 0, 0.1) -1px -1px 2px;
}
#qualities h1 + p:first-line {
  font-weight: normal;
}


/* tabs */
.tab_container {
    background-color: var(--tab-bg-color);
    margin-top: -0.6em;
    margin-left: -0.6em;
    margin-right: -0.6em;
}
.tab_button {
    font-family: "Minion Pro", Georgia, serif;
    background-color: var(--tab-color);
    color: var(--text-color);
    /*float: left;*/
    border: none;
    outline: none;
    padding: 10px;
}
.tab_button.active {
    background-color: var(--content-bg-color);
}
.tab_button:hover {
    background-color: var(--tab-hover-color);
}


.overlay {
    background: rgba(0,0,0,0.7);
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    overflow: scroll;
}
.options {
    text-align: right;
}
.overlay_top {
    position: relative;
    max-width: 540px;
    margin: 100px auto;
    background: rgba(50,50,50,0.7);
    border: 2px solid;
    color: white;
}
.save_info {
    min-width: 10em;
    position: relative;
}
.save-info-text[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 2px;
    background: #222;
    color: #fff;
    padding: 2px 8px;
    border: 1px solid #888;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--bg-color);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    overflow: hidden;
}
/*
 * This is used for overlaying transparencies
 * only transition on fade-in
 * */
#bg2 {
    z-index: -100;
}
#bg1 {
    z-index: -99;
}
.b {
}
.save_button {
}
.delete_button {
}
ul.pinned-cards:not(.decorated),
ul.choices:not(.decorated),
ul.decks:not(.decorated) { visibility: hidden; }

/* ============================================================
   ADVISOR LAYOUT, centered rows, small deputy, faction-ordered bottom
   ============================================================ */

ul.pinned-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    row-gap: 1.0em;              /* was 1.5em, tighter rows */
    align-items: flex-start;
    justify-content: center;
    padding-left: 0;
    list-style: none;
}

ul.pinned-cards .pinned-card {
    margin-right: 0;
    display: block;
    text-align: center;
    
}



/* -------- Faction borders -------- */
a.card[data-faction="authcon"] {
    border: 8px solid #000435 !important;   /* was #DAA520, dark navy */
}
a.card[data-faction="christsoc"] {
    border: 8px solid #DAB1DA !important;   /* was #A065A0, pale lavender */
}
a.card[data-faction="volkskons"] {
    border: 8px solid #90D5FF !important;   /* already correct */
}
a.card[data-faction="volkisch"] {
    background-color: #06402B !important;
    border: 8px solid #06402B !important;   /* already correct */
}

/* -------- Deputy: smaller, same proportions, tucked against leader -------- */
a.card[data-faction][data-role="deputy"] {
    width: 80px !important;
    height: 100px !important;
    border-width: 5px !important;
}
a.card[data-faction][data-role="deputy"] img.card-img {
    width: 80px !important;
    height: 100px !important;
    object-fit: cover;
}
ul.pinned-cards li.pinned-card[data-role="deputy"] {
    align-self: center;          /* was flex-start */
    margin-left: -0.5em;
}

ul.pinned-cards li.pinned-card[data-role="deputy"] .card-caption {
    font-size: 0.85em;
    line-height: 1.1;
}

/* ============================================================
   PASSIVE EFFECT TOOLTIP (used by deputy cards and similar)
   ============================================================ */

.passive-wrap {
    position: relative;
    display: inline;
    text-decoration: underline;
    text-decoration-style: dashed;
    cursor: help;
}

.passive-tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 320px;
    padding: 10px 12px;
    background: #2a2a2a;
    color: #f0f0f0;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 6px;
    /* Prevent the tooltip from inheriting the dashed underline */
    pointer-events: none;
}

.passive-wrap:hover .passive-tip {
    display: block;
}

/* ============================================================
   CARD HOVER TOOLTIP (for deputy advisors, etc.)
   ============================================================ */

/* The tooltip itself, attached inside a card element */
/* ============================================================
   CARD HOVER TOOLTIP (for deputy advisors, etc.)
   ============================================================ */

.card-passive-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    max-width: 320px;
    padding: 10px 12px;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    font-family: inherit;           /* uses the game's native serif */
    font-size: 0.9em;
    line-height: 1.4;
    text-align: left;
    z-index: 1000;
    display: none;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    pointer-events: none;
    white-space: normal;
}

/* Show on card hover */
ul.pinned-cards a.card:hover .card-passive-tip,
ul.pinned-cards a.card:focus .card-passive-tip {
    display: block;
}
/* ============================================================
   EMPOWERED FACTION HIGHLIGHT, gold border replaces faction border
   ============================================================ */

body.empowered-authcon   a.card[data-faction="authcon"],
body.empowered-christsoc a.card[data-faction="christsoc"],
body.empowered-volkskons a.card[data-faction="volkskons"],
body.empowered-volkisch  a.card[data-faction="volkisch"] {
    border-color: #DAA520 !important;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.5), 3px 3px 8px rgba(0,0,0,0.3) !important;
}

/* -------- Ordering: empowered leader + deputy first -------- */
body.empowered-authcon   ul.pinned-cards li.pinned-card[data-faction="authcon"][data-role="leader"],
body.empowered-christsoc ul.pinned-cards li.pinned-card[data-faction="christsoc"][data-role="leader"],
body.empowered-volkskons ul.pinned-cards li.pinned-card[data-faction="volkskons"][data-role="leader"],
body.empowered-volkisch  ul.pinned-cards li.pinned-card[data-faction="volkisch"][data-role="leader"] {
    order: 1;
}
body.empowered-authcon   ul.pinned-cards li.pinned-card[data-faction="authcon"][data-role="deputy"],
body.empowered-christsoc ul.pinned-cards li.pinned-card[data-faction="christsoc"][data-role="deputy"],
body.empowered-volkskons ul.pinned-cards li.pinned-card[data-faction="volkskons"][data-role="deputy"],
body.empowered-volkisch  ul.pinned-cards li.pinned-card[data-faction="volkisch"][data-role="deputy"] {
    order: 2;
}

/* Row-break spacer, real DOM element inserted by game.js */
ul.pinned-cards li.advisor-row-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    order: 3;     /* between empowered pair (1-2) and bottom row (10+) */
    list-style: none;
}

/* -------- Bottom row: Volkskons → ChristSoc → AuthCon → Völkisch -------- */
ul.pinned-cards li.pinned-card[data-faction="volkskons"][data-role="leader"]  { order: 10; }
ul.pinned-cards li.pinned-card[data-faction="christsoc"][data-role="leader"]  { order: 11; }
ul.pinned-cards li.pinned-card[data-faction="authcon"][data-role="leader"]    { order: 12; }
ul.pinned-cards li.pinned-card[data-faction="volkisch"][data-role="leader"]   { order: 13; }
/*
 * Card stuff for dendrynexus
 * 
 */

ul.decks, ul.hand, ul.pinned-cards {
  list-style: none;
  padding-left: 0;
}
/* ============================================================
   FLANKING DEPUTIES (for Hugenberg-era authcon: 2 deputies)
   ============================================================ */

/* Left deputy: order 1, tucked against leader from the LEFT */
body.empowered-authcon ul.pinned-cards li.pinned-card[data-faction="authcon"][data-role="deputy"][data-deputy-side="left"] {
    order: 1;
    align-self: center;          /* match right deputy's vertical alignment */
    margin-left: 0;              /* cancel the default deputy -0.5em left margin */
    margin-right: -0.5em;        /* tuck against leader from the left */
}

/* Leader stays center */
body.empowered-authcon ul.pinned-cards li.pinned-card[data-faction="authcon"][data-role="leader"] {
    order: 2;
}

/* Right deputy: order 3 */
body.empowered-authcon ul.pinned-cards li.pinned-card[data-faction="authcon"][data-role="deputy"][data-deputy-side="right"] {
    order: 3;
    align-self: center;          /* explicit, belt-and-suspenders */
    margin-left: -0.5em;         /* tuck against leader from the right */
    margin-right: 0;
}

/* Row break */
body.empowered-authcon ul.pinned-cards li.advisor-row-break {
    order: 4;
}

/* Row break still fires after the rightmost element (order 3 now instead of 2) */
body.empowered-authcon ul.pinned-cards li.advisor-row-break {
    order: 4;
}

.hand {

}

/* ============================================================
   Executive card: locked to row 2, column 3 of the hand grid
   ============================================================ */
ul.hand.has-executive {
    display: grid;
    grid-template-columns: repeat(3, 140px);
    /* Fixed row height: 170px card (150 img + 2x10 border) + ~50px caption
       budget (fits up to two lines). Prevents row 2 from shifting when row 1
       cards have long, wrapping captions. */
    grid-auto-rows: 220px;
    column-gap: 1em;
    row-gap: 0.5em;
    justify-content: start;
    justify-items: center;
    align-items: start;
    padding-left: 0;
    list-style: none;
}
ul.hand.has-executive > li,
ul.hand.has-executive > div.blank-card {
    margin-right: 0 !important;
    max-width: none;
}
ul.hand.has-executive > li.executive-fixed {
    grid-column: 3;
    grid-row: 2;
}
ul.hand.has-executive > li.executive-fixed a.card {
    border-color: #b0b0b0 !important;
}
ul.hand.has-executive > li.executive-fixed .card-caption {
    display: block;
    text-align: center;
    font-size: 1em;
}

/* ============================================================
   Executive Affairs page (execute scene)
   ============================================================ */
#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 {
    text-align: center;
    width: 200px;
}
.exec-portrait-frame {
    width: 180px;
    height: 220px;
    margin: 0 auto;
    border: 6px solid #000;
    background: #f3f3f3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.exec-portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.exec-portrait-empty {
    font-size: 2em;
}
.exec-portrait-role {
    font-style: italic;
    margin-top: 0.5em;
    font-size: 0.95em;
}
.exec-portrait-name {
    margin-top: 0.1em;
    font-size: 1.1em;
}
.exec-portrait-party {
    font-size: 0.9em;
    margin-top: 0.1em;
}
.exec-reichsbank {
    border: 3px solid #000;
    padding: 1em 1.5em;
    margin: 1em auto;
    background: rgba(255,255,255,0.6);
    max-width: 480px;
}
.exec-reichsbank-title {
    font-size: 1.3em;
    text-align: center;
    margin-bottom: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.exec-reichsbank-table {
    width: 100%;
    border-collapse: collapse;
}
.exec-reichsbank-table td {
    padding: 0.25em 0.4em;
    border-bottom: 1px dotted #000;
    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 auto;
    text-align: center;
    line-height: 1.6;
    font-size: 1em;
}
.exec-meters {
    max-width: 480px;
    margin: 0.5em auto 1em auto;
}
.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;
    border: 2px solid #000;
    background: transparent;
    overflow: hidden;
}
.exec-meter-fill {
    height: 100%;
    transition: width 0.4s ease, background 0.4s ease;
}

.pinned-cards {

}

.deck {

}

a.card {
  display: inline-block;
  width: 120px;
  height: 150px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
  border: 10px solid var(--card-border-color);
  margin-bottom: 0.5em;
  position: relative;
}
a.card:hover {
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
  left: -5px;
  top: -5px;
}
div.blank-card {
  display: inline-block;
  width: 120px;
  height: 150px;
  background-color: var(--card-bg-color);
  border: 10px solid var(--card-border-color);
  margin-bottom: 0.5em;
}

.card-in-hand, .pinned-card, .deck {
  display: inline-block;
  position: relative;
  max-width: 150px;
  margin-right: 1em;
  vertical-align: top;
}

/* TODO: unavailable card */
.unavailable-card {
  color: var(--unavailable-color);
  background-color: var(--unavailable-bg-color) !important;
  cursor: default !important;
}

.card-caption {
  text-align: center;
  display: block;
  font-size: 1em;
}

.card-tooltip {
  position: absolute;
  visibility: hidden;
  width: 150px;
  max-width: 200px;
  font-size: 0.9em;
  z-index: 2;
  padding: 0.2em;
  border: 1px solid var(--border-color);
  background-color: var(--content-bg-color);
  left: 105%;
}

.card-img {
  height: 150px;
  width: 120px;
  object-fit: cover;
}

a.card:focus .card-tooltip, a.card:hover .card-tooltip {
  visibility: visible;
  position: absolute;
}

/* Unlike cards, face images can have different sizes. */
.face-figure {
  /*vertical-align: top;*/
  display: inline-block;
  border: 5px solid var(--card-border-color);
  float: left;
  max-width: 35%;
  /*max-height: 180px;*/
  margin-right: 1em;
  margin-bottom: 0.5em;
  overflow: hidden;
}
.face-img {
  /*max-width: 150px;*/
  vertical-align: bottom;
  object-fit: cover;
}

/*
 * sprite stuff- feel free to comment out/remove if not using
 */
img {
    max-width: 100%;
    max-height: 100%;
}
#contentSpriteContainer {
  position: fixed;
  width: 100%;
  height: 100%;
  max-width: 62em;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: -97;
}
.sprite {
    position: absolute;
    width: 180px;
}
#topLeftSprite {
    float: left;
    top: -1em;
    left: 0.4em;
}
#topRightSprite {
    float: right;
    top: -1em;
    right: 0.4em;
}
#bottomLeftSprite {
    float: left;
    left: 0.4em;
    top: 50%;
}
#bottomRightSprite {
    float: right;
    right: 0.4em;
    top: 50%;
}

.rw-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.rw-tooltip img {
    width: 220px;
    border: 2px solid #000435;
}

ul.choices li.ww2-notification {
    background: linear-gradient(90deg, #1a0505 0%, #3a0a0a 50%, #1a0505 100%) !important;
    border: 2px solid #8B0000 !important;
    box-shadow: 0 0 4px rgba(139, 0, 0, 0.3);
}
ul.choices li.ww2-notification a,
ul.choices li.ww2-notification b {
    color: #ff3030 !important;
}
ul.choices li.ww2-notification .subtitle span[style*="00008B"] {
    color: #6080ff !important;
}
ul.choices li.ww2-notification .subtitle b {
    color: #ffaaaa !important;
}
ul.choices li.ww2-notification:hover {
    background: linear-gradient(90deg, #2a0808 0%, #4a1010 50%, #2a0808 100%) !important;
    box-shadow: 0 0 6px rgba(139, 0, 0, 0.5);
}

/* smaller screens: hide left margin */
@media screen and (max-width: 1200px) {
  .tools {
      margin-right: 0.4em;
      margin-left: 0.4em;
  }
  #mid_panel {
      margin-right: 0.4em;
  }
}



.tools.left-mission {
    position: absolute;
    left: -240px;
    top: 50px;
    width: 220px;
    padding: 0.6em;
    color: var(--text-color);
    background-color: var(--content-bg-color);
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
    display: none;
    font-family: Georgia, serif;
    font-size: 0.9em;
}

.entente-tab {
    position: absolute;
    left: -22px;
    top: 50px;
    width: 22px;
    height: 80px;
    background-color: var(--content-bg-color);
    border: 1px solid #431;
    border-right: none;
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 0.7em;
    color: #431;
    letter-spacing: 0.05em;
    box-shadow: -2px 2px 6px rgba(0,0,0,0.1);
}

@media screen and (max-width: 1200px) {
    .tools.left-mission {
        position: static;
        width: 90%;
        margin: 0.4em;
    }
    .entente-tab {
        position: static;
        writing-mode: horizontal-tb;
        width: auto;
        height: auto;
        padding: 4px 10px;
        border: 1px solid #431;
        margin: 8px auto;
        display: inline-block;
    }
}
/* mobile: move the stat box to the top if the screen is too small,
 * and reduce font size slightly. */
@media screen and (max-width: 560px) {
  #page {
      position: static;
  }
  #content {
      position: static;
      font-size: 1em;
      line-height: 160%;
      padding: 1em 1em 1.5em 1em;
  }
  #qualities {
      font-size: 1em;
  }
  #tools_wrapper {
    position: static;
  }
  .tools {
      width: 90%;
      margin: 2em 0 1em 0;
      margin: 0.4em;
  }
  .tools.left {
      float: none;
      left: 0;
  }
  .tools.right {
      float: none;
      right: 0;
  }
  #mid_panel {
      margin: 0 auto;
  }

  body.shuffle-leadership-scene #content {
    padding-top: 0;
}

body.shuffle-leadership-scene #content h1:first-child {
    margin-top: 0.3em;
}

  /* cards are smaller on mobile */
  .card-img {
    height: 125px;
    width: 100px;
  }
  a.card {
    width: 100px;
    height: 125px;
    border: 8px solid var(--card-border-color);
    margin-bottom: 0.5em;
    position: relative;
  }
  div.blank-card {
    width: 100px;
    height: 125px;
    border: 8px solid var(--card-border-color);
    margin-bottom: 0.5em;
  }
  .card-in-hand, .pinned-card, .deck {
    max-width: 120px;
    margin-right: 1em;
    vertical-align: top;
  }
}


/* New stuff just for this game */

/* colored box div */
.box {
  display: inline-block;
  height: 1em;
  width: 1em;
}

table {
    border-spacing: 0.5em;
}

/* Styles for parties */
.seat.kpd {
    fill: #8B0000;
}
.seat.spd {
    fill: #E3000F;
}
.seat.ddp {
    fill: #DCCA4A;
}
.seat.z {
    fill: #000;
}
.seat.rlb {
    fill: #2D5A1B;
}
.seat.wp {
    fill: #D2B48C;
}

.seat.vrp {
    fill: #9a762f;
}
.seat.bvp {
    fill: #69A2BE;
}
.seat.dvp {
    fill: #D5AC27;
}
.seat.other {
    fill: #909090;
}
.seat.dnvp {
    fill: #3F7BC1;
    stroke: var(--border-color);
    stroke-width: 1.5px;
}
.seat.cvp {
    fill: #3F7BC1;
    stroke: var(--border-color);
    stroke-width: 1.5px;
}
.seat.ndnp {
    fill: #0E2345;
}
.seat.kvp {
    fill: #90D5FF;
}
.seat.nsdap {
    fill: #954B00;
}
.seat.nsfp {
    fill: #954B00;
}

.seat.sapd {
    fill: #C40000;
}

.tooltip-text {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.tools.right {
    float: right;
    display: none;
    width: 220px;
    margin-top: 0.5em;
    border: 1px solid #ffffff;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.tools.right.state-mode {
    position: absolute;
    left: calc(50% + 306px);
    top: -6px;
    right: auto;
    float: none;
    width: 300px;
    box-sizing: border-box;
    z-index: 100;
}

.state-tip-wrap {
    position: relative;
    display: inline;
    cursor: help;
    text-decoration: underline dotted;
}
.state-tip-wrap .state-tip {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid #999;
    padding: 10px;
    width: 200px;
    font-size: 0.95em;
    text-align: center;
    z-index: 100;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    color: #000;
}
.state-tip-wrap:hover .state-tip {
    display: block;
}

.seat.volkskons {
    fill: #90D5FF;
}
.seat.chrsozial {
    fill: #DAB1DA;
}
.seat.authkons {
    fill: #000435;
}
.seat.volkisch {
    fill: #06402B;
}

.seat.nonaffiliated {
    fill: #888888;
}

.seat.einheitsliste {
    fill: #D9BB9B;
    stroke: var(--border-color);
    stroke-width: 1.5px;
}

.seat.unity {
    fill: #9F8C76;
    stroke: var(--border-color);
    stroke-width: 1.5px;
}

.seat.dvfp {
  fill: #bb6f23;
}

.seat.hausbesitzer {
  fill: #8B7355;
}

.seat.bbmb {
  fill: #38C538;
}

.seat.saxpeasants {
  fill: #2D5A1B;
}

.seat.aspd {
  fill: #FF4D00;
}

.seat.spd_expelled {
  fill: #E85D2C;
}

.seat.bauern {
  fill: #2D5A1B;
}

.seat.wbwb {
  fill: #2D5A1B;
}



#dnvp_dashboard {
    clear: both;
    display: none;
    position: relative;
    background-color: var(--content-bg-color);
    font-size: 1.1em;
    padding: 1em 1.5em 1.5em 1.5em;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 1em;
    font-family: Georgia, serif;
    box-sizing: border-box;
}

/* ============================================================
   SHUFFLE LEADERSHIP BUTTON (rendered as a deck via JS reparenting)
   ============================================================ */

/* The shuffle_leadership card inherits .deck sizing from the existing deck CSS,
   so minimal overrides needed. Optional tweaks below. */

/* Optional: tint the border or add emphasis if you want it to stand out */
/* Match shuffle leadership card border width and shadow to Party Affairs deck */
ul.decks a.card[card-id="advisor_switcher"] {
    border-width: 10px !important;
    border-style: solid !important;
    /* border-color stays whatever your current dark gray is, not overridden */
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2) !important;
    background-color: transparent !important;
    padding: 0 !important;
}

/* ============================================================
   CARD TOOLTIP FOR advisor_switcher (lives in ul.decks)
   ============================================================ */

ul.decks a.card {
    position: relative;
}

ul.decks a.card .card-passive-tip {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    border: 2px solid #000;
    padding: 12px 14px;
    width: 280px;
    font-size: 0.9em;
    font-style: normal;
    text-align: left;
    z-index: 100;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    pointer-events: none;
    white-space: normal;
}

ul.decks a.card:hover .card-passive-tip {
    display: block;
}

/* Subtitle portraits in choice rows, lock to left column, text beside not below */
/* Subtitle portraits: lock to left column, text flows beside (not under) */
ul.choices li .subtitle:has(> img) {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

ul.choices li .subtitle:has(> img) > img {
    flex-shrink: 0;
    display: block;
    margin: 0 !important;
    width: 100px !important;
    height: 125px !important;
    object-fit: cover;
    border: 1px solid #999;
}

ul.choices li .subtitle:has(> img) > span {
    flex: 1;
    min-width: 0;
}

ul.choices li a:has(> img) {
    display: grid !important;
    grid-template-columns: 21px 100px 1fr;
    grid-template-areas:
        "name    name      name"
        ".       portrait  text";
    gap: 9px 14px;
    align-items: center;
    padding-left: 0;
}

ul.choices li a:has(> img) > div:first-child {
    grid-area: name;
}

ul.choices li a:has(> img) > img {
    grid-area: portrait;
    width: 100px !important;
    height: 125px !important;
    object-fit: cover;
    border: 1px solid #999;
    display: block;
    margin: 0 !important;
}

ul.choices li a:has(> img) > span {
    grid-area: text;
    font-style: italic;
    color: #000;
    align-self: center;
}
