:root {
  --bg: #05070c;
  --bg-2: #0b1018;
  --ink: #f3efe6;
  --ink-soft: #c8c2b4;
  --muted: #8b9388;
  --gold: #e2c48a;
  --gold-deep: #b8894a;
  --dusk: #ff9a62;
  --line: rgba(226, 196, 138, 0.16);
  --line-strong: rgba(226, 196, 138, 0.38);
  --glass: rgba(7, 10, 16, 0.58);
  --glass-2: rgba(12, 16, 24, 0.72);
  --danger: #e07a62;
  --ok: #8fbf9a;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, monospace;
  --nav-h: 72px;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: dark; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
}
.form-grid[hidden] {
  display: none !important;
}
.form-grid textarea {
  display: block;
  width: 100%;
  min-height: 7.5rem;
  margin-top: 0.25rem;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.45;
  resize: vertical;
}
.form-grid textarea.short { min-height: 4.25rem; }
.check-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem 0.85rem;
  align-items: center;
}
.check-row label.check { white-space: nowrap; }
@media (max-width: 640px) {
  .check-row { gap: 0.25rem 0.4rem; }
  .card .check-row label.check { font-size: 0.68rem; gap: 0.28rem; }
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
}
.card label, .card input, .card select {
  display: block;
  width: 100%;
}
.card label {
  font-size: 0.75rem;
  color: var(--muted);
}
.card input, .card select {
  margin-top: 0.25rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-data);
}
.err { color: var(--danger); min-height: 1.1rem; }
#auth-cta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.1rem;
}
.profile-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #080c12;
}
.landscape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.6rem;
  margin-top: 0.7rem;
}
.landscape-tile {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #080c12;
  color: var(--ink);
  cursor: pointer;
}
.landscape-tile img { display: block; width: 100%; height: 4.2rem; object-fit: cover; }
.landscape-tile span { display: block; padding: 0.35rem 0.45rem; font-size: 0.75rem; }
.landscape-tile.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.profile-span { grid-column: 1 / -1; }
.pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.pick {
  display: inline-flex;
  width: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 0.28rem 0.72rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.pick.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
  color: var(--gold);
}
.lang-field[hidden],
.lang-note[hidden] { display: none !important; }
#signature-pad {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: #080c12;
  touch-action: none;
  cursor: crosshair;
}
.signature-preview {
  margin-top: 0.7rem;
  width: 100%;
  max-height: 90px;
  object-fit: contain;
  background: #080c12;
  border-radius: 8px;
}
body[data-landscape="night"] .site { --glass: rgba(6, 10, 22, 0.7); }
body[data-landscape="alpine"] .site { --gold: #f0d2a0; }
body[data-landscape="coast"] .site { --gold: #c9e4d4; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1200px 700px at 18% 10%, rgba(90, 70, 40, 0.16), transparent 55%),
    radial-gradient(900px 600px at 88% 80%, rgba(40, 70, 110, 0.14), transparent 50%),
    var(--bg);
  pointer-events: none;
}

#earth {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100vw;
  min-height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.globe-map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: none;
  background: #05070c;
}
.globe-map.is-on { display: block; }
.globe-map #globe {
  width: 100%;
  height: 100%;
}

body[data-view="sim"] { --nav-h: calc(48px + env(safe-area-inset-top)); }
body[data-view="sim"] #earth { visibility: hidden; }
body[data-view="sim"] .grain { opacity: 0.03; }
body[data-view="sim"] .vignette { display: none; }
body[data-view="sim"] .hud { display: none; }
body[data-view="sim"] .site-foot { display: none; }
body[data-view="sim"] .site { pointer-events: none; }
body[data-view="sim"] .nav,
body[data-view="sim"] .sim-title,
body[data-view="sim"] .sim-nav,
body[data-view="sim"] .sim-hud,
body[data-view="sim"] .sim-sheet-tab,
body[data-view="sim"] .sim-bar,
body[data-view="sim"] .sim-profile,
body[data-view="sim"] .sim-menu-btn,
body[data-view="sim"] .sim-edge-read,
body[data-view="sim"] .sim-edge-note,
body[data-view="sim"] .sim-menu,
body[data-view="sim"] .sim-hold,
body[data-view="sim"] .sim-airport,
body[data-view="sim"] .sim-photo-panel,
body[data-view="sim"] .sim-proc {
  pointer-events: auto;
}
body[data-view="sim"].is-flying .nav,
body[data-view="sim"].is-flying .sim-chrome,
body[data-view="sim"].is-flying .sim-bar,
body[data-sim-mode="nav"] .sim-bar {
  display: none !important;
}
body[data-sim-mode="nav"] .view-sim {
  padding-bottom: 16px !important;
}
body[data-sim-mode="nav"]:not(.is-flying) .sim-profile {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(164px + env(safe-area-inset-bottom));
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 4px 12px max(4px, env(safe-area-inset-bottom));
}
body[data-sim-mode="nav"]:not(.is-flying) .sim-nav {
  z-index: 12;
  max-height: calc(100svh - var(--nav-h) - 36px);
}
body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .sim-nav {
  max-height: calc(100svh - var(--nav-h) - 164px - env(safe-area-inset-bottom) - 28px);
}
body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-left,
body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-right {
  bottom: calc(172px + env(safe-area-inset-bottom));
}
body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) {
  --play-chart: 164px;
  --play-bar: 48px;
}
body[data-view="sim"].is-reach[data-sim-mode="play"]:not(.is-flying) {
  --play-bar: 64px;
}
body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) .sim-profile {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--play-chart) + var(--play-bar) + env(safe-area-inset-bottom));
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 4px 12px max(4px, env(safe-area-inset-bottom));
}
body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) .sim-bar {
  position: static;
  transform: none;
  width: auto;
  max-width: none;
  flex: 0 0 var(--play-bar);
  height: var(--play-bar);
  margin: 0 -4px;
  padding: 0 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  z-index: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  align-items: center;
  scrollbar-width: none;
}
body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) .sim-bar::-webkit-scrollbar { display: none; }
body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) .maplibregl-ctrl-bottom-left,
body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) .maplibregl-ctrl-bottom-right {
  bottom: calc(var(--play-chart) + var(--play-bar) + env(safe-area-inset-bottom) + 8px);
}
body[data-view="sim"].is-flying .view-sim {
  padding: 0 !important;
  min-height: 0;
}
body[data-view="sim"].is-flying .sim-profile {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(164px + env(safe-area-inset-bottom));
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 4px 12px max(4px, env(safe-area-inset-bottom));
}
body[data-view="sim"].is-flying .maplibregl-ctrl-bottom-left,
body[data-view="sim"].is-flying .maplibregl-ctrl-bottom-right {
  bottom: calc(172px + env(safe-area-inset-bottom));
}
body[data-view="sim"] .globe-map { z-index: 2; }
body[data-view="sim"] .nav {
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.92), rgba(5, 7, 12, 0.42) 70%, transparent);
}
body[data-view="sim"] .nav-links a { padding-top: 6px; padding-bottom: 6px; }

.maplibregl-ctrl-attrib {
  font-size: 10px !important;
  background: rgba(5, 7, 12, 0.62) !important;
  color: var(--muted) !important;
}
.maplibregl-ctrl-attrib a { color: var(--gold) !important; }
.maplibregl-ctrl-group {
  background: rgba(5, 7, 12, 0.72) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
.maplibregl-ctrl-group button {
  filter: invert(1) hue-rotate(180deg);
}
.maplibregl-ctrl-bottom-right .maplibregl-ctrl.map-orient {
  margin-top: 8px;
}
.maplibregl-ctrl-bottom-right .maplibregl-ctrl.map-screen {
  margin-bottom: 8px;
}
.map-screen-btn {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4.5H5.5V8M15 4.5h3.5V8M9 19.5H5.5V16M15 19.5h3.5V16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat !important;
}
.map-screen-btn[aria-pressed="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 9.5H8.5V5.5M19.5 9.5H15.5V5.5M4.5 14.5H8.5V18.5M19.5 14.5H15.5V18.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.map-orient-btn {
  width: 46px !important;
  height: 46px !important;
  filter: none !important;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.01em;
  line-height: 1.05;
  padding: 0 !important;
}
.map-orient-btn.is-on { color: var(--gold); }
body[data-view="sim"].is-flying .map-orient-btn {
  width: 54px !important;
  height: 54px !important;
  font-size: 11px;
}

.view-sim {
  position: relative;
  min-height: calc(100dvh - var(--nav-h));
  padding: 8px 28px 110px !important;
}
.sim-chrome {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  flex-wrap: wrap;
  pointer-events: none;
}
.sim-sheet-check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.sim-sheet-tab {
  display: none;
}
.sim-sheet-close { display: none; }
.sim-nav {
  width: min(280px, 100%);
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: calc(100svh - var(--nav-h) - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(8, 12, 18, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px 12px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 4;
}
.sim-nav-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: 0 -16px;
  padding: 14px 16px 10px;
  background: rgba(8, 12, 18, 0.98);
}
.sim-nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.sim-nav-title .hud-kicker { margin: 0; flex: 0 0 auto; }
.sim-nav .sim-nav-title select {
  width: auto;
  min-width: 0;
  max-width: 62%;
  margin: 0 0 0 auto;
  padding: 0.28rem 0.4rem;
  font-size: 12px;
}
.sim-nav[hidden] { display: none !important; }
body[data-sim-mode="play"] .sim-nav { display: none !important; }
body[data-sim-mode="nav"] .sim-title,
body[data-sim-mode="nav"] .sim-playback,
body[data-sim-mode="nav"] .sim-hud { display: none !important; }
.sim-playback {
  display: flex;
  align-items: center;
  gap: 10px;
}
#sim-play svg { width: 18px; height: 18px; display: block; }
#sim-play .sim-pause-icon { display: none; }
#sim-play.is-playing .sim-play-icon { display: none; }
#sim-play.is-playing .sim-pause-icon { display: block; }
.sim-field { position: relative; }
.sim-nav-ends {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.sim-nav-ends .sim-field { min-width: 0; }
.sim-nav-ends input {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}
.sim-nav label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.sim-nav input {
  display: block;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 14px;
}
.sim-nav input:disabled { opacity: 0.65; }
.sim-nav select,
.sim-ac select {
  display: block;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.sim-nav select:disabled,
.sim-ac select:disabled { opacity: 0.65; }
.sim-nav label.sim-ac-label,
.sim-ac {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
}
.sim-ac {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
}
.sim-ac-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-ui);
}
.sim-suggest {
  position: fixed;
  z-index: 30;
  max-height: min(220px, 40dvh);
  overflow: auto;
  background: rgba(8, 12, 18, 0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.sim-suggest[hidden] { display: none !important; }
.sim-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-data);
  font-size: 13px;
}
.sim-suggest button b { color: var(--gold); font-weight: 500; margin-right: 6px; }
.sim-suggest button span { color: var(--ink-soft); }
.sim-suggest button:hover { background: rgba(226, 196, 138, 0.08); }
.sim-nav-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}
.sim-nav-actions > .btn { white-space: nowrap; flex: 0 0 auto; }
.sim-nav-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
#sim-start[hidden],
#sim-end[hidden] { display: none !important; }
.sim-nav-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  font-family: var(--font-ui);
}
.sim-nav-note.is-err { color: var(--danger); }
.sim-vias {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  max-height: 148px;
  overflow: auto;
}
.sim-vias:empty { display: none; }
.sim-via {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 28px 28px;
  gap: 4px;
  align-items: center;
}
.sim-via-label {
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-family: var(--font-data);
  font-size: 13px;
}
.sim-via-label b { color: var(--gold); font-weight: 500; }
.sim-via-label small {
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sim-via button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.sim-via button:disabled { opacity: 0.35; cursor: default; }
.sim-nav .sim-via input { padding: 0.3rem 0.45rem; font-size: 13px; }
.sim-title {
  max-width: 42ch;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 14px;
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
}
.sim-title h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.sim-title h1 em {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}
.sim-title p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.5;
  font-size: 14px;
}

