:root {
  color-scheme: dark;
  --ink: #1c1a17;
  --paper: #d4bf86;
  --paper-soft: #ead9ad;
  --paper-line: #9a8556;
  --carbon: #0f1110;
  --panel: #1a201d;
  --panel-2: #26312b;
  --edge: #565a4b;
  --text: #f0e5c9;
  --muted: #b9b099;
  --green: #78985d;
  --amber: #b9833c;
  --red: #9d4237;
  --blue: #647f73;
  --cyan: #9dcc9d;
  --shadow: rgba(0, 0, 0, 0.42);
  --font-ui: "Lucida Console", "Consolas", "Courier New", monospace;
  --font-doc: "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--carbon);
  color: var(--text);
  font-family: var(--font-ui);
  image-rendering: auto;
}

button {
  font: inherit;
}

* {
  scrollbar-color: #8f7a49 #11130f;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #11130f;
}

*::-webkit-scrollbar-thumb {
  background: #8f7a49;
  border: 2px solid #11130f;
}

.shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 17, 16, 0.7), rgba(15, 17, 16, 0.97)),
    url("assets/desk-grid.svg") center / cover fixed,
    #0f1110;
}

.start-screen,
.event-screen,
.summary-screen {
  min-height: 100vh;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(280px, 1fr);
  justify-items: end;
  padding: clamp(20px, 5vw, 72px);
}

.start-screen {
  position: relative;
  background:
    linear-gradient(90deg, rgba(8, 10, 9, 0.96) 0%, rgba(8, 10, 9, 0.54) 52%, rgba(8, 10, 9, 0.18) 100%),
    linear-gradient(180deg, rgba(8, 10, 9, 0.14), rgba(8, 10, 9, 0.92)),
    url("assets/review-office-gpt-image-2.png") center / cover no-repeat;
  image-rendering: pixelated;
}

.start-screen::after,
.game-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.028) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.4));
  mix-blend-mode: soft-light;
  z-index: 20;
}

.start-copy {
  max-width: 620px;
  padding: 28px 0;
  text-shadow: 2px 2px 0 #0b0c0a, 0 0 20px rgba(0, 0, 0, 0.72);
}

.kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  width: max-content;
  max-width: 100%;
  font-size: clamp(2.45rem, 4.4vw, 4.1rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #f3df9f;
  overflow-wrap: normal;
  word-break: keep-all;
}

.start-title-line {
  display: block;
  white-space: nowrap;
}

.start-copy p:not(.kicker) {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.start-actions,
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.about-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-about-nav {
  position: absolute;
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 4vw, 52px);
  z-index: 2;
}

.about-stamp-button,
.about-mini-button {
  border: 2px solid #11130f;
  outline: 1px solid rgba(183, 155, 95, 0.9);
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
}

.about-stamp-button {
  width: 184px;
  aspect-ratio: 2 / 1;
  display: grid;
  place-items: center;
  padding: 10px 18px;
  background:
    linear-gradient(rgba(8, 10, 9, 0.1), rgba(8, 10, 9, 0.1)),
    url("assets/about-creator-stamp.png") center / cover no-repeat;
  color: #f4dfad;
  font-weight: 900;
  line-height: 1.02;
  text-align: center;
  text-shadow: 2px 2px 0 #17140c, 0 0 10px rgba(0, 0, 0, 0.7);
  image-rendering: pixelated;
}

.about-stamp-button small {
  font-size: 0.58rem;
  color: #c4d6ce;
}

.about-stamp-button.compact {
  width: 142px;
  min-height: 58px;
  padding: 8px 14px;
  font-size: 0.72rem;
}

.about-mini-button {
  min-height: 44px;
  padding: 0 14px;
  background: rgba(17, 19, 15, 0.9);
  font-weight: 800;
}

.primary-action,
.ghost-action,
.icon-button {
  min-height: 44px;
  border: 2px solid #11130f;
  outline: 1px solid #b79b5f;
  background: #c8ac67;
  color: #17140c;
  padding: 0 18px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
}

.ghost-action {
  background: transparent;
  color: var(--text);
  border-color: #0d0f0c;
  outline-color: var(--edge);
}

