:root {
  --bg: #090a0c;
  --fg: #e8eaee;
  --card: #12141a;
  --surface: #181b22;
  --muted: #8b919c;
  --subtle: #5c6370;
  --primary: #d5dbe3;
  --primary-fg: #090a0c;
  --accent: #8fa4b8;
  --border: color-mix(in oklab, var(--fg) 10%, transparent);
  --ok: #8fad93;
  --ok-dim: color-mix(in oklab, var(--ok) 16%, transparent);
  --warn: #c4a574;
  --warn-dim: color-mix(in oklab, var(--warn) 16%, transparent);
  --alert: #c47a72;
  --alert-dim: color-mix(in oklab, var(--alert) 16%, transparent);
  --info: #7a93a8;
  --info-dim: color-mix(in oklab, var(--info) 16%, transparent);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow: 0 0 0 1px color-mix(in oklab, var(--fg) 8%, transparent);
  --font: Inter, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-quick: 150ms;
  --motion-fast: 250ms;
  --motion-slow: 400ms;
}

* { box-sizing: border-box; }
html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, transparent 70%, var(--bg)),
    repeating-linear-gradient(0deg, transparent 0 47px, color-mix(in oklab, var(--fg) 3.5%, transparent) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, color-mix(in oklab, var(--fg) 3.5%, transparent) 47px 48px);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--fg); }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
