:root {
  color-scheme: dark;
  --ink: #101516;
  --ink-soft: #192021;
  --ink-raised: #222a2a;
  --paper: #e8e1d2;
  --paper-dim: #aaa698;
  --amber: #f0a43b;
  --warm: #f2c96d;
  --red: #d25149;
  --red-dark: #743b39;
  --mint: #72d5b0;
  --line: rgba(232, 225, 210, 0.22);
  --line-strong: rgba(232, 225, 210, 0.5);
  --shadow: rgba(0, 0, 0, 0.42);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

.is-hidden {
  display: none !important;
}

.app-shell,
.screen {
  width: 100%;
  height: 100svh;
  min-height: 100%;
}

.screen {
  position: absolute;
  inset: 0;
}

.title-screen {
  isolation: isolate;
  overflow: hidden;
  background: #0c1112;
}

.title-backdrop,
.map-backdrop {
  position: absolute;
  inset: 0;
  background-image: url("assets/linwan-rain-city.jpg");
  background-position: center;
  background-size: cover;
}

.title-backdrop {
  z-index: -3;
  filter: saturate(0.86) contrast(1.04);
  transform: scale(1.025);
  animation: title-breathe 10s ease-in-out infinite alternate;
}

.title-vignette {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: rgba(5, 9, 10, 0.57);
}

.rain-layer {
  position: absolute;
  z-index: -1;
  inset: -20%;
  opacity: 0.26;
  background-image: repeating-linear-gradient(102deg, transparent 0 19px, rgba(240, 245, 241, 0.32) 20px, transparent 21px 38px);
  animation: rain-fall 0.7s linear infinite;
  pointer-events: none;
}

.title-content {
  position: absolute;
  inset: auto 20px calc(48px + var(--safe-bottom)) 20px;
  max-width: 650px;
}

.company-kicker,
.contract-code,
.title-line,
.title-content h1 {
  margin: 0;
}

.company-kicker {
  color: var(--paper);
  font-family: SimSun, "Songti SC", serif;
  font-size: 16px;
  font-weight: 700;
}

.contract-code {
  margin-top: 6px;
  color: var(--paper-dim);
  font-size: 13px;
}

.title-clock {
  display: inline-block;
  margin-top: 26px;
  padding: 7px 10px;
  border-left: 4px solid var(--red);
  background: rgba(16, 21, 22, 0.78);
  color: #fff3ed;
  font-family: Consolas, monospace;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.title-content h1 {
  margin-top: 12px;
  max-width: 100%;
  font-family: SimSun, "Songti SC", serif;
  font-size: 40px;
  line-height: 1.08;
  text-wrap: balance;
}

.title-line {
  margin-top: 14px;
  max-width: 32em;
  color: #d4d0c5;
  font-size: 15px;
  line-height: 1.6;
}

.primary-command,
.secondary-command,
.danger-command {
  min-height: 48px;
  border: 0;
  border-radius: 2px;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}

.primary-command {
  margin-top: 22px;
  background: var(--amber);
  color: #18140d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.primary-command:hover {
  background: #f5b151;
}

.secondary-command {
  border: 1px solid var(--line-strong);
  background: transparent;
}

.danger-command {
  border: 1px solid rgba(210, 81, 73, 0.75);
  background: transparent;
  color: #ffb3ad;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(16, 21, 22, 0.76);
  color: var(--paper);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--paper-dim);
}

.title-utility {
  position: absolute;
  top: calc(14px + var(--safe-top));
  right: 14px;
}

.game-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--ink);
}

.game-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  min-height: calc(74px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 10px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 21, 22, 0.98);
}

.header-identity {
  min-width: 0;
}

.mini-brand {
  display: block;
  color: var(--amber);
  font-family: SimSun, "Songti SC", serif;
  font-size: 13px;
  font-weight: 700;
}