.sim-hud {
  width: min(320px, 46vw);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
  font-family: var(--font-data);
}
.hud-kicker {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.hud-reg {
  display: block;
  margin: -4px 0 8px;
  font-family: var(--font-data);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.hud-reg[hidden] { display: none !important; }
.hud-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(226, 196, 138, 0.08);
  font-size: 12px;
}
.hud-row span { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; }
.hud-row b { font-weight: 500; color: var(--ink); }
.hud-gps {
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.hud-dec {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 10px;
}
.hud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 8px 0 6px;
}
.hud-grid span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud-grid b {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  color: var(--gold);
  font-weight: 500;
}
.deck { margin: 6px 0 8px; }
.deck-alt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 7px 10px 6px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(226, 196, 138, 0.09), transparent 46%),
    #070a0e;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.deck-alt span {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.deck-alt b {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--gold);
}
.deck-row {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 8px;
  align-items: end;
}
.deck-inst {
  min-width: 0;
  border-radius: 16px;
  background: #070a0e;
  border: 1px solid var(--line);
  overflow: hidden;
}
.deck-face {
  background: radial-gradient(circle at 50% 38%, #1c2620 0%, #0a0e0c 70%);
}
.deck-face svg {
  display: block;
  width: 100%;
  height: 104px;
}
.deck-inst-compass {
  background: transparent;
  border: 0;
  overflow: visible;
}
.deck-inst-compass .deck-face { background: transparent; }
.deck-lcd {
  padding: 4px 3px 6px;
  text-align: center;
  border-top: 1px solid rgba(226, 196, 138, 0.12);
}
.deck-inst-compass .deck-lcd { border-top: 0; padding-top: 2px; }
.deck-inst-compass .deck-lcd b { display: none; }
.deck-lcd b {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.deck-lcd span {
  display: block;
  margin-top: 1px;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.deck-inst.is-idle .deck-face { opacity: 0.38; }
.deck-inst.is-up .deck-lcd b { color: var(--ok); }
.deck-inst.is-down .deck-lcd b { color: var(--danger); }
.hud-layer {
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.hud-ofm {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.sim-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 7, 12, 0.62);
  backdrop-filter: blur(14px);
  width: max-content;
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
  justify-content: center;
}
.sim-bar .btn.is-on {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(226, 196, 138, 0.1);
}
.ac-pop .maplibregl-popup-content {
  background: rgba(8, 12, 18, 0.92);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 8px;
  box-shadow: var(--shadow);
  font-family: var(--font-data);
}
.ac-pop .maplibregl-popup-tip { border-top-color: rgba(8, 12, 18, 0.92); }
.ac-pop-call { color: var(--gold); font-size: 13px; letter-spacing: 0.06em; }
.ac-pop-meta { color: var(--muted); font-size: 11px; margin: 3px 0; }
.ac-pop-data { font-size: 11px; color: var(--ink-soft); }
.sim-rate {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sim-rate select {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--gold);
}
#sim-scrub {
  width: min(220px, 28vw);
  accent-color: var(--gold);
}

.sim-profile {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 74px;
  z-index: 8;
  height: 168px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: var(--shadow);
}
.sim-profile[hidden] { display: none !important; }
.sim-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
#sim-profile-meta {
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 12px;
  text-align: right;
}
#sim-profile-canvas {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: block;
}
.sim-profile-credit {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: right;
}
.sim-proc {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 7, 12, 0.72);
}
.sim-proc[hidden] { display: none !important; }
#sim-proc-open[hidden],
#sim-flight-proc[hidden] { display: none !important; }
.sim-proc-sheet {
  width: min(480px, 100%);
  height: min(92dvh, 820px);
  max-height: min(92dvh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.96);
  box-shadow: var(--shadow);
}
.sim-proc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.sim-proc-head b {
  font-family: var(--font-data);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.sim-proc-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.sim-proc .proc-board {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  margin: 0;
}
.sim-proc .proc-card {
  flex: none;
  max-width: none;
}
.sim-proc .proc-card[hidden] { display: none !important; }
.sim-proc-nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.sim-proc-arrow {
  width: 72px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.sim-proc-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.sim-proc-page {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--ink-soft);
}
.sim-airport {
  position: fixed;
  z-index: 40;
  width: min(268px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 28px 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2c48a;
  background: rgba(8, 12, 18, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.sim-airport[hidden] { display: none !important; }
.sim-airport-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.sim-airport-id {
  font-size: 13px;
  line-height: 1.3;
}
.sim-airport-id b {
  color: var(--gold);
  font-family: var(--font-data);
  letter-spacing: 0.04em;
}
.sim-airport-id span { color: var(--ink-soft); }
.sim-airport-elev,
.sim-airport-freq,
.sim-airport-rwy {
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.35;
  color: rgba(245, 240, 230, 0.92);
}
.sim-airport-rwy { color: #f0d7a4; white-space: pre-line; }
.sim-airport-elev:empty,
.sim-airport-freq:empty,
.sim-airport-rwy:empty { display: none; }
.sim-airport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.sim-airport-actions .btn { margin-top: 0; }
.sim-airport .btn:disabled { opacity: 0.45; cursor: default; }
#sim-airport-via[hidden],
#sim-airport-reroute[hidden] { display: none !important; }

.sim-flight {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  pointer-events: none;
}
.sim-flight[hidden] { display: none !important; }
.sim-edge {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.sim-edge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.sim-edge-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}
body[data-view="sim"] .sim-menu-btn {
  padding: 12px 22px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a140c;
  background: linear-gradient(180deg, #ffe7b0, #e2b15a);
  border: 1px solid #fff6dc;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
body[data-view="sim"] .sim-menu-btn:hover,
body[data-view="sim"] .sim-menu-btn.is-on {
  color: #1a140c;
  background: linear-gradient(180deg, #fff3cc, #f0c56e);
  border-color: #fff;
}
.sim-icon-btn { padding-inline: 10px; }
.sim-icon-btn svg { width: 18px; height: 18px; display: block; }
body[data-view="sim"] .sim-menu-btn.sim-icon-btn { padding: 12px 14px; }
body[data-view="sim"] .sim-menu-btn.sim-icon-btn svg { width: 22px; height: 22px; }
body[data-view="sim"] #sim-menu {
  color: rgba(240, 215, 164, 0.92);
  background: rgba(8, 12, 18, 0.78);
  border-color: rgba(226, 196, 138, 0.38);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  letter-spacing: 0;
  text-transform: none;
  padding: 15px 17px;
}
body[data-view="sim"] #sim-menu svg { width: 28px; height: 28px; }
body[data-view="sim"] #sim-menu.is-on {
  color: #1a140c;
  background: linear-gradient(180deg, #ffe7b0, #e2b15a);
  border-color: #fff6dc;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
body[data-view="sim"] #sim-menu.is-on svg path { fill: currentColor; }
.sim-edge-read {
  display: grid;
  grid-template-columns: 11ch 10ch 5ch 11ch;
  align-items: center;
  column-gap: 14px;
  margin-left: auto;
  flex: 0 0 auto;
  width: calc(11ch + 10ch + 5ch + 11ch + 42px + 28px + 2px);
  box-sizing: border-box;
  padding: 6px 14px;
  font-size: 15px;
  border-radius: 999px;
  background: rgba(5, 7, 12, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
.sim-edge-read:has(#sim-edge-reg:not([hidden])) {
  grid-template-columns: 9ch 11ch 10ch 5ch 11ch;
  width: calc(9ch + 11ch + 10ch + 5ch + 11ch + 56px + 28px + 2px);
}
.sim-edge-read > div { min-width: 0; text-align: right; }
.sim-edge-read span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sim-edge-reg {
  align-self: center;
  justify-self: end;
  max-width: 100%;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-edge-reg[hidden] { display: none !important; }
.sim-edge-read b {
  display: block;
  margin-top: 1px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-edge-note {
  align-self: flex-end;
  margin: 0;
  max-width: min(420px, 86vw);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(40, 8, 12, 0.82);
  color: var(--danger);
  font-size: 12px;
}
.sim-edge-note[hidden] { display: none !important; }
.sim-hold {
  position: fixed;
  z-index: 40;
  width: min(220px, calc(100vw - 16px));
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.96);
  box-shadow: var(--shadow);
}
.sim-hold[hidden] { display: none !important; }
.sim-hold-place {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-data);
  font-size: 13px;
}
.sim-hold input {
  display: block;
  width: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 14px;
}
.sim-hold .btn { width: 100%; }
.sim-menu {
  align-self: flex-start;
  width: min(320px, calc(100vw - 20px));
  max-height: min(72dvh, calc(100dvh - 120px));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.sim-menu[hidden] { display: none !important; }
.sim-photo-panel {
  position: fixed;
  z-index: 16;
  top: calc(var(--nav-h) + 12px);
  left: max(324px, calc((100vw - 1280px) / 2 + 296px));
  width: min(340px, calc(100vw - 700px));
  max-height: min(78dvh, calc(100dvh - var(--nav-h) - 28px));
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.sim-photo-panel[hidden] { display: none !important; }
body[data-sim-mode="play"] .sim-photo-panel { display: none !important; }
body[data-view="sim"].is-flying .sim-photo-panel {
  left: 12px;
  top: 86px;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 86px - 184px);
}
body[data-view="sim"].is-flying.is-reach .sim-photo-panel {
  top: 112px;
  max-height: calc(100dvh - 112px - 184px);
}
.sim-photo-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #05070c;
  border: 1px solid var(--line);
}
.sim-photo-preview-empty {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.sim-photo-preview-empty[hidden] { display: none !important; }
.sim-photo-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}
.sim-photo-row .btn { flex: 1 1 0; min-width: 0; }
.sim-photo-row .sim-icon-btn { min-height: 36px; }
.sim-photo-toggle.is-on .sim-photo-slash { display: none; }
.sim-photo-delay.is-count .sim-photo-delay-icon { display: none; }
.sim-photo-count {
  font-family: var(--font-data);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sim-photo-count[hidden] { display: none !important; }
.sim-photo-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 8px;
}
.sim-photo-fields select {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.sim-photo-panel label.sim-photo-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
}
.sim-photo-panel .sim-photo-check input {
  width: auto;
  margin-top: 2px;
  padding: 0;
}
.sim-photo-status {
  margin: 0;
  min-height: 2.6em;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.sim-photo-toggle.is-on,
#sim-photo-open.is-on {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(226, 196, 138, 0.1);
}
.sim-photo-pin {
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #f0d7a4;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 12, 18, 0.88);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  pointer-events: auto;
}
.sim-photo-pin.is-event { border-color: var(--gold); }
.sim-photo-pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.sim-photo-stage {
  position: fixed;
  z-index: 7;
  top: calc(var(--nav-h, 64px) + 12px);
  left: 12px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(52vh, 480px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.94);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.sim-photo-stage[hidden] { display: none !important; }
.sim-photo-stage img {
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
  background: #05070c;
  border-radius: 8px;
}
.sim-photo-stage p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.35;
}
.sim-photo-stage-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.8);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
#sim-photo-video {
  position: fixed;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}
#sim-photo-video.is-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: cover;
  pointer-events: none;
  background: #05070c;
}
.sim-alts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sim-alts[hidden] { display: none !important; }
.sim-divert {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sim-divert > .hud-kicker { margin: 0; }
.sim-menu-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(226, 196, 138, 0.12);
}
.sim-nearest {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sim-nearest-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 1px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-data);
}
.sim-nearest-btn b { color: var(--gold); font-weight: 500; }
.sim-nearest-btn span { justify-self: end; color: var(--ink-soft); font-size: 12px; }
.sim-nearest-btn small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-nearest-btn.is-current {
  border-color: var(--gold);
  background: rgba(226, 196, 138, 0.08);
}
.sim-nearest-btn:hover { background: rgba(226, 196, 138, 0.12); }
.sim-menu-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.sim-reach-note {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
}
.sim-reach-note[hidden] { display: none !important; }
.sim-flight .sim-reach-note,
.sim-bar .sim-reach-note {
  align-self: flex-start;
  max-width: min(420px, calc(100vw - 24px));
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(40, 8, 12, 0.88);
}
.sim-bar .sim-reach-note { flex-basis: 100%; text-align: center; }
body[data-sim-mode="nav"] #sim-reach,
body[data-sim-mode="nav"] #sim-reach-menu,
body[data-sim-mode="nav"] #sim-reach-play-note { display: none !important; }
body[data-view="sim"].is-reach .sim-menu-btn {
  min-height: 64px;
  padding: 16px 28px;
  font-size: 22px;
}
body[data-view="sim"].is-reach .sim-menu-btn.sim-icon-btn { padding: 16px 18px; }
body[data-view="sim"].is-reach #sim-menu { padding: 18px 20px; }
body[data-view="sim"].is-reach #sim-menu svg { width: 32px; height: 32px; }
body[data-view="sim"].is-reach .sim-icon-btn svg { width: 26px; height: 26px; }
body[data-view="sim"].is-reach .sim-bar .btn,
body[data-view="sim"].is-reach .sim-menu .btn,
body[data-view="sim"].is-reach .sim-nav .btn,
body[data-view="sim"].is-reach .sim-hold .btn,
body[data-view="sim"].is-reach .sim-airport .btn,
body[data-view="sim"].is-reach .sim-photo-panel .btn,
body[data-view="sim"].is-reach .sim-proc-arrow {
  min-height: 48px;
  padding: 12px 16px;
  font-size: 16px;
}
body[data-view="sim"].is-reach .sim-nav-actions,
body[data-view="sim"].is-reach .sim-nav-tools { gap: 4px; }
body[data-view="sim"].is-reach .sim-nav-actions > .btn,
body[data-view="sim"].is-reach .sim-nav-tools > .btn {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 15px;
}
body[data-view="sim"].is-reach .sim-nav-actions > .sim-icon-btn,
body[data-view="sim"].is-reach .sim-nav-tools > .sim-icon-btn { padding-inline: 8px; }
body[data-view="sim"].is-reach .sim-nav-actions > .sim-icon-btn svg,
body[data-view="sim"].is-reach .sim-nav-tools > .sim-icon-btn svg { width: 22px; height: 22px; }
body[data-view="sim"].is-reach .sim-photo-panel select,
body[data-view="sim"].is-reach .sim-nav select,
body[data-view="sim"].is-reach .sim-menu select {
  min-height: 44px;
  font-size: 16px;
}
body[data-view="sim"].is-reach .sim-proc-x {
  width: 44px;
  height: 44px;
  font-size: 26px;
}
@media (max-width: 480px) {
  .sim-proc { padding: 8px; }
}
body[data-view="sim"].is-reach .sim-bar .sim-rate select,
body[data-view="sim"].is-reach .sim-menu .sim-rate select {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 15px;
}
body[data-view="sim"].is-reach .sim-nearest-btn {
  padding: 12px 10px;
  font-size: 16px;
}
body[data-view="sim"].is-reach .sim-nearest-btn small { font-size: 13px; }
body[data-view="sim"].is-reach .sim-hold {
  width: min(280px, calc(100vw - 16px));
}
body[data-view="sim"].is-reach .sim-hold input {
  min-height: 48px;
  font-size: 18px;
}
body[data-view="sim"].is-reach .sim-airport-x {
  width: 48px;
  height: 48px;
  font-size: 26px;
}
body[data-view="sim"].is-reach .sim-via {
  grid-template-columns: minmax(0, 1fr) 40px 40px 40px;
}
body[data-view="sim"].is-reach .sim-via button {
  width: 40px;
  height: 40px;
  font-size: 16px;
}
body[data-view="sim"].is-reach .maplibregl-ctrl-group:not(.map-orient) button {
  width: 44px !important;
  height: 44px !important;
}
body[data-view="sim"].is-reach .map-orient-btn,
body[data-view="sim"].is-flying.is-reach .map-orient-btn {
  width: 58px !important;
  height: 58px !important;
  font-size: 12px;
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.grain {
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 7, 12, 0.55) 100%);
}

.site {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: auto;
  min-height: var(--nav-h);
  display: grid;
  isolation: isolate;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand links cta";
  align-items: center;
  padding: 0 28px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.72), rgba(5, 7, 12, 0.28) 80%, transparent);
  border-bottom: 1px solid transparent;
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(18px) saturate(1.15);
}
.brand { grid-area: brand; }
.nav-links { grid-area: links; justify-self: center; }
.nav-side {
  grid-area: cta;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  margin-left: auto;
}
.nav-cta { margin-left: 0; }
.nav.is-solid {
  border-bottom-color: var(--line);
  background: rgba(5, 7, 12, 0.78);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.02em;
}
.brand svg { width: 28px; height: 28px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 22px;
  line-height: 1;
}
.brand-name span {
  color: var(--gold);
  font-style: italic;
}
.brand-name small {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
  top: -6px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  background: rgba(226, 196, 138, 0.08);
}
.nav-links a.is-active {
  color: var(--gold);
}
.nav-links a[hidden] { display: none !important; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { border-color: var(--gold); background: rgba(226, 196, 138, 0.08); }
.btn-gold {
  background: linear-gradient(180deg, #f0d7a4, #c9a46a);
  color: #1a140c;
  border-color: transparent;
  font-weight: 560;
}
.btn-gold:hover { background: linear-gradient(180deg, #f7e2b6, #d4b078); }
.btn-sm { padding: 7px 13px; font-size: 13px; }

main { flex: 1; }
.view { display: none; padding: 8px 28px 120px; }
.view[data-view="home"] { display: block; }
.view.is-on { display: block; animation: rise 0.55s ease; }
body[data-view]:not([data-view="home"]) .view[data-view="home"]:not(.is-on) { display: none; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.hero {
  min-height: calc(100dvh - var(--nav-h) - 24px);
  display: grid;
  align-content: end;
  padding: 0 8px 48px;
  max-width: min(1280px, 100%);
  min-width: 0;
  width: 100%;
}
.hero > * { min-width: 0; max-width: 100%; }
.kicker {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  max-width: 100%;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  max-width: 14ch;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.lede {
  max-width: min(46ch, 100%);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 300;
  margin: 0 0 32px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  white-space: normal;
  overflow-wrap: break-word;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 720px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.stat {
  background: rgba(5, 7, 12, 0.62);
  backdrop-filter: blur(12px);
  padding: 16px 18px 14px;
}
.stat b {
  display: block;
  font-family: var(--font-data);
  font-size: 22px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: -0.03em;
}
.stat span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 0 8px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.export-menu { position: relative; z-index: 20; }
.export-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 11.5rem;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10151c;
  box-shadow: var(--shadow);
}
.export-pop button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.export-pop button:hover { background: rgba(226, 196, 138, 0.1); }
#logbook-export-err,
#journey-export-err { max-width: 1280px; margin: -12px auto 12px; }
.export-menu.is-up .export-pop {
  top: auto;
  bottom: calc(100% + 6px);
}
.export-pop[hidden],
#logbook-export-err[hidden],
#journey-export-err[hidden] { display: none !important; }
@media (min-width: 641px) {
  .export-pop { left: auto; right: 0; }
}
.print-frame {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

#google-sign[hidden] { display: none !important; }
.auth-google {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 18px;
}
.auth-google span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 14.5px;
  font-weight: 300;
}
.card .idx {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.photos {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 10px;
}
.photos a:first-child { grid-row: 1 / span 2; }
.photos a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  transition: transform 0.6s ease;
  filter: saturate(0.92) contrast(1.05);
}
.photos a:hover img { transform: scale(1.08); }
.muted { color: var(--muted); font-size: 13px; font-weight: 300; }
.photos figcaption,
.photos .cap {
  position: absolute;
  left: 12px;
  bottom: 10px;
  right: 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px #000;
  margin: 0;
}

.hud {
  position: fixed;
  left: 28px;
  bottom: 20px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 7, 12, 0.55);
  backdrop-filter: blur(12px);
}
.hud b { color: var(--gold); font-weight: 500; }
.legend {
  width: 72px;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #7f9ab8, #ff9a62 48%, #e2c48a);
}
.hud button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  font-family: var(--font-data);
}
.hud button.is-on { color: var(--gold); }

.page-title {
  max-width: 1280px;
  margin: 18px auto 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.page-title h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.03em;
}
.page-title p { margin: 8px 0 0; color: var(--muted); }
.page-title.compact {
  margin: 12px auto 16px;
  align-items: center;
}
.page-title.compact h1 {
  font-size: clamp(26px, 3vw, 34px);
}
.page-title.compact p { display: none; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#logbook-columns,
#logbook-filter,
#journey-filter {
  max-width: 1280px;
  margin: -8px auto 1.4rem;
}
#logbook-filter,
#journey-filter {
  width: fit-content;
  max-width: min(1280px, 100%);
  margin-left: max(0px, calc((100% - 1280px) / 2));
  margin-right: auto;
}
#journey-filter { margin-top: 0; }
#journey-totals { margin-top: 0; }
#logbook-filter > strong,
#journey-filter > strong,
#logbook-filter > .muted,
#journey-filter > .muted {
  width: 0;
  min-width: 100%;
}
#logbook-filter > .muted,
#journey-filter > .muted { margin: 0.15rem 0 0.65rem; }
.log-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem 0.45rem;
}
#logbook-filter .log-filter-row > label,
#journey-filter .log-filter-row > label,
.log-filter-row .check-row,
.log-filter-actions {
  width: auto;
  flex: 0 0 auto;
}
#logbook-filter .log-filter-row input,
#journey-filter .log-filter-row input,
#logbook-filter .log-filter-row select,
#journey-filter .log-filter-row select {
  width: max-content;
  max-width: 13.5rem;
  padding: 0.38rem 0.42rem;
  font-size: 0.82rem;
}
#logbook-filter .log-filter-row input[type="date"],
#journey-filter .log-filter-row input[type="date"] {
  width: 8.15rem;
  max-width: none;
}
#logbook-filter .log-filter-row input[name="registration"] { width: 5.5rem; }
#logbook-filter .log-filter-row input[name="type"] { width: 4.7rem; }
#logbook-filter .log-filter-row input[name="airport"],
#journey-filter .log-filter-row input[name="airport"] {
  width: 4.3rem;
}
.log-filter-row .check-row { padding-bottom: 0.38rem; }
.log-filter-row .check-row label.check { font-size: 0.82rem; gap: 0.28rem; }
.log-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.08rem 0.85rem;
}
.log-filter-actions .btn { padding: 8px 14px; }
.log-filter-actions .btn-sm { padding: 7px 12px; }
#logbook-filter .err,
#journey-filter .err { min-height: 0; margin: 0; }
#logbook-filter .err:not(:empty),
#journey-filter .err:not(:empty) { margin-top: 0.45rem; }
.page-actions .btn.is-on,
.section-actions .btn.is-on {
  color: var(--gold);
  border-color: var(--gold);
}
#logbook-note {
  max-width: 1280px;
  margin: 0 auto 0.7rem;
}
#flight-sheet .combo:focus-within { z-index: 3; }
#logbook-columns[hidden],
#logbook-filter[hidden],
#journey-filter[hidden],
#journey-totals[hidden],
#flight-form [hidden],
.chips > [hidden] { display: none !important; }
#logbook-columns .log-col-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
  margin-top: 0.85rem;
}
#logbook-columns .log-col-picks label.check {
  display: flex;
  width: auto;
  color: var(--ink);
  font-size: 0.92rem;
}

.chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto 22px;
}
.chip {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  backdrop-filter: blur(16px);
}
.chip b {
  display: block;
  font-family: var(--font-data);
  font-size: 20px;
  color: var(--gold);
  font-weight: 500;
}
.chip span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table-wrap {
  max-width: 1280px;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(18px);
}
table.log {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.log th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
table.log td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(226, 196, 138, 0.07);
  white-space: nowrap;
}
table.log tbody tr.log-gallery,
table.log tbody tr.log-gallery:hover {
  background: transparent;
  cursor: default;
}
table.log tr.log-gallery td {
  white-space: normal;
  cursor: default;
  padding-top: 0;
  padding-bottom: 12px;
}
.sg-stack {
  display: grid;
  gap: 1.25rem;
  max-width: 1280px;
  margin: 1.25rem auto 0;
}
.sg-block {
  padding: 1.1rem 1.2rem;
}
.sg-block-title {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  color: var(--brass, var(--gold));
  font-weight: 500;
}
table.log tr:last-child td { border-bottom: 0; }
table.log tbody tr { cursor: pointer; }
table.log tbody tr:hover { background: rgba(226, 196, 138, 0.05); }
.mono { font-family: var(--font-data); font-size: 13px; }
.tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.tag.night { color: var(--ink-soft); }
.tag.ifr { color: #9bb7d4; }

.fleet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}
.ac {
  padding: 0;
  overflow: hidden;
}
.ac-photo {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #080c12;
}
.form-header-photo {
  display: block;
  width: calc(100% + 44px);
  max-width: none;
  height: 180px;
  object-fit: cover;
  margin: -22px -22px 0.35rem;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #080c12;
}
.form-header-photo[hidden] {
  display: none;
}
.nav-account-name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav-avatar-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #121820;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-avatar-btn[aria-expanded="true"] { border-color: var(--gold); }
.nav-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.nav-avatar[hidden],
.nav-avatar-fallback[hidden] { display: none !important; }
.nav-avatar-fallback {
  font-size: 13px;
  line-height: 1;
}
.nav-account-pop {
  position: fixed;
  z-index: 80;
  min-width: 10rem;
  padding: 6px;
  display: grid;
  background: rgba(12, 16, 24, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav-account-pop[hidden] { display: none !important; }
.nav-account-pop a,
.nav-account-pop button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}
.nav-account-pop a:hover,
.nav-account-pop button:hover {
  background: rgba(226, 196, 138, 0.08);
  color: var(--gold);
}
.ac-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 22px 18px;
}
.ac.is-on {
  outline: 1px solid var(--gold);
}
.ac-dues {
  list-style: none;
  margin: 0;
  padding: 0 22px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ac-due {
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.ac-due.is-soon { color: var(--gold); border-color: rgba(226, 196, 138, 0.55); }
.ac-due.is-overdue { color: #e8a0a0; border-color: rgba(232, 160, 160, 0.55); }
.ac-due { cursor: pointer; }
.maint-list {
  display: grid;
  gap: 0.75rem;
}
.maint-item {
  display: grid;
  gap: 0.45rem;
  padding: 16px 18px;
}
.maint-item-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.maint-item h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}
.maint-item .maint-when {
  font-family: var(--font-data);
  font-size: 0.92rem;
}
.maint-item.is-overdue { outline: 1px solid rgba(232, 160, 160, 0.45); }
.maint-item.is-due_soon { outline: 1px solid rgba(226, 196, 138, 0.35); }
.maint-history {
  margin: 1.4rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 500;
}
#equip-section[hidden] { display: none !important; }
.equip-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.equip-item {
  display: grid;
  gap: 0.45rem;
  padding: 16px 18px;
}
.equip-item.is-removed { opacity: 0.72; }
.equip-serial { font-family: var(--font-data); margin: 0; }
.equip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.equip-history {
  margin: 1.4rem 0 0.2rem;
  font-size: 1rem;
  font-weight: 500;
}
#proc-sources { margin-top: 12px; }
.proc-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.proc-source p { margin: 4px 0 0; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: start center;
  padding: 7vh 16px 24px;
  overflow: auto;
  background: rgba(5, 7, 12, 0.72);
}
.sheet[hidden] { display: none !important; }
.sheet > .card { position: relative; }
.sheet > .card > strong { padding-right: 2.4rem; }
.sheet-x {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 4;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.72);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
form.card {
  display: grid;
  gap: 0.7rem;
}
form.card[hidden] { display: none !important; }
form.card > .btn { justify-self: start; }
form.card .hero-actions { margin-bottom: 0; }
.aircraft-form,
.journey-form {
  width: min(920px, 100%);
  margin: 0;
}
.fleet {
  margin-bottom: 1.5rem;
}
.pager {
  max-width: 1280px;
  margin: 0.8rem auto 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}
.pager[hidden] { display: none; }
.log-gallery td {
  padding-top: 0;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.sg {
  position: relative;
  display: grid;
  gap: 0.55rem;
  min-height: 0;
}
.sg.sg-edit {
  padding-right: 4.4rem;
  min-height: 1.85rem;
}
.sg-caption {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.4;
}
.card label.check,
label.check {
  display: flex;
  width: auto;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.92rem;
}
.card label.check input,
label.check input {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0;
}
.sg-desc {
  display: grid;
  gap: 0.4rem;
  max-width: 40rem;
}
.sg-desc textarea {
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-ui);
  resize: vertical;
}
.sg-add {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
}
.sg button.sg-plus,
.sg button.sg-yt-open {
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(226, 196, 138, 0.16);
  color: var(--gold);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.sg button.sg-yt-open { font-size: 0.72rem; }
.sg button.sg-plus:hover,
.sg button.sg-yt-open:hover,
.sg button.sg-yt-open.is-on {
  border-color: var(--gold);
  background: rgba(226, 196, 138, 0.35);
}
.sg .sg-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.sg-yt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  max-width: 36rem;
}
.sg-yt[hidden] { display: none !important; }
.sg-yt input {
  flex: 1 1 12rem;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.92rem;
}
.sg-yt button { width: auto; }
.sg-player[hidden] { display: none !important; }
.sg-frame {
  position: relative;
  width: min(640px, 100%);
  aspect-ratio: 16 / 9;
  background: #05070c;
  border-radius: 10px;
  overflow: hidden;
}
.sg-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.sg-player-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 1;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(5, 7, 12, 0.72);
  color: var(--gold);
  cursor: pointer;
}
.sg-play {
  position: relative;
  display: block;
  width: 240px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sg-play-mark,
.wall-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 7, 12, 0.72);
  color: var(--gold);
  border: 1px solid var(--line-strong);
  pointer-events: none;
}
.sg-play-mark {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1rem;
}
.sg-pending-url {
  display: grid;
  place-items: center;
  width: 240px;
  height: 180px;
  padding: 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  word-break: break-all;
  text-align: center;
}
.sg-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.sg-strip:empty { display: none; }
.sg-tile {
  position: relative;
  margin: 0;
  width: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080c12;
}
.sg-tile img {
  display: block;
  width: 240px;
  height: 180px;
  object-fit: cover;
  cursor: default;
}
.sg-shot {
  position: relative;
  display: block;
  width: 240px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sg-view .sg-shot img { cursor: pointer; }
.sg-tools {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.4rem;
  background: linear-gradient(transparent 45%, rgba(5, 7, 12, 0.82));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.sg-tile:hover .sg-tools,
.sg-tile:focus-within .sg-tools {
  opacity: 1;
  pointer-events: auto;
}
.sg-icon {
  width: 1.85rem;
  height: 1.85rem;
  border: 0;
  border-radius: 6px;
  background: rgba(226, 196, 138, 0.92);
  color: #1a1408;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.sg-icon.sg-del {
  background: rgba(232, 160, 160, 0.95);
  color: #2a1010;
}
.sg-confirm {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 12, 0.72);
  padding: 16px;
}
.sg-confirm[hidden] { display: none !important; }
.sg-confirm-card {
  position: relative;
  width: min(22rem, 100%);
  background: #10151c;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}
#sg-confirm-title { padding-right: 2.2rem; }
.sg-confirm-card p { margin: 0 0 0.5rem; }
.sg-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
@media (hover: none) {
  .sg-tools {
    opacity: 1;
    pointer-events: auto;
  }
}
.sg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 1rem 1.5rem;
  background: rgba(5, 7, 12, 0.88);
}
.sg-lightbox[hidden] { display: none; }
.sg-lightbox figure {
  margin: 0;
  justify-self: center;
  max-width: min(1100px, 90vw);
}
.sg-lightbox img {
  display: block;
  max-width: min(1100px, 90vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}
.sg-lightbox figcaption {
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.sg-lb-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--brass, var(--gold));
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.sg-lb-prev, .sg-lb-next {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: var(--brass, #e2c48a);
  color: #1a1408;
  font-size: 1.6rem;
  cursor: pointer;
}
body.sg-open { overflow: hidden; }
.ac-top {
  padding: 22px 22px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.reg {
  font-family: var(--font-data);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.hours-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold) var(--p), rgba(226, 196, 138, 0.12) 0);
}
.hours-ring span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0a0e14;
  display: grid;
  place-items: center;
  font-family: var(--font-data);
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}
.ac dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 0;
  padding: 0 22px 20px;
}
.ac dt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ac dd { margin: 4px 0 0; font-size: 14px; }

