@font-face {
  font-family: Geist;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #1a2330;
  --card: rgba(255, 255, 255, 0.065);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.55);
  --border: rgba(255, 255, 255, 0.14);
  --accent: #5eabf7;
  --accent-soft: rgba(94, 171, 247, 0.1);
  --panel: rgba(10, 16, 26, 0.9);
  --chrome: rgba(10, 16, 26, 0.65);
  --ok: #22c55e;
  --warn: #f59e0b;
  --solid: #26313f;
  --map: #233238;
  --shadow: 0 8px 30px #0000000c;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fff;
  --card: rgba(15, 23, 42, 0.045);
  --text: #10161f;
  --muted: rgba(16, 22, 31, 0.6);
  --border: rgba(15, 23, 42, 0.16);
  --accent: #1a5fbf;
  --accent-soft: rgba(31, 111, 212, 0.1);
  --panel: rgba(255, 255, 255, 0.95);
  --chrome: rgba(255, 255, 255, 0.82);
  --ok: #15753b;
  --warn: #9a4708;
  --solid: #f3f5f8;
  --map: #d9e1dc;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Geist, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: var(--text);
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 650;
  line-height: 1.25;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 15px;
}
small,
.muted {
  color: var(--muted);
}
svg.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.header {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 30px;
  background: var(--chrome);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}
