:root {
  color-scheme: dark;
  --bg: #0d141b;
  --surface: #141e27;
  --surface2: #1b2832;
  --line: #2a3842;
  --muted: #90a1ab;
  --text: #f2f4f3;
  --red: #f45a47;
  --green: #9cc69c;
  --amber: #e8bb72;
  --radius: 12px;
  font:
    15px/1.5 "Segoe UI",
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
a {
  color: var(--amber);
}
button {
  border: 0;
}
svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
p {
  margin-bottom: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 12px;
}
.spacer {
  flex: 1;
}
.brand-mark {
  width: 40px;
  height: 46px;
  background: var(--red);
  font-size: 30px;
  line-height: 1.1;
  padding: 3px 9px;
  font-weight: 900;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
}
.brand-mark span {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: -1px;
}
.brand-word {
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0.13em;
  font-weight: 800;
}
.brand-word small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.17em;
  font-weight: 500;
  margin-top: 6px;
}
#boot {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
#boot h1 {
  letter-spacing: 0.22em;
  margin: 0;
}
#boot p {
  color: var(--muted);
}
.loader {
  width: 140px;
  height: 3px;
  background: #34434a;
  overflow: hidden;
}
.loader:after {
  content: "";
  display: block;
  background: var(--red);
  width: 50px;
  height: 3px;
  animation: loading 1.2s infinite;
}
@keyframes loading {
  to {
    transform: translateX(140px);
  }
}
.app-shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  grid-template-rows: 78px minmax(0, 1fr);
  height: 100dvh;
  min-height: 640px;
}
.sidebar {
  grid-row: 1/3;
  background: #101820;
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  padding: 0 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 42px;
}
.nav-label {
  padding: 0 14px;
  margin-bottom: 10px;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: none;
  color: #a7b5be;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  position: relative;
}
.nav button:hover {
  background: #1c2932;
  color: #fff;
}
.nav button.active {
  background: #302523;
  color: #ffac9f;
}
.nav button.active:before {
  content: "";
  position: absolute;
  left: -16px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--red);
}
.nav .count {
  margin-left: auto;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  padding: 1px 6px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 20px 8px 0;
}
.commander {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.avatar {
  display: grid;
  place-items: center;
  background: #31454a;
  border: 1px solid #506368;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  font-size: 12px;
  color: #d9e0d9;
  font-weight: 700;
  flex: none;
}
.topbar {
  grid-column: 2;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  z-index: 2;
  background: var(--bg);
}
.station-name {
  font-weight: 650;
}
.top-metrics {
  margin-left: auto;
  display: flex;
  gap: 26px;
}
.metric {
  min-width: 78px;
}
.metric small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.metric strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.metric.budget strong {
  color: var(--green);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: inline-grid;
  place-items: center;
}
.main {
  grid-column: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.context-bar {
  padding: 21px 28px 19px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.context-bar h1 {
  font-size: 24px;
  margin: 3px 0 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #233b32;
  color: #b8d8b6;
  font-size: 12px;
  white-space: nowrap;
}
.badge.red {
  background: #492822;
  color: #ffaf9e;
}
.badge.amber {
  background: #453729;
  color: #efd098;
}
.badge.blue {
  background: #213b50;
  color: #a7cbe5;
}
.badge.neutral {
  background: #26323c;
  color: #b8c5ce;
}
.sim-controls {
  display: flex;
  gap: 4px;
  background: #16212a;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 8px;
  margin-left: auto;
}
.sim-controls button {
  background: none;
  padding: 5px 9px;
  border-radius: 4px;
  color: #b5c0c6;
  font-size: 13px;
}
.sim-controls button.active {
  background: #35454e;
  color: #fff;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  min-height: 0;
  flex: 1;
  border-top: 1px solid var(--line);
}
.world-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.scene-wrap {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background: #a9c1cb;
}
#world {
  position: absolute;
  inset: 0;
}
#world canvas {
  display: block;
  touch-action: none;
  outline-offset: -3px;
}
.scene-top {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.location-tag {
  background: #10202bda;
  backdrop-filter: blur(8px);
  border: 1px solid #ffffff24;
  padding: 10px 14px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #16353a16;
}
.location-tag strong {
  font-size: 14px;
  display: block;
}
.location-tag small {
  font-size: 12px;
  color: #c1cfce;
}
.scene-live {
  background: #11212bca;
  border-radius: 6px;
  padding: 5px 8px;
  color: #dce7e5;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.scene-live:before {
  content: "●";
  color: #f78262;
  margin-right: 6px;
}
.scene-bottom {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  pointer-events: none;
}
.camera-help {
  font-size: 12px;
  color: #e9eeeb;
  background: #10202bbb;
  border-radius: 6px;
  padding: 7px 10px;
}
.camera-controls {
  display: flex;
  gap: 5px;
  pointer-events: auto;
}
.camera-controls button {
  background: #13252ddd;
  border-color: #ffffff2b;
  color: #fff;
}
.world-caption {
  background: #17232c;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.world-caption h3 {
  font-size: 15px;
  margin: 0;
}
.world-caption small {
  font-size: 12px;
}
.progress-track {
  height: 5px;
  background: #2d3d44;
  border-radius: 5px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
}
.ticker {
  height: 106px;
  padding: 15px 22px;
  background: #111a22;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.ticker-line {
  display: flex;
  gap: 12px;
  font-size: 13px;
  margin-top: 8px;
}
.ticker-line time {
  color: #79929c;
  font-variant-numeric: tabular-nums;
}
.right-panel {
  background: #111a22;
  border-left: 1px solid var(--line);
  overflow: auto;
  padding: 22px 20px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}
.panel-title h2 {
  font-size: 17px;
  margin: 0;
}
.alert-card {
  padding: 16px;
  border: 1px solid #704238;
  border-radius: 10px;
  background: linear-gradient(135deg, #332523, #221e20);
  margin-bottom: 12px;
}
.alert-card .incident-title {
  font-size: 18px;
  margin: 13px 0 5px;
  line-height: 1.25;
}
.alert-card p {
  font-size: 13px;
  color: #c9b6ae;
}
.alert-card button {
  width: 100%;
  margin-top: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #3b4b55;
  background: #24343e;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 650;
  border-radius: 7px;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover {
  filter: brightness(1.13);
}
.btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  color: #c4d0d5;
}
.btn.small {
  padding: 7px 10px;
  font-size: 12px;
}
.btn.green {
  background: #355342;
  border-color: #46664e;
  color: #d1e9cb;
}
.section-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.mini-card {
  padding: 12px 0;
  border-bottom: 1px solid #23313a;
}
.mini-card:last-child {
  border: 0;
}
.mini-card h3 {
  font-size: 14px;
  margin: 0 0 3px;
}
.mini-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.mini-card .icon-tile {
  width: 34px;
  height: 34px;
  background: #23343b;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #aac0b5;
  flex: none;
}
.availability {
  padding: 14px;
  background: #1a2831;
  border: 1px solid #2b3a43;
  border-radius: 9px;
  margin-top: 16px;
}
.availability strong {
  font-size: 26px;
  letter-spacing: -0.06em;
}
.availability strong span {
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.person-dots {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.person-dots span {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: #3e6d53;
}
.person-dots .off {
  background: #34414b;
}
.content-view {
  padding: 0 28px 28px;
  overflow: auto;
  flex: 1;
}
.content-head {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 10px 0 23px;
}
.content-head p {
  color: var(--muted);
  max-width: 750px;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  padding: 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card p {
  color: var(--muted);
  font-size: 14px;
}
.card .price {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.04em;
  margin: 14px 0;
}
.card .btn {
  margin-top: 12px;
}
.card-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  background: #283b43;
  border-radius: 10px;
  margin-bottom: 17px;
  color: #b4c9c6;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-box {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-box strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
}
.stat-box small {
  font-size: 13px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  background: #1b2932;
}
td,
th {
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
td {
  background: #141e27;
}
.name-cell strong {
  display: block;
  font-size: 14px;
}
.name-cell small {
  font-size: 12px;
}
.skills {
  display: flex;
  gap: 4px;
  max-width: 220px;
  flex-wrap: wrap;
}
.skill {
  font-size: 12px;
  color: #b8c8cf;
  border: 1px solid #3b4d58;
  border-radius: 3px;
  padding: 2px 5px;
}
.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}
.field label,
legend {
  font-size: 13px;
  font-weight: 600;
  color: #c5d1d4;
}
input,
select {
  background: #101b24;
  color: var(--text);
  border: 1px solid #3a4c58;
  padding: 10px 12px;
  border-radius: 6px;
  max-width: 100%;
  min-width: 0;
}
select.compact {
  padding: 6px;
  font-size: 12px;
}
input[type="checkbox"] {
  accent-color: var(--red);
  width: 17px;
  height: 17px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #2e404a;
  border-radius: 7px;
  padding: 10px 12px;
  cursor: pointer;
  background: #17252e;
}
.check-row:has(input:checked) {
  border-color: #b8614b;
  background: #322923;
}
.check-row:has(input:disabled) {
  opacity: 0.45;
}
.check-row small {
  margin-left: auto;
}
.notice {
  padding: 12px 15px;
  border: 1px solid #4a483c;
  background: #2c2b23;
  border-radius: 8px;
  font-size: 13px;
  color: #ded1b0;
  margin: 16px 0;
}
.notice.info {
  background: #1a2b35;
  border-color: #334b5a;
  color: #bacfda;
}
.notice.error {
  background: #3b2423;
  border-color: #74463d;
  color: #ffb9a8;
}
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
dialog {
  border: 1px solid #46545c;
  background: #14212a;
  color: var(--text);
  padding: 0;
  border-radius: 16px;
  width: min(700px, calc(100vw - 28px));
  max-height: 90dvh;
  box-shadow: 0 25px 100px #0009;
}
dialog::backdrop {
  background: #061019ba;
  backdrop-filter: blur(6px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #14212a;
  z-index: 2;
}
.modal-head h2 {
  margin: 0;
  font-size: 21px;
}
.modal-body {
  padding: 22px 25px;
}
.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: end;
  padding: 18px 25px;
  border-top: 1px solid var(--line);
  background: #111d25;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 20;
  background: #ecf0e8;
  color: #16271d;
  padding: 12px 22px;
  border-radius: 8px;
  box-shadow: 0 12px 60px #0005;
  max-width: min(580px, 90vw);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #f6d2c7;
  color: #6b271a;
}
.task-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17252d;
  margin: 10px 0;
}
.task-card .progress-track {
  margin: 10px 0;
}
.task-card h3 {
  font-size: 14px;
}
.task-card small {
  font-size: 12px;
}
.task-card .btn {
  width: 100%;
  margin-top: 8px;
}
.steps {
  display: flex;
  gap: 6px;
  margin: 16px 0;
}
.steps span {
  height: 4px;
  background: #34414a;
  flex: 1;
}
.steps .done {
  background: var(--green);
}
.empty {
  padding: 26px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.feed {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  font-size: 14px;
}
.feed time {
  color: var(--muted);
  font-size: 12px;
  min-width: 80px;
}
.feed.alarm {
  color: #ffb299;
}
.feed.success {
  color: #b2d2b0;
}
.feed.warning {
  color: #e6c091;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 21px;
}
.tabs button {
  background: #1b2932;
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 6px;
  color: #b8c4ca;
}
.tabs button.active {
  border-color: #aa5d49;
  background: #342923;
  color: #f1b6a6;
}
.place-results {
  display: grid;
  gap: 7px;
  max-height: 250px;
  overflow: auto;
  margin-top: 12px;
}
.place-result {
  background: #1f303a;
  border: 1px solid #344a56;
  border-radius: 7px;
  padding: 10px 13px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.place-result:hover,
.place-result.selected {
  border-color: var(--red);
  background: #352a26;
}
.map-coord {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}
.auth-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
}
.auth-tabs button {
  padding: 7px 0;
  background: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.auth-tabs button.active {
  color: #fff;
  border-color: var(--red);
}
.offline-tag {
  font-size: 12px;
  color: #c8b383;
}
.money-in {
  color: #add1a4;
}
.money-out {
  color: #d3a99e;
}
.footer-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
}
.view-label {
  font-weight: 500;
  color: #b0c0c9;
}
.map-fallback {
  padding: 30px;
  position: relative;
  background: #29414b;
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
}
.how-list {
  display: grid;
  gap: 16px;
  padding-left: 23px;
}
.how-list li {
  padding-left: 6px;
}
.how-list strong {
  display: block;
  margin-bottom: 3px;
}
.help-key {
  border: 1px solid #4c5e68;
  padding: 1px 6px;
  border-radius: 4px;
}
.mobile-brand {
  display: none;
}
.row-wrap {
  flex-wrap: wrap;
}
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.quest-claimed {
  opacity: 0.6;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.calendar-item {
  padding: 16px;
  background: #19262f;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.calendar-item + .calendar-item {
  margin-top: 12px;
}
.calendar-date {
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 5px;
}
.bars {
  display: flex;
  gap: 8px;
  height: 75px;
  align-items: end;
  margin: 15px 0;
}
.bars div {
  flex: 1;
  background: #78a07b;
  min-height: 6px;
  border-radius: 3px 3px 0 0;
}
.full-width {
  width: 100%;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 385px;
  }
  .right-panel {
    padding: 26px;
  }
  .context-bar {
    padding-top: 25px;
    padding-bottom: 24px;
  }
}
@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding: 23px 10px;
  }
  .brand {
    gap: 8px;
    padding: 0 4px;
  }
  .brand-word {
    font-size: 17px;
  }
  .brand-word small {
    font-size: 8px;
  }
  .nav button {
    font-size: 13px;
    padding: 11px 10px;
  }
  .topbar {
    padding: 0 20px;
    gap: 12px;
  }
  .top-metrics {
    gap: 15px;
  }
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 304px;
  }
  .right-panel {
    padding: 18px 15px;
  }
  .context-bar {
    padding: 20px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .world-caption {
    gap: 12px;
  }
  .metric {
    min-width: 60px;
  }
  .metric strong {
    font-size: 15px;
  }
  .camera-help {
    display: none;
  }
}
@media (max-width: 950px) {
  .app-shell {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .sidebar {
    padding: 21px 10px;
  }
  .brand {
    padding: 0 6px;
  }
  .brand-word,
  .nav-label,
  .nav button > span:not(.count),
  .sidebar-foot .commander,
  .sidebar-foot .eyebrow,
  .sidebar-foot .offline-tag {
    display: none;
  }
  .nav button {
    justify-content: center;
    padding: 13px 10px;
  }
  .nav .count {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0;
    padding: 0 4px;
    font-size: 9px;
  }
  .sidebar-foot {
    padding: 10px 6px;
  }
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .station-name {
    font-size: 13px;
  }
  .metric.reputation {
    display: none;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-view {
    padding: 0 20px 20px;
  }
  .scene-top {
    left: 14px;
    top: 14px;
  }
  .scene-live {
    display: none;
  }
  .world-caption {
    padding: 12px 15px;
  }
  .world-caption .readiness {
    display: none;
  }
}
@media (max-width: 720px) {
  :root {
    font-size: 14px;
  }
  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    padding-bottom: 66px;
  }
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 5px 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
    height: 63px;
    display: block;
    overflow: auto;
  }
  .brand,
  .sidebar-foot {
    display: none;
  }
  .nav {
    display: flex;
    width: max-content;
    min-width: 100%;
    justify-content: space-around;
    gap: 2px;
  }
  .nav button {
    padding: 6px 10px;
    flex-direction: column;
    gap: 3px;
    font-size: 9px;
    min-width: 56px;
  }
  .nav button > span:not(.count) {
    display: block;
    font-size: 12px;
  }
  .nav button.active:before {
    display: none;
  }
  .nav svg {
    width: 19px;
    height: 19px;
  }
  .topbar {
    height: 67px;
    padding: 0 15px;
    position: sticky;
    top: 0;
    gap: 8px;
  }
  .station-name {
    font-size: 12px;
  }
  .topbar .station-meta {
    max-width: 150px;
    overflow: hidden;
  }
  .top-metrics {
    gap: 10px;
  }
  .metric.morale {
    display: none;
  }
  .metric.budget strong {
    font-size: 14px;
  }
  .metric small {
    font-size: 12px;
  }
  .topbar .icon-btn {
    width: 30px;
    height: 30px;
  }
  .main {
    overflow: visible;
  }
  .context-bar {
    padding: 16px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .context-bar h1 {
    font-size: 22px;
  }
  .context-bar > .badge {
    display: none;
  }
  .sim-controls {
    padding: 3px;
  }
  .sim-controls button {
    padding: 4px 7px;
  }
  .play-layout {
    display: flex;
    flex-direction: column;
  }
  .scene-wrap {
    height: 390px;
    flex: auto;
  }
  .right-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
    padding: 20px;
  }
  .world-caption {
    padding: 14px 17px;
  }
  .ticker {
    height: 95px;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .content-view {
    overflow: visible;
    padding: 0 16px 24px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat-box {
    padding: 14px;
  }
  .stat-box strong {
    font-size: 24px;
  }
  .content-head {
    align-items: start;
    flex-direction: column;
  }
  .check-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-head {
    padding: 17px 18px;
  }
  .modal-foot {
    padding: 15px 18px;
  }
  .modal-head h2 {
    font-size: 19px;
  }
  .modal-foot .btn {
    font-size: 13px;
  }
  .scene-bottom {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
  h1 {
    font-size: 25px;
  }
  .card {
    padding: 18px;
  }
  .scene-top {
    right: 14px;
  }
  .place-result {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }
  #toast {
    bottom: 85px;
  }
  .context-bar .eyebrow {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

.task-reason { display:block; color:var(--amber); margin-top:8px; }
#update-result p { margin-top:18px; }
#update-package { width:100%; padding:12px; font-size:14px; }
@media(min-width:721px){.sidebar{overflow-y:auto}.sidebar-foot{padding-top:16px}.nav button{padding-top:9px;padding-bottom:9px}.brand{margin-bottom:27px}}

/* Personal lives and volunteer readiness */
.member-card .row h3 { margin:0 0 5px; }
.member-card .row .avatar { flex-shrink:0; }
.member-card p { min-height:35px; }
.member-meters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.member-meters .progress-track { margin-top:7px; }
.member-meters .row { gap:4px; flex-wrap:wrap; }
.profile-hero { display:flex; gap:18px; align-items:center; padding-bottom:18px; border-bottom:1px solid var(--line,#34444f); }
.profile-hero .avatar { width:62px; height:62px; font-size:22px; flex-shrink:0; }
.profile-hero h3 { margin:5px 0 10px; }
.profile-sections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:22px; }
.profile-sections section { background:#172630; border-radius:10px; border:1px solid #324550; padding:17px; }
.profile-sections h3 { margin:0 0 12px; }
.profile-sections p { color:#bbccd3; font-size:13px; line-height:1.6; }
.profile-sections .full-width { margin-top:12px; }
.alarm-board { padding:13px; border:1px solid #435b66; border-radius:10px; margin:18px 0; background:#172a33; }
.alarm-board summary { cursor:pointer; font-size:13px; font-weight:600; }
.response-list { display:grid; gap:10px; margin-top:14px; max-height:280px; overflow:auto; }
.response-row { display:flex; flex-direction:column; gap:4px; padding-bottom:8px; border-bottom:1px solid #334954; }
.response-row strong { font-size:12px; }
.response-row small { color:#b7cad2; }
@media (max-width:640px) { .profile-sections { grid-template-columns:1fr; } .member-meters { gap:9px; } }
.scene-wrap.cinematic-scene { position:fixed; inset:12px; z-index:90; height:auto!important; box-shadow:0 0 0 20px #0c151ce8; }
.cinematic-scene::after { content:"KINOKAMERA · ESC ZURÜCK"; position:absolute; left:24px; bottom:80px; font-size:11px; letter-spacing:.15em; color:#e7d7bd; pointer-events:none; }
@media (max-width:600px) { .scene-wrap.cinematic-scene { inset:0; border-radius:0; } .camera-controls { gap:3px; } .camera-controls .icon-btn { width:30px; height:32px; } .camera-help { display:none; } }

/* Command decisions, scene relief and after-action reports. */
.command-summary{padding:15px;border:1px solid #426052;border-radius:12px;background:#182b29;margin:16px 0}.command-summary strong{display:block}.command-summary .btn{margin-top:12px}.command-note{font-size:12px;color:var(--amber);margin-bottom:0}.development-card{padding:18px;border:1px solid #a47540;border-radius:12px;background:#33291e;margin:16px 0}.development-card h3{margin:10px 0}.development-card p{font-size:13px;color:#dcc4a3}.development-card small{display:block;margin:7px 0 14px;color:#d4c8b7;font-size:11px}.development-card .eyebrow{color:var(--amber)}.command-heading p{color:var(--muted)}.approach-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.approach-card{padding:15px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.approach-card.selected{border-color:var(--green);background:#1d302c}.approach-card h3{font-size:15px}.approach-card p,.approach-card small{font-size:12px;color:var(--muted)}.approach-card .btn{font-size:12px}.section-heading{margin-top:26px}.command-crew{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.crew-duty{padding:15px;border:1px solid var(--line);border-radius:10px}.crew-duty .row{gap:8px;flex-wrap:wrap}.crew-duty .badge{font-size:10px}.crew-duty .member-meters{margin:13px 0}.reports-section{margin-bottom:30px}.report-card h3{margin-top:15px}.report-card>.row>strong{color:var(--amber);font-variant-numeric:tabular-nums}.report-hero{display:flex;gap:24px;align-items:center;justify-content:space-between}.report-hero h3{font-size:22px;margin:10px 0}.report-score{width:105px;height:105px;flex:0 0 105px;border-radius:50%;border:2px solid var(--green);display:flex;flex-direction:column;justify-content:center;align-items:center;background:#192f28}.report-score strong{font-size:36px;line-height:1.2}.report-score small{color:var(--muted)}.report-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.report-metrics>div{background:var(--surface2);border-radius:9px;padding:14px}.report-metrics small{color:var(--muted);display:block}.report-metrics strong{display:block;margin-top:6px}.report-facts{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.report-facts>div{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);padding:10px 0}.report-facts dt{color:var(--muted);font-size:12px}.report-facts dd{margin:0;text-align:right;font-size:12px}.decision-log summary{cursor:pointer;font-weight:600;padding:12px 0}.debrief-card{margin-top:18px;padding:20px;border:1px solid #426052;border-radius:12px;background:#182b29}.debrief-card>p{font-size:13px;color:var(--muted)}
@media(max-width:640px){.approach-grid,.command-crew{grid-template-columns:1fr}.report-facts{grid-template-columns:1fr}.report-hero{gap:12px}.report-hero h3{font-size:18px}.report-score{width:80px;height:80px;flex-basis:80px}.report-score strong{font-size:28px}.report-metrics>div{padding:10px}.report-metrics small{font-size:11px}.report-metrics strong{font-size:14px}}

.graphics-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.graphics-option{text-align:left;border:1px solid var(--line);border-radius:12px;padding:18px;background:var(--surface2)}.graphics-option.selected{border-color:var(--green);background:#1d302c}.graphics-option strong,.graphics-option small{display:block}.graphics-option strong{font-size:16px;margin-bottom:8px}.graphics-option small{color:var(--muted);font-size:12px;line-height:1.6}@media(max-width:560px){.graphics-options{grid-template-columns:1fr}}

/* Voluntary station life */
.watch-summary{padding:16px;margin:18px 0;border:1px solid var(--line,#d7dfdd);border-radius:12px;background:var(--surface,#fff)}
.watch-summary small{display:block;margin-top:6px}
.watch-choices{margin:22px 0}.watch-choices .card{display:flex;flex-direction:column;gap:12px}.watch-choices .card p{flex:1;margin:0}.watch-choices .card h3{margin:0}
.watch-present{display:flex;gap:8px;flex-wrap:wrap}
.watch-invitees{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:230px;overflow:auto;padding:4px}
.watch-invitees label{display:flex;gap:10px;align-items:center;padding:10px;border:1px solid var(--line,#d7dfdd);border-radius:8px;cursor:pointer}
.watch-invitees input{width:18px;height:18px;flex:none}.watch-invitees small{display:block;font-size:11px;margin-top:3px}
.watch-replies>div{display:grid;grid-template-columns:1fr auto;gap:6px 12px;padding:12px 0;border-bottom:1px solid var(--line,#d7dfdd)}
.watch-replies small{grid-column:1/-1}.watch-replies .badge{white-space:nowrap}
@media(max-width:650px){.watch-invitees{grid-template-columns:1fr}.watch-choices{grid-template-columns:1fr}.watch-replies>div{grid-template-columns:1fr}.watch-replies .badge{justify-self:start}.watch-summary .row{flex-wrap:wrap}}

/* Event planning and transparent club finances. */
.event-estimate { margin:20px 0; padding:20px; border:1px solid var(--line, #33413e); border-radius:14px; background:var(--surface, #182723); }
.event-estimate h3, .event-card h3 { margin:8px 0; }
.event-costs { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 20px; padding:12px 0; border-top:1px solid var(--line, #33413e); border-bottom:1px solid var(--line, #33413e); }
.event-costs dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; }
.event-banner { padding:18px 20px; margin-bottom:20px; background:linear-gradient(120deg,#293b34,#172820); border-left:3px solid #c2b479; border-radius:10px; color:#f1f3ea; }
.event-banner p { color:#c5d0c7; }
.event-controls { margin-top:24px; }
#festival-form .check-item small { display:block; }
.event-card p { margin:8px 0 0; }

/* Youth programme */
.youth-hero{padding:24px;margin-bottom:22px;border-radius:16px;background:linear-gradient(125deg,#254452,#18302d);border:1px solid #38606b}.youth-hero h2{margin:10px 0}.youth-hero p{max-width:760px;color:#c4d9dc}.youth-meter{margin:12px 0}.youth-meter .progress-track{margin-top:6px}.youth-meter .progress-track span{background:#72b3bd}.youth-controls{margin-top:24px}#youth-form .check-item small{display:block}

/* Instandhaltung */
.maintenance-hero{padding:28px;border:1px solid #35454a;border-radius:16px;background:linear-gradient(120deg,#1e3037,#172128);margin-bottom:22px}
.maintenance-hero h2{max-width:640px;font-size:clamp(23px,3vw,32px);line-height:1.2;margin:12px 0}
.maintenance-hero p{max-width:740px;color:var(--muted)}
.maintenance-meter{margin-top:18px}.maintenance-meter .progress-track{margin:10px 0}
.maintenance-reason{min-height:2em;color:var(--amber)}.danger-text{color:#f2a5a0}
#maintenance-form input{width:100%}#maintenance-preview{margin-top:18px}

/* Einsatzgeschichten und Erlebnisbuch */
.story-hero{padding:32px;border-radius:18px;border:1px solid #5b5547;background:linear-gradient(125deg,#342f28,#19292d);margin-bottom:22px}.story-hero h2{font-size:clamp(25px,3.2vw,38px);line-height:1.1;max-width:600px;margin:14px 0}.story-hero p{max-width:760px;color:#c4c9c5}.story-hero .row{gap:24px;color:var(--amber);margin-top:22px}
.story-card{padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface);min-width:0}.story-card.compact{padding:17px;margin:18px 0;border-color:#746448}.story-card h3{font-size:20px;line-height:1.2;margin:15px 0}.story-card p{color:var(--muted);line-height:1.55}.story-card blockquote,.story-intro blockquote{border-left:2px solid #bba779;padding-left:14px;margin:16px 0;color:#ded7c5;font-style:italic}.story-card cite,.story-intro cite{display:block;margin-top:8px;font-size:12px;color:var(--muted);font-style:normal}.story-card .progress-track{margin:12px 0}.story-controls{margin-top:20px}.story-letter{margin-top:20px;background:#d9cfb7;color:#353c37;padding:20px;border-radius:3px 14px 14px 3px;border-left:4px solid #a18d61}.story-letter p,.story-letter small,.story-letter .eyebrow{color:#41483f}.story-badges{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}.story-badge{display:flex;align-items:center;gap:13px;padding:18px;border:1px solid var(--line);border-radius:13px;color:var(--muted)}.story-badge small{display:block;margin-top:5px}.story-badge.earned{border-color:#9b8554;color:#ecdcba;background:#302e26}.story-medal{font-size:30px}.story-alternatives{margin-top:25px;border-top:1px solid var(--line);padding-top:20px}.story-alternatives small{display:block;margin:10px 0 18px}.story-intro h3{font-size:26px}.story-teaser{margin-top:18px;border-color:#7a694d}.story-teaser h3{margin:10px 0}.story-card .row small{white-space:normal}
@media(max-width:760px){.story-badges{grid-template-columns:1fr}.story-hero{padding:23px}.story-card{padding:19px}}

/* District navigation remains useful without WebGL. */
.district-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.district-heading h2{margin:7px 0}.district-heading p,.district-zones p{color:var(--muted);font-size:13px;line-height:1.6}.district-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(230px,1fr);gap:22px}.district-map-card{padding:14px}.district-map{width:100%;height:auto;display:block}.district-map a{cursor:pointer}.district-map a:focus{outline:3px solid #dd753f}.district-map-card small{display:block;line-height:1.6;color:var(--muted);padding:8px}.district-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;padding:12px 8px}.district-red{color:#c64f38}.district-call{margin:12px 0}.district-call p{font-size:13px}.district-call small{display:block;color:var(--muted);margin:12px 0}.district-zones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:24px}.incident-location{font-size:13px;color:var(--muted);line-height:1.8}
@media(max-width:1100px){.district-layout{grid-template-columns:1fr}.district-zones{grid-template-columns:repeat(2,minmax(0,1fr))}.district-heading{align-items:flex-start;flex-direction:column}}@media(max-width:560px){.district-zones{grid-template-columns:1fr}}

/* Readable site records and task-driven scene feedback. */
.detail-summary{margin:16px 0;padding:15px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.detail-summary>strong{display:block;margin:9px 0;font-size:14px}.detail-summary p{font-size:12px;line-height:1.6;color:var(--muted);margin:7px 0 12px}.site-directory{margin:24px 0;padding:18px;border:1px solid var(--line);border-radius:14px}.site-directory summary{cursor:pointer;font-weight:600;font-size:14px}.site-directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}.site-directory-item{padding:12px;text-align:left;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:inherit;cursor:pointer;font:inherit}.site-directory-item strong{font-size:13px;display:block}.site-directory-item small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.site-directory-item:focus-visible{outline:3px solid #e69557}.site-record-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;margin:20px 0}.site-plan{width:100%;display:block;max-height:330px}.site-plan-legend{font-size:11px;line-height:1.7;color:var(--muted)}.site-facts{margin:0}.site-facts div{padding:8px 0;border-bottom:1px solid var(--line)}.site-facts dt{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.site-facts dd{margin:4px 0;font-size:13px;line-height:1.5}.site-live{margin-top:20px}.site-task-list>div{display:flex;justify-content:space-between;gap:15px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px}.site-live .muted{font-size:12px;line-height:1.7}@media(max-width:680px){.site-record-grid{grid-template-columns:1fr}.site-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.site-directory-grid{grid-template-columns:1fr}}

.partners-panel{margin:24px 0;padding-top:16px;border-top:1px solid var(--line)}.partners-panel h3{font-size:14px}.partners-panel>.muted,.partners-panel .muted{font-size:12px;line-height:1.6}.partners-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:12px}.partner-card{padding:13px;border:1px solid var(--line);border-radius:10px;background:var(--surface2)}.partner-card>small{display:block;font-size:11px;color:var(--muted);line-height:1.6}.partner-card p{font-size:13px;margin:8px 0;color:var(--amber)}.partner-card button{margin:10px 0 4px}.partner-note{font-size:11px;line-height:1.6;color:var(--muted)}#joint-alarm-form fieldset{border:1px solid var(--line);border-radius:10px;margin:16px 0;padding:14px}#joint-alarm-form legend{padding:0 8px;color:var(--muted);font-size:12px}.support-report{padding:12px 0;border-bottom:1px solid var(--line)}.support-report p{font-size:12px;color:var(--muted)}