.feed {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.post {
  overflow: hidden;
  padding: 0;
}
.post.wall-post {
  overflow: visible;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  padding: 16px 18px 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.post img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.post-body { padding: 14px 18px 18px; }
.post-body h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.post-body p { margin: 0; color: var(--muted); font-size: 14px; }

.wall-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
}
.wall-head-main {
  flex: 1 1 auto;
  min-width: 0;
}
.wall-menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}
.wall-menu-btn {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}
.wall-menu-btn span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-soft);
}
.wall-menu-btn:hover span,
.wall-menu-pop:not([hidden]) ~ .wall-menu-btn span,
.wall-menu:has(.wall-menu-pop:not([hidden])) .wall-menu-btn span {
  background: var(--gold);
}
.wall-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  min-width: 9.5rem;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10151c;
  box-shadow: var(--shadow);
}
.wall-menu-pop[hidden] { display: none !important; }
.wall-menu-pop button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.wall-menu-pop button:hover {
  background: rgba(226, 196, 138, 0.1);
}
.wall-report {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(5, 7, 12, 0.72);
}
.wall-report[hidden] { display: none !important; }
body.wall-report-on { overflow: hidden; }
.wall-report-card {
  position: relative;
  width: min(28rem, 100%);
  padding: 1.2rem 1.3rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #10151c;
  box-shadow: var(--shadow);
}
.wall-report-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 500;
}
.wall-report-cats {
  display: grid;
  gap: 0.2rem;
  margin: 0.85rem 0 0.7rem;
  padding: 0;
  border: 0;
}
.wall-report-cats legend {
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
}
.wall-report-cats label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}
.wall-report-cats label:hover { background: rgba(226, 196, 138, 0.08); }
.wall-report-cats input { margin: 0; }
.wall-report-note {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}
.wall-report-note textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080c12;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.wall-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.admin-tabs button {
  margin: 0;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  cursor: pointer;
}
.admin-tabs button.is-on {
  color: var(--gold);
  border-color: var(--line-strong);
}
.admin-report { margin-bottom: 0.8rem; }
.admin-report p { margin: 0.35rem 0 0; }
.admin-report h3 {
  margin: 0.25rem 0 0.15rem;
  font-size: 1.2rem;
}
.admin-report-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.admin-hide { color: var(--danger); }
.wall-ava {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.wall-comment .wall-ava {
  width: 32px;
  height: 32px;
}
.wall-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #121820;
}
.wall-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--gold);
}
.wall-ava img[hidden],
.wall-avatar-fallback[hidden] {
  display: none !important;
}
.wall-photos {
  display: grid;
  gap: 3px;
  background: #05070c;
  overflow: hidden;
}
.wall-photos.n2 { grid-template-columns: 1fr 1fr; }
.wall-photos.n3, .wall-photos.n4 { grid-template-columns: 1fr 1fr; }
.wall-shot {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b1018;
  cursor: zoom-in;
  overflow: hidden;
}
.wall-shot img {
  width: 100%;
  height: 280px;
  max-height: none;
  object-fit: cover;
  display: block;
}
.wall-ava img {
  width: 100%;
  height: 100%;
  max-height: none;
}
.wall-photos.n1 .wall-shot img { height: 380px; }
.wall-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 12, 0.45);
  font-size: 28px;
  color: var(--ink);
}
.wall-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 18px 4px;
  border-top: 1px solid var(--line);
}
.wall-likebox {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.wall-like,
.wall-like-n {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  cursor: pointer;
  padding: 4px 2px;
}
.wall-like.is-on { color: var(--dusk); }
.wall-like:disabled,
.wall-like-n:disabled { opacity: 0.4; cursor: default; }
.wall-likebox.is-open .wall-like-n { color: var(--gold); }
.wall-likers {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 6;
  min-width: 12.5rem;
  max-width: 18rem;
  max-height: 14rem;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10151c;
  box-shadow: var(--shadow);
}
.wall-likebox.is-open .wall-likers {
  display: grid;
  gap: 4px;
}
.wall-likers .muted {
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.wall-liker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
}
.wall-likers .wall-ava {
  width: 22px;
  height: 22px;
}
.wall-comments { padding: 4px 18px 8px; }
.wall-comment {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  margin: 8px 0;
  align-items: start;
}
.wall-comment-body {
  min-width: 0;
}
.wall-comment p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: break-word;
}
.wall-comment strong { margin-right: 6px; font-weight: 500; }
.wall-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
}
.wall-replies {
  margin-top: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.wall-comment.is-reply .wall-ava {
  width: 26px;
  height: 26px;
}
.wall-del {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.wall-reply-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
}
.wall-reply-btn:hover {
  border-color: var(--gold);
}
.wall-reply-hint {
  margin: 6px 0 0;
  padding: 0;
  font-size: 13px;
}
.wall-composer {
  display: flex;
  gap: 8px;
  padding: 8px 18px 16px;
  align-items: center;
}
.wall-composer[hidden] {
  display: none !important;
}
.wall-composer input {
  flex: 1 1 auto;
  margin: 0;
  width: auto;
  min-width: 0;
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
  font-family: var(--font-ui);
}
.wall-reply-form {
  padding: 8px 0 4px;
}
.wall-hint, .wall-stamp, .wall-liked {
  padding: 0 18px 12px;
  margin: 0;
}
.wall-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 18px 12px;
}
button.wall-more-comments {
  display: inline;
  width: auto;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.wall-foot .wall-comment-link {
  margin-left: auto;
}
.span-all { grid-column: 1 / -1; }
#flight-form label[hidden] { display: none !important; }
.combo { position: relative; }
.combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 0.2rem);
  min-width: 100%;
  width: max-content;
  max-width: 16rem;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #0c121b;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  max-height: 14rem;
  overflow: auto;
  box-shadow: var(--shadow);
}
.combo-list[hidden] { display: none !important; }
.combo-list button {
  display: flex;
  width: 100%;
  gap: 0.45rem;
  align-items: baseline;
  text-align: left;
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.combo-list button.is-on,
.combo-list button:hover { background: rgba(226, 196, 138, 0.12); }
.combo-list .combo-meta { color: var(--muted); }
.approach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.approach-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(4.5rem, 0.5fr) minmax(0, 0.8fr) auto;
  gap: 0.45rem 0.6rem;
  align-items: end;
  margin-top: 0.45rem;
}
.log-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}