.primary-action:hover,
.ghost-action:hover,
.icon-button:hover,
.stamp:hover,
.about-stamp-button:hover,
.about-mini-button:hover {
  transform: translateY(-1px);
}

.primary-action:active,
.ghost-action:active,
.icon-button:active,
.stamp:active,
.about-stamp-button:active,
.about-mini-button:active {
  transform: translateY(1px);
}

.language-control {
  min-height: 44px;
  display: inline-grid;
  grid-template-columns: auto minmax(74px, 1fr);
  align-items: center;
  gap: 8px;
  border: 2px solid #11130f;
  outline: 1px solid var(--edge);
  background: rgba(17, 19, 15, 0.92);
  color: var(--text);
  padding: 6px 10px;
  font-family: var(--font-doc);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
}

.language-control select {
  min-width: 72px;
  border: 1px solid var(--edge);
  background: #0f1110;
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  cursor: pointer;
}

.language-control.compact {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 4px;
  min-width: 96px;
  min-height: 44px;
  padding: 5px 8px;
  box-shadow: none;
}

.language-control.compact select {
  width: 100%;
  min-width: 0;
}

.game-screen {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(440px, 1fr) 300px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 17, 16, 0.78), rgba(15, 17, 16, 0.98)),
    url("assets/review-office-gpt-image-2.png") center / cover fixed;
}

.topbar {
  grid-column: 1 / -1;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #11130f;
  outline: 1px solid var(--edge);
  background: rgba(26, 32, 29, 0.94);
  padding: 14px 18px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.42);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar h2,
.event-card h2,
.about-card h2,
.appeal-card h2,
.summary-card h2 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1;
  text-transform: uppercase;
}

.topbar-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.system-pill {
  border: 1px solid var(--edge);
  background: #11130f;
  color: var(--cyan);
  padding: 10px 14px;
  font-family: var(--font-doc);
  font-size: 0.9rem;
}

.profit-pill {
  color: #f0cf72;
}

.clock-pill {
  color: #f0e5c9;
}

.clock-pill.warning {
  color: #d5a74b;
}

.clock-pill.critical {
  color: #d75d4f;
  animation: clockPulse 700ms steps(2, end) infinite;
}

.left-rail,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.left-rail,
.right-rail,
.folder,
.receipt,
.audit,
.briefing,
.event-card,
.summary-card {
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background: rgba(26, 32, 29, 0.94);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.44);
}

.left-rail,
.right-rail {
  padding: 14px;
  min-height: 0;
  overflow: auto;
}

