:root {
  --bg-start: #f6f2e9;
  --bg-end: #ece7dc;
  --glow-a: rgba(21, 94, 117, 0.18);
  --glow-b: rgba(15, 118, 110, 0.14);
  --panel: rgba(255, 252, 247, 0.86);
  --panel-strong: #fffaf1;
  --table-surface: rgba(255, 255, 255, 0.74);
  --thead-bg: rgba(30, 43, 36, 0.04);
  --badge-bg: rgba(30, 43, 36, 0.08);
  --badge-text: #1e2b24;
  --ink: #1e2b24;
  --muted: #5f675d;
  --line: rgba(34, 45, 38, 0.12);
  --accent: #0f766e;
  --accent-strong: #155e75;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --accent-soft-strong: rgba(15, 118, 110, 0.18);
  --diff-add: #22c55e;
  --diff-remove: #ef4444;
  --button-text: #ffffff;
  --shadow: 0 18px 40px rgba(32, 45, 38, 0.08);
  --urgency-red: #d25a4d;
  --urgency-yellow: #c28a25;
  --urgency-green: #2f855a;
}

html[data-theme="dark"] {
  --bg-start: #141a22;
  --bg-end: #0f1319;
  --glow-a: rgba(109, 151, 181, 0.16);
  --glow-b: rgba(72, 144, 166, 0.14);
  --panel: rgba(24, 33, 43, 0.86);
  --panel-strong: rgba(31, 42, 55, 0.96);
  --table-surface: rgba(17, 24, 32, 0.78);
  --thead-bg: rgba(240, 242, 244, 0.05);
  --badge-bg: rgba(240, 242, 244, 0.08);
  --badge-text: #f0f2f4;
  --ink: #f0f2f4;
  --muted: #a5b1bc;
  --line: rgba(226, 232, 240, 0.12);
  --accent: #6d97b5;
  --accent-strong: #4f728e;
  --accent-soft: rgba(109, 151, 181, 0.14);
  --accent-soft-strong: rgba(109, 151, 181, 0.22);
  --button-text: #f7fbff;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
  --urgency-red: #ff7b72;
  --urgency-yellow: #e3b341;
  --urgency-green: #56d364;
}

html[data-theme="slate"] {
  --bg-start: #0b1117;
  --bg-end: #081016;
  --glow-a: rgba(42, 168, 134, 0.2);
  --glow-b: rgba(49, 133, 158, 0.16);
  --panel: rgba(11, 23, 29, 0.9);
  --panel-strong: rgba(15, 28, 35, 0.96);
  --table-surface: rgba(9, 18, 24, 0.84);
  --thead-bg: rgba(153, 209, 206, 0.06);
  --badge-bg: rgba(153, 209, 206, 0.12);
  --badge-text: #99d1ce;
  --ink: #99d1ce;
  --muted: #6fa19e;
  --line: rgba(153, 209, 206, 0.12);
  --accent: #2aa886;
  --accent-strong: #1e7c6d;
  --accent-soft: rgba(42, 168, 134, 0.16);
  --accent-soft-strong: rgba(42, 168, 134, 0.24);
  --button-text: #f0fffc;
  --shadow: 0 24px 54px rgba(1, 8, 11, 0.34);
  --urgency-red: #ff8f84;
  --urgency-yellow: #d7ba7d;
  --urgency-green: #73c991;
}