.header-identity strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.resource {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding-top: 7px;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.resource:last-child {
  border-right: 0;
}

.resource span {
  color: var(--paper-dim);
}

.resource b {
  color: var(--paper);
  font-family: Consolas, monospace;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.resource-turn b {
  color: var(--red);
}

.resource-evidence b {
  color: var(--mint);
}

.header-tools {
  position: absolute;
  top: calc(8px + var(--safe-top));
  right: 10px;
  display: flex;
  gap: 6px;
}

.header-identity {
  padding-right: 86px;
}

.header-tools .icon-button {
  width: 36px;
  height: 36px;
}

.workspace {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(220px, 0.98fr) auto;
  overflow: hidden;
  transition: grid-template-rows 300ms ease, grid-template-columns 300ms ease;
}

.workspace.zero-active {
  grid-template-rows: minmax(0, 1fr) 0;
}

.workspace.zero-active .action-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px);
}

.city-map {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #101616;
}

.map-backdrop {
  z-index: -3;
  opacity: 0.36;
  filter: saturate(0.52) contrast(1.08) brightness(0.68);
}

.paper-wash {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: rgba(17, 23, 23, 0.35);
  box-shadow: inset 0 0 0 1px rgba(232, 225, 210, 0.06);
}

.fungal-network {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route {
  fill: none;
  stroke: rgba(114, 213, 176, 0.54);
  stroke-width: 0.7;
  stroke-dasharray: 2.4 1.8;
  vector-effect: non-scaling-stroke;
  animation: route-flow 2.4s linear infinite;
}

.site-node {
  position: absolute;
  z-index: 3;
  width: 112px;
  min-height: 74px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(16, 21, 22, 0.84);
  box-shadow: 0 7px 18px var(--shadow);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.site-node::before,
.site-node::after {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: transparent;
  content: "";
}

.site-node::before {
  top: -4px;
  left: -4px;
  border-top: 2px solid transparent;
  border-left: 2px solid transparent;
}

.site-node::after {
  right: -4px;
  bottom: -4px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
}

.site-node:hover,
.site-node.is-selected {
  background: rgba(28, 35, 34, 0.96);
  border-color: var(--amber);
}

.site-node.is-selected {
  transform: translate(-50%, -50%) translateY(-3px);
}

.site-node.is-selected::before {
  border-top-color: var(--amber);
  border-left-color: var(--amber);
}

.site-node.is-selected::after {
  border-right-color: var(--amber);
  border-bottom-color: var(--amber);
}

.site-node.is-threatened {
  border-color: var(--red);
  background: rgba(64, 29, 28, 0.88);
}

.site-node.is-delegated {
  border: 2px double var(--warm);
}

.site-node.is-passed {
  border-color: var(--warm);
  background: rgba(38, 38, 26, 0.94);
}

.site-node.is-failed {
  border-color: var(--red-dark);
  background: rgba(46, 24, 24, 0.94);
}

.site-node.is-failed .site-label {
  text-decoration: line-through;
}

.site-water {
  top: 19%;
  left: 27%;
}

.site-station {
  top: 49%;
  left: 67%;
}

.site-tower {
  top: 68%;
  left: 28%;
}

.site-glyph {
  position: absolute;
  top: 8px;
  left: 9px;
  display: flex;
  width: 34px;
  height: 22px;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  color: var(--paper-dim);
}

.water-glyph i {
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.station-glyph {
  align-items: center;
  gap: 4px;
}

.station-glyph i {
  display: block;
  width: 12px;
  height: 17px;
  border: 1px solid currentColor;
  border-bottom-width: 3px;
}

.tower-glyph i {
  display: block;
  width: 2px;
  height: 22px;
  transform: skew(-13deg);
  background: currentColor;
}

.tower-glyph i:nth-child(2) {
  height: 15px;
  transform: skew(13deg);
}

.tower-glyph i:nth-child(3) {
  position: absolute;
  top: 8px;
  width: 25px;
  height: 1px;
  transform: none;
}

.site-label {
  display: block;
  margin: 8px 8px 0 50px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.site-status {
  display: block;
  margin: 4px 8px 8px 50px;
  color: var(--paper-dim);
  font-size: 12px;
}

.site-status b {
  color: var(--paper);
  font-family: Consolas, monospace;
}

.owner-seal {
  display: block;
  margin: 0 8px 7px;
  border-top: 1px solid rgba(242, 201, 109, 0.45);
  padding-top: 4px;
  color: var(--warm);
  font-size: 11px;
  text-align: center;
}

.threat-intent {
  position: absolute;
  z-index: 6;
  display: flex;
  min-width: 82px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate(-50%, -50%);
  border: 1px solid #ff8b83;
  background: rgba(210, 81, 73, 0.92);
  padding: 5px 7px;
  color: #171111;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  transition: top 320ms ease, left 320ms ease;
}

.threat-chevron {
  font-size: 10px;
}

.map-toast {
  position: absolute;
  z-index: 9;
  top: 8px;
  left: 50%;
  width: min(86%, 360px);
  transform: translateX(-50%);
  border-left: 4px solid var(--amber);
  background: rgba(16, 21, 22, 0.94);
  padding: 8px 10px;
  color: var(--paper);
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 5px 16px var(--shadow);
}

.map-toast.is-danger {
  border-left-color: var(--red);
}

.call-strip {
  position: absolute;
  z-index: 8;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid var(--line-strong);
  background: rgba(16, 21, 22, 0.92);
  padding: 7px 9px;
}

.speaker-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--warm);
  color: var(--warm);
  font-family: SimSun, serif;
}

.call-strip b {
  color: var(--warm);
  font-size: 12px;
}

.call-strip p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--paper);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-dock {
  position: relative;
  z-index: 10;
  min-height: 0;
  border-top: 1px solid var(--line-strong);
  background: #171d1d;
  padding: 10px 10px calc(10px + var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 260ms ease, transform 260ms ease;
}

.selection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.selection-code,
.selection-state {
  color: var(--paper-dim);
  font-size: 11px;
}

.selection-state {
  border: 1px solid var(--line);
  padding: 3px 6px;
}

.selection-heading h2 {
  margin: 2px 0 0;
  font-family: SimSun, "Songti SC", serif;
  font-size: 20px;
}

.site-visual {
  position: relative;
  height: 96px;
  margin: 9px 0 0;
  overflow: hidden;
  border-left: 3px solid var(--mint);
  background: #0d1112;
}

.site-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  transition: filter 260ms ease, opacity 260ms ease;
}

.site-visual.is-unread img {
  opacity: 0.42;
  filter: grayscale(1) brightness(0.4) contrast(1.2);
}

.site-visual figcaption {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(232, 225, 210, 0.3);
  background: rgba(16, 21, 22, 0.86);
  padding: 3px 6px;
  color: var(--paper);
  font-size: 11px;
}

.site-description {
  min-height: 38px;
  margin: 8px 0 9px;
  color: #d6d1c5;
  font-size: 14px;
  line-height: 1.4;
}

.action-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.action-button {
  display: grid;
  min-width: 0;
  min-height: 62px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #222929;
  padding: 7px 6px;
  text-align: left;
  cursor: pointer;
  transition: transform 70ms ease, border-color 120ms ease, background 120ms ease;
}

.action-button:hover:not(:disabled) {
  border-color: var(--amber);
  background: #293130;
}

.action-button:active:not(:disabled) {
  transform: translateY(2px);
}

.action-button:disabled {
  border-color: rgba(232, 225, 210, 0.08);
  background: #181e1e;
  color: #777a74;
}

.action-symbol {
  color: var(--amber);
  font-size: 20px;
  text-align: center;
}

.action-button b,
.action-button small {
  display: block;
}

.action-button b {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}

.action-button small {
  margin-top: 3px;
  color: var(--paper-dim);
  font-size: 10px;
  line-height: 1.2;
}

.hypothesis-panel {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.hypothesis-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.hypothesis-heading h3 {
  margin: 0;
  font-size: 13px;
}

.hypothesis-heading span {
  color: var(--mint);
  font-size: 11px;
}

.hypothesis-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 7px;
  border: 1px solid var(--line);
}

.hypothesis-options button {
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 5px 4px;
  cursor: pointer;
}

.hypothesis-options button:last-child {
  border-right: 0;
}

.hypothesis-options button.is-active {
  background: var(--paper);
  color: var(--ink);
}

.hypothesis-options b,
.hypothesis-options small {
  display: block;
}

.hypothesis-options b {
  font-size: 11px;
}

.hypothesis-options small {
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  opacity: 0.74;
}

.event-sheet,
.zero-overlay,
.result-sheet {
  position: fixed;
  z-index: 60;
  inset: 0;
}

.event-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 9, 0.68);
}