.meter-block {
  display: grid;
  gap: 6px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.meter-label strong {
  color: var(--text);
}

.meter-label.danger strong {
  color: #ffbbb5;
}

.meter {
  height: 10px;
  border: 1px solid rgba(185, 192, 183, 0.25);
  background: #10120e;
  overflow: hidden;
}

.meter span {
  display: block;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 240ms ease, background 240ms ease;
}

.meter.danger span {
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.briefing {
  margin-top: 4px;
  padding: 14px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(26, 32, 29, 0.96), rgba(17, 19, 15, 0.96));
}

.finance-panel,
.ops-panel {
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background:
    linear-gradient(180deg, rgba(31, 26, 18, 0.96), rgba(15, 17, 13, 0.98));
  padding: 14px;
  color: var(--muted);
}

.finance-panel h3,
.ops-panel h3 {
  margin: 0 0 10px;
  color: #f0cf72;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.finance-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(151, 141, 108, 0.3);
  padding: 9px 0 0;
  margin-top: 9px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.finance-row strong {
  color: var(--text);
  text-align: right;
}

.ops-panel {
  background:
    linear-gradient(180deg, rgba(25, 29, 24, 0.96), rgba(15, 17, 13, 0.98));
}

.briefing h3,
.receipt h3,
.audit h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.briefing p {
  margin-bottom: 12px;
  line-height: 1.45;
}

.briefing ul,
.signal-list {
  margin: 0;
  padding-left: 18px;
}

.briefing li,
.signal-list li {
  margin-bottom: 8px;
  line-height: 1.35;
}

.case-desk {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.case-stack {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
}

.folder {
  position: relative;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(212, 191, 134, 0.98), rgba(234, 217, 173, 0.96)),
    var(--paper);
  color: var(--ink);
  outline-color: #5d4f31;
}

.folder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(28, 26, 23, 0.04), rgba(28, 26, 23, 0.04) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(90deg, rgba(28, 26, 23, 0.02), rgba(28, 26, 23, 0.02) 1px, transparent 1px, transparent 18px);
  mix-blend-mode: multiply;
}

.folder-tab {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: -18px -18px 16px;
  padding: 10px 16px;
  background: #b89f62;
  color: #262016;
  font-family: var(--font-doc);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.folder-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(430px, 1.36fr) minmax(250px, 0.64fr);
  grid-template-areas:
    "channel owner"
    "transcript owner"
    "cross detector"
    "memo memo";
  gap: 14px;
}

.document {
  min-width: 0;
  border: 1px solid var(--paper-line);
  background:
    linear-gradient(180deg, rgba(236, 221, 179, 0.82), rgba(222, 202, 145, 0.7));
  padding: 14px;
  box-shadow: 4px 4px 0 rgba(87, 74, 44, 0.24);
}

.channel-doc {
  container-type: inline-size;
  grid-area: channel;
  min-height: 380px;
}

.channel-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(190px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.cover-frame,
.avatar-frame {
  position: relative;
  border: 2px solid #2a2418;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px rgba(234, 217, 173, 0.22);
}

.cover-frame {
  aspect-ratio: 320 / 228;
  width: 100%;
  background-image: url("assets/channel-covers-focused-gpt-image-2.png");
  background-color: #161914;
}

.cover-frame::after,
.avatar-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: soft-light;
}

.owner-strip {
  display: grid;
  grid-template-columns: minmax(118px, 0.58fr) 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(111, 93, 56, 0.42);
  background: rgba(42, 36, 24, 0.14);
  min-height: 152px;
  padding: 10px;
}

.owner-doc {
  grid-area: owner;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 330px;
}

.avatar-frame {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1;
  background-image: url("assets/owner-avatars-focused-gpt-image-2.png");
  background-color: #151711;
}

.owner-strip span {
  display: block;
  color: #6e5b39;
  font-family: var(--font-doc);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.owner-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 1.12rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.intel-note {
  margin: 0;
  border-left: 4px solid rgba(125, 36, 31, 0.5);
  padding-left: 10px;
  color: #30291d;
  font-size: 0.84rem;
  line-height: 1.4;
}

.private-list,
.evidence-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.private-list li,
.evidence-list li {
  border-left: 4px solid rgba(63, 74, 61, 0.7);
  background: rgba(42, 36, 24, 0.12);
  padding: 7px 8px 7px 10px;
  color: #30291d;
  font-size: 0.8rem;
  line-height: 1.35;
}

.evidence-list li {
  border-left-color: rgba(125, 36, 31, 0.5);
  font-size: 0.86rem;
}

.transcript-doc,
.cross-doc,
.detector-doc,
.memo-doc {
  min-height: 156px;
}

.transcript-doc {
  grid-area: transcript;
}

.cross-doc {
  grid-area: cross;
}

.detector-doc {
  grid-area: detector;
}

.memo-doc {
  grid-area: memo;
}

.doc-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(111, 93, 56, 0.42);
  padding-bottom: 8px;
  font-family: var(--font-doc);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.doc-heading strong {
  color: #7d241f;
}

.document h3 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.facts div {
  border-left: 3px solid rgba(125, 36, 31, 0.38);
  padding-left: 9px;
}

.facts dt {
  color: #6e5b39;
  font-family: var(--font-doc);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  border: 1px solid rgba(28, 26, 23, 0.28);
  background: rgba(255, 255, 255, 0.34);
  padding: 4px 8px;
  font-family: var(--font-doc);
  font-size: 0.74rem;
  text-transform: uppercase;
}

@container (max-width: 620px) {
  .channel-layout {
    grid-template-columns: 1fr;
  }
}

blockquote {
  margin: 0;
  color: #30291d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.45;
}

.memo-doc p {
  margin-bottom: 0;
  line-height: 1.45;
}

.stamp-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  min-height: 86px;
}

.stamp {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 86px;
  overflow: hidden;
  border: 2px solid rgba(8, 9, 7, 0.94);
  background:
    linear-gradient(180deg, rgba(22, 20, 16, 0.5), rgba(10, 11, 9, 0.72));
  color: var(--text);
  font-family: var(--font-doc);
  font-size: clamp(0.74rem, 0.82vw, 0.92rem);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.52);
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/decision-stamps-framed-gpt-image-2.png");
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: var(--stamp-sprite-x) center;
  filter: saturate(0.98) contrast(1.06);
}