html[data-theme="plum"] {
  --bg-start: #1a1b24;
  --bg-end: #13141b;
  --glow-a: rgba(189, 147, 249, 0.16);
  --glow-b: rgba(255, 121, 198, 0.12);
  --panel: rgba(28, 29, 40, 0.9);
  --panel-strong: rgba(36, 37, 50, 0.96);
  --table-surface: rgba(20, 21, 31, 0.82);
  --thead-bg: rgba(248, 248, 242, 0.05);
  --badge-bg: rgba(248, 248, 242, 0.08);
  --badge-text: #f8f8f2;
  --ink: #f8f8f2;
  --muted: #b8b4d0;
  --line: rgba(248, 248, 242, 0.1);
  --accent: #bd93f9;
  --accent-strong: #8a6acb;
  --accent-soft: rgba(189, 147, 249, 0.16);
  --accent-soft-strong: rgba(189, 147, 249, 0.24);
  --button-text: #ffffff;
  --shadow: 0 24px 54px rgba(10, 10, 18, 0.38);
  --urgency-red: #f28b82;
  --urgency-yellow: #e7c56d;
  --urgency-green: #73d7a4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 18%, var(--glow-a), transparent 34%),
    radial-gradient(circle at 82% 16%, var(--glow-b), transparent 30%),
    linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  transition: background 220ms cubic-bezier(0.2, 0.8, 0.2, 1), color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shell {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero,
.board {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 24px;
  padding: 32px;
  animation: reveal-up 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.eyebrow-meta {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 14ch;
}

.lede {
  margin-top: 12px;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
  font-weight: 400;
}

.hero-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

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

.hero-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.hero-toolbar.finance-toolbar {
  justify-content: center;
}

.hero-toolbar.finance-toolbar .pod-filters {
  justify-content: center;
}

.toolbar-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-cycle:hover,
.pill:hover {
  transform: translateY(-1px);
}

.theme-cycle svg {
  width: 100%;
  height: 100%;
}

.theme-inline {
  display: inline-flex;
  align-items: center;
  justify-self: end;
}

.pod-filters {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: start;
}

.filter-indicator {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 999px;
  background: var(--accent);
  will-change: transform, width, height;
  z-index: 0;
}

.pill {
  appearance: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 14px;
  transition: background 140ms cubic-bezier(0.2, 0.8, 0.2, 1), color 140ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  z-index: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-text);
}

.finance-compare-pill {
  margin-left: 8px;
  padding-left: 12px;
  padding-right: 12px;
  border-left: 2px solid var(--line);
  border-radius: 0 999px 999px 0;
}

.finance-compare-pill:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.theme-cycle {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms cubic-bezier(0.2, 0.8, 0.2, 1), color 140ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.board {
  margin-top: 20px;
  padding: 20px;
  animation: reveal-up 620ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms both;
  transition: background 180ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--table-surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  perspective: 1000px;
}

.board.finance-mode {
  background: var(--table-surface);
}

.board-header {
  display: grid;
  gap: 12px;
  margin: -20px -20px 16px -20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 22px 22px 0 0;
}

.board-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  width: 100%;
}

.board-heading h2 {
  min-width: 0;
}

.board.finance-mode .board-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.board-actions {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.board-controls {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.board-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  justify-self: end;
  font-weight: 500;
}

.board-note {
  color: var(--muted);
  text-align: left;
  max-width: none;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.board.finance-mode .board-note {
  color: var(--accent-strong);
}

.board-title-note {
  color: var(--accent-strong);
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.compare-button {
  appearance: none;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 12px;
  transition: background 140ms cubic-bezier(0.2, 0.8, 0.2, 1), color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare-button:hover {
  opacity: 0.9;
}

.compare-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.compare-button.subtle {
  background: var(--panel-strong);
  border-color: var(--line);
  color: var(--ink);
}

.control-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-color: rgba(34, 45, 38, 0.12);
}

.control-chip.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: var(--button-text);
}

.control-chip-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.control-chip-icon svg {
  width: 100%;
  height: 100%;
}

.control-chip-label {
  line-height: 1;
}

.flight-cell,
.gate-number-cell {
  font-variant-numeric: tabular-nums;
}

.flight-cell,
.gate-number-cell,
.time-cell {
  font-weight: 700;
}

.time-cell {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  min-width: 90px;
}

.time-cell.urgency-red,
.gate-badge.urgency-red {
  color: var(--urgency-red);
}

.time-cell.urgency-yellow,
.gate-badge.urgency-yellow {
  color: var(--urgency-yellow);
}

.time-cell.urgency-green,
.gate-badge.urgency-green {
  color: var(--urgency-green);
}

.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: border-color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.finance-plain {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.72;
  letter-spacing: 0.01em;
  overflow-x: auto;
  overflow-y: auto;
}

.finance-plain:not(.is-diff) {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  white-space: pre;
  overflow-x: auto;
}

.finance-plain.is-diff {
  padding: 0;
}

.finance-diff-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.finance-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.95rem;
}

.finance-diff-table thead th {
  padding: 14px 16px;
  background: var(--thead-bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.finance-diff-table thead th:last-child {
  border-right: none;
}

.finance-diff-table tbody td {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  height: auto;
  font-weight: 500;
  transition: background 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.finance-diff-table tbody td:last-child {
  border-right: none;
}

.finance-diff-flight {
  font-weight: 600;
  min-width: 80px;
}

.finance-diff-changes {
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.9rem;
  color: var(--ink);
  max-width: 400px;
  word-break: break-word;
}


.finance-plain.is-diff {
  white-space: normal;
}

.finance-table-line,
.finance-record-base,
.finance-overlay-line {
  display: block;
  white-space: pre;
}

.finance-table-line-header {
  color: var(--ink);
  font-weight: 700;
}

.finance-record {
  display: block;
}

.finance-record-base {
  color: var(--ink);
}

.finance-record-overlays {
  display: block;
}

.finance-overlay-line {
  position: relative;
}

.finance-overlay-line-added {
  color: var(--diff-add);
}

.finance-overlay-line-removed {
  color: var(--diff-remove);
}

.finance-stack {
  position: relative;
}

.finance-diff {
  margin-top: 10px;
  padding: 0 4px;
  color: var(--muted);
}

.finance-diff-head {
  display: block;
}

.finance-diff-kicker {
  display: none;
}

.finance-diff-head h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.finance-diff-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: left;
}

.finance-diff-summary {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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

.finance-diff-filters {
  display: grid;
  gap: 10px;
}

.finance-diff-filter-group {
  display: grid;
  gap: 8px;
}

.finance-diff-filter-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-diff-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.finance-diff-hide-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finance-diff-hide-checkboxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.finance-diff-hide-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.finance-diff-hide-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.finance-diff-chip {
  padding: 7px 11px;
  font-size: 0.76rem;
}

.finance-diff-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-text);
}

.finance-custom-range {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.finance-custom-range-field {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.finance-time-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  padding: 6px 10px;
}

.finance-diff-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.diff-table-line {
  display: block;
}

.diff-table-line-header {
  color: var(--ink);
}

.diff-table-line-added {
  color: var(--diff-add);
}

.diff-table-line-removed {
  color: var(--diff-remove);
}

.diff-line-prefix {
  display: inline-block;
  width: 2ch;
  color: var(--muted);
  font-weight: 700;
}

.diff-line-prefix-added {
  color: var(--diff-add);
}

.diff-line-prefix-removed {
  color: var(--diff-remove);
}

.diff-line-content {
  position: relative;
  display: inline-block;
  color: var(--ink);
}

.diff-line-content-added {
  color: var(--diff-add);
}

.diff-line-content-removed {
  color: var(--diff-remove);
}

.diff-line-text {
  display: inline-block;
}

.diff-line-text-removed {
  text-decoration: none;
}

.diff-strike-draw {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
}



table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  perspective: 1200px;
  transform-style: preserve-3d;
}

tbody {
  transform-style: preserve-3d;
}

thead th {
  padding: 12px 16px;
  background: var(--thead-bg);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: left;
  text-transform: uppercase;
  will-change: transform, opacity;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

thead th:last-child {
  border-right: none;
}

tbody td {
  height: 64px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 600;
  transition: background 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  vertical-align: middle;
  background: var(--table-surface);
  transform-style: preserve-3d;
  transform-origin: center;
  will-change: transform, opacity;
}

tbody td:last-child {
  border-right: none;
}

tbody tr:last-child td {
  border-bottom: none;
}

.board-row {
  transform-origin: center;
  will-change: transform, opacity, background;
  transform-style: preserve-3d;
}

.board-row.is-exiting {
  pointer-events: none;
}

.is-window-red-4 td {
  background: transparent;
}

.is-window-red-3 td {
  background: transparent;
}

.is-window-red-2 td {
  background: transparent;
}

.is-window-red-1 td {
  background: transparent;
}

.is-window-yellow-3 td {
  background: transparent;
}

.is-window-yellow-2 td {
  background: transparent;
}

.is-window-yellow-1 td {
  background: transparent;
}

.red-alert-cell {
  position: relative;
  overflow: hidden;
}

.red-alert-cell > * {
  position: relative;
  z-index: 1;
}

.red-alert-sweep {
  position: absolute;
  inset: -1px auto -1px -40%;
  width: 40%;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(239, 68, 68, 0.08) 18%,
    rgba(239, 68, 68, 0.28) 48%,
    rgba(239, 68, 68, 0.08) 82%,
    transparent 100%
  );
}

.time-cell {
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.gate-badge {
  display: inline-flex;
  min-width: 60px;
  justify-content: center;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
}

.destination-cell {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.destination-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.destination-text {
  min-width: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: currentColor;
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  min-width: 90px;
  white-space: nowrap;
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  color: #46515e;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
  border: 1px solid currentColor;
}

.status-boarding {
  background: #156c3a;
  color: #ffffff;
}

.status-delayed {
  background: #8a5200;
  color: #ffffff;
}

.status-cancelled {
  background: #9a1020;
  color: #ffffff;
}

.status-departed {
  background: #22303c;
  color: #94a3b8;
}

.status-ontime {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.empty-state {
  padding: 24px 18px;
  color: var(--muted);
}

.status-footer {
  display: block;
  margin-top: 16px;
  padding: 0 4px;
}

.status-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

body.eighty-mode {
  overflow: hidden;
}

body.eighty-mode .shell {
  visibility: hidden;
  pointer-events: none;
}

.eighty-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  /* Keep top chrome fixed; only the board frame should scroll. */
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at top center, rgba(116, 84, 18, 0.18) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(180deg, #090805 0%, #0c0a07 52%, #050403 100%);
  color: #d8c79f;
}

.eighty-screen {
  --eighty-frame: #18140f;
  --eighty-panel: #100d09;
  --eighty-cell: #1a1711;
  --eighty-cell-edge: #51401a;
  --eighty-seam: rgba(255, 210, 120, 0.14);
  --eighty-ink: #f0c24b;
  --eighty-chrome: #e0d1ae;
  --eighty-muted: #a6936e;
  --eighty-flap-width: 21px;
  --eighty-flap-height: 31px;
  --eighty-flap-font-size: 0.98rem;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  justify-items: stretch;
  align-content: start;
  width: 100%;
  min-width: 0;
  gap: 6px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: max(6px, env(safe-area-inset-top));
  padding-right: max(6px, env(safe-area-inset-right));
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  padding-left: max(6px, env(safe-area-inset-left));
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", "Avenir Next", sans-serif;
  letter-spacing: 0.04em;
}

.eighty-toggle {
  appearance: none;
  border: 1px solid #735b25;
  background: #110e08;
  color: var(--eighty-chrome);
  border-radius: 2px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 10px;
  cursor: pointer;
}

.eighty-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  color: var(--eighty-chrome);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eighty-meta-line {
  margin: 0;
  white-space: nowrap;
}

.eighty-pods {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.eighty-pods::-webkit-scrollbar {
  display: none;
}

.eighty-pod-button {
  appearance: none;
  border: 1px solid #473717;
  background: #0f0c07;
  color: var(--eighty-muted);
  border-radius: 2px;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 7px 9px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.eighty-pod-button.active {
  color: var(--eighty-chrome);
  border-color: #8f6d24;
  background: #171109;
}

.eighty-pod-button-back {
  margin-left: 2px;
}

.eighty-board-frame {
  min-height: 0;
  width: 100%;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 3px;
  border: 12px solid var(--eighty-frame);
  background:
    linear-gradient(180deg, #28231a 0%, #19150f 9%, #0d0a07 10%, #060504 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.05),
    inset 0 0 0 1px rgba(255, 230, 170, 0.02);
  display: grid;
  grid-template-rows: auto 1fr;
}

.eighty-board-head,
.eighty-row {
  display: grid;
  grid-template-columns:
    minmax(86px, 0.95fr)
    minmax(136px, 1.55fr)
    minmax(96px, 1.08fr)
    minmax(76px, 0.9fr)
    minmax(176px, 1.5fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.eighty-overlay[data-layout="compact"] .eighty-board-head,
.eighty-overlay[data-layout="compact"] .eighty-row {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(72px, 1.2fr) minmax(52px, 0.75fr) minmax(76px, 1.15fr) minmax(28px, 0.35fr);
  gap: 3px;
}

.eighty-board-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 221, 140, 0.05);
  background: rgba(15, 13, 9, 0.96);
}

.eighty-head-cell {
  color: var(--eighty-chrome);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eighty-board-body {
  padding: 4px 10px 10px;
}

.eighty-row {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 221, 140, 0.05);
}

.eighty-row:last-child {
  border-bottom: none;
}

.eighty-field {
  display: flex;
  gap: 1px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.eighty-field.is-status {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.eighty-overlay[data-layout="compact"] .eighty-field.is-status {
  justify-content: center;
}

.eighty-flap-char {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--eighty-flap-width);
  height: var(--eighty-flap-height);
  background: linear-gradient(180deg, #221b12 0%, #16110a 100%);
  border: 1px solid var(--eighty-cell-edge);
  border-radius: 1px;
  color: var(--eighty-ink);
  overflow: hidden;
  perspective: 220px;
  transform-style: preserve-3d;
  will-change: transform, filter;
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 160, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48);
}

.eighty-flap-half {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  backface-visibility: hidden;
  background: linear-gradient(180deg, #1d170f 0%, #120e08 100%);
}

.eighty-flap-half.top {
  top: 0;
  height: 50%;
  border-bottom: 1px solid rgba(255, 208, 114, 0.08);
  transform-origin: center bottom;
}

.eighty-flap-half.bottom {
  bottom: 0;
  height: 50%;
  background: linear-gradient(180deg, #16110a 0%, #0d0a06 100%);
  transform-origin: center top;
}

.eighty-flap-half.current {
  z-index: 2;
}

.eighty-flap-half.top.next {
  z-index: 1;
}

.eighty-flap-half.bottom.next {
  z-index: 3;
  transform: rotateX(-90deg);
}

.eighty-flap-char::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--eighty-seam);
  transform: translateY(-0.5px);
}

.eighty-flap-glyph {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--eighty-flap-height);
  top: 0;
  line-height: var(--eighty-flap-height);
  font-size: var(--eighty-flap-font-size);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  color: var(--eighty-ink);
  text-shadow: none;
}

.eighty-flap-half.bottom .eighty-flap-glyph {
  top: calc(var(--eighty-flap-height) / -2);
}

.eighty-flap-char.is-flipping {
  filter: brightness(1.14) contrast(1.06);
}

.eighty-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: 1px solid var(--eighty-cell-edge);
  border-radius: 2px;
  background: linear-gradient(180deg, #1d170f 0%, #120e08 100%);
  color: var(--eighty-ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

.eighty-status-chip.status-ontime {
  color: var(--eighty-ink);
}

.eighty-status-chip.status-delayed {
  color: var(--eighty-ink);
}

.eighty-status-chip.status-cancelled {
  color: var(--eighty-ink);
}

.eighty-status-chip.status-boarding {
  color: var(--eighty-ink);
}

.eighty-status-chip.status-departed {
  color: var(--eighty-ink);
}

.eighty-board-empty {
  padding: 16px 12px 18px;
  color: var(--eighty-chrome);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hidden {
  display: none;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



@media (prefers-reduced-motion: reduce) {
  .hero,
  .board,
  .theme-cycle svg {
    animation: none !important;
  }

  .theme-cycle,
  .pill,
  .filter-indicator {
    transition: none;
  }

  .eighty-flap-char,
  .eighty-row,
  .eighty-overlay {
    animation: none !important;
    transition: none !important;
  }

}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 14px, 1080px);
    padding: 14px 0 22px;
  }

  .hero {
    padding: 20px;
  }

  .toolbar-label {
    flex: 0 0 auto;
  }

  .eighty-screen {
    --eighty-flap-width: 15px;
    --eighty-flap-height: 22px;
    --eighty-flap-font-size: 0.76rem;
    gap: 6px;
  }

  .eighty-overlay[data-layout="full"] .eighty-board-head,
  .eighty-overlay[data-layout="full"] .eighty-row {
    grid-template-columns: 86px 68px 86px 68px 156px;
    gap: 4px;
  }

  .eighty-overlay[data-layout="compact"] .eighty-board-head,
  .eighty-overlay[data-layout="compact"] .eighty-row {
    width: 100%;
    grid-template-columns: minmax(72px, 1.2fr) minmax(52px, 0.75fr) minmax(76px, 1.15fr) minmax(28px, 0.35fr);
    gap: 4px;
  }

  .eighty-board-head {
    padding: 7px 8px;
  }

  .eighty-board-body {
    padding: 4px 8px 8px;
  }

  .eighty-pod-button {
    font-size: 0.6rem;
    padding: 6px 8px;
  }

  .eighty-pod-button-back {
    margin-left: 2px;
  }

  .hero-toolbar {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero-toolbar::-webkit-scrollbar {
    display: none;
  }

  .pod-filters,
  .board-controls {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pod-filters::-webkit-scrollbar,
  .board-controls::-webkit-scrollbar {
    display: none;
  }

  .pod-filters {
    gap: 8px;
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .pod-filters .pill {
    font-size: 0.72rem;
    padding: 7px 11px;
    flex: 0 0 auto;
  }

  .board-actions {
    width: 100%;
  }

  .board-controls {
    width: 100%;
    gap: 6px;
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .compare-button {
    font-size: 0.7rem;
    padding: 7px 10px;
    flex: 0 0 auto;
  }

  .board {
    padding: 16px;
  }

  .finance-plain:not(.is-diff) {
    padding: 18px 16px;
    font-size: 0.88rem;
  }

  .finance-diff-table {
    font-size: 0.85rem;
  }

  .finance-diff-table thead th {
    padding: 12px 14px;
    font-size: 0.7rem;
  }

  .finance-diff-table tbody td {
    padding: 12px 14px;
  }

  .board-heading {
    gap: 6px;
  }

  .board.finance-mode .board-heading {
    display: block;
  }

  .board-title-note {
    display: inline;
  }

  .board-note {
    text-align: left;
    white-space: normal;
  }

  .finance-diff-head {
    flex-direction: column;
    align-items: start;
  }

  .finance-diff-meta {
    text-align: left;
  }

  thead th,
  tbody td {
    padding: 13px 12px;
  }
}

@media (max-width: 430px) {
  .shell {
    width: 100vw;
    margin: 0;
    padding: 0;
  }

  .hero,
  .board {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .hero {
    padding: 18px 14px;
    box-shadow: none;
    backdrop-filter: none;
    border-top: none;
  }

  .board {
    margin-top: 0;
    padding: 14px 12px 16px;
    box-shadow: none;
    border-bottom: none;
  }

  .board-header {
    margin: -14px -12px 12px -12px;
    padding: 12px;
    border-radius: 0;
  }

  .table-wrap {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .time-cell {
    font-size: 1.25rem;
    min-width: 76px;
  }

  thead th,
  tbody td {
    padding: 11px 10px;
  }

  .hero-toolbar {
    border-top: none;
    padding-top: 0;
  }

  .eighty-screen {
    --eighty-flap-width: 13px;
    --eighty-flap-height: 20px;
    --eighty-flap-font-size: 0.68rem;
    gap: 5px;
    padding-top: max(4px, env(safe-area-inset-top));
    padding-right: max(4px, env(safe-area-inset-right));
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    padding-left: max(4px, env(safe-area-inset-left));
  }

  .eighty-meta {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .eighty-board-frame {
    border-width: 7px;
  }

  .eighty-overlay[data-layout="compact"] .eighty-board-head,
  .eighty-overlay[data-layout="compact"] .eighty-row {
    width: 100%;
    grid-template-columns: minmax(64px, 1.2fr) minmax(48px, 0.8fr) minmax(68px, 1.1fr) minmax(24px, 0.3fr);
    gap: 3px;
  }

  .eighty-board-head {
    padding: 6px 7px;
  }

  .eighty-board-body {
    padding: 3px 7px 7px;
  }

  .eighty-head-cell {
    font-size: 0.54rem;
  }

  .eighty-pod-button,
  .eighty-toggle {
    font-size: 0.56rem;
    padding: 5px 6px;
  }

  .pod-filters .pill,
  .board-controls .compare-button {
    font-size: 0.64rem;
    padding: 6px 8px;
  }

  .eighty-status-chip {
    width: 24px;
    height: 20px;
    font-size: 0.72rem;
  }
}

@media (max-width: 375px) {
  .pod-filters .pill {
    font-size: 0.6rem;
    padding: 6px 8px;
  }

  .compare-button {
    font-size: 0.64rem;
    padding: 6px 8px;
  }
}