::selection { background: color-mix(in oklab, var(--accent) 32%, transparent); color: var(--fg); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  min-width: 0;
  min-height: 36px;
}
.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.brand:hover { color: inherit; opacity: 1; }
.mark {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface);
  flex-shrink: 0;
  color: var(--fg);
}
.mark svg { width: 13px; height: 13px; }
.brand-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand-sub { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.ident { display: inline; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; }
.dim { color: var(--subtle); }
.top-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-atis { text-align: right; display: none; }
.kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
.clock { text-align: right; }
.clock-z { margin: 0; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.clock-l { display: none; }
.pack-link {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--motion-quick) var(--ease);
}
.pack-link:hover { color: var(--fg); }
button.pack-link { border: 0; font: inherit; cursor: pointer; }
.user-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.user-menu { position: relative; }
.user-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  z-index: 70;
  background: #12141a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: none;
}
.user-pop a,
.user-pop button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 500 12px/1.3 var(--font);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.user-pop a:hover,
.user-pop button:hover { background: color-mix(in oklab, var(--fg) 8%, transparent); }
.user-pop-name {
  margin: 0;
  padding: 6px 10px 0;
  font-size: 12px;
  font-weight: 600;
}
.user-pop-roles {
  margin: 0 0 4px;
  padding: 0 10px 6px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.auth-required {
  text-align: center;
  padding: 28px 16px;
}
.auth-required .btn { margin-top: 12px; }
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  backdrop-filter: blur(8px);
}
.auth-card {
  width: min(100%, 22rem);
  background: var(--card);
  color: var(--fg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-actions { display: flex; gap: 8px; }
.btn-ghost { background: var(--surface); color: var(--fg); }
.flash.is-error { color: var(--alert); }

main.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 12px 12px 96px;
  min-width: 0;
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack > * {
  animation: rise var(--motion-slow) var(--ease-smooth) both;
}
.stack > *:nth-child(1) { animation-delay: 0ms; }
.stack > *:nth-child(2) { animation-delay: 40ms; }
.stack > *:nth-child(3) { animation-delay: 80ms; }
.stack > *:nth-child(4) { animation-delay: 120ms; }
.stack > *:nth-child(5) { animation-delay: 160ms; }
.stack > *:nth-child(6) { animation-delay: 200ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-wrap: balance;
}
.lede { margin: 4px 0 0; font-size: 14px; color: var(--muted); max-width: 36rem; text-wrap: pretty; }

.grid { display: grid; gap: 8px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
.metrics { grid-template-columns: 1fr 1fr; }

.card {
  min-width: 0;
  background: var(--card);
  color: var(--fg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
}
.card-title { margin: 0; font-size: 14px; font-weight: 500; }
.card-meta { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.card-body { padding: 0 12px 10px; }
.card-body.pt { padding-top: 10px; }
.module-link { font-size: 13px; font-weight: 500; white-space: nowrap; }

.metric-label { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); }
.metric-value {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-value.wrap { white-space: normal; }
.metric-hint { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.metric-hint.is-warn { color: var(--warn); font-weight: 500; }
.stat-value {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.stat-head { display: flex; align-items: center; justify-content: space-between; }
.stat-head svg { width: 16px; height: 16px; color: var(--subtle); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-mute { background: var(--surface); color: var(--muted); }
.badge-ok { background: var(--ok-dim); color: var(--ok); }
.badge-warn { background: var(--warn-dim); color: var(--warn); }
.badge-alert { background: var(--alert-dim); color: var(--alert); }
.badge-info { background: var(--info-dim); color: var(--info); }
.ops-badge { display: none; }

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--ok);
  animation: live-pulse 2.2s var(--ease) infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.mono-block {
  margin: 8px 0 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.mono-block.fg { color: var(--fg); margin-top: 0; }
.mono { font-family: var(--mono); }
.cap { text-transform: capitalize; }
.mt { margin-top: 8px; }
.atis-copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: none;
}
.taf-row {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.taf-row:first-child { border-top: 0; padding-top: 0; }
.time.accent { color: var(--accent); }

.list { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.row:first-child { border-top: 0; padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.callsign { margin: 0; font-family: var(--mono); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.time { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }

.table-head {
  display: none;
  grid-template-columns: 5.5rem 3.6rem minmax(0, 1fr) 3.6rem 4.6rem 3.6rem 3.6rem 5.2rem;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}
.table-head.is-out {
  grid-template-columns: 5.5rem 3.6rem minmax(0, 1fr) 4.2rem 4.2rem 4.2rem 5.2rem;
}
.flight-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.flight-row:first-of-type { border-top: 0; }
.time-col { text-align: right; }
.status-col { display: flex; justify-content: flex-end; }
.hide-md { display: block; }
.show-md { display: none; }

.seg {
  display: flex;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.seg-sm { max-width: 24rem; }
.seg button, .kind-toggle button {
  min-height: 40px;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 14px var(--font);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: color var(--motion-quick) var(--ease), background-color var(--motion-quick) var(--ease);
}
.seg button:hover, .kind-toggle button:hover { color: var(--fg); }
.seg button.is-on, .kind-toggle button.is-on { background: var(--surface); color: var(--fg); }
.kind-toggle { display: flex; background: var(--surface); border-radius: var(--radius-md); padding: 4px; }

.input, select {
  height: 40px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
  padding: 0 12px;
  font: 14px var(--font);
}
.input::placeholder { color: var(--subtle); }
.input:focus, select:focus { outline: 2px solid color-mix(in oklab, var(--accent) 70%, transparent); outline-offset: 1px; }
.input-wide { max-width: 28rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-fg);
  font: 500 14px var(--font);
  transition: transform var(--motion-quick) var(--ease), opacity var(--motion-quick) var(--ease);
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.96); }
.filters { display: flex; flex-direction: column; gap: 8px; }
.filters-stack { align-items: stretch; }

.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  border-top: 1px solid var(--border);
  transition: background-color var(--motion-quick) var(--ease);
}
.inbox-item:hover { background: color-mix(in oklab, var(--surface) 60%, transparent); }
.inbox-item.is-on { background: var(--surface); }
.inbox-copy { min-width: 0; flex: 1; }
.inbox-line, .log-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body.flush { padding-left: 0; padding-right: 0; padding-bottom: 8px; }
.acars-head {
  grid-template-columns: 4.2rem 5.4rem 3.4rem 3.2rem 3.6rem minmax(0, 1fr);
  padding: 0 12px 6px;
}
.acars-row {
  display: grid;
  grid-template-columns: 4.2rem 5.4rem minmax(0, 1fr);
  gap: 6px 10px;
  align-items: baseline;
  padding: 5px 12px;
  border-top: 1px solid var(--border);
}
.acars-msg {
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-state { padding: 16px 12px; text-align: center; max-width: none; }
.log-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.log-item:first-child { border-top: 0; }
.log-time { width: 64px; flex-shrink: 0; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--subtle); }
.log-copy { min-width: 0; flex: 1; }
.form-grid { display: grid; gap: 8px; }
.flash { margin: 0; font-size: 13px; color: var(--ok); }

.bottom-nav {
  pointer-events: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 12px max(12px, env(safe-area-inset-bottom));
}
.bottom-nav-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 44rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: color-mix(in oklab, var(--card) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 4px;
  box-shadow: var(--shadow);
}
.nav-link {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  color: var(--subtle);
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  transition: color var(--motion-quick) var(--ease), background-color var(--motion-quick) var(--ease);
}
.nav-link svg { width: 16px; height: 16px; }
.nav-link span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-link.is-on { background: var(--surface); color: var(--fg); }
.nav-link:hover { color: var(--fg); }

.hidden { display: none !important; }
.sm-hide { display: none; }

@media (min-width: 640px) {
  .sm-hide { display: inline; }
  .ops-badge { display: inline-flex; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .filters { flex-direction: row; align-items: center; }
  .filters .input { max-width: 20rem; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .page-head h1 { font-size: 24px; }
}

@media (min-width: 768px) {
  .top-atis { display: block; }
  .table-head { display: grid; }
  .hide-md { display: none; }
  .show-md { display: block; }
  .flight-row {
    grid-template-columns: 5.5rem 3.6rem minmax(0, 1fr) 3.6rem 4.6rem 3.6rem 3.6rem 5.2rem;
  }
  .flight-row.is-out {
    grid-template-columns: 5.5rem 3.6rem minmax(0, 1fr) 4.2rem 4.2rem 4.2rem 5.2rem;
  }
  .acars-row {
    grid-template-columns: 4.2rem 5.4rem 3.4rem 3.2rem 3.6rem minmax(0, 1fr);
  }
  .bottom-nav { padding-bottom: 12px; }
  .bottom-nav-inner { max-width: 48rem; }
}

@media (min-width: 1024px) {
  .split { grid-template-columns: 1fr 1fr; }
  .wx-split { grid-template-columns: 3fr 2fr; }
  .acars-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .stack > * { animation: none; }
  .btn { transition: none; }
}

.perm-list { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-list .badge { text-transform: none; letter-spacing: 0; font-weight: 400; }
.parsed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}
@media (min-width: 640px) {
  .parsed-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.wx-ops {
  display: grid;
  gap: 12px;
  align-items: center;
}
.wx-ops-raw { margin: 0; }
@media (min-width: 768px) {
  .wx-ops {
    grid-template-columns: 184px minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: start;
  }
}
.wind-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wind-card .metric-label { align-self: flex-start; }
.wind-card .metric-value { margin-top: 6px; }
.led-compass {
  position: relative;
  width: 184px;
  height: 184px;
  margin: 4px auto 0;
}
.led-ring { position: absolute; inset: 18px; }
.led-seg {
  position: absolute;
  left: calc(50% - 3px);
  top: 4px;
  width: 6px;
  height: 16px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--fg) 10%, transparent);
  transform-origin: 50% 70px;
  transform: rotate(calc(var(--i) * 10deg));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fg) 6%, transparent);
}
.led-seg.is-near {
  background: color-mix(in oklab, #4dff7c 50%, var(--surface));
}
.led-seg.is-var {
  background: color-mix(in oklab, #4dff7c 32%, var(--surface));
  box-shadow: 0 0 4px color-mix(in oklab, #4dff7c 35%, transparent);
}
.led-seg.is-on {
  background: #4dff7c;
  box-shadow:
    0 0 14px #4dff7c,
    0 0 4px #c8ffd6;
}
.led-cardinal {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--subtle);
  z-index: 1;
}
.led-n { top: 0; left: 50%; transform: translateX(-50%); }
.led-s { bottom: 0; left: 50%; transform: translateX(-50%); }
.led-e { right: 0; top: 50%; transform: translateY(-50%); }
.led-w { left: 0; top: 50%; transform: translateY(-50%); }
.led-ne { top: 14.6%; left: 85.4%; transform: translate(-50%, -50%); }
.led-se { top: 85.4%; left: 85.4%; transform: translate(-50%, -50%); }
.led-sw { top: 85.4%; left: 14.6%; transform: translate(-50%, -50%); }
.led-nw { top: 14.6%; left: 14.6%; transform: translate(-50%, -50%); }
.led-hub {
  position: absolute;
  inset: 52px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.led-deg {
  margin: 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}
.led-unit {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
@media (prefers-reduced-motion: reduce) {
  .led-seg.is-on { box-shadow: none; }
}

@media (max-width: 639px) {
  html, body { overflow-x: hidden; }
  .topbar-inner {
    padding: 4px 10px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  main.wrap {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 20px; }
  .grid-2, .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { border-radius: 16px; }
  .card-body { padding: 10px 12px; }
  .led-compass { width: min(168px, 72vw); height: min(168px, 72vw); }
  .bottom-nav {
    padding: 0 8px max(8px, env(safe-area-inset-bottom));
  }
  .bottom-nav-inner { gap: 1px; padding: 3px; border-radius: 16px; }
  .nav-link {
    min-height: 44px;
    padding: 4px 1px 5px;
    font-size: 9px;
    letter-spacing: -0.01em;
    gap: 1px;
    border-radius: 10px;
  }
  .nav-link svg { width: 17px; height: 17px; }
  .nav-link span { font-size: 9px; }
  .filters { gap: 6px; }
  .filters .input { width: 100%; }
  .flight-row, .acars-row, .log-item { padding: 8px 0; }
  .auth-modal { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