.stamp::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 240, 188, 0.1), rgba(7, 8, 6, 0.34)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 5px);
  pointer-events: none;
}

.stamp-label {
  max-width: calc(100% - 12px);
  border: 1px solid rgba(241, 224, 177, 0.32);
  background: rgba(9, 10, 8, 0.66);
  padding: 6px 8px 5px;
  color: #f2dfac;
  text-align: center;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.9);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.46);
}

.stamp:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.stamp:disabled::before {
  filter: grayscale(0.45) brightness(0.74);
}

.stamp-green {
  --stamp-sprite-x: 0%;
  color: #a9d177;
}

.stamp-amber {
  --stamp-sprite-x: 33.3333%;
  color: #d5a74b;
}

.stamp-red {
  --stamp-sprite-x: 66.6667%;
  color: #d75d4f;
}

.stamp-blue {
  --stamp-sprite-x: 100%;
  color: #9bb7a8;
}

.receipt,
.audit {
  padding: 14px;
}

.receipt {
  position: relative;
  min-height: 430px;
  overflow: hidden;
}

.receipt > * {
  position: relative;
  z-index: 1;
}

.receipt[data-stamp]::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 10px;
  width: min(210px, 64%);
  aspect-ratio: 420 / 164;
  z-index: 0;
  background-image: url("assets/decision-stamps-framed-gpt-image-2.png");
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: var(--receipt-stamp-x) center;
  filter: saturate(1.04) contrast(1.1);
  opacity: 0.32;
  pointer-events: none;
  transform: rotate(-5deg);
}

.receipt[data-stamp="monetize"] {
  --receipt-stamp-x: 0%;
}

.receipt[data-stamp="limited"] {
  --receipt-stamp-x: 33.3333%;
}

.receipt[data-stamp="demonetize"] {
  --receipt-stamp-x: 66.6667%;
}

.receipt[data-stamp="escalate"] {
  --receipt-stamp-x: 100%;
}

.receipt p {
  color: var(--muted);
  line-height: 1.45;
}

.impact-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(151, 141, 108, 0.42);
}

.impact-title {
  color: var(--paper-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.impact-row {
  display: grid;
  grid-template-columns: minmax(68px, 0.8fr) minmax(74px, 1fr) 44px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-doc);
  font-size: 0.72rem;
}

.impact-track {
  position: relative;
  height: 12px;
  border: 1px solid rgba(151, 141, 108, 0.36);
  background: rgba(9, 11, 12, 0.74);
  overflow: hidden;
}

.impact-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(234, 217, 173, 0.36);
}

.impact-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--impact-size);
}

.impact-row.is-positive .impact-fill {
  left: 50%;
  background: linear-gradient(90deg, rgba(120, 152, 93, 0.78), rgba(157, 204, 157, 0.94));
}

.impact-row.is-negative .impact-fill {
  right: 50%;
  background: linear-gradient(90deg, rgba(157, 66, 55, 0.94), rgba(185, 131, 60, 0.78));
}

.impact-value {
  color: var(--paper-soft);
  text-align: right;
}

.receipt .primary-action {
  width: 100%;
  margin-top: 10px;
}

.audit {
  flex: 1;
  min-height: 160px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.audit ol {
  margin: 0;
  padding: 0 0 0 22px;
  overflow: auto;
  color: var(--muted);
  font-family: var(--font-doc);
  font-size: 0.78rem;
  line-height: 1.42;
}

.audit li {
  margin-bottom: 10px;
}

.utility-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 10px;
}

.icon-button {
  width: 100%;
  background: transparent;
  color: var(--text);
  border-color: #11130f;
  outline-color: var(--edge);
  font-family: var(--font-doc);
}

