/*
 * Copyright (c) 2026 Michael C. Pfau. All rights reserved.
 * Proprietary. Use requires prior written consent.
 */

@font-face {
  font-family: "GT Ultra Median";
  src: url("assets/brand/fonts/GT-Ultra-Median-Regular.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "GT Ultra Median";
  src: url("assets/brand/fonts/GT-Ultra-Median-Bold.otf") format("opentype");
  font-weight: 700;
}

@font-face {
  font-family: "Diatype";
  src: url("assets/brand/fonts/ABCDiatype-Regular.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "Diatype";
  src: url("assets/brand/fonts/ABCDiatype-Bold.otf") format("opentype");
  font-weight: 700;
}

@font-face {
  font-family: "Diatype Semi Mono Condensed";
  src: url("assets/brand/fonts/ABCDiatypeSemi-MonoCondensed-Medium.otf") format("opentype");
  font-weight: 600;
}

:root {
  color-scheme: dark;
  --brand-pine: #273029;
  --brand-pine-light: #3d453f;
  --brand-pine-dark: #1f2621;
  --brand-granite: #5c664b;
  --brand-granite-light: #767e68;
  --brand-granite-dark: #3b4230;
  --brand-lichen: #e9ece1;
  --brand-lichen-light: #f4f5f0;
  --brand-lichen-dark: #d1d4c5;
  --brand-zest: #d2f2b8;
  --brand-zest-light: #ebffda;
  --brand-zest-dark: #bcfa93;
  --brand-larch: #e7d5ba;
  --brand-terracotta: #ab866d;
  --brand-glacier: #c1ccf5;
  --brand-slate: #a0b0a6;
  --brand-black: #000000;
  --brand-white: #ffffff;
  --bg: #000000;
  --surface: #070807;
  --surface-soft: #111410;
  --surface-raised: #151914;
  --text: #f4f5f0;
  --heading: #f4f5f0;
  --muted: #a0b0a6;
  --line: #273029;
  --line-strong: #5c664b;
  --primary: #e9ece1;
  --primary-soft: #d2f2b8;
  --on-primary: #000000;
  --danger: #d98278;
  --focus: #c1ccf5;
  --pine: #273029;
  --pine-dark: #1f2621;
  --pine-light: #3d453f;
  --granite: #5c664b;
  --granite-light: #767e68;
  --lichen: #e9ece1;
  --lichen-light: #f4f5f0;
  --zest: #d2f2b8;
  --zest-dark: #bcfa93;
  --larch: #e7d5ba;
  --terracotta: #ab866d;
  --glacier: #c1ccf5;
  --slate: #a0b0a6;
  --chrome-height: 114px;
  --outer: #5c664b;
  --touch: #767e68;
  --trap: #1f2621;
  --topo: #273029;
  --nfc: #ab866d;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f0;
  --surface: #ffffff;
  --surface-soft: #e9ece1;
  --surface-raised: #d1d4c5;
  --text: #273029;
  --heading: #273029;
  --muted: #5c664b;
  --line: #d1d4c5;
  --line-strong: #767e68;
  --primary: #273029;
  --primary-soft: #3d453f;
  --on-primary: #f4f5f0;
  --danger: #ab866d;
  --focus: #5c664b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Diatype", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label.file-action {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: var(--bg);
}

.admin-page .app-shell {
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  min-width: 0;
}

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

h1 {
  color: var(--heading);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  color: var(--heading);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

h3 {
  color: var(--heading);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.top-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button,
.icon-button,
.segment-toggle,
.timeline-filter,
.view-toggle,
.playback-button,
.back-button,
.content-tab,
.mode-toggle,
.display-toggle,
.user-layout-toggle,
.admin-logout-button,
.user-nav-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.button {
  padding: 0 12px;
}

.button:hover,
.icon-button:hover,
.segment-toggle:hover,
.timeline-filter:hover,
.view-toggle:hover,
.playback-button:hover,
.back-button:hover,
.content-tab:hover,
.mode-toggle:hover,
.display-toggle:hover,
.user-layout-toggle:hover,
.touch-span-toggle:hover,
.admin-logout-button:hover,
.user-nav-action:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.button.danger {
  color: var(--danger);
}

.button.compact {
  min-width: 64px;
}

.icon-button {
  width: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.view-switch,
.segmented-control,
.timeline-filters,
.content-tabs,
.mode-switch,
.display-switch,
.user-layout-switch,
.touch-span-switch {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  flex-wrap: wrap;
}

.view-toggle,
.segment-toggle,
.timeline-filter,
.content-tab,
.mode-toggle,
.display-toggle,
.user-layout-toggle,
.touch-span-toggle {
  min-width: 0;
  min-height: 28px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-toggle.active,
.segment-toggle.active,
.timeline-filter.active,
.content-tab.active,
.mode-toggle.active,
.display-toggle.active,
.user-layout-toggle.active,
.touch-span-toggle.active {
  background: var(--lichen);
  border-color: var(--lichen);
  color: #000000;
}

.switch-label {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.contextbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.admin-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--bg);
}

.admin-sidebar {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, var(--surface-soft));
}

.admin-sidebar-home {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.admin-sidebar-home:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.admin-sidebar-nav {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 22px;
}

.admin-sidebar-section {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.admin-sidebar-label,
.admin-sidebar-note span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.admin-sidebar .view-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-sidebar .view-toggle {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
}

.admin-sidebar .view-toggle.active {
  border-color: var(--primary);
}

.admin-sidebar .admin-route-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-sidebar .admin-route-link:hover {
  border-color: var(--line);
  background: var(--surface-strong);
}

.admin-sidebar-note {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-sidebar-note strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.admin-session-note {
  align-self: end;
}

.admin-logout-button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
}

.admin-content {
  min-width: 0;
  min-height: 0;
}

.back-button {
  min-width: 64px;
  padding: 0 12px;
}

.content-tabs {
  min-width: 0;
  justify-self: start;
  max-width: 100%;
  overflow-x: auto;
}

.mode-switch,
.user-layout-switch {
  justify-self: end;
}

.content-tab,
.mode-toggle,
.user-layout-toggle {
  white-space: nowrap;
}

.dashboard-mode .contextbar {
  display: none;
}

.planner-modebar {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-mode .top-actions > #exportBtn,
.dashboard-mode .top-actions > .file-action,
.dashboard-mode .top-actions > #resetBtn {
  display: none;
}

.dashboard-view {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px;
  background: var(--bg);
}

.dashboard-intro {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px 22px;
  border-bottom: 1px solid var(--line);
}

.dashboard-eyebrow,
.dashboard-card-kicker {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-intro h2 {
  max-width: 18ch;
  margin-top: 10px;
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 42px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.dashboard-intro p:not(.dashboard-eyebrow) {
  max-width: 680px;
  margin-top: 12px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.42;
}

.dashboard-state {
  min-width: min(320px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  text-transform: uppercase;
}

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

.dashboard-card {
  min-width: 0;
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.dashboard-card h3 {
  margin-top: 10px;
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 26px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.dashboard-card p:not(.dashboard-card-kicker) {
  margin-top: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.42;
}

.dashboard-card-footer,
.dashboard-card-actions {
  display: grid;
  gap: 10px;
}

.dashboard-card-footer span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-card .button,
.dashboard-card .file-action {
  width: 100%;
}

.metrics-view,
.realtime-view {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px;
  background: var(--bg);
}

.metrics-panel,
.realtime-panel {
  min-height: min(620px, calc(100vh - 140px));
  padding: 14px;
}

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

.realtime-heading {
  gap: 20px;
  margin-bottom: 14px;
}

.realtime-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.realtime-heading-actions > span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.realtime-status-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.realtime-status-metric {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
}

.realtime-status-metric:last-child {
  border-right: 0;
}

.realtime-status-metric span,
.realtime-status-metric strong {
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.realtime-status-metric span {
  color: var(--muted);
}

.realtime-status-metric strong,
.realtime-status-metric.is-healthy strong {
  color: var(--brand-zest);
}

.realtime-status-metric.is-attention strong {
  color: var(--danger);
}

:root[data-theme="light"] .realtime-status-metric strong,
:root[data-theme="light"] .realtime-status-metric.is-healthy strong {
  color: var(--brand-pine);
}

.realtime-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-width: 0;
  min-height: 190px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.metric-card span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 46px;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.metric-card p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.42;
}

.realtime-card {
  grid-column: span 4;
  min-width: 0;
  min-height: 210px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.realtime-card-weather {
  grid-column: span 8;
}

.realtime-card-daylight {
  grid-column: span 4;
}

.realtime-card-train-times {
  grid-column: span 7;
}

.realtime-card-traffic {
  grid-column: span 5;
}

.realtime-card-lift-operations {
  grid-column: 1 / -1;
}

.realtime-card-heading {
  display: grid;
  gap: 8px;
}

.realtime-card-heading-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.realtime-card-heading span,
.realtime-card-meta span,
.realtime-card-meta strong,
.realtime-card-meta a,
.realtime-feed-status {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.realtime-card h3 {
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 24px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.realtime-card p,
.realtime-current-copy span,
.realtime-daylight-primary span,
.realtime-feed-message span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.42;
}

.realtime-feed-status {
  padding: 5px 8px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.realtime-feed-status.is-live,
.realtime-feed-status.is-refreshing {
  color: var(--brand-zest);
  border-color: var(--brand-granite-light);
}

.realtime-feed-status.is-stale,
.realtime-feed-status.is-unavailable {
  color: var(--danger);
}

.realtime-weather,
.realtime-daylight,
.realtime-departures,
.realtime-mountains,
.realtime-portals,
.realtime-feed-message {
  min-width: 0;
}

.realtime-weather {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.8fr);
  gap: 20px;
}

.realtime-weather-current {
  display: grid;
  align-content: start;
  gap: 12px;
}

.realtime-primary-reading {
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 0.9;
}

.realtime-current-copy {
  display: grid;
  gap: 3px;
}

.realtime-current-copy b {
  color: var(--brand-glacier);
  font-size: 15px;
}

.realtime-current-copy span {
  color: var(--muted);
  font-size: 13px;
}

.realtime-forecast {
  display: grid;
  align-content: start;
}

.realtime-forecast-day {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(90px, 1fr) auto 62px;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.realtime-forecast-day:first-child {
  padding-top: 0;
}

.realtime-forecast-day:last-child {
  border-bottom: 0;
}

.realtime-forecast-day span {
  color: var(--muted);
}

.realtime-daylight {
  display: grid;
  align-content: start;
  gap: 14px;
}

.realtime-daylight-primary {
  display: grid;
  gap: 4px;
}

.realtime-daylight-primary .daylight-duration {
  font-size: 44px;
}

.realtime-daylight-primary span {
  color: var(--muted);
}

.realtime-daylight-track {
  height: 6px;
  overflow: hidden;
  background: var(--brand-pine-light);
}

.realtime-daylight-track span {
  display: block;
  height: 100%;
  background: var(--brand-larch);
}

.realtime-key-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.realtime-key-value {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px;
  background: var(--surface-soft);
}

.realtime-key-value span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
}

.realtime-key-value strong {
  font-size: 15px;
}

.realtime-departures {
  display: grid;
  align-content: start;
}

.realtime-data-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(120px, 1fr) 58px 78px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.realtime-data-row:last-child {
  border-bottom: 0;
}

.realtime-data-header {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
}

.realtime-destination {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.realtime-destination b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realtime-destination small,
.realtime-data-row > span:not(.realtime-destination) {
  color: var(--muted);
}

.realtime-data-row .is-attention {
  color: var(--danger);
}

.realtime-mountains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.realtime-mountain {
  min-width: 0;
}

.realtime-mountain + .realtime-mountain {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.realtime-mountain-heading,
.realtime-lift-row,
.realtime-portal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.realtime-mountain-heading {
  margin-bottom: 8px;
}

.realtime-mountain-heading h4 {
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 20px;
}

.realtime-mountain-heading strong,
.realtime-lift-row > strong,
.realtime-portal-heading span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
}

.realtime-mountain-heading .is-open,
.realtime-lift-row > .is-open,
.realtime-portal-heading .is-clear {
  color: var(--brand-zest);
}

.realtime-mountain-heading .is-partial,
.realtime-portal-heading .is-moderate,
.realtime-lift-row > .is-preparation {
  color: var(--brand-larch);
}

.realtime-mountain-heading .is-closed,
.realtime-mountain-heading .is-seasonal-closure,
.realtime-portal-heading .is-heavy {
  color: var(--danger);
}

.realtime-lift-list {
  display: grid;
}

.realtime-lift-row {
  display: grid;
  grid-template-columns: 8px minmax(130px, 1fr) 90px 76px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.realtime-lift-row > span:not(.realtime-state-dot) {
  color: var(--muted);
  text-align: right;
}

.realtime-state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.realtime-state-dot.is-open {
  background: var(--brand-zest);
}

.realtime-state-dot.is-preparation {
  background: var(--brand-larch);
}

.realtime-state-dot.is-closed,
.realtime-state-dot.is-disabled {
  background: var(--danger);
}

.realtime-portals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.realtime-portal {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.realtime-portal p {
  min-height: 38px;
  color: var(--muted);
  font-size: 13px;
}

.realtime-portal-readings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.realtime-feed-message {
  display: grid;
  align-content: start;
  gap: 6px;
}

.realtime-feed-message span {
  color: var(--muted);
  font-size: 12px;
}

.realtime-card-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.realtime-card-meta a {
  max-width: 60%;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: right;
}

.realtime-card-meta strong,
.realtime-card-meta a {
  color: var(--brand-zest);
}

:root[data-theme="light"] .realtime-card-meta strong,
:root[data-theme="light"] .realtime-card-meta a,
:root[data-theme="light"] .realtime-feed-status.is-live,
:root[data-theme="light"] .realtime-feed-status.is-refreshing,
:root[data-theme="light"] .realtime-mountain-heading .is-open,
:root[data-theme="light"] .realtime-lift-row > .is-open,
:root[data-theme="light"] .realtime-portal-heading .is-clear {
  color: var(--brand-pine);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  background: var(--bg);
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.map-panel,
.editor-panel,
.timeline-panel {
  padding: 14px;
}

.timeline-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

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

.table-canvas {
  width: 100%;
  max-width: min(740px, 72vh);
  margin: 0 auto;
  aspect-ratio: 1;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--line);
  border-radius: 4px;
}

#tableSvg {
  width: 100%;
  height: 100%;
  display: block;
}

.ring-segment {
  stroke: #000000;
  stroke-width: 4;
  cursor: pointer;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.ring-segment:hover {
  opacity: 0.92;
}

.ring-segment.selected {
  stroke: var(--zest);
  stroke-width: 8;
}

.ring-segment.dimmed,
.nfc-marker.dimmed,
.nfc-label.dimmed,
.contour.dimmed,
.zone-boundary.dimmed {
  opacity: 0.16;
}

.status-planned {
  opacity: 0.76;
}

.status-active {
  opacity: 1;
}

.status-blocked {
  opacity: 0.94;
  stroke: var(--danger);
}

.status-done {
  opacity: 0.56;
}

.segment-label,
.nfc-label,
.center-label {
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-weight: 600;
}

.segment-label {
  fill: rgba(244, 245, 240, 0.9);
  font-size: 22px;
}

.nfc-marker {
  cursor: pointer;
  stroke: #000000;
  stroke-width: 5;
}

.nfc-marker.selected {
  stroke: var(--zest);
}

.nfc-label {
  fill: #000000;
  font-size: 20px;
}

.contour {
  fill: none;
  stroke: rgba(244, 245, 240, 0.28);
  stroke-width: 2.2;
  pointer-events: none;
}

.zone-boundary {
  fill: none;
  stroke: rgba(193, 204, 245, 0.16);
  stroke-width: 1.6;
  pointer-events: none;
}

.table-reference-chord,
.table-reference-axis,
.table-origin-mark,
.side-meridian-line,
.compass-arrow,
.compass-arrowhead,
.compass-label,
.degree-mark,
.degree-mark-label,
.side-name-label {
  pointer-events: none;
}

.table-reference-chord {
  stroke: rgba(244, 245, 240, 0.82);
  stroke-width: 5;
  opacity: 0.9;
}

.table-reference-axis {
  stroke: rgba(244, 245, 240, 0.76);
  stroke-width: 5;
  stroke-linecap: round;
}

.degree-mark {
  stroke: rgba(244, 245, 240, 0.58);
  stroke-linecap: round;
}

.degree-mark.minor {
  stroke-width: 2;
}

.degree-mark.major {
  stroke-width: 4;
}

.degree-mark-label {
  fill: rgba(244, 245, 240, 0.72);
  stroke: #000000;
  stroke-width: 5;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.table-origin-mark {
  stroke: rgba(244, 245, 240, 0.78);
  stroke-width: 3;
}

.side-meridian-line {
  stroke: var(--glacier);
  stroke-width: 5;
  stroke-dasharray: 20 12;
  opacity: 0.92;
}

.side-name-label {
  fill: var(--glacier);
  stroke: #000000;
  stroke-width: 6;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.compass-arrow {
  stroke: #ff3b30;
  stroke-width: 8;
  stroke-linecap: round;
}

.compass-arrowhead {
  fill: #ff3b30;
}

.compass-label {
  fill: #ff3b30;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
}

.user-zone,
.user-zone-boundary,
.user-zone-label {
  pointer-events: none;
}

.user-zone {
  stroke: rgba(244, 245, 240, 0.5);
  stroke-width: 2;
  opacity: 0.32;
}

.user-zone.zone-1 {
  fill: #c1ccf5;
}

.user-zone.zone-2 {
  fill: #d2f2b8;
}

.user-zone.zone-3 {
  fill: #e7d5ba;
}

.user-zone.zone-4 {
  fill: #ab866d;
}

.user-zone-boundary {
  stroke: rgba(244, 245, 240, 0.92);
  stroke-width: 7;
  stroke-dasharray: 18 13;
  opacity: 0.8;
}

.user-zone-label {
  fill: var(--lichen-light);
  stroke: #000000;
  stroke-width: 5;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.center-label {
  fill: rgba(244, 245, 240, 0.46);
  font-size: 28px;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.side-name-controls {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) repeat(2, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.orientation-controls {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(130px, 180px) auto minmax(220px, 1.4fr);
  gap: 10px;
  align-items: end;
  margin-top: 8px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.orientation-controls label {
  min-width: 0;
}

.orientation-legend {
  align-self: center;
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  text-transform: uppercase;
}

.toggle-control {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
}

.toggle-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--zest);
}

.touch-template-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.touch-span-switch {
  justify-self: end;
}

.app-footer {
  padding: 12px 16px 16px;
  color: var(--muted);
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.app-footer.admin-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  text-align: left;
}

.footer-language {
  display: block;
  min-width: 0;
}

.footer-language select {
  width: auto;
  min-width: 126px;
  min-height: 36px;
  padding: 0 30px 0 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.touch-template {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.touch-template-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.touch-template-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(280px, 0.65fr);
  gap: 12px;
  align-items: start;
}

.touch-arc-preview {
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #000000;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}

.touch-arc-svg {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
}

.touch-arc-surface {
  fill: rgba(118, 126, 104, 0.54);
  stroke: var(--zest);
  stroke-width: 5;
}

.touch-arc-element {
  cursor: pointer;
}

.touch-arc-element.is-selected rect {
  stroke: var(--zest);
}

.touch-arc-title.touch-arc-element.is-selected,
.touch-arc-description.touch-arc-element.is-selected {
  fill: var(--zest);
}

.touch-arc-thumbnail,
.touch-arc-action-button,
.touch-arc-back-button {
  stroke: rgba(244, 245, 240, 0.48);
  stroke-width: 1.4;
}

.touch-arc-thumbnail {
  fill: rgba(0, 0, 0, 0.82);
}

.touch-arc-action-button {
  fill: var(--lichen);
}

.touch-arc-back-button {
  fill: rgba(0, 0, 0, 0.86);
}

.touch-arc-kicker,
.touch-arc-thumbnail-label,
.touch-arc-title,
.touch-arc-description,
.touch-arc-back-label,
.touch-arc-button-label,
.template-mode-pill {
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-weight: 600;
}

.touch-arc-kicker,
.template-mode-pill {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  text-transform: uppercase;
}

.touch-arc-kicker {
  fill: rgba(244, 245, 240, 0.72);
  font-size: 9px;
}

.touch-arc-thumbnail-label {
  fill: var(--lichen-light);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.touch-arc-title {
  fill: var(--lichen-light);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.touch-arc-description {
  fill: rgba(244, 245, 240, 0.78);
  font-size: 11px;
}

.touch-arc-back-label,
.touch-arc-button-label {
  text-anchor: middle;
  dominant-baseline: central;
  font-size: 10px;
}

.touch-arc-back-label {
  fill: var(--lichen-light);
}

.touch-arc-button-label {
  fill: #000000;
}

.template-mode-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--lichen);
  background: #000000;
  text-align: center;
  overflow-wrap: anywhere;
}

.touch-template-controls {
  display: grid;
  gap: 10px;
}

.touch-template-description textarea {
  min-height: 92px;
}

.placement-controls {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #000000;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.cms-view {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  background: var(--bg);
}

.cms-form-panel,
.cms-list-panel {
  padding: 14px;
}

.cms-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cms-field-wide {
  grid-column: 1 / -1;
}

.experience-list {
  display: grid;
  gap: 8px;
}

.experience-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.experience-copy {
  min-width: 0;
}

.experience-copy strong,
.experience-copy span,
.experience-copy p {
  display: block;
  overflow-wrap: anywhere;
}

.experience-copy strong {
  margin-bottom: 4px;
  color: var(--heading);
  font-size: 15px;
  line-height: 1.25;
}

.experience-copy span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.experience-copy p,
.experience-empty {
  color: rgba(244, 245, 240, 0.74);
  font-size: 13px;
  line-height: 1.35;
}

.experience-actions {
  display: flex;
  gap: 8px;
}

.experience-empty {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.legend-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 2px;
}

.legend-item span:last-child {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.field-stack {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
label.file-action:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(193, 204, 245, 0.18);
}

input[readonly] {
  background: var(--surface);
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.nfc-controls {
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.timeline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) minmax(140px, 0.9fr) 88px 112px 68px;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.timeline-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 6px;
}

.phase-column {
  min-height: 124px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.phase-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.phase-card {
  width: 100%;
  display: block;
  margin-bottom: 6px;
  padding: 8px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
}

.phase-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.phase-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.timeline-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 96px 34px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.phase-pill,
.status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.phase-pill {
  background: var(--surface);
  color: var(--heading);
}

.status-pill {
  color: var(--muted);
  background: var(--surface);
}

.status-pill.active {
  color: var(--zest);
  border-color: var(--granite-light);
}

.status-pill.blocked {
  color: var(--danger);
  border-color: var(--terracotta);
}

.status-pill.done {
  color: var(--lichen);
  border-color: var(--slate);
}

.timeline-copy {
  min-width: 0;
  cursor: pointer;
}

.timeline-copy strong {
  display: block;
  margin-bottom: 3px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.timeline-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.delete-event {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--danger);
  cursor: pointer;
  font-size: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.playback-view {
  min-height: calc(100vh - var(--chrome-height));
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

.playback-stage {
  min-height: calc(100vh - var(--chrome-height));
  display: grid;
  grid-template-columns: minmax(250px, 380px) minmax(360px, 680px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 22px 44px;
  align-items: center;
  justify-content: center;
  padding: 28px 48px;
  background: var(--bg);
}

.playback-stage > * {
  min-width: 0;
}

.display-switch {
  grid-column: 1 / 3;
  grid-row: 1;
  justify-self: end;
}

.brand-logotype {
  grid-column: 1;
  grid-row: 2;
  width: 190px;
  max-width: 100%;
  height: auto;
  align-self: start;
}

.playback-copy {
  grid-column: 1;
  grid-row: 3;
  align-self: center;
  max-width: 380px;
}

#playbackPhase {
  margin-bottom: 10px;
  color: rgba(233, 236, 225, 0.64);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
}

.playback-copy h2 {
  max-width: 13ch;
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 46px;
  line-height: 1.02;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.playback-copy p {
  color: var(--muted);
}

#playbackTarget {
  max-width: 36ch;
  margin-top: 12px;
  font-size: 14px;
}

#playbackSvg {
  grid-column: 2;
  grid-row: 2 / 4;
  width: min(68vmin, 680px);
  height: min(68vmin, 680px);
  display: block;
  justify-self: center;
  overflow: visible;
}

.playback-controls {
  grid-column: 2;
  grid-row: 4;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

.playback-button {
  min-width: 72px;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
}

.playback-button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.playback-rail {
  grid-column: 1;
  grid-row: 4;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  gap: 8px;
}

.playback-rail-item {
  min-height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(233, 236, 225, 0.24);
  cursor: pointer;
}

.playback-rail-item.active {
  background: var(--lichen);
}

.playback-ring {
  stroke: #000000;
  stroke-width: 4;
  opacity: 0.32;
  cursor: pointer;
  transition: opacity 180ms ease, stroke 180ms ease;
}

.playback-ring.is-current,
.playback-nfc.is-current {
  opacity: 1;
  stroke: var(--lichen);
}

.playback-ring.is-past,
.playback-nfc.is-past {
  opacity: 0.62;
}

.playback-label,
.playback-nfc-label {
  fill: rgba(244, 245, 240, 0.84);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-weight: 600;
}

.playback-label {
  font-size: 24px;
}

.playback-label.is-current {
  fill: #000000;
}

.playback-label.is-muted {
  opacity: 0.24;
}

.playback-contour {
  fill: none;
  stroke: rgba(244, 245, 240, 0.25);
  stroke-width: 2.1;
  pointer-events: none;
}

.playback-zone-boundary {
  fill: none;
  stroke: rgba(193, 204, 245, 0.13);
  stroke-width: 1.4;
  pointer-events: none;
}

.playback-core {
  fill: rgba(233, 236, 225, 0.04);
  stroke: rgba(233, 236, 225, 0.2);
  stroke-width: 1;
}

.playback-nfc {
  stroke: rgba(244, 245, 240, 0.72);
  stroke-width: 5;
  opacity: 0.54;
  cursor: pointer;
}

.playback-nfc-label {
  fill: #000000;
  font-size: 20px;
}

body.playback-mode {
  background: var(--bg);
}

body.playback-mode .topbar,
body.playback-mode .contextbar {
  background: var(--bg);
  border-bottom-color: var(--line);
}

body.playback-mode h1 {
  color: var(--heading);
}

body.playback-mode .brand p {
  color: var(--muted);
}

body.playback-mode #exportBtn,
body.playback-mode .file-action,
body.playback-mode #resetBtn {
  display: none;
}

body.playback-circular-mode {
  overflow: hidden;
}

body.playback-circular-mode .topbar,
body.playback-circular-mode .admin-sidebar,
body.playback-circular-mode .contextbar,
body.playback-circular-mode .display-switch,
body.playback-circular-mode .brand-logotype,
body.playback-circular-mode .playback-copy,
body.playback-circular-mode .playback-controls,
body.playback-circular-mode .playback-rail,
body.playback-circular-mode .app-footer {
  display: none !important;
}

body.playback-circular-mode .app-shell {
  grid-template-rows: 1fr;
}

body.playback-circular-mode .admin-layout {
  min-height: 100vh;
  display: block;
}

body.playback-circular-mode .admin-content {
  min-height: 100vh;
}

body.playback-circular-mode .playback-view,
body.playback-circular-mode .playback-stage {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background: #000000;
}

body.playback-circular-mode .playback-stage {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  padding: 0;
}

body.playback-circular-mode #playbackSvg {
  grid-column: 1;
  grid-row: 1;
  width: min(96vw, 96vh);
  height: min(96vw, 96vh);
  max-width: none;
}

.theme-logo-light {
  display: none;
}

:root[data-theme="light"] .theme-logo-dark {
  display: none;
}

:root[data-theme="light"] .theme-logo-light {
  display: block;
}

.theme-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.theme-icon-toggle {
  width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-icon-toggle:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.theme-icon-toggle-glyph {
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

:root[data-theme="light"] .theme-icon-toggle-glyph {
  background: linear-gradient(90deg, transparent 50%, currentColor 50%);
}

.landing-page {
  min-height: 100vh;
  background: var(--bg);
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--text);
}

.landing-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  background: color-mix(in srgb, var(--bg) 94%, var(--surface-soft));
  border-bottom: 1px solid var(--line);
}

.landing-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.landing-brand img {
  width: 184px;
  max-width: 100%;
  height: auto;
}

.landing-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
}

.landing-nav-divider {
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0 6px;
  background: var(--line);
}

.landing-tab,
.landing-login,
.landing-icon-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.landing-tab {
  padding: 0 12px;
}

.landing-tab:hover,
.landing-login:hover,
.landing-icon-button:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.landing-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.landing-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.landing-carousel {
  position: relative;
  width: 100%;
  height: min(660px, calc(100vh - 72px));
  min-height: 480px;
  overflow: hidden;
  background: #000000;
  border-bottom: 1px solid var(--line);
}

.landing-carousel-video,
.landing-carousel-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.landing-carousel-video {
  object-fit: cover;
  background: #000000;
}

.landing-carousel-scrim {
  background: rgba(0, 0, 0, 0.34);
}

.landing-carousel-card {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1320px) / 2 + 24px));
  z-index: 2;
  width: min(450px, calc(100vw - 48px));
  min-height: 290px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(244, 245, 240, 0.34);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.66);
  transform: translateY(-50%);
}

:root[data-theme="light"] .landing-carousel-card {
  border-color: rgba(39, 48, 41, 0.24);
  background: rgba(244, 245, 240, 0.88);
}

.landing-carousel-category {
  width: fit-content;
  color: var(--brand-zest);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.95;
}

.landing-carousel-category:visited {
  color: var(--brand-zest);
  text-decoration: none;
}

.landing-carousel-category:hover {
  color: var(--brand-zest-light);
  text-decoration: none;
  opacity: 1;
}

.landing-carousel-category:focus-visible {
  color: var(--brand-zest-light);
  outline: 2px solid var(--brand-zest);
  outline-offset: 4px;
  text-decoration: none;
}

:root[data-theme="light"] .landing-carousel-category {
  color: var(--brand-pine);
}

:root[data-theme="light"] .landing-carousel-category:visited {
  color: var(--brand-pine);
  text-decoration: none;
}

:root[data-theme="light"] .landing-carousel-category:hover,
:root[data-theme="light"] .landing-carousel-category:focus-visible {
  color: var(--brand-pine);
  text-decoration: none;
}

.landing-carousel-card h1 {
  color: var(--brand-lichen-light);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

:root[data-theme="light"] .landing-carousel-card h1 {
  color: var(--brand-pine);
}

.landing-carousel-card p {
  color: var(--brand-lichen-light);
  font-size: 17px;
  line-height: 1.42;
}

:root[data-theme="light"] .landing-carousel-card p {
  color: var(--brand-pine);
}

.landing-carousel-cta {
  width: fit-content;
  min-width: 148px;
  margin-top: 6px;
}

.landing-carousel-controls {
  position: absolute;
  left: max(24px, calc((100vw - 1320px) / 2 + 24px));
  bottom: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.landing-carousel-control,
.landing-carousel-dot {
  min-height: 34px;
  border: 1px solid rgba(244, 245, 240, 0.32);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.56);
  color: var(--brand-lichen-light);
  cursor: pointer;
  font-weight: 700;
}

.landing-carousel-control {
  padding: 0 12px;
}

.landing-carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-carousel-dot {
  width: 34px;
  padding: 0;
}

.landing-carousel-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  display: block;
  margin: auto;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.46;
}

.landing-carousel-control:hover,
.landing-carousel-dot:hover,
.landing-carousel-dot.active {
  border-color: var(--brand-lichen-light);
}

.landing-carousel-dot.active::before {
  opacity: 1;
}

.landing-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.landing-icon-button {
  width: 36px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 17px;
}

.landing-main {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 24px 28px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 0.74fr);
  gap: 56px;
  align-items: center;
  min-height: 560px;
}

.landing-copy {
  min-width: 0;
}

.landing-eyebrow,
.landing-kicker {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
}

.landing-copy h2 {
  max-width: 11ch;
  margin-top: 18px;
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 58px;
  line-height: 0.98;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.landing-summary {
  max-width: 620px;
  margin-top: 22px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.38;
}

.landing-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 560px;
  margin-top: 34px;
}

.landing-highlight {
  min-height: 82px;
  display: grid;
  align-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.landing-highlight span,
.landing-detail-list span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.landing-highlight strong {
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

.landing-experience {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(220px, 0.72fr);
  gap: 20px;
  align-items: center;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.landing-media {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #000000;
}

.landing-table-image {
  width: 88%;
  height: 88%;
  object-fit: contain;
  opacity: 0.78;
  filter: invert(1) contrast(1.04);
}

:root[data-theme="light"] .landing-media {
  background: #ffffff;
}

:root[data-theme="light"] .landing-table-image {
  opacity: 0.72;
  filter: none;
}

.landing-flag {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: auto;
  opacity: 0.9;
}

.landing-detail {
  min-width: 0;
}

.landing-detail h2 {
  max-width: 12ch;
  margin-top: 12px;
  color: var(--heading);
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 32px;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.landing-detail p {
  margin-top: 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.landing-detail-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.landing-detail-list span {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.landing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.landing-offering-card {
  min-width: 0;
  min-height: 268px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.landing-offering-card img,
.landing-offering-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #000000;
}

.landing-offering-card img {
  object-fit: cover;
}

.landing-offering-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background: var(--brand-pine);
  color: var(--brand-zest);
  text-align: center;
}

.landing-offering-placeholder span,
.landing-offering-placeholder strong {
  display: block;
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.landing-offering-placeholder span {
  font-size: 12px;
  color: var(--brand-lichen-dark);
}

.landing-offering-placeholder strong {
  font-size: 18px;
  color: var(--brand-zest);
}

.landing-offering-card h3 {
  color: var(--heading);
  font-size: 15px;
}

.landing-offering-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.landing-offering-card .button {
  width: fit-content;
}

.landing-info-panel {
  position: fixed;
  top: 84px;
  right: 22px;
  z-index: 20;
  width: min(360px, calc(100vw - 44px));
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.landing-info-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-info-panel p {
  margin-top: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.landing-info-panel a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--text);
  font-weight: 700;
}

.landing-info-close {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.landing-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.landing-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-admin-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.landing-admin-link:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.auth-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.auth-shell {
  min-height: calc(100vh - 58px);
  width: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 42px 18px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
}

.auth-brand img {
  width: min(220px, 72vw);
  height: auto;
}

.auth-card {
  width: min(100%, 430px);
  display: grid;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-soft));
}

.auth-eyebrow {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.auth-card h1 {
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 44px;
  line-height: 0.98;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 12px;
}

.auth-form input:focus {
  border-color: var(--focus);
  outline: none;
}

.auth-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.auth-submit {
  min-height: 44px;
}

.auth-submit:disabled,
.admin-logout-button:disabled,
.user-nav-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.user-page {
  min-height: 100vh;
  background: var(--bg);
}

.user-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--text);
}

.user-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  background: color-mix(in srgb, var(--bg) 94%, var(--surface-soft));
  border-bottom: 1px solid var(--line);
}

.user-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.user-brand img {
  width: 184px;
  max-width: 100%;
  height: auto;
}

.user-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-nav a,
.user-nav-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.user-nav a:hover,
.user-nav-action:hover {
  border-color: var(--line-strong);
  color: var(--heading);
}

.user-dashboard {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  align-content: start;
  padding: 34px 24px 28px;
}

.user-welcome {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.user-eyebrow,
.itinerary-card span {
  color: var(--muted);
  font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.user-welcome h1 {
  max-width: 16ch;
  margin-top: 12px;
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 56px;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.user-welcome p:not(.user-eyebrow) {
  max-width: 640px;
  margin-top: 16px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.4;
}

.user-primary-action {
  flex: 0 0 auto;
}

.user-feed-section,
.suggestion-section {
  display: grid;
  gap: 12px;
}

.user-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.user-section-heading h2 {
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 32px;
  line-height: 1;
}

.itinerary-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.itinerary-card {
  min-width: 0;
  min-height: 250px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.itinerary-card h3 {
  margin-top: 12px;
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 26px;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.itinerary-card p {
  margin-top: 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.42;
}

.itinerary-card .button {
  width: fit-content;
}

.suggestion-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 320px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.suggestion-card {
  min-height: 190px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  scroll-snap-align: start;
}

.suggestion-card h3 {
  font-family: "GT Ultra Median", Georgia, serif;
  font-size: 22px;
}

.suggestion-card p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.42;
}

.suggestion-card .button {
  width: fit-content;
}

@media (max-width: 1040px) {
  .admin-layout {
    grid-template-columns: 196px minmax(0, 1fr);
  }

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

  .realtime-card,
  .realtime-card-weather,
  .realtime-card-daylight,
  .realtime-card-train-times,
  .realtime-card-traffic,
  .realtime-card-lift-operations {
    grid-column: 1 / -1;
  }

  .landing-carousel {
    height: min(620px, calc(100vh - 112px));
  }

  .landing-carousel-card {
    width: min(420px, calc(100vw - 48px));
  }

  .landing-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .landing-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .landing-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .itinerary-feed {
    grid-template-columns: 1fr;
  }

  .user-welcome {
    align-items: start;
    flex-direction: column;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 34px;
  }

  .landing-experience {
    grid-template-columns: minmax(260px, 0.7fr) minmax(260px, 1fr);
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .workspace,
  .cms-view {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    order: 2;
  }

  .timeline-panel {
    order: 3;
  }

  .timeline-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .button.compact {
    min-width: 100%;
  }

  .playback-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto auto;
    align-content: center;
    gap: 20px;
    padding: 28px 24px;
  }

  .display-switch,
  .brand-logotype,
  .playback-copy,
  #playbackSvg,
  .playback-rail,
  .playback-controls {
    grid-column: 1;
  }

  .display-switch {
    grid-row: 1;
    justify-self: stretch;
  }

  .brand-logotype {
    grid-row: 2;
    width: 178px;
  }

  .playback-copy {
    grid-row: 3;
    justify-self: stretch;
    max-width: none;
  }

  .playback-copy h2 {
    max-width: 18ch;
    font-size: 38px;
  }

  #playbackSvg {
    grid-row: 4;
    width: min(76vw, 600px);
    height: min(76vw, 600px);
  }

  .playback-rail {
    grid-row: 5;
  }

  .playback-controls {
    grid-row: 6;
    justify-self: stretch;
    max-width: none;
  }

  .playback-button {
    flex: 1;
  }
}

@media (max-width: 720px) {
  :root {
    --chrome-height: 218px;
  }

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

  .top-actions,
  .top-actions .button,
  .top-actions .file-action,
  .top-actions .theme-toggle {
    width: 100%;
  }

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

  .admin-sidebar {
    grid-template-rows: auto auto;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-sidebar .view-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-sidebar .view-toggle {
    justify-content: center;
  }

  .admin-sidebar-note {
    display: none;
  }

  .landing-main {
    padding: 26px 18px 24px;
  }

  .landing-carousel {
    height: 620px;
    min-height: 620px;
  }

  .landing-carousel-card {
    top: auto;
    bottom: 78px;
    min-height: 0;
    transform: none;
  }

  .landing-carousel-controls {
    bottom: 22px;
  }

  .landing-copy h2 {
    font-size: 44px;
  }

  .landing-summary {
    font-size: 18px;
  }

  .landing-experience {
    grid-template-columns: 1fr;
  }

  .landing-media {
    width: min(100%, 440px);
  }

  .landing-strip {
    grid-template-columns: 1fr;
  }

  .display-switch {
    display: grid;
  }

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

  .contextbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px 12px;
  }

  .content-tabs {
    justify-self: stretch;
  }

  .mode-switch,
  .user-layout-switch {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
  }

  .mode-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-layout-switch {
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
  }

  .mode-toggle,
  .user-layout-toggle {
    padding: 0 6px;
  }

  .workspace {
    padding: 10px;
    gap: 10px;
  }

  .dashboard-view {
    padding: 10px;
  }

  .dashboard-intro {
    align-items: start;
    flex-direction: column;
  }

  .dashboard-state {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .dashboard-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .realtime-status-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .realtime-status-metric:nth-child(2) {
    border-right: 0;
  }

  .realtime-status-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .realtime-weather,
  .realtime-mountains,
  .realtime-portals {
    grid-template-columns: 1fr;
  }

  .realtime-mountain + .realtime-mountain {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .realtime-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .realtime-forecast-day {
    grid-template-columns: 42px minmax(82px, 1fr) auto;
  }

  .realtime-forecast-day span:last-child {
    display: none;
  }

  .realtime-data-row {
    grid-template-columns: 50px minmax(110px, 1fr) 54px;
  }

  .realtime-data-row > :last-child {
    display: none;
  }

  .realtime-lift-row {
    grid-template-columns: 8px minmax(120px, 1fr) 68px;
  }

  .realtime-lift-row > :last-child {
    display: none;
  }

  .map-panel,
  .editor-panel,
  .timeline-panel,
  .cms-form-panel,
  .cms-list-panel,
  .metrics-panel,
  .realtime-panel {
    padding: 12px;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control,
  .timeline-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segment-toggle,
  .timeline-filter {
    width: 100%;
    padding: 0 6px;
  }

  .table-canvas {
    max-width: min(100%, calc(100vw - 72px));
  }

  .legend {
    grid-template-columns: 1fr;
  }

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

  .side-name-controls {
    grid-template-columns: 1fr;
  }

  .orientation-controls {
    grid-template-columns: 1fr;
  }

  .touch-template-actions {
    width: 100%;
    justify-content: space-between;
  }

  .touch-arc-preview,
  .touch-arc-svg {
    min-height: 0;
  }

  .cms-form,
  .experience-item {
    grid-template-columns: 1fr;
  }

  .experience-actions {
    justify-self: start;
  }

  .timeline-form {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 54px minmax(0, 1fr) 82px 34px;
    gap: 6px;
  }

  .playback-view,
  .playback-stage {
    min-height: calc(100vh - var(--chrome-height));
  }

  .playback-stage {
    gap: 18px;
    padding: 20px 16px 18px;
  }

  .brand-logotype {
    width: 156px;
  }

  .playback-copy h2 {
    font-size: 30px;
    max-width: 14ch;
  }

  #playbackSvg {
    width: min(84vw, 430px);
    height: min(84vw, 430px);
  }
}

@media (max-width: 560px) {
  .landing-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .landing-brand img {
    width: 156px;
  }

  .landing-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: start;
  }

  .landing-carousel {
    height: 590px;
    min-height: 590px;
  }

  .landing-carousel-card {
    left: 12px;
    bottom: 68px;
    width: calc(100vw - 24px);
    gap: 12px;
    padding: 16px;
  }

  .landing-carousel-card h1 {
    font-size: 36px;
  }

  .landing-carousel-card p {
    font-size: 15px;
  }

  .landing-carousel-controls {
    left: 12px;
    bottom: 16px;
    width: calc(100vw - 24px);
    justify-content: space-between;
  }

  .landing-carousel-dots {
    justify-content: center;
  }

  .landing-carousel-control {
    min-width: 64px;
    padding: 0 8px;
  }

  .landing-nav {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    justify-items: stretch;
    overflow-x: hidden;
  }

  .landing-nav-divider {
    display: none;
  }

  .landing-tab {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    padding: 0 5px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .landing-main {
    padding: 20px 12px 18px;
  }

  .admin-sidebar .view-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar .super-admin-section .view-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-copy h2 {
    font-size: 34px;
  }

  .landing-summary {
    font-size: 16px;
  }

  .landing-highlights {
    grid-template-columns: 1fr;
  }

  .landing-info-panel {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .landing-footer,
  .admin-footer,
  .user-header,
  .user-welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-header {
    padding: 12px;
  }

  .user-brand img {
    width: 156px;
  }

  .user-nav,
  .landing-footer-actions {
    width: 100%;
  }

  .footer-language,
  .footer-language select {
    width: 100%;
  }

  .user-nav a,
  .user-nav-action,
  .footer-language,
  .landing-admin-link {
    flex: 1;
  }

  .user-dashboard {
    padding: 24px 12px 20px;
  }

  .user-welcome h1 {
    font-size: 38px;
  }

  .user-welcome p:not(.user-eyebrow) {
    font-size: 16px;
  }

  .user-primary-action {
    width: 100%;
  }

  .suggestion-rail {
    grid-auto-columns: minmax(230px, 82vw);
  }

  .topbar {
    padding: 12px;
  }

  .top-actions {
    max-width: 100%;
  }

  .dashboard-intro h2 {
    font-size: 34px;
  }

  .dashboard-card {
    min-height: 220px;
  }

  .view-switch,
  .display-switch,
  .content-tabs,
  .mode-switch,
  .user-layout-switch,
  .touch-span-switch,
  .playback-controls {
    width: min(100%, calc(100vw - 24px));
    max-width: 100%;
    justify-self: start;
  }

  .contextbar {
    grid-template-columns: 1fr;
  }

  .back-button {
    min-width: 58px;
    justify-self: start;
  }

  .content-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mode-switch,
  .user-layout-switch {
    grid-column: auto;
  }

  .mode-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-layout-switch {
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
  }

  .content-tab,
  .mode-toggle,
  .user-layout-toggle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .content-tab,
  .mode-toggle,
  .view-toggle,
  .display-toggle,
  .user-layout-toggle,
  .touch-span-toggle {
    font-size: 10px;
    padding: 0 5px;
  }

  .content-tab {
    font-size: 9px;
    padding: 0 3px;
  }

  .mode-toggle,
  .user-layout-toggle,
  .touch-span-toggle,
  .switch-label {
    font-family: "Diatype Semi Mono Condensed", "Diatype", Inter, sans-serif;
  }

  .playback-copy h2 {
    font-size: 26px;
    max-width: 13ch;
  }

  .playback-stage {
    padding-right: 14px;
    padding-left: 14px;
  }

  #playbackSvg {
    width: min(78vw, 390px);
    height: min(78vw, 390px);
  }

  .table-canvas {
    max-width: min(100%, 376px);
  }

  body.playback-circular-mode #playbackSvg {
    width: min(92vw, 420px);
    height: min(92vw, 420px);
  }

  .playback-button {
    min-width: 0;
  }

  .timeline-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .status-pill,
  .delete-event {
    justify-self: start;
  }
}