.brand {
  border: 0;
  background: none;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 0;
}
.brand img {
  border-radius: 9px;
}
.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand small {
  font-size: 0.67rem;
  line-height: 1.2;
  display: block;
  margin-top: 3px;
}
.header-claim {
  font-size: 12px;
  color: var(--muted);
  padding-left: 25px;
  border-left: 1px solid var(--border);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.prototype-label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-right: 12px;
}
.prototype-label i {
  width: 6px;
  height: 6px;
  background: var(--warn);
  border-radius: 50%;
}
.icon-button {
  border: 1px solid var(--border);
  background: var(--card);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.avatar {
  padding: 0;
  overflow: hidden;
  border: 1px solid #5eabf744;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.navigation {
  position: fixed;
  left: 0;
  top: 70px;
  bottom: 0;
  width: 64px;
  z-index: 9;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
}
.nav-button {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--muted);
  border-radius: 11px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-button span {
  position: absolute;
  left: 53px;
  background: var(--solid);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}
.nav-button:hover span,
.nav-button:focus-visible span {
  opacity: 1;
}
.nav-bottom {
  margin-top: auto;
  margin-bottom: 25px;
}
.mountains {
  position: fixed;
  bottom: 0;
  left: 64px;
  right: 0;
  height: 250px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
}
.mountains svg {
  width: 100%;
  height: 100%;
  fill: var(--text);
}
.mountains path:first-child {
  opacity: 0.04;
}
.mountains path:last-child {
  opacity: 0.06;
}
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 35px 40px 35px 104px;
  outline: 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 9px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.btn {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #081c30;
}
.btn:hover,
.icon-button:hover {
  filter: brightness(1.15);
}
[data-theme="light"] .btn.primary {
  color: white;
}
.btn.text {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 3px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  padding: 19px 20px;
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.stat-label .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.stat-value {
  font-family: "Geist Mono", monospace;
  font-size: 29px;
  letter-spacing: -1.5px;
  margin-top: 9px;
  line-height: 1.5;
}
.stat-value em {
  font-family: Geist;
  font-size: 13px;
  font-style: normal;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 5px;
}
.stat-foot {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.stat-foot .positive {
  color: var(--accent);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 19px 21px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-title > .icon {
  color: var(--accent);
  width: 18px;
  height: 18px;
}
.card-head small {
  font-size: 10px;
}
.card-body {
  padding: 20px;
}
.map {
  height: 238px;
  position: relative;
  background: var(--map);
  overflow: hidden;
}
.map svg.terrain {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.map-label {
  position: absolute;
  left: 15px;
  top: 13px;
  font-size: 9px;
  letter-spacing: 0.9px;
  color: var(--muted);
  background: var(--solid);
  padding: 4px 7px;
  border-radius: 5px;
}
.map-caption {
  position: absolute;
  bottom: 12px;
  left: 15px;
  font-size: 10px;
  color: #aabbb7;
  background: #16252acc;
  border-radius: 5px;
  padding: 4px 7px;
}
.map-place {
  position: absolute;
  color: #bccbc3;
  font-size: 10px;
  font-weight: 500;
}
.map-marker {
  position: absolute;
  right: 16px;
  bottom: 15px;
  color: #c5ded8;
  font-size: 10px;
}
.flight-feature {
  padding: 17px 21px;
}
.flight-feature-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}
.flight-feature h3 {
  font-size: 18px;
  letter-spacing: -0.4px;
}
.flight-feature p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.badge {
  font-size: 9px;
  padding: 4px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  white-space: nowrap;
}
.feature-metrics {
  display: flex;
  gap: 26px;
  margin: 18px 0;
}
.feature-metrics strong {
  display: block;
  font: 17px "Geist Mono";
  margin-bottom: 3px;
}
.feature-metrics small {
  font-size: 10px;
}
.tag {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 9px;
  color: var(--muted);
  margin-right: 5px;
}
.feature-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.activity-chart {
  height: 191px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 24px 22px 28px;
}
.chart-column {
  flex: 1;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.bar {
  width: 100%;
  max-width: 28px;
  border-radius: 5px 5px 2px 2px;
  background: var(--accent);
  opacity: 0.75;
  min-height: 2px;
}
.bar.dim {
  opacity: 0.25;
}
.chart-column span {
  font-size: 9px;
  color: var(--muted);
  position: absolute;
  bottom: -20px;
}
.chart-column b {
  font: 9px "Geist Mono";
  color: var(--muted);
}
.chart-summary {
  border-top: 1px solid var(--border);
  padding: 14px 21px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.chart-summary strong {
  color: var(--text);
  font-family: "Geist Mono";
  font-size: 12px;
}
.wide {
  grid-column: 1/-1;
}
.list-row {
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr 85px 85px 24px;
  gap: 14px;
  align-items: center;
  padding: 15px 21px;
  border: 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: none;
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row:hover {
  background: var(--accent-soft);
}
.date-block {
  border-radius: 9px;
  background: var(--card);
  text-align: center;
  padding: 5px 2px;
}
.date-block strong {
  font: 17px "Geist Mono";
  display: block;
}
.date-block small {
  font-size: 9px;
  text-transform: uppercase;
  display: block;
}
.flight-name strong {
  font-size: 12px;
  font-weight: 550;
  display: block;
}
.flight-name small {
  font-size: 10px;
  display: block;
  margin-top: 3px;
}
.row-number {
  font: 12px "Geist Mono";
  text-align: right;
}
.row-number small {
  font: 9px Geist;
  display: block;
  margin-top: 3px;
}
.row-arrow {
  color: var(--muted);
  width: 16px !important;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.reminder {
  padding: 19px 21px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.reminder .symbol {
  background: #f59e0b14;
  color: var(--warn);
  padding: 10px;
  border-radius: 10px;
  display: flex;
}
.reminder strong {
  font-size: 12px;
}
.reminder p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.reminder > .btn {
  margin-left: auto;
}
.note-card {
  padding: 19px 21px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.note-card > .icon {
  color: var(--accent);
  width: 25px;
  height: 25px;
}
.note-card strong {
  font-size: 12px;
}
.note-card p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  margin-top: 26px;
}
.footnote span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.footnote .icon {
  width: 12px;
  height: 12px;
}
.filters {
  display: flex;
  gap: 10px;
  padding: 16px;
  margin-bottom: 18px;
}
.input-wrap {
  position: relative;
  flex: 1;
}
.input-wrap > .icon {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.input-wrap input {
  padding-left: 38px;
}
input,
select,
textarea {
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  width: 100%;
  font-size: 12px;
}
select {
  width: auto;
  background-color: var(--solid);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
.list-labels {
  display: grid;
  grid-template-columns: 46px 1fr 85px 85px 24px;
  gap: 14px;
  padding: 12px 21px;
  font-size: 9px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.list-labels span:nth-child(n + 3) {
  text-align: right;
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
}
.empty h3 {
  color: var(--text);
  margin-bottom: 8px;
}
.equipment-grid,
.sites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.equipment-card {
  padding: 24px;
}
.equipment-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  margin-bottom: 20px;
}
.equipment-icon .icon {
  width: 28px;
  height: 28px;
}
.equipment-card h3 {
  font-size: 18px;
}
.equipment-card p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.equipment-data {
  display: flex;
  gap: 28px;
  margin: 23px 0;
}
.equipment-data strong {
  display: block;
  font: 18px "Geist Mono";
}
.equipment-data small {
  font-size: 10px;
}
.progress {
  height: 5px;
  background: var(--card);
  border-radius: 5px;
  overflow: hidden;
  margin: 12px 0;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.site-info {
  padding: 18px 20px;
}
.site-info h3 {
  font-size: 17px;
}
.site-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 15px;
}
.site-info .actions {
  justify-content: space-between;
}
.sites-grid .map {
  height: 180px;
}
.statistic-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.statistic-grid .activity-chart {
  height: 270px;
}
.ranking {
  padding: 12px 20px;
}
.ranking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.ranking-row:last-child {
  border: 0;
}
.ranking-row small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.ranking-row strong {
  font-family: "Geist Mono";
  font-size: 14px;
}
.metric-line {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.metric-line:last-child {
  border: 0;
}
.metric-line strong {
  font-family: "Geist Mono";
}
.segment {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.segment button {
  padding: 5px 9px;
  font-size: 10px;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
}
.segment button.selected {
  background: var(--accent-soft);
  color: var(--accent);
}
dialog {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--solid);
  color: var(--text);
  padding: 0;
  max-width: 760px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  box-shadow: 0 25px 100px #0005;
}
dialog::backdrop {
  background: #050a12b3;
  backdrop-filter: blur(5px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 25px;
  border-bottom: 1px solid var(--border);
}
.dialog-head h2 {
  font-size: 20px;
}
.dialog-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.dialog-body {
  padding: 24px;
}
.dialog-body .map {
  border-radius: 12px;
  height: 260px;
}
.dialog-body .feature-metrics {
  justify-content: space-between;
  gap: 10px;
  padding: 0 3px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid label {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.form-grid label input,
.form-grid label select,
.form-grid label textarea {
  margin-top: 6px;
  width: 100%;
}
.form-grid .full {
  grid-column: 1/-1;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 25px;
  border-top: 1px solid var(--border);
}
.dialog-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 16px 0;
}
.upload-area {
  display: block;
  border: 1px dashed var(--border);
  padding: 30px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  background: var(--card);
  margin-top: 20px;
}
.upload-area > .icon {
  color: var(--accent);
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
}
.upload-area strong {
  display: block;
  font-size: 13px;
}
.upload-area small {
  display: block;
  font-size: 11px;
  margin: 6px 0 15px;
}
.upload-area input {
  font-size: 11px;
}
.error {
  color: #fb8b8b;
  font-size: 12px;
  white-space: pre-wrap;
}
.altitude {
  width: 100%;
  height: 140px;
  color: var(--accent);
  margin-top: 10px;
}
.chart-title {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}
.chart-title small {
  font-size: 10px;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font: 9px "Geist Mono";
  color: var(--muted);
  margin-top: -15px;
  margin-bottom: 22px;
}
.detail-notes {
  margin-top: 20px;
}
.detail-notes summary {
  font-size: 13px;
  cursor: pointer;
  padding: 12px 0;
}
.detail-notes textarea {
  min-height: 90px;
  resize: vertical;
  margin: 8px 0 10px;
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}
.photo-grid img {
  width: 110px;
  height: 85px;
  object-fit: cover;
  border-radius: 8px;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
  border-bottom: 0;
}
.settings-row strong {
  font-size: 12px;
  display: block;
}
.settings-row small {
  font-size: 11px;
  display: block;
  margin-top: 4px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--solid);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: calc(100% - 30px);
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.skip-link {
  position: fixed;
  left: 10px;
  top: -100px;
  z-index: 50;
  background: var(--solid);
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
@media (min-width: 1440px) {
  main {
    max-width: 1280px;
    padding-top: 44px;
  }
  .map {
    height: 260px;
  }
  .activity-chart {
    height: 213px;
  }
}
@media (max-width: 1023px) {
  .header {
    padding: 0 22px;
    height: 64px;
  }
  .navigation {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 12px env(safe-area-inset-bottom);
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    border-right: 0;
    border-top: 1px solid var(--border);
    backdrop-filter: blur(20px);
  }
  .nav-button {
    width: 62px;
    height: 52px;
    flex-direction: column;
    gap: 4px;
    border-radius: 9px;
  }
  .nav-button span {
    position: static;
    opacity: 1;
    background: none;
    border: 0;
    padding: 0;
    font-size: 9px;
  }
  .nav-button .icon {
    width: 19px;
    height: 19px;
  }
  .nav-bottom {
    display: none;
  }
  main {
    padding: 30px 24px 100px;
    max-width: 1000px;
  }
  .mountains {
    left: 0;
  }
  .header-claim {
    display: none;
  }
  #toast {
    bottom: 85px;
  }
  .dashboard-grid {
    grid-template-columns: 1.4fr 1fr;
  }
  .feature-metrics {
    gap: 20px;
  }
}
@media (max-width: 650px) {
  .header {
    padding: 0 16px;
    gap: 10px;
  }
  .header-actions {
    gap: 7px;
  }
  .prototype-label {
    font-size: 9px;
    margin-right: 2px;
  }
  .header #settings {
    display: inline-flex;
  }
  .header .prototype-label { display:none; }
  .icon-button,
  .avatar {
    width: 31px;
    height: 31px;
  }
  .brand {
    gap: 8px;
  }
  .brand strong {
    font-size: 15px;
  }
  .brand small {
    font-size: 9px;
  }
  main {
    padding: 25px 16px 98px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading > .actions {
    width: 100%;
  }
  .page-heading > .actions > .btn.primary {
    margin-left: auto;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .stat {
    padding: 15px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-foot {
    font-size: 9px;
  }
  .dashboard-grid,
  .bottom-grid,
  .equipment-grid,
  .sites-grid,
  .statistic-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card-head {
    padding: 16px 17px;
  }
  .card-head h2 {
    font-size: 14px;
  }
  .map {
    height: 210px;
  }
  .activity-chart {
    height: 175px;
  }
  .flight-feature {
    padding: 17px;
  }
  .feature-metrics {
    gap: 20px;
  }
  .list-row,
  .list-labels {
    grid-template-columns: 37px 1fr 62px 18px;
    gap: 10px;
    padding: 13px 15px;
  }
  .list-row > .row-number:nth-child(4),
  .list-labels > span:nth-child(4) {
    display: none;
  }
  .flight-name strong {
    font-size: 11px;
  }
  .flight-name small {
    font-size: 9px;
  }
  .row-number {
    font-size: 11px;
  }
  .date-block strong {
    font-size: 15px;
  }
  .bottom-grid {
    margin-top: 16px;
  }
  .footnote {
    flex-direction: column;
    gap: 8px;
  }
  .filters {
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }
  .input-wrap {
    flex-basis: 100%;
  }
  .filters select {
    flex: 1;
    min-width: 0;
    font-size: 11px;
  }
  .dialog-head {
    padding: 18px;
  }
  .dialog-head h2 {
    font-size: 18px;
  }
  .dialog-body {
    padding: 18px;
  }
  .dialog-body .map {
    height: 210px;
  }
  .dialog-body .feature-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
  }
  .form-grid {
    gap: 12px;
  }
  .dialog-footer {
    padding: 18px;
  }
  .statistic-grid .activity-chart {
    height: 230px;
  }
  .segment {
    width: 100%;
    justify-content: center;
  }
  .reminder {
    padding: 17px;
  }
  .reminder > .btn {
    font-size: 10px;
    padding: 8px;
  }
  .equipment-card {
    padding: 21px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Keep place labels readable on both terrain backgrounds. */
[data-theme="light"] .map-place {
  color: #324f44;
  text-shadow: 0 1px 3px #ffffff80;
}
/* Planning update: profile, flight collection, review draft, and places. */
.time-value {
  font: 22px Geist;
  letter-spacing: -0.5px;
  margin: 17px 0 12px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  margin-bottom: 24px;
}
.profile-picture {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 21px "Geist Mono";
  flex-shrink: 0;
  overflow: hidden;
}
.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-card h2 {
  font-size: 20px;
}
.profile-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 9px;
  max-width: 620px;
}
.profile-card > .btn {
  margin-left: auto;
}
.period-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  font-size: 11px;
  color: var(--muted);
}
.chart-unit {
  font-size: 10px;
  color: var(--muted);
  padding: 16px 21px 0;
}
.monthly-table {
  border-top: 1px solid var(--border);
  padding: 16px 21px;
}
.monthly-table summary {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
}
.monthly-table table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  margin-top: 15px;
}
.monthly-table th,
.monthly-table td {
  padding: 9px 5px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.monthly-table th:first-child,
.monthly-table td:first-child {
  text-align: left;
}
.monthly-table tfoot {
  font-weight: 600;
}
.monthly-table td {
  color: var(--muted);
}
.flight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.track-preview {
  padding: 0;
  border: 0;
  background: none;
  width: 100%;
  display: block;
}
.flight-card .map {
  height: 155px;
}
.flight-card .map-label {
  font-size: 7px;
  left: 10px;
  top: 10px;
}
.flight-card .map-caption {
  font-size: 8px;
  left: 10px;
  bottom: 10px;
}
.flight-card .map-place {
  font-size: 8px;
}
.flight-card-content {
  padding: 16px;
}
.flight-card-title {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}
.flight-title {
  text-align: left;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  background: none;
  padding: 0;
  border: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
}
.flight-card-title > .icon-button {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
}
.flight-card-content > p {
  font-size: 10px;
  margin-top: 3px;
}
.wing-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px !important;
  font-size: 11px !important;
  color: var(--muted);
}
.wing-line .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.card-metrics {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 17px 0;
}
.card-metrics strong {
  font: 13px "Geist Mono";
  display: block;
}
.card-metrics small {
  font-size: 9px;
}
.flight-card-times {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font: 9px "Geist Mono";
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.flight-card-times .icon {
  width: 13px;
  height: 13px;
}
.flight-card .feature-footer .btn {
  font-size: 10px;
}
.recent-flight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
  gap: 14px;
}
.recent-flight-grid .flight-card {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.025);
}
.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
}
.extra-filters {
  margin-top: -6px;
}
.extra-filters summary {
  padding: 12px 16px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.extra-filters .filters {
  margin-bottom: 0;
  border-top: 1px solid var(--border);
}
.extra-filters select {
  flex: 1;
  min-width: 0;
}
.filtered-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  font-size: 11px;
  margin: 20px 0 12px;
  color: var(--muted);
}
.filtered-summary strong {
  color: var(--text);
  font-size: 13px;
}
.missing-data {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 17px;
  line-height: 1.7;
}
.split-collection {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}
.compact-list {
  max-height: 800px;
  overflow: auto;
}
.compact-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 12px;
  gap: 8px;
}
.compact-row:last-child {
  border: 0;
}
.compact-row.active {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
}
.compact-select {
  background: none;
  border: 0;
  display: flex;
  text-align: left;
  gap: 12px;
  align-items: center;
  padding: 0;
  flex: 1;
  min-width: 0;
}
.compact-select .date-block {
  width: 37px;
  flex-shrink: 0;
}
.compact-select .flight-name {
  min-width: 0;
}
.compact-select strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-select small {
  line-height: 1.6;
}
.compact-row > .icon-button {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.selected-map {
  position: sticky;
  top: 88px;
}
.mobile-pane {
  display: none;
}
.flight-stops {
  padding: 16px 0 0;
}
.flight-stops > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  position: relative;
}
.flight-stops strong {
  font-size: 11px;
}
.flight-stops small {
  margin-left: auto;
  font: 10px "Geist Mono";
}
.flight-stops > p {
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.start-dot,
.landing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69ddb2;
}
.landing-dot {
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--accent);
}
.feature-footer {
  flex-wrap: wrap;
  gap: 8px;
}
.feature-metrics strong {
  font-size: 15px;
}
.detail-dialog {
  max-width: 1100px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  gap: 22px;
  align-items: start;
}
.detail-panel .metric-line {
  padding: 10px 15px;
  font-size: 10px;
  gap: 15px;
}
.detail-panel .metric-line strong {
  font: 11px Geist;
  text-align: right;
  overflow-wrap: anywhere;
}
.detail-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px 15px;
  background: var(--accent-soft);
}
.detail-primary small {
  display: block;
  font-size: 10px;
}
.detail-primary strong {
  font: 17px "Geist Mono";
  display: block;
  margin: 5px 0;
}
.detail-primary span {
  font-size: 9px;
  color: var(--muted);
}
.panel-hint {
  padding: 0 15px;
  font-size: 10px;
}
.altitude-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 9px;
  margin-top: 10px;
  color: var(--accent);
}
.baro-legend {
  color: #d5a86d;
}
.labelled-altitude {
  height: 165px;
  margin-bottom: 10px;
}
.detail-context {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin: 20px 0;
}
.add-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.add-option {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  padding: 25px;
  gap: 12px;
  transition: background 0.15s;
}
.add-option:hover {
  background: var(--accent-soft);
}
.add-option > .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.add-option strong {
  font-size: 15px;
}
.add-option span {
  font-size: 11px;
  color: var(--muted);
}
.editor-section {
  margin-bottom: 20px;
}
.editor-section > summary {
  font-size: 13px;
  padding: 12px 0;
  cursor: pointer;
  font-weight: 550;
}
.form-section-title {
  margin-bottom: 16px;
}
.form-grid label > small {
  font-size: 9px;
  display: block;
  margin-top: 5px;
}
.inline-editor-actions .btn {
  font-size: 10px;
}
.flight-actions-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.flight-actions-menu .btn {
  justify-content: flex-start;
  white-space: normal;
  min-height: 45px;
}
.place-list {
  margin: 15px 0;
}
.place-list button {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
  text-align: left;
}
.place-list button > span {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 3px 8px;
}
.place-list .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  grid-row: 1/3;
}
.place-list strong {
  font-size: 12px;
}
.place-list small {
  grid-column: 2;
  font-size: 10px;
}
.small-empty {
  padding: 35px 10px;
  font-size: 12px;
}
@media (min-width: 1550px) {
  main:has(.flight-grid) {
    max-width: 1500px;
  }
  .flight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .flight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recent-flight-grid {
    grid-template-columns: 1fr;
  }
  .recent-flight-grid .flight-card {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
  }
  .recent-flight-grid .map {
    height: 100%;
    min-height: 200px;
  }
  .time-value {
    font-size: 18px;
  }
  .profile-card > .btn {
    white-space: normal;
    text-align: left;
  }
}
@media (max-width: 650px) {
  .profile-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px;
    gap: 14px;
  }
  .profile-picture {
    width: 48px;
    height: 48px;
    font-size: 17px;
  }
  .profile-card > div:nth-child(2) {
    flex: 1;
  }
  .profile-card > .btn {
    margin-left: 62px;
    font-size: 10px;
  }
  .profile-card p {
    font-size: 11px;
  }
  .flight-grid,
  .detail-layout,
  .add-options,
  .flight-actions-menu {
    grid-template-columns: 1fr;
  }
  .recent-flight-grid .flight-card {
    display: block;
  }
  .recent-flight-grid .map {
    height: 190px;
    min-height: 0;
  }
  .flight-card .map {
    height: 205px;
  }
  .flight-card .map-label {
    font-size: 8px;
  }
  .flight-card .map-place {
    font-size: 10px;
  }
  .flight-card-content {
    padding: 18px;
  }
  .card-metrics strong {
    font-size: 15px;
  }
  .collection-toolbar {
    flex-wrap: wrap;
  }
  .collection-toolbar > .btn {
    width: 100%;
    font-size: 11px;
  }
  .collection-toolbar .segment {
    width: 100%;
  }
  .filtered-summary {
    gap: 6px 14px;
    font-size: 10px;
  }
  .split-collection {
    display: block;
  }
  .mobile-pane {
    display: flex;
    margin-bottom: 15px;
    width: 100%;
  }
  .pane-list .selected-map,
  .pane-map .compact-list {
    display: none;
  }
  .selected-map {
    position: static;
  }
  .compact-list {
    max-height: none;
  }
  .detail-dialog {
    max-width: calc(100% - 20px);
  }
  .detail-layout {
    gap: 18px;
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
  .dialog-footer .btn {
    font-size: 10px;
    padding: 9px 10px;
  }
  .time-value {
    font-size: 17px;
    letter-spacing: -0.5px;
  }
  .monthly-table {
    padding: 15px;
  }
  .monthly-table td,
  .monthly-table th {
    font-size: 10px;
    padding: 8px 3px;
  }
  .card-head:has(.segment) {
    align-items: flex-start;
    flex-direction: column;
  }
  .card-head .segment {
    width: auto;
  }
  .period-heading {
    font-size: 10px;
  }
  .flight-stops strong {
    font-size: 10px;
  }
}
.mean-speed {
  font-size: 10px;
  color: var(--muted);
  margin: -3px 0 13px !important;
}
.detail-panel .metric-line strong {
  max-width: 65%;
}
.geo-map-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #34433f;
}
.geo-map {
  height: 250px;
  width: 100%;
  background: #34433f;
}
.compact-geo-map .geo-map {
  height: 170px;
}
.geo-map-label {
  position: absolute;
  left: 48px;
  top: 9px;
  z-index: 450;
  border-radius: 5px;
  background: #172536de;
  color: #e3edf7;
  padding: 4px 7px;
  font-size: 8px;
  pointer-events: none;
}
.leaflet-container {
  font-family: Geist, sans-serif;
}
.leaflet-control-attribution {
  font-size: 8px !important;
  max-width: 90%;
  text-align: right;
}
.tile-status {
  position: absolute;
  bottom: 25px;
  left: 8px;
  right: 8px;
  z-index: 450;
  font-size: 9px;
  color: #fff;
  background: #283646ed;
  border: 1px solid #ffffff33;
  padding: 6px 9px;
  border-radius: 6px;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--solid);
  color: var(--text);
}
.leaflet-popup-content {
  font-family: Geist;
  max-width: 270px;
  overflow-wrap: anywhere;
}
.leaflet-popup-content p {
  font-size: 11px;
  line-height: 1.7;
  margin: 7px 0;
}
.pj-map-pin > span {
  display: block;
  height: 13px;
  width: 13px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 5px #0008;
}
.own-pin > span {
  background: #a2cfad;
}
.sites-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 17px;
}
.sites-toolbar .input-wrap {
  min-width: 230px;
}
.sites-toolbar select {
  font-size: 11px;
  max-width: 200px;
}
.map-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 13px 17px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
}
.map-context-bar label {
  display: flex;
  gap: 7px;
  align-items: center;
  cursor: pointer;
}
.map-context-bar input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  padding: 0;
}
.map-context-bar > span {
  font-size: 10px;
  color: var(--muted);
  flex: 1;
}
.map-context-bar > .btn {
  font-size: 10px;
}
.site-selection {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  margin: 16px 0;
  font-size: 11px;
  color: var(--muted);
}
.site-selection button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-size: 15px;
}
.sites-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
}
.sites-catalog {
  max-height: 620px;
  overflow: auto;
}
.sites-catalog h2 {
  font-size: 13px;
}
.sites-catalog .card-head {
  position: sticky;
  top: 0;
  background: var(--solid);
  z-index: 1;
  flex-wrap: wrap;
}
.sites-catalog .card-head small {
  font-size: 9px;
}
.sites-map-card {
  position: sticky;
  top: 90px;
  overflow: hidden;
}
.sites-map-card .geo-map {
  height: 565px;
}
.sites-map-card .geo-map-wrap {
  border-radius: 0;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding: 14px;
  font-size: 9px;
  color: var(--muted);
}
.map-legend span:nth-child(1) {
  color: var(--accent);
}
.map-legend span:nth-child(2) {
  color: #e4b877;
}
.catalog-site {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 20px;
  gap: 10px;
}
.catalog-area {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  min-width: 0;
}
.catalog-area strong {
  display: block;
  font-size: 13px;
}
.catalog-area small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.catalog-places {
  grid-column: 1/-1;
  display: grid;
  gap: 10px;
}
.catalog-places button {
  border: 0;
  background: none;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 3px 0;
  text-align: left;
  font-size: 10px;
}
.catalog-places small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.catalog-places .start-dot,
.catalog-places .landing-dot {
  flex-shrink: 0;
}
.catalog-limit {
  padding: 0 15px;
}
.map-flight-list {
  margin-top: 20px;
}
.map-flight-rows button {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 18px;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 15px 20px;
  width: 100%;
  font-size: 11px;
}
.map-flight-rows button:hover {
  background: var(--accent-soft);
}
.map-flight-rows span,
.map-flight-rows small {
  color: var(--muted);
  font-size: 10px;
}
.source-fields {
  display: block;
  margin: 16px 0;
}
.source-fields > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.source-fields dt {
  color: var(--muted);
}
.source-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.source-details summary {
  font-size: 13px;
  cursor: pointer;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.flight-card .geo-map-wrap {
  border-radius: 0;
}
.flight-card .geo-map {
  height: 180px;
}
.recent-flight-grid .geo-map {
  height: 180px;
}
.map-unavailable {
  padding: 40px 15px;
  font-size: 12px;
  color: var(--muted);
}
.leaflet-control-zoom a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 650px) {
  .sites-workspace {
    display: block;
  }
  .sites-pane-list .sites-map-card,
  .sites-pane-map .sites-catalog {
    display: none;
  }
  .sites-map-card {
    position: static;
  }
  .sites-map-card .geo-map {
    height: 440px;
  }
  .sites-catalog {
    max-height: none;
  }
  .sites-toolbar select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .sites-toolbar > .btn {
    width: 100%;
  }
  .sites-toolbar .input-wrap {
    min-width: 0;
    flex-basis: 100%;
  }
  .map-context-bar {
    gap: 14px;
  }
  .map-context-bar > span {
    flex-basis: 100%;
    font-size: 9px;
  }
  .site-selection {
    font-size: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .source-fields > div {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    font-size: 10px;
  }
  .map-flight-rows button {
    grid-template-columns: 1fr 20px;
    gap: 5px;
    font-size: 11px;
    padding: 15px;
  }
  .map-flight-rows strong,
  .map-flight-rows span,
  .map-flight-rows small {
    grid-column: 1;
  }
  .map-flight-rows .icon {
    grid-column: 2;
    grid-row: 1/4;
  }
  .geo-map {
    height: 230px;
  }
  .flight-card .geo-map {
    height: 215px;
  }
  .compact-geo-map .geo-map {
    height: 230px;
  }
}

[data-storage-retry][hidden] { display: none; }

.photo-grid figure { margin:0; display:grid; gap:8px; }
.pwa-install { position:fixed; bottom:24px; right:24px; z-index:25; }
.connection-status { position:fixed; top:0; left:0; right:0; background:#80441b; color:white; text-align:center; padding:8px 16px; z-index:80; font-size:14px; }
@media(max-width:700px) { .pwa-install { bottom:88px; } }
.pwa-install[hidden], .connection-status[hidden] { display:none; }

.backup-summary { width:100%; border-collapse:collapse; margin:16px 0; }
.backup-summary th, .backup-summary td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--border); }
.restore-confirmation { display:flex; align-items:flex-start; gap:10px; margin:20px 0; }
.restore-confirmation input { width:18px; height:18px; min-height:18px; flex:0 0 18px; margin-top:3px; }