.event-screen,
.interlude-screen,
.appeal-screen,
.about-screen,
.pause-screen,
.summary-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  place-items: center;
  overflow-y: auto;
  padding: clamp(16px, 3vw, 34px);
  background: rgba(9, 11, 12, 0.76);
  backdrop-filter: blur(4px);
}

.about-screen {
  z-index: 30;
  background:
    linear-gradient(rgba(9, 11, 12, 0.82), rgba(9, 11, 12, 0.9)),
    url("assets/review-office-gpt-image-2.png") center / cover fixed;
}

.event-card,
.interlude-card,
.appeal-card,
.about-card,
.pause-card,
.summary-card {
  width: min(680px, calc(100vw - 32px));
  padding: clamp(20px, 4vw, 34px);
}

.event-card p,
.interlude-card p,
.appeal-card p,
.about-card p,
.pause-card p,
.summary-card p {
  color: var(--muted);
  line-height: 1.58;
}

.about-card {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background: rgba(17, 19, 15, 0.92);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}

.about-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 2px solid #11130f;
  outline: 1px solid var(--edge);
  background: transparent;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.about-page-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1.28fr);
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

.creator-portrait {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  image-rendering: pixelated;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.48);
}

.about-copy {
  display: grid;
  gap: 16px;
}

.about-links,
.company-grid {
  display: grid;
  gap: 12px;
}

.about-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-links a,
.company-grid > div {
  border-left: 4px solid rgba(100, 127, 115, 0.72);
  background: rgba(17, 19, 15, 0.64);
  color: var(--muted);
  padding: 12px;
  text-decoration: none;
}

.about-links a span,
.company-logo-panel a span,
.company-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  text-transform: uppercase;
}

.about-links a strong,
.company-logo-panel a strong {
  color: var(--paper-soft);
  overflow-wrap: anywhere;
}

.company-logo-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.46fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
}

.company-logo-panel img {
  width: 100%;
  min-height: 112px;
  object-fit: contain;
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background: #0f1110;
  image-rendering: pixelated;
}

.company-logo-panel a {
  display: grid;
  align-content: center;
  border-left: 4px solid rgba(157, 66, 55, 0.74);
  background: rgba(17, 19, 15, 0.64);
  padding: 14px;
  color: var(--muted);
  text-decoration: none;
}

.company-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.interlude-card {
  width: min(1080px, calc(100vw - 32px));
}

.interlude-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1.02fr) minmax(320px, 0.98fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 18px;
}

.interlude-frame {
  min-height: 320px;
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: #151711;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px rgba(234, 217, 173, 0.18), 7px 7px 0 rgba(0, 0, 0, 0.48);
}

.interlude-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.interlude-document {
  border-left: 4px solid rgba(157, 66, 55, 0.72);
  background: rgba(240, 229, 201, 0.07);
  padding: 10px 12px;
  font-family: var(--font-doc);
}

.interlude-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.interlude-list li {
  border-left: 4px solid rgba(100, 127, 115, 0.72);
  background: rgba(17, 19, 15, 0.64);
  color: var(--muted);
  padding: 8px 10px;
  line-height: 1.35;
}

.interlude-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.interlude-actions button {
  min-height: 64px;
}

.appeal-card {
  width: min(980px, calc(100vw - 32px));
}

.summary-card:has(.final-frame:not([hidden])) {
  width: min(1060px, calc(100vw - 32px));
}

.summary-screen[data-mode="day-start"] {
  background:
    linear-gradient(rgba(9, 11, 12, 0.88), rgba(9, 11, 12, 0.92)),
    url("assets/desk-grid.svg") center / 340px repeat;
}

.summary-screen[data-mode="day-start"] .summary-card {
  width: min(820px, calc(100vw - 32px));
  outline-color: rgba(240, 207, 114, 0.9);
}

.summary-screen[data-mode="day-start"] .kicker {
  color: var(--cyan);
}

.summary-screen[data-mode="day-start"] h2 {
  color: #f0cf72;
}