.home-guest {
  max-width: 820px;
  margin: 8px auto 8px;
}
.home-guest h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  line-height: 1.05;
}
.home-guest .lede {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.5;
  max-width: 42rem;
}
.home-guest .home-note { color: var(--muted); font-size: 15px; }
.home-guest .hero-actions { margin: 8px 0 0; }
.wall-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.home-wall-sub { margin: 8px 0 0; }
.wall-more-sentinel { min-height: 2.5rem; margin: 4px 0 28px; text-align: center; }
.wall-more-sentinel button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.home-wall-section { padding-top: 0; }
.home-pitch { margin: 28px 0 8px; }
body.is-in .home-guest,
body.is-in .home-pitch {
  display: none;
}

.wall-gal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(26rem, 40vw);
  background: rgba(5, 7, 12, 0.94);
}
.wall-gal[hidden] {
  display: none !important;
}
body.wall-gal-on {
  overflow: hidden;
}
.wall-gal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.wall-gal-photo {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  gap: 10px;
  padding: 2.4rem 1.2rem 1.2rem;
  background: #05070c;
  min-width: 0;
  min-height: 0;
}
.wall-gal-photo img {
  max-width: 100%;
  max-height: calc(100dvh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  border-radius: 8px;
}
.wall-gal-stage[hidden],
.wall-gal-photo > img[hidden] {
  display: none !important;
}
.wall-gal-stage {
  width: min(960px, 100%);
}
.wall-gal-stage iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - 9rem);
  border: 0;
  border-radius: 8px;
  display: block;
  background: #05070c;
}
.wall-play {
  width: 46px;
  height: 46px;
  font-size: 16px;
}
.wall-gal-cap {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.wall-gal-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.wall-gal-thumb {
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #0b1018;
  width: 56px;
  height: 42px;
  overflow: hidden;
  cursor: pointer;
}
.wall-gal-thumb.is-on {
  border-color: var(--gold);
}
.wall-gal-thumb img {
  display: block;
  width: 56px;
  height: 42px;
  object-fit: cover;
  max-height: none;
}
.wall-gal-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 24px;
  border-left: 1px solid var(--line);
  background: var(--bg-2);
}
.wall-gal-side .wall-head,
.wall-gal-side .post-body,
.wall-gal-side .wall-actions,
.wall-gal-side .wall-comments,
.wall-gal-side .wall-composer,
.wall-gal-side .wall-hint {
  padding-left: 0;
  padding-right: 0;
}
.wall-gal-side .wall-head { padding-top: 0; }
.wall-gal-side .post-body { padding-bottom: 10px; }
.wall-gal-side .wall-composer { padding-bottom: 0; }
.wall-gal-side .wall-comments { flex: 1 1 auto; }

