#main-game-app { display: block; }
.office-active #main-game-app #page-content {
  max-width: none;
  height: auto;
  min-height: 100dvh;
  padding: 0;
  background: #eae2d6;
  overflow: visible;
}

.office-room {
  --paper: #fff9ee;
  --wood: #35261d;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 100dvh;
  padding: 12px;
  color: var(--wood);
}
.office-toolbar, .office-priorities, .office-step, .office-stage, .office-scene-caption {
  width: min(100%, 1600px, calc(max(300px, 100dvh - 180px) * 1.777));
}
.office-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.office-clock, .office-toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.office-clock time { font: 600 clamp(15px, 1.75vw, 23px)/1.1 ui-monospace, monospace; }
.office-clock time b { color: #734b32; }
.office-clock span { color: #533e30; font-size: 13px; }
.office-toolbar-actions .btn { background: var(--paper); border-color: #b8a595; color: var(--wood); }
.office-toolbar-actions .btn:hover { background: #eedbc4; }
.office-priorities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 9px;
  margin-bottom: 11px;
}
.office-priority {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 67px;
  padding: 10px 16px;
  border: 1px solid #667e73;
  border-radius: 8px;
  background: #29463c;
  color: #f8faf4;
  text-align: start;
}
.office-priority--urgent {
  border-color: #98634c;
  background: #743f2f;
  color: #fff6e9;
}
.office-priority:hover { filter: brightness(1.13); }
.office-priority:focus-visible { outline: 3px solid #353629; outline-offset: 2px; }
.office-priority-content { display: grid; gap: 3px; }
.office-priority-content span { font-size: 12px; }
.office-priority-content strong { font-size: clamp(17px, 2vw, 23px); line-height: 1.2; }
.office-priority-link {
  flex: none;
  padding: 6px 10px;
  border-radius: 4px;
  background: #ffffff20;
  font-size: 13px;
  font-weight: 650;
}
.office-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 8px;
  color: #533e30;
  font-size: 14px;
}
.office-stage { position: relative; }
.metric-track .metric-range { border-radius: 3px; }
.office-scene { position: relative; aspect-ratio: 1672 / 941; overflow: hidden; background: #d6c8b7; }
.office-background { display: block; width: 100%; height: 100%; }
.office-scene--late .office-background.is-high-detail { filter: brightness(.74); }
.office-art-reveal { position: absolute; inset: 0; pointer-events: none; }
.office-art-comparison, .office-art-side { position: absolute; inset: 0; pointer-events: none; }
.office-art-badge {
  position: absolute;
  bottom: 6%;
  min-width: 4.7em;
  padding: .5em .65em;
  font: 500 clamp(10px, 1.45vw, 20px)/1.05 system-ui, sans-serif;
  text-align: center;
}
.office-art-badge strong { display: block; margin-top: .15em; font-size: 1.15em; }
.office-art-side--off .office-art-badge {
  left: 2%;
  border-left: .3em solid #a4df4a;
  background: #202322;
  color: #fff;
}
.office-art-side--on .office-art-badge {
  right: 2%;
  background: #a4df4a;
  color: #151b0d;
}
.office-art-scanline {
  position: absolute;
  inset: 0 auto 0 100%;
  width: clamp(3px, .42vw, 7px);
  transform: translateX(-50%);
  background: #a4df4a;
  box-shadow: 0 0 14px #a4df4ab3;
  pointer-events: none;
}
.office-toolbar-actions .office-art-toggle { font-family: ui-monospace, monospace; letter-spacing: .035em; }
.office-toolbar-actions .office-art-toggle[aria-pressed="true"] { background: #f1dfc2; border-color: #986438; }
.office-window {
  position: absolute;
  top: 12.65%;
  left: 22.48%;
  width: 31.35%;
  height: 33.78%;
  overflow: hidden;
  background: #a9cee6;
  box-shadow: inset 0 0 16px #523b2c44;
}
.office-window img { display: block; width: 100%; height: 100%; object-fit: cover; }
.office-window[data-light="night"] > img { filter: brightness(.53) saturate(.78); }
.office-hotspots { position: absolute; inset: 0; }
.office-hotspot {
  position: absolute;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 5px;
  border: 2px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
.office-hotspot:hover, .office-hotspot:focus-visible {
  border-color: #fff3dc;
  background: #fff4d92b;
  outline: 2px solid #724832;
  outline-offset: 0;
}
.office-hotspot span {
  display: inline-block;
  padding: 4px 7px;
  background: #342419ef;
  border: 1px solid #f9e4c898;
  border-radius: 4px;
  font-size: clamp(11px, 1.1vw, 15px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.office-hotspot.is-current span { background: #f9e9cb; color: #372518; border-color: #865e40; }
.office-hotspot b { color: #f9ce89; }
.office-hotspot.has-warning {
  border-color: #a33c2b;
  background: #a33c2b26;
  box-shadow: 0 0 0 1px #fff2da inset;
}
.office-hotspot .office-warning-count {
  display: inline-block;
  margin-inline-start: 3px;
  padding: 2px 4px;
  border-radius: 3px;
  background: #8d2923;
  color: #fff;
  font-size: 0.86em;
}
.office-metric-alert { margin: 4px 0 0; color: #8d2923; font-size: 13px; font-weight: 650; }
.office-step .btn-deadline { min-height: 34px; background: #fff1dd; color: #852d1d; border-color: #9e513b; }
.office-step .btn-deadline:hover { background: #f8dfce; }
.commitment-alert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 13px 16px; background: #fff4e8; border: 1px solid #bd785d; border-inline-start: 4px solid #a04027; color: #522a23; }
.commitment-alert h3 { margin: 0; font-size: 17px; }
.commitment-alert :is(ul,p) { margin: 5px 0 0; }
.commitment-alert ul { padding-inline-start: 1.25rem; }
.commitment-actions { margin: 0 0 16px; }
.commitment-actions > h3 { margin: 0 0 9px; }
.action-card--commitment { border-top: 3px solid #497f71; }
.commitment-options { padding: 0; margin: 0; list-style: none; color: #234f4b; }
.commitment-options li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 9px; }
.commitment-options span { color: #6f472a; font-size: 13px; }
.choice-commitment-hint { margin: 6px 0; color: #21594c; }
.case-status.is-due { background: #fae2d6; color: #902e22; }
.office-hotspot--inventory { inset: 8% 80% 53% 2.7%; }
.office-hotspot--archives { inset: 50% 85% 21% 2%; }
.office-hotspot--briefing { inset: 10% 44.6% 51% 20.6%; }
.office-hotspot--metrics { inset: 18% 27.5% 58% 57%; }
.office-hotspot--history { inset: 18% 19.5% 61% 73.8%; }
.office-hotspot--field { inset: 8% 0.6% 38% 82%; }
.office-hotspot--action { inset: 57% 68.8% 26% 18%; }
.office-hotspot--inbox { inset: 63% 54.8% 22% 32.2%; }
.office-hotspot--decision { inset: 61% 39.2% 22% 46.8%; }
.office-hotspot--letters { inset: 63.5% 28% 25.3% 63.7%; }
.office-hotspot--map { inset: 62.4% 12% 21.5% 72%; }
.office-scene-caption { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-size: 13px; }
.office-scene-caption span { margin-inline-start: auto; color: #665447; }
.office-save-status { min-height: 1.4em; margin-top: 3px; color: #665447; font-size: 12px; }

.office-panel-shade {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #291e166e;
}
.office-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 100%);
  max-height: min(92dvh, 940px);
  min-height: 220px;
  min-width: 0;
  border: 1px solid #a88b6e;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 18px 60px #1e120e60;
  overflow: hidden;
}
.office-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #d9cbbb;
  background: #f5eee2;
}
.office-panel-header h2 { font-size: clamp(18px, 2vw, 24px); }
.office-panel-header .btn { white-space: nowrap; }
.office-panel-body { min-width: 0; overflow: auto; overscroll-behavior: contain; padding: clamp(14px, 2vw, 26px); }
.office-panel-body > * + * { margin-top: 14px; }
.office-panel-body .briefing-scroll { max-height: none; overflow: visible; }
.office-panel-body .archive-index { position: static; }
.office-panel-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

.decision-card .decision-content { width: 100%; min-width: 0; }
.decision-card .decision-tradeoff { margin: 6px 0; color: #483c33; }
.decision-forecast > strong { font-size: 13px; color: #4c4339; }
.decision-forecast .metric-impacts { margin-top: 4px; }
.metric-impacts { display: flex; flex-wrap: wrap; gap: 5px 7px; padding: 0; margin: 8px 0; list-style: none; }
.metric-impacts li { border: 1px solid; border-radius: 4px; padding: 2px 8px; font-size: 13px; font-weight: 600; }
.metric-impacts .impact-improves { color: #215641; background: #edf6ef; border-color: #a5c5ae; }
.metric-impacts .impact-worsens { color: #813b2c; background: #fff1e8; border-color: #d6aa98; }
.settlement-follow-up { margin-top: 12px; }
.settlement-follow-up h4 { font-size: 15px; margin-bottom: 6px; }
.settlement-follow-up > ul { list-style: none; margin: 0; padding: 0; }
.settlement-follow-up > ul > li { padding: 8px 12px; border-inline-start: 2px solid #b39a84; background: #f7f2e9; }
.settlement-follow-up > ul > li + li { margin-top: 6px; }
.settlement-follow-up .metric-impacts { margin-bottom: 0; }
.history-card > div { flex: 1; min-width: 0; }
.settlement-table { width: 100%; margin: 14px 0 6px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.settlement-table caption { padding-bottom: 8px; text-align: start; font-weight: 700; }
.settlement-table th, .settlement-table td { padding: 8px 6px; border-bottom: 1px solid #d9cbbb; text-align: start; }
.settlement-table thead { background: #f5eee2; }
.settlement-table td { overflow-wrap: anywhere; }
.settlement-summary h3, .night-summary h3 { margin-top: 18px; }
.settlement-summary .night-report, .night-summary .night-report { padding-inline-start: 1.4em; }

.game-over-active #main-game-app #page-content {
  max-width: none;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  background: #eee8df;
  overflow-y: auto;
}
.ending-report-active #toast-container,
.ending-report-active #mcjfCookiePill { display: none !important; }
.ending-page {
  width: min(100% - 28px, 850px);
  margin: auto;
  padding: clamp(28px, 7vh, 72px) 0 44px;
  color: #392b22;
}
.ending-heading { border-bottom: 1px solid #ac9580; padding-bottom: 22px; }
.ending-heading h1 { margin: 6px 0 12px; font-size: clamp(27px, 5vw, 46px); line-height: 1.15; }
.ending-heading .tag { margin-top: 12px; }
.ending-heading h1:focus, .ending-subpage-header h1:focus { outline: none; }
.ending-section { margin-top: 20px; padding: clamp(16px, 3vw, 28px); background: #fffdf8; border: 1px solid #d5c8b9; }
.ending-section h2 { margin: 0 0 8px; }
.ending-section .reading-text + h2 { margin-top: 20px; }
.ending-decisions { margin: 0; padding: 0; list-style: none; }
.ending-decisions li > details { border-top: 1px solid #d5c8b9; }
.ending-decisions summary { padding: 10px 0; cursor: pointer; }
.ending-decisions summary time { margin-inline: 6px 10px; font-variant-numeric: tabular-nums; }
.ending-decisions summary span { display: block; margin-inline-start: 21px; color: #5e4b3c; }
.ending-decision-body { padding: 0 0 12px 21px; }
.incident-changes, .incident-option .incident-changes { color: #215957; font-weight: 600; font-variant-numeric: tabular-nums; }
.field-brief { margin-bottom: 16px; }
.field-brief ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; padding: 0; margin: 8px 0 0; list-style: none; }
.field-brief li { padding: 10px 12px; border: 1px solid #b9cbd0; border-radius: 8px; background: #f5f9fa; color: #213d45; }
.field-actions > h3 { margin-bottom: 8px; }
.field-evidence-ready { color: #235d4c; font-weight: 650; }
.field-evidence-sources { margin: 6px 0; color: #263f45; overflow-wrap: anywhere; }
.field-evidence-links { display: grid; gap: 5px; margin: 6px 0; }
.field-evidence-links .btn { justify-content: flex-start; min-height: 36px; width: 100%; text-align: start; white-space: normal; overflow-wrap: anywhere; border-color: #9aafb5; color: #1b4953; }
.field-brief .btn[data-value="action"] { margin-top: 6px; }
.ending-actions { margin-top: 24px; }
.ending-subpage-header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 18px; }

@media (max-width: 760px) {
  .office-room { align-content: start; }
  .office-toolbar, .office-stage, .office-scene-caption { width: 100%; }
  .office-hotspots {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }
  .office-hotspot {
    position: static;
    min-height: 44px;
    align-items: center;
    background: #fff9ef;
    color: #38251a;
    border: 1px solid #b7a28e;
  }
  .office-hotspot span { padding: 0; border: 0; background: transparent; font-size: 13px; white-space: normal; }
  .office-hotspot.is-current { border-color: #845937; background: #f0dec1; }
  .office-hotspot.is-current span { background: transparent; }
  .office-hotspot b { color: #6d3d24; }
  .office-panel-shade { padding: 8px; }
  .office-panel { max-height: calc(100dvh - 16px); }
  .office-panel-body .action-grid, .office-panel-body .map-page, .office-panel-body .archive-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