.app-version { background:none; border:0; padding:0; color:var(--muted); font:inherit; font-size:12px; cursor:pointer; text-decoration:underline dotted; text-underline-offset:4px; }
.dhv-recognition { margin:18px 0; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--panel); }
.dhv-recognition h3 { margin:0 0 12px; }
.dhv-match-rows { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; margin-bottom:14px; }
.dhv-match-rows p { margin:6px 0; }
.dhv-match-rows small { color:var(--muted); }
.dhv-recognition .source-details { margin-top:12px; }
.app-version:hover { color:var(--text); }
.app-version:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
.release-history-dialog { width:min(760px,calc(100vw - 32px)); max-height:80dvh; padding:0; overflow:hidden; }
.release-history-dialog[open] { display:flex; flex-direction:column; }
.release-history-dialog .dialog-head { flex-shrink:0; }
.release-history-body { overflow:auto; padding:6px 25px 24px; }
.release-entry { padding:24px 0; border-bottom:1px solid var(--border); }
.release-entry:last-child { border-bottom:0; padding-bottom:0; }
.release-entry h3 { font-size:15px; margin:0 0 12px; }
.release-entry time { color:var(--muted); font-family:ui-monospace,monospace; font-weight:400; }
.latest-release strong { color:var(--accent); }
.release-entry ul { padding-left:20px; line-height:1.65; color:var(--muted); }
.release-entry li + li { margin-top:8px; }
.update-banner { position:fixed; z-index:90; bottom:22px; right:22px; max-width:490px; width:calc(100vw - 44px); background:var(--panel); border:1px solid var(--border); border-radius:16px; padding:20px; box-shadow:0 12px 40px #0005; }
.update-banner[hidden] { display:none; }
.update-banner > div { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:14px; }
.update-text { font-weight:600; }
.update-feedback { color:var(--muted); font-size:13px; }
.update-feedback:empty { display:none; }
@media(max-width:700px){ .update-banner { bottom:85px; right:16px; width:calc(100vw - 32px); padding:16px; } .release-history-body { padding:6px 20px 20px; } }

.track-quality{margin:1rem 0;padding:1rem;border:1px solid var(--border);border-radius:12px;background:var(--panel)}
.track-quality h3{margin-top:0}.track-quality p,.track-quality li{line-height:1.6}.track-quality details{margin-top:.7rem}.track-quality summary{cursor:pointer}.track-quality.has-warnings{border-color:#c88730}.quality-band{fill:#f59e0b;opacity:.22}.track-quality ul{padding-left:1.25rem}.quality-marker{cursor:help}

.track-warning{color:var(--warn);font-size:.85rem}

.replay-controls{margin:.8rem 0;padding:1rem;border:1px solid var(--border);border-radius:12px;background:var(--card)}.replay-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem}.replay-actions label{display:flex;align-items:center;gap:.4rem}.replay-actions select{width:auto}.replay-timeline{display:block;margin-top:.8rem}.replay-timeline input{display:block;width:100%;accent-color:var(--accent)}.replay-controls output{display:block;font-family:"Geist Mono",monospace;font-size:.85rem}.replay-values{display:flex;gap:.7rem;flex-wrap:wrap;font-size:.85rem}.replay-controls [data-replay-status]{min-height:1.5em;font-size:.85rem;color:var(--muted)}.replay-chart{cursor:crosshair}.replay-cursor{stroke:#ef4444;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.replay-marker{pointer-events:none}

.replay-chart-choice{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin-top:1rem}.replay-chart-choice select{width:auto;max-width:100%}.replay-values small{color:var(--muted)}
dialog.replay-expanded{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.replay-expanded .detail-map .geo-map{height:clamp(280px,45dvh,650px)}#dialog-content:fullscreen{width:100vw;height:100dvh;overflow:auto;background:var(--bg);color:var(--text)}
@media(max-width:700px){.replay-expanded .detail-map .geo-map{height:35dvh;min-height:220px}.replay-actions .btn{flex:1 1 auto}}

.replay-view-controls,.replay-view-controls [data-replay-3d-controls]{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem;margin-top:.8rem}.replay-view-controls label{display:flex;align-items:center;gap:.4rem}.replay-view-controls select{width:auto}.replay-view-controls input[type=color]{width:42px;height:32px;padding:2px}.replay-view-controls [hidden]{display:none}.terrain-stage{height:380px;position:relative;border-radius:12px;overflow:hidden;background:#263746}.terrain-stage canvas{display:block;width:100%;height:100%;touch-action:none}.terrain-marker-label{position:absolute;transform:translate(-50%,-140%);pointer-events:none;background:#172532e8;color:#fff;padding:5px 8px;border-radius:6px;font-size:11px;white-space:nowrap}.terrain-compass{position:absolute;top:15px;right:15px;pointer-events:none;color:white;font-weight:700}.terrain-scale{position:absolute;bottom:10px;left:10px;pointer-events:none;color:white;background:#172532cf;padding:4px 6px;font-size:10px}.terrain-load,.terrain-reference,.terrain-credits{font-size:11px;line-height:1.6;color:var(--muted);margin-top:.5rem}.terrain-credits summary{cursor:pointer}.terrain-reference{padding:.5rem;border-left:3px solid var(--accent)}.replay-expanded .terrain-stage{height:45dvh;min-height:300px}@media(max-width:700px){.terrain-stage{height:300px}.replay-expanded .terrain-stage{height:35dvh;min-height:240px}}
[data-terrain-retry][hidden]{display:none}
.terrain-marker-label[hidden]{display:none}
/* Cesium is loaded only when selected; keep its viewport inside the replay. */
.cesium-stage .cesium-viewer,.cesium-stage .cesium-viewer-cesiumWidgetContainer,.cesium-stage .cesium-widget{width:100%;height:100%}.cesium-stage canvas{outline-offset:-3px}.cesium-credit{font-size:.75rem;color:var(--muted);line-height:1.6}.cesium-credit a{color:inherit}.cesium-stage .cesium-viewer-bottom{max-width:100%}

/* Flight selection and reviewed batch operations */
.bulk-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:16px;margin-bottom:18px}
.bulk-toolbar small{flex-basis:100%;color:var(--muted)}
.flight-selection{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:.85rem;cursor:pointer}
.flight-selection input,.management-list input{width:20px;height:20px;accent-color:var(--accent)}
.compact-row>.flight-selection{margin:0 8px;flex-shrink:0}
.compact-row>.flight-selection span{display:none}
.management-list{list-style:none;padding:0;max-height:55vh;overflow:auto}
.management-list>li{padding:14px 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.management-list label{display:flex;align-items:center;gap:8px}
.management-list p{margin:8px 0;color:var(--muted)}
@media(max-width:600px){.bulk-toolbar .btn{flex:1 1 140px}.bulk-toolbar strong{flex-basis:100%}.management-list{max-height:48vh}}

.management-list p.error{color:#ef4444}

.statistics-section{padding:20px;margin-bottom:20px;min-width:0}
.statistics-section .card-head{padding:0 0 16px}
.comparison-controls{display:flex;flex-wrap:wrap;gap:14px}
.comparison-controls label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:120px}
.statistics-table-wrap{overflow-x:auto;max-width:100%}
.statistics-table{border-collapse:collapse;width:100%;font-size:13px}
.statistics-table caption{text-align:left;color:var(--muted);padding:12px 0}
.statistics-table th,.statistics-table td{padding:12px 8px;border-bottom:1px solid var(--border);text-align:right;vertical-align:top}
.statistics-table th:first-child{text-align:left;min-width:110px}
.statistics-table td{white-space:nowrap}
.statistics-table th small{display:block;color:var(--muted);font-weight:400;max-width:260px;margin-top:6px}
.statistics-table th .btn{padding:0;text-align:left;white-space:normal;overflow-wrap:anywhere}
.statistics-table tfoot{font-weight:600}
.statistics-groups{margin:24px 0}.statistics-groups h2{font-size:20px;margin:0}
.statistics-groups .statistic-grid{align-items:start}
.stat-filter{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
@media(max-width:600px){.statistics-section{padding:16px}.comparison-controls label:last-child{flex-basis:100%}.statistics-table{font-size:12px}.statistics-table th,.statistics-table td{padding:10px 6px}}
.ground-profile{padding:18px;margin:20px 0;min-width:0}.ground-profile h3{margin-top:0}.ground-profile output{display:block;line-height:1.7;margin:12px 0}.ground-profile input[type=range]{width:100%}.ground-profile .altitude{width:100%;min-height:170px}.ground-profile details{margin-top:16px}.ground-profile [data-ground-result]>label{display:block;margin:12px 0}.ground-profile .form-grid{margin-top:16px}
.flight-analysis,.share-flight-card{padding:18px;margin:20px 0;min-width:0}.flight-analysis h3,.share-flight-card h3{margin-top:0}.share-options{display:flex;flex-wrap:wrap;gap:14px;margin-bottom:16px}.share-flight-card img{display:block;width:100%;height:auto;margin-top:16px}.achievement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.achievement-grid h3{font-size:16px}.achievement-grid progress{width:100%;accent-color:var(--accent)}@media(max-width:600px){.achievement-grid{grid-template-columns:1fr}.share-options{flex-direction:column}}
.detail-layout>div{min-width:0}.ground-profile [hidden],.share-flight-card [hidden]{display:none!important}.ground-profile input[type=checkbox],.share-options input[type=checkbox]{width:auto;margin-right:8px}.flight-analysis p,.ground-profile p,.share-flight-card p{overflow-wrap:anywhere}

/* Flight replay: optional Mapbox view. */
.replay-view-controls [data-replay-mapbox-controls][hidden] { display:none; }
.replay-view-controls [data-replay-mapbox-controls] { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.terrain-reference[hidden] { display:none; }
.mapbox-stage .mapboxgl-canvas { width:100%; height:100%; }
.mapbox-endpoint { padding:3px 7px; border:2px solid #fff; border-radius:12px; color:#10232c; font-size:11px; font-weight:700; }
.mapbox-stage .mapboxgl-ctrl-attrib { color:#111; background:rgba(255,255,255,.9); }
.mapbox-stage .mapboxgl-ctrl-attrib a { color:#111; }
.mapbox-climb-legend{padding:10px 12px;font-size:12px;background:var(--panel);border:1px solid var(--line);border-radius:10px;margin:10px 0}.mapbox-climb-legend[hidden]{display:none}.mapbox-climb-scale{height:10px;border-radius:5px;margin-top:8px;background:linear-gradient(to right,#1d4ed8 0%,#06b6d4 30%,#22c55e 50%,#facc15 70%,#ef4444 100%)}.mapbox-climb-ticks{display:flex;justify-content:space-between;margin:4px 0}.mapbox-climb-unknown{display:inline-block;width:12px;height:8px;background:#94a3b8}
/* Approved replay-first flight detail, scoped to flight dialogs. */
dialog.detail-dialog{width:calc(100vw - 32px);max-width:1660px;max-height:calc(100dvh - 32px);--flight-map-height:480px}.detail-dialog .dialog-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 24px;background:var(--surface)}.detail-dialog .dialog-head>div:first-child{flex:1;min-width:180px}.detail-dialog .dialog-head h2{font-size:25px}.detail-dialog .dialog-head p{margin-top:5px}.detail-dialog .flight-header-actions{margin:0;padding:0;border:0;gap:7px;background:none;display:flex;flex-wrap:wrap}.detail-dialog .flight-header-actions [data-close]{display:none}.detail-dialog .flight-header-actions .btn{font-size:12px;padding:8px 11px;min-height:40px}.detail-dialog .flight-header-actions .flight-nav{font-size:23px;padding:0;width:36px}.detail-dialog .dialog-body{padding:0 24px 24px}.flight-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:0 -24px 20px;background:var(--surface);border-bottom:1px solid var(--border)}.flight-summary>div{padding:14px 24px;border-right:1px solid var(--border)}.flight-summary small{display:block;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.flight-summary strong{display:block;font:600 22px 'Geist Mono',monospace;margin-top:4px;white-space:nowrap}.detail-dialog .detail-layout{grid-template-columns:minmax(0,1fr) 350px;gap:20px}.flight-replay-stage{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--surface)}.detail-dialog .detail-map{position:relative;margin:0;border:0;border-radius:0;min-width:0}.detail-dialog .detail-map .geo-map,.detail-dialog .terrain-stage{height:var(--flight-map-height);border-radius:0;min-height:0}.detail-dialog .detail-map .geo-map-wrap{border:0;border-radius:0}.flight-map-modes{position:absolute;left:16px;top:16px;display:flex;gap:4px;z-index:405;padding:4px;background:var(--panel);border:1px solid var(--border);border-radius:12px}.flight-map-modes button{border:0;border-radius:8px;padding:8px 12px;background:transparent;color:var(--text);font:600 12px Geist,system-ui;min-height:36px;cursor:pointer}.flight-map-modes button[aria-pressed=true]{background:#2470c8;color:#fff}.flight-map-settings{position:absolute;right:115px;top:16px;z-index:410}.flight-map-settings>summary{list-style:none;padding:11px 14px;border:1px solid var(--border);border-radius:10px;background:var(--panel);cursor:pointer;font-size:12px}.flight-map-settings>summary::-webkit-details-marker{display:none}.flight-map-settings[open]{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:10px;width:min(340px,calc(100vw - 42px));right:16px;top:66px;max-height:calc(var(--flight-map-height) - 70px);overflow:auto}.flight-map-settings[open]>summary{border:0;padding:3px 2px;font-weight:600}.flight-map-settings .replay-view-controls{display:flex;flex-direction:column;align-items:stretch;margin-top:10px;font-size:12px}.flight-map-settings .replay-view-controls label{flex-wrap:wrap;justify-content:space-between}.flight-map-settings .replay-view-controls select{max-width:100%;min-width:0;font-size:12px}.flight-map-settings .replay-view-controls [data-replay-mapbox-controls],.flight-map-settings .replay-view-controls [data-replay-3d-controls]{display:flex;flex-direction:column;align-items:stretch}.flight-map-follow{display:block;margin-top:10px;padding-top:8px;border-top:1px solid var(--border);font-size:12px}.flight-map-follow input{width:auto}.flight-map-fullscreen{position:absolute;right:16px;top:16px;z-index:405;font-size:12px;min-height:44px;background:var(--panel)}.flight-replay-hud{position:absolute;top:calc(var(--flight-map-height) - 98px);left:16px;z-index:405;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--border);gap:1px;max-width:calc(100% - 32px);min-width:400px;pointer-events:none}.flight-replay-hud>div{padding:10px 14px;background:var(--panel)}.flight-replay-hud small{display:block;font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}.flight-replay-hud strong{display:block;font:600 20px 'Geist Mono',monospace;white-space:nowrap;margin:3px 0}.flight-replay-hud [data-replay-gps]{color:#7dbbf7}.flight-replay-hud [data-replay-climb]{color:#f5a06b}.flight-replay-hud .flight-hud-sub,.flight-replay-hud [data-replay-climb-source]{font-size:10px;color:var(--muted);text-transform:none;letter-spacing:0}.flight-hud-sub strong{display:inline;font:inherit}.detail-dialog .detail-map .leaflet-top.leaflet-left{top:auto;bottom:105px;left:auto;right:10px}.detail-dialog .mapbox-stage .mapboxgl-ctrl-top-right{top:76px}.detail-dialog .flight-replay-dock{padding:14px 18px;margin:0;border-radius:0;border:0;border-top:1px solid var(--border);background:var(--surface)}.flight-replay-dock .replay-actions{gap:8px;align-items:center}.flight-replay-dock [data-replay-toggle]{border-radius:50%;min-width:64px;min-height:48px;background:#2470c8;color:#fff;border:0;font-size:12px}.flight-replay-dock .replay-actions .btn{font-size:11px}.flight-replay-dock .replay-timeline{font-size:10px;margin:6px 0}.flight-replay-dock [data-replay-clock]{font:600 14px 'Geist Mono',monospace}.flight-replay-dock [data-replay-status]{font-size:10px;margin:3px 0;color:var(--muted)}.flight-replay-dock .replay-chart-choice{font-size:12px;display:inline-flex;align-items:center;gap:10px;margin-top:10px;margin-right:12px}.flight-replay-dock [data-replay-chart-toggle]{font-size:11px}.flight-main-chart{padding:0 18px 12px}.flight-main-chart .altitude{height:175px;border-radius:10px;background:var(--panel)}.flight-main-chart .chart-title{margin:10px 0}.flight-main-chart .chart-axis{font-size:10px}.flight-main-chart .missing-data{font-size:10px}.flight-detail-tabs{display:flex;gap:2px;padding:4px;background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-bottom:14px}.flight-detail-tabs button{flex:1;min-width:0;border:0;border-radius:8px;min-height:40px;padding:8px 3px;background:transparent;color:var(--muted);font:600 12px Geist,system-ui;cursor:pointer}.flight-detail-tabs button[aria-selected=true]{background:var(--accent-soft);color:var(--text)}.flight-detail-tabpanel[hidden]{display:none}.flight-detail-side article,.flight-detail-side .detail-notes,.flight-detail-shortcuts{background:var(--surface);border:1px solid var(--border);border-radius:14px;margin-bottom:14px}.flight-detail-side .detail-panel{overflow:hidden}.flight-detail-side .flight-card-title{font-size:14px;padding:16px 15px 0;margin:0}.flight-detail-side .detail-primary{padding:14px 15px}.flight-detail-side .metric-line{padding:9px 15px;font-size:12px}.flight-detail-side .metric-line strong{font-size:12px}.flight-detail-side .panel-hint{padding:12px 15px;font-size:10px}.flight-detail-side .detail-notes{padding:16px;margin-top:0}.flight-detail-side .detail-notes summary{font-size:14px}.flight-detail-side .detail-notes textarea{font-size:13px;min-height:100px}.flight-detail-side .detail-context{font-size:12px;margin-bottom:12px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.flight-detail-shortcuts{padding:16px}.flight-detail-shortcuts h3{margin:0 0 12px;font-size:14px}.flight-detail-shortcuts .btn{width:100%;justify-content:center;margin:4px 0;font-size:12px}.flight-detail-side .ground-profile,.flight-detail-side .flight-analysis,.flight-detail-side .share-flight-card{padding:16px;margin-bottom:14px}.flight-detail-side .form-grid{grid-template-columns:1fr}.flight-detail-side .ground-profile input,.flight-detail-side .share-flight-card input{min-width:0;max-width:100%}.flight-detail-side .ground-profile .altitude{height:140px}.flight-detail-side .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.flight-replay-info{margin:14px 0;border:1px solid var(--border);border-radius:12px;padding:14px;font-size:12px}.flight-replay-info summary{cursor:pointer}.detail-dialog button:focus-visible,.flight-detail-tabs button:focus-visible,.flight-map-settings summary:focus-visible{outline:2px solid #5ea8f2;outline-offset:2px}.detail-dialog .terrain-reference,.detail-dialog .terrain-load,.detail-dialog .terrain-credits,.detail-dialog .mapbox-climb-legend{margin:8px 12px;font-size:10px}.detail-dialog .flight-detail-side [hidden]{display:none!important}
@media(max-width:1100px) and (min-width:761px){.detail-dialog .detail-layout{grid-template-columns:minmax(0,1fr) 300px}.flight-summary strong{font-size:17px}.flight-summary>div{padding:12px 16px}.flight-replay-hud{min-width:0;width:calc(100% - 32px)}.flight-replay-hud strong{font-size:17px}.flight-map-modes{left:10px;gap:0}.flight-map-modes button{padding:7px;font-size:11px}.flight-map-settings{right:96px}.flight-map-fullscreen{right:10px;font-size:11px}}
@media(max-width:760px){dialog.detail-dialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border-radius:0;--flight-map-height:330px}.detail-dialog .dialog-head{padding:12px;gap:8px}.detail-dialog .dialog-head h2{font-size:23px}.detail-dialog .dialog-head p{font-size:11px}.detail-dialog .flight-header-actions{width:100%;gap:5px}.detail-dialog .flight-header-actions .btn{flex:0 1 auto;font-size:10px;padding:6px 8px;min-height:34px}.detail-dialog .flight-header-actions .flight-nav{width:30px;font-size:22px}.detail-dialog .dialog-body{padding:0}.flight-summary{margin:0;grid-template-columns:repeat(3,minmax(0,1fr))}.flight-summary>div{padding:10px 12px;border-bottom:1px solid var(--border)}.flight-summary strong{font-size:15px}.flight-summary small{font-size:9px}.detail-dialog .detail-layout{display:block;gap:0}.flight-replay-stage{border:0;border-radius:0}.flight-map-modes{left:10px;top:10px;padding:3px;gap:0}.flight-map-modes button{padding:7px 9px;font-size:10px;min-height:32px}.flight-map-settings{top:10px;right:99px}.flight-map-settings>summary{font-size:10px;padding:10px}.flight-map-fullscreen{top:10px;right:10px;font-size:10px;padding:9px;min-height:36px}.flight-map-settings[open]{top:55px;right:10px}.flight-replay-hud{left:10px;top:calc(var(--flight-map-height) - 93px);width:calc(100% - 20px);min-width:0;max-width:none}.flight-replay-hud>div{padding:9px 8px}.flight-replay-hud strong{font-size:16px;white-space:normal}.flight-replay-hud small{font-size:9px}.flight-replay-hud [data-replay-climb-source]{font-size:9px}.detail-dialog .flight-replay-dock{padding:10px 12px}.flight-replay-dock .replay-actions{display:flex;gap:6px}.flight-replay-dock .replay-actions .btn{flex:0 1 auto;font-size:10px;padding:8px;min-width:0}.flight-replay-dock [data-replay-toggle]{min-width:64px}.flight-replay-dock .replay-actions label{font-size:10px}.flight-replay-dock .replay-actions select{font-size:11px;max-width:65px}.flight-replay-dock [data-replay-clock]{font-size:12px}.flight-replay-dock .replay-chart-choice{margin-top:6px;font-size:11px}.flight-replay-dock .replay-chart-choice select{font-size:11px;max-width:180px}.flight-main-chart{padding:0 12px 12px}.flight-main-chart .altitude{height:105px}.flight-main-chart .chart-title,.flight-main-chart .altitude-legend,.flight-main-chart .chart-axis,.flight-main-chart .missing-data{font-size:9px}.flight-detail-side{padding:0 12px 20px}.flight-detail-tabs{margin:0 -12px 12px;border-radius:0;border-left:0;border-right:0;padding:0 8px}.flight-detail-tabs button{min-height:44px;font-size:12px;border-radius:0;border-bottom:2px solid transparent}.flight-detail-tabs button[aria-selected=true]{background:transparent;border-bottom-color:#5ea8f2}.flight-detail-side .detail-primary{display:none}.flight-detail-side .metric-line{font-size:12px}.flight-detail-side .panel-hint{font-size:10px}.flight-detail-shortcuts .btn{min-height:42px}.detail-dialog .terrain-reference,.detail-dialog .terrain-load,.detail-dialog .mapbox-climb-legend{font-size:10px}.detail-dialog .mapbox-stage .mapboxgl-ctrl-top-right{top:60px}}
.detail-dialog{--surface:var(--solid)}.flight-detail-side .track-quality,.flight-detail-side .dhv-recognition{padding:14px;border:1px solid var(--border);border-radius:12px;margin:0 0 14px;font-size:11px}.flight-detail-side .track-quality h3{font-size:13px}.flight-detail-side .track-quality p,.flight-detail-side .track-quality li{font-size:10px}.flight-detail-side .flight-analysis .analysis-grid{grid-template-columns:1fr}
.detail-dialog .flight-map-settings{z-index:1100}.detail-dialog .flight-map-modes,.detail-dialog .flight-map-fullscreen,.detail-dialog .flight-replay-hud{z-index:1000}.detail-dialog .flight-map-settings [hidden]{display:none!important}.detail-dialog .geo-map-label{top:72px;left:16px}.detail-dialog .tile-status{bottom:110px;pointer-events:none}
@media(max-width:380px){.flight-map-modes button{padding:7px 5px;font-size:9px}.flight-map-settings{right:83px}.flight-map-fullscreen{font-size:9px;padding:8px}.flight-map-settings>summary{padding:9px 7px}}
.flight-mobile-meta{display:none}
@media(max-width:760px){.detail-dialog .flight-header-actions{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:3px}.detail-dialog .flight-header-actions .btn{flex-shrink:0}.flight-summary{display:none}.flight-mobile-meta{display:block;margin-top:4px;color:var(--text)}.flight-detail-side .detail-primary{display:grid}}
/* Shared flight diagrams: clear grids, honest gaps and synchronized terrain. */
.detail-dialog .flight-main-chart{padding:4px 18px 18px}.flight-main-chart .chart-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 10px}.flight-main-chart .chart-title strong{font-size:16px}.flight-main-chart .chart-title small{font-size:11px;color:var(--muted)}.flight-chart-legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:11px;color:var(--muted);margin:0 0 12px}.flight-chart-legend span:before{content:'';display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#5eabf7}.flight-chart-legend .chart-baro-key:before{background:#d5a86d}.flight-chart-legend .chart-ground-key:before{background:#69b68d}.flight-chart-legend .chart-agl-key:before{background:#b5a0fa}.flight-chart-legend .chart-climb-key:before{background:#40c589}.flight-chart-legend .chart-sink-key:before{background:#f59e69}.flight-chart-frame{background:var(--panel);border:1px solid var(--border);border-radius:12px;overflow:hidden}.detail-dialog .flight-main-chart .altitude{height:280px;display:block;border:0;border-radius:0;background:none;color:var(--muted);touch-action:pan-y;cursor:crosshair}.flight-main-chart svg text{fill:var(--muted);font:11px Geist,system-ui}.chart-grid-tick line{stroke:var(--border);stroke-width:1;vector-effect:non-scaling-stroke}.chart-time-tick line{stroke:var(--border);stroke-dasharray:3 5;vector-effect:non-scaling-stroke}.chart-zero{stroke:var(--muted);stroke-width:1;vector-effect:non-scaling-stroke}.flight-main-chart .chart-agl-axis{fill:#b5a0fa;font-size:9px}.flight-main-chart .replay-cursor{stroke:#ef4444;stroke-width:1.5;vector-effect:non-scaling-stroke}.chart-summary{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;font-size:11px;margin:10px 0;color:var(--muted)}.chart-summary strong{font-weight:600}.chart-max{color:#40c589}.chart-min{color:#f87171}.chart-summary>span:last-child{margin-left:auto;font-size:10px}.chart-readout{display:block;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--panel);font:11px 'Geist Mono',monospace;line-height:1.7;min-height:38px}.chart-data-note{font-size:10px;line-height:1.6;color:var(--muted);margin:10px 0 0}.flight-main-chart svg .quality-band{fill:#f59e0b;opacity:.1}
@media(max-width:760px){.detail-dialog .flight-main-chart{padding:4px 12px 14px}.detail-dialog .flight-main-chart .altitude{height:230px}.flight-main-chart .chart-title strong{font-size:14px}.flight-main-chart .chart-title small{font-size:9px}.flight-chart-legend{gap:7px 12px;font-size:10px}.flight-main-chart svg text{font-size:16px}.flight-main-chart svg .chart-agl-axis{font-size:12px}.flight-main-chart .chart-tick-minor{display:none}.chart-summary{font-size:10px}.chart-summary>span:last-child{width:100%;margin-left:0}.chart-readout{font-size:10px}.chart-data-note{font-size:10px}}
/* Compact flight HUD and map-only fullscreen. */
.detail-dialog .flight-replay-hud{grid-template-columns:repeat(4,minmax(0,1fr));top:calc(var(--flight-map-height) - 84px);width:440px;min-width:0;max-width:calc(100% - 32px);border-radius:9px}.detail-dialog .flight-replay-hud>div{padding:6px 9px;min-width:0}.detail-dialog .flight-replay-hud small{font-size:8px;letter-spacing:.03em}.detail-dialog .flight-replay-hud strong{font-size:16px;line-height:1.35;margin:2px 0;white-space:nowrap}.detail-dialog .flight-replay-hud .flight-hud-sub,.detail-dialog .flight-replay-hud [data-replay-climb-source]{display:block;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.detail-dialog .flight-replay-hud .flight-hud-sub strong{display:inline;font:inherit;margin:0}.detail-dialog [data-replay-agl]{color:#b5a0fa}.detail-dialog .tile-status{bottom:90px}
dialog.detail-dialog.replay-expanded{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;--flight-map-height:100dvh;overflow:hidden}.detail-dialog.replay-expanded .dialog-head,.detail-dialog.replay-expanded .flight-summary,.detail-dialog.replay-expanded .flight-detail-side,.detail-dialog.replay-expanded .replay-controls,.detail-dialog.replay-expanded [data-replay-charts]{display:none!important}.detail-dialog.replay-expanded .dialog-body{padding:0}.detail-dialog.replay-expanded .detail-layout{display:block;margin:0}.detail-dialog.replay-expanded .flight-replay-stage{border:0;border-radius:0}.detail-dialog.replay-expanded .detail-map,.detail-dialog .detail-map:fullscreen{width:100%;height:100dvh;--flight-map-height:100dvh;background:var(--bg);color:var(--text);overflow:hidden}.detail-dialog.replay-expanded .detail-map .geo-map,.detail-dialog.replay-expanded .detail-map .terrain-stage,.detail-dialog .detail-map:fullscreen .geo-map,.detail-dialog .detail-map:fullscreen .terrain-stage{height:100dvh;min-height:0}.detail-dialog.replay-expanded .terrain-load,.detail-dialog.replay-expanded .terrain-reference,.detail-dialog.replay-expanded .terrain-credits,.detail-dialog.replay-expanded .mapbox-climb-legend{display:none!important}
@media(max-width:760px){.detail-dialog .flight-replay-hud{width:calc(100% - 20px);max-width:none;top:calc(var(--flight-map-height) - 78px)}.detail-dialog .flight-replay-hud>div{padding:5px 6px}.detail-dialog .flight-replay-hud strong{font-size:13px}.detail-dialog .flight-replay-hud small{font-size:7.5px}.detail-dialog .flight-replay-hud .flight-hud-sub,.detail-dialog .flight-replay-hud [data-replay-climb-source]{font-size:7px}}
.detail-dialog.replay-expanded .flight-map-fullscreen{width:42px;height:42px;padding:0;font-size:22px}.detail-dialog.replay-expanded .flight-map-settings{right:72px}@media(max-width:760px){.detail-dialog.replay-expanded .flight-map-fullscreen{width:36px;height:36px;font-size:20px}.detail-dialog.replay-expanded .flight-map-settings{right:60px}.detail-dialog.replay-expanded .flight-map-settings[open]{right:10px}}

/* Replay transport: start, play/pause, end, clock and playback speed. */
.flight-replay-dock{container-type:inline-size}
.flight-replay-dock .replay-actions{flex-wrap:nowrap;gap:8px}
.flight-replay-dock .replay-actions .replay-transport{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:34px;min-width:30px;min-height:34px;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text)}
.flight-replay-dock .replay-actions [data-replay-toggle]{flex-basis:40px;width:40px;height:40px;min-width:40px;min-height:40px;border:0;border-radius:50%;background:#2470c8;color:#fff}
.replay-transport svg{width:16px;height:16px}
.flight-replay-dock [data-replay-clock]{flex:0 0 auto;min-width:105px;margin:0 4px;font-family:'Geist Mono',monospace;line-height:1.4}
.replay-clock-primary{display:block;white-space:nowrap}
.replay-clock-primary strong{font-size:16px;font-weight:700}
.replay-clock-primary small{font-size:7px;font-weight:400;color:var(--muted)}
[data-replay-clock-progress]{display:block;font-size:10px;font-weight:400;white-space:nowrap;color:var(--muted)}
.flight-replay-dock .replay-tempo{gap:6px;font-size:10px;color:var(--muted)}
.flight-replay-dock .replay-tempo select{min-height:32px;min-width:64px;font-size:12px;border-radius:8px;padding:5px 8px}
@container(max-width:580px){
 .flight-replay-dock .replay-actions{gap:5px}
 .flight-replay-dock .replay-actions .replay-transport{flex:0 0 28px;width:28px;height:30px;min-width:28px;min-height:30px;padding:0;border-radius:10px}
 .flight-replay-dock .replay-actions [data-replay-toggle]{flex-basis:34px;width:34px;height:34px;min-width:34px;min-height:34px;border-radius:50%}
 .replay-transport svg{width:15px;height:15px}
 .flight-replay-dock [data-replay-clock]{flex:1 1 auto;min-width:0;margin:0 3px}
 .replay-clock-primary strong{font-size:14px}
 .replay-clock-primary small{font-size:7px}
 [data-replay-clock-progress]{font-size:9px}
 .flight-replay-dock .replay-tempo-label{display:none}
 .flight-replay-dock .replay-tempo select{min-width:54px;min-height:30px;font-size:11px;padding:4px 6px}
}

@container(max-width:320px){
 .replay-clock-primary strong{font-size:13px}
 [data-replay-clock-progress]{font-size:9px}
}

.detail-dialog .flight-replay-dock{padding:8px 12px}
.flight-replay-dock .replay-timeline{font-size:9px;margin:4px 0}
.flight-replay-dock [data-replay-status]{font-size:9px;margin:2px 0}
.flight-replay-dock .replay-chart-choice{font-size:10px;gap:6px;margin-top:6px;margin-right:8px}
.flight-replay-dock .replay-chart-choice select,.flight-replay-dock [data-replay-chart-toggle]{font-size:10px;min-height:28px;padding:4px 8px}

.photo-import-group { margin-top: 24px; }
.photo-import-list { list-style: none; padding: 0; margin: 0; }
.photo-import-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.photo-import-list img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.photo-import-list li > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.photo-import-list label { display: grid; gap: 6px; margin-top: 10px; }
.photo-import-list select { width: 100%; min-width: 0; }
.photo-import-list p { margin: 6px 0; }
@media (max-width: 600px) { .photo-import-list img { width: 52px; height: 52px; } .photo-import-list li { gap: 10px; } }

/* Flight photos keep controls on the pictures and leave space for the gallery. */
.flight-photos > summary { display: flex; align-items: center; gap: 8px; list-style: none; }
.flight-photos > summary::-webkit-details-marker { display: none; }
.flight-photos > summary::before { content: '▸'; }
.flight-photos[open] > summary::before { content: '▾'; }
.flight-photos > summary > span { flex: 1; }
.photo-upload { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.photo-upload:hover { background: var(--surface); }
.flight-photos .photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.flight-photos .photo-grid figure { position: relative; display: block; min-width: 0; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--surface); }
.flight-photos .photo-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.photo-remove, .photo-viewer-close { display: flex; align-items: center; justify-content: center; position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; padding: 8px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(10,18,28,.8); color: #fff; cursor: pointer; }
.photo-remove:hover, .photo-viewer-close:hover { background: #152637; }
.photo-upload:focus-visible, .photo-open:focus-visible, .photo-remove:focus-visible, .photo-viewer-close:focus-visible { outline: 2px solid #68c6f4; outline-offset: 2px; }
dialog.photo-viewer { position: fixed; width: calc(100vw - 32px); max-width: 1400px; height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); padding: 12px; border-radius: 14px; background: #0b111b; overflow: hidden; }
.photo-viewer::backdrop { background: rgba(0,0,0,.85); }
.photo-viewer > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-viewer-close { top: 12px; right: 12px; z-index: 1; }