@media (max-width: 860px) {
  .wall-gal {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 42vh) minmax(0, 1fr);
  }
  .wall-gal-photo {
    padding: 2.6rem 12px 8px;
  }
  .wall-gal-photo img,
  .wall-gal-stage iframe {
    max-height: calc(42vh - 5.5rem);
  }
  .wall-gal-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .wall-gal-close {
    right: 12px;
  }
}

.flight {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}
.kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.kv div { padding: 12px 0; border-bottom: 1px solid rgba(226, 196, 138, 0.08); }
.kv dt { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 6px 0 0; font-size: 16px; }
.flight-photos {
  display: grid;
  gap: 10px;
}
.flight-photos img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
  object-fit: cover;
  max-height: 280px;
}

.view[data-view="logbook"] > .section-head {
  max-width: 1280px;
  margin: 1.6rem auto 22px;
}
.currency {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto 22px;
}
.currency > p {
  grid-column: 1 / -1;
  margin: 0;
}
.cur {
  padding: 14px 16px;
}
.cur strong { display: block; font-size: 14px; font-weight: 500; }
.dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 8px;
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--dusk); }
.dot.grace { background: var(--gold); }
.dot.bad { background: var(--danger); }
#requirement-form[hidden],
#requirement-form [hidden] { display: none !important; }
.cur-actions { display: flex; gap: 8px; margin-top: 10px; }
.cur-actions button {
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}

.site-foot {
  max-width: 820px;
  margin: 36px auto 28px;
  padding: 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}
.site-foot p { margin: 0 0 8px; }

@media (max-width: 980px) {
  .nav {
    height: auto;
    min-height: var(--nav-h);
    padding: 12px 16px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand cta"
      "links links";
    row-gap: 4px;
  }
  .nav-side { justify-self: end; }
  .nav-cta { display: flex !important; }
  .nav-account-name { max-width: 6.5rem; }
  .nav-links {
    display: flex !important;
    flex-wrap: wrap;
    justify-self: start;
    position: static;
    gap: 0;
  }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .site-foot { padding: 0 16px; }
  .view { padding: 8px 16px 100px; overflow-x: hidden; }
  .cards, .chips, .fleet, .currency, .flight, .stats {
    grid-template-columns: 1fr 1fr;
  }
  .chips { grid-template-columns: 1fr 1fr 1fr; }
  .photos { grid-template-columns: 1fr 1fr; grid-template-rows: 160px 160px 160px; }
  .photos a:first-child { grid-row: auto; grid-column: 1 / -1; height: 220px; }
  .hud { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; }
  #sim-scrub { width: min(180px, 40vw); }
}

@media (max-width: 640px) {
  .cards, .fleet, .currency, .flight, .stats, .chips {
    grid-template-columns: 1fr;
  }
  .approach-row { grid-template-columns: 1fr 1fr; }
  .approach-row .approach-remove { grid-column: 1 / -1; justify-self: start; }
  .hero h1 { font-size: 42px; }
  .page-title { flex-direction: column; align-items: start; }
  .hud { font-size: 10px; gap: 8px; }
  .hud .legend { display: none; }
  .lede { font-size: 16px; max-width: 22rem !important; width: auto !important; }
  .kicker { letter-spacing: 0.12em; font-size: 10px; }
  .hero-actions { flex-direction: column; max-width: 22rem !important; }
  .hero-actions .btn { width: 100%; }
  .view[data-view="logbook"] > .hero-actions,
  .sheet .hero-actions,
  form.card .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none !important;
  }
  .view[data-view="logbook"] > .hero-actions .btn,
  .sheet .hero-actions .btn,
  form.card .hero-actions .btn { width: auto; }
}