.final-frame {
  aspect-ratio: 4 / 3;
  width: min(100%, 620px);
  margin: 0 0 18px;
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: #151711;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px rgba(234, 217, 173, 0.18), 7px 7px 0 rgba(0, 0, 0, 0.48);
}

.pause-card {
  width: min(520px, calc(100vw - 32px));
}

.pause-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.pause-actions button {
  min-height: 58px;
}

.appeal-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(300px, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.aftermath-frame {
  aspect-ratio: 16 / 10;
  border: 2px solid #10120e;
  outline: 1px solid rgba(151, 141, 108, 0.74);
  background-image: url("assets/appeal-aftermath-gpt-image-2.png");
  background-repeat: no-repeat;
  background-color: #151711;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px rgba(234, 217, 173, 0.18), 6px 6px 0 rgba(0, 0, 0, 0.44);
}

.appeal-copy {
  display: grid;
  gap: 12px;
}

.appeal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.appeal-list li {
  border-left: 4px solid rgba(157, 66, 55, 0.7);
  background: rgba(240, 229, 201, 0.06);
  color: var(--muted);
  padding: 8px 10px;
  line-height: 1.35;
}

.appeal-economy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.appeal-economy span {
  border: 1px solid var(--edge);
  background: #11130f;
  color: #f0cf72;
  padding: 8px 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.appeal-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.event-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.event-actions button {
  min-height: 62px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.day-start-stats .stat-tile.wide {
  grid-column: 1 / -1;
}

.day-start-stats .stat-tile strong {
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stat-tile {
  border: 1px solid var(--edge);
  background: #151b1d;
  padding: 12px;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.stat-tile strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.flash-good {
  animation: flashGood 420ms ease;
}

.flash-bad {
  animation: flashBad 420ms ease;
}

@keyframes flashGood {
  50% {
    background-color: rgba(90, 170, 108, 0.24);
  }
}

@keyframes flashBad {
  50% {
    background-color: rgba(196, 84, 72, 0.24);
  }
}

@keyframes clockPulse {
  50% {
    background-color: rgba(157, 66, 55, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1120px) {
  .game-screen {
    grid-template-columns: 230px minmax(360px, 1fr);
  }

  .topbar-right {
    align-items: flex-end;
    flex-direction: column;
  }

  .channel-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr minmax(128px, auto);
  }

  .utility-row {
    grid-template-columns: 1fr;
    min-width: 118px;
  }
}

@media (max-width: 820px) {
  h1 {
    font-size: clamp(1.95rem, 8.4vw, 2.9rem);
  }

  .event-screen,
  .interlude-screen,
  .appeal-screen,
  .summary-screen {
    align-items: start;
  }

  .topbar h2,
  .event-card h2,
  .interlude-card h2,
  .appeal-card h2,
  .summary-card h2 {
    font-size: 1.55rem;
  }

  .document h3 {
    font-size: 1.55rem;
  }

  .start-screen {
    grid-template-columns: 1fr;
    align-items: end;
    padding-top: 136px;
  }

  .start-about-nav {
    left: 12px;
    right: 12px;
    justify-content: flex-end;
  }

  .about-stamp-button {
    width: 150px;
    font-size: 0.76rem;
  }

  .start-visual {
    min-height: 220px;
  }

  .game-screen {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    padding: 10px;
    overflow: visible;
  }

  .topbar,
  .folder-tab {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-right {
    width: 100%;
    align-items: stretch;
  }

  .topbar-about-nav,
  .topbar-status {
    justify-content: flex-start;
  }

  .left-rail {
    order: 2;
  }

  .case-desk {
    order: 1;
  }

  .right-rail {
    order: 3;
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .folder-grid,
  .channel-layout,
  .facts,
  .stamp-panel,
  .summary-stats,
  .interlude-layout,
  .interlude-actions,
  .appeal-layout,
  .appeal-actions,
  .about-page-grid,
  .about-links,
  .company-logo-panel,
  .company-grid,
  .event-actions {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .interlude-frame {
    min-height: 220px;
  }

  .stamp {
    min-height: 68px;
  }

  .channel-doc,
  .owner-doc,
  .transcript-doc,
  .cross-doc,
  .detector-doc,
  .memo-doc {
    grid-area: auto;
  }
}