.event-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 70svh;
  border-top: 3px solid var(--red);
  background: #1c2323;
  padding: 18px 16px calc(18px + var(--safe-bottom));
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.42);
  animation: sheet-in 240ms ease-out both;
}

.event-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.event-panel h2 {
  margin: 5px 0 0;
  font-family: SimSun, "Songti SC", serif;
  font-size: 24px;
}

.event-panel > p {
  margin: 10px 0 14px;
  color: #d1cdc1;
  font-size: 15px;
  line-height: 1.55;
}

.event-options {
  display: grid;
  gap: 8px;
}

.event-option {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.event-option:hover {
  border-color: var(--amber);
  background: rgba(240, 164, 59, 0.06);
}

.event-option b,
.event-option small {
  display: block;
}

.event-option b {
  font-size: 15px;
}

.event-option small {
  margin-top: 3px;
  color: var(--paper-dim);
  font-size: 12px;
}

.event-option span:last-child {
  color: var(--amber);
  font-size: 18px;
}

.zero-overlay {
  display: grid;
  place-items: center;
  background: rgba(7, 10, 10, 0.2);
  pointer-events: none;
}

.zero-band {
  width: 100%;
  background: rgba(10, 14, 14, 0.88);
  padding: 18px 20px;
  text-align: center;
}

.zero-band span {
  display: block;
  color: var(--red);
  font-family: Consolas, monospace;
  font-size: 16px;
}

.zero-band strong {
  display: block;
  margin-top: 4px;
  font-family: SimSun, "Songti SC", serif;
  font-size: 30px;
}

.result-sheet {
  overflow-y: auto;
  background: rgba(13, 18, 18, 0.96);
  padding: calc(24px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
}

.result-header,
.result-sites,
.result-callbacks,
.result-actions {
  width: min(100%, 680px);
  margin-right: auto;
  margin-left: auto;
}

.result-header {
  border-left: 5px solid var(--warm);
  padding-left: 14px;
}

.result-header > span {
  color: var(--paper-dim);
  font-size: 12px;
}

.result-header h2 {
  margin: 4px 0 0;
  font-family: SimSun, "Songti SC", serif;
  font-size: 34px;
}

.result-header p {
  margin: 8px 0 0;
  color: #d1cdc1;
  font-size: 15px;
  line-height: 1.55;
}

.result-sites {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-site {
  min-width: 0;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.result-site:last-child {
  border-right: 0;
}

.result-site b,
.result-site span {
  display: block;
}

.result-site b {
  font-size: 13px;
}

.result-site span {
  margin-top: 5px;
  color: var(--paper-dim);
  font-size: 12px;
}

.result-site.is-pass b {
  color: var(--warm);
}

.result-site.is-fail b {
  color: #ff928b;
}

.result-callbacks {
  margin-top: 18px;
}

.callback-line {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: #d8d3c7;
  font-size: 14px;
  line-height: 1.5;
}

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

.result-actions .primary-command,
.result-actions .secondary-command {
  margin-top: 0;
}

.pause-dialog {
  width: min(90vw, 420px);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #1a2121;
  color: var(--paper);
  padding: 0;
}

.pause-dialog::backdrop {
  background: rgba(5, 8, 9, 0.76);
}

.pause-dialog form {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.pause-title,
.pause-dialog label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pause-title {
  margin-bottom: 6px;
  font-family: SimSun, "Songti SC", serif;
  font-size: 22px;
}

.pause-dialog label {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.pause-dialog input {
  width: 22px;
  height: 22px;
  accent-color: var(--amber);
}

@keyframes title-breathe {
  from { transform: scale(1.025); }
  to { transform: scale(1.055); }
}

@keyframes rain-fall {
  from { transform: translate3d(0, -4%, 0); }
  to { transform: translate3d(-2%, 4%, 0); }
}

@keyframes route-flow {
  to { stroke-dashoffset: -18; }
}

@keyframes sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 720px) {
  .title-content {
    right: auto;
    bottom: 9vh;
    left: 7vw;
  }

  .title-content h1 {
    font-size: 58px;
  }

  .title-line {
    font-size: 17px;
  }

  .game-header {
    grid-template-columns: minmax(230px, 1fr) minmax(410px, auto) auto;
    min-height: calc(64px + var(--safe-top));
    padding-right: 16px;
    padding-left: 16px;
  }

  .resource-strip {
    grid-column: auto;
    border: 1px solid var(--line);
  }

  .resource {
    min-width: 88px;
    padding: 8px 10px;
  }

  .header-identity strong {
    font-size: 14px;
  }

  .header-identity {
    padding-right: 0;
  }

  .header-tools {
    position: static;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 348px;
    grid-template-rows: minmax(0, 1fr);
  }

  .workspace.zero-active {
    grid-template-columns: minmax(0, 1fr) 0;
    grid-template-rows: minmax(0, 1fr);
  }

  .workspace.zero-active .action-dock {
    transform: translateX(30px);
  }

  .action-dock {
    border-top: 0;
    border-left: 1px solid var(--line-strong);
    padding: 16px 14px calc(16px + var(--safe-bottom));
  }

  .site-visual {
    height: 164px;
  }

  .city-map {
    min-height: 0;
  }

  .site-water {
    top: 31%;
    left: 24%;
  }

  .site-station {
    top: 63%;
    left: 71%;
  }

  .site-tower {
    top: 24%;
    left: 75%;
  }

  .site-node {
    width: 132px;
    min-height: 82px;
  }

  .event-panel {
    top: 50%;
    right: 24px;
    bottom: auto;
    left: auto;
    width: min(430px, 42vw);
    transform: translateY(-50%);
    border-top: 0;
    border-left: 3px solid var(--red);
    padding: 22px;
    animation: none;
  }

  .result-sheet {
    display: grid;
    align-content: center;
  }
}

@media (max-height: 700px) and (max-width: 719px) {
  .game-header {
    min-height: calc(66px + var(--safe-top));
    gap: 4px 8px;
    padding-bottom: 5px;
  }

  .resource {
    padding-top: 4px;
  }

  .workspace {
    grid-template-rows: minmax(250px, 0.95fr) minmax(250px, auto);
  }

  .site-water { top: 18%; }
  .site-station { top: 39%; }
  .site-tower { top: 56%; }

  .fungal-network {
    transform: scaleY(0.72);
    transform-origin: top;
  }

  .action-dock {
    padding-top: 7px;
  }

  .site-visual {
    height: 74px;
  }

  .site-description {
    min-height: 32px;
    margin: 5px 0 6px;
    font-size: 13px;
  }

  .action-button {
    min-height: 56px;
  }

  .hypothesis-panel {
    margin-top: 7px;
    padding-top: 6px;
  }

  .hypothesis-options button {
    min-height: 46px;
  }
}

@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;
  }
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