/* Navigation and simulation: keep the map clear once the window is no longer a desktop. */
@media (max-width: 1100px) {
  body[data-view="sim"] { --nav-h: calc(44px + env(safe-area-inset-top)); }
  body[data-view="sim"] .view-sim {
    overflow: visible;
    animation: none;
    padding: 0 !important;
    min-height: 0;
  }
  body[data-view="sim"] .nav {
    height: var(--nav-h);
    min-height: var(--nav-h);
    padding: 0 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand links cta";
    row-gap: 0;
  }
  body[data-view="sim"] .nav-links {
    justify-self: stretch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: none;
  }
  body[data-view="sim"] .nav-links::-webkit-scrollbar { display: none; }
  body[data-view="sim"] .nav-links a {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;
  }
  body[data-view="sim"] .sim-title {
    position: fixed;
    z-index: 7;
    top: calc(var(--nav-h) + 8px);
    left: 8px;
    max-width: min(300px, 44vw);
    padding: 8px 12px 7px;
  }
  body[data-view="sim"] .sim-title h1 { font-size: 22px; margin: 0; }
  body[data-view="sim"] .sim-title .kicker,
  body[data-view="sim"] .sim-title p { display: none; }
  body[data-view="sim"] .sim-nav {
    position: fixed;
    z-index: 12;
    top: calc(var(--nav-h) + 8px);
    left: 8px;
    width: min(300px, 42vw);
    max-height: calc(100svh - var(--nav-h) - 8px - 112px - 24px);
  }
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .sim-nav {
    max-height: calc(100svh - var(--nav-h) - 8px - 120px - env(safe-area-inset-bottom) - 16px);
  }
  body[data-view="sim"] .sim-hud {
    position: fixed;
    z-index: 8;
    top: calc(var(--nav-h) + 8px);
    right: 8px;
    left: auto;
    width: min(250px, 36vw);
    max-height: calc(100dvh - var(--nav-h) - 140px);
    overflow: auto;
    padding: 10px 12px 8px;
  }
  body[data-view="sim"] .deck-face svg { height: 72px; }
  body[data-view="sim"] .deck-alt b { font-size: 16px; }
  body[data-view="sim"] .sim-hud .hud-layer,
  body[data-view="sim"] .sim-hud .hud-ofm { display: none; }
  body[data-view="sim"]:not(.is-flying) .sim-profile {
    left: 8px;
    right: 8px;
    bottom: 12px;
    height: 112px;
  }
  body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) { --play-chart: 120px; }
  body[data-sim-mode="nav"]:not(.is-flying) .sim-profile {
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(120px + env(safe-area-inset-bottom));
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 4px 12px max(4px, env(safe-area-inset-bottom));
  }
  body[data-view="sim"][data-sim-mode="play"]:not(.is-flying):has(#sim-profile:not([hidden])) .sim-hud {
    max-height: calc(100dvh - var(--nav-h) - var(--play-chart) - var(--play-bar) - 24px - env(safe-area-inset-bottom));
  }
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-left,
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-right {
    bottom: calc(128px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"].is-flying .sim-profile {
    height: calc(120px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"].is-flying .maplibregl-ctrl-bottom-left,
  body[data-view="sim"].is-flying .maplibregl-ctrl-bottom-right {
    bottom: calc(128px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"] .sim-menu {
    position: fixed;
    z-index: 16;
    left: 50%;
    right: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 16px));
    max-height: min(52dvh, calc(100dvh - var(--nav-h) - 140px));
  }
  body[data-view="sim"].is-flying:has(#sim-profile:not([hidden])) .sim-menu {
    bottom: calc(128px + env(safe-area-inset-bottom));
    max-height: min(46dvh, calc(100dvh - 260px));
  }
  body[data-view="sim"].is-flying .sim-photo-panel {
    max-height: calc(100dvh - 86px - 148px);
  }
  body[data-view="sim"].is-flying.is-reach .sim-photo-panel {
    max-height: calc(100dvh - 112px - 148px);
  }
}

@media (max-width: 1100px) and (max-height: 500px) {
  body[data-view="sim"]:not(.is-flying) .sim-profile { height: 72px; }
  body[data-sim-mode="nav"]:not(.is-flying) .sim-profile {
    height: calc(120px + env(safe-area-inset-bottom));
  }
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-left,
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-right {
    bottom: calc(128px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"] .sim-nav,
  body[data-view="sim"] .sim-hud {
    max-height: calc(100svh - var(--nav-h) - 8px - 72px - 16px);
  }
}

@media (max-width: 900px) {
  body[data-view="sim"] .sim-sheet-tab {
    display: inline-flex;
    align-items: center;
    position: fixed;
    z-index: 9;
    top: calc(var(--nav-h) + 8px);
    left: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #fff6dc;
    background: linear-gradient(180deg, #ffe7b0, #e2b15a);
    color: #1a140c;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  body[data-sim-mode="play"] .sim-sheet-tab { display: none !important; }
  body[data-sim-mode="nav"] #sim-sheet-open:checked ~ .sim-sheet-tab .sim-sheet-open { display: none; }
  body[data-sim-mode="nav"] #sim-sheet-open:checked ~ .sim-sheet-tab .sim-sheet-close { display: inline; }
  body[data-view="sim"] .sim-nav { display: none !important; }
  body[data-sim-mode="nav"] #sim-sheet-open:checked ~ .sim-nav {
    display: grid !important;
    top: calc(var(--nav-h) + 48px);
    bottom: auto;
    left: 8px;
    right: auto;
    width: min(360px, calc(100vw - 16px));
    max-height: calc(100svh - var(--nav-h) - 48px - 88px - 16px);
    z-index: 14;
  }
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) #sim-sheet-open:checked ~ .sim-nav {
    max-height: calc(100svh - var(--nav-h) - 48px - 104px - env(safe-area-inset-bottom) - 16px);
  }
  body[data-view="sim"] .sim-title {
    max-width: min(150px, 40vw);
    padding: 6px 10px;
  }
  body[data-view="sim"] .sim-title h1 { font-size: 16px; }
  body[data-view="sim"] .sim-hud {
    left: auto;
    right: 8px;
    width: auto;
    max-width: calc(100vw - 180px);
    max-height: none;
    overflow: hidden;
    padding: 5px 8px;
  }
  body[data-sim-mode="nav"] .sim-hud { max-width: calc(100vw - 112px); }
  body[data-view="sim"] .sim-hud .hud-kicker,
  body[data-view="sim"] .sim-hud .hud-row,
  body[data-view="sim"] .sim-hud .hud-layer,
  body[data-view="sim"] .sim-hud .hud-ofm,
  body[data-view="sim"] .deck-face { display: none; }
  body[data-view="sim"] .deck-inst-compass .deck-lcd b { display: block; }
  body[data-view="sim"] .deck {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    overflow-x: auto;
  }
  body[data-view="sim"] .deck-row { display: contents; }
  body[data-view="sim"] .deck-alt,
  body[data-view="sim"] .deck-inst {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    flex: 0 0 auto;
  }
  body[data-view="sim"] .deck-lcd {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 0;
    border: 0;
  }
  body[data-view="sim"] .deck-lcd b,
  body[data-view="sim"] .deck-alt b { font-size: 13px; }
  body[data-view="sim"] .deck-lcd span,
  body[data-view="sim"] .deck-alt span {
    margin: 0;
    letter-spacing: 0.08em;
  }
  body[data-view="sim"]:not(.is-flying) .sim-profile {
    height: 88px;
    bottom: 8px;
  }
  body[data-sim-mode="nav"]:not(.is-flying) .sim-profile {
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(104px + env(safe-area-inset-bottom));
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 4px 12px max(4px, env(safe-area-inset-bottom));
  }
  body[data-view="sim"][data-sim-mode="play"]:not(.is-flying) { --play-chart: 104px; }
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-left,
  body[data-sim-mode="nav"]:not(.is-flying):has(#sim-profile:not([hidden])) .maplibregl-ctrl-bottom-right {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"].is-flying .sim-flight {
    top: max(6px, env(safe-area-inset-top));
    left: 6px;
    right: 6px;
  }
  body[data-view="sim"].is-flying .sim-edge { flex-wrap: wrap; }
  body[data-view="sim"].is-flying .sim-edge-read,
  body[data-view="sim"].is-flying .sim-edge-read:has(#sim-edge-reg:not([hidden])) {
    flex: 1 0 100%;
    width: 100%;
    column-gap: 8px;
    padding: 4px 10px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.05fr) minmax(0, 0.55fr) minmax(0, 1.25fr);
  }
  body[data-view="sim"].is-flying .sim-edge-read:has(#sim-edge-reg:not([hidden])) {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr) minmax(0, 1.05fr) minmax(0, 0.55fr) minmax(0, 1.25fr);
  }
  body[data-view="sim"].is-flying .sim-edge-read b { font-size: 13px; }
  body[data-view="sim"].is-flying .sim-profile {
    height: calc(104px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"].is-flying .maplibregl-ctrl-bottom-left,
  body[data-view="sim"].is-flying .maplibregl-ctrl-bottom-right {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }
  body[data-view="sim"].is-flying:has(#sim-profile:not([hidden])) .sim-menu {
    bottom: calc(112px + env(safe-area-inset-bottom));
    max-height: min(48dvh, calc(100dvh - 230px - env(safe-area-inset-bottom)));
  }
  body[data-view="sim"] .sim-photo-panel,
  body[data-view="sim"].is-flying .sim-photo-panel,
  body[data-view="sim"].is-flying.is-reach .sim-photo-panel {
    top: auto;
    left: 8px;
    right: 8px;
    width: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-height: min(70dvh, calc(100dvh - var(--nav-h) - 96px));
  }
  body[data-view="sim"].is-flying .sim-photo-panel,
  body[data-view="sim"].is-flying.is-reach .sim-photo-panel {
    bottom: calc(112px + env(safe-area-inset-bottom));
    max-height: min(52dvh, calc(100dvh - 230px - env(safe-area-inset-bottom)));
  }
}

@media (max-width: 700px) {
  body[data-view="sim"] .nav-account-name { display: none; }
  body[data-view="sim"] .brand-name { font-size: 18px; }
  body[data-view="sim"].is-flying:not(.is-reach) .sim-menu-btn {
    padding: 10px 12px;
    font-size: 14px;
    letter-spacing: 0.08em;
  }
  body[data-view="sim"].is-flying:not(.is-reach) .sim-menu-btn.sim-icon-btn { padding: 8px 10px; }
  body[data-view="sim"].is-flying:not(.is-reach) #sim-menu { padding: 11px 13px; }
  body[data-view="sim"].is-flying:not(.is-reach) #sim-menu svg { width: 26px; height: 26px; }
}

@media (max-width: 480px) {
  body[data-view="sim"].is-flying .sim-edge-read,
  body[data-view="sim"].is-flying .sim-edge-read:has(#sim-edge-reg:not([hidden])) {
    column-gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    grid-template-columns: 11.2ch 10.2ch 5ch 11.6ch;
  }
  body[data-view="sim"].is-flying .sim-edge-read:has(#sim-edge-reg:not([hidden])) {
    grid-template-columns: 8.8ch 11.2ch 10.2ch 5ch 11.6ch;
  }
  body[data-view="sim"].is-flying .sim-edge-read b,
  body[data-view="sim"].is-flying .sim-edge-reg {
    font-size: 12px;
    letter-spacing: 0;
  }
}

/* iPad Safari draws its fullscreen exit control over the top-left corner. */
body.is-pad-screen[data-view="sim"].is-flying .sim-flight {
  left: 64px;
}

@media (max-width: 1100px) and (max-height: 500px) {
  body[data-view="sim"].is-flying:has(#sim-profile:not([hidden])) .sim-menu {
    max-height: min(34dvh, calc(100dvh - 180px));
  }
  body[data-view="sim"].is-flying .sim-photo-panel,
  body[data-view="sim"].is-flying.is-reach .sim-photo-panel {
    max-height: min(34dvh, calc(100dvh - 180px));
  }
}

#proc-section[hidden],
#proc-section [hidden] { display: none !important; }
.proc-board { margin: 8px 0 28px; }
#proc-section .proc-board { display: grid; gap: 28px; }
.proc-row, .proc-page .proc-board {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.proc-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  max-width: 100%;
  color: #1c140c;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 13px;
  line-height: 1.25;
}
.proc-spine {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.28);
  border-left: 1px solid rgba(28, 20, 12, 0.12);
}
.proc-body { padding: 10px 12px 12px; min-width: 0; }
.proc-sub h3 { margin: 8px 0 4px; font-size: 15px; text-align: center; color: inherit; }
.proc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.proc-item.is-note { display: block; text-align: center; }
.proc-item.is-bold { font-weight: 700; }
.proc-item.is-alert { font-weight: 700; color: #b42318; }
.proc-right { text-align: right; }
.proc-edit { display: grid; gap: 8px; margin-bottom: 8px; }
.proc-edit form, .proc-edit-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.proc-edit label { font-size: 12px; color: var(--muted); }
.proc-edit input, #proc-social textarea, .proc-link input {
  display: block;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
}
.proc-edit input[name="title"], .proc-edit input[name="response"] { min-width: 12rem; }
.proc-edit button, #proc-social button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.proc-link { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; }
.proc-link input { flex: 1; margin-top: 0; }
#proc-social { display: grid; gap: 12px; max-width: 640px; margin-bottom: 28px; }
#proc-social textarea { width: 100%; min-height: 4.5rem; }
.proc-comments { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.proc-comments ul { list-style: none; padding: 0 0 0 16px; margin: 8px 0 0; }
.proc-comments li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.proc-who summary { cursor: pointer; color: var(--muted); font-size: 13px; }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-tools[hidden] { display: none !important; }
.nav-icon,
.nav-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.nav-icon svg,
.nav-bell svg { width: 18px; height: 18px; }
.nav-icon:hover,
.nav-bell:hover,
.nav-icon.is-active,
.nav-bell.is-on,
.nav-icon.is-on { color: var(--gold); background: rgba(226, 196, 138, 0.08); }
.nav-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px #0b0e14;
}
.nav-dot[hidden] { display: none !important; }
.nav-bell-pop {
  position: fixed;
  z-index: 80;
  width: min(360px, calc(100vw - 16px));
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 8px;
  background: rgba(12, 16, 24, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.nav-bell-pop[hidden] { display: none !important; }
.nav-bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 8px;
}
.nav-bell-head strong { font-weight: 500; }
.nav-bell-empty { margin: 8px; }
.nav-bell-item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.nav-bell-item:hover { background: rgba(226, 196, 138, 0.08); }
.nav-bell-item.is-new { box-shadow: inset 2px 0 0 var(--gold); }
.nav-bell-item strong { font-weight: 500; font-size: 14px; }
.nav-bell-item span,
.nav-bell-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
}
#market-new[hidden] { display: none !important; }
.market-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto 14px;
}
.market-search input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #080c12;
  color: var(--ink);
}
.market-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto 18px;
}
.market-filters .is-on {
  color: var(--gold);
  border-color: var(--gold);
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}
.market-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  color: inherit;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.market-card img,
.market-photo-fallback {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #080c12;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}
.market-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.market-body strong { font-size: 1.05rem; font-weight: 500; }
.market-price {
  margin: 0;
  font-family: var(--font-data);
  color: var(--gold);
}
.market-status { letter-spacing: 0.08em; text-transform: uppercase; }
#market-sheet,
#market-form-sheet {
  grid-template-columns: minmax(0, 1fr);
}
.market-detail,
.market-form {
  width: min(720px, 100%);
  max-width: 100%;
  min-width: 0;
  justify-self: center;
}
.market-detail h2 {
  margin: 0 0 8px;
  padding-right: 2.4rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.8rem;
}
.market-copy {
  white-space: pre-wrap;
  margin: 12px 0;
}
.market-actions,
.market-detail-bar,
.market-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.market-form .hero-actions { margin-bottom: 0; }
.market-form .market-file,
.card .market-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  pointer-events: none;
}
.market-photo-row { position: relative; }
#market-aircraft[hidden],
.market-form [hidden] { display: none !important; }
#market-share-log {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
#market-share-log input {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--gold);
}
.market-share-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.market-log-block { margin-top: 18px; }
.market-log-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}
.market-log-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
}
.market-log-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table.market-log tbody tr,
table.market-log tbody tr:hover {
  cursor: default;
  background: transparent;
}
table.market-log td.wrap {
  white-space: normal;
  color: var(--ink-soft);
}
.market-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.chat {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 60vh;
}
.chat-list,
.chat-pane {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 420px;
}
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-list { overflow: auto; }
.chat-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
.chat-row.is-on { background: rgba(226, 196, 138, 0.08); }
.chat-row span,
.chat-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-unread {
  display: inline-block;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--gold);
  color: #1a140c;
  font-family: var(--font-data);
  font-size: 12px;
  text-align: center;
}
.chat-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-head strong { font-weight: 500; }
.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  overflow: auto;
  max-height: 52vh;
}
.chat-empty { margin: 12px; }
.chat-bubble {
  max-width: min(80%, 36rem);
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.chat-bubble.mine { margin-left: auto; border-color: var(--line-strong); }
.chat-bubble p { margin: 0; white-space: pre-wrap; }
.chat-bubble time { color: var(--muted); font-size: 11px; }
.chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.chat-compose[hidden] { display: none !important; }
.chat-compose input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #080c12;
}
@media (max-width: 800px) {
  .chat { grid-template-columns: 1fr; }
  .chat-list { min-height: 0; max-height: 240px; }
}

table.log td.route-cell { white-space: normal; }
.log-route,
.log-remark {
  display: block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-remark {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
table.log th.log-actions,
table.log td.log-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  text-align: right;
  padding-right: 10px;
  background: #0c1118;
}
table.log tbody tr:hover td.log-actions { background: #141820; }
.log-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}
.log-track-btn,
.log-menu-btn {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.log-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-soft);
}
.log-track-btn:hover,
.log-menu-btn:hover { background: rgba(226, 196, 138, 0.12); }
.log-menu-btn span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.log-menu { position: relative; }
.log-menu-pop {
  position: fixed;
  z-index: 40;
  min-width: 13rem;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10151c;
  box-shadow: var(--shadow);
}
.log-menu-pop[hidden] { display: none !important; }
.log-menu-note {
  margin: 0;
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 13px;
}
.log-menu-pop button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.log-menu-pop button:hover { background: rgba(226, 196, 138, 0.1); }
.save-toast {
  position: fixed;
  z-index: 140;
  right: 1.15rem;
  bottom: max(1.15rem, env(safe-area-inset-bottom));
  margin: 0;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #121820;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.35;
  max-width: min(360px, calc(100vw - 2.3rem));
  box-shadow: var(--shadow);
  pointer-events: none;
}
.save-toast[hidden] { display: none !important; }
@media (max-width: 640px) {
  .save-toast { right: 0.8rem; bottom: max(0.8rem, env(safe-area-inset-bottom)); }
}
.journey-track { display: grid; gap: 0.45rem; }
.journey-track label.btn {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0;
  color: inherit;
  font-size: inherit;
}
#journey-track-file { display: none !important; }
#journey-track-import[hidden],
#journey-track-replay[hidden],
#journey-track-remove[hidden],
#journey-adsb-import[hidden],
#journey-adsb-note[hidden] { display: none !important; }
#journey-track-map:empty { display: none; }
#journey-track-basemap { display: none; }
#journey-track-basemap.is-on {
  display: block;
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.journey-track .hero-actions { margin-bottom: 0; }
@media (max-width: 640px) {
  #journey-track-basemap.is-on { height: 200px; }
}
