@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-700.woff2') format('woff2');
}
@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 {
  --button-height: 44px;
  --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: 30px;
  height: 30px;
  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: 30px;
  height: 30px;
  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: 36px;
  height: 36px;
  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;
}
.overview-heading h1 {
  color: var(--accent);
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  min-height: 28px;
  white-space: nowrap;
}
.btn .icon {
  width: 14px;
  height: 14px;
}
.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;
  min-height: 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: 6px 10px;
  width: 100%;
  font-size: 11px;
}
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: 14px 20px;
  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 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  padding: 0;
  list-style: none;
}
.detail-notes > summary::-webkit-details-marker {
  display: none;
}
.detail-notes > summary::before {
  content: '▸';
  flex: 0 0 12px;
  font-size: 12px;
}
.detail-notes[open] > summary::before {
  content: '▾';
}
.detail-notes > summary > span {
  flex: 1;
}
.detail-notes[open] > summary {
  margin-bottom: 8px;
}
.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(54px + 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: 54px;
    height: 42px;
    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: 30px;
    height: 30px;
  }
  .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: 12px 16px;
  }
  .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: 16px;
  gap: 8px;
  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: 32px;
}
.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: 5px 8px;
  }
  .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,
.mapbox-endpoint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.pj-map-pin > span,
.mapbox-endpoint > .start-dot,
.mapbox-endpoint > .landing-dot {
  display: block;
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
  border: 2px solid white;
  box-shadow: 0 1px 5px #0008;
}
.pj-map-pin > .place-dot {
  border-radius: 50%;
  background: var(--accent);
}
.own-pin > .place-dot {
  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: 0.7rem;
}
.track-quality summary {
  cursor: pointer;
}
.track-quality.has-warnings {
  border-color: #c88730;
}
.quality-band {
  fill: #f59e0b;
  opacity: 0.22;
}
.track-quality ul {
  padding-left: 1.25rem;
}
.quality-marker {
  cursor: help;
}

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

.replay-controls {
  margin: 0.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: 0.6rem;
}
.replay-actions label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.replay-actions select {
  width: auto;
}
.replay-timeline {
  display: block;
  margin-top: 0.8rem;
}
.replay-timeline input {
  display: block;
  width: 100%;
  accent-color: var(--accent);
}
.replay-controls output {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 0.85rem;
}
.replay-values {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.replay-controls [data-replay-status] {
  min-height: 1.5em;
  font-size: 0.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: 0.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: 0.7rem;
  margin-top: 0.8rem;
}
.replay-view-controls label {
  display: flex;
  align-items: center;
  gap: 0.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: 0.5rem;
}
.terrain-credits summary {
  cursor: pointer;
}
.terrain-reference {
  padding: 0.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: 0.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: 0.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;
  table-layout: auto;
  width: 100%;
  min-width: 520px;
  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;
  white-space: nowrap;
}
.statistics-table th:first-child {
  text-align: left;
  min-width: 150px;
  white-space: normal;
}
.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-label {
  position: absolute;
  left: 23px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 7px;
  border-radius: 6px;
  background: #172532e8;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.mapbox-stage .mapboxgl-ctrl-attrib {
  color: #111;
  background: rgba(255, 255, 255, 0.9);
}
.mapbox-stage .mapboxgl-ctrl-attrib a {
  color: #111;
}
/* 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: 8px;
  padding: 12px 20px;
  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: 11px;
  padding: 5px 9px;
  min-height: 30px;
}
.detail-dialog .flight-header-actions .flight-nav {
  font-size: 20px;
  padding: 0;
  width: 30px;
}
.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: 0.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: 5px 9px;
  background: transparent;
  color: var(--text);
  font:
    600 11px Geist,
    system-ui;
  min-height: 28px;
  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: 6px 10px;
  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: 11px;
  min-height: 30px;
  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: 0.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: 10px 14px;
  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: 8px;
  min-width: 54px;
  min-height: 30px;
  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: 30px;
  padding: 5px 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: 8px 16px 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: 5px 7px;
    min-height: 30px;
  }
  .detail-dialog .flight-header-actions .flight-nav {
    width: 30px;
    font-size: 20px;
    padding: 0;
  }
  .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: 28px;
  }
  .flight-map-settings {
    top: 10px;
    right: 99px;
  }
  .flight-map-settings > summary {
    font-size: 10px;
    padding: 6px 8px;
  }
  .flight-map-fullscreen {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 6px;
    min-height: 30px;
  }
  .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: 5px 7px;
    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: 32px;
    font-size: 11px;
    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: 30px;
  }
  .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 {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.detail-dialog .flight-main-chart .altitude {
  height: 280px;
  width: calc(100% - 16px);
  display: block;
  margin: 0 0 0 16px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  touch-action: pan-y;
  cursor: crosshair;
}
.chart-axis-labels {
  position: absolute;
  inset: 0 0 0 16px;
  pointer-events: none;
  color: var(--muted);
  font:
    11px Geist,
    system-ui;
  line-height: 1.2;
}
.chart-axis-labels span {
  position: absolute;
  white-space: nowrap;
}
.chart-axis-height {
  left: 8.8709677419%;
  margin-left: -8px;
  transform: translate(-100%, -50%);
}
.chart-axis-time {
  top: 94.2307692308%;
  transform: translate(-50%, -50%);
}
.chart-axis-time.chart-axis-start {
  transform: translateY(-50%);
}
.chart-axis-time.chart-axis-end {
  transform: translate(-100%, -50%);
}
.chart-axis-unit {
  left: 8.8709677419%;
  top: 9.2307692308%;
  transform: translateY(-100%);
}
.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-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: 0.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 .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-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: 0.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: 30px;
  min-width: 30px;
  min-height: 30px;
  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: 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  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: 32px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
  }
  .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;
}
.detail-dialog [data-replay-status],
.detail-dialog [data-replay-chart-toggle] {
  display: none;
}
.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. */
.photo-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 5px;
  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: 30px;
  height: 30px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(10, 18, 28, 0.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 - 8px);
  max-width: none;
  height: calc(100dvh - 8px);
  max-height: calc(100dvh - 8px);
  padding: 0;
  border-radius: 10px;
  background: #0b111b;
  overflow: hidden;
}
.photo-viewer::backdrop {
  background: rgba(0, 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;
}

.photo-viewer-prev,
.photo-viewer-next,
.photo-viewer-toolbar button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(10, 18, 28, 0.8);
  color: #fff;
  cursor: pointer;
}
.photo-viewer-prev,
.photo-viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.photo-viewer-prev {
  left: 12px;
}
.photo-viewer-next {
  right: 12px;
}
.photo-viewer-toolbar {
  position: absolute;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 5px 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: rgba(10, 18, 28, 0.85);
  color: #fff;
  font-size: 13px;
}
.photo-viewer-prev:hover,
.photo-viewer-next:hover,
.photo-viewer-toolbar button:hover {
  background: #152637;
}
.photo-viewer-prev:focus-visible,
.photo-viewer-next:focus-visible,
.photo-viewer-toolbar button:focus-visible {
  outline: 2px solid #68c6f4;
  outline-offset: 2px;
}
.photo-viewer [hidden] {
  display: none;
}
.photo-viewer-error {
  position: absolute;
  bottom: 80px;
  left: 12px;
  right: 12px;
  text-align: center;
  color: #fff;
  background: rgba(10, 18, 28, 0.85);
  padding: 8px;
  border-radius: 8px;
}

/* Keep the close control last on desktop and beside the title on mobile. */
.detail-dialog .dialog-head > .icon-button {
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .detail-dialog .flight-header-actions {
    order: 1;
  }
}

.map-photo-control {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.map-photo-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.map-photo-control input {
  width: auto;
  margin: 0;
}
.map-photo-control p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 6px;
}
.map-photo-marker {
  display: block;
  width: 44px;
  height: 44px;
  padding: 2px;
  background: #fff;
  border: 2px solid #2470c8;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0005;
  cursor: pointer;
  overflow: hidden;
}
.map-photo-marker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  pointer-events: none;
}
.map-photo-marker:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}
.map-photo-marker[hidden] {
  display: none;
}

.replay-toggle-label {
  display: none;
}
.detail-dialog.replay-expanded .detail-map > .replay-player {
  position: absolute;
  z-index: 1100;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 820px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 24px #0005;
  color: var(--text);
}
.detail-map > .replay-player .replay-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.detail-map > .replay-player .replay-transport {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border-radius: 9px;
}
.detail-map > .replay-player [data-replay-toggle] {
  background: #2470c8;
  color: #fff;
  border: 0;
  min-width: 88px;
}
.detail-map > .replay-player .replay-toggle-label {
  display: inline;
  font-size: 12px;
}
.detail-map > .replay-player [data-replay-clock] {
  flex: 1;
  min-width: 0;
  font-family: 'Geist Mono', monospace;
}
.detail-map > .replay-player .replay-tempo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.detail-map > .replay-player .replay-tempo select {
  width: auto;
  min-width: 64px;
  min-height: 36px;
  font-size: 12px;
  padding: 5px 8px;
}
.detail-map > .replay-player .replay-timeline {
  display: block;
  font-size: 10px;
  margin: 10px 0 0;
}
.detail-map > .replay-player .replay-timeline input {
  display: block;
  width: 100%;
  min-height: 24px;
  margin: 4px 0 0;
  cursor: pointer;
}
.detail-dialog.replay-expanded .flight-replay-hud {
  top: 76px;
  left: 16px;
}
@media (max-width: 760px) {
  .detail-dialog.replay-expanded .detail-map > .replay-player {
    width: calc(100% - 20px);
    bottom: 24px;
    padding: 10px;
    border-radius: 12px;
  }
  .detail-map > .replay-player .replay-actions {
    gap: 6px;
  }
  .detail-map > .replay-player .replay-transport {
    padding: 0 6px;
    min-width: 28px;
    height: 32px;
  }
  .detail-map > .replay-player [data-replay-toggle] {
    min-width: 72px;
  }
  .detail-map > .replay-player .replay-tempo-label {
    display: none;
  }
  .detail-map > .replay-player .replay-tempo select {
    min-width: 52px;
    min-height: 32px;
    font-size: 11px;
    padding: 4px;
  }
  .detail-map > .replay-player .replay-clock-primary strong {
    font-size: 12px;
  }
  .detail-map > .replay-player [data-replay-clock-progress] {
    font-size: 8px;
  }
  .detail-dialog.replay-expanded .flight-replay-hud {
    top: 64px;
    left: 10px;
  }
}
.detail-map > .replay-player .replay-actions [data-replay-start],
.detail-map > .replay-player .replay-actions [data-replay-end] {
  display: none;
}
.detail-map > .replay-player .replay-actions [data-replay-toggle] {
  flex: 0 0 88px;
  width: 88px;
}
.detail-dialog.replay-expanded .geo-map-label {
  display: none;
}
.detail-dialog.replay-expanded .tile-status {
  bottom: 160px;
}
@media (max-width: 760px) {
  .detail-map > .replay-player .replay-actions [data-replay-toggle] {
    flex-basis: 72px;
    width: 72px;
  }
}

.detail-dialog .flight-map-settings > summary,
.detail-dialog .flight-map-fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 7px;
}
.flight-map-settings > summary svg,
.flight-map-fullscreen svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.detail-dialog .flight-map-settings {
  right: 58px;
}
.detail-dialog .flight-map-settings[open] {
  right: 16px;
}
.detail-dialog .flight-map-settings[open] > summary {
  margin-left: auto;
  padding: 6px;
}
.detail-dialog .flight-map-modes {
  gap: 2px;
  max-width: calc(100% - 108px);
}
.detail-dialog .flight-map-modes button {
  padding: 5px 6px;
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .detail-dialog .flight-map-modes {
    left: 8px;
    top: 10px;
    padding: 3px;
    gap: 0;
    max-width: calc(100% - 94px);
  }
  .detail-dialog .flight-map-modes button {
    padding: 5px 4px;
    font-size: 8.5px;
    min-height: 28px;
  }
  .detail-dialog .flight-map-settings {
    right: 48px;
    top: 10px;
  }
  .detail-dialog .flight-map-fullscreen {
    right: 8px;
    top: 10px;
  }
  .detail-dialog .flight-map-settings > summary,
  .detail-dialog .flight-map-fullscreen {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 6px;
  }
  .detail-dialog .flight-map-settings[open] {
    right: 10px;
    top: 55px;
  }
  .detail-dialog.replay-expanded .flight-map-settings {
    right: 52px;
  }
}

.photo-grid video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  background: #111;
  pointer-events: none;
}
.photo-grid figure:has(video[controls]) video {
  pointer-events: auto;
}
.photo-open {
  position: relative;
}
.video-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #111b;
  color: #fff;
  font-size: 11px;
}
.video-badge svg {
  width: 14px;
  height: 14px;
}
.photo-viewer video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: 100%;
  width: min(1100px, calc(100vw - 100px));
  max-height: calc(100dvh - 150px);
  margin: auto;
  background: #000;
  object-fit: contain;
}
.photo-viewer video[hidden],
.photo-viewer img[hidden] {
  display: none;
}

.photo-import-list video {
  width: 160px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  background: #111;
}
@media (max-width: 600px) {
  .photo-import-list li:has(video) {
    flex-wrap: wrap;
  }
  .photo-import-list video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  .photo-import-list li:has(video) > div {
    flex-basis: 100%;
  }
}

.map-video-marker {
  position: relative;
  background: #2470c8;
  color: #fff;
}
.map-video-marker video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  pointer-events: none;
}
.map-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0003;
  font-size: 18px;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

.photo-viewer iframe {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, calc(100vw - 40px));
  height: min(620px, calc(100dvh - 150px));
  border: 0;
  background: #000;
}
.photo-viewer iframe[hidden] {
  display: none;
}

.replay-media {
  position: absolute;
  inset: 12px 12px 110px;
  z-index: 1050;
  background: rgba(12, 22, 34, 0.96);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  color: #fff;
  overflow: auto;
}
.replay-media img,
.replay-media video,
.replay-media iframe {
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  border: 0;
}
.replay-media [hidden] {
  display: none;
}
.replay-media p {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}
.replay-media .btn {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .replay-media {
    inset: 8px 8px 130px;
    padding: 8px;
  }
}
.detail-dialog.replay-expanded .replay-media {
  bottom: 180px;
}

/* Keep wide flight tables inside their own, keyboard-accessible scroll area. */
.collection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.statistics-table-wrap {
  min-width: 0;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.statistics-table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.table-scroll-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 6px;
}
.table-scroll-hint[hidden],
#bulk-toolbar[hidden] {
  display: none;
}
.statistics-table th .btn,
.statistics-hints {
  max-width: 240px;
}
.statistics-table td {
  font-variant-numeric: tabular-nums;
}
.statistics-table caption {
  white-space: normal;
  max-width: calc(100vw - 72px);
}
.statistics-hints {
  margin-top: 6px;
  text-align: left;
  font-weight: 400;
  white-space: normal;
}
.statistics-hints summary {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.statistics-hints summary .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.statistics-hints p {
  font-size: 11px;
  line-height: 1.5;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.statistics-hints summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.flight-detail-side,
.flight-detail-tabpanel {
  min-width: 0;
}
.flight-analysis .statistics-table {
  min-width: 650px;
}
.flight-analysis .statistics-table th:first-child {
  min-width: 190px;
  max-width: 240px;
}
@media (max-width: 760px) {
  .collection-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .collection-actions .btn {
    flex: 1 1 180px;
  }
  .statistics-groups .statistic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cockpit prototype: shared chrome, with existing views retaining their content layouts. */
:root:not([data-theme='light']) {
  --bg: #121925;
  --card: #1b2433;
  --text: #e8edf4;
  --muted: #a3afc0;
  --border: #2c3849;
  --panel: #121925;
  --chrome: #0f1621;
  --solid: #1b2433;
}
.header {
  gap: 20px;
  padding: 0 24px;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand strong {
  font-size: 18px;
}
.brand small {
  font-size: 11px;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, 40vw);
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--solid);
  color: var(--muted);
}
.global-search input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
}
.global-search kbd {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 10px;
}
.global-search:focus-within {
  outline: 2px solid var(--accent);
}
@media (min-width: 901px) {
  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .header .brand {
    justify-self: start;
  }
  .header-actions {
    justify-self: end;
  }
}
.mountains {
  display: none;
}
/* Compact cockpit: 37c reference, dimensions in CSS pixels. */
.cockpit {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cockpit .card {
  border-radius: 12px;
}
.cockpit-heading {
  margin: 0;
  align-items: flex-end;
  gap: 16px;
}
.cockpit-heading > div:first-child {
  min-width: 0;
}
.cockpit-heading h1 {
  font-size: 22px;
  letter-spacing: -0.4px;
}
.cockpit-heading p {
  font-size: 13px;
  margin-top: 0;
}
.cockpit-heading .actions {
  flex-shrink: 0;
  gap: 8px;
}
.cockpit .btn {
  --button-height: 28px;
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 8px;
}
:root .cockpit .btn:not(.text):not([data-replay-toggle]):not(.flight-map-fullscreen) {
  height: auto;
  min-height: var(--button-height);
  padding-block: 4px;
}
.cockpit-heading .btn {
  --button-height: 32px;
  min-height: 32px;
}
.cockpit .btn .icon {
  width: 14px;
  height: 14px;
}
.cockpit .btn.primary {
  background: #2470c8;
  border-color: #2470c8;
  color: white;
}
.cockpit-period {
  display: flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--solid);
  padding-left: 8px;
  font-size: 12px;
}
.cockpit-period select {
  min-height: 30px;
  height: auto;
  width: auto;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  font-size: inherit;
}
.cockpit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
.cockpit-map {
  min-width: 0;
  position: relative;
  background: var(--map);
}
.cockpit-map .geo-map-wrap,
.cockpit-map .geo-map,
.cockpit-map .map {
  height: 100%;
  min-height: 232px;
}
.cockpit-recency {
  position: absolute;
  z-index: 401;
  top: 12px;
  left: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #0f1621e8;
  color: #d5e4f5;
  font-size: 11px;
  font-weight: 650;
  pointer-events: none;
}
.cockpit-flight {
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cockpit-flight-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.cockpit-flight-title h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
}
.cockpit-flight-more {
  width: 28px;
  min-height: 28px;
  margin-left: auto;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
}
.cockpit-flight-more:hover {
  background: var(--accent-soft);
  color: var(--text);
}
.cockpit-flight .muted {
  font-size: 12px;
}
.cockpit-flight-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.cockpit-flight-metrics strong {
  display: block;
  font:
    600 20px/1.3 'Geist Mono',
    monospace;
}
.cockpit-flight-metrics small {
  display: block;
  margin-top: 0;
  font-size: 11px;
}
.cockpit-flight blockquote {
  margin: 0;
  padding: 8px 12px;
  background: var(--solid);
  border-radius: 8px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  overflow: hidden;
  overflow-wrap: anywhere;
}
.cockpit-flight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.cockpit .stats-grid {
  margin: 0;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cockpit .stat {
  min-height: 64px;
  padding: 8px 14px;
}
.cockpit .stat-label {
  font-size: 11px;
}
.cockpit-stat-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
}
.cockpit .stat-value {
  font:
    600 20px/1.4 'Geist Mono',
    monospace;
  letter-spacing: -0.5px;
  margin: 0;
}
.cockpit .stat-foot {
  margin: 0;
  font-size: 11px;
}
.cockpit-change {
  color: var(--muted);
}
.cockpit-change.positive {
  color: #8fddb0;
}
[data-theme='light'] .cockpit-change.positive {
  color: var(--ok);
}
.cockpit-data-hint {
  margin: 0;
  font-size: 12px;
}
.cockpit-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
}
.cockpit-months,
.cockpit-milestones,
.cockpit-recent {
  padding: 0;
  min-width: 0;
}
.cockpit-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.cockpit-panel-heading h2 {
  font-size: 14px;
}
.cockpit .badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  padding: 0 8px;
}
.cockpit-bars {
  min-height: 188px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 24px 16px 16px;
}
.cockpit-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}
.cockpit-column b {
  visibility: hidden;
  white-space: nowrap;
  font:
    11px 'Geist Mono',
    monospace;
}
.cockpit-column.is-best b {
  visibility: visible;
  color: var(--accent);
}
.cockpit-bar {
  width: 100%;
  max-width: 34px;
  background: #2e4d73;
  border-radius: 4px 4px 0 0;
}
.cockpit-bar.best {
  background: var(--accent);
}
[data-theme='light'] .cockpit-bar:not(.best) {
  background: #a2bfdc;
}
.cockpit-milestone-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}
.cockpit-milestone {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.cockpit-milestone > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.cockpit-milestone .muted {
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
}
.cockpit-milestone progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
  appearance: none;
}
.cockpit-milestone progress::-webkit-progress-bar {
  background: var(--border);
}
.cockpit-milestone progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 6px;
}
.cockpit-milestone progress.milestone-1::-webkit-progress-value {
  background: var(--ok);
}
.cockpit-milestone progress.milestone-2::-webkit-progress-value {
  background: var(--warn);
}
.cockpit-milestone progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 6px;
}
.cockpit-milestone progress.milestone-1::-moz-progress-bar {
  background: var(--ok);
}
.cockpit-milestone progress.milestone-2::-moz-progress-bar {
  background: var(--warn);
}
.cockpit-milestones small {
  font-size: 11px;
}
.cockpit-milestones small .btn,
.cockpit-recent-content > small .btn,
.cockpit-recent .cockpit-panel-heading .btn {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
}
.cockpit-recent > summary {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cockpit-recent-content {
  padding: 0 16px 8px;
}
.cockpit-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cockpit-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 72px minmax(0, 1fr) auto 85px;
  align-items: center;
  gap: 16px;
  padding: 14px 8px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 12px;
  background: none;
  text-align: left;
  margin-top: 8px;
}
.cockpit-row:hover {
  background: var(--accent-soft);
}
.cockpit-row .date-block {
  text-align: center;
}
.cockpit-row .date-block strong {
  font:
    600 20px 'Geist Mono',
    monospace;
}
.cockpit-row .date-block small {
  display: block;
  text-transform: uppercase;
  font-size: 11px;
}
.cockpit-thumbnail {
  width: 72px;
  height: 44px;
  background: #22332d;
  border-radius: 8px;
  color: var(--muted);
}
.cockpit-thumbnail path {
  fill: none;
  stroke: #5ea8f2;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cockpit-row-name {
  min-width: 0;
}
.cockpit-row-name strong,
.cockpit-row-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-row-name small {
  font-size: 12px;
  color: var(--muted);
}
.cockpit-row-duration,
.cockpit-row-distance {
  font:
    14px 'Geist Mono',
    monospace;
  text-align: right;
}
.cockpit-empty {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.cockpit-dropzone {
  width: calc(100% - 28px);
  padding: 18px 12px;
  margin: 12px 14px;
  border: 1.5px dashed #3a475a;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cockpit-dropzone .icon {
  color: var(--accent);
}
.cockpit-dropzone.dragging {
  background: var(--accent-soft);
  border-color: var(--accent);
}
@media (min-width: 901px) {
  .navigation {
    width: 230px;
    padding: 20px 0 0;
    gap: 4px;
  }
  .nav-button {
    width: calc(100% - 28px);
    margin: 0 14px;
    height: 44px;
    justify-content: flex-start;
    padding: 0 14px;
    gap: 14px;
  }
  .nav-button span {
    position: static;
    opacity: 1;
    pointer-events: auto;
    background: none;
    border: 0;
    padding: 0;
    font-size: 14px;
  }
  .nav-button.active {
    color: var(--text);
    background: #1f3550;
    font-weight: 650;
  }
  [data-theme='light'] .nav-button.active {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .nav-bottom {
    margin-top: auto;
    margin-bottom: 20px;
  }
  main {
    margin-left: 230px;
    max-width: 1500px;
    padding: 32px 40px 40px;
  }
  .avatar {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }
}
@media (max-width: 900px) {
  .cockpit-dropzone {
    display: none;
  }
  .cockpit-hero {
    grid-template-columns: 1fr;
  }
  .cockpit-map {
    height: 280px;
  }
  .cockpit-map .geo-map-wrap,
  .cockpit-map .geo-map,
  .cockpit-map .map {
    min-height: 280px;
  }
  .cockpit-panels {
    grid-template-columns: 1fr;
  }
  .global-search {
    width: auto;
    flex: 1;
  }
  .global-search kbd {
    display: none;
  }
}
@media (max-width: 650px) {
  .header {
    gap: 10px;
    padding: 0 16px;
    flex-wrap: wrap;
    height: auto;
    min-height: 112px;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .global-search {
    order: 3;
    flex-basis: 100%;
    padding: 6px 10px;
  }
  .header-actions {
    gap: 7px;
  }
  .cockpit-row {
    grid-template-columns: 30px 48px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 0;
  }
  .cockpit-thumbnail {
    width: 48px;
  }
  .cockpit-row-distance {
    grid-column: 4;
    font-size: 10px;
    margin-top: -8px;
  }
  .cockpit-row-duration {
    font-size: 11px;
    max-width: 85px;
  }
  .cockpit-row-name strong {
    font-size: 12px;
  }
  .cockpit-row-name small {
    font-size: 10px;
  }
  .nav-button {
    width: auto;
    min-width: 0;
    flex: 1;
  }
  .nav-button span {
    font-size: 8px;
  }
}
.cockpit-map .leaflet-top.leaflet-left {
  top: 48px;
}
.cockpit-map .geo-map-label {
  top: auto;
  bottom: 32px;
}
.global-search input {
  font-size: 14px;
}
.cockpit .time-value {
  font-family: 'Geist Mono', monospace;
}
.cockpit-flight blockquote {
  display: block;
}
.cockpit-flight blockquote p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The compact shell applies only while the cockpit is visible. */
body:has(.cockpit) main {
  max-width: 1328px;
  padding: 24px;
}
body:has(.cockpit) .global-search {
  min-height: 32px;
  height: auto;
  border-radius: 8px;
  padding: 4px 12px;
}
@media (min-width: 901px) {
  body:has(.cockpit) .header {
    min-height: 48px;
    height: auto;
    padding: 8px 16px;
  }
  body:has(.cockpit) .navigation {
    top: 57px;
    bottom: 0;
    right: auto;
    width: 200px;
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding: 12px 0 0;
    border-top: 0;
    border-right: 1px solid var(--border);
  }
  body:has(.cockpit) .nav-button {
    width: calc(100% - 16px);
    min-height: 32px;
    height: auto;
    margin: 0 8px;
    padding: 6px 12px;
    border-radius: 8px;
  }
  body:has(.cockpit) .nav-button span {
    font-size: 13px;
  }
  body:has(.cockpit) .nav-bottom {
    display: flex;
    margin-top: auto;
    margin-bottom: 16px;
  }
  body:has(.cockpit) main {
    margin-left: 200px;
  }
  body:has(.cockpit) .cockpit-dropzone {
    width: calc(100% - 16px);
    min-height: 32px;
    margin: 12px 8px;
    padding: 8px;
    border-radius: 8px;
    flex-direction: row;
    gap: 8px;
    font-size: 11px;
  }
}
@media (min-width: 901px) and (max-width: 1279px) {
  body:has(.cockpit) .navigation {
    width: 56px;
  }
  body:has(.cockpit) main {
    margin-left: 56px;
  }
  body:has(.cockpit) .nav-button {
    justify-content: center;
    min-height: 40px;
    padding: 8px;
  }
  body:has(.cockpit) .nav-button span {
    position: absolute;
    left: 48px;
    background: var(--solid);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    opacity: 0;
    pointer-events: none;
  }
  body:has(.cockpit) .nav-button:hover span,
  body:has(.cockpit) .nav-button:focus-visible span {
    opacity: 1;
  }
  body:has(.cockpit) .cockpit-dropzone {
    display: none;
  }
}
@media (max-width: 1279px) {
  .cockpit-heading {
    flex-wrap: wrap;
  }
  .cockpit-heading .actions {
    width: auto;
  }
}
@media (max-width: 900px) {
  body:has(.cockpit) main {
    margin-left: auto;
    margin-right: auto;
    padding: 24px 16px calc(144px + env(safe-area-inset-bottom));
  }
  .cockpit-heading .actions {
    width: 100%;
  }
  .cockpit-period,
  .cockpit-period select {
    min-height: 40px;
  }
  .cockpit .btn,
  .cockpit-flight-more {
    --button-height: 40px;
    min-height: 40px;
  }
  .cockpit-flight-more {
    width: 40px;
  }
  .cockpit-flight {
    padding: 16px;
  }
  .cockpit-flight-metrics strong {
    font-size: 20px;
  }
  .cockpit-map,
  .cockpit-map .geo-map-wrap,
  .cockpit-map .geo-map,
  .cockpit-map .map {
    height: 200px;
    min-height: 200px;
  }
  .cockpit .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cockpit-panels {
    grid-template-columns: minmax(0, 1fr);
  }
  .cockpit-heading .cockpit-primary-actions {
    position: fixed;
    z-index: 8;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-navigation-height) + env(safe-area-inset-bottom));
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 8px 16px;
    background: var(--panel);
    border-top: 1px solid var(--border);
  }
  body:has(.cockpit) .header-actions .icon-button,
  body:has(.cockpit) .header-actions .avatar {
    width: 40px;
    height: 40px;
  }
  body:has(.cockpit) .header-actions {
    gap: 4px;
  }
  body:has(.cockpit) .global-search {
    min-height: 40px;
  }
  body:has(.cockpit) #toast {
    bottom: calc(var(--mobile-navigation-height) + 64px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 480px) {
  .cockpit-heading h1 {
    font-size: 22px;
  }
  .cockpit-flight-title h2 {
    font-size: 20px;
  }
  .cockpit-flight-metrics {
    gap: 8px 16px;
  }
  .cockpit .stat {
    padding: 8px 12px;
  }
  .cockpit .stat-value {
    font-size: 20px;
  }
  .cockpit-bars {
    gap: 4px;
  }
  .cockpit-panel-heading .badge {
    margin-left: auto;
  }
}

/* Flugbuch: Liste, Kacheln und geografische Übersicht aus den Designvorlagen. */
.flight-book {
  --book-card: #1b2433;
  --book-subtle: #151e2a;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 70px;
}
[data-theme='light'] .flight-book {
  --book-card: #f5f7fa;
  --book-subtle: #eaf0f6;
}
.flight-book .card {
  background: var(--book-card);
  border: 1px solid var(--border);
  box-shadow: none;
}
.book-heading {
  margin: 0 0 4px;
  align-items: flex-end;
}
.book-heading h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
  margin: 0;
}
.book-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.flight-book .btn {
  border-radius: 10px;
  min-height: 38px;
}
.flight-book .btn.primary {
  background: #2470c8;
  color: white;
}
.book-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--book-card);
}
.book-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  font-size: 15px;
}
.book-search .icon {
  flex-shrink: 0;
  color: var(--muted);
}
.book-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.book-filters > select,
.book-photo-filter {
  border: 1px solid var(--border);
  border-radius: 999px !important;
  background: transparent;
  padding: 8px 12px;
  min-height: 36px;
  width: auto;
  max-width: 220px;
  font-size: 13px;
}
.book-filters > select.selected,
.book-photo-filter.selected {
  background: var(--accent-soft);
  border-color: #3c6fa3;
}
.book-view-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.book-view-controls select {
  padding: 8px 10px;
  font-size: 12px;
  max-width: 145px;
}
.flight-book .segment {
  display: flex;
  padding: 3px;
  gap: 3px;
  background: var(--book-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.flight-book .segment button {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13px;
}
.flight-book .segment .selected {
  background: #2c3b52;
  color: white;
}
.flight-book > .collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.flight-book > .collection-actions .btn {
  border: 0;
  background: none;
  padding: 0;
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
}
.flight-book #filtered-summary .filtered-summary {
  margin: 0;
  padding: 0;
  background: none;
  font-size: 12px;
  gap: 14px;
}
.flight-book .missing-data {
  font-size: 11px;
  margin: 6px 0 0;
}
.book-month {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}
.book-month summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 700;
  background: var(--book-subtle);
  cursor: pointer;
  gap: 12px;
}
.book-month summary::after {
  content: '⌄';
  color: var(--muted);
}
.book-month summary small {
  margin-left: auto;
}
.book-month summary small,
.book-month-tiles h2 small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.book-month-tiles {
  margin-bottom: 24px;
}
.book-month-tiles h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 18px;
}
.book-row {
  display: grid;
  grid-template-columns: 24px 42px 88px minmax(140px, 1fr) auto 100px 92px 42px;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  min-height: 78px;
  border-top: 1px solid var(--border);
}
.book-row.picked,
.book-tile.picked {
  background: var(--accent-soft);
}
.flight-book .flight-selection {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.flight-book .flight-selection input {
  width: 17px;
  height: 17px;
  accent-color: #2470c8;
}
.flight-book .flight-selection span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.book-row .date-block {
  text-align: center;
}
.book-row .date-block strong {
  font:
    600 20px 'Geist Mono',
    monospace;
}
.book-row .date-block small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.book-thumbnail {
  padding: 0;
  border: 0;
  background: none;
  height: 52px;
}
.book-thumbnail .cockpit-thumbnail {
  width: 88px;
  height: 52px;
}
.book-row-name {
  min-width: 0;
}
.flight-book .flight-title {
  font-size: 15px;
  padding: 0;
  font-weight: 700;
  text-align: left;
}
.book-row-name small {
  color: var(--muted);
  font-size: 12px;
  display: block;
}
.flight-book .wing-line {
  margin: 0;
  font-size: inherit;
  display: inline;
}
.flight-book .badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
}
.flight-book .book-warning {
  color: #f0b44c;
  background: #382916;
}
.book-number {
  font:
    14px 'Geist Mono',
    monospace;
  text-align: right;
  white-space: nowrap;
}
.book-row .icon-button {
  width: 42px;
  height: 42px;
  background: none;
}
.book-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.book-indicators button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
}
.book-indicators .icon {
  width: 14px;
  height: 14px;
}
.flight-book .flight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.book-tile {
  overflow: hidden;
  border-radius: 16px;
}
.book-tile-track {
  height: 160px;
  position: relative;
  background: #20332b;
  overflow: hidden;
}
.book-tile-track > .cockpit-thumbnail {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: transparent;
  padding: 8px;
}
.book-tile-track > .cockpit-thumbnail path {
  stroke-width: 0.6;
}
.book-tile-date {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #0f1822;
  padding: 5px 9px;
  border-radius: 9px;
  color: #e8edf4;
  text-align: center;
}
.book-tile-date strong {
  font:
    700 17px 'Geist Mono',
    monospace;
  display: block;
}
.book-tile-date small {
  color: #a3afc0;
  text-transform: uppercase;
  font-size: 9px;
}
.book-tile-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #0f1822;
  border-radius: 999px;
  color: #e8edf4;
  padding: 3px 9px;
  font:
    600 12px 'Geist Mono',
    monospace;
}
.book-replay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: #2470c8;
  color: white;
  opacity: 0;
  transition: opacity 0.15s;
}
.book-tile:hover .book-replay,
.book-replay:focus-visible {
  opacity: 1;
}
.book-tile .flight-card-content {
  padding: 16px;
  position: relative;
}
.book-tile .flight-selection {
  position: absolute;
  top: -150px;
  right: 12px;
  padding: 7px;
  background: #0f1822;
  border-radius: 8px;
}
.book-tile .flight-card-title {
  margin: 0;
  gap: 8px;
}
.book-tile .flight-card-title > div {
  min-width: 0;
}
.book-tile p.muted {
  font-size: 11px;
  margin: 4px 0 10px;
}
.book-tile .card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0;
  margin: 0;
  border: 0;
}
.book-tile .card-metrics > div {
  background: var(--book-subtle);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
}
.book-tile .card-metrics strong {
  font:
    600 15px 'Geist Mono',
    monospace;
}
.book-tile .card-metrics small {
  font-size: 10px;
  color: var(--muted);
}
.book-tile blockquote {
  margin: 10px 0 0;
  border-left: 2px solid var(--border);
  padding-left: 8px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-photos {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.book-photos img,
.book-photos video,
.book-photos .media-preview {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 5px;
}
.flight-book .bulk-toolbar {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 115px);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 270px);
  z-index: 600;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid #3c6fa3;
  border-radius: 14px;
  box-shadow: 0 6px 30px #0005;
  background: var(--solid);
}
.flight-book .bulk-toolbar small {
  display: none;
}
.flight-book .bulk-toolbar .btn {
  font-size: 12px;
}
.book-map-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
}
.book-map-list {
  overflow: auto;
  max-height: 760px;
  border-radius: 16px;
}
.book-map-list header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.book-map-list h2 {
  font-size: 16px;
  margin: 0;
}
.book-map-list header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.book-map-list .compact-row {
  margin: 6px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  gap: 8px;
}
.book-map-list .compact-row.active {
  border-color: #3c6fa3;
  background: var(--accent-soft);
}
.book-map-list .compact-select {
  display: block;
  padding: 0;
  min-width: 0;
}
.book-map-list .compact-select > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.book-map-list .compact-select > div:nth-child(2),
.book-map-list .compact-select small {
  color: var(--muted);
  font-size: 11px;
}
.book-map-list .compact-select b {
  font:
    600 13px 'Geist Mono',
    monospace;
}
.book-map-panel {
  position: relative;
  height: 760px;
  overflow: hidden;
  border-radius: 16px;
  min-width: 0;
}
.book-map-panel .geo-map-wrap,
.book-map-panel .geo-map {
  height: 100%;
  min-height: 100%;
}
.book-map-tools {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 450;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}
.book-map-tools > * {
  pointer-events: auto;
}
.book-map-tools .segment {
  background: var(--panel);
}
.book-map-tools .segment .selected {
  background: #2470c8;
}
.book-map-tools select,
.book-map-tools > .btn {
  background: var(--panel);
  font-size: 11px;
  min-height: 38px;
  padding: 7px 10px;
}
.book-map-tools > .btn {
  margin-left: auto;
}
.book-map-panel .leaflet-top.leaflet-left {
  top: auto;
  bottom: 70px;
  left: auto;
  right: 12px;
}
.book-map-legend {
  position: absolute;
  left: 14px;
  bottom: 28px;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  background: var(--panel);
  border-radius: 9px;
  padding: 8px;
  flex-wrap: wrap;
}
.book-map-legend > span:first-child {
  color: #5ea8f2;
}
.book-map-legend > span:nth-child(2) {
  color: #8fb0d4;
}
@media (max-width: 1200px) {
  .flight-book .flight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .book-row {
    grid-template-columns: 20px 32px 64px minmax(110px, 1fr) 80px 70px 34px;
    gap: 10px;
    padding: 12px;
  }
  .book-row .book-indicators {
    display: none;
  }
  .book-thumbnail .cockpit-thumbnail {
    width: 64px;
  }
  .book-number {
    font-size: 12px;
  }
  .book-map-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .flight-book .bulk-toolbar {
    left: 50%;
    bottom: 80px;
    max-width: calc(100vw - 24px);
  }
  .book-map-layout {
    grid-template-columns: 1fr;
  }
  .book-map-layout.pane-list .book-map-panel,
  .book-map-layout.pane-map .book-map-list {
    display: none;
  }
  .book-map-panel {
    height: 620px;
  }
  .book-map-list {
    max-height: none;
  }
  .book-view-controls {
    margin-left: 0;
  }
}
@media (min-width: 901px) {
  .flight-book .mobile-pane {
    display: none;
  }
}
@media (max-width: 650px) {
  .book-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .book-heading h1 {
    font-size: 28px;
  }
  .book-heading p {
    font-size: 12px;
  }
  .book-heading .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .book-heading .btn {
    font-size: 12px;
    padding: 8px 10px;
  }
  .book-search input {
    font-size: 13px;
  }
  .book-filters > select {
    max-width: 150px;
  }
  .book-view-controls {
    width: 100%;
    justify-content: space-between;
  }
  .flight-book .flight-grid {
    grid-template-columns: 1fr;
  }
  .book-tile-track {
    height: 180px;
  }
  .book-tile .flight-selection {
    top: -170px;
  }
  .book-replay {
    opacity: 1;
  }
  .book-month summary {
    padding: 14px 12px;
    font-size: 15px;
  }
  .book-month summary small,
  .book-month-tiles h2 small {
    font-size: 10px;
  }
  .book-row {
    grid-template-columns: 18px 28px minmax(0, 1fr) 32px;
    gap: 8px;
  }
  .book-row .book-thumbnail {
    display: none;
  }
  .book-row-name {
    grid-column: 3;
  }
  .book-row > .icon-button {
    grid-column: 4;
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
  }
  .book-row .book-number {
    grid-column: 3;
    text-align: left;
    font-size: 11px;
  }
  .book-row .book-number.muted {
    grid-row: 2;
    grid-column: 3;
    text-align: right;
  }
  .book-row .date-block {
    grid-row: 1 / 3;
  }
  .book-row .flight-selection {
    grid-row: 1 / 3;
  }
  .book-row .flight-title {
    font-size: 13px;
  }
  .book-row-name small {
    font-size: 10px;
  }
  .book-row .badge {
    font-size: 9px;
  }
  .book-map-tools {
    top: 10px;
    left: 10px;
    right: 10px;
  }
  .book-map-tools .segment button {
    font-size: 11px;
    padding: 6px 8px;
  }
  .book-map-tools > .btn {
    margin-left: 0;
  }
  .flight-book .bulk-toolbar {
    gap: 6px;
    padding: 10px;
  }
  .flight-book .bulk-toolbar strong {
    width: 100%;
    font-size: 12px;
  }
  .flight-book .bulk-toolbar .btn {
    font-size: 10px;
    padding: 5px 8px;
    min-height: 30px;
  }
}
.book-load-more {
  display: block;
  margin: 16px auto;
  color: var(--accent);
  background: none;
}
.book-month .book-load-more {
  border: 0;
  width: 100%;
  margin: 0;
  padding: 16px;
  border-radius: 0;
}
.book-row-name,
.book-tile .flight-title,
.book-tile p,
.book-map-list span {
  overflow-wrap: anywhere;
}
.flight-book #bulk-toolbar:not([hidden]) {
  min-height: 1px;
}
.book-search > .icon {
  position: static;
}
.book-search {
  flex: none;
}
@media (min-width: 1201px) {
  .book-filters > select {
    padding: 8px 10px;
    max-width: 145px;
    font-size: 12px;
  }
  .book-filters #tag-filter {
    max-width: 160px;
  }
  .book-view-controls {
    gap: 6px;
  }
  .book-view-controls .segment button {
    padding: 6px 10px;
  }
  .book-view-controls select {
    max-width: 132px;
  }
}

.book-map-list .compact-row {
  flex-wrap: wrap;
}
.book-map-list .compact-select {
  flex: 1;
}
.book-map-flight-actions {
  flex-basis: 100%;
  display: flex;
  gap: 8px;
  padding-left: 25px;
}
.book-map-flight-actions .btn {
  flex: 1;
  font-size: 11px;
  padding: 6px 8px;
  min-height: 32px;
}

/* Flugdetail & Replay: design/03 – live track, media and controls. */
dialog.detail-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0;
  --flight-map-height: 560px;
  --bg: #121925;
  --surface: #1b2433;
  --panel: #111823;
  --border: #2c3849;
  --text: #e8edf4;
  --muted: #a3afc0;
  background: var(--bg);
  color: var(--text);
}
.detail-dialog .dialog-head {
  padding: 12px 24px;
  background: #0f1621;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.detail-dialog .dialog-head h2 {
  font-size: 24px;
}
.detail-dialog .dialog-head p {
  font-size: 13px;
}
.detail-dialog .flight-header-actions .btn,
.detail-dialog .flight-back {
  min-height: 40px;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
}
.detail-dialog .flight-header-actions .flight-nav {
  width: 40px;
  font-size: 23px;
  padding: 0;
}
.detail-dialog .dialog-body {
  padding: 0 24px 32px;
}
.flight-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 16px 24px;
  margin: 0 -24px 20px;
  background: #151d2a;
}
.flight-summary > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0;
  border: 0;
}
.flight-summary small {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.flight-summary strong {
  font-size: 19px;
  margin: 0;
}
.flight-summary > div:nth-child(5) strong {
  color: #8fddb0;
}
.detail-dialog .detail-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 20px;
}
.flight-replay-stage {
  border-radius: 16px;
}
.flight-detail-side {
  min-width: 0;
}
.flight-highlights {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  margin-bottom: 14px;
}
.flight-highlights h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.flight-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #151d2a;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.flight-highlight:disabled {
  cursor: default;
}
.flight-highlight strong {
  display: block;
  font-size: 13px;
}
.flight-highlight small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.flight-highlight-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #1f3550;
  color: #8fddb0;
  font-size: 22px;
}
.flight-analysis-link {
  padding: 4px 0;
  background: none;
  border: 0;
  color: #7dbbf7;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.flight-detail-tabs button {
  min-height: 40px;
}
.flight-detail-tabs button[aria-selected='true'] {
  background: #2c3b52;
}
.flight-analysis-disclosure {
  margin-bottom: 14px;
}
.flight-analysis-disclosure > summary {
  cursor: pointer;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
#flight-panel-notes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}
.flight-detail-side #flight-panel-notes .detail-notes {
  padding: 0;
  border: 0;
  background: none;
  margin: 0 0 14px;
}
.flight-detail-side .flight-photos > summary {
  margin-bottom: 10px;
}
.flight-detail-side .photo-grid figure {
  margin: 0;
}
.flight-detail-side .photo-grid img,
.flight-detail-side .photo-grid video {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  border-radius: 10px;
}
.flight-add-media {
  width: 100%;
  justify-content: center;
  border: 1.5px dashed #3a475a;
  min-height: 40px;
}
.flight-memory-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.flight-memory-tags .tag {
  color: #a9ccf2;
  background: #233247;
}
.flight-detail-side #flight-note {
  background: #151d2a;
  color: var(--text);
  min-height: 90px;
  margin: 10px 0;
  border-radius: 10px;
  border-color: var(--border);
}
.detail-dialog .flight-map-modes {
  top: 14px;
  left: 14px;
  background: rgba(15, 22, 33, 0.92);
}
.flight-map-modes button {
  min-height: 34px;
  font-size: 13px;
  padding: 6px 12px;
}
.detail-dialog .flight-map-fullscreen {
  width: 42px;
  height: 42px;
  top: 14px;
  right: 14px;
}
.detail-dialog .flight-map-settings {
  right: 66px;
  top: 64px;
}
.detail-dialog .flight-map-settings[open] {
  right: 14px;
  top: 114px;
}
.flight-chase-camera {
  position: absolute;
  z-index: 1000;
  top: 14px;
  right: 64px;
  min-height: 42px;
  font-size: 13px;
  border-radius: 10px;
  background: rgba(15, 22, 33, 0.92);
}
.flight-chase-camera[aria-pressed='true'] {
  border-color: #3c6fa3;
  background: #1f3550;
  color: #cfe4fa;
}
.detail-dialog .flight-replay-hud {
  top: calc(var(--flight-map-height) - 100px);
  left: 14px;
  width: 460px;
  border-radius: 12px;
}
.detail-dialog .flight-replay-hud > div {
  padding: 10px 12px;
}
.detail-dialog .flight-replay-hud small {
  font-size: 10px;
}
.detail-dialog .flight-replay-hud strong {
  font-size: 20px;
}
.detail-dialog .flight-replay-hud [data-replay-climb] {
  color: var(--text);
}
.detail-dialog .flight-replay-dock {
  padding: 14px 18px;
}
.flight-replay-dock .replay-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.flight-replay-dock [data-replay-toggle] {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 8px;
  padding: 14px;
}
.flight-replay-dock .replay-toggle-label {
  display: none;
}
.flight-replay-dock [data-replay-clock-time] {
  font-size: 18px;
}
.flight-replay-dock [data-replay-clock-progress] {
  font-size: 12px;
}
.flight-replay-dock .replay-tempo,
.flight-replay-dock .replay-chart-choice {
  display: none;
}
.flight-replay-dock [data-replay-start],
.flight-replay-dock [data-replay-end] {
  width: 28px;
  padding: 4px;
}
.flight-tempo-buttons {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #151d2a;
}
.flight-tempo-buttons button,
.flight-chart-buttons button {
  font: inherit;
  color: #c9d3e0;
  background: none;
  cursor: pointer;
}
.flight-tempo-buttons button {
  font-size: 12px;
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 4px 9px;
}
.flight-tempo-buttons .flight-tempo-cycle {
  min-width: 60px;
  font-variant-numeric: tabular-nums;
}
.flight-tempo-buttons button[aria-pressed='true'] {
  background: #2c3b52;
  color: white;
}
.flight-keyboard-hint {
  font-size: 11px;
  color: var(--muted);
}
.flight-chart-buttons {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.flight-chart-buttons button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  min-height: 34px;
}
.flight-chart-buttons button[aria-pressed='true'] {
  border-color: #3c6fa3;
  background: #1f3550;
  color: #cfe4fa;
}
.flight-segment-strip {
  display: flex;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  gap: 1px;
  margin-top: 10px;
}
.flight-segment-strip button {
  min-width: 1px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #2a3546;
}
.flight-segment-strip .segment-circling {
  background: #2a4f7c;
}
.flight-segment-strip .segment-glide {
  background: #8a6a3a;
}
.flight-segment-strip .segment-missing {
  background: #5a2e2e;
}
.detail-dialog .flight-main-chart .altitude {
  height: 220px;
}
.detail-dialog .flight-main-chart {
  padding: 0 18px 18px;
}
:root[data-theme='light'] dialog.detail-dialog {
  --bg: #f4f7fa;
  --surface: #fff;
  --panel: #eef3f8;
  --border: #ced8e4;
  --text: #1b2433;
  --muted: #53657b;
}
.detail-dialog button:hover {
  filter: brightness(1.12);
}
:root[data-theme='light'] .detail-dialog .dialog-head,
:root[data-theme='light'] .detail-dialog .flight-summary,
:root[data-theme='light'] .detail-dialog .flight-highlight,
:root[data-theme='light'] .detail-dialog #flight-note,
:root[data-theme='light'] .detail-dialog .flight-tempo-buttons {
  background: var(--panel);
}
:root[data-theme='light'] .detail-dialog .flight-highlight,
:root[data-theme='light'] .detail-dialog .flight-chart-buttons button,
:root[data-theme='light'] .detail-dialog .flight-tempo-buttons button {
  color: var(--text);
}
@media (min-width: 1600px) {
  .detail-dialog .detail-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
  dialog.detail-dialog {
    --flight-map-height: 600px;
  }
}
@media (max-width: 1100px) and (min-width: 761px) {
  dialog.detail-dialog {
    --flight-map-height: 460px;
  }
  .detail-dialog .detail-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .flight-map-modes button {
    font-size: 11px;
    padding: 6px 8px;
  }
  .flight-chase-camera {
    top: 64px;
  }
  .detail-dialog .flight-map-settings {
    top: 114px;
  }
  .detail-dialog .flight-map-settings[open] {
    top: 164px;
  }
  .flight-keyboard-hint {
    display: none;
  }
  .detail-dialog .flight-replay-hud {
    width: calc(100% - 28px);
  }
}
@media (max-width: 760px) {
  dialog.detail-dialog {
    --flight-map-height: 360px;
  }
  .detail-dialog .dialog-head {
    padding: 10px 12px;
    gap: 8px;
  }
  .detail-dialog .flight-back {
    font-size: 12px;
    min-height: 36px;
    padding: 6px 10px;
  }
  .detail-dialog .dialog-head h2 {
    font-size: 21px;
  }
  .detail-dialog .flight-header-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: wrap;
    overflow: visible;
  }
  .detail-dialog .flight-header-actions .btn {
    font-size: 11px;
    min-height: 34px;
    padding: 5px 10px;
  }
  .detail-dialog .flight-header-actions .flight-nav {
    width: 32px;
    font-size: 20px;
  }
  .detail-dialog .dialog-body {
    padding: 0;
  }
  .detail-dialog .flight-summary {
    display: flex;
    margin: 0;
    padding: 12px;
    gap: 8px 16px;
  }
  .flight-summary small {
    font-size: 10px;
  }
  .flight-summary strong {
    font-size: 14px;
  }
  .detail-dialog .detail-layout {
    display: block;
  }
  .detail-dialog .flight-replay-stage {
    border-radius: 0;
    border: 0;
  }
  .detail-dialog .flight-map-modes {
    top: 10px;
    left: 10px;
  }
  .flight-map-modes button {
    min-height: 30px;
    font-size: 11px;
    padding: 5px 8px;
  }
  .detail-dialog .flight-map-fullscreen {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
  .flight-chase-camera {
    top: 58px;
    right: 10px;
    min-height: 34px;
    font-size: 11px;
  }
  .detail-dialog .flight-map-settings {
    top: 98px;
    right: 10px;
  }
  .detail-dialog .flight-map-settings[open] {
    top: 140px;
  }
  .detail-dialog .flight-replay-hud {
    left: 10px;
    width: calc(100% - 20px);
    max-width: none;
    top: calc(var(--flight-map-height) - 84px);
  }
  .detail-dialog .flight-replay-hud > div {
    padding: 8px;
  }
  .detail-dialog .flight-replay-hud strong {
    font-size: 15px;
  }
  .detail-dialog .flight-replay-hud small {
    font-size: 8px;
  }
  .detail-dialog .flight-replay-dock {
    padding: 12px;
  }
  .flight-replay-dock .replay-actions {
    gap: 8px;
  }
  .flight-replay-dock [data-replay-toggle] {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  .flight-tempo-buttons {
    margin-left: auto;
  }
  .flight-keyboard-hint {
    display: none;
  }
  .flight-chart-buttons {
    width: 100%;
    margin: 4px 0 0;
  }
  .flight-chart-buttons button {
    flex: 1;
    padding: 6px;
    font-size: 11px;
  }
  .detail-dialog .flight-main-chart {
    padding: 0 12px 14px;
  }
  .detail-dialog .flight-main-chart .altitude {
    height: 200px;
  }
  .flight-detail-side {
    padding: 16px 12px 24px;
  }
  .flight-detail-tabs {
    margin: 0 0 14px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .flight-detail-tabs button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
  }
  .flight-detail-tabs button[aria-selected='true'] {
    background: #2c3b52;
  }
  .flight-highlights {
    padding: 16px;
  }
  .flight-mobile-meta {
    display: none;
  }
  .detail-dialog.replay-expanded .flight-chase-camera {
    top: 58px;
  }
  .detail-dialog.replay-expanded {
    --flight-map-height: 100dvh;
  }
}
.flight-replay-dock .replay-tempo {
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}
.flight-replay-dock .replay-tempo select {
  font-size: 11px;
  max-width: 64px;
}
.flight-replay-dock .replay-tempo-label {
  display: none;
}
.detail-dialog .dialog-head > div:not(.flight-header-actions) {
  flex: 1;
  min-width: 180px;
}
.detail-dialog .flight-map-modes button {
  font-size: 13px;
}
.detail-dialog .flight-replay-dock [data-replay-toggle] {
  min-width: 52px;
  min-height: 52px;
  width: 52px;
  height: 52px;
  padding: 14px;
  border-radius: 8px;
}
.detail-dialog .flight-replay-dock .replay-tempo {
  display: inline-flex;
}
.detail-dialog .flight-main-chart .chart-title strong {
  font-size: 15px;
}
@media (max-width: 760px) {
  .detail-dialog .flight-map-modes button {
    font-size: 11px;
  }
  .detail-dialog .flight-replay-dock [data-replay-toggle] {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 12px;
  }
  .detail-dialog .dialog-head > div:not(.flight-header-actions) {
    min-width: 120px;
  }
}
.flight-peak-badge {
  position: absolute;
  z-index: 1000;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 6px 12px;
  border: 1px solid #5cc48a;
  border-radius: 999px;
  background: rgba(15, 22, 33, 0.94);
  color: #8fddb0;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.flight-peak-badge[hidden] {
  display: none;
}
.detail-dialog .flight-replay-dock [data-replay-toggle] {
  flex-basis: 52px;
}
.detail-dialog .flight-replay-dock [data-replay-toggle] svg {
  width: 22px;
  height: 22px;
}
.detail-dialog:not(.replay-expanded) .flight-replay-dock .replay-actions [data-replay-toggle] {
  height: var(--button-height);
  min-height: var(--button-height);
  padding-block: 0;
}
@media (max-width: 760px) {
  .flight-peak-badge {
    top: 58px;
    left: 10px;
    transform: none;
    max-width: calc(100% - 158px);
    font-size: 10px;
    padding: 5px 8px;
  }
  .detail-dialog .flight-replay-dock [data-replay-toggle] {
    flex-basis: 44px;
  }
}

/* Replay refinements R01–R07: floating player, map panels and timeline states. */
.detail-dialog .flight-map-settings {
  top: 14px;
  right: 66px;
  z-index: 1200;
}
.detail-dialog .flight-map-settings[open] {
  top: 14px;
  right: 14px;
  width: min(390px, calc(100% - 28px));
  max-height: calc(var(--flight-map-height) - 28px);
  overflow: auto;
  padding: 12px;
  background: #141c28;
  border: 1px solid #303e50;
  border-radius: 18px;
  box-shadow: 0 16px 40px #0007;
  color: #e9eef6;
}
.detail-dialog .flight-map-settings[open] > summary {
  margin-bottom: 12px;
  background: #203752;
  border-color: #4d91ce;
}
.replay-map-panel {
  position: relative;
}
.replay-map-panel h3 {
  font-size: 21px;
  margin: 0 42px 20px 4px;
}
.replay-popover-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 50%;
  background: #222e40;
  color: #ccd6e3;
  font-size: 24px;
  cursor: pointer;
}
.replay-setting {
  margin: 18px 0;
}
.replay-setting h4,
.replay-media-settings > h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9cb5d3;
  margin: 0 0 12px;
}
.replay-choice {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.replay-choice button {
  flex: 1;
  min-height: 38px;
  border: 1px solid #303e50;
  border-radius: 10px;
  padding: 9px;
  color: #cad4e0;
  background: #1e2939;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.replay-choice button[aria-pressed='true'] {
  border-color: #60acf5;
  background: #203752;
  box-shadow: inset 0 0 0 1px #60acf5;
  color: #fff;
}
.replay-choice button small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #a8b5c7;
  margin-top: 7px;
}
.replay-backgrounds .replay-choice {
  flex-wrap: nowrap;
}
.replay-backgrounds button:before {
  content: '';
  display: block;
  height: 46px;
  border-radius: 8px;
  background: #3d613b;
  margin-bottom: 9px;
}
.replay-backgrounds button[data-value='map']:before {
  background: #b7c99b;
}
.replay-backgrounds button[data-value='hybrid']:before {
  background: #506d4c;
}
.replay-track-colors button {
  flex-basis: 45%;
}
.replay-switch-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  color: #e9eef6;
  font-size: 14px;
  cursor: pointer;
}
.replay-switch-row strong {
  font-weight: 500;
}
.replay-switch-row small {
  display: block;
  font-size: 12px;
  color: #a8b5c7;
  margin-top: 4px;
}
.replay-switch-row input {
  appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 27px;
  min-height: 27px;
  border: 0;
  border-radius: 999px;
  background: #3c4a5e;
  cursor: pointer;
  padding: 3px;
  margin: 0;
  position: relative;
}
.replay-switch-row input:after {
  content: '';
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}
.replay-switch-row input:checked {
  background: #2472cc;
}
.replay-switch-row input:checked:after {
  transform: translateX(17px);
}
.replay-switch-row input:focus-visible {
  outline: 2px solid #90c6ff;
  outline-offset: 3px;
}
.replay-color-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #b7c5d8;
}
.replay-color-picker input {
  width: 46px;
  height: 30px;
  min-height: 30px;
  padding: 2px;
}
.replay-track-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  background: #1e2939;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  color: #a8b5c7;
}
.replay-track-legend > span {
  height: 7px;
  width: 100%;
  margin-bottom: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #397ccc, #44bcc6, #59c48f, #a4d965, #ebd852);
}
.replay-track-legend small {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
}
.replay-media-settings {
  border-top: 1px solid #303e50;
  margin: 22px -12px;
  padding: 20px 12px 0;
}
.replay-advanced {
  margin: 20px 0 4px;
  border-top: 1px solid #303e50;
  padding-top: 12px;
}
.replay-advanced > summary {
  font-size: 12px;
  cursor: pointer;
  color: #9cb5d3;
}
.replay-advanced .replay-view-controls {
  position: static;
  background: none;
  padding: 0;
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
}
.replay-advanced label {
  font-size: 12px;
}
.replay-map-panel > .btn {
  margin: 4px 4px 4px 0;
  font-size: 11px;
}
.replay-camera-menu {
  position: absolute;
  top: 14px;
  right: 118px;
  z-index: 1190;
  color: #e9eef6;
}
.replay-camera-menu > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #303e50;
  border-radius: 10px;
  background: rgba(15, 22, 33, 0.94);
  cursor: pointer;
  font-size: 13px;
}
.replay-camera-menu > summary::-webkit-details-marker {
  display: none;
}
.replay-camera-menu > summary:after {
  content: '⌄';
  margin-left: 6px;
}
.replay-camera-menu > summary svg {
  width: 18px;
  height: 18px;
}
.replay-camera-menu[open] > summary {
  border-color: #4d91ce;
  background: #203752;
}
.replay-camera-panel {
  position: absolute;
  right: 0;
  top: 52px;
  width: 390px;
  max-height: calc(var(--flight-map-height) - 80px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #303e50;
  border-radius: 18px;
  background: #141c28;
  box-shadow: 0 16px 40px #0007;
}
.replay-camera-choices .replay-choice button {
  flex-basis: 44%;
  text-align: left;
  font-weight: 700;
  padding: 16px 12px;
}
.replay-camera-choices h4 {
  display: none;
}
.replay-camera-choices {
  margin-top: 0;
}
.replay-camera-panel > .btn {
  width: 100%;
  font-size: 13px;
}
.replay-pitch {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 14px;
  color: #cad4e0;
}
.replay-pitch input {
  width: 100%;
  margin-top: 14px;
  accent-color: #2472cc;
  cursor: pointer;
}
.replay-pitch output {
  color: #a8b5c7;
}
.replay-free-camera {
  position: absolute;
  z-index: 1100;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4f7fa;
  color: #172232;
  border-radius: 999px;
  padding: 5px 5px 5px 14px;
  font-size: 12px;
  box-shadow: 0 8px 24px #0005;
  white-space: nowrap;
}
.replay-free-camera .btn {
  border-radius: 999px;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}
.replay-flight-caption {
  display: none;
}
.replay-key-help {
  position: absolute;
  z-index: 1500;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #080d14e6;
  color: #e9eef6;
}
.replay-help-card {
  position: relative;
  width: 760px;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  border: 1px solid #303e50;
  border-radius: 18px;
  background: #141c28;
  padding: 28px;
}
.replay-help-card h2 {
  font-size: 24px;
  margin: 0 40px 24px 0;
}
.replay-help-card > .replay-popover-close {
  top: 18px;
  right: 18px;
}
.replay-help-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin: 0;
}
.replay-help-card dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #263243;
  font-size: 14px;
}
.replay-help-card dd {
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #41516a;
  border-bottom-width: 3px;
  border-radius: 7px;
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
  background: #1e2939;
}
.replay-help-card p {
  color: #a8b5c7;
  margin: 20px 0 0;
  font-size: 13px;
}
.replay-help-button {
  border-radius: 50%;
  width: 34px;
  min-width: 34px;
  padding: 4px;
}
.flight-replay-dock .replay-step {
  display: none;
}
.flight-main-chart {
  position: relative;
}
.replay-hover-preview {
  position: absolute;
  z-index: 5;
  top: 10px;
  max-width: 260px;
  padding: 12px;
  background: #f4f7fa;
  color: #172232;
  border-radius: 12px;
  white-space: pre-line;
  font-size: 12px;
  box-shadow: 0 8px 24px #0005;
  pointer-events: none;
}
.replay-timeline-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  pointer-events: none;
}
.replay-timeline-marker {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: auto;
  min-height: 25px;
  height: 25px;
  min-width: 25px;
  padding: 2px;
  border: 2px solid white;
  border-radius: 6px;
  background: #5986b2;
  color: white;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}
.marker-peak {
  border-radius: 50%;
  border: 1px solid #153b29;
  color: #071f12;
  background: #59c48f;
}
.marker-thermal {
  border-radius: 50%;
  border-color: #4076a7;
  background: #203752;
}
.replay-map-highlight {
  border: 1px solid #173627;
  border-radius: 50%;
  background: #59c48f;
  color: #071f12;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.replay-map-highlight.replay-map-learning {
  padding: 4px;
  border: 1px solid #f0b44c;
  border-radius: 8px;
  background: #2e2417;
  color: #f0b44c;
}
.replay-map-learning svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.leaflet-tooltip.replay-learning-popup {
  width: min(260px, calc(100vw - 48px));
  max-width: none;
  padding: 10px 12px;
  border: 1px solid #705322;
  border-radius: 10px;
  background: #2e2417;
  color: #f5e5c8;
  white-space: normal;
  box-shadow: 0 4px 16px #0004;
}
.replay-learning-popup.leaflet-tooltip-left::before {
  border-left-color: #705322;
}
.replay-learning-popup.leaflet-tooltip-right::before {
  border-right-color: #705322;
}
.replay-learning-tooltip {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  font:
    12px/1.45 Geist,
    system-ui,
    sans-serif;
}
.replay-learning-tooltip strong {
  display: block;
  font-weight: 600;
}
.replay-learning-tooltip p {
  margin: 6px 0 0;
}
.replay-loop-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  background: #203752;
  border: 1px solid #4d91ce;
  border-radius: 999px;
  padding: 4px 4px 4px 12px;
  margin: 10px 0;
  color: #cfe4fa;
  font-size: 12px;
}
.replay-loop-badge button {
  border: 0;
  color: #cfe4fa;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  min-height: 26px;
  background: #345779;
  cursor: pointer;
}
.replay-loop-range {
  position: absolute;
  top: 40px;
  bottom: 50px;
  pointer-events: none;
  background: #60acf518;
  border-left: 3px solid #80bdf5;
  border-right: 3px solid #80bdf5;
}
.replay-media {
  border-radius: 18px;
  background: #141c28;
  border: 1px solid #303e50;
  box-shadow: 0 16px 60px #0008;
  color: #e9eef6;
  padding: 0 0 16px;
  overflow: hidden;
  width: 360px;
  max-width: calc(100% - 24px);
}
.replay-media img,
.replay-media video,
.replay-media iframe {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #293d57;
  border-radius: 0;
}
.replay-media-caption {
  display: block;
  margin: 16px 16px 8px;
  font-size: 14px;
}
.replay-media p {
  margin: 8px 16px;
  font-size: 12px;
  color: #a8b5c7;
}
.replay-media > .btn {
  margin: 8px 16px;
  background: #2472cc;
  color: #fff;
  font-size: 12px;
}
.replay-media-counter {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #0f1723;
  color: white;
  font-size: 12px;
}
.replay-media-expand {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 50%;
  background: #0f1723;
  color: white;
  cursor: pointer;
}
.replay-media-disable,
.replay-media-next {
  display: block;
  margin: 8px 16px 0;
  padding: 2px;
  border: 0;
  background: none;
  color: #80bdf5;
  font-size: 12px;
  cursor: pointer;
}
.replay-media.media-enlarged {
  width: min(850px, calc(100% - 24px));
}
.replay-media.media-enlarged img {
  height: 40dvh;
}
dialog.detail-dialog.replay-expanded .detail-map > .replay-player {
  max-width: 1120px;
  width: calc(100% - 64px);
  bottom: 22px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(13, 20, 29, 0.96);
}
dialog.detail-dialog.replay-expanded .replay-player [data-replay-charts] {
  display: block !important;
  padding: 0;
  margin: 4px 0 0;
}
dialog.detail-dialog.replay-expanded .replay-player [data-replay-charts][hidden] {
  display: none !important;
}
.detail-dialog.replay-expanded .replay-player .altitude {
  height: 115px;
}
.detail-dialog.replay-expanded .replay-player .chart-title,
.detail-dialog.replay-expanded .replay-player .chart-legend,
.detail-dialog.replay-expanded .replay-player .chart-y-labels {
  display: none;
}
.detail-dialog.replay-expanded .replay-player .flight-segment-strip {
  height: 7px;
  margin-top: 12px;
}
.detail-dialog.replay-expanded .replay-timeline {
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}
.detail-dialog.replay-expanded .replay-actions {
  gap: 10px;
  flex-wrap: wrap;
}
.detail-dialog.replay-expanded .replay-actions [data-replay-toggle] {
  flex: 0 0 102px;
  width: 102px;
  height: 46px;
}
.detail-dialog.replay-expanded .replay-step {
  display: block;
  font-size: 13px;
  min-height: 42px;
}
.detail-dialog.replay-expanded .replay-tempo {
  display: none;
}
.detail-dialog.replay-expanded .flight-tempo-buttons {
  display: flex;
}
.detail-dialog.replay-expanded .flight-chart-buttons {
  display: flex;
}
.detail-dialog.replay-expanded [data-replay-clock] {
  flex: 0 0 150px;
}
.detail-dialog.replay-expanded [data-replay-clock-time] {
  font-size: 22px;
}
.detail-dialog.replay-expanded [data-replay-clock-progress] {
  font-size: 12px;
}
.detail-dialog.replay-expanded .flight-keyboard-hint {
  display: none;
}
.detail-dialog.replay-expanded .flight-replay-hud {
  top: 76px;
  left: 16px;
  width: auto;
  max-width: 610px;
}
.detail-dialog.replay-expanded .flight-replay-hud strong {
  font-size: 23px;
}
.detail-dialog.replay-expanded .flight-replay-hud > div {
  min-width: 130px;
  padding: 14px 16px;
}
.detail-dialog.replay-expanded .replay-flight-caption {
  display: block;
  position: absolute;
  z-index: 1000;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: #0f1723db;
  color: #e9eef6;
  font-size: 12px;
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-dialog.replay-expanded .replay-media {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}
@media (max-width: 1100px) {
  .replay-camera-menu {
    top: 64px;
    right: 14px;
  }
  .detail-dialog .flight-map-settings {
    top: 114px;
    right: 14px;
  }
  .detail-dialog .flight-map-settings[open] {
    top: 14px;
  }
  .replay-camera-panel {
    max-height: calc(var(--flight-map-height) - 132px);
  }
}
@media (max-width: 760px) {
  .replay-camera-menu {
    top: 56px;
    right: 10px;
  }
  .replay-camera-menu > summary {
    min-height: 34px;
    font-size: 11px;
    padding: 6px 10px;
  }
  .detail-dialog .flight-map-settings {
    top: 98px;
    right: 10px;
  }
  .detail-dialog .flight-map-settings[open] {
    top: 10px;
    right: 10px;
    max-height: calc(var(--flight-map-height) - 20px);
  }
  .replay-camera-panel {
    width: min(360px, calc(100vw - 20px));
    max-height: calc(var(--flight-map-height) - 106px);
    top: 44px;
  }
  .replay-key-help {
    padding: 10px;
  }
  .replay-help-card {
    padding: 18px;
  }
  .replay-help-card dl {
    grid-template-columns: 1fr;
  }
  .replay-help-card h2 {
    font-size: 20px;
  }
  .replay-help-card dl > div {
    font-size: 12px;
    padding: 7px 0;
  }
  .replay-free-camera {
    top: 150px;
    font-size: 10px;
    gap: 4px;
  }
  .replay-free-camera .btn {
    font-size: 10px;
  }
  .detail-dialog.replay-expanded .flight-replay-hud {
    top: 146px;
    max-width: calc(100% - 20px);
    width: auto;
  }
  .detail-dialog.replay-expanded .flight-replay-hud > div {
    min-width: 0;
    padding: 8px;
  }
  .detail-dialog.replay-expanded .flight-replay-hud strong {
    font-size: 16px;
  }
  .detail-dialog.replay-expanded .replay-flight-caption {
    display: none;
  }
  dialog.detail-dialog.replay-expanded .detail-map > .replay-player {
    width: calc(100% - 20px);
    bottom: 14px;
    padding: 10px;
  }
  .detail-dialog.replay-expanded .replay-actions {
    gap: 5px;
  }
  .detail-dialog.replay-expanded .replay-step {
    min-width: 32px;
    padding: 5px;
    font-size: 10px;
  }
  .detail-dialog.replay-expanded .replay-actions [data-replay-toggle] {
    flex-basis: 74px;
    width: 74px;
    height: 36px;
  }
  .detail-dialog.replay-expanded [data-replay-clock] {
    flex: 1;
    min-width: 110px;
  }
  .detail-dialog.replay-expanded [data-replay-clock-time] {
    font-size: 17px;
  }
  .detail-dialog.replay-expanded .flight-chart-buttons {
    width: auto;
    margin-left: auto;
  }
  .detail-dialog.replay-expanded .flight-chart-buttons button {
    padding: 6px 10px;
  }
  .detail-dialog.replay-expanded .replay-player .altitude {
    height: 115px;
  }
  .detail-dialog.replay-expanded .replay-media {
    width: 320px;
  }
  .replay-media img {
    height: 150px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-map-modes,
  .detail-dialog.replay-expanded .replay-flight-caption {
    display: none;
  }
  .detail-dialog.replay-expanded .flight-replay-hud {
    top: 12px;
    left: max(16px, env(safe-area-inset-left));
    width: auto;
    max-width: 60%;
  }
  .detail-dialog.replay-expanded .flight-replay-hud small {
    display: none;
  }
  .detail-dialog.replay-expanded .flight-replay-hud > div {
    padding: 7px 12px;
    min-width: 0;
  }
  .detail-dialog.replay-expanded .flight-replay-hud strong {
    font-size: 17px;
  }
  .detail-dialog.replay-expanded .replay-camera-menu {
    top: 12px;
    right: 112px;
  }
  .detail-dialog.replay-expanded .replay-camera-menu > summary {
    width: 40px;
    height: 40px;
    padding: 10px;
  }
  .detail-dialog.replay-expanded .replay-camera-menu > summary span,
  .detail-dialog.replay-expanded .replay-camera-menu > summary:after {
    display: none;
  }
  .detail-dialog.replay-expanded .flight-map-settings {
    top: 12px;
    right: 62px;
  }
  .detail-dialog.replay-expanded .flight-map-settings[open] {
    top: 12px;
    max-height: calc(100dvh - 24px);
  }
  .detail-dialog.replay-expanded .flight-map-fullscreen {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .detail-dialog.replay-expanded .replay-camera-panel {
    width: 360px;
    max-height: calc(100dvh - 74px);
  }
  dialog.detail-dialog.replay-expanded .detail-map > .replay-player {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 12px;
    bottom: 12px;
    max-width: 1000px;
    padding: 10px 14px;
  }
  .detail-dialog.replay-expanded .replay-actions {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .detail-dialog.replay-expanded .replay-actions [data-replay-toggle] {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    padding: 12px;
    min-width: 42px;
  }
  .detail-dialog.replay-expanded .replay-toggle-label,
  .detail-dialog.replay-expanded .replay-step,
  .detail-dialog.replay-expanded .flight-tempo-buttons,
  .detail-dialog.replay-expanded .flight-chart-buttons,
  .detail-dialog.replay-expanded .replay-help-button,
  .detail-dialog.replay-expanded .flight-segment-strip {
    display: none;
  }
  .detail-dialog.replay-expanded [data-replay-clock] {
    flex: 1;
    min-width: 0;
  }
  .detail-dialog.replay-expanded [data-replay-clock-time] {
    font-size: 17px;
  }
  .detail-dialog.replay-expanded [data-replay-clock-progress] {
    font-size: 10px;
  }
  .detail-dialog.replay-expanded .replay-player .altitude {
    height: 64px;
  }
  .detail-dialog.replay-expanded .chart-x-labels {
    display: none;
  }
  .detail-dialog.replay-expanded .replay-hover-preview {
    top: -55px;
  }
  .detail-dialog.replay-expanded .replay-free-camera {
    top: 62px;
  }
  .detail-dialog.replay-expanded .replay-media {
    width: 290px;
  }
  .detail-dialog.replay-expanded .replay-media img {
    height: 100px;
  }
  .detail-dialog.replay-expanded .replay-media p {
    margin: 5px 12px;
  }
  .detail-dialog.replay-expanded .replay-key-help {
    padding: 12px;
  }
  .replay-loop-range {
    top: 10px;
    bottom: 5px;
  }
}
/* Hidden interactive states must not override the native hidden attribute. */
.replay-free-camera[hidden],
.replay-key-help[hidden],
.replay-loop-badge[hidden],
.replay-hover-preview[hidden],
.replay-loop-range[hidden],
.replay-track-legend[hidden] {
  display: none;
}
.replay-compact-tempo {
  display: none;
}
.replay-loop-button {
  font-size: 18px;
  width: 34px;
  min-width: 34px;
  padding: 4px;
  border-radius: 50%;
}
@media (orientation: landscape) and (max-height: 520px) {
  dialog.detail-dialog.replay-expanded .detail-map > .replay-player {
    grid-template-columns: 180px 1fr 48px;
  }
  .detail-dialog.replay-expanded .replay-compact-tempo {
    display: block;
    grid-column: 3;
    grid-row: 1;
    min-width: 44px;
    min-height: 40px;
    padding: 5px;
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
  }
  .detail-dialog.replay-expanded .replay-loop-button,
  .detail-dialog.replay-expanded .replay-loop-badge {
    display: none;
  }
  .detail-dialog.replay-expanded .replay-player [data-replay-charts] {
    grid-column: 2;
    grid-row: 1;
  }
}
.detail-dialog .flight-map-settings[open] {
  top: 66px;
  max-height: calc(var(--flight-map-height) - 80px);
}
@media (max-width: 760px) {
  .detail-dialog .flight-map-settings[open] {
    top: 56px;
    max-height: calc(var(--flight-map-height) - 66px);
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-map-settings[open] {
    top: 60px;
    max-height: calc(100dvh - 72px);
  }
}
.detail-dialog.replay-expanded .replay-player .flight-chart-legend,
.detail-dialog.replay-expanded .replay-player .chart-summary,
.detail-dialog.replay-expanded .replay-player .chart-data-note {
  display: none;
}
.detail-dialog.replay-expanded .flight-replay-hud small strong {
  font-size: 11px;
  color: #a8b5c7;
}
.detail-dialog.replay-expanded .replay-player .chart-axis-height,
.detail-dialog.replay-expanded .replay-player .chart-axis-unit {
  display: none;
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .replay-player .chart-axis-labels {
    display: none;
  }
}
.detail-dialog.replay-expanded .flight-hud-sub strong {
  font-size: 11px;
  color: #a8b5c7;
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-replay-hud > div > small:first-child {
    display: block;
    font-size: 9px;
    margin-bottom: 2px;
  }
  .detail-dialog.replay-expanded .flight-hud-sub {
    display: none;
  }
}
.replay-media-time {
  float: right;
  color: #a8b5c7;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  margin: 2px 0 0 8px;
}
/* A media moment uses the compact transport so its card stays clear of the player. */
dialog.detail-dialog.replay-expanded.replay-media-paused .replay-player [data-replay-charts] {
  display: none !important;
}
.detail-dialog.replay-media-paused.replay-expanded .flight-tempo-buttons,
.detail-dialog.replay-media-paused.replay-expanded .flight-chart-buttons,
.detail-dialog.replay-media-paused.replay-expanded .replay-help-button,
.detail-dialog.replay-media-paused.replay-expanded .replay-loop-button,
.detail-dialog.replay-media-paused.replay-expanded .replay-step,
.detail-dialog.replay-media-paused.replay-expanded .flight-segment-strip {
  display: none;
}
.detail-dialog.replay-expanded.replay-media-paused .replay-timeline {
  height: auto;
  opacity: 1;
  margin: 6px 0 0;
  font-size: 10px;
}
.detail-dialog.replay-expanded.replay-media-paused .replay-timeline input {
  min-height: 20px;
}
.detail-dialog.replay-media-paused .replay-player .replay-actions [data-replay-clock] {
  flex: 1;
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded.replay-media-paused .replay-timeline {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .detail-dialog.replay-expanded.replay-media-paused .replay-media {
    top: 48%;
    padding-bottom: 8px;
  }
  .detail-dialog.replay-expanded.replay-media-paused .replay-media-caption {
    margin: 8px 12px 4px;
  }
  .detail-dialog.replay-expanded.replay-media-paused .replay-media-disable {
    margin-top: 3px;
  }
}

/* Replay: balanced controls, a round chart cursor and focused photo moments. */
.detail-dialog .replay-tempo {
  display: none;
}
.chart-height-extreme {
  position: absolute;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.chart-landing-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #5ea8f2;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}
.replay-chart-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-sizing: border-box;
}
.replay-chart-dot[hidden] {
  display: none;
}
.detail-dialog.replay-expanded .replay-player .altitude path[stroke] {
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.detail-dialog.replay-expanded .replay-player .altitude line {
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}
.detail-dialog.replay-expanded .replay-player .altitude .replay-cursor {
  stroke-width: 1;
}
.detail-dialog.replay-expanded .replay-player .chart-extreme {
  display: none;
}
.detail-dialog .replay-camera-menu {
  top: 14px;
  right: 118px;
}
.detail-dialog .replay-camera-menu > summary,
.detail-dialog .flight-map-settings > summary,
.detail-dialog .flight-map-fullscreen {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}
.detail-dialog .flight-map-settings {
  top: 14px;
  right: 66px;
}
.detail-dialog .flight-map-settings > summary {
  width: 42px;
}
.detail-dialog .flight-map-fullscreen {
  top: 14px;
  right: 14px;
  width: 42px;
}
.detail-dialog .replay-free-camera {
  top: 14px;
}
.detail-dialog:has(.replay-free-camera:not([hidden])) .replay-flight-caption {
  display: none;
}
.detail-dialog .replay-media,
.detail-dialog.replay-expanded .replay-media {
  inset: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-height: calc(100% - 150px);
  overflow: auto;
  width: min(400px, calc(100% - 24px));
  display: block;
}
.detail-dialog .replay-media.media-enlarged {
  width: min(850px, calc(100% - 24px));
}
.flight-segment-legend {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  color: #a8b5c7;
  font-size: 10px;
  margin: 6px 0;
}
.flight-segment-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.flight-segment-legend span:before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #293443;
}
.flight-segment-legend .segment-circling:before {
  background: #2a4f7c;
}
.flight-segment-legend .segment-glide:before {
  background: #8a6a3a;
}
.flight-segment-legend .segment-missing:before {
  background: #5a2e2e;
}
.detail-dialog.replay-media-paused .flight-map-modes,
.detail-dialog.replay-media-paused .flight-map-settings,
.detail-dialog.replay-media-paused .flight-map-fullscreen,
.detail-dialog.replay-media-paused .replay-camera-menu,
.detail-dialog.replay-media-paused .flight-replay-hud,
.detail-dialog.replay-media-paused .replay-flight-caption,
.detail-dialog.replay-media-paused .flight-peak-badge,
.detail-dialog.replay-media-paused .leaflet-control-container,
.detail-dialog.replay-media-paused .mapboxgl-ctrl-top-right,
.detail-dialog.replay-media-paused .replay-free-camera,
.detail-dialog.replay-media-paused .replay-key-help,
.detail-dialog.replay-media-paused .flight-segment-legend,
.detail-dialog.replay-media-paused .replay-loop-badge,
.detail-dialog.replay-media-paused .replay-compact-tempo {
  display: none !important;
}
dialog.detail-dialog.replay-expanded.replay-media-paused .detail-map > .replay-player {
  display: grid;
  grid-template-columns: auto minmax(80px, 150px) 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.detail-dialog.replay-expanded.replay-media-paused .replay-actions {
  display: contents;
}
.detail-dialog.replay-expanded.replay-media-paused .replay-timeline {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  font-size: 0;
  overflow: visible;
}
.detail-dialog.replay-expanded.replay-media-paused .replay-toggle-label {
  display: inline;
}
@media (max-width: 1100px) {
  .detail-dialog .replay-camera-menu,
  .detail-dialog .flight-map-settings,
  .detail-dialog .flight-map-fullscreen {
    top: 64px;
  }
  .detail-dialog:has(.replay-free-camera:not([hidden])) .flight-map-modes {
    top: 114px;
  }
  .detail-dialog .flight-map-settings[open] {
    top: 114px;
  }
}
@media (max-width: 760px) {
  .detail-dialog .replay-camera-menu > summary {
    font-size: 11px;
  }
  .detail-dialog .replay-media img,
  .detail-dialog .replay-media video,
  .detail-dialog .replay-media iframe {
    height: 150px;
  }
  .detail-dialog .replay-free-camera {
    font-size: 10px;
  }
  dialog.detail-dialog.replay-expanded.replay-media-paused .detail-map > .replay-player {
    grid-template-columns: auto 1fr;
    gap: 6px;
  }
  .detail-dialog.replay-expanded.replay-media-paused .replay-timeline {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .replay-camera-menu,
  .detail-dialog.replay-expanded .flight-map-settings,
  .detail-dialog.replay-expanded .flight-map-fullscreen {
    top: 12px;
  }
  .detail-dialog.replay-expanded .replay-free-camera {
    top: 12px;
  }
  .detail-dialog.replay-expanded .replay-media {
    max-height: calc(100% - 92px);
    width: 290px;
    top: calc(50% - 30px);
  }
  .detail-dialog.replay-expanded .replay-media img {
    height: 100px;
  }
  dialog.detail-dialog.replay-expanded.replay-media-paused .detail-map > .replay-player {
    grid-template-columns: auto 125px 1fr;
    bottom: 8px;
  }
  .detail-dialog.replay-expanded.replay-media-paused .replay-timeline {
    grid-column: 3;
    grid-row: 1;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-segment-legend {
    display: none;
  }
}
.detail-dialog .flight-replay-dock .replay-tempo,
.detail-dialog .detail-map > .replay-player .replay-tempo {
  display: none;
}
.detail-dialog.replay-media-paused .detail-map .tile-status {
  display: none;
}
.flight-chart-plot {
  position: relative;
}
.detail-dialog .flight-main-chart .flight-chart-plot {
  width: calc(100% - 16px);
  margin-left: 16px;
}
.detail-dialog .flight-main-chart .flight-chart-plot .altitude {
  width: 100%;
  margin: 0;
}
.detail-dialog.replay-media-paused .map-photo-marker,
.detail-dialog.replay-media-paused .replay-map-highlight {
  display: none !important;
}
.detail-dialog.replay-media-paused .replay-actions > button:not([data-replay-toggle]),
.detail-dialog.replay-media-paused .flight-tempo-buttons,
.detail-dialog.replay-media-paused .flight-chart-buttons,
.detail-dialog.replay-media-paused .flight-keyboard-hint,
.detail-dialog.replay-media-paused .flight-segment-strip,
.detail-dialog.replay-media-paused [data-replay-charts] {
  display: none !important;
}
@media (max-width: 1100px) {
  .detail-dialog .flight-map-settings[open] {
    max-height: calc(var(--flight-map-height) - 128px);
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-map-settings[open] {
    top: 60px;
    max-height: calc(100dvh - 72px);
  }
}

/* Layer and camera disclosures keep their triggers above separate popovers. */
.detail-dialog.replay-expanded .flight-map-settings {
  right: 66px;
}
.detail-dialog .flight-map-settings[open],
.detail-dialog.replay-expanded .flight-map-settings[open] {
  top: 14px;
  right: 66px;
  width: 42px;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.detail-dialog .flight-map-settings[open] > summary {
  margin: 0;
  padding: 7px;
  border: 1px solid #4d91ce;
}
.replay-layers-panel {
  position: absolute;
  right: 0;
  top: 52px;
  width: 390px;
  max-height: calc(var(--flight-map-height) - 80px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #303e50;
  border-radius: 18px;
  background: #141c28;
  box-shadow: 0 16px 40px #0007;
  color: #e9eef6;
}
@media (max-width: 1100px) {
  .detail-dialog .flight-map-settings[open],
  .detail-dialog.replay-expanded .flight-map-settings[open] {
    top: 64px;
  }
  .detail-dialog .replay-layers-panel,
  .detail-dialog .replay-camera-panel {
    max-height: calc(var(--flight-map-height) - 130px);
  }
}
@media (max-width: 760px) {
  .detail-dialog .replay-layers-panel,
  .detail-dialog .replay-camera-panel {
    top: 44px;
    width: min(360px, calc(100vw - 28px));
    max-height: calc(var(--flight-map-height) - 122px);
  }
  .detail-dialog .replay-layers-panel {
    right: -52px;
  }
  .detail-dialog .replay-camera-panel {
    right: -104px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-map-settings[open] {
    top: 12px;
    right: 62px;
  }
  .detail-dialog.replay-expanded .replay-layers-panel,
  .detail-dialog.replay-expanded .replay-camera-panel {
    top: 52px;
    max-height: calc(100dvh - 78px);
  }
}

/* Current replay position within the classified flight sections. */
.flight-segment-strip {
  position: relative;
}
.flight-segment-strip:after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(1px, var(--replay-position, 0%), calc(100% - 1px));
  width: 2px;
  background: #f87171;
  box-shadow: 0 0 0 0.5px #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Flight detail header: navigation, sharing and the grouped actions popover. */
.detail-dialog .flight-header-actions {
  position: relative;
  flex-wrap: nowrap;
  gap: 10px;
}
.flight-nav-group {
  display: flex;
  border: 1px solid #303e50;
  border-radius: 10px;
  overflow: hidden;
}
.detail-dialog .flight-nav-group .flight-nav {
  border: 0;
  border-radius: 0;
  background: transparent;
  width: 32px;
  min-height: 32px;
  height: 32px;
  font-size: 18px;
}
.flight-nav-group .flight-nav + button {
  border-left: 1px solid #303e50 !important;
}
.detail-dialog .flight-share {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}
.flight-share svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.flight-detail-actions {
  position: relative;
  color: #e8edf4;
}
.flight-detail-actions > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #303e50;
  border-radius: 10px;
  background: #0f1721;
  cursor: pointer;
  letter-spacing: 2px;
  font-size: 15px;
}
.flight-detail-actions > summary::-webkit-details-marker {
  display: none;
}
.flight-detail-actions[open] > summary {
  border-color: #3c6fa3;
  background: #1f3550;
  color: #fff;
}
.flight-detail-actions-panel {
  position: absolute;
  z-index: 1600;
  right: 0;
  top: 44px;
  width: 360px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 140px);
  overflow: auto;
  background: #1c2737;
  border: 1px solid #303e50;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 50px #0007;
}
.flight-actions-caption {
  font-size: 12px !important;
  color: #a8b5c7;
  margin: 0 !important;
  padding: 9px 10px 12px;
}
.flight-action-group {
  border-top: 1px solid #303e50;
  padding: 10px 0;
}
.flight-action-group h3 {
  margin: 0;
  padding: 0 10px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb5d3;
}
.flight-action-group h3:empty {
  display: none;
}
.flight-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.flight-action-row:hover,
.flight-action-row:focus-visible {
  background: #233247;
  outline: none;
}
.flight-action-symbol {
  width: 20px;
  flex: none;
  text-align: center;
  color: #a8b5c7;
}
.flight-action-row kbd {
  margin-left: auto;
  color: #a8b5c7;
  font:
    12px 'Geist Mono',
    monospace;
}
.flight-action-row:disabled {
  opacity: 0.45;
  cursor: default;
}
.flight-action-danger,
.flight-action-danger .flight-action-symbol {
  color: #ff7c7c;
}
@media (max-width: 760px) {
  .detail-dialog .flight-header-actions {
    gap: 7px;
  }
  .detail-dialog .flight-nav-group .flight-nav {
    width: 28px;
  }
  .flight-detail-actions-panel {
    max-height: calc(100dvh - 180px);
  }
  .flight-action-row {
    min-height: 44px;
    font-size: 13px;
  }
}
.flight-action-primary {
  background: #233247;
}
.flight-action-symbol svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

/* Statistik: Entwicklung, Jahresbalken und persönliche Abzeichen. */
.development {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.development-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.development-heading h1 {
  font-size: 34px;
  letter-spacing: -0.7px;
}
.development-heading p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}
.development-heading label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.development-heading select {
  height: 40px;
  border-radius: 10px;
  background: var(--solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0 10px;
}
.development-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.development .card {
  border-radius: 16px;
  background: var(--solid);
  border: 1px solid var(--border);
}
.development-metric {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.development-metric > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.development-metric strong {
  font:
    600 28px/1.4 'Geist Mono',
    monospace;
  overflow-wrap: anywhere;
}
.development-metric small,
.development small {
  color: var(--muted);
  font-size: 12px;
}
.development-delta {
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--accent-soft);
  white-space: nowrap;
}
.development-delta.positive {
  background: #1e3a2c;
  color: #8fddb0;
}
[data-theme='light'] .development-delta.positive {
  background: #dcf3e5;
  color: var(--ok);
}
.comparison-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.comparison-bars i {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--width), var(--border) var(--width));
}
.comparison-bars i + i {
  background: linear-gradient(to right, #4a5a70 var(--width), var(--border) var(--width));
}
.development-years,
.development-sites,
.development-achievements {
  padding: 20px 22px;
}
.development-years > header,
.development-achievements > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.development-years .segment {
  padding: 3px;
  gap: 3px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.development-years .segment button {
  font-size: 12px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
}
.year-chart-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  max-width: 100%;
  margin-top: 14px;
}
.development-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 230px;
  min-width: calc(var(--years) * 44px);
}
.year-column {
  flex: 1 0 34px;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
  color: var(--muted);
}
.year-column span {
  font:
    11px 'Geist Mono',
    monospace;
}
.year-column i {
  display: block;
  width: 100%;
  max-width: 46px;
  height: var(--height);
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: #2e4d73;
}
.year-column.active i {
  background: var(--accent);
}
.year-column:hover i {
  filter: brightness(1.25);
}
.development-data {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.development-data summary {
  cursor: pointer;
}
.development-data p {
  margin-top: 8px;
}
.development-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.development-sites {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.development-site {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) minmax(40px, 1.4fr) auto auto;
  align-items: center;
  gap: 12px;
}
.development-site .btn {
  padding: 0;
  text-align: left;
  font-weight: 550;
  white-space: normal;
  overflow-wrap: anywhere;
  min-height: 24px;
}
.development-site > span {
  font:
    12px 'Geist Mono',
    monospace;
  text-align: right;
}
.development-site > small {
  white-space: nowrap;
  text-align: right;
}
.site-bar {
  height: 22px;
  border-radius: 6px;
  background: var(--panel);
  overflow: hidden;
}
.site-bar i {
  display: block;
  height: 100%;
  background: #2470c8;
  border-radius: 6px;
}
.development-achievements {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.next-achievement {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #3c6fa3;
  border-radius: 14px;
  background: var(--accent-soft);
}
.next-achievement > div {
  min-width: 0;
}
.next-achievement small {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.next-achievement h3 {
  font-size: 18px;
}
.next-achievement p {
  color: var(--muted);
  font-size: 13px;
}
.next-ring {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}
.ring-track {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 7;
}
.ring-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
}
.next-ring text {
  fill: var(--text);
  font:
    600 18px 'Geist Mono',
    monospace;
}
.development-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 8px;
}
.development-badges article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
}
.development-badges strong {
  font-size: 13px;
}
.development-badges small {
  font-size: 11px;
}
.medal {
  width: 72px;
  height: 72px;
  color: var(--muted);
}
.medal .ring-track,
.medal .ring-value {
  stroke-width: 5;
}
.medal-inner {
  fill: none;
  stroke: var(--border);
  stroke-dasharray: 2 3;
}
.medal svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.medal.earned {
  color: #f5d38a;
}
.medal.earned .ring-track {
  fill: #3a3016;
}
.medal.earned .ring-value,
.medal.earned .medal-inner {
  stroke: #f0b44c;
}
.medal-check {
  fill: #f0b44c;
  stroke: var(--solid);
  stroke-width: 3;
}
.medal .check {
  fill: none;
  stroke: #121925;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.medal.earned.silver {
  color: #e8edf4;
}
.medal.earned.silver .ring-track {
  fill: #262e3b;
}
.medal.earned.silver .ring-value,
.medal.earned.silver .medal-inner {
  stroke: #c9d3e0;
}
.medal.silver .medal-check {
  fill: #c9d3e0;
}
.medal.earned.blue {
  color: #cfe4fa;
}
.medal.earned.blue .ring-track {
  fill: #1f3550;
}
.medal.earned.blue .ring-value,
.medal.earned.blue .medal-inner {
  stroke: #5ea8f2;
}
.medal.blue .medal-check {
  fill: #5ea8f2;
}
.development-record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #6a5328;
  border-radius: 12px;
  background: #2a2214;
  color: #e8edf4;
  text-align: left;
}
.development-record > span:first-child {
  font-size: 24px;
  color: #f5c98a;
}
.development-record > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.development-record small {
  display: block;
  color: #f5c98a;
}
.development-record strong {
  font-size: 13px;
  display: block;
}
.development-record > span:last-child {
  color: #7dbbf7;
  font-size: 12px;
  white-space: nowrap;
}
.statistics-details {
  margin-top: 24px;
  min-width: 0;
}
.statistics-details > summary {
  cursor: pointer;
  color: var(--muted);
  padding: 12px 0;
}
.statistics-details .period-heading {
  margin-top: 16px;
}
@media (max-width: 1100px) {
  .development-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
  .development-metric {
    padding: 16px;
  }
  .development-metric strong {
    font-size: 24px;
  }
}
@media (max-width: 760px) {
  .development-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .development-heading h1 {
    font-size: 28px;
  }
  .development-heading label {
    width: 100%;
    justify-content: space-between;
  }
  .development-heading select {
    max-width: 65%;
  }
  .development-years,
  .development-sites,
  .development-achievements {
    padding: 16px;
  }
  .development-site {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }
  .development-site .site-bar {
    grid-column: 1;
    grid-row: auto;
    height: 12px;
  }
  .development-site > span {
    grid-column: 2;
    grid-row: span 1;
  }
  .development-site > small {
    grid-column: 2;
  }
  .development-site .btn {
    grid-column: 1 / -1;
  }
  .development-metric > div:first-child {
    flex-wrap: wrap;
  }
  .development-metric strong {
    font-size: 21px;
  }
  .development-record {
    flex-wrap: wrap;
  }
  .development-record > span:last-child {
    margin-left: auto;
  }
  .next-achievement {
    padding: 12px;
    gap: 12px;
  }
  .next-ring {
    width: 72px;
    height: 72px;
  }
  .development {
    gap: 18px;
  }
  .development-badges strong {
    font-size: 12px;
  }
}
.development-site .btn.text {
  font-size: 14px;
  color: var(--text);
  justify-content: flex-start;
  text-decoration: none;
}
.development-record strong {
  font-variant-numeric: tabular-nums;
}
.development-selectors {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.development-chart .year-column {
  cursor: default;
}
.development-chart .year-column i[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .development-selectors {
    width: 100%;
  }
  .development-selectors label {
    flex: 1 1 110px;
    min-width: 0;
  }
  .development-selectors select {
    max-width: 100%;
  }
}
@media (max-width: 760px) {
  .development-selectors label {
    flex-basis: 100%;
  }
  .development-selectors select {
    min-width: 0;
    max-width: 65%;
  }
}

/* Dedicated flight analysis, based on the supplied flight screen. */
.flight-view-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.flight-view-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  font:
    600 13px Geist,
    system-ui;
  cursor: pointer;
}
.flight-view-tabs button[aria-pressed='true'] {
  background: #2c3b52;
  color: #fff;
}
.detail-dialog .dialog-body > [hidden] {
  display: none !important;
}
.flight-analysis-page,
.flight-share-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 0 24px;
}
.flight-analysis-page .flight-analysis {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.flight-analysis.analysis-ready > h3,
.flight-analysis.analysis-ready > p,
.flight-analysis.analysis-ready > [data-flight-analysis] {
  display: none;
}
.analysis-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  min-width: 0;
}
.analysis-summary {
  padding: 24px 28px;
  margin-bottom: 22px;
}
.analysis-eyebrow {
  color: #7dbbf7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flight-analysis .analysis-story {
  font-size: 20px;
  line-height: 1.5;
  margin: 8px 0 20px;
  max-width: 1000px;
  overflow-wrap: normal;
}
.analysis-blue {
  color: #7dbbf7;
}
.analysis-green {
  color: #8fddb0;
}
.analysis-gold {
  color: #f0c27a;
}
.analysis-timeline {
  display: flex;
  gap: 2px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
}
.analysis-timeline button {
  border: 0;
  padding: 0;
  min-width: 2px;
  cursor: pointer;
}
.analysis-timeline .segment-circling,
.analysis-totals .segment-circling {
  background: #3b7bd0;
}
.analysis-timeline .segment-glide,
.analysis-totals .segment-glide {
  background: #c9944a;
}
.analysis-timeline .segment-unclassified,
.analysis-totals .segment-unclassified {
  background: #3a475a;
}
.analysis-timeline .segment-missing,
.analysis-totals .segment-missing {
  background: #8a3b3b;
}
.analysis-time-axis {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font:
    11px 'Geist Mono',
    monospace;
  margin: 8px 0 20px;
}
.analysis-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.analysis-totals > div {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  padding: 14px 16px;
  border-radius: 12px;
  min-width: 0;
}
.analysis-totals i {
  width: 12px;
  height: 32px;
  border-radius: 3px;
  flex-shrink: 0;
}
.analysis-totals span {
  font-size: 13px;
  color: var(--muted);
}
.analysis-totals strong {
  display: block;
  font:
    600 20px 'Geist Mono',
    monospace;
  margin-top: 4px;
}
.analysis-totals small {
  font-size: 12px;
  color: var(--muted);
}
.analysis-columns {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 22px;
  align-items: start;
}
.analysis-card h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 600;
}
.analysis-sections header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.analysis-sections header div {
  display: flex;
  gap: 6px;
}
.analysis-sections header button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font:
    13px Geist,
    system-ui;
  cursor: pointer;
}
.analysis-sections header button[aria-pressed='true'] {
  background: #1f3550;
  border-color: #3c6fa3;
  color: #cfe4fa;
}
.analysis-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.analysis-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel);
  min-width: 0;
}
.analysis-row[hidden] {
  display: none;
}
.analysis-kind-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #263243;
  color: #a3afc0;
  font-weight: 700;
}
.segment-row-circling .analysis-kind-icon {
  background: #1f3550;
  color: #7dbbf7;
}
.segment-row-glide .analysis-kind-icon {
  background: #3a2e1a;
  color: #f0c27a;
}
.analysis-row-label {
  flex: 1;
  min-width: 90px;
  font-size: 14px;
}
.analysis-row-label small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.analysis-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #3a3016;
  color: #f5d38a;
  white-space: nowrap;
}
.analysis-duration-bar {
  width: 25%;
  max-width: 160px;
  height: 6px;
  border-radius: 999px;
  background: #263243;
  flex-shrink: 1;
}
.analysis-duration-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #a3afc0;
}
.segment-row-circling .analysis-duration-bar i {
  background: #7dbbf7;
}
.segment-row-glide .analysis-duration-bar i {
  background: #f0c27a;
}
.analysis-row-duration {
  font:
    15px 'Geist Mono',
    monospace;
  min-width: 52px;
  text-align: right;
}
.analysis-seek {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  flex-shrink: 0;
  cursor: pointer;
}
.analysis-xc-values {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 22px 0 14px;
}
.analysis-xc-values strong {
  display: block;
  font:
    600 32px 'Geist Mono',
    monospace;
}
.analysis-xc-values span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.analysis-track {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #1f302b;
}
.analysis-track-line {
  fill: none;
  stroke: #5ea8f2;
  stroke-width: 2;
  opacity: 0.5;
}
.analysis-xc-line {
  fill: none;
  stroke: #f0b44c;
  stroke-width: 2.5;
  stroke-dasharray: 6 4;
}
.analysis-track text {
  fill: #121925;
  font:
    600 12px 'Geist Mono',
    monospace;
}
.analysis-waypoints {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.analysis-waypoints li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.analysis-waypoints time {
  font-family: 'Geist Mono', monospace;
  color: var(--muted);
}
.analysis-disclaimer {
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  margin-bottom: 0;
}
.analysis-method {
  margin-top: 22px;
  padding: 16px 20px;
  font-size: 13px;
}
.analysis-method summary {
  font-weight: 600;
  cursor: pointer;
}
.analysis-method li {
  margin: 6px 0;
  color: var(--muted);
}
.flight-detail-side .analysis-columns {
  grid-template-columns: 1fr;
}
.flight-detail-side .analysis-totals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flight-detail-side .analysis-duration-bar,
.flight-detail-side .analysis-badge {
  display: none;
}
@media (max-width: 1000px) {
  .analysis-columns {
    grid-template-columns: 1fr;
  }
  .analysis-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .flight-analysis-page,
  .flight-share-page {
    padding: 18px 0;
  }
  .analysis-card,
  .analysis-summary {
    padding: 16px;
    border-radius: 14px;
  }
  .flight-analysis .analysis-story {
    font-size: 17px;
  }
  .analysis-totals {
    gap: 8px;
  }
  .analysis-totals > div {
    padding: 12px 10px;
    gap: 8px;
  }
  .analysis-totals strong {
    font-size: 17px;
  }
  .analysis-totals small {
    font-size: 10px;
  }
  .analysis-totals span {
    font-size: 11px;
  }
  .analysis-time-axis {
    font-size: 9px;
  }
  .analysis-time-axis span:nth-child(2),
  .analysis-time-axis span:nth-child(4) {
    display: none;
  }
  .analysis-row {
    gap: 8px;
    padding: 10px 8px;
    flex-wrap: wrap;
  }
  .analysis-row-label {
    min-width: 80px;
  }
  .analysis-duration-bar {
    display: none;
  }
  .analysis-badge {
    order: 6;
    margin-left: 44px;
  }
  .analysis-row-duration {
    min-width: 44px;
    font-size: 13px;
  }
  .analysis-seek {
    width: 32px;
    height: 32px;
  }
  .analysis-waypoints {
    font-size: 11px;
  }
  .flight-view-tabs {
    margin-left: auto;
  }
  .flight-view-tabs button {
    padding: 0 10px;
  }
  .detail-dialog[data-flight-view='analysis'] .dialog-body {
    padding: 0 12px 12px;
  }
}
dialog.detail-dialog[data-flight-view='analysis'],
dialog.detail-dialog[data-flight-view='share'] {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
}
.detail-dialog[data-flight-view='analysis'] .dialog-head,
.detail-dialog[data-flight-view='share'] .dialog-head {
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid var(--border);
}
.detail-dialog[data-flight-view='analysis'] .flight-share,
.detail-dialog[data-flight-view='share'] .flight-share {
  display: none;
}
/* Flugkarte teilen: the same canvas supplies the preview and exported PNG. */
.detail-dialog[data-flight-view='share'] {
  background: #121925;
  color: #e8edf4;
  color-scheme: dark;
}
.detail-dialog[data-flight-view='share'] .dialog-head {
  display: none;
}
.detail-dialog[data-flight-view='share'] .dialog-body {
  padding: 0;
}
.flight-share-page {
  max-width: none;
  padding: 0;
}
.share-flight-card {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
.share-page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid #222d3f;
  background: #0f1621;
}
.share-page-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
}
.share-page-head .btn {
  min-height: 42px;
  padding: 0 12px;
  color: #c9d3e0;
  border: 1px solid #2c3849;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
}
.share-workspace {
  max-width: 1248px;
  margin: auto;
  padding: 32px 24px 48px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
}
.share-preview {
  flex: 0 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.share-preview [data-card-result] {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #0e1622;
  box-shadow: 0 24px 60px #0006;
  min-height: 100px;
}
.share-flight-card .share-preview img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}
.share-preview > p {
  margin: 0;
  color: #a3afc0;
  font-size: 12px;
  text-align: center;
}
.share-settings {
  flex: 1 1 380px;
  max-width: 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.share-settings h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #e8edf4;
}
.share-format,
.share-style {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.share-format button,
.share-style button,
.share-export button {
  cursor: pointer;
  border: 1px solid #2c3849;
  border-radius: 12px;
  background: #1b2433;
  color: #c9d3e0;
  font-size: 13px;
  min-width: 0;
}
.share-format button {
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px;
}
.share-format button[aria-pressed='true'] {
  border: 2px solid #5ea8f2;
  background: #1f3550;
  color: white;
}
.share-format span {
  width: 24px;
  height: 29px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.share-format [data-card-format='story'] span {
  width: 20px;
  height: 32px;
}
.share-format [data-card-format='landscape'] span {
  width: 34px;
  height: 22px;
}
.share-style button {
  height: 44px;
  border-radius: 10px;
  background: #0e1622;
  color: white;
}
.share-style [data-card-style='light'] {
  background: #eef2f6;
  color: #1b2433;
}
.share-style [data-card-style='topo'] {
  background: #2d4a3a;
  color: #e8edf4;
}
.share-style button[aria-pressed='true'] {
  border: 2px solid #5ea8f2;
}
.share-settings .share-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.share-options h3 {
  margin-bottom: 6px;
}
.share-options label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 4px;
  border-bottom: 1px solid #222d3f;
  font-size: 14px;
}
.share-flight-card .share-options input[type='checkbox'] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  accent-color: #2470c8;
  cursor: pointer;
}
.share-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #2c3849;
  border-radius: 12px;
  background: #172234;
  color: #c9d3e0;
  font-size: 13px;
}
.share-privacy svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #7dbbf7;
  stroke-width: 2;
  fill: none;
}
.share-export {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-export button {
  flex: 1 1 150px;
  height: 48px;
  color: #e8edf4;
  font-size: 15px;
}
.share-export [data-card-share] {
  border: 0;
  background: #2470c8;
  color: white;
  font-weight: 600;
}
.share-export button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.share-settings [data-card-status] {
  font-size: 12px;
  color: #a3afc0;
  margin: 0;
}
.share-flight-card button:focus-visible,
.share-flight-card input:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .share-workspace {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 24px 16px 36px;
  }
  .share-preview {
    flex: auto;
    width: min(100%, 440px);
  }
  .share-settings {
    flex: auto;
    width: 100%;
    max-width: 480px;
  }
  .share-page-head {
    padding: 12px 16px;
    gap: 10px;
  }
  .share-page-head h2 {
    font-size: 20px;
  }
}

/* Flight areas: compact catalogue and a large, working map. */
.sites-page {
  --site-surface: var(--solid);
}
.sites-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.sites-heading h1 {
  font-size: 34px;
  letter-spacing: -0.035em;
  margin: 0 0 4px;
}
.sites-heading p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}
.sites-page .sites-workspace {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}
.sites-page .sites-catalog,
.sites-page .sites-map-card {
  border-radius: 16px;
  background: var(--site-surface);
  height: clamp(540px, calc(100dvh - 225px), 860px);
  max-height: none;
}
.sites-page .sites-catalog {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sites-catalog-controls {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.sites-catalog-controls .input-wrap {
  width: 100%;
  min-width: 0;
}
.sites-catalog-controls input[type='search'] {
  width: 100%;
  padding: 13px 12px 13px 40px;
  background: var(--panel);
  border-radius: 10px;
}
.sites-scope-pills {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.sites-scope-pills button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 24px;
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.sites-scope-pills button[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.sites-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}
.sites-period select {
  width: auto;
  max-width: 140px;
  font-size: 11px;
  padding: 4px 10px;
}
.sites-page #sites-results {
  overflow: auto;
  padding: 8px;
  flex: 1;
}
.sites-page .catalog-site {
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
}
.sites-page .catalog-site.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.sites-page .catalog-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sites-page .catalog-area > span:last-child {
  min-width: 0;
}
.sites-page .catalog-area strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.sites-page .catalog-area small {
  font-size: 11px;
}
.site-count {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--panel);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
}
.site-count.visited {
  background: var(--accent-soft);
  color: var(--text);
}
.site-count b {
  font-size: 16px;
  line-height: 1.2;
}
.sites-page .site-count small {
  font-size: 9px;
  margin: 0;
}
.site-row-detail {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  padding: 4px 6px;
  min-height: 40px;
}
.sites-page .sites-map-card {
  position: relative;
  top: auto;
  padding: 0;
  overflow: hidden;
}
.sites-page .sites-map-card .geo-map-wrap,
.sites-page .sites-map-card .geo-map {
  height: 100%;
  min-height: 0;
}
.sites-map-controls {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 45px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 450;
}
.sites-map-controls label {
  position: relative;
  cursor: pointer;
}
.sites-map-controls input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.sites-map-controls span {
  display: block;
  padding: 9px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 12px;
}
.sites-map-controls input:checked + span {
  background: var(--solid);
  border-color: var(--accent);
  color: var(--accent);
}
.sites-map-controls input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.sites-page .leaflet-top.leaflet-left {
  top: 80px;
}
.sites-page .map-legend {
  position: absolute;
  bottom: 28px;
  right: 14px;
  z-index: 450;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel);
  font-size: 11px;
}
.sites-page .map-legend span:nth-child(2) {
  color: var(--text);
}
.sites-fit {
  position: absolute;
  left: 14px;
  bottom: 38px;
  z-index: 450;
  padding: 8px;
  background: var(--panel);
}
.site-selected-popup {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -30%);
  z-index: 460;
  background: var(--solid);
  border: 1px solid var(--accent);
  border-radius: 15px;
  padding: 16px;
  width: min(335px, calc(100% - 30px));
  box-shadow: 0 12px 24px #0005;
}
.site-popup > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 10px;
  justify-content: space-between;
}
.site-popup strong {
  font-size: 17px;
}
.site-popup p {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.site-popup .site-popup-warning {
  color: #f3bf72;
}
.site-popup nav {
  display: flex;
  gap: 8px;
}
.site-popup nav > * {
  flex: 1;
  justify-content: center;
  font-size: 12px;
}
.site-status {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
}
.site-status.approved {
  background: #1e3a2c;
  color: #8fddb0;
}
.site-selection-close {
  position: absolute;
  top: 2px;
  right: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}
.site-map-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #e8edf4;
  border-radius: 50%;
  background: #293a51;
  color: white;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px #0004;
}
.site-map-dot.visited {
  background: #2470c8;
}
.site-map-dot.selected {
  border-color: #f6be58;
  box-shadow: 0 0 0 7px #f6be5840;
}
.site-leaflet-popup .leaflet-popup-content-wrapper,
.site-leaflet-popup .leaflet-popup-tip {
  background: var(--solid);
  color: var(--text);
}
.sites-page .map-flight-list {
  margin-top: 16px;
}
.sites-page .map-flight-list > summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 600;
}
.sites-source-note {
  margin-top: 18px;
}
.site-detail-page {
  margin-top: -10px;
}
.site-detail-back {
  margin-bottom: 14px;
}
.site-hero {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 16px;
  background: #33503d;
  color: #e8edf4;
}
.site-hero > svg {
  width: 100%;
  height: 100%;
}
.site-hero-content {
  position: absolute;
  inset: auto 30px 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.site-hero-content > div:first-child {
  flex: 1;
  min-width: 240px;
}
.site-hero h1 {
  font-size: 42px;
  line-height: 1.2;
  margin: 14px 0 8px;
  letter-spacing: -0.03em;
}
.site-hero p {
  margin: 0;
  color: #dce3ec;
}
.site-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.site-hero-tags > span {
  padding: 4px 10px;
  background: #111c;
  color: #c9d3e0;
  border-radius: 20px;
  font-size: 11px;
}
.site-hero-tags > .approved {
  background: #1e3a2c;
  color: #8fddb0;
}
.site-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.site-hero-actions .btn {
  padding: 12px 16px;
  color: #fff;
  background: #121925d9;
  border-color: #5b6b80;
}
.site-hero-actions .primary {
  background: #2470c8;
  border-color: #2470c8;
}
.site-detail-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 26px;
}
.site-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.site-facts article {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--solid);
  border-radius: 14px;
}
.site-facts span {
  color: var(--muted);
  font-size: 12px;
}
.site-facts strong {
  font:
    600 26px 'Geist Mono',
    monospace;
}
.site-holder b {
  font-size: 14px;
}
.site-holder .source-fields {
  display: block;
  margin: 0;
}
.site-holder .source-fields > div {
  padding: 0;
  border: 0;
}
.site-holder dt {
  display: none;
}
.site-holder dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.site-warnings {
  padding: 20px;
  border: 1px solid #6a5328;
  border-radius: 16px;
  background: #2a2214;
  color: #e9d9bc;
}
.site-warnings h2 {
  font-size: 18px;
  color: #f5c98a;
  margin: 0 0 14px;
}
.site-warnings > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.site-warnings article {
  border-radius: 12px;
  padding: 14px;
  background: #0003;
}
.site-warnings h3 {
  font-size: 14px;
  color: #fbe3b8;
  margin: 0 0 6px;
}
.site-warnings p {
  font-size: 12px;
  white-space: pre-wrap;
  margin: 0;
  overflow-wrap: anywhere;
}
.site-warnings > small {
  display: block;
  margin-top: 12px;
}
.site-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: start;
}
.site-locations {
  padding: 20px;
  background: var(--solid);
}
.site-locations h2 {
  font-size: 17px;
  margin: 0 0 14px;
}
.site-location {
  padding: 14px;
  background: var(--panel);
  border-radius: 12px;
  margin-top: 10px;
}
.site-location summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.site-location summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.site-location summary strong {
  display: block;
  font-size: 13px;
}
.site-location summary small {
  color: var(--muted);
  font-size: 11px;
}
.site-location summary b {
  font:
    500 13px 'Geist Mono',
    monospace;
}
.site-location .source-fields {
  margin-top: 20px;
}
.site-location .source-fields dd,
.site-full-source dd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.site-detail-map {
  overflow: hidden;
  background: var(--solid);
}
.site-detail-map .geo-map {
  height: 320px;
}
.site-detail-map .geo-map-wrap {
  border-radius: 0;
}
.site-detail-map-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 12px;
}
.site-detail-map > .dialog-hint {
  margin: 0;
  padding: 0 16px 14px;
  font-size: 11px;
}
.site-full-source {
  padding: 18px;
  background: var(--solid);
}
.site-full-source > summary {
  cursor: pointer;
  font-weight: 600;
}
.site-detail-adopt {
  display: flex;
  justify-content: flex-end;
}
.site-detail-page button:focus-visible,
.sites-page button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .sites-page .sites-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .site-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-detail-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .sites-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .sites-heading h1 {
    font-size: 28px;
  }
  .sites-heading p {
    font-size: 12px;
  }
  .sites-heading > .btn {
    font-size: 12px;
  }
  .sites-page .sites-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .sites-page .sites-catalog {
    height: 620px;
  }
  .sites-page .sites-map-card {
    height: 580px;
  }
  .sites-map-controls {
    gap: 5px;
    left: 8px;
    top: 8px;
    right: 8px;
  }
  .sites-map-controls span {
    padding: 8px 10px;
    font-size: 11px;
  }
  .site-hero {
    height: 340px;
  }
  .site-hero-content {
    inset: auto 18px 20px;
    gap: 18px;
  }
  .site-hero h1 {
    font-size: 32px;
  }
  .site-hero-content p {
    font-size: 12px;
  }
  .site-hero-actions {
    gap: 8px;
  }
  .site-hero-actions .btn {
    font-size: 11px;
    padding: 10px;
  }
  .site-facts {
    gap: 8px;
  }
  .site-facts article {
    padding: 12px;
  }
  .site-facts strong {
    font-size: 20px;
  }
  .site-facts span {
    font-size: 11px;
  }
  .site-holder b {
    font-size: 12px;
  }
  .site-locations {
    padding: 14px;
  }
  .site-location {
    padding: 12px;
  }
  .site-location summary {
    gap: 8px;
  }
  .site-location summary b {
    font-size: 11px;
  }
  .site-detail-map .geo-map {
    height: 280px;
  }
}
body:has(.sites-detail-active) > .navigation,
body:has(.sites-detail-active) > .header {
  display: none;
}
main.sites-detail-active {
  margin: 0;
  padding: 0;
  max-width: none;
}
.sites-detail-active .site-detail-page {
  margin-top: 0;
}
.sites-detail-active .site-detail-back {
  padding: 12px 24px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: var(--chrome);
}
.sites-detail-active .site-hero {
  border-radius: 0;
  height: 260px;
}
.sites-detail-active .site-hero-content {
  max-width: 1240px;
  margin: 0 auto;
}
.sites-detail-active .site-detail-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 40px 48px;
}
@media (max-width: 760px) {
  .sites-detail-active .site-hero {
    height: 340px;
  }
  .sites-detail-active .site-detail-content {
    padding: 20px 16px 32px;
  }
}
.sites-heading > .btn {
  font-size: 14px;
  min-height: 44px;
  padding: 10px 16px;
}
.site-popup .btn {
  min-height: 38px;
  text-decoration: none;
}
.site-hero-actions .btn {
  font-size: 14px;
  min-height: 44px;
  text-decoration: none;
}
.site-detail-back .btn {
  font-size: 13px;
  min-height: 40px;
}
.site-warnings a {
  color: #fbd38d;
}
@media (max-width: 760px) {
  .sites-heading > .btn {
    font-size: 12px;
  }
  .site-hero-actions .btn {
    font-size: 12px;
  }
}
.site-locations .start-dot,
#site-detail-map .start-dot {
  width: 18px;
  height: 18px;
  border: 3px solid #56c78f;
  background: transparent;
  border-radius: 50%;
  flex-shrink: 0;
}
.site-locations .landing-dot {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin: 0 3px;
}
.site-detail-active > footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 20px;
}
.site-warnings > div {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.site-holder > a {
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Ausrüstung – gemeinsame Farben und responsive Karten. */
.equipment-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.equipment-heading {
  margin: 0;
  align-items: flex-end;
}
.equipment-heading h1 {
  font-size: 34px;
  letter-spacing: -0.02em;
}
.equipment-heading p {
  margin-top: 6px;
}
.equipment-distribution {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 16px;
}
.equipment-distribution h2 {
  font-size: 15px;
  margin: 0;
}
.equipment-bar {
  display: flex;
  gap: 2px;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
}
.equipment-bar span {
  min-width: 0;
}
.equipment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: var(--muted);
}
.equipment-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.equipment-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.equipment-page .equipment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.equipment-page .equipment-card {
  padding: 22px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.equipment-card.active {
  border-color: #3c6fa3;
}
.equipment-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.equipment-page .equipment-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0;
  flex-shrink: 0;
}
.equipment-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
}
.equipment-badge.active {
  background: color-mix(in srgb, var(--ok) 15%, var(--solid));
  color: var(--ok);
}
.equipment-card h2 {
  font-size: 21px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  margin: 0;
}
.equipment-page .equipment-class {
  font-size: 13px;
  margin: 4px 0 0;
}
.equipment-class button,
.equipment-check button {
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}
.equipment-class .equipment-edit {
  float: right;
  font-size: 11px;
  margin-left: 8px;
}
.equipment-page .equipment-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.equipment-page .equipment-data strong {
  font-size: 20px;
  font-weight: 600;
}
.equipment-page .equipment-data small {
  font-size: 12px;
  color: var(--muted);
}
.equipment-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
  flex-wrap: wrap;
}
.equipment-check .icon {
  width: 16px;
  height: 16px;
}
.equipment-check span {
  flex: 1;
}
.equipment-check.due {
  color: var(--warn);
}
.equipment-flight-link {
  background: none;
  border: 0;
  color: var(--accent);
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.equipment-page .equipment-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.equipment-additions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.equipment-additions button {
  padding: 18px;
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.equipment-additions strong {
  font-size: 15px;
  color: var(--text);
}
.equipment-additions button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.equipment-other > h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
@media (max-width: 1150px) {
  .equipment-page .equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .equipment-page .equipment-grid,
  .equipment-additions {
    grid-template-columns: minmax(0, 1fr);
  }
  .equipment-heading h1 {
    font-size: 28px;
  }
  .equipment-heading .btn {
    width: 100%;
    justify-content: center;
  }
  .equipment-page .equipment-card {
    padding: 20px;
  }
}
.equipment-data .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.equipment-heading > .btn.primary {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  background: #2470c8;
  color: #fff;
}
.equipment-card:not(.active) .equipment-icon {
  color: var(--muted);
}

/* Gallery: flight moments, month mosaics and a full-screen media workspace. */
.gallery-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0 30px;
}
.gallery-filters .btn {
  border-radius: 24px;
}
.gallery-section {
  margin: 30px 0;
}
.gallery-section h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 26px;
}
.gallery-section h2 small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 160px;
  gap: 8px;
}
.gallery-tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--solid);
  min-width: 0;
  grid-column: span 2;
}
.gallery-tile:nth-child(10n + 1),
.gallery-tile:nth-child(10n + 7) {
  grid-column: span 3;
  grid-row: span 2;
}
.gallery-tile:nth-child(10n + 4),
.gallery-tile:nth-child(10n + 5) {
  grid-column: span 1;
}
.gallery-tile > button {
  border: 0;
  padding: 0;
  background: transparent;
  color: white;
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  text-align: left;
}
.gallery-tile img,
.gallery-tile video,
.gallery-area-grid img,
.gallery-area-grid video,
.gallery-filmstrip img,
.gallery-filmstrip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-day,
.gallery-heart,
.gallery-wing,
.gallery-duration {
  position: absolute;
  padding: 5px 9px;
  border-radius: 18px;
  text-shadow: 0 1px 4px #000;
  font-weight: 700;
}
.gallery-day {
  left: 3px;
  top: 3px;
}
.gallery-heart {
  right: 8px;
  top: 8px;
  background: #182531bb;
  color: #ff8585;
}
.gallery-wing {
  bottom: 8px;
  left: 8px;
  background: #142720cc;
}
.gallery-duration {
  bottom: 8px;
  right: 8px;
  background: #142720cc;
  font: 12px var(--mono);
}
.gallery-tile .video-badge {
  display: none;
}
.gallery-hover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: #122621ee;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transform: translateY(100%);
  transition: transform 0.16s;
}
.gallery-hover small {
  display: block;
  color: #b7c5d4;
  margin-top: 3px;
}
.gallery-hover .btn {
  font-size: 12px;
  padding: 8px;
  flex-shrink: 0;
}
.gallery-tile:hover .gallery-hover,
.gallery-tile:focus-within .gallery-hover,
.gallery-tile.peek .gallery-hover {
  transform: translateY(0);
}
.gallery-tile:focus-within {
  outline: 2px solid #70b7f7;
  outline-offset: 2px;
}
.gallery-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}
.gallery-map-panel {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.gallery-map-tools {
  position: absolute;
  z-index: 500;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
}
.gallery-map-tools .btn,
.gallery-map-tools select {
  background: var(--solid);
}
#gallery-map {
  height: 650px;
  min-height: 400px;
}
.gallery-map-status {
  padding: 8px 16px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.gallery-map-sidebar {
  padding: 18px;
}
.gallery-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 20px 0;
}
.gallery-area-grid button {
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1;
}
.gallery-map-pin {
  padding: 0;
  width: 84px;
  height: 84px;
  border: 3px solid #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 12px #0006;
  position: relative;
}
.gallery-map-pin img,
.gallery-map-pin video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-map-pin b {
  position: absolute;
  bottom: 0;
  left: 0;
  color: white;
  background: #0009;
  padding: 2px 8px;
}
.gallery-map-pin .video-badge {
  display: none;
}
.gallery-flight-row {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  text-align: left;
  width: 100%;
}
.gallery-flight-row span {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.gallery-viewer {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #080c11;
  color: #e8edf4;
  overflow: auto;
}
.gallery-viewer::backdrop {
  background: #080c11;
}
.gallery-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
}
.gallery-viewer-header > div:not(.actions) {
  text-align: center;
}
.gallery-viewer-header p {
  color: #a3afc0;
  margin: 4px 0 0;
}
.gallery-viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  min-height: calc(100dvh - 190px);
}
.gallery-stage {
  position: relative;
  padding: 20px 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.gallery-stage > img,
.gallery-stage > video,
.gallery-stage > iframe {
  max-width: 100%;
  width: 100%;
  height: calc(100dvh - 250px);
  object-fit: contain;
  border: 0;
}
.gallery-stage [hidden] {
  display: none;
}
.gallery-stage > p {
  position: absolute;
  bottom: 0;
  left: 70px;
  color: #ffc881;
}
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 48%;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: #1c2836;
  color: white;
}
.gallery-prev {
  left: 12px;
}
.gallery-next {
  right: 12px;
}
.gallery-viewer-layout > aside {
  padding: 20px;
  background: #101722;
  border-left: 1px solid #243244;
}
.gallery-recorded {
  padding: 18px;
  background: #1c2737;
  border: 1px solid #386fa5;
}
.gallery-recorded h3 {
  font-size: 12px;
  letter-spacing: 1px;
  color: #7dbbf7;
}
.gallery-mini-track .cockpit-thumbnail {
  width: 100%;
  height: 145px;
}
.gallery-mini-track span {
  font-size: 12px;
  color: #a3afc0;
}
.gallery-facts {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}
.gallery-facts strong,
.gallery-facts small {
  display: block;
}
.gallery-facts small {
  margin-top: 4px;
  color: #a3afc0;
}
.gallery-viewer textarea,
.gallery-viewer select {
  width: 100%;
  margin: 8px 0 20px;
  background: #182230;
  color: #e8edf4;
  border: 1px solid #2c3b52;
}
.gallery-viewer textarea {
  height: 90px;
}
.gallery-relink {
  color: #7dbbf7;
}
.gallery-filmstrip {
  display: flex;
  justify-content: center;
  overflow-x: auto;
  gap: 8px;
  padding: 18px;
}
.gallery-filmstrip button {
  position: relative;
  flex: 0 0 76px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
}
.gallery-filmstrip .selected {
  border-color: white;
}
.gallery-filmstrip .video-badge {
  display: none;
}
@media (max-width: 900px) {
  :root {
    --mobile-navigation-height: 112px;
  }
  .navigation {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, 48px);
    height: calc(var(--mobile-navigation-height) + env(safe-area-inset-bottom));
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    gap: 0 4px;
  }
  .navigation .nav-button {
    display: flex;
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 3px 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
  .navigation .nav-button span {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }
  main {
    padding-bottom: calc(var(--mobile-navigation-height) + 36px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 700px) {
  .gallery-filters {
    gap: 10px;
  }
  .gallery-filters .actions {
    gap: 5px;
    flex-wrap: wrap;
  }
  .gallery-filters .btn {
    padding: 8px 10px;
  }
  .gallery-section h2 {
    font-size: 22px;
  }
  .gallery-section h2 small {
    font-size: 12px;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 3px;
  }
  .gallery-tile,
  .gallery-tile:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 1;
    border-radius: 4px;
  }
  .gallery-day {
    font-size: 12px;
    padding: 3px 5px;
  }
  .gallery-wing {
    font-size: 12px;
    padding: 2px 5px;
  }
  .gallery-hover {
    display: none;
  }
  .gallery-tile.peek .gallery-hover {
    position: fixed;
    bottom: 70px;
    left: 12px;
    right: 12px;
    z-index: 900;
    display: flex;
    border-radius: 14px;
  }
  .gallery-map-layout {
    grid-template-columns: 1fr;
  }
  #gallery-map {
    height: 420px;
  }
  .gallery-viewer-header {
    flex-wrap: wrap;
    padding: 12px;
  }
  .gallery-viewer-header > div:not(.actions) {
    order: 3;
    width: 100%;
  }
  .gallery-viewer-layout {
    display: block;
  }
  .gallery-stage {
    padding: 10px 36px;
  }
  .gallery-stage > img,
  .gallery-stage > video,
  .gallery-stage > iframe {
    height: 40dvh;
  }
  .gallery-prev,
  .gallery-next {
    width: 30px;
    height: 36px;
    padding: 4px;
  }
  .gallery-prev {
    left: 2px;
  }
  .gallery-next {
    right: 2px;
  }
  .gallery-viewer-layout > aside {
    border: 0;
  }
  .gallery-filmstrip {
    justify-content: flex-start;
  }
  .gallery-stage > p {
    left: 36px;
    font-size: 12px;
  }
  .gallery-map-tools {
    left: 8px;
    top: 8px;
    gap: 4px;
  }
  .gallery-map-tools .btn {
    padding: 8px;
    font-size: 12px;
  }
}

.gallery-track {
  width: 100%;
  height: 145px;
}

.gallery-viewer .btn {
  color: #e8edf4;
  border-color: #2c3b52;
  background: #1c2836;
}
.gallery-viewer .btn.primary {
  background: #2470c8;
  border-color: #2470c8;
}
.gallery-viewer [data-gv='favorite'][aria-pressed='true'] {
  color: #ff8585;
}

.gallery-map-pin.selected {
  border-color: #000;
}

/* Photo context: geographic track preview and labelled media details. */
.gallery-mini-track {
  position: relative;
  margin: 14px 0 18px;
  border: 1px solid #344357;
  border-radius: 10px;
  overflow: hidden;
}
.gallery-flight-map {
  height: 185px;
  width: 100%;
  background: #202e3c;
}
.gallery-flight-map .leaflet-control-attribution {
  font-size: 8px;
  line-height: 1.4;
  background: #ffffffdc;
  color: #25313e;
}
.gallery-flight-map-status {
  position: absolute;
  bottom: 20px;
  left: 8px;
  right: 8px;
  z-index: 500;
  margin: 0;
  padding: 5px 8px;
  border-radius: 6px;
  background: #182230eb;
  color: #c0ccdb;
  font-size: 11px;
}
.gallery-details,
.gallery-description,
.gallery-assignment {
  margin-top: 24px;
}
.gallery-details h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.gallery-details dl {
  margin: 0;
  border: 1px solid #28384c;
  border-radius: 10px;
  overflow: hidden;
}
.gallery-details dl > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 12px;
  align-items: baseline;
  background: #151f2c;
}
.gallery-details dl > div + div {
  border-top: 1px solid #28384c;
}
.gallery-details dt {
  color: #a3afc0;
  font-size: 12px;
}
.gallery-details dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.gallery-description > label,
.gallery-assignment label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.gallery-description textarea {
  margin-bottom: 0;
  line-height: 1.5;
  padding: 12px;
}
.gallery-assignment select {
  margin-bottom: 0;
  font-weight: 400;
}
.gallery-recorded h2 {
  margin: 0;
}
.gallery-recorded .actions {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 8px;
}
.gallery-recorded .actions .btn {
  justify-content: center;
  padding: 10px 6px;
}
@media (max-width: 700px) {
  .gallery-flight-map {
    height: 190px;
  }
  .gallery-details dl > div {
    grid-template-columns: 85px minmax(0, 1fr);
  }
  .gallery-viewer-layout > aside {
    padding: 20px 16px 24px;
  }
}

/* Keep the media at the top; long flight details scroll independently. */
.gallery-stage > img,
.gallery-stage > video {
  object-position: center top;
}
@media (min-width: 701px) {
  .gallery-viewer[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }
  .gallery-viewer-layout {
    min-height: 0;
    overflow: hidden;
  }
  .gallery-stage {
    min-height: 0;
    height: 100%;
    align-items: flex-start;
    padding: 12px 70px;
  }
  .gallery-stage > img,
  .gallery-stage > video,
  .gallery-stage > iframe {
    height: 100%;
    max-height: 100%;
  }
  .gallery-viewer-layout > aside {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .gallery-prev,
  .gallery-next {
    top: 50%;
    transform: translateY(-50%);
  }
  .gallery-filmstrip {
    min-height: 0;
    padding: 12px 18px;
  }
}
/* Journal: private memories share one live card between replay and diary. */
:root {
  --journal: #8570d7;
  --journal-soft: #29243d;
  --journal-line: #51436d;
  --journal-ink: #c5b9e4;
}
:root[data-theme='light'] {
  --journal: #7453bf;
  --journal-soft: #f1edf8;
  --journal-line: #d6c9eb;
  --journal-ink: #6c518e;
}
.journal-feed-layout,
.flight-journal-page {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr);
  gap: 28px;
  align-items: start;
}
.journal-feed-layout > *,
.flight-journal-page > * {
  min-width: 0;
}
.journal-feed-sidebar,
.journal-detail-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}
.journal-feed-sidebar .card,
.journal-detail-sidebar .card,
.journal-prompts,
.journal-timeline {
  padding: 20px;
  border-radius: 18px;
}
.journal-feed-sidebar h3,
.journal-detail-sidebar h3,
.journal-prompts h3,
.journal-timeline h3 {
  margin: 0 0 14px;
  font-size: 16px;
}
.journal-search {
  position: relative;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.journal-search > .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.journal-search input {
  width: 100%;
  padding-left: 36px;
}
.journal-month h2 {
  font-size: 23px;
  margin: 0 0 20px;
}
.journal-month + .journal-month {
  margin-top: 32px;
}
.journal-entry {
  background: var(--journal-soft);
  border: 1px solid var(--journal-line);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 20px;
}
.journal-entry-text {
  padding: 24px;
  min-width: 0;
}
.journal-entry-text h3 {
  margin: 0 0 14px;
  font-size: 23px;
}
.journal-prose,
.journal-detail-card #flight-note {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.journal-prose {
  margin: 8px 0 20px;
}
.journal-entry footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-top: 1px solid var(--journal-line);
  color: var(--journal-ink);
  font-size: 13px;
}
.journal-entry button:not(.btn),
.journal-timeline button {
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.journal-entry footer button {
  color: var(--journal-ink);
}
.journal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.journal-tags button {
  border: 1px solid var(--journal-line) !important;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--journal-soft) !important;
  color: var(--journal-ink) !important;
  font-size: 12px;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.journal-tags button[aria-pressed='true'],
.journal-primary {
  background: var(--journal) !important;
  color: #fff !important;
  border-color: var(--journal) !important;
}
.journal-tags .journal-suggestion {
  border-style: dashed !important;
}
.journal-track {
  background: #20352f !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  border: 0;
  color: #aed3f5 !important;
  overflow: hidden;
  border-radius: 10px;
  padding: 0;
}
.journal-track .cockpit-thumbnail {
  width: 100%;
  height: 100%;
  min-height: 100px;
  max-height: 330px;
  background: none;
}
.journal-track span {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #182920cc;
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12px;
}
.journal-feed-collage {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 150px 150px;
  gap: 4px;
  padding: 6px;
}
.journal-feed-collage > button {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 6px;
  min-width: 0;
}
.journal-feed-collage > button:first-child {
  grid-row: span 2;
}
.journal-feed-collage > button:only-child {
  grid-column: span 2;
  min-height: 300px;
}
.journal-feed-collage > button:nth-child(2):last-child {
  grid-row: span 2;
}
.journal-feed-collage img,
.journal-feed-collage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.journal-invitation {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1.5px dashed var(--journal-line);
  border-radius: 20px;
  background: var(--card);
  padding: 20px;
  margin-bottom: 18px;
}
.journal-invitation > .journal-track {
  flex: 0 0 100px;
  min-height: 80px;
}
.journal-invitation > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.journal-invitation strong {
  font-size: 13px;
}
.journal-invitation .journal-prose {
  font-size: 18px;
  color: var(--muted);
  font-style: italic;
  margin: 10px 0;
}
.journal-invitation .btn {
  flex-shrink: 0;
}
.journal-display label {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
  font-size: 13px;
}
.journal-display input {
  width: 18px;
  height: 18px;
  accent-color: var(--journal);
}
.journal-idea {
  background: var(--journal-soft) !important;
}
.journal-idea .journal-prose {
  font-size: 19px;
}
.journal-idea small {
  color: var(--journal-ink);
  letter-spacing: 0.1em;
}
.flight-view-tabs [data-flight-view='journal'][aria-pressed='true'] {
  background: var(--journal-soft);
  color: var(--journal-ink);
}
.flight-journal-page {
  padding: 24px;
}
.flight-journal-page[hidden] {
  display: none;
}
.flight-journal-page .journal-detail-card {
  border: 0;
  background: transparent;
}
.flight-journal-page .journal-entry-text {
  padding: 22px 6px;
}
.journal-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  gap: 12px;
  color: var(--journal-ink);
}
.journal-title-input {
  font-size: 26px !important;
  font-weight: 700;
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  padding: 4px 0 !important;
  margin-bottom: 10px;
}
.journal-read-title {
  font-size: 32px;
  margin: 0 0 16px;
}
.journal-read-text {
  font-size: 25px;
}
.journal-detail-card .detail-notes {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.journal-detail-card .detail-notes > summary {
  display: none;
}
.journal-detail-card .flight-photos > summary {
  display: flex;
  padding: 0 18px;
  margin-bottom: 8px;
}
.journal-detail-card .flight-photos > summary > span {
  display: none;
}
.journal-detail-card .photo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4px;
  padding: 6px;
  margin: 0;
}
.journal-detail-card .photo-grid figure {
  margin: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}
.journal-detail-card .photo-grid figure:first-child {
  grid-row: span 2;
}
.journal-detail-card .photo-grid figure .photo-open {
  width: 100%;
  height: 100%;
  padding: 0;
  display: block;
}
.journal-detail-card .photo-grid img,
.journal-detail-card .photo-grid video {
  width: 100%;
  height: 100%;
  min-height: 130px;
  max-height: 350px;
  object-fit: cover;
  border-radius: 0;
}
.journal-detail-card .photo-grid .journal-track:only-child {
  grid-column: span 2;
  min-height: 200px;
}
.journal-detail-card .flight-photos > .dialog-hint {
  padding: 0 18px;
  font-size: 11px;
}
.journal-detail-card .flight-photos > .dialog-hint:empty {
  display: none;
}
.journal-detail-card #flight-note {
  width: 100%;
  min-height: 160px;
  border: 0 !important;
  background: transparent !important;
  padding: 4px 0;
  color: var(--text);
  resize: vertical;
}
.journal-detail-card .detail-notes[hidden] {
  display: none;
}
.journal-editing #flight-note {
  min-height: 260px;
}
.journal-detail-card [data-save-note] {
  font-size: 12px;
}
.journal-extras {
  margin-top: 18px;
}
.journal-extras label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-size: 13px;
}
.journal-extras textarea,
.journal-extras input {
  width: 100%;
}
.journal-extras textarea {
  min-height: 100px;
}
.journal-save-status {
  font-size: 11px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.journal-prompts {
  margin: 16px 0;
}
.journal-prompts .btn {
  border-radius: 999px;
  margin: 4px;
  font-size: 13px;
}
.journal-detail-sidebar .btn {
  width: 100%;
  margin-top: 10px;
  justify-content: flex-start;
  white-space: normal;
  text-align: left;
}
.journal-detail-sidebar .cockpit-thumbnail {
  width: 100%;
  height: 180px;
  background: #20352f;
  border-radius: 12px;
}
.journal-timeline {
  margin: 20px 0;
}
.journal-timeline button {
  display: grid;
  grid-template-columns: 72px 1fr;
  width: 100%;
  position: relative;
  padding: 14px 12px 14px 28px;
  border-left: 2px solid var(--journal-line);
  margin-left: 8px;
  gap: 4px 12px;
}
.journal-timeline button:before {
  content: '';
  position: absolute;
  left: -6px;
  top: 21px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--journal);
}
.journal-timeline time {
  color: var(--muted);
  font-size: 13px;
}
.journal-timeline small {
  grid-column: 2;
  color: var(--muted);
}
.journal-timeline button:hover {
  background: var(--journal-soft);
}
.flight-detail-side #flight-panel-notes {
  padding: 0;
  background: transparent;
  border: 0;
}
.flight-detail-side .journal-entry-text {
  padding: 18px;
}
.flight-detail-side .journal-editor-head {
  padding: 14px 18px;
}
.flight-detail-side .journal-title-input {
  font-size: 20px !important;
}
.flight-detail-side .journal-detail-card #flight-note {
  font-size: 19px;
}
.journal-entry button:focus-visible,
.journal-tags button:focus-visible,
.journal-timeline button:focus-visible {
  outline: 2px solid var(--journal);
  outline-offset: 3px;
}
@media (max-width: 900px) {
  .journal-feed-layout,
  .flight-journal-page {
    grid-template-columns: minmax(0, 1fr);
  }
  .journal-feed-sidebar {
    grid-row: 1;
    position: static;
    grid-template-columns: 1fr 1fr;
  }
  .journal-feed-sidebar .journal-search {
    grid-column: span 2;
  }
  .journal-feed-sidebar .journal-idea {
    display: none;
  }
  .journal-detail-sidebar {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .journal-feed-layout {
    gap: 20px;
  }
  .journal-feed-sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .journal-feed-sidebar .journal-search {
    grid-column: auto;
  }
  .journal-feed-sidebar .card {
    padding: 14px;
  }
  .journal-feed-sidebar .journal-display {
    padding: 10px 14px;
  }
  .journal-display h3 {
    display: none;
  }
  .journal-feed-collage {
    grid-template-rows: 100px 100px;
  }
  .journal-feed-collage > button:only-child {
    min-height: 200px;
  }
  .journal-entry-text {
    padding: 18px;
  }
  .journal-entry-text h3 {
    font-size: 21px;
  }
  .journal-prose {
    font-size: 20px;
  }
  .journal-entry footer {
    padding: 14px 18px;
  }
  .journal-invitation {
    flex-wrap: wrap;
    padding: 16px;
    gap: 12px;
  }
  .journal-invitation > .journal-track {
    flex-basis: 70px;
  }
  .journal-invitation > .btn {
    margin-left: auto;
  }
  .flight-journal-page {
    padding: 16px 12px;
  }
  .journal-detail-sidebar {
    grid-template-columns: 1fr;
  }
  .journal-read-title {
    font-size: 27px;
  }
  .journal-read-text {
    font-size: 23px;
  }
  .journal-detail-card footer {
    padding: 12px;
  }
  .journal-detail-card footer .btn {
    padding: 7px;
    font-size: 12px;
  }
  .journal-detail-card .photo-grid {
    grid-template-columns: 2fr 1fr;
  }
  .journal-detail-card .photo-grid img,
  .journal-detail-card .photo-grid video {
    min-height: 100px;
  }
  .journal-timeline {
    padding: 16px;
  }
  .book-view-controls .segment {
    flex-wrap: wrap;
  }
}
.journal-book .book-heading {
  flex-wrap: wrap;
}
.journal-book .book-heading > .segment {
  margin-left: auto;
}
.journal-book .book-heading .actions {
  order: 2;
}
.journal-book-filters {
  margin: 12px 0 24px;
  color: var(--muted);
}
.journal-book-filters > summary {
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 14px;
}
.journal-book #filtered-summary {
  display: none;
}
.journal-book-filters .book-search {
  margin-bottom: 12px;
}
.journal-card-meta {
  flex-basis: 100%;
  color: var(--journal-ink);
}
.flight-journal-page .flight-photos > summary {
  display: none;
}
.flight-journal-page .journal-detail-card:not(.journal-editing) .flight-photos > .dialog-hint,
.flight-journal-page .journal-detail-card:not(.journal-editing) .photo-remove,
.flight-journal-page .journal-detail-card:not(.journal-editing) footer > .btn,
.flight-journal-page .journal-detail-card:not(.journal-editing) .journal-save-status {
  display: none;
}
@media (max-width: 600px) {
  .journal-book .book-heading > .segment {
    order: 1;
    width: 100%;
    margin: 0;
  }
  .journal-book .book-heading > .segment button {
    flex: 1;
  }
  .journal-book .book-heading .actions {
    width: 100%;
    justify-content: space-between;
  }
  .journal-book-filters {
    margin-bottom: 16px;
  }
  .journal-book .journal-feed-sidebar .journal-display label {
    margin: 8px 0;
  }
}
.journal-editing .photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
}
.journal-editing .photo-grid figure {
  width: 100px;
  height: 100px;
}
.journal-editing .photo-grid figure:first-child {
  grid-row: auto;
}
.journal-editing .photo-grid img,
.journal-editing .photo-grid video {
  min-height: 0;
  max-height: 100px;
}
.journal-editing .photo-grid .journal-track {
  width: 100px;
  height: 100px;
  min-height: 100px;
}
.journal-editing .photo-remove {
  opacity: 1;
}
.journal-weather-read,
.journal-companions-read {
  display: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--journal-ink);
}
.flight-journal-page .journal-detail-card:not(.journal-editing) .journal-extras label,
.flight-journal-page .journal-detail-card:not(.journal-editing) .journal-extras > a,
.flight-journal-page .journal-detail-card:not(.journal-editing) .journal-extras > .dialog-hint {
  display: none;
}
.flight-journal-page .journal-detail-card:not(.journal-editing) .journal-weather-read,
.flight-journal-page .journal-detail-card:not(.journal-editing) .journal-companions-read {
  display: block;
}

/* Medienimport: Auswahl, Zuordnung und Upload */
.media-import-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  border-radius: 22px;
  background: var(--solid);
}
.media-import-dialog .dialog-head {
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px;
}
.media-import-dialog .dialog-head > div {
  flex: 1;
  min-width: 220px;
}
.media-import-dialog .dialog-body {
  padding: 22px;
}
.media-import-dialog .dialog-footer {
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.media-import-dialog .dialog-footer > span {
  color: var(--muted);
  font-size: 13px;
}
.media-import-dialog .dialog-footer > .primary {
  margin-left: auto;
}
.media-steps {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
.media-steps li {
  display: flex;
  gap: 6px;
  align-items: center;
}
.media-steps span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.media-steps .current {
  color: var(--text);
}
.media-steps .current span {
  background: #2470c8;
  color: white;
  border-color: #2470c8;
}
.media-steps .complete {
  color: #82d7aa;
}
.media-steps .complete span {
  background: #1c4030;
  border-color: transparent;
}
.media-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  border: 2px dashed #3c6fa3;
  background: var(--accent-soft);
  border-radius: 18px;
  text-align: center;
  cursor: pointer;
}
.media-drop.dragging,
.media-drop:focus-within {
  border-color: var(--accent);
  background: var(--card);
}
.media-drop > strong {
  font-size: 23px;
}
.media-drop-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 42px;
}
.media-drop input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.media-explain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}
.media-explain > div {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
  border-radius: 14px;
}
.media-explain p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.media-explain > div > span {
  color: var(--accent);
  font-size: 23px;
}
.media-formats {
  color: var(--muted);
  font-size: 13px;
}
.media-formats summary,
.media-clock summary {
  cursor: pointer;
}
.media-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 18px;
  overflow: hidden;
}
.media-group header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.media-group header > span {
  font-size: 12px;
  color: var(--muted);
}
.media-group header b {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  background: var(--warn);
  color: #18202d;
  margin-right: 8px;
}
.needs-help {
  background: color-mix(in srgb, var(--warn) 9%, var(--solid));
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
}
.automatically {
  background: color-mix(in srgb, #50bf8a 8%, var(--solid));
  border-color: color-mix(in srgb, #50bf8a 40%, transparent);
}
.automatically header b {
  background: #50bf8a;
}
.media-help-row,
.media-auto-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}
.media-help-row:last-child,
.media-auto-row:last-child {
  border-bottom: 0;
}
.media-help-row > div:last-child {
  flex: 1;
  min-width: 0;
}
.media-help-row small,
.media-auto-row small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 6px;
  font-size: 12px;
}
.media-reason {
  background: var(--card);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.media-group-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.media-group-actions .btn {
  font-size: 13px;
}
.media-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 250px;
}
.media-thumb {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-thumb label {
  position: absolute;
  top: 5px;
  left: 5px;
  margin: 0;
}
.media-thumb input {
  accent-color: #2470c8;
  width: 18px;
  height: 18px;
}
.media-thumb.unselected {
  opacity: 0.5;
}
.media-auto-row {
  align-items: center;
}
.media-auto-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.media-auto-row p {
  font-size: 12px;
  color: #82d7aa;
  margin: 6px 0;
}
.media-track {
  width: 80px;
  flex-shrink: 0;
  background: var(--card);
  border-radius: 12px;
}
.media-track svg {
  width: 100%;
  height: 70px;
}
.media-auto-row .media-thumb {
  width: 62px;
  height: 62px;
}
.media-clock {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.media-clock summary {
  font-weight: 600;
}
.media-clock .form-grid {
  margin-top: 16px;
}
.media-clock p {
  color: var(--muted);
  font-size: 12px;
}
.media-invalid {
  font-size: 13px;
  color: var(--muted);
}
.media-flight-picker > input {
  width: 100%;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid var(--accent);
  border-radius: 12px;
}
.media-flight-picker h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.media-flight-picker [data-media-results] {
  max-height: 320px;
  overflow: auto;
}
.media-flight-option {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 20px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.media-flight-option:hover,
.media-flight-option:focus-visible {
  background: var(--accent-soft);
}
.media-flight-option > span:first-child {
  font-size: 24px;
  font-weight: 700;
  min-width: 70px;
}
.media-flight-option small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.media-total {
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 4px 0 24px;
}
.media-total > div:last-child {
  flex: 1;
  min-width: 0;
}
.media-ring {
  --progress: 0%;
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--progress), var(--border) 0);
}
.media-ring:before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--solid);
}
.media-ring strong {
  position: relative;
  font-size: 23px;
}
.media-total-label,
.media-file-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.media-total-label > span {
  color: var(--muted);
  font-size: 12px;
}
.media-total p {
  color: var(--muted);
  font-size: 13px;
}
.media-import-dialog progress {
  display: block;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
  margin: 12px 0;
  accent-color: var(--accent);
}
.media-import-dialog progress::-webkit-progress-bar {
  background: var(--border);
}
.media-import-dialog progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 12px;
}
.media-upload-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.media-upload-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 10px;
  border-radius: 14px;
}
.media-upload-list li.loading {
  background: var(--accent-soft);
}
.media-upload-list li.failed {
  background: color-mix(in srgb, #c44e50 15%, var(--solid));
}
.media-upload-list img,
.media-upload-list video {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 10px;
}
.media-upload-list li > div {
  flex: 1;
  min-width: 0;
}
.media-file-label {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.media-file-label span {
  color: var(--muted);
}
.media-upload-list .done span {
  color: #82d7aa;
}
.media-upload-list .failed span {
  color: #ff8585;
}
.media-upload-list small {
  color: var(--muted);
  font-size: 12px;
}
.media-upload-list .done progress::-webkit-progress-value {
  background: #50bf8a;
}
.media-done {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  color: #82d7aa;
  font-size: 22px;
  flex-shrink: 0;
}
.media-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(560px, calc(100vw - 32px));
  padding: 16px;
  background: var(--solid);
  border: 1px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 15px 45px #0005;
}
.media-notice > div:not(.media-ring) {
  flex: 1;
  min-width: 0;
}
.media-notice strong {
  font-size: 14px;
}
.media-notice small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}
.media-notice .media-ring {
  width: 42px;
  height: 42px;
}
.media-notice .media-ring:before {
  inset: 5px;
}
.media-notice .media-ring strong {
  display: none;
}
.media-notice.success {
  border-color: #50bf8a;
}
.media-notice.failed {
  border-color: #c44e50;
}
.media-notice.failed .media-done {
  color: #ff8585;
}
@media (max-width: 700px) {
  .media-import-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .media-import-dialog .dialog-head,
  .media-import-dialog .dialog-body {
    padding: 16px;
  }
  .media-import-dialog .dialog-head > div {
    min-width: 0;
    flex-basis: calc(100% - 54px);
  }
  .media-import-dialog .dialog-head .icon-button {
    order: 1;
  }
  .media-steps {
    order: 2;
    width: 100%;
    justify-content: space-between;
    font-size: 11px;
  }
  .media-drop {
    min-height: 260px;
    padding: 20px;
  }
  .media-drop > strong {
    font-size: 19px;
  }
  .media-explain {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .media-explain > div {
    padding: 12px;
  }
  .media-explain p {
    font-size: 13px;
  }
  .media-help-row,
  .media-auto-row {
    flex-wrap: wrap;
    padding: 14px;
  }
  .media-help-row > .media-thumbs {
    max-width: none;
  }
  .media-help-row > div:last-child {
    flex-basis: 100%;
  }
  .media-auto-row > .media-thumbs {
    max-width: none;
    width: 100%;
  }
  .media-group header {
    padding: 14px;
  }
  .media-group header > span {
    display: none;
  }
  .media-total {
    gap: 14px;
  }
  .media-ring {
    width: 74px;
    height: 74px;
  }
  .media-ring strong {
    font-size: 18px;
  }
  .media-upload-list li {
    gap: 10px;
    padding: 12px 0;
  }
  .media-upload-list img,
  .media-upload-list video {
    width: 44px;
    height: 44px;
  }
  .media-file-label {
    font-size: 12px;
  }
  .media-notice {
    right: 16px;
    bottom: 16px;
    gap: 10px;
    padding: 12px;
  }
  .media-notice .btn {
    padding: 10px;
    font-size: 12px;
  }
  .media-import-dialog .dialog-footer > .primary {
    width: 100%;
    margin: 0;
  }
  .media-import-dialog .dialog-footer {
    padding: 16px;
  }
}
.media-import-dialog .btn,
.media-notice .btn {
  min-height: 40px;
  font-size: 14px;
  padding: 10px 16px;
}
.media-import-dialog .btn.primary,
.media-notice .btn.primary {
  background: #2470c8;
  color: #fff;
  border-color: #2470c8;
}
.media-import-dialog .dialog-head h2 {
  font-size: 22px;
}
.media-import-dialog .dialog-head p {
  font-size: 13px;
}
.media-import-dialog [data-media-storage] {
  margin-right: auto;
}
.media-drop > .btn {
  font-size: 16px;
  min-height: 48px;
  padding: 12px 22px;
}
.media-import-dialog .dialog-footer > span {
  line-height: 1.5;
}
.media-notice [data-media-dismiss] {
  padding: 4px;
  min-height: 32px;
}
.media-notice.failed .media-done {
  background: #c44e5026;
}
@media (max-width: 700px) {
  .media-import-dialog .btn,
  .media-notice .btn {
    font-size: 13px;
    padding: 10px 12px;
  }
  .media-import-dialog .dialog-head h2 {
    font-size: 20px;
  }
  .media-import-dialog .dialog-footer [data-media-storage] {
    flex: 1;
    min-width: 170px;
  }
  .media-notice .btn {
    padding: 8px;
    min-height: 36px;
  }
}
@media (max-width: 900px) {
  .media-notice {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}
.media-track > span {
  display: grid;
  place-items: center;
  height: 70px;
  color: var(--accent);
  font-size: 28px;
}

/* Flight creation: track-first start, review, batch and manual entry. */
.flight-add-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  border-radius: 22px;
  background: var(--solid);
}
.flight-start-dialog {
  max-width: 820px;
}
.flight-add-dialog .dialog-head {
  padding: 22px;
  gap: 16px;
}
.flight-add-dialog .dialog-head > div {
  flex: 1;
  min-width: 0;
}
.flight-add-dialog .dialog-head h2 {
  font-size: 23px;
}
.flight-add-dialog .dialog-head p {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.flight-add-dialog .dialog-head .icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}
.flight-add-dialog .dialog-body {
  padding: 22px;
}
.flight-add-dialog .btn {
  font-size: 14px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
}
.flight-add-dialog .btn.primary {
  background: #2470c8;
  color: #fff;
  border-color: #2470c8;
}
.flight-add-dialog .dialog-footer {
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 16px 22px;
}
.flight-add-dialog .dialog-footer > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.flight-drop {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 2px dashed #3c6fa3;
  border-radius: 18px;
  text-align: center;
  padding: 32px;
  background: var(--surface);
}
.flight-drop.dragging {
  background: var(--accent-soft);
  border-color: #7dbbf7;
}
.flight-drop > strong {
  font-size: 23px;
}
.flight-drop > p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}
.flight-upload-icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: #1f3550;
  color: #7dbbf7;
  display: grid;
  place-items: center;
}
.flight-upload-icon svg {
  width: 38px;
  height: 38px;
}
.flight-file-actions {
  display: flex;
  gap: 12px;
}
.flight-file-actions .btn {
  font-size: 16px;
  min-height: 48px;
}
.flight-manual-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 18px 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.flight-manual-choice > svg:first-child {
  width: 44px;
  height: 44px;
  padding: 10px;
  box-sizing: content-box;
  border-radius: 14px;
  background: var(--accent-soft);
}
.flight-manual-choice > span {
  flex: 1;
}
.flight-manual-choice strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}
.flight-manual-choice small {
  color: var(--muted);
  font-size: 14px;
}
.flight-support {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}
.flight-support details {
  flex: 1;
}
.flight-support p {
  line-height: 1.7;
  margin-top: 12px;
}
.flight-support summary,
.flight-optional summary,
.flight-time-details summary {
  cursor: pointer;
}
.flight-track-dialog .dialog-body,
.flight-manual-dialog .dialog-body {
  padding: 0;
}
.flight-add-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.flight-manual-dialog .flight-add-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
}
.flight-add-fields,
.flight-add-visual {
  min-width: 0;
  padding: 22px;
}
.flight-add-visual {
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.flight-manual-dialog .flight-add-visual {
  border-right: 0;
  border-left: 1px solid var(--border);
}
.flight-fields {
  margin-bottom: 22px;
}
.flight-fields h3,
.flight-add-visual > h3 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fa8c6;
  margin: 0 0 14px;
}
.flight-add-dialog .form-grid {
  gap: 12px;
}
.flight-add-dialog .form-grid label {
  font-size: 13px;
  min-width: 0;
}
.flight-add-dialog .form-grid input,
.flight-add-dialog .form-grid select,
.flight-add-dialog .form-grid textarea {
  font-size: 14px;
  min-height: 42px;
  min-width: 0;
}
.flight-add-dialog .form-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.flight-add-dialog .form-grid label:has([name='wing']),
.flight-add-dialog .form-grid label:has([name='type']) {
  grid-column: 1/-1;
}
.flight-add-dialog .flight-fields:has([name='site']) .form-grid {
  grid-template-columns: 1fr;
}
.flight-chips {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.flight-chips button,
.flight-chips > span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 13px;
  background: transparent;
  color: var(--text);
}
.flight-chips button {
  cursor: pointer;
  min-height: 38px;
}
.flight-chips button[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: #3c6fa3;
  color: var(--accent);
}
.flight-date-chips {
  margin-bottom: 14px;
}
.flight-recent {
  grid-column: 1/-1;
}
.flight-recent > span {
  border: 0;
  padding: 0;
  color: var(--muted);
}
.flight-landing-time {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 10px;
}
.flight-time-details {
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--accent);
}
.flight-time-details .form-grid {
  margin-top: 12px;
}
.flight-optional {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-top: 16px;
  font-size: 13px;
}
.flight-optional > .form-grid {
  margin-top: 16px;
}
.flight-track-dialog .flight-optional:has([name='note']) {
  background: color-mix(in srgb, #76629e 12%, var(--solid));
}
.flight-recognized {
  color: #82d7aa;
  font-size: 13px;
  margin: 0 0 18px;
}
.flight-uncertain {
  background: color-mix(in srgb, #f0b44c 12%, var(--solid));
  border: 1px solid #6a5328;
  padding: 10px;
  border-radius: 12px;
}
.flight-add-dialog .flight-uncertain small {
  color: #f0b44c;
}
.flight-track-preview {
  padding: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}
.flight-track-preview .geo-map {
  height: 320px !important;
}
.flight-track-preview .geo-map-wrap {
  border-radius: 16px;
  overflow: hidden;
}
.flight-track-preview .altitude {
  margin-top: 12px;
}
.flight-track-preview > p {
  display: none;
}
.flight-track-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.flight-track-metrics > div {
  background: var(--solid);
  border-radius: 12px;
  padding: 12px;
}
.flight-track-metrics small {
  font-size: 11px;
  color: var(--muted);
}
.flight-track-metrics strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}
.flight-track-information {
  font-size: 12px;
}
.flight-track-information .track-quality,
.flight-track-information .dhv-recognition {
  margin-top: 12px;
}
.flight-preview-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--solid);
}
.flight-preview-card > div:last-child {
  padding: 16px;
}
.flight-preview-card h2 {
  font-size: 20px;
  margin: 10px 0;
}
.flight-preview-card p,
.flight-preview-card small {
  font-size: 13px;
  color: var(--muted);
}
.flight-preview-mountain {
  height: 130px;
  background: linear-gradient(150deg, #2c4a6e, #1a2a3e);
  position: relative;
}
.flight-preview-mountain svg {
  height: 130px;
  width: 100%;
}
.flight-preview-mountain > span {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: #111823;
  color: #c9d3e0;
  padding: 5px 9px;
  font-size: 12px;
}
.flight-preview-hint,
.flight-preview-number {
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 12px;
  margin-top: 14px;
}
.flight-preview-number {
  background: #1e3a2c;
  color: #8fddb0;
  border-color: #1e3a2c;
}
.flight-batch-dialog {
  max-width: 960px;
}
.flight-batch-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}
.flight-batch-progress progress {
  width: 100%;
  height: 10px;
  accent-color: #5cc48a;
  margin: 18px 0 4px;
}
.flight-batch-progress progress::-webkit-progress-bar {
  background: var(--border);
  border-radius: 9px;
}
.flight-batch-progress progress::-webkit-progress-value {
  background: #5cc48a;
  border-radius: 9px;
}
.flight-new {
  color: #8fddb0 !important;
  background: #1e3a2c !important;
}
.flight-attention {
  color: #f0b44c !important;
  background: color-mix(in srgb, #f0b44c 10%, var(--solid)) !important;
}
.flight-batch-list {
  margin: 22px 0;
  max-height: 400px;
  overflow: auto;
}
.flight-batch-list li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px !important;
  border-radius: 12px;
}
.flight-batch-list li > div {
  flex: 1;
  min-width: 0;
}
.flight-batch-list small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.flight-batch-list p {
  font-size: 12px;
}
.flight-batch-thumb {
  width: 62px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface);
}
.flight-batch-thumb svg {
  max-width: 100%;
  height: 100%;
}
.flight-row-status {
  font-size: 12px;
  color: #82d7aa;
  white-space: nowrap;
}
.flight-duplicate {
  opacity: 0.6;
}
.flight-batch-defaults {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
}
.flight-batch-defaults label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  min-width: 0;
}
.flight-batch-defaults select,
.flight-batch-defaults input {
  max-width: 230px;
  font-size: 13px;
}
.flight-add-dialog button:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
.flight-add-dialog [hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .flight-add-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .flight-add-dialog .dialog-head {
    padding: 16px;
    gap: 10px;
  }
  .flight-add-dialog .dialog-head h2 {
    font-size: 20px;
  }
  .flight-add-dialog .dialog-head p {
    font-size: 12px;
  }
  .flight-add-dialog .dialog-body {
    padding: 16px;
  }
  .flight-manual-dialog .dialog-body,
  .flight-track-dialog .dialog-body {
    padding: 0;
  }
  .flight-drop {
    min-height: 280px;
    padding: 20px 12px;
  }
  .flight-drop > strong {
    font-size: 19px;
  }
  .flight-drop > p {
    font-size: 14px;
  }
  .flight-file-actions {
    gap: 8px;
  }
  .flight-file-actions .btn {
    font-size: 14px;
    padding: 10px 12px;
  }
  .flight-manual-choice {
    padding: 14px;
    gap: 10px;
  }
  .flight-manual-choice > svg:first-child {
    width: 24px;
    height: 24px;
  }
  .flight-manual-choice strong {
    font-size: 15px;
  }
  .flight-manual-choice small {
    font-size: 12px;
  }
  .flight-support {
    flex-direction: column;
    gap: 4px;
  }
  .flight-add-layout,
  .flight-manual-dialog .flight-add-layout {
    display: block;
  }
  .flight-add-fields,
  .flight-add-visual {
    padding: 16px;
  }
  .flight-add-visual {
    border: 0 !important;
  }
  .flight-track-preview .geo-map {
    height: 240px !important;
  }
  .flight-track-metrics strong {
    font-size: 14px;
  }
  .flight-track-metrics > div {
    padding: 8px;
  }
  .flight-add-dialog .dialog-footer {
    padding: 14px;
    gap: 8px;
  }
  .flight-add-dialog .dialog-footer .btn {
    flex: 1;
    font-size: 12px;
    padding: 10px 8px;
  }
  .flight-add-dialog .dialog-footer > span {
    width: 100%;
    font-size: 11px;
  }
  .flight-batch-list li {
    flex-wrap: wrap;
    padding: 12px 8px !important;
    gap: 10px;
  }
  .flight-batch-list li > div {
    flex-basis: calc(100% - 76px);
  }
  .flight-batch-list .btn {
    margin-left: auto;
  }
  .flight-batch-defaults {
    padding: 12px;
    gap: 12px;
  }
  .flight-batch-defaults > strong {
    width: 100%;
  }
  .flight-batch-defaults label {
    flex-wrap: wrap;
    width: 100%;
  }
  .flight-batch-defaults select,
  .flight-batch-defaults input {
    max-width: 100%;
    width: 100%;
  }
}
.flight-add-dialog {
  overflow: hidden;
}
.flight-add-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  max-height: calc(90dvh - 2px);
}
.flight-add-dialog .dialog-head,
.flight-add-dialog .dialog-footer {
  flex-shrink: 0;
}
.flight-add-dialog .dialog-body {
  overflow: auto;
  min-height: 0;
}
.flight-add-dialog .form-grid label > small:not(.flight-type-hint) {
  display: none;
}
.flight-add-dialog .flight-uncertain > small {
  display: block !important;
}
.flight-add-dialog .flight-chips {
  margin-top: 8px;
}
.flight-add-dialog .flight-fields {
  margin-bottom: 18px;
}
.flight-manual-dialog .flight-time-details {
  margin-bottom: 18px;
}
.flight-manual-dialog .flight-recent {
  margin-top: 0;
}
.flight-manual-dialog .inline-editor-actions {
  margin: 0;
}
.flight-add-dialog .flight-track-preview .altitude {
  height: 170px;
}
.flight-add-dialog .flight-track-preview .geo-map {
  height: 280px !important;
}
.flight-type-hint {
  color: #82d7aa !important;
}
.flight-manual-dialog .form-grid label:has([name='startTime']) {
  grid-column: 1;
}
.flight-manual-dialog .form-grid label:has([name='minutes']) {
  grid-column: 2;
  grid-row: 1;
}
.flight-add-dialog .form-grid label:has([name='type']) .flight-chips,
.flight-add-dialog .form-grid label:has([name='wing']) .flight-chips {
  display: inline-flex;
  margin-left: 14px;
}
@media (max-width: 760px) {
  .flight-add-dialog #dialog-content {
    max-height: calc(100dvh - 18px);
  }
  .flight-add-dialog .flight-track-preview .geo-map {
    height: 240px !important;
  }
  .flight-manual-dialog .form-grid label:has([name='minutes']) {
    grid-column: auto;
    grid-row: auto;
  }
  .flight-add-dialog .form-grid label:has([name='type']) .flight-chips,
  .flight-add-dialog .form-grid label:has([name='wing']) .flight-chips {
    display: flex;
    margin-left: 0;
  }
}
.flight-manual-dialog .flight-fields label:has([name='date']):not([hidden]) {
  grid-column: 1/-1;
}
.flight-manual-dialog
  .flight-fields:has(label:has([name='date']):not([hidden]))
  label:has([name='minutes']) {
  grid-row: auto;
}
.flight-clock-pair {
  min-width: 0;
}
.flight-clock-pair > small {
  font-size: 13px;
  color: var(--muted);
}
.flight-clock-pair > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.flight-clock-pair label {
  font-size: 0 !important;
}
.flight-clock-pair input {
  margin-top: 0 !important;
}
.flight-track-dialog .flight-fields:has(.flight-clock-pair) .form-grid {
  grid-template-columns: 1fr 1fr;
}
.flight-track-dialog .flight-fields:has(.flight-clock-pair) label:has([name='site']),
.flight-track-dialog .flight-fields:has(.flight-clock-pair) label:has([name='landing']) {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.flight-track-dialog .flight-fields:has(.flight-clock-pair) label.flight-uncertain {
  border-color: #6a5328;
}
.flight-track-dialog .flight-fields:has(.flight-clock-pair) input {
  font-size: 13px;
}
.flight-add-dialog .flight-optional label:has([name='area']) {
  grid-column: 1/-1;
}
.flight-recent > .btn {
  margin: 0;
  min-height: 36px;
  border-style: dashed;
  border-radius: 999px;
  font-weight: 400;
  padding: 8px 12px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .flight-track-dialog .flight-fields:has(.flight-clock-pair) .form-grid {
    grid-template-columns: 1fr;
  }
  .flight-clock-pair input {
    min-width: 0;
  }
  .flight-recent > .btn {
    font-size: 12px;
  }
}

/* Journal feed: shared neutral surfaces and blue app accents. */
:root {
  --journal: var(--accent);
  --journal-soft: var(--accent-soft);
  --journal-line: var(--border);
  --journal-ink: var(--accent);
  --journal-surface: #1c2635;
  --journal-inset: #161e2b;
}
:root[data-theme='light'] {
  --journal: var(--accent);
  --journal-soft: var(--accent-soft);
  --journal-line: var(--border);
  --journal-ink: var(--accent);
  --journal-surface: #f4f6f9;
  --journal-inset: #eaf0f6;
}
.journal-feed-layout {
  grid-template-columns: minmax(0, 640px) minmax(260px, 320px);
  gap: 32px;
  justify-content: center;
}
.journal-feed-post,
.journal-stories,
.journal-composer,
.journal-feed-sidebar .card {
  background: var(--journal-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.journal-feed-post {
  position: relative;
  margin-bottom: 20px;
}
.journal-month h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 24px 0 18px;
}
.journal-month h2:after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.journal-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2c3b52;
  color: #e8edf4;
  font-weight: 700;
  overflow: hidden;
}
.journal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.journal-post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}
.journal-post-head > div {
  flex: 1;
  min-width: 0;
}
.journal-post-head strong {
  color: var(--text);
}
.journal-post-head small {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.journal-type {
  font-size: 11px;
  color: #89d9ac;
  background: #19382b;
  padding: 5px 10px;
  border-radius: 999px;
  max-width: 110px;
  overflow-wrap: anywhere;
}
.journal-more {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: #2c3b52 !important;
  text-align: center !important;
  letter-spacing: 2px;
}
.journal-feed-post .journal-entry-text {
  padding: 0 16px 12px;
}
.journal-feed-post .journal-entry-text h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.journal-prose,
.journal-detail-card #flight-note {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.65;
}
.journal-feed-post .journal-prose {
  margin: 4px 0 10px;
}
.journal-feed-post .journal-tags {
  margin: 8px 0 0;
}
.journal-feed-post .journal-tags button {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  font-size: 14px;
}
.journal-stories {
  padding: 18px;
  margin-bottom: 18px;
}
.journal-stories header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.journal-stories header button {
  background: none;
  border: 0;
  color: var(--accent);
  font-size: 12px;
}
.journal-story-row {
  display: flex;
  gap: 24px;
  overflow: auto;
  scrollbar-width: thin;
  padding: 2px 4px 8px;
}
.journal-story-row.journal-stories-expanded {
  flex-wrap: wrap;
}
.journal-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 78px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  min-width: 0;
}
.journal-story > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border: 3px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(#20322c, #20322c) padding-box,
    conic-gradient(#5eabf7, #6bc68d, #edbf68, #5eabf7) border-box;
  padding: 8px;
}
.journal-story .cockpit-thumbnail {
  width: 100%;
  height: 100%;
  background: none;
  min-height: 0;
}
.journal-story strong {
  font-size: 12px;
  white-space: nowrap;
}
.journal-story small {
  font-size: 11px;
  color: var(--muted);
}
.journal-story-new {
  display: none;
}
.journal-story-new > span {
  font-size: 32px;
  background: var(--journal-inset);
  border-color: var(--border);
  color: var(--accent);
}
.journal-composer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.journal-compose-input {
  flex: 1;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--journal-inset);
  border-radius: 999px;
  color: var(--muted);
  padding: 14px 16px;
  font-size: 14px;
}
.journal-composer > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}
.journal-composer > div button {
  border: 0;
  background: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.journal-composer svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.journal-media {
  position: relative;
  background: var(--journal-inset);
  overflow: hidden;
}
.journal-slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.journal-slides::-webkit-scrollbar {
  display: none;
}
.journal-slide {
  position: relative;
  display: block;
  flex: 0 0 100%;
  min-width: 0;
  aspect-ratio: 3/2;
  padding: 0 !important;
  scroll-snap-align: start;
}
.journal-slide img,
.journal-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.journal-photo-count {
  position: absolute;
  right: 16px;
  top: 16px;
  background: #152534d9;
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font:
    500 13px 'Geist Mono',
    monospace;
  pointer-events: none;
}
.journal-photo-prev,
.journal-photo-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f5f8fbd9 !important;
  color: #152534 !important;
  text-align: center !important;
  font-size: 25px;
}
.journal-photo-prev {
  left: 12px;
}
.journal-photo-next {
  right: 12px;
}
.journal-image-replay {
  display: none !important;
}
.journal-photo-grid .journal-slides {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 150px 150px;
  gap: 3px;
  overflow: hidden;
}
.journal-photo-grid .journal-slide {
  aspect-ratio: auto;
  min-height: 0;
}
.journal-photo-grid .journal-slide:first-child {
  grid-row: span 2;
}
.journal-photo-grid .journal-slide:only-child {
  grid-column: span 2;
}
.journal-photo-grid .journal-slide:nth-child(n + 4) {
  display: none;
}
.journal-photo-grid .journal-photo-prev,
.journal-photo-grid .journal-photo-next {
  display: none;
}
.journal-photo-grid .journal-photo-count {
  display: none;
}
.journal-photo-invite {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
}
.journal-photo-invite .btn {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  white-space: normal;
}
.journal-flight-preview {
  display: flex;
  width: calc(100% - 32px);
  margin: 16px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border) !important;
  border-radius: 14px;
  padding: 10px !important;
  background: var(--journal-inset) !important;
}
.journal-preview-track {
  display: flex;
  align-items: center;
  flex: 0 0 90px;
  height: 64px;
  border-radius: 10px;
  background: #20322c;
  overflow: hidden;
}
.journal-preview-track svg {
  width: 100%;
  height: 100%;
}
.journal-flight-preview > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.journal-flight-preview small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.journal-flight-preview strong {
  display: block;
  font:
    500 13px 'Geist Mono',
    monospace;
  margin-top: 6px;
}
.journal-flight-preview b {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}
.journal-feed-post .journal-post-actions {
  padding: 12px 16px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
}
.journal-post-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
  min-height: 40px;
  font-size: 13px;
  color: var(--muted) !important;
}
.journal-post-actions svg {
  width: 18px;
  height: 18px;
}
.journal-profile {
  position: relative;
  padding: 0 18px 18px !important;
  overflow: hidden;
}
.journal-profile-cover {
  height: 74px;
  margin: 0 -18px;
  background: linear-gradient(145deg, #2470c8, #20322c);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 82% 65%, 67% 87%, 50% 47%, 32% 92%, 19% 62%, 0 100%);
}
.journal-profile > .journal-avatar {
  width: 64px;
  height: 64px;
  border: 3px solid var(--journal-surface);
  margin-top: -30px;
  position: relative;
  font-size: 20px;
}
.journal-profile h3 {
  margin: 12px 0 0;
}
.journal-profile p {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 16px;
}
.journal-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.journal-profile-stats span {
  background: var(--journal-inset);
  padding: 10px 5px;
  border-radius: 10px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.journal-profile-stats strong {
  display: block;
  font:
    600 17px 'Geist Mono',
    monospace;
  color: var(--text);
}
.journal-feed-sidebar .journal-search input {
  background: var(--journal-surface);
  border-radius: 12px;
  font-size: 13px;
}
.journal-display input {
  appearance: none;
  width: 40px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #394658;
  position: relative;
  flex: none;
  cursor: pointer;
  padding: 0;
}
.journal-display input:before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a3afc0;
  transition: transform 0.15s;
}
.journal-display input:checked {
  background: #2470c8;
}
.journal-display input:checked:before {
  transform: translateX(16px);
  background: #fff;
}
.journal-display input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.journal-anniversary > small {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}
.journal-anniversary p {
  font-size: 13px;
  color: var(--muted);
}
.journal-anniversary button {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 4px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  margin-top: 12px;
}
.journal-anniversary svg {
  width: 54px;
  height: 54px;
  background: var(--journal-inset);
  border-radius: 10px;
  grid-row: span 2;
}
.journal-anniversary span {
  font-size: 12px;
  color: var(--muted);
}
.journal-anniversary b {
  grid-column: span 2;
  font-size: 13px;
  color: var(--accent);
}
dialog.journal-actions-dialog {
  width: 320px;
  max-width: calc(100vw - 24px);
  margin: 0;
  position: fixed;
  inset: var(--journal-menu-top, 100px) auto auto var(--journal-menu-left, calc(50vw - 160px));
  max-height: calc(100dvh - 24px);
  border-radius: 16px;
  background: var(--journal-surface);
  padding: 0;
}
dialog.journal-actions-dialog::backdrop {
  background: #0004;
}
.journal-actions-dialog .dialog-head {
  padding: 12px 16px;
}
.journal-actions-dialog .dialog-head h2 {
  font-size: 14px;
}
.journal-actions-dialog .dialog-head p {
  display: none;
}
.journal-actions-dialog .dialog-body {
  padding: 8px;
}
.journal-sheet-summary {
  display: none;
}
.journal-sheet-primary {
  display: grid;
  gap: 2px;
}
.journal-sheet-primary .btn,
.journal-sheet-list .btn {
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 12px;
  width: 100%;
  font-size: 13px;
}
.journal-sheet-list {
  display: grid;
}
.journal-delete-action {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: #361e22;
  color: #ff8585;
  padding: 12px;
  text-align: left;
  margin-top: 6px;
}
.journal-delete-action svg {
  width: 18px;
  height: 18px;
}
.journal-delete-action small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
  color: #dfa4a4;
}
.journal-actions-dialog .dialog-footer {
  padding: 8px;
}
.journal-actions-dialog .dialog-footer .btn {
  width: 100%;
  justify-content: center;
}
.journal-delete-dialog {
  background: var(--journal-surface);
  width: min(640px, calc(100vw - 24px));
  border-radius: 20px;
}
.journal-delete-preserved {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid #357e55;
  border-radius: 14px;
  background: #173025;
  color: #b7deca;
}
.journal-delete-preserved svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.journal-delete-photos {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 0;
}
.journal-delete-photos input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--accent);
}
.journal-delete-photos small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.journal-delete-dialog .danger {
  background: #be5353;
  color: #fff;
  border-color: #be5353;
}
.journal-flight-choices {
  display: grid;
  gap: 8px;
}
.journal-flight-choices .btn {
  justify-content: flex-start;
  white-space: normal;
}
#toast.journal-undo-toast {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #e8edf4;
  color: #161e2b;
  padding: 16px 20px;
  max-width: calc(100vw - 24px);
  width: max-content;
  white-space: normal;
  border-radius: 18px;
}
#toast.journal-undo-toast .btn {
  background: #161e2b;
  color: #fff;
  white-space: nowrap;
}
.journal-undo-progress {
  width: 26px;
  height: 26px;
  flex: none;
  border: 3px solid #c3cfde;
  border-top-color: #2470c8;
  border-right-color: #2470c8;
  border-radius: 50%;
  animation: journal-undo-turn 10s linear forwards;
}
@keyframes journal-undo-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1050px) and (min-width: 601px) {
  .journal-feed-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
  }
  .journal-preview-track {
    flex-basis: 60px;
  }
  .journal-post-head {
    gap: 8px;
  }
  .journal-type {
    display: none;
  }
}
@media (max-width: 600px) {
  .journal-feed-layout {
    display: block;
  }
  .journal-book {
    margin: 0 -16px;
  }
  .journal-book .book-heading,
  .journal-book-filters {
    margin-left: 16px;
    margin-right: 16px;
  }
  .journal-book .book-heading h1 {
    font-size: 30px;
  }
  .journal-feed-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 16px;
  }
  .journal-feed-sidebar .journal-profile,
  .journal-feed-sidebar .journal-anniversary {
    display: none;
  }
  .journal-feed-sidebar .journal-search {
    grid-column: auto;
  }
  .journal-feed-sidebar .journal-display h3 {
    display: block;
  }
  .journal-feed-post {
    border: 0;
    border-radius: 0;
    background: transparent;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  .journal-stories {
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  .journal-stories header {
    display: none;
  }
  .journal-story-row {
    gap: 18px;
  }
  .journal-story-new {
    display: flex;
  }
  .journal-story {
    flex-basis: 64px;
  }
  .journal-story > span {
    width: 64px;
    height: 64px;
  }
  .journal-story strong {
    font-size: 11px;
  }
  .journal-story small {
    font-size: 10px;
  }
  .journal-composer {
    display: none;
  }
  .journal-month h2 {
    margin: 16px;
    font-size: 11px;
  }
  .journal-post-head {
    padding: 14px 16px;
    font-size: 12px;
    gap: 10px;
  }
  .journal-post-head small {
    font-size: 11px;
  }
  .journal-type {
    font-size: 10px;
    padding: 4px 6px;
    max-width: 90px;
  }
  .journal-more {
    background: transparent !important;
    width: 32px;
  }
  .journal-avatar {
    width: 40px;
    height: 40px;
  }
  .journal-feed-post {
    display: flex;
    flex-direction: column;
  }
  .journal-post-head {
    order: 0;
  }
  .journal-media {
    order: 1;
  }
  .journal-post-actions {
    order: 2;
    border: 0 !important;
    justify-content: flex-start !important;
    gap: 22px !important;
    padding: 8px 16px !important;
  }
  .journal-feed-post .journal-entry-text {
    order: 3;
    padding: 4px 16px 20px;
  }
  .journal-feed-post .journal-entry-text h3 {
    display: inline;
    font-size: 16px;
    margin-right: 5px;
  }
  .journal-feed-post .journal-prose {
    display: inline;
    font-size: 16px;
  }
  .journal-feed-post .journal-tags {
    margin-top: 8px;
  }
  .journal-photo-invite {
    order: 4;
    padding: 12px 16px;
  }
  .journal-flight-preview {
    order: 5;
    margin-top: 0;
  }
  .journal-feed-post:has(.journal-media) > .journal-flight-preview {
    display: none;
  }
  .journal-slide {
    aspect-ratio: 1/1;
  }
  .journal-image-replay {
    display: flex !important;
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    border-radius: 12px;
    background: #101e1be8 !important;
    color: #fff !important;
    padding: 12px !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
  }
  .journal-image-replay strong {
    font:
      500 12px 'Geist Mono',
      monospace;
  }
  .journal-image-replay b {
    color: #7dbbf7;
    white-space: nowrap;
  }
  .journal-photo-prev,
  .journal-photo-next {
    width: 30px;
    height: 30px;
  }
  .journal-photo-grid .journal-slides {
    grid-template-rows: 120px 120px;
  }
  .journal-photo-grid .journal-image-replay {
    display: none !important;
  }
  .journal-photo-count {
    font-size: 12px;
    top: 10px;
    right: 10px;
  }
  .journal-post-actions button {
    font-size: 0 !important;
    gap: 0;
    min-width: 28px;
  }
  .journal-post-actions svg {
    width: 24px;
    height: 24px;
  }
  .journal-post-actions button:after {
    content: attr(aria-label);
  }
  dialog.journal-actions-dialog {
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 24px 24px 0 0;
    max-height: 92dvh;
    padding: 22px 12px calc(20px + env(safe-area-inset-bottom));
  }
  .journal-actions-dialog:before {
    content: '';
    position: absolute;
    top: 8px;
    left: calc(50% - 20px);
    width: 40px;
    height: 5px;
    background: #394658;
    border-radius: 5px;
  }
  .journal-actions-dialog .dialog-head {
    display: none;
  }
  .journal-sheet-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 14px;
  }
  .journal-sheet-summary svg {
    width: 48px;
    height: 48px;
    flex: none;
    background: var(--journal-inset);
    border-radius: 10px;
  }
  .journal-sheet-summary strong {
    font-size: 16px;
  }
  .journal-sheet-summary small {
    display: block;
    color: var(--muted);
    font-size: 12px;
  }
  .journal-sheet-primary {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }
  .journal-sheet-primary .btn {
    flex-direction: column;
    justify-content: center;
    background: var(--journal-inset);
    border-radius: 16px;
    padding: 16px 4px;
    font-size: 14px;
    gap: 10px;
  }
  .journal-sheet-primary svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
  }
  .journal-sheet-list {
    border-radius: 16px;
    background: var(--journal-inset);
    overflow: hidden;
  }
  .journal-sheet-list .btn {
    padding: 16px;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  .journal-sheet-list .btn svg {
    display: none;
  }
  .journal-sheet-list [data-cockpit-share] {
    display: none;
  }
  .journal-delete-action {
    margin: 0;
    border-radius: 0;
    background: transparent;
    padding: 16px;
    font-size: 15px;
  }
  .journal-delete-action svg {
    display: none;
  }
  .journal-delete-action small {
    font-size: 12px;
  }
  .journal-actions-dialog .dialog-footer {
    border: 0;
    padding: 12px 0 0;
  }
  .journal-actions-dialog .dialog-footer .btn {
    background: #2c394b;
    font-weight: 700;
    padding: 16px;
    font-size: 16px;
    border: 0;
    border-radius: 14px;
  }
  #toast.journal-undo-toast {
    gap: 8px;
    padding: 12px;
    font-size: 12px;
  }
  .journal-undo-progress {
    width: 20px;
    height: 20px;
  }
  #toast.journal-undo-toast .btn {
    padding: 10px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .journal-undo-progress {
    animation: none;
  }
  .journal-display input:before {
    transition: none;
  }
}
#toast.journal-undo-toast.visible {
  pointer-events: auto;
}
@media (min-width: 601px) {
  dialog.journal-actions-dialog::backdrop {
    backdrop-filter: none;
    background: transparent;
  }
  .journal-actions-dialog .dialog-head {
    display: none;
  }
  .journal-actions-dialog .dialog-footer {
    display: none;
  }
  .journal-sheet-primary [data-cockpit-share] {
    display: none;
  }
}
.journal-mobile-heading,
.journal-mobile-search {
  display: none;
}
@media (max-width: 600px) {
  .journal-feed-active > .header {
    display: none;
  }
  .journal-feed-active main {
    padding-top: 20px;
  }
  .journal-desktop-heading {
    display: none;
  }
  .journal-mobile-heading {
    display: inline;
  }
  .journal-mobile-search {
    display: flex;
    background: var(--journal-surface);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }
  .journal-book .book-heading {
    position: relative;
    padding-right: 100px;
    min-height: 50px;
    margin-bottom: 8px;
  }
  .journal-book .book-heading h1 {
    font-size: 32px;
  }
  .journal-book .book-heading > div:first-child > p {
    display: none;
  }
  .journal-book .book-heading .actions {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    gap: 8px;
  }
  .journal-book .book-heading .actions [data-export] {
    display: none;
  }
  .journal-book .book-heading .actions [data-add] {
    font-size: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  .journal-book .book-heading .actions [data-add] svg {
    width: 24px;
    height: 24px;
  }
  .journal-book .book-heading > .segment {
    margin-top: 10px;
  }
  .journal-book-filters {
    margin-top: 6px;
    margin-bottom: 6px;
  }
  .journal-stories {
    padding-top: 8px;
    padding-bottom: 14px;
  }
  .journal-stories header {
    display: none;
  }
}
.journal-photo-grid .journal-slide:nth-child(2):last-child {
  grid-row: span 2;
}

/* Topographic journal thumbnails stay static; the entire preview opens replay. */
.journal-preview-track {
  position: relative;
  aspect-ratio: 45/32;
  height: auto;
  min-height: 0;
  align-self: center;
}
.journal-topo-canvas {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 45/32;
  overflow: hidden;
  background: #20322c;
}
.journal-topo-tiles {
  position: absolute;
  inset: 0;
}
.journal-topo-tiles img {
  position: absolute;
  max-width: none;
  object-fit: fill;
  display: block;
}
.journal-topo-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.journal-topo-outline {
  stroke: #fff;
  stroke-width: 6;
  opacity: 0.9;
}
.journal-topo-line {
  stroke: #247bd4;
  stroke-width: 3.5;
}
.journal-topo-canvas .journal-topo-fallback {
  display: none;
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  color: #d7e5ee;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
  background: #152534cc;
  border-radius: 3px;
  padding: 2px;
}
.journal-topo-unavailable .journal-topo-tiles {
  display: none;
}
.journal-topo-canvas.journal-topo-unavailable .journal-topo-fallback {
  display: block;
}
.journal-topo-attribution {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
  margin: -9px 16px 12px;
}
.journal-topo-attribution a {
  color: inherit;
}
@media (max-width: 600px) {
  .journal-feed-post:has(.journal-media) > .journal-topo-attribution {
    display: none;
  }
}

/* Monthly records, activity strip and local natural-language search (02e / M15). */
.flight-book {
  position: relative;
}
.flight-book:has(.book-timeline) {
  padding-right: 88px;
}
.book-heading {
  align-items: center;
  gap: 12px;
}
.book-heading > .segment {
  margin-left: auto;
}
.book-search {
  border-color: #3c6fa3;
  min-height: 54px;
}
.book-search-key {
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: none;
  padding: 6px 10px;
}
.book-search #flight-period {
  width: auto;
  max-width: 115px;
  background: var(--accent-soft);
  border: 0;
  border-radius: 999px;
  color: var(--text);
  padding: 8px;
  font-size: 13px;
}
.book-year-remove {
  background: none;
  color: var(--accent);
  border: 0;
  padding: 3px;
}
.book-quick {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.book-quick button {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.book-quick #sort {
  margin-left: auto;
  width: auto;
  font-size: 12px;
  padding: 8px;
  background: none;
}
.book-filters {
  font-size: 12px;
}
.book-filters > select {
  font-size: 11px;
  padding: 5px 9px;
  min-height: 30px;
}
.book-view-controls:empty {
  display: none;
}
#book-active-filters:empty,
#book-metrics:empty {
  display: none;
}
.book-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.book-kpis article {
  padding: 12px 14px;
  border-radius: 14px;
  min-width: 0;
}
.book-kpis strong {
  display: block;
  font:
    600 clamp(17px, 1.8vw, 23px) 'Geist Mono',
    monospace;
  white-space: nowrap;
  margin: 5px 0;
}
.book-kpis small {
  font-size: 11px;
  color: var(--muted);
}
.book-kpis button {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
}
.book-longest button small {
  color: #f4b544;
}
.book-month summary {
  background: var(--book-card);
  padding: 18px;
  gap: 20px;
}
.book-month-name {
  font-size: 19px;
  min-width: 215px;
}
.book-month-name small {
  display: block;
  margin: 5px 0 0 !important;
  white-space: nowrap;
  font:
    12px 'Geist Mono',
    monospace;
}
.book-month-award {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.book-record {
  display: inline-block;
  background: #302511;
  color: #f4b544;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 99px;
  font-weight: 600;
  white-space: nowrap;
}
.book-main-area {
  font-size: 11px !important;
  margin: 0 !important;
}
.book-calendar {
  display: grid;
  grid-template-columns: repeat(31, minmax(2px, 1fr));
  align-items: end;
  gap: 3px;
  flex: 1;
  min-width: 140px;
  position: relative;
  padding-bottom: 14px;
  height: 48px;
}
.book-calendar > span {
  height: 34px;
  display: flex;
  align-items: flex-end;
}
.book-calendar i {
  display: block;
  width: 100%;
  background: #5da9f5;
  border-radius: 2px;
}
.book-calendar span:has(i[style='height:3px']) i {
  background: var(--border);
}
.book-calendar small {
  position: absolute;
  bottom: 0;
  left: 0;
  font-size: 9px !important;
  margin: 0 !important;
}
.book-calendar small:nth-last-child(2) {
  left: 48%;
}
.book-calendar small:last-child {
  left: auto;
  right: 0;
}
.book-month:not([open]) .book-calendar {
  display: none;
}
.book-month:not([open]) .book-month-name {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1;
}
.book-month:not([open]) .book-month-award > .book-record {
  display: none;
}
.book-month[open] summary::after {
  content: '⌃';
}
.book-columns {
  display: grid;
  grid-template-columns: 64px 1fr 160px 160px;
  gap: 16px;
  padding: 10px 70px 10px 48px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  background: var(--book-subtle);
}
.book-row {
  grid-template-columns: 20px 36px 64px minmax(140px, 1fr) minmax(240px, 340px) 40px;
  gap: 14px;
  padding: 8px 18px;
  min-height: 66px;
  background: var(--book-subtle);
  border-top: 0;
}
.book-row.day-first {
  border-top: 1px solid var(--border);
}
.book-row:hover {
  background: var(--book-card);
}
.book-row .book-thumbnail,
.book-row .cockpit-thumbnail {
  display: block;
  width: 64px;
  height: 46px;
}
.book-measures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-width: 0;
}
.book-number {
  text-align: left;
  font-size: 14px;
  display: block;
  font-weight: 600;
}
.metric-bar {
  display: block;
  height: 6px;
  background: var(--border);
  border-radius: 9px;
  margin-top: 6px;
  overflow: hidden;
}
.metric-bar > i {
  display: block;
  height: 100%;
  background: #5da9f5;
  border-radius: 9px;
}
.book-distance .metric-bar > i {
  background: #55c48c;
}
.record-gold {
  color: #f4b544 !important;
}
.record-gold .metric-bar > i {
  background: #f4b544;
}
.book-row-name {
  position: relative;
  padding-right: 70px;
}
.book-row-name > div:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.book-row .flight-title {
  font-size: 14px;
}
.book-media {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.book-media > span {
  display: flex;
  gap: 4px;
  align-items: center;
}
.book-media .icon {
  width: 13px;
  height: 13px;
}
.book-photo-count > .icon {
  color: #55c48c;
}
.book-video-count > .icon {
  color: #7dbbf7;
}
.book-row > .icon-button {
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
}
.book-timeline {
  position: fixed;
  right: max(16px, calc((100vw - 1600px) / 2));
  top: 95px;
  width: 70px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--book-card);
  padding: 10px;
  z-index: 5;
  max-height: calc(100dvh - 130px);
  overflow: auto;
}
.book-timeline strong {
  font-size: 12px;
  display: block;
  text-align: center;
  margin-bottom: 10px;
}
.book-timeline button {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  width: 100%;
  padding: 5px 0;
  font-size: 10px;
  color: var(--muted);
  text-align: left;
}
.book-timeline button:disabled {
  opacity: 0.35;
}
.book-timeline button:hover:not(:disabled) {
  color: var(--accent);
}
.book-timeline i {
  height: 5px;
  background: #3c79b0;
  border-radius: 4px;
}
.book-timeline hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}
.book-scrubber {
  display: none;
}
.book-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-soft);
  border: 1px solid #3c6fa3;
  border-radius: 99px;
  padding: 10px 14px;
  margin: 0 8px 8px 0;
  color: var(--accent);
  font-size: 14px;
}
.book-filter-chip span {
  border-radius: 50%;
  background: #2c4c70;
  color: #cfe4fa;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.book-filter-add {
  background: none;
  border: 1px dashed #3c6fa3;
  color: var(--accent);
  border-radius: 99px;
  padding: 10px 14px;
  font-size: 14px;
}
dialog.book-search-dialog {
  width: min(920px, 94vw);
  max-width: 920px;
  border: 1px solid #3c6fa3;
  border-radius: 24px;
  background: #1b2433;
  color: #e8edf4;
  max-height: 90dvh;
  padding: 0;
}
dialog.book-search-dialog .dialog-head {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
dialog.book-search-dialog .dialog-body {
  padding: 0;
}
.book-search-input {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--border);
}
.book-search-input > .icon {
  color: #7dbbf7;
  flex-shrink: 0;
}
.book-search-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 24px;
  padding: 4px;
  color: inherit;
}
.book-search-input button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: #7dbbf7;
}
.book-understood {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.book-understood > div {
  flex: 1;
}
.book-understood .book-filter-chip {
  margin-bottom: 0;
}
.book-search-hits {
  padding: 18px;
}
.book-search-hits header {
  display: flex;
  justify-content: space-between;
  margin: 0 4px 14px;
}
.book-search-hits header strong {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8794a6;
}
.book-search-hits header > span {
  color: #8cdeb4;
  font-size: 13px;
}
.book-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: 68px 1fr 300px;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  text-align: left;
}
.book-search-result.active,
.book-search-result:hover {
  background: #1f3550;
}
.book-search-result > .cockpit-thumbnail {
  width: 68px;
  height: 46px;
}
.book-hit-name {
  min-width: 0;
}
.book-hit-name strong {
  font-size: 15px;
}
.book-hit-name strong > span {
  color: #7dbbf7;
}
.book-hit-name small {
  display: block;
  margin-top: 6px;
  color: #a3afc0;
  font-size: 13px;
}
.book-show-results {
  margin: 16px 4px 0;
}
.book-search-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.book-search-bottom > section {
  padding: 20px;
}
.book-search-bottom > section + section {
  border-left: 1px solid var(--border);
}
.book-search-bottom h3 {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #8794a6;
  margin: 0 0 15px;
}
.book-search-bottom button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  color: #c9d3e0;
  border: 0;
  padding: 12px 0;
  font-size: 15px;
  text-align: left;
}
.book-search-bottom button > .icon {
  box-sizing: content-box;
  padding: 10px;
  background: #223247;
  color: #7dbbf7;
  border-radius: 9px;
}
.book-search-bottom .book-example {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 99px;
  margin: 0 8px 8px 0;
}
.book-filter-choices {
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.book-filter-choices button {
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px;
  background: none;
  color: var(--accent);
}

[data-theme='light'] dialog.book-search-dialog {
  background: #f5f7fa;
  color: #162638;
}
[data-theme='light'] .book-search-result.active {
  background: #dceafd;
}
[data-theme='light'] .book-search-input input {
  color: #162638;
}
[data-theme='light'] .book-search-bottom button {
  color: #314c68;
}
[data-theme='light'] .book-record {
  background: #fff0c9;
  color: #805400;
}

@media (max-width: 1100px) and (min-width: 701px) {
  .book-month summary {
    flex-wrap: wrap;
    gap: 12px;
  }
  .book-calendar {
    min-width: 180px;
  }
  .book-row {
    grid-template-columns: 18px 30px 52px minmax(105px, 1fr) 220px 34px;
    gap: 8px;
    padding: 8px 12px;
  }
  .book-row .book-thumbnail,
  .book-row .cockpit-thumbnail {
    width: 52px;
  }
  .book-row-name {
    padding-right: 0;
  }
  .book-media {
    position: static;
    transform: none;
    flex-direction: row;
    margin-top: 4px;
  }
  .book-columns {
    grid-template-columns: 52px 1fr 105px 105px;
    padding-right: 54px;
  }
  .book-kpis strong {
    font-size: 17px;
  }
  .book-heading > .segment {
    order: 2;
  }
}

@media (max-width: 700px) {
  .flight-book:has(.book-timeline) {
    padding-right: 0;
  }
  .book-timeline {
    display: none;
  }
  .book-heading {
    position: relative;
    align-items: center;
    flex-wrap: wrap;
  }
  .book-heading h1 {
    font-size: 26px;
  }
  .book-heading p {
    font-size: 12px;
  }
  .book-heading > .segment {
    width: 100%;
    order: 3;
    margin: 8px 0 0;
    justify-content: space-around;
  }
  .book-heading > .segment button {
    flex: 1;
  }
  .book-heading .actions > [data-export] {
    display: none;
  }
  .book-heading .actions [data-add] {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 0;
    padding: 10px;
    min-width: 0;
  }
  .book-heading .actions [data-add] > .icon {
    width: 24px;
    height: 24px;
  }
  .book-search {
    padding: 10px;
    gap: 7px;
    min-height: 48px;
  }
  .book-search-key {
    display: none;
  }
  .book-search #flight-period {
    font-size: 12px;
    max-width: 84px;
    padding: 7px;
  }
  .book-quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -10px;
    padding-bottom: 4px;
  }
  .book-quick button {
    flex-shrink: 0;
    min-height: 36px;
  }
  .book-quick #sort {
    flex-shrink: 0;
  }
  .book-filters {
    gap: 5px;
  }
  .book-filters > select {
    max-width: 100px !important;
    font-size: 10px;
    padding: 5px;
  }
  .book-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .book-kpis article {
    padding: 10px;
  }
  .book-kpis strong {
    font-size: 17px;
  }
  .book-kpis small {
    font-size: 11px;
  }
  .book-kpis article > small:last-child,
  .book-kpis .book-longest {
    display: none;
  }
  .book-month summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }
  .book-month-name {
    font-size: 17px;
    min-width: 0;
    flex: 1;
  }
  .book-month-name small {
    font-size: 11px;
    white-space: normal;
    line-height: 1.6;
  }
  .book-month-award {
    max-width: 140px;
    align-self: flex-start;
  }
  .book-month-award .book-record {
    font-size: 9px;
    white-space: normal;
  }
  .book-month[open] .book-main-area {
    display: none;
  }
  .book-calendar {
    flex-basis: 100%;
    min-width: 0;
    order: 3;
    margin-top: 0;
    height: 42px;
  }
  .book-calendar small {
    display: none;
  }
  .book-month summary::after {
    display: none;
  }
  .book-month:not([open]) .book-month-name {
    display: block;
  }
  .book-columns {
    display: none;
  }
  .book-row {
    grid-template-columns: 26px 48px minmax(0, 1fr) 88px;
    gap: 10px;
    padding: 12px 14px;
    min-height: 84px;
  }
  .book-row .flight-selection,
  .book-row > .icon-button {
    display: none;
  }
  .book-row .date-block {
    grid-column: 1;
    grid-row: 1;
    font-size: 18px;
  }
  .book-row .book-thumbnail {
    grid-column: 2;
    grid-row: 1;
    display: block;
    width: 48px;
    height: 40px;
  }
  .book-row .cockpit-thumbnail {
    width: 48px;
    height: 40px;
  }
  .book-row-name {
    grid-column: 3;
    grid-row: 1;
    padding: 0;
  }
  .book-row .flight-title {
    font-size: 13px;
  }
  .book-row .book-time {
    font-size: 11px;
    display: inline;
  }
  .book-end {
    display: none;
  }
  .book-media {
    position: static;
    display: inline-flex;
    transform: none;
    flex-direction: row;
    font-size: 10px;
    gap: 6px;
    margin-left: 5px;
  }
  .book-media span span {
    display: none;
  }
  .book-media .icon {
    width: 11px;
    height: 11px;
  }
  .book-row-name > div:first-child {
    gap: 4px;
  }
  .book-row .book-record {
    font-size: 8px;
    padding: 3px 5px;
  }
  .book-row .book-record span {
    display: none;
  }
  .book-row .book-measures {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .book-row .book-number {
    font-size: 13px;
    text-align: right;
  }
  .book-row .book-number.muted {
    font-size: 11px;
  }
  .metric-bar {
    height: 4px;
    margin-top: 4px;
  }
  .book-scrubber {
    display: block;
    position: fixed;
    right: 0;
    top: 30dvh;
    width: 18px;
    height: 40dvh;
    z-index: 10;
  }
  .book-scrubber input {
    writing-mode: vertical-lr;
    direction: rtl;
    appearance: auto;
    width: 18px;
    height: 100%;
    margin: 0;
    accent-color: #2470c8;
    touch-action: none;
    opacity: 0.55;
  }
  .book-scrubber:focus-within input {
    opacity: 1;
  }
  .book-scrubber output {
    position: absolute;
    right: 26px;
    top: 45%;
    white-space: nowrap;
    background: #e8edf4;
    color: #121925;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
  }
  .book-filter-chip {
    font-size: 12px;
    padding: 7px 10px;
  }
  dialog.book-search-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #121925;
  }
  dialog.book-search-dialog #dialog-content {
    height: 100%;
    overflow: auto;
  }
  .book-search-input {
    position: sticky;
    top: 0;
    background: inherit;
    padding: 20px 16px;
    gap: 8px;
    z-index: 2;
  }
  .book-search-input input {
    font-size: 17px;
    border: 1px solid #3c6fa3;
    border-radius: 12px;
    padding: 12px 8px;
  }
  .book-search-input button {
    padding: 6px 0;
    border: 0;
    font-size: 13px;
  }
  .book-search-input > .icon {
    width: 18px;
  }
  .book-understood {
    display: block;
    padding: 14px 16px;
  }
  .book-understood > span {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
  }
  .book-understood .book-filter-chip {
    margin-bottom: 8px;
  }
  .book-search-hits {
    padding: 18px 16px;
  }
  .book-search-hits header strong {
    font-size: 0;
  }
  .book-search-hits header strong:before {
    content: 'TREFFER';
    font-size: 12px;
  }
  .book-search-result {
    grid-template-columns: 50px minmax(0, 1fr) 90px;
    padding: 10px 0;
    gap: 10px;
    margin-bottom: 14px;
  }
  .book-search-result > .cockpit-thumbnail {
    width: 50px;
    height: 40px;
  }
  .book-hit-name strong {
    font-size: 13px;
  }
  .book-hit-name small {
    font-size: 12px;
  }
  .book-search-result .book-measures {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .book-search-result .book-number {
    text-align: right;
    font-size: 14px;
  }
  .book-search-result .book-distance {
    font-size: 12px;
    font-weight: 400;
  }
  .book-search-result .book-distance .metric-bar {
    display: none;
  }
  .book-show-results {
    width: 100%;
    margin: 8px 0 0;
    padding: 12px;
  }
  .book-search-bottom {
    display: block;
  }
  .book-search-bottom > section + section {
    border: 0;
  }
  .book-search-bottom > section {
    padding: 18px 16px;
  }
  .book-search-bottom button {
    font-size: 14px;
  }
  .book-search-bottom .book-example {
    font-size: 12px;
    padding: 9px 12px;
  }
}

/* Selection stays available when the user starts a bulk action on a small screen. */
@media (max-width: 700px) {
  .flight-book:has(#bulk-toolbar .bulk-toolbar) .book-row .flight-selection {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    background: var(--book-card);
    z-index: 1;
  }
  .flight-book:has(#bulk-toolbar .bulk-toolbar) .book-row .date-block {
    visibility: hidden;
  }
}

@media (max-width: 700px) {
  .book-row {
    position: relative;
  }
  .book-row .flight-selection {
    display: flex;
    position: absolute;
    left: 3px;
    top: 6px;
    opacity: 0.55;
  }
  .book-row .flight-selection input {
    width: 11px;
    height: 11px;
  }
  .flight-book:has(#bulk-toolbar .bulk-toolbar) .book-row .flight-selection {
    opacity: 1;
    position: static;
  }
  .book-row .book-record {
    max-width: 100%;
    white-space: normal;
  }
}

.book-kpis article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.book-kpis .book-longest button {
  display: block;
}
.book-kpis .book-longest button small {
  display: block;
  line-height: 1.5;
}
.book-row .date-block {
  background: none;
  padding: 0;
}
.book-row .date-block small {
  text-transform: none;
}
.book-quick [data-book-quick='records'] {
  color: #f4b544;
}
.book-quick [data-book-photos] {
  color: #8cdeb4;
}
.book-quick [data-book-quick='videos'] {
  color: #7dbbf7;
}
.book-search-input {
  background: #1b2433;
}
.book-scrubber input {
  appearance: none;
  background: transparent;
  opacity: 1;
}
.book-scrubber input::-webkit-slider-runnable-track {
  width: 4px;
  border-radius: 4px;
  background: var(--border);
}
.book-scrubber input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 42px;
  margin-left: -7px;
  background: #2470c8;
  border-radius: 10px 0 0 10px;
  border: 0;
}
.book-scrubber input::-moz-range-track {
  width: 4px;
  border-radius: 4px;
  background: var(--border);
}
.book-scrubber input::-moz-range-thumb {
  width: 18px;
  height: 42px;
  background: #2470c8;
  border-radius: 10px 0 0 10px;
  border: 0;
}

@media (max-width: 700px) {
  .flight-book:not(.journal-book) .book-heading {
    padding-right: 55px;
  }
  .flight-book:not(.journal-book) .book-heading .actions {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    margin: 0;
  }
  .flight-book:not(.journal-book) .book-heading > .segment {
    width: calc(100% + 55px);
    flex-shrink: 0;
  }
  .flight-book:not(.journal-book) .book-filters {
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 3px;
  }
  .flight-book:not(.journal-book) .book-filters > select {
    flex-shrink: 0;
  }
  .flight-book > .collection-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow: auto;
    gap: 14px;
  }
  .flight-book > .collection-actions .btn {
    flex: 0 0 auto;
    font-size: 10px;
    white-space: nowrap;
  }
  .flight-book .filtered-summary {
    flex-wrap: wrap;
    gap: 6px !important;
    font-size: 10px !important;
  }
  .book-kpis .book-longest {
    display: none;
  }
  .book-search-input {
    background: #121925;
  }
}
.book-row .book-row-wing {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .book-row .book-row-wing {
    display: none;
  }
}
.book-row .book-row-wing {
  margin-top: 2px !important;
  font-size: 10px !important;
}
.journal-book .book-quick {
  margin: 0 0 12px;
  min-width: 0;
  max-width: 100%;
}

/* Compact flight tiles (02g / M17), sharing the list's monthly dashboard. */
.flight-book .book-month-tiles .flight-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 12px;
  background: var(--book-subtle);
}
.book-month-tiles .book-tile {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--book-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.book-month-tiles .book-tile-record {
  border-color: #6a5328;
}
.book-month-tiles .book-tile-track {
  height: 128px;
  flex-shrink: 0;
  background: radial-gradient(120% 90% at 30% 20%, #23362f, #18242a);
}
.book-tile-open {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.book-tile-open > .cockpit-thumbnail {
  width: 100%;
  height: 100%;
  padding: 22px 20px 30px;
  border-radius: 0;
  background: none;
}
.book-tile-open .cockpit-thumbnail path {
  stroke: #5ea8f2;
  stroke-width: 1.4;
}
.book-tile-day {
  position: absolute;
  left: 9px;
  top: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}
.book-month-tiles .book-tile-date {
  position: static;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 7px;
  background: #0b1018c7;
}
.book-month-tiles .book-tile-date strong {
  font-size: 14px;
}
.book-month-tiles .book-tile-date small {
  text-transform: none;
  font-size: 10px;
}
.book-tile-sequence {
  border-radius: 99px;
  background: #2470c8d9;
  padding: 3px 6px;
  color: white;
  font:
    10px 'Geist Mono',
    monospace;
}
.book-month-tiles .book-tile .flight-selection {
  top: 8px;
  right: 8px;
  padding: 3px;
  background: #0b101860;
}
.book-tile-media {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 50%;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  background: #0b1018c7;
  color: #e8edf4;
  text-align: left;
  font-size: 10px;
}
.book-tile-media > span {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.book-tile-media .icon {
  width: 12px;
  height: 12px;
}
.book-tile-records {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  pointer-events: none;
}
.book-tile-records .book-record {
  font-size: 9px;
  padding: 3px 6px;
  border: 1px solid #6a5328;
}
.book-month-tiles .book-tile .flight-card-content {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 116px;
}
.book-tile-heading {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.book-tile-heading .flight-title {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  text-align: left;
}
.book-tile-heading .book-time {
  font:
    11px 'Geist Mono',
    monospace;
  white-space: nowrap;
  color: var(--muted);
}
.book-month-tiles .book-tile blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}
.book-tile .book-measures {
  margin-top: auto;
  gap: 10px;
}
.book-tile .book-number {
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.book-tile .metric-bar {
  height: 5px;
  margin-top: 5px;
}
.book-tile-open:focus-visible,
.book-tile-media:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}
@media (min-width: 1500px) {
  .flight-book .book-month-tiles .flight-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
@media (max-width: 700px) {
  .flight-book .book-month-tiles .flight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }
  .book-month-tiles .book-tile-track {
    height: 110px;
  }
  .book-month-tiles .book-tile .flight-card-content {
    padding: 10px;
    min-height: 80px;
    gap: 8px;
  }
  .book-tile-heading .flight-title {
    font-size: 12px;
  }
  .book-tile-heading .book-time {
    font-size: 10px;
  }
  .book-tile .book-number {
    font-size: 12px;
  }
  .book-tile .book-measures {
    gap: 8px;
  }
  .book-tile-media > span > span {
    display: none;
  }
  .book-tile-open > .cockpit-thumbnail {
    padding: 24px 14px 30px;
  }
  .book-month-tiles .book-tile .flight-selection {
    right: 5px;
    top: 5px;
    padding: 2px;
  }
  .book-month-tiles .book-tile .flight-selection input {
    width: 13px;
    height: 13px;
  }
  .book-tile-day {
    left: 7px;
    top: 7px;
    gap: 4px;
  }
  .book-tile-records {
    right: 6px;
    bottom: 6px;
  }
}

/* Shared geographic topo previews keep the map and track at the same aspect. */
.book-month-tiles .book-tile-track {
  height: auto;
  aspect-ratio: 8/5;
}
.book-tile-open > .journal-topo-canvas {
  width: 100%;
  height: 100%;
  aspect-ratio: 8/5;
}
.book-tile-open .journal-topo-outline {
  stroke-width: 4;
}
.book-tile-open .journal-topo-line {
  stroke-width: 2.3;
}
.book-tile-open .journal-topo-fallback {
  top: 50%;
  bottom: auto;
  left: 20%;
  right: 20%;
  font-size: 9px;
}
.book-month-tiles .flight-grid > .journal-topo-attribution {
  grid-column: 1/-1;
  margin: 0;
  font-size: 9px;
}

/* Flugbuchkarte: gemeinsame Auswahl, Gebiete und Zeitraum. */
.map-book #filtered-summary,
.map-book .book-filters {
  display: none;
}
.book-map-layout {
  grid-template-columns: minmax(270px, 0.95fr) minmax(0, 1.85fr);
  align-items: stretch;
}
.book-map-list {
  height: 780px;
  max-height: none;
  background: #161f2d;
  display: flex;
  flex-direction: column;
}
.book-map-list header {
  flex-shrink: 0;
}
.book-map-count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.book-map-count h2 {
  font-size: 16px;
}
.book-map-count small {
  color: var(--muted);
  font-size: 11px;
}
.book-follow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 12px 0;
  cursor: pointer;
}
.book-follow input {
  accent-color: #2470c8;
  width: 20px;
  height: 20px;
}
.book-map-review {
  width: 100%;
  border: 1px solid #705222;
  background: #2b2313;
  color: #f0b44c;
  border-radius: 10px;
  font-size: 11px;
  text-align: left;
  padding: 10px;
  cursor: pointer;
}
.book-map-review span {
  float: right;
}
.book-map-rows {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding: 2px 0;
}
.book-map-list .compact-row {
  display: block;
  margin: 5px 6px;
  border-radius: 12px;
  padding: 10px 8px;
}
.book-map-list .compact-row.hovered {
  border-color: #415673;
  background: #1c2736;
}
.book-map-list .compact-select {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) 88px;
  gap: 10px;
  text-align: left;
  align-items: center;
  color: var(--text);
}
.book-map-list .date-block {
  width: auto;
  text-align: center;
}
.book-map-list .date-block strong {
  font:
    700 16px 'Geist Mono',
    monospace;
}
.book-map-list .date-block small {
  font-size: 10px;
}
.book-map-row-name {
  min-width: 0;
}
.book-map-row-name strong {
  display: block;
  font-size: 13px;
}
.book-map-row-name strong i {
  display: inline-block;
  width: 10px;
  height: 3px;
  background: var(--track-color);
  margin-right: 7px;
  border-radius: 3px;
  vertical-align: middle;
}
.book-map-row-name > small {
  display: block;
  color: var(--muted);
  font:
    11px 'Geist Mono',
    monospace;
  margin-top: 5px;
}
.book-map-row-name .book-record {
  font-size: 9px;
  margin-top: 3px;
  display: inline-block;
}
.book-map-list .book-number {
  font:
    600 13px 'Geist Mono',
    monospace;
  text-align: right;
  display: block;
}
.book-map-list .book-number > small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
}
.book-map-list .metric-bar {
  width: 100%;
  display: block;
  margin-top: 5px;
}
.book-map-list .metric-bar > i {
  background: var(--track-color);
}
.book-map-flight-actions {
  padding: 5px 0 0 44px;
}
.book-map-panel {
  height: 780px;
  display: flex;
  flex-direction: column;
  background: #0e1720;
}
.book-area-chips {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  align-items: center;
  overflow: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}
.book-area-chips > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.book-area-chips button {
  border: 1px solid var(--border);
  background: #101923;
  color: var(--text);
  border-radius: 24px;
  padding: 9px 12px;
  white-space: nowrap;
  font-size: 12px;
  cursor: pointer;
}
.book-area-chips button[aria-pressed='true'] {
  background: #1f3550;
  border-color: #3c6fa3;
  color: #cfe4fa;
}
.book-area-chips small {
  margin-left: 5px;
  color: #91adc8;
}
.book-map-stage {
  flex: 1;
  min-height: 0;
  position: relative;
}
.book-map-panel .geo-map {
  height: 100%;
  min-height: 0;
  background: #0f1b26;
}
.book-map-tools {
  top: 12px;
  gap: 7px;
}
.book-map-tools .segment button {
  padding: 7px 10px;
  font-size: 11px;
}
.book-map-tools .segment button[aria-pressed='true'] {
  background: #2c3b52;
  border-radius: 7px;
}
.book-map-tools .segment:first-child button[aria-pressed='true'] {
  background: #2470c8;
}
.book-map-bases {
  margin-left: auto;
}
.book-map-tools select {
  max-width: 150px;
}
.book-map-legend {
  bottom: 30px;
  max-width: 300px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  background: #101923ed;
  border: 1px solid var(--border);
  color: #c9d3e0;
  font-size: 10px;
  gap: 6px;
}
.book-map-legend > span:first-child,
.book-map-legend > span:nth-child(2) {
  color: inherit;
}
.book-color-scale {
  height: 8px;
  width: 230px;
  max-width: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #718fb2, #5ea8f2 44%, #5cc48a 81%, #f0b44c);
}
.book-scale-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'Geist Mono', monospace;
}
.book-map-panel .leaflet-bottom.leaflet-right {
  z-index: 440;
}
.book-map-panel .leaflet-control-zoom {
  margin-bottom: 8px;
}
.book-area-bundle {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.book-area-bundle > span {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid #639dd4;
  background: #1f3550e8;
  border-radius: 50%;
  font:
    700 20px 'Geist Mono',
    monospace;
  color: white;
  box-shadow: 0 0 0 8px #5ea8f222;
}
.book-area-bundle b {
  white-space: nowrap;
  background: #0c141ee8;
  color: #e8edf4;
  border-radius: 18px;
  font-size: 12px;
  padding: 3px 12px;
  margin-top: 5px;
}
.book-area-bundle.highlighted > span {
  border-color: #9bd0ff;
  box-shadow: 0 0 0 11px #5ea8f244;
}
.book-area-bundle .needs-review {
  border-color: #f0b44c;
}
.book-map-outside {
  position: absolute;
  bottom: 145px;
  right: 12px;
  z-index: 450;
  border: 1px solid var(--border);
  background: #101923ed;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font-size: 11px;
  cursor: pointer;
}
.book-map-popup {
  position: absolute;
  z-index: 460;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  width: 295px;
  max-width: calc(100% - 28px);
  background: #1b2533f5;
  border: 1px solid #3c6fa3;
  border-radius: 14px;
  padding: 13px;
  box-shadow: 0 8px 28px #0006;
  font-size: 12px;
}
.book-map-popup > strong {
  display: block;
  padding-right: 22px;
}
.book-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: #283549;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.book-map-popup .book-record {
  margin: 12px 0 0;
  display: inline-block;
}
.book-popup-metrics {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font:
    13px 'Geist Mono',
    monospace;
}
.book-popup-metrics small {
  display: block;
  color: var(--muted);
  font: 10px system-ui;
  margin-bottom: 3px;
}
.book-map-popup p {
  color: var(--muted);
  margin: 8px 0;
  font-size: 11px;
}
.book-popup-actions {
  display: flex;
  gap: 8px;
}
.book-popup-actions .btn {
  flex: 1;
  font-size: 12px;
}
.book-map-popup[hidden],
.book-map-outside[hidden] {
  display: none;
}
.book-map-timeline {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}
.book-time-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  padding-left: 48px;
}
.book-time-label button,
.book-time-label select {
  color: #b7cbe0;
  font-size: 10px;
  border: 0;
  background: #101923;
  padding: 4px;
  cursor: pointer;
}
.book-time-label button {
  text-align: right;
}
.book-time-chart {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 6px;
}
.book-season-play {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #2470c8;
  color: white;
  flex-shrink: 0;
  cursor: pointer;
}
.book-time-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  flex: 1;
  height: 68px;
  user-select: none;
  touch-action: none;
}
.book-time-bars button {
  height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 2px 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: crosshair;
}
.book-time-bars button i {
  display: block;
  background: #2c3b52;
  border-radius: 4px 4px 0 0;
  width: 100%;
  pointer-events: none;
}
.book-time-bars button[aria-pressed='true'] i {
  background: #5ea8f2;
}
.book-time-bars button[aria-pressed='true'] {
  border-color: #3c6fa3;
}
.book-time-bars small {
  text-align: center;
  font-size: 9px;
  pointer-events: none;
}
.book-sheet-handle,
.book-mini-timeline {
  display: none;
}
@media (max-width: 1100px) and (min-width: 701px) {
  .book-map-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .book-map-tools .segment button {
    padding: 7px;
  }
  .book-map-tools select {
    max-width: 115px;
  }
  .book-map-bases {
    margin-left: 0;
  }
  .book-map-popup {
    bottom: 160px;
  }
  .book-time-label > span {
    display: none;
  }
}
@media (max-width: 700px) {
  body.book-map-active {
    overflow: hidden;
  }
  .map-book .book-heading,
  .map-book .book-quick,
  .map-book #book-active-filters,
  .map-book #bulk-toolbar {
    display: none;
  }
  .map-book .book-search {
    position: fixed;
    z-index: 470;
    top: calc(16px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    margin: 0;
    background: #1b2533;
  }
  .map-book .book-search input {
    min-width: 0;
    font-size: 14px;
  }
  .book-map-layout {
    display: block;
    position: fixed;
    inset: 0 0 calc(var(--mobile-navigation-height, 64px) + env(safe-area-inset-bottom));
    z-index: 430;
  }
  .book-map-panel {
    position: absolute;
    inset: 0;
    height: auto;
    width: 100%;
    border: 0;
    border-radius: 0;
    display: block;
  }
  .book-area-chips {
    position: absolute;
    top: calc(76px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 450;
    border: 0;
    background: transparent;
  }
  .book-area-chips > span {
    display: none;
  }
  .book-area-chips button {
    background: #1b2533;
    padding: 9px 12px;
  }
  .book-map-stage {
    height: 100%;
  }
  .book-map-tools {
    top: calc(132px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    gap: 4px;
  }
  .book-map-tools .segment button {
    font-size: 10px;
    padding: 7px 5px;
  }
  .book-map-tools select {
    font-size: 10px;
    max-width: 100px;
    padding: 7px 4px;
    min-height: 32px;
  }
  .book-map-bases {
    margin-left: 0;
  }
  .book-map-tools .book-map-bases button {
    font-size: 10px;
  }
  .book-map-list {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 34%;
    z-index: 465;
    border-radius: 24px 24px 0 0;
    width: 100%;
    background: #1b2533;
    transition: height 0.22s;
    box-shadow: 0 -10px 35px #0003;
  }
  .book-map-list[data-sheet='expanded'] {
    height: 76%;
  }
  .book-sheet-handle {
    display: flex;
    width: 100%;
    border: 0;
    height: 20px;
    flex-shrink: 0;
    background: transparent;
    align-items: center;
    justify-content: center;
    touch-action: none;
    cursor: ns-resize;
  }
  .book-sheet-handle i {
    width: 40px;
    height: 5px;
    border-radius: 4px;
    background: #3d4b60;
  }
  .book-map-list header {
    padding: 4px 16px 8px;
    border: 0;
  }
  .book-map-count h2 {
    font-size: 16px;
  }
  .book-map-list[data-sheet='peek'] .book-follow,
  .book-map-list[data-sheet='peek'] .book-map-review {
    display: none;
  }
  .book-map-list[data-sheet='expanded'] .book-follow {
    margin: 8px 0;
  }
  .book-map-review {
    font-size: 10px;
    padding: 7px;
  }
  .book-mini-timeline {
    display: block;
    padding: 0 16px 6px;
    border-bottom: 1px solid var(--border);
  }
  .book-mini-timeline .book-time-label {
    padding-left: 0;
  }
  .book-mini-timeline .book-time-label > span {
    display: none;
  }
  .book-mini-timeline .book-time-bars,
  .book-mini-timeline .book-time-bars button {
    height: 38px;
  }
  .book-mini-timeline .book-time-bars button i {
    max-height: 30px;
  }
  .book-mini-timeline .book-time-bars small {
    display: none;
  }
  .book-mini-timeline .book-season-play {
    height: 36px;
    width: 36px;
  }
  .book-map-timeline {
    display: none;
  }
  .book-map-list .compact-row {
    padding: 7px 8px;
    margin: 1px 8px;
  }
  .book-map-list .compact-select {
    grid-template-columns: 30px minmax(0, 1fr) 84px;
    gap: 8px;
  }
  .book-map-list .book-map-flight-actions {
    display: none;
  }
  .book-map-legend {
    bottom: calc(34% + 20px);
    left: 12px;
    max-width: 195px;
    font-size: 9px;
    gap: 4px;
    padding: 7px;
  }
  .book-color-scale {
    width: 170px;
  }
  .book-map-outside {
    bottom: calc(34% + 100px);
    right: 8px;
    max-width: 150px;
    padding: 8px;
  }
  .book-map-popup {
    bottom: calc(34% + 115px);
  }
  .book-map-panel .leaflet-bottom.leaflet-right {
    bottom: calc(34% + 8px);
  }
  .book-map-panel .leaflet-control-attribution {
    position: fixed;
    bottom: calc(var(--mobile-navigation-height, 64px) + env(safe-area-inset-bottom));
    right: 0;
    font-size: 7px;
    z-index: 480;
  }
  body.book-map-active #navigation {
    z-index: 480;
  }
}
.book-map-mobile-views {
  display: none;
}
@media (max-width: 700px) {
  .book-map-list[data-sheet='expanded'] .book-map-mobile-views {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
  }
  .book-map-mobile-views button {
    background: #263549;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    padding: 5px 12px;
    font-size: 11px;
  }
  .book-map-mobile-views button:last-child {
    color: #f0b44c;
    margin-left: auto;
  }
  .book-map-list[data-sheet='peek'] .book-map-row-name .book-record {
    display: none;
  }
}
.book-map-list .date-block {
  background: transparent;
  border: 0;
  padding: 0;
}
.book-follow input {
  appearance: none;
  width: 36px;
  height: 22px;
  border: 0;
  border-radius: 20px;
  background: #3c4b60;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.book-follow input:checked {
  background: #2470c8;
}
.book-follow input::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: white;
  transition: left 0.15s;
}
.book-follow input:checked::after {
  left: 17px;
}
.book-map-panel .leaflet-control-zoom a {
  background: #101923;
  color: #e8edf4;
  border-color: #2c3849;
}
.book-map-panel .leaflet-control-zoom a:hover {
  background: #263549;
}
.book-map-panel .leaflet-bar {
  border: 1px solid #2c3849;
  border-radius: 10px;
  overflow: hidden;
}
.book-map-layer-toggle {
  display: none;
}
@media (max-width: 700px) {
  .map-book .book-search {
    right: 66px;
  }
  .map-book .book-search input {
    flex: 1;
    width: 0;
  }
  .map-book .book-search-key {
    display: none;
  }
  .book-map-layer-toggle {
    display: block;
    position: fixed;
    z-index: 475;
    top: calc(16px + env(safe-area-inset-top));
    right: 12px;
    width: 44px;
    height: 54px;
    border: 1px solid #2c3849;
    border-radius: 14px;
    background: #1b2533;
    color: #cfe4fa;
    font-size: 30px;
    cursor: pointer;
  }
  .book-map-tools {
    display: none;
    background: #101923ed;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .book-map-tools-open .book-map-tools {
    display: flex;
  }
  .book-map-list[data-sheet='peek'] .book-map-legend {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .book-map-list {
    transition: none;
  }
}
.book-map-management {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding: 6px 12px;
}
.book-map-management .collection-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}
.book-map-management .collection-actions .btn {
  font-size: 10px;
  padding: 5px 7px;
  min-height: 28px;
}
.book-map-management .bulk-toolbar {
  padding: 8px;
  margin: 8px 0;
}
.book-map-management .bulk-toolbar .btn {
  font-size: 10px;
}
.book-map-list .compact-row.selectable {
  position: relative;
  padding-left: 34px;
}
.book-map-list .compact-row > .flight-selection {
  position: absolute;
  top: 17px;
  left: 8px;
  margin: 0;
}
@media (max-width: 700px) {
  .book-map-list[data-sheet='peek'] .book-map-management {
    display: none;
  }
  .book-map-list[data-sheet='expanded'] .book-map-management {
    display: block;
  }
  .book-map-management #bulk-toolbar {
    display: block;
  }
  .book-map-stage:has(.geo-map[data-overview='true']) .book-map-legend {
    display: none;
  }
}
/* Statistics 09b: season story and charts use the same journal data. */
.development {
  gap: 20px;
}
.development h2 {
  font-size: 18px;
}
.development .development-heading h1 {
  font-size: 34px;
}
.development-selectors > select,
.time-controls select {
  height: 40px;
  border-radius: 10px;
  background: var(--solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0 10px;
  max-width: 100%;
  min-width: 0;
}
.stat-hero {
  border: 1px solid #2c4c70;
  border-radius: 22px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  background: radial-gradient(ellipse at top left, #1f3a5c, var(--solid) 80%);
}
.stat-hero h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 12px 0;
}
.stat-hero p {
  color: var(--muted);
  line-height: 1.6;
}
.record-badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid #6a5328;
  background: #2a2214;
  color: #f0b44c;
  font-size: 12px;
  border-radius: 999px;
}
.record-comparison {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}
.record-comparison:last-child {
  margin-bottom: 0;
}
.record-comparison > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.record-comparison > div:first-child small {
  color: var(--ok);
}
.record-comparison > div:last-child small:first-child {
  color: #dca63f;
}
.record-bar {
  height: 12px;
  background: var(--panel);
  position: relative;
  border-radius: 8px;
}
.record-bar i {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #2470c8, #5ea8f2);
}
.record-bar b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #f0b44c;
}
.development-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.development-metric {
  padding: 16px;
  gap: 8px;
}
.development-metric strong {
  font-size: 25px;
  line-height: 1.35;
}
.development-metric > div:last-child {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}
.development-metric small {
  font-size: 11px;
}
.development-metric .development-delta {
  font-size: 11px;
  padding: 2px 6px;
}
.stat-spark {
  width: 64px;
  height: 28px;
  flex-shrink: 0;
  color: var(--accent);
}
.stat-practice {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(150px, 0.8fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.practice-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ok);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 3px 8px;
  margin: 0 0 0 8px;
}
.practice-numbers {
  display: flex;
  gap: 24px;
  margin: 12px 0;
}
.practice-numbers strong {
  display: block;
  font:
    600 32px/1.3 'Geist Mono',
    monospace;
}
.practice-numbers small {
  display: block;
}
.practice-heatmap {
  display: grid;
  grid-template-rows: repeat(7, 16px);
  grid-auto-flow: column;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 0;
}
.heat-cell {
  border-radius: 4px;
  background: var(--panel);
}
.heat-one {
  background: #3979b4;
}
.heat-many {
  background: #5ea8f2;
}
.heat-today {
  outline: 2px solid #f0b44c;
  outline-offset: -2px;
}
.heat-cell:focus-visible {
  outline: 2px solid var(--accent);
}
.practice-advice {
  font-size: 13px;
  color: var(--muted);
}
.practice-advice strong {
  color: var(--ok);
}
.practice-advice p {
  margin-top: 10px;
  line-height: 1.6;
}
.season-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.season-summary > div {
  min-width: 0;
}
.season-summary small {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.5;
  font-size: 12px;
  color: var(--muted);
}
.season-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.season-summary .season-total strong {
  color: var(--accent);
  font-size: 26px;
}
.season-summary span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.season-key {
  display: inline-block;
  width: 18px;
  height: 0;
  flex-shrink: 0;
  border-top: 2px dashed var(--muted);
}
.season-key.current {
  border-top: 3px solid var(--accent);
}
.season-key.recordline {
  border-color: #dca63f;
}
.season-chart-scroll {
  overflow-x: auto;
}
.season-chart-scroll .season-progress {
  min-width: 480px;
  margin-top: 12px;
  overflow: hidden;
}
.season-progress .season-future {
  fill: var(--muted);
  opacity: 0.06;
}
.season-progress .season-point {
  fill: var(--accent);
  stroke: var(--solid);
  stroke-width: 1.5;
}
.season-progress .season-point-last {
  stroke-width: 2;
}
.season-progress .season-month-current {
  fill: var(--text);
  font-weight: 700;
}
.season-progress .season-month-future {
  opacity: 0.5;
}
.season-chart-notes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.season-record-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #dca63f;
  font-weight: 600;
}
.season-record-note i {
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}
.season-future-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.season-future-note:before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--muted);
  opacity: 0.15;
  border-radius: 2px;
}
[data-theme='light'] .season-record-note {
  color: #805d0e;
}
@media (max-width: 600px) {
  .season-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .season-summary .season-total {
    grid-column: 1/-1;
  }
  .season-summary .season-total strong {
    font-size: 26px;
  }
  .season-summary strong {
    font-size: 18px;
  }
  .season-chart-notes {
    font-size: 11px;
  }
}

.stat-season-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
}
.stat-season,
.stat-history,
.stat-time,
.stat-distribution,
.stat-records,
.stat-wings {
  padding: 22px;
  min-width: 0;
}
.stat-season > header,
.stat-history > header,
.stat-time > header,
.development-sites > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.season-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
  overflow: visible;
}
.season-svg text {
  fill: var(--muted);
  font:
    10px 'Geist Mono',
    monospace;
}
.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.season-fill {
  fill: var(--accent);
  opacity: 0.12;
}
.season-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linejoin: round;
}
.season-svg .baseline {
  stroke: var(--muted);
  stroke-dasharray: 4 5;
}
.season-svg .recordline {
  stroke: #dca63f;
  stroke-dasharray: 4 5;
}
.season-svg text.baseline,
.season-svg text.recordline {
  stroke: none;
}
.season-svg text.recordline,
.season-svg .record-label {
  fill: #dca63f;
}
.record-dot {
  stroke: #f0b44c;
  fill: none;
  stroke-width: 2;
}
.stat-insight {
  border-radius: 12px;
  background: var(--panel);
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.stat-insight strong {
  color: var(--text);
}
.stat-history .segment,
.time-controls .segment {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.stat-history .segment button,
.time-controls .segment button {
  font-size: 12px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
}
.history-column {
  flex: 1 0 38px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  min-width: 0;
}
.history-column > span {
  font:
    10px 'Geist Mono',
    monospace;
  white-space: nowrap;
}
.history-column i {
  display: block;
  width: 100%;
  max-width: 48px;
  height: var(--height);
  min-height: 2px;
  border-radius: 5px;
  background: #2e4d73;
}
.history-column.active i {
  background: var(--accent);
}
.history-column small {
  font-size: 11px;
}
.history-chart {
  gap: 14px;
  min-width: calc(var(--years) * 58px);
  height: 245px;
}
.monthly-chart {
  min-width: 360px;
  gap: 8px;
}
.monthly-chart .year-column {
  flex-basis: 22px;
}
.monthly-chart .year-column i {
  max-width: 24px;
  background: #3979b4;
}
.monthly-chart .active i {
  background: var(--accent);
}
.history-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.history-footer .btn {
  font-size: 12px;
}
.development-bottom {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
}
.development-site {
  grid-template-columns: minmax(100px, 1.3fr) minmax(40px, 1.4fr) auto auto;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.development-site .site-bar {
  height: 10px;
}
.development-site .site-bar i {
  background: var(--accent);
}
.development-site .btn.text {
  font-size: 13px;
}
.stat-equipment {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.stat-wing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  width: 100%;
  border: 0;
  color: var(--text);
  background: none;
  text-align: left;
  min-width: 0;
  cursor: pointer;
}
.stat-wing > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.stat-wing strong,
.stat-wing small {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.stat-wing small {
  font-size: 12px;
  margin-top: 4px;
}
.stat-wing > span:last-child {
  text-align: right;
}
.wing-symbol {
  padding: 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
}
.development-achievements .next-achievement {
  border: 0;
  padding: 0;
  background: none;
}
.development-achievements .next-ring {
  width: 70px;
  height: 70px;
}
.development-achievements details > summary {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}
.development-badges {
  margin-top: 16px;
}
.development-achievements .next-achievement h3 {
  font-size: 17px;
}
.time-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.stat-time-body,
.stat-distribution {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
}
.stat-time-body {
  margin-top: 16px;
}
.stat-time .stat-insight {
  border: 1px solid var(--ok);
  background: var(--accent-soft);
}
.stat-time .stat-insight > strong {
  display: block;
  font:
    600 28px 'Geist Mono',
    monospace;
  margin: 6px 0;
}
.stat-time .stat-insight > small {
  color: var(--ok);
}
.stat-time-body p.muted {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.hour-averages {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  overflow-x: auto;
  margin-top: 12px;
}
.hour-averages > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 28px;
}
.hour-averages i {
  display: block;
  min-height: 2px;
  width: 100%;
  background: #3979b4;
  border-radius: 4px;
}
.hour-averages small {
  font-size: 9px;
  text-align: center;
}
.stat-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stat-facts > div {
  padding: 14px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 0;
}
.stat-facts strong {
  display: block;
  font:
    600 22px 'Geist Mono',
    monospace;
  margin-top: 4px;
}
.duration-bars {
  display: flex;
  gap: 16px;
  height: 210px;
  align-items: flex-end;
}
.duration-bars > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.duration-stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 65px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  min-height: 2px;
  background: var(--panel);
}
.duration-stack i {
  display: block;
  width: 100%;
}
.stat-distribution p.muted {
  font-size: 12px;
  margin-top: 6px;
}
.stat-distribution .stat-facts {
  margin-top: 0;
}
.stat-records h2 {
  margin-bottom: 14px;
}
.stat-records .stat-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}
.stat-records .development-record {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
  min-width: 0;
}
.stat-records .development-record > span:first-child {
  color: var(--text);
}
.stat-records .stat-facts strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}
[data-theme='light'] .stat-hero {
  background: radial-gradient(ellipse at top left, #dfedfc, var(--solid) 80%);
  border-color: #b7cee5;
}
[data-theme='light'] .record-badge {
  background: #fff4d9;
  color: #805d0e;
  border-color: #e0c78b;
}
[data-theme='light'] .record-comparison > div:last-child small:first-child,
[data-theme='light'] .season-svg .record-label,
[data-theme='light'] .season-svg text.recordline {
  color: #805d0e;
  fill: #805d0e;
}
@media (max-width: 1200px) {
  .development-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat-practice {
    grid-template-columns: minmax(0, 1.2fr) minmax(150px, 1fr);
  }
  .practice-advice {
    grid-column: 1/-1;
  }
}
@media (max-width: 900px) {
  .stat-season-grid,
  .development-bottom,
  .stat-time-body,
  .stat-distribution {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat-hero {
    gap: 24px;
    padding: 22px;
  }
  .stat-hero h2 {
    font-size: 24px;
  }
  .stat-records .stat-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .development-site {
    grid-template-columns: minmax(100px, 1.3fr) minmax(40px, 1fr) auto auto;
  }
}
@media (max-width: 600px) {
  .development-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .development-metric {
    padding: 14px;
  }
  .development-metric strong {
    font-size: 22px;
  }
  .development-metric > div:last-child {
    flex-wrap: wrap;
  }
  .stat-hero,
  .stat-practice {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat-hero {
    padding: 18px;
  }
  .stat-practice,
  .stat-season,
  .stat-history,
  .stat-time,
  .stat-distribution,
  .stat-records,
  .stat-wings {
    padding: 16px;
  }
  .practice-heatmap {
    grid-template-rows: repeat(7, 20px);
  }
  .stat-practice {
    gap: 18px;
  }
  .development-site {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }
  .development-site .btn {
    grid-column: 1/-1;
  }
  .stat-time > header {
    align-items: flex-start;
  }
  .time-controls {
    width: 100%;
  }
  .time-controls .segment {
    flex-wrap: wrap;
  }
  .time-controls select {
    width: 100%;
  }
  .duration-bars {
    gap: 8px;
  }
  .duration-bars small {
    font-size: 10px;
  }
  .stat-history .segment {
    flex-wrap: wrap;
  }
  .development-selectors > select {
    width: 100%;
  }
  .stat-spark {
    width: 50px;
  }
  .stat-facts strong {
    font-size: 20px;
  }
  .stat-history .history-footer small {
    line-height: 1.6;
  }
  .stat-wing {
    flex-wrap: wrap;
  }
  .stat-wing > span:last-child {
    margin-left: auto;
  }
  .development-record {
    flex-wrap: wrap;
  }
}

/* R08 / R09: the pilot point is the origin in every replay renderer. */
.replay-pilot-marker {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 8;
  pointer-events: none;
}
.replay-pilot-art {
  position: absolute;
  display: block;
  transform: translate(-50%, -71.875%);
  overflow: visible;
}
.replay-pilot-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.replay-marker {
  background: transparent;
  border: 0;
}
.replay-marker > .replay-pilot-svg {
  display: block;
}
.replay-pilot-label {
  position: absolute;
  left: 32px;
  bottom: 8px;
  display: block;
  white-space: pre;
  font:
    600 11px/1.5 'Geist Mono',
    monospace;
  color: #fff;
  background: #0b1018e8;
  border-radius: 9px;
  padding: 7px 10px;
  box-shadow: 0 2px 7px #0003;
}
.replay-pilot-lot {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}
.replay-pilot-lot[hidden],
.replay-pilot-marker[hidden] {
  display: none !important;
}
.replay-ground-anchor {
  width: 0;
  height: 0;
  pointer-events: none;
}
.replay-pause-ring {
  animation: replay-pilot-pulse 2s ease-in-out infinite;
  transform-origin: 32px 38px;
}
@keyframes replay-pilot-pulse {
  50% {
    opacity: 0.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  .replay-pause-ring {
    animation: none;
  }
}
.replay-endpoint-symbol {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.replay-endpoint-symbol svg {
  display: block;
  width: 100%;
  height: 100%;
}
.mapbox-endpoint {
  align-items: center;
}
.flight-endpoint {
  background: transparent;
  border: 0;
}
.pj-map-pin.flight-endpoint > .replay-endpoint-symbol {
  width: 32px;
  height: 32px;
  border: 0;
  box-shadow: none;
}
.mapbox-endpoint > .replay-endpoint-symbol {
  width: 32px;
  height: 32px;
}
.mapbox-endpoint-label {
  left: 25px;
}
.terrain-marker-label:empty {
  display: none;
}
.pj-map-pin.flight-endpoint > .replay-endpoint-symbol,
.mapbox-endpoint > .replay-endpoint-symbol {
  width: var(--replay-endpoint-size, 32px);
  height: var(--replay-endpoint-size, 32px);
}
.replay-endpoints-distant .replay-endpoint-symbol .replay-site-start path,
.replay-endpoints-distant .replay-endpoint-symbol .replay-site-landing circle:nth-child(n + 3) {
  display: none;
}
.pj-map-pin > .replay-endpoint-symbol {
  width: var(--replay-endpoint-size, 32px);
  height: var(--replay-endpoint-size, 32px);
  border: 0;
  box-shadow: none;
}

/* Journal 12d / 12e: one sheet with a quiet editor and a separate moment rail. */
.flight-journal-page {
  grid-template-columns: minmax(0, 2.15fr) minmax(300px, 1fr);
  gap: 28px;
  background: var(--journal-bg);
}
.flight-journal-page .journal-paper,
.journal-paper {
  border: 1px solid var(--border);
  background: var(--journal-surface);
  border-radius: 20px;
  overflow: visible;
  margin: 0;
  color: var(--text);
}
.journal-paper .journal-editor-head {
  border: 0;
  padding: 16px 20px;
  color: var(--text);
  gap: 16px;
}
.journal-save-status {
  color: #82d7aa;
  font-size: 12px;
}
.journal-editor-modes {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--journal-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: none;
}
.journal-editor-modes button {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 7px !important;
  white-space: nowrap;
}
.journal-editor-modes button[aria-pressed='true'] {
  background: var(--accent-soft) !important;
}
.journal-paper .journal-entry-text {
  position: relative;
  padding: 28px 32px;
  min-height: 500px;
}
.journal-paper .journal-title-input,
.journal-paper .journal-read-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 34px !important;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 22px;
  width: 100%;
  color: var(--text);
}
.journal-paper .journal-title-input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}
.journal-rich-editor {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 140px;
  outline: none;
  color: var(--text);
}
.journal-rich-editor:focus-visible {
  box-shadow: inset 2px 0 var(--accent);
  padding-left: 8px;
}
.journal-rich-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-style: italic;
  pointer-events: none;
}
.journal-rich-editor p,
.journal-rich-editor div {
  margin: 0 0 12px;
}
.journal-rich-editor h2 {
  font-size: 28px;
}
.journal-rich-editor blockquote {
  border-left: 3px solid var(--accent);
  margin: 16px 0;
  padding-left: 18px;
  color: var(--muted);
}
.journal-paper .journal-read-text {
  font-size: 22px;
}
.journal-paper [hidden],
.journal-paper .detail-notes[hidden],
.journal-selection-tools[hidden],
.journal-block-menu[hidden] {
  display: none !important;
}
.journal-paper .journal-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--journal-inset);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 16px;
  font-size: 13px;
}
.journal-toolbar button {
  padding: 8px;
  min-height: 34px;
}
.journal-toolbar button:nth-child(1) {
  font-weight: 700;
}
.journal-toolbar button:nth-child(2) {
  font-style: italic;
}
.journal-toolbar small {
  color: var(--muted);
  margin-left: auto;
  font-size: 11px;
}
.journal-selection-tools {
  position: absolute;
  z-index: 5;
  display: flex;
  padding: 5px;
  background: var(--solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px #0004;
  gap: 5px;
}
.journal-selection-tools button {
  padding: 6px 10px;
}
.journal-block-menu {
  position: absolute;
  z-index: 6;
  width: 340px;
  max-width: calc(100% - 40px);
  top: 180px;
  left: 32px;
  padding: 8px;
  background: var(--solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px #0004;
  display: grid;
  gap: 3px;
}
.journal-block-menu small {
  font: 700 10px system-ui;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 10px;
}
.journal-block-menu button {
  padding: 12px;
  border-radius: 10px;
}
.journal-block-menu button:hover,
.journal-block-menu button:focus-visible {
  background: var(--accent-soft) !important;
}
.journal-moment-chip {
  display: inline-block;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font:
    13px/1.5 system-ui,
    sans-serif;
  padding: 4px 10px;
  cursor: pointer;
  white-space: normal;
}
.journal-moment-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.journal-question-block {
  position: relative;
  border-left: 3px solid #3c6fa3;
  padding: 8px 20px;
  margin: 16px 0;
}
.journal-question-block > strong {
  font:
    600 13px system-ui,
    sans-serif;
  color: var(--accent);
}
.journal-question-block > button {
  position: absolute;
  right: 0;
  top: 0;
  padding: 4px 8px;
  color: var(--muted) !important;
}
.journal-question-block textarea {
  width: 100%;
  min-height: 70px;
  padding: 8px 0;
  border: 0;
  background: none;
  font:
    italic 20px/1.6 Georgia,
    serif;
  resize: vertical;
  color: var(--text);
}
.journal-question-block textarea::placeholder {
  color: var(--muted);
}
.journal-question-block p {
  font:
    20px/1.6 Georgia,
    serif;
  white-space: pre-wrap;
  margin: 8px 0;
}
.journal-paper .journal-starter {
  padding: 0;
  background: transparent;
  border: 0;
  margin: 12px 0 22px;
}
.journal-starter p {
  font-size: 13px;
  color: var(--muted);
}
.journal-starter .btn {
  border: 1px solid #3c6fa3;
  border-radius: 999px;
  color: var(--accent);
  background: var(--journal-inset);
  font-size: 13px;
  padding: 10px 14px;
  margin: 4px 5px 4px 0;
}
.journal-empty-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 32px 0;
  font-weight: 600;
}
.journal-carried {
  border: 1px solid var(--border);
  background: var(--journal-inset);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 20px;
}
.journal-carried p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
.journal-carried .journal-tags {
  margin: 0;
}
.journal-carried .journal-tags span {
  background: #1e3a2c;
  color: #8fddb0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}
.journal-carried button {
  border: 1px dashed #3c6fa3 !important;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent) !important;
}
.journal-paper .journal-tag-area {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.journal-tag-area .journal-tags {
  display: inline-flex;
  vertical-align: middle;
}
.journal-tag-area > input {
  width: 170px;
  max-width: 100%;
  border: 1px dashed #3c6fa3;
  border-radius: 999px;
  padding: 8px 12px;
  background: none;
  font-size: 13px;
}
.journal-paper .journal-tags button {
  color: var(--accent) !important;
  border-color: var(--border) !important;
  background: var(--accent-soft) !important;
}
.journal-paper .journal-suggestions {
  display: flex;
  margin: 0;
  align-items: center;
}
.journal-suggestions small {
  color: var(--muted);
  font-size: 11px;
}
.journal-paper .journal-suggestions button {
  font-size: 11px;
  background: transparent !important;
}
.journal-paper .journal-paper-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  background: var(--journal-inset);
  border-radius: 0 0 20px 20px;
  gap: 12px;
}
.journal-paper-footer .journal-word-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.journal-paper-footer .journal-delete-text {
  color: #ff8585 !important;
  padding: 8px;
}
.journal-paper-footer .primary {
  background: #2470c8;
  color: #fff !important;
  border-color: #2470c8;
  padding: 12px 20px;
  font-weight: 700;
}
.journal-privacy {
  position: relative;
  font-size: 12px;
}
.journal-privacy summary {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
}
.journal-privacy p {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 230px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--solid);
  border-radius: 12px;
  z-index: 4;
}
.journal-paper .journal-media-strip {
  padding: 0 14px !important;
  margin: 0 !important;
}
.journal-paper .flight-photos > summary,
.journal-paper .flight-photos > .dialog-hint {
  display: none;
}
.journal-paper .photo-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  align-items: stretch;
}
.journal-paper .photo-grid figure,
.journal-paper .photo-grid .journal-track {
  flex: 0 0 170px;
  width: 170px;
  height: 190px;
  min-height: 190px;
  max-height: 190px;
  border-radius: 14px;
  overflow: hidden;
}
.journal-paper .photo-grid figure:first-child {
  flex-basis: calc(45% - 8px);
  min-width: 220px;
}
.journal-paper .photo-grid figure .photo-open {
  height: 100%;
  width: 100%;
  padding: 0;
}
.journal-paper .photo-grid img,
.journal-paper .photo-grid video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
}
.journal-paper .photo-grid .journal-track .cockpit-thumbnail {
  height: 100%;
  min-height: 0;
}
.journal-add-media {
  flex: 0 0 100px;
  border: 2px dashed #3c6fa3 !important;
  border-radius: 14px;
  padding: 14px;
  color: var(--accent) !important;
  text-align: center !important;
  font-size: 13px;
  white-space: normal;
}
.journal-cover-label,
.journal-media-time {
  position: absolute;
  left: 10px;
  padding: 4px 9px;
  background: #111c2bd9;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  pointer-events: none;
}
.journal-cover-label {
  top: 10px;
  color: #f0b44c;
}
.journal-media-time {
  bottom: 10px;
}
.journal-paper .photo-remove {
  right: 8px;
  bottom: 8px;
  top: auto;
  width: 28px;
  height: 28px;
  background: #111c2bd9 !important;
  border-radius: 50%;
}
.journal-detail-sidebar .journal-timeline {
  margin: 0;
  background: var(--journal-surface);
}
.journal-timeline > .dialog-hint {
  margin: 0 0 12px;
  font-size: 12px;
}
.journal-moment-row {
  display: grid;
  grid-template-columns: 75px 10px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}
.journal-moment-row time {
  font:
    12px 'Geist Mono',
    monospace;
  color: var(--muted);
}
.journal-moment-row strong {
  font-size: 13px;
}
.journal-moment-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.journal-moment-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5eabf7;
}
.journal-moment-dot.endpoint {
  background: #50bf8a;
}
.journal-moment-dot.media {
  background: #f0b44c;
}
.journal-timeline .journal-moment-row button {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  text-align: center;
  color: var(--accent);
  margin: 0;
}
.journal-timeline .journal-moment-row button:before,
.journal-timeline > .btn:before {
  display: none;
}
.journal-timeline > .btn {
  display: block;
  border: 0;
  margin: 10px 0 0;
  background: var(--accent-soft);
  text-align: center;
  padding: 12px;
  color: var(--accent);
  font-size: 13px;
  border-radius: 10px;
}
.journal-detail-sidebar .journal-idea {
  background: var(--journal-surface) !important;
}
.journal-paper .journal-extras {
  font-size: 13px;
}
.journal-extras textarea:read-only,
.journal-extras input:read-only {
  background: transparent;
  border: 0;
  padding: 0;
  resize: none;
}
.journal-paper:not(.journal-editing) .journal-extras > a,
.journal-paper:not(.journal-editing) .journal-extras > .dialog-hint {
  display: none;
}
.journal-empty .journal-media-strip:has(.photo-grid:not(:has(figure))) {
  display: none;
}
.journal-empty .journal-tag-area {
  border: 0;
}
.journal-empty .journal-entry-text {
  min-height: 480px;
}
@media (max-width: 1050px) {
  .flight-journal-page {
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
    gap: 18px;
  }
  .journal-paper .journal-entry-text {
    padding: 24px;
  }
  .journal-moment-row {
    grid-template-columns: 64px 8px minmax(0, 1fr) 32px;
    gap: 7px;
  }
}
@media (max-width: 900px) {
  .flight-journal-page {
    grid-template-columns: minmax(0, 1fr);
  }
  .journal-detail-sidebar {
    grid-template-columns: 1fr 1fr;
  }
  .journal-detail-sidebar .journal-timeline {
    grid-row: span 2;
  }
}
@media (max-width: 600px) {
  .flight-journal-page {
    padding: 16px 12px;
  }
  .journal-detail-sidebar {
    grid-template-columns: 1fr;
  }
  .journal-paper .journal-editor-head {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .journal-save-status {
    flex: 1;
    font-size: 11px;
  }
  .journal-editor-modes button {
    padding: 8px;
    font-size: 12px;
  }
  .journal-paper .journal-entry-text {
    padding: 20px 18px;
    min-height: 380px;
  }
  .journal-paper .journal-title-input,
  .journal-paper .journal-read-title {
    font-size: 27px !important;
  }
  .journal-rich-editor,
  .journal-paper .journal-read-text {
    font-size: 20px;
  }
  .journal-paper .photo-grid figure,
  .journal-paper .photo-grid .journal-track {
    flex-basis: 130px;
    width: 130px;
    height: 145px;
    min-height: 145px;
    max-height: 145px;
  }
  .journal-paper .photo-grid figure:first-child {
    min-width: 180px;
    flex-basis: 180px;
  }
  .journal-add-media {
    flex-basis: 90px;
  }
  .journal-empty-label {
    padding: 4px 18px 0;
  }
  .journal-paper .journal-paper-footer {
    padding: 12px;
  }
  .journal-toolbar small {
    width: 100%;
    margin: 4px;
  }
  .journal-block-menu {
    left: 18px;
    max-width: calc(100% - 36px);
  }
  .journal-paper-footer .journal-word-count {
    font-size: 11px;
  }
  .journal-privacy summary {
    padding: 8px;
  }
  .journal-paper-footer .primary {
    padding: 10px 14px;
  }
}
@media (min-width: 601px) {
  .journal-paper .photo-grid:not(:has(figure:nth-of-type(3))) figure {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }
  .journal-paper .photo-grid:not(:has(figure:nth-of-type(3))) figure:first-child {
    flex: 2 1 0;
    min-width: 0;
  }
  .journal-paper .photo-grid:not(:has(figure:nth-of-type(3))) .journal-track {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }
}
.journal-paper:not(.journal-editing) .journal-extras label:not([hidden]) {
  display: grid !important;
}
.journal-paper .journal-paper-footer > .btn {
  display: inline-flex !important;
}
.journal-paper #flight-note:not([hidden]) {
  display: block;
  min-height: 140px;
  padding: 12px 18px !important;
}
.journal-paper .detail-notes:not([hidden]) [data-save-note] {
  margin: 0 18px 18px;
}
.journal-moment-hint:before {
  content: ' Was war in diesem Moment los? …';
  color: var(--muted);
  font:
    italic 20px/1.6 Georgia,
    serif;
  pointer-events: none;
}
.flight-detail-side .journal-paper .photo-remove {
  top: 8px;
  bottom: auto;
}

/* Flight detail 14: orientation, views and actions; continuous sidebar. */
.detail-dialog .dialog-head {
  --flight-header-control-height: 28px;
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 16px;
  align-items: center;
}
.detail-dialog .dialog-head > div:first-child {
  min-width: 0;
}
.detail-dialog .dialog-head h2 {
  font-size: 19px;
}
.detail-dialog .dialog-head p {
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}
.flight-title-type {
  font-size: 12px;
  color: #85d7ac;
  font-weight: 600;
}
.detail-dialog .flight-header-actions {
  justify-self: end;
  align-items: center;
  gap: 6px;
}
.detail-dialog .flight-header-actions .btn {
  font-size: 12px;
  min-height: var(--flight-header-control-height);
  height: var(--flight-header-control-height);
  padding: 3px 8px;
  border-radius: 6px;
  gap: 5px;
}
.detail-dialog .flight-detail-actions > summary {
  width: var(--flight-header-control-height);
  height: var(--flight-header-control-height);
  border-radius: 6px;
}
.detail-dialog .flight-nav-group {
  display: flex;
  flex-wrap: nowrap;
}
.detail-dialog .flight-nav-group .flight-nav {
  width: var(--flight-header-control-height);
  min-height: var(--flight-header-control-height);
  height: var(--flight-header-control-height);
  font-size: 18px;
}
.detail-dialog .dialog-head .flight-close {
  width: var(--flight-header-control-height);
  min-width: var(--flight-header-control-height);
  min-height: var(--flight-header-control-height);
  height: var(--flight-header-control-height);
  border-radius: 6px;
  font-size: 19px;
  line-height: 1;
  padding: 0;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
}
.detail-dialog .flight-view-tabs {
  margin: 0;
  justify-self: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
}
.flight-view-tabs button[aria-pressed='true'] {
  background: #2470c8;
}
.detail-dialog .flight-view-tabs button {
  min-height: var(--flight-header-control-height);
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}
.detail-dialog .dialog-head .flight-weather img {
  width: 18px;
  height: 18px;
}
/* Keep native buttons and the summary control identical, including their box model. */
.detail-dialog
  .dialog-head
  :is(
    .flight-view-tabs > button,
    .flight-header-actions > .btn,
    .flight-nav-group > .flight-nav,
    .flight-detail-actions > summary,
    .flight-close
  ) {
  --button-height: var(--flight-header-control-height);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--flight-header-control-height);
  min-height: var(--flight-header-control-height);
  max-height: var(--flight-header-control-height);
  padding-block: 0;
  margin-block: 0;
  line-height: 1;
}
.detail-dialog
  .dialog-head
  :is(.flight-detail-actions > summary, .flight-close, .flight-nav-group > .flight-nav) {
  width: var(--flight-header-control-height);
  min-width: var(--flight-header-control-height);
  padding: 0;
}
.detail-dialog .flight-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 12px 24px;
  margin-bottom: 20px;
}
.flight-summary > div {
  display: flex;
  gap: 7px;
  align-items: baseline;
  padding: 0;
  border: 0;
}
.flight-summary small {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.flight-summary strong {
  font-size: 18px;
  margin: 0;
}
.flight-detail-side .flight-detail-tabpanel {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.flight-detail-side .flight-detail-tabpanel[hidden] {
  display: none !important;
}
.flight-detail-side .detail-panel {
  position: relative;
  padding-bottom: 14px;
}
.flight-detail-side .flight-card-title {
  padding-bottom: 10px;
}
.flight-replay-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.flight-data-card {
  container-type: inline-size;
  position: relative;
  margin: 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.flight-data-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.flight-data-header h3 {
  margin: 0;
  font-size: 17px;
}
.flight-data-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--accent);
}
.flight-data-edit svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flight-data-edit-all {
  width: auto;
  height: 34px;
  padding: 0 12px;
  gap: 6px;
  border-color: var(--border);
  color: var(--text);
  font-size: 13px;
}
.flight-data-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.65fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  margin-bottom: 16px;
}
.flight-data-card .flight-route-endpoint {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.flight-route-endpoint h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.flight-route-endpoint h4::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 3px solid #5cc48a;
  border-radius: 50%;
  background: #5cc48a;
  flex-shrink: 0;
}
.flight-data-card .flight-route-endpoint.is-landing {
  align-items: flex-end;
  text-align: right;
}
.flight-route-endpoint.is-landing h4::before {
  order: 1;
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  transform: rotate(45deg);
}
.flight-route-time,
.flight-route-place {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: inherit;
  color: var(--text);
  overflow-wrap: anywhere;
}
.flight-route-time {
  font:
    600 26px/1.1 'IBM Plex Mono',
    monospace;
}
.flight-route-place {
  font-size: 15px;
  font-weight: 600;
}
.flight-route-time:hover,
.flight-route-place:hover {
  color: var(--accent);
}
.flight-data-card .flight-route-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.flight-route-height {
  color: var(--text);
  font:
    14px 'IBM Plex Mono',
    monospace;
  margin-top: 4px;
}
.flight-route-connection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
}
.flight-route-connection strong {
  font-size: 18px;
}
.flight-route-connection small {
  font-size: 12px;
}
.flight-route-arrow {
  position: relative;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #5cc48a, var(--accent));
  margin: 4px 0;
}
.flight-route-arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -5px;
  border-left: 8px solid var(--accent);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.flight-data-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px;
  align-items: start;
}
.flight-data-column {
  min-width: 0;
}
.flight-data-card .flight-data-column > .flight-data-row {
  grid-template-columns: 86px minmax(0, 1fr) 32px;
  gap: 10px;
  min-height: 64px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
}
.flight-data-card .flight-data-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.flight-data-card .flight-data-value strong {
  font-size: 15px;
}
.flight-data-card .flight-data-value small {
  margin: 0;
  font-size: 12px;
}
.flight-data-card .flight-data-row:hover,
.flight-data-card .flight-data-row:focus-within {
  background: var(--card);
}
.flight-data-column .flight-data-edit {
  opacity: 0;
}
.flight-data-row:hover .flight-data-edit,
.flight-data-row:focus-within .flight-data-edit {
  opacity: 1;
  border-color: var(--accent);
}
.flight-type-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 99px;
  background: #1e3a2c;
  color: #8fddb0;
  font-size: 13px;
}
.flight-equipment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #16283f;
  color: var(--accent);
}
.flight-equipment-icon.is-harness {
  color: #5cc48a;
  background: #15291f;
}
.flight-equipment-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flight-harness-assign {
  padding: 5px 10px;
  border: 1px dashed var(--accent);
  border-radius: 9px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  text-align: left;
}
.flight-altitude-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}
.flight-altitude-title h4 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flight-data-card .flight-height-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.flight-data-card .flight-height-grid > div {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.flight-data-card .flight-height-grid strong {
  display: block;
  margin-top: 3px;
  font:
    600 18px 'IBM Plex Mono',
    monospace;
  color: var(--text);
}
.flight-data-card .flight-height-grid small {
  font-size: 11px;
}
.flight-data-card .flight-height-grid > div:not(.is-maximum) strong {
  color: var(--text);
}
.flight-data-card .flight-height-grid .is-maximum strong {
  color: #8fddb0;
}
.flight-type-suggestion {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #6a5328;
  border-radius: 12px;
  background: #2a2214;
  color: #fbe3b8;
  font-size: 13px;
}
.flight-type-suggestion p::before {
  content: '! ';
  color: #f0b44c;
  font-weight: 700;
}
.flight-type-suggestion > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.flight-type-suggestion button {
  padding: 5px 10px;
  border: 1px solid #6a5328;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 12px;
}
.flight-type-suggestion button:first-child {
  background: #f0b44c;
  color: #1b1408;
  font-weight: 700;
}
.detail-dialog.replay-expanded .flight-data-card {
  display: none;
}
@media (hover: none) {
  .flight-data-column .flight-data-edit {
    opacity: 0.65;
  }
}
@container (max-width: 620px) {
  .flight-data-route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }
  .flight-route-connection {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 6px 12px;
  }
  .flight-route-connection .flight-route-arrow {
    max-width: 220px;
  }
  .flight-route-time {
    font-size: 22px;
  }
  .flight-data-card .flight-data-column > .flight-data-row {
    grid-template-columns: 72px minmax(0, 1fr) 32px;
  }
}
@media (max-width: 600px) {
  .flight-data-card {
    padding: 16px 12px;
  }
}
.flight-edit-all {
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 11px;
  padding: 4px;
}
.flight-data-group {
  margin: 18px 16px 0;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.flight-data-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 30px;
  gap: 9px;
  align-items: center;
  margin: 0 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.flight-data-row > span {
  color: var(--muted);
}
.flight-data-row > div {
  text-align: right;
  min-width: 0;
}
.flight-data-row strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.flight-data-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 3px;
}
.flight-data-row .flight-field-edit {
  height: 30px;
  min-height: 30px;
  padding: 0;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
}
.flight-height-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 10px 16px;
}
.flight-height-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.flight-height-grid strong {
  font:
    12px 'Geist Mono',
    monospace;
}
.flight-height-grid > div:last-child strong {
  color: #85d7ac;
}
.flight-data-details {
  margin: 12px 16px 0;
  font-size: 11px;
}
.flight-data-details > .detail-context,
.flight-data-details > .dhv-recognition {
  margin: 12px 0;
}
.flight-data-details .dhv-recognition {
  padding: 8px;
}
.flight-journal-preview,
.flight-file-card {
  padding: 16px;
}
.flight-journal-preview header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.flight-journal-preview h3,
.flight-file-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
}
.flight-journal-preview header .btn {
  font-size: 11px;
  padding: 0;
}
.flight-journal-preview h4 {
  margin: 12px 0 4px;
  font-size: 16px;
}
.flight-journal-preview p {
  font-size: 13px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.flight-journal-preview .journal-tags {
  font-size: 11px;
  color: var(--accent);
}
.flight-preview-media {
  display: flex;
  gap: 6px;
}
.flight-preview-media .photo-open {
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 9px;
  border: 0;
  padding: 0;
  position: relative;
}
.flight-preview-media img,
.flight-preview-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flight-preview-media .video-badge {
  font-size: 8px;
}
.flight-preview-media .video-badge svg {
  width: 12px;
  height: 12px;
}
.flight-quality-status {
  background: #142c22;
  border: 1px solid #276443;
  padding: 12px;
  border-radius: 11px;
  font-size: 12px;
  color: #a6dec0;
}
.flight-quality-status p {
  margin: 5px 0 0;
  font-size: 11px;
}
.flight-quality-status.has-warnings {
  background: var(--surface);
  border-color: #c99043;
  color: #e7b574;
}
.flight-file-details {
  margin: 12px 0;
  font-size: 12px;
}
.flight-file-details dl {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
  gap: 8px;
  font-size: 11px;
}
.flight-file-details dt {
  color: var(--muted);
}
.flight-file-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.flight-file-details .track-quality {
  font-size: 11px;
  padding: 10px;
  margin: 12px 0;
}
.flight-file-privacy {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.flight-original-download {
  width: 100%;
  font-size: 11px;
  justify-content: center;
}
.detail-map > .flight-replay-info {
  position: absolute;
  right: 12px;
  top: calc(var(--flight-map-height) - 48px);
  z-index: 420;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--panel);
  border-radius: 50%;
}
.detail-map > .flight-replay-info > summary {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  list-style: none;
}
.detail-map > .flight-replay-info[open] {
  top: auto;
  bottom: 12px;
  width: min(360px, calc(100% - 24px));
  max-height: 65%;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.flight-replay-info[open] > summary {
  margin-left: auto;
}
dialog.flight-share-page {
  width: min(900px, calc(100vw - 24px));
  padding: 20px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
}
.flight-share-page > .btn {
  float: right;
  position: relative;
  z-index: 1;
}
.flight-share-page[hidden] {
  display: none;
}
.place-change-dialog {
  width: min(760px, calc(100vw - 24px));
  padding: 0;
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
}
.place-change-dialog .dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
}
.place-change-dialog .dialog-head h2 {
  font-size: 24px;
}
.place-change-dialog .dialog-head p {
  color: var(--muted);
  font-size: 13px;
}
.place-change-dialog .dialog-body {
  padding: 18px 22px;
}
.place-change-map {
  height: 285px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--panel);
}
.place-change-dialog input[type='search'] {
  width: 100%;
  padding: 14px;
}
.place-change-dialog .flight-data-group {
  margin: 18px 0;
}
.place-choice-list {
  display: grid;
  gap: 12px;
}
.place-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
}
.place-choice:has(input:checked) {
  border: 2px solid #4d8ecd;
  background: var(--panel);
  padding: 13px;
}
.place-choice input,
.place-bulk input {
  width: 18px;
  flex: none;
}
.place-choice strong {
  font-size: 14px;
}
.place-choice small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.place-choice-symbol,
.place-map-symbol {
  width: 36px;
  height: 36px;
}
.place-choice-symbol svg,
.place-map-symbol svg {
  width: 36px;
  height: 36px;
}
.place-create {
  width: 100%;
  border: 1px dashed #4d8ecd;
  border-radius: 12px;
  background: transparent;
  color: var(--accent);
  padding: 18px;
  text-align: left;
  font:
    600 14px Geist,
    system-ui;
  cursor: pointer;
  margin: 14px 0;
}
.place-bulk {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 13px;
}
.place-custom {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}
.place-custom[hidden] {
  display: none;
}
.place-custom .dialog-hint {
  grid-column: span 2;
}
.place-change-dialog .dialog-footer {
  padding: 16px 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.place-change-dialog .dialog-footer .text {
  margin-right: auto;
}
.place-change-dialog .btn {
  font-size: 14px;
  min-height: 40px;
}
@media (max-width: 1000px) {
  .detail-dialog .dialog-head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
  .detail-dialog .flight-view-tabs {
    grid-row: 2;
    grid-column: 1/-1;
  }
  .detail-dialog .flight-header-actions {
    grid-column: 3;
  }
  .detail-dialog .flight-close {
    grid-column: 4;
    grid-row: 1;
  }
}
@media (max-width: 600px) {
  .detail-dialog .dialog-head {
    gap: 8px;
    padding: 12px;
  }
  .detail-dialog .dialog-head h2 {
    font-size: 16px;
  }
  .flight-title-type {
    display: block;
    font-size: 11px;
  }
  .detail-dialog .dialog-head p {
    font-size: 10px;
  }
  .detail-dialog .flight-header-actions {
    gap: 5px;
  }
  .detail-dialog .flight-header-actions .btn {
    padding: 6px;
    font-size: 12px;
  }
  .detail-dialog .flight-share span {
    display: none;
  }
  .detail-dialog .flight-nav-group .flight-nav {
    width: 24px;
  }
  .detail-dialog .flight-close {
    width: 32px;
    height: 32px;
  }
  .detail-dialog .flight-summary {
    padding: 12px;
    gap: 8px 16px;
  }
  .flight-summary strong {
    font-size: 14px;
  }
  .flight-summary small {
    font-size: 10px;
  }
  .place-change-dialog .dialog-head,
  .place-change-dialog .dialog-body,
  .place-change-dialog .dialog-footer {
    padding: 16px;
  }
  .place-change-map {
    height: 220px;
  }
  .place-choice {
    gap: 10px;
  }
  .place-choice strong {
    font-size: 13px;
  }
  .place-choice small {
    font-size: 11px;
  }
  .place-change-dialog .dialog-footer .text {
    width: 100%;
    text-align: left;
  }
}

.detail-dialog[data-flight-view='analysis'] .flight-share {
  display: flex;
}
.flight-ground-disclosure {
  margin: 0 16px 16px;
  font-size: 12px;
  color: var(--muted);
}
.flight-ground-disclosure > .ground-profile {
  margin-top: 12px;
  color: var(--text);
}
.detail-dialog .dialog-head > div:not(.flight-header-actions) {
  min-width: 0;
}

.flight-journal-page .journal-paper .photo-remove {
  top: 8px;
  bottom: auto;
}

/* Flight analysis 15: six sections with real track values and explicit sketches. */
.detail-dialog[data-flight-view='analysis'] .flight-analysis-page {
  padding-top: 0;
}
.analysis-jump-nav {
  position: sticky;
  top: var(--analysis-head-height, 76px);
  z-index: 450;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 0;
  background: var(--panel);
}
.analysis-jump-nav button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  font:
    12px Geist,
    system-ui;
  cursor: pointer;
  white-space: nowrap;
}
.analysis-jump-nav button[aria-pressed='true'] {
  background: #1f3550;
  border-color: #3c6fa3;
  color: #cfe4fa;
}
.analysis-jump-nav .analysis-method-link {
  margin-left: auto;
  border: 0;
  font-size: 11px;
}
.analysis-section {
  margin-bottom: 18px;
  scroll-margin-top: 160px;
  padding: 22px;
}
.analysis-section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.analysis-section-heading > span {
  font:
    11px 'Geist Mono',
    monospace;
  color: var(--muted);
}
.analysis-section-heading small {
  font-size: 12px;
  color: var(--muted);
}
.analysis-section .analysis-story {
  font-size: 18px;
  max-width: none;
  margin: 0 0 18px;
}
.analysis-section .analysis-timeline {
  height: 32px;
  gap: 0;
}
.analysis-section .analysis-time-axis {
  margin: 8px 0 12px;
}
.analysis-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  align-items: center;
}
.analysis-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.analysis-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.segment-start {
  background: #5cc48a;
}
.segment-soaring,
.segment-other {
  background: #365d50;
}
.segment-landing {
  background: #a583dd;
}
.analysis-legend .segment-circling {
  background: #3b7bd0;
}
.analysis-legend .segment-glide {
  background: #c9944a;
}
.analysis-legend .segment-missing {
  background: #8a3b3b;
}
.analysis-core-values {
  display: grid;
  grid-template-columns: repeat(var(--analysis-value-columns, 4), minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.analysis-overview-groups {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}
.analysis-overview-group > h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.analysis-overview-group .analysis-core-values {
  margin: 0;
}
.analysis-metric {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel);
  min-width: 0;
}
.analysis-metric small,
.analysis-metric span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.analysis-metric strong {
  display: block;
  font:
    600 22px 'Geist Mono',
    monospace;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.analysis-metric span {
  font-size: 10px;
}
.analysis-red {
  color: #ed7979;
}
.analysis-takeaways {
  background: #14271d;
  border: 1px solid #2d6041;
  border-radius: 12px;
  padding: 16px;
}
.analysis-takeaways h3 {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fddb0;
  margin: 0 0 10px;
}
.analysis-takeaways ul {
  padding-left: 20px;
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
}
.analysis-note,
.analysis-inset p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.analysis-table-scroll {
  max-width: 100%;
  overflow: auto;
  margin-bottom: 16px;
  overscroll-behavior-x: contain;
}
.analysis-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 12px;
  white-space: nowrap;
}
.analysis-detail-table th,
.analysis-detail-table td {
  padding: 9px 10px;
  text-align: left;
}
.analysis-detail-table thead th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.analysis-detail-table tbody tr {
  display: table-row;
  background: var(--panel);
}
.analysis-detail-table tbody td {
  font:
    11px 'Geist Mono',
    monospace;
}
.analysis-detail-table tbody th:first-child {
  border-radius: 10px 0 0 10px;
}
.analysis-detail-table tbody td:last-child {
  border-radius: 0 10px 10px 0;
}
.analysis-detail-table .analysis-seek {
  width: 30px;
  height: 30px;
  color: #7dbbf7;
}
.analysis-index {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #1f3550;
  color: #7dbbf7;
  font-size: 11px;
}
.analysis-index-gold {
  background: #3a2e1a;
  color: #f0c27a;
}
.analysis-centering-open {
  color: var(--muted);
}
.analysis-inset {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel);
  min-width: 0;
}
.analysis-inset h3 {
  font-size: 13px;
  margin: 0 0 14px;
}
.analysis-inset p:last-child {
  margin-bottom: 0;
}
.analysis-centering {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.analysis-centering svg {
  width: 180px;
  height: 180px;
  margin: auto;
  font:
    10px Geist,
    system-ui;
}
.analysis-chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.analysis-chart-heading h3 {
  margin: 0;
}
.analysis-sketch-label {
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
}
.analysis-soft {
  padding: 9px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.analysis-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.analysis-plot {
  width: 100%;
  height: auto;
  font:
    10px Geist,
    system-ui;
  display: block;
}
.polar-history-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.polar-history-toggle input {
  width: auto;
  margin: 0;
}
.analysis-list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
  font-size: 12px;
  color: var(--muted);
}
.analysis-list-pagination .btn {
  font-size: 12px;
  min-height: 36px;
}
[data-analysis-list] tr[hidden] {
  display: none !important;
}
.analysis-safety-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.analysis-safety-values {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.analysis-safety-values .analysis-metric {
  flex: 1;
}
.analysis-safety-grid .altitude,
.analysis-chart-grid .altitude {
  width: 100%;
  height: auto;
  display: block;
}
.analysis-safety-grid .replay-chart-legend,
.analysis-chart-grid .replay-chart-legend {
  font-size: 10px;
}
.analysis-vario-plot {
  width: 100%;
  height: auto;
  font:
    10px 'Geist Mono',
    monospace;
}
.analysis-landing-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 14px;
}
.analysis-landing-grid h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.analysis-facts {
  font-size: 11px;
  margin: 0;
}
.analysis-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.analysis-facts > div:last-child {
  border: 0;
}
.analysis-facts dt {
  color: var(--muted);
}
.analysis-facts dd {
  margin: 0;
  text-align: right;
  font:
    11px 'Geist Mono',
    monospace;
}
.analysis-landing-sketch {
  display: block;
  width: 100%;
  height: auto;
  font:
    10px Geist,
    system-ui;
  fill: #dfebe2;
}
.analysis-route-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
}
.analysis-route-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.analysis-route-values .analysis-metric strong {
  font-size: 21px;
}
.analysis-route-values .analysis-metric {
  padding: 12px;
}
.analysis-near {
  padding: 12px;
  background: #2b2415;
  border: 1px solid #6c542a;
  border-radius: 10px;
  color: #f0c27a;
  font-size: 12px;
  line-height: 1.6;
  margin: 12px 0;
}
#analysis-method {
  scroll-margin-top: 160px;
}
.analysis-table-scroll:focus-visible,
.analysis-jump-nav button:focus-visible {
  outline: 2px solid #5ea8f2;
  outline-offset: 2px;
}
@media (max-width: 1000px) {
  .analysis-landing-grid {
    grid-template-columns: 1fr 1fr;
  }
  .analysis-landing-grid article:nth-child(2) {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .analysis-landing-sketch {
    max-width: 380px;
    margin: auto;
  }
  .analysis-route-grid {
    grid-template-columns: 1fr;
  }
  .analysis-jump-nav .analysis-method-link {
    margin-left: 0;
  }
}
@media (max-width: 600px) {
  .analysis-jump-nav {
    gap: 5px;
    padding: 12px 0;
    top: var(--analysis-head-height, 100px);
  }
  .analysis-jump-nav button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .analysis-jump-nav .analysis-method-link {
    display: none;
  }
  .analysis-section {
    padding: 16px;
    scroll-margin-top: 205px;
  }
  .analysis-core-values {
    grid-template-columns: 1fr 1fr;
  }
  .analysis-metric strong {
    font-size: 18px;
  }
  .analysis-centering {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .analysis-chart-grid,
  .analysis-safety-grid,
  .analysis-landing-grid {
    grid-template-columns: 1fr;
  }
  .analysis-landing-grid article:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
  }
  .analysis-route-values {
    grid-template-columns: 1fr 1fr;
  }
  .analysis-route-values > div:last-child {
    grid-column: 1/-1;
  }
  .analysis-section .analysis-story {
    font-size: 16px;
  }
  .analysis-section-heading {
    gap: 8px;
  }
  .analysis-section-heading small {
    font-size: 11px;
  }
  .analysis-table-scroll {
    margin-right: -6px;
  }
  .analysis-detail-table th,
  .analysis-detail-table td {
    padding: 8px;
  }
  #analysis-method {
    scroll-margin-top: 205px;
  }
}
.analysis-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.detail-dialog[data-flight-view='analysis'] .flight-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 10px 24px;
  margin-bottom: 0;
}
.detail-dialog[data-flight-view='analysis'] .flight-summary > div {
  display: flex;
  gap: 6px;
  align-items: baseline;
  border: 0;
  padding: 0;
}
.detail-dialog[data-flight-view='analysis'] .flight-summary small {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.detail-dialog[data-flight-view='analysis'] .flight-summary strong {
  font-size: 16px;
  margin: 0;
}
.analysis-section,
#analysis-method {
  scroll-margin-top: calc(
    var(--analysis-head-height, 76px) + var(--analysis-nav-height, 80px) + 16px
  );
}
.flight-analysis-page .flight-analysis {
  overflow: visible;
}
/* Wind-corrected thermal centering, in spatial compass sectors. */
.analysis-centering {
  grid-template-columns: 260px minmax(0, 1fr);
}
.analysis-centering svg {
  width: 240px;
  height: 240px;
  max-width: 100%;
  font:
    11px Geist,
    system-ui;
}
.analysis-centering.centering-unavailable {
  grid-template-columns: 1fr;
}
.centering-thermal-choice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 12px;
}
.centering-thermal-choice select {
  width: auto;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font:
    12px Geist,
    system-ui;
}
.centering-table-choice {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #7dbbf7;
  background: transparent;
  font:
    11px Geist,
    system-ui;
  cursor: pointer;
}
.centering-table-choice[aria-pressed='true'] {
  border-color: #3c6fa3;
  background: #1f3550;
}
.centering-sector {
  outline: none;
}
.centering-sector:focus-visible line {
  stroke-width: 8;
}
.thermal-circles-view {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
  min-width: 0;
}
.thermal-circles-view > div {
  min-width: 0;
}
.analysis-centering .thermal-circles-view svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 480px;
  margin: 0 auto;
}
.thermal-circle-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.thermal-circle-facts dt {
  font-size: 11px;
  color: var(--muted);
}
.thermal-circle-facts dd {
  margin: 4px 0 0;
  font:
    600 18px 'Geist Mono',
    monospace;
  overflow-wrap: anywhere;
}
.thermal-entry-view {
  grid-column: 1/-1;
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.thermal-entry-view .analysis-table-scroll {
  margin: 12px 0;
}
@media (max-width: 600px) {
  .thermal-circles-view {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.analysis-centering .analysis-soft p {
  color: var(--text);
  margin: 0 0 5px;
  font-size: 12px;
}
.analysis-centering .analysis-soft p:last-child {
  margin-bottom: 0;
}
.centering-estimate-note {
  font-size: 10px !important;
}
@media (max-width: 600px) {
  .analysis-centering {
    grid-template-columns: 1fr;
  }
  .centering-thermal-choice {
    align-items: stretch;
    flex-direction: column;
  }
  .centering-thermal-choice select {
    width: 100%;
  }
}

/* Landing map and replay targets share one north-up Mercator frame. */
.approach-map {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #233a35;
  isolation: isolate;
}
.approach-map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}
.approach-point {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.approach-point:hover,
.approach-point:focus-visible {
  background: #fff8;
  outline: 2px solid #5ea8f2;
  z-index: 2;
}
.approach-leg-label {
  font:
    12px Geist,
    system-ui;
  fill: white;
  stroke: #17232d;
  stroke-width: 3px;
  paint-order: stroke fill;
  stroke-linejoin: round;
}
.analysis-approach h3 small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.approach-attribution {
  font-size: 10px !important;
  text-align: right;
  margin: 5px 0 !important;
}
.analysis-landing-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr);
}
.analysis-landing-grid > article {
  min-width: 0;
}
@media (max-width: 1000px) {
  .analysis-landing-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .analysis-landing-grid {
    grid-template-columns: 1fr;
  }
}

/* R10–R12: floating fullscreen chrome and a single profile timeline. */
.replay-mini-profile,
.replay-profile-toggle,
.replay-view-menu,
.replay-quiet-clock,
.replay-quiet-progress {
  display: none;
}
.detail-dialog.replay-expanded {
  --replay-glass: rgba(15, 24, 29, 0.78);
}
.detail-dialog.replay-expanded .replay-flight-caption {
  display: block;
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: calc(100% - 370px);
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--replay-glass);
  backdrop-filter: blur(12px);
  font-size: 13px;
  color: #e8edf4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1100;
  transform: none;
}
.detail-dialog.replay-expanded .flight-map-modes,
.detail-dialog.replay-expanded .replay-pilot-label {
  display: none !important;
}
.detail-dialog.replay-expanded .flight-replay-hud {
  top: 72px;
  left: 16px;
  width: auto;
  max-width: calc(100% - 32px);
  display: flex;
  border: 0;
  border-radius: 14px;
  background: var(--replay-glass);
  backdrop-filter: blur(12px);
  color: #e8edf4;
}
.detail-dialog.replay-expanded .flight-replay-hud > div {
  padding: 7px 14px;
  border: 0;
  min-width: 0;
}
.detail-dialog.replay-expanded .flight-replay-hud strong {
  font-size: 18px;
  white-space: nowrap;
}
.detail-dialog.replay-expanded .flight-replay-hud > div > small:first-child {
  display: block;
  font-size: 9px;
  margin-bottom: 2px;
}
.detail-dialog.replay-expanded .flight-hud-sub,
.detail-dialog.replay-expanded [data-replay-climb-source] {
  display: none;
}
.detail-dialog.replay-expanded .flight-replay-hud [data-replay-gps] {
  color: #7dbbf7;
}
.detail-dialog.replay-expanded .replay-camera-menu,
.detail-dialog.replay-expanded .flight-map-settings,
.detail-dialog.replay-expanded .flight-map-settings[open],
.detail-dialog.replay-expanded .flight-map-fullscreen {
  top: 16px;
}
.detail-dialog.replay-expanded .replay-camera-menu {
  right: 120px;
}
.detail-dialog.replay-expanded .replay-camera-menu > summary,
.detail-dialog.replay-expanded .flight-map-settings > summary,
.detail-dialog.replay-expanded .flight-map-fullscreen {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--replay-glass);
  backdrop-filter: blur(12px);
  border: 0;
  color: #e8edf4;
}
.detail-dialog.replay-expanded .replay-camera-menu > summary span,
.detail-dialog.replay-expanded .replay-camera-menu > summary:after {
  display: none;
}
.detail-dialog.replay-expanded .replay-camera-menu > summary svg {
  width: 22px;
  height: 22px;
}
.detail-dialog.replay-expanded .replay-view-menu {
  display: block;
  position: absolute;
  right: 174px;
  top: 16px;
  z-index: 1200;
  color: #e8edf4;
}
.replay-view-menu > summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--replay-glass);
  backdrop-filter: blur(12px);
  font-size: 13px;
  height: 42px;
  box-sizing: border-box;
}
.replay-view-menu > summary::-webkit-details-marker {
  display: none;
}
.replay-view-panel {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 180px;
  padding: 8px;
  background: #141c28;
  border: 1px solid #303e50;
  border-radius: 14px;
}
.replay-view-panel button {
  display: block;
  width: 100%;
  padding: 10px;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8edf4;
  cursor: pointer;
}
.replay-view-panel button[aria-pressed='true'] {
  background: #203752;
}
dialog.detail-dialog.replay-expanded:not(.replay-media-paused) .detail-map > .replay-player {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: 44px 125px minmax(0, 1fr) 72px 38px;
  grid-template-rows: 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 18px;
  background: var(--replay-glass);
  backdrop-filter: blur(12px);
  color: #e8edf4;
  max-height: none;
  max-width: none;
  width: auto;
  transform: none;
}
.detail-dialog.replay-expanded:not(.replay-media-paused) .replay-actions {
  display: contents;
}
.detail-dialog.replay-expanded:not(.replay-media-paused) .replay-actions > * {
  display: none !important;
}
.detail-dialog.replay-expanded:not(.replay-media-paused) .replay-actions > [data-replay-toggle] {
  display: flex !important;
  grid-column: 1;
  grid-row: 1;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 12px;
  border-radius: 8px;
  background: #2472cc;
}
.detail-dialog.replay-expanded:not(.replay-media-paused) .replay-actions > [data-replay-clock] {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  font-family: 'Geist Mono', monospace;
}
.detail-dialog.replay-expanded [data-replay-clock-time] {
  font-size: 16px;
}
.detail-dialog.replay-expanded [data-replay-clock-progress] {
  font-size: 11px;
}
.detail-dialog.replay-expanded [data-replay-clock-zone] {
  display: none;
}
.detail-dialog.replay-expanded:not(.replay-media-paused) .replay-actions > .replay-tempo {
  display: none !important;
  grid-column: 4;
  grid-row: 1;
}
.detail-dialog.replay-expanded .replay-tempo select {
  width: 72px;
  min-height: 36px;
  border-radius: 999px;
  background: #ffffff12;
  border: 0;
  color: #e8edf4;
  font-size: 13px;
  padding: 6px;
}
.detail-dialog.replay-expanded .replay-tempo option {
  background: #141c28;
}
.detail-dialog.replay-expanded:not(.replay-media-paused) .replay-compact-tempo {
  --button-height: 36px;
  display: inline-flex !important;
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff12;
  color: #e8edf4;
  font-size: 13px;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-compact-tempo {
  grid-row: 2;
}
.detail-dialog.replay-expanded .replay-tempo-label,
.detail-dialog.replay-expanded .replay-toggle-label,
.detail-dialog.replay-expanded .replay-timeline,
.detail-dialog.replay-expanded .flight-segment-legend {
  display: none !important;
}
.detail-dialog.replay-expanded .replay-profile-toggle {
  display: block;
  grid-column: 5;
  grid-row: 1;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: #ffffff12;
  color: #e8edf4;
}
.detail-dialog.replay-expanded:not(.replay-profile-open):not(.replay-media-paused)
  .replay-mini-profile {
  display: block;
  position: relative;
  grid-column: 3;
  grid-row: 1;
  height: 44px;
  min-width: 0;
}
.replay-mini-profile svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}
.mini-fill {
  fill: #7dbbf7;
  opacity: 0.32;
}
.mini-line {
  fill: none;
  stroke: #a5d1f7;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.mini-cursor {
  stroke: white;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.replay-mini-profile input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  min-height: 0;
}
.replay-mini-profile:focus-within {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
  border-radius: 4px;
}
.replay-mini-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mini-marker {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #7dbbf7;
  pointer-events: auto;
  cursor: pointer;
}
.mini-marker:before {
  content: '';
  position: absolute;
  inset: -7px;
}
.mini-marker.marker-photo {
  background: #f0b44c;
  border-radius: 2px;
}
.mini-marker.marker-peak {
  background: #8fddb0;
}
.detail-dialog.replay-expanded .replay-player > .flight-segment-strip {
  display: flex !important;
  grid-column: 3;
  grid-row: 1;
  height: 4px;
  margin: 0;
  align-self: end;
  z-index: 3;
  border-radius: 3px;
  transform: none;
}
.detail-dialog.replay-expanded:not(.replay-profile-open) .replay-player [data-replay-charts] {
  display: none !important;
}
dialog.detail-dialog.replay-expanded.replay-profile-open:not(.replay-media-paused)
  .detail-map
  > .replay-player {
  grid-template-rows: 32px minmax(100px, 18dvh);
}
.detail-dialog.replay-expanded.replay-profile-open .replay-actions > .flight-chart-buttons {
  display: flex !important;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: auto;
  margin: 0;
  gap: 4px;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player [data-replay-charts] {
  display: block;
  grid-column: 3;
  grid-row: 2;
  padding: 0;
  min-width: 0;
  height: 100%;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player .altitude {
  height: 100%;
  width: 100%;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player .chart-title,
.detail-dialog.replay-expanded.replay-profile-open .chart-axis-labels {
  display: none;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player > .flight-segment-strip {
  grid-row: 2;
  margin-left: 8.87%;
  margin-right: 4.84%;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-actions > [data-replay-toggle],
.detail-dialog.replay-expanded.replay-profile-open .replay-actions > [data-replay-clock],
.detail-dialog.replay-expanded.replay-profile-open .replay-actions > .replay-tempo,
.detail-dialog.replay-expanded.replay-profile-open .replay-profile-toggle {
  grid-row: 2;
}
.detail-dialog.replay-expanded.replay-controls-hidden .replay-flight-caption,
.detail-dialog.replay-expanded.replay-controls-hidden .replay-view-menu,
.detail-dialog.replay-expanded.replay-controls-hidden .replay-camera-menu,
.detail-dialog.replay-expanded.replay-controls-hidden .flight-map-settings,
.detail-dialog.replay-expanded.replay-controls-hidden .flight-map-fullscreen,
.detail-dialog.replay-expanded.replay-controls-hidden .replay-player,
.detail-dialog.replay-expanded.replay-controls-hidden .replay-free-camera,
.detail-dialog.replay-expanded.replay-controls-hidden .flight-peak-badge {
  visibility: hidden;
  pointer-events: none;
}
.detail-dialog.replay-expanded.replay-controls-hidden .flight-replay-hud {
  top: 16px;
  border-radius: 999px;
}
.detail-dialog.replay-expanded.replay-controls-hidden .flight-replay-hud > div {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 5px;
  padding: 10px;
}
.detail-dialog.replay-expanded.replay-controls-hidden .flight-replay-hud > div > small:first-child {
  text-transform: none;
  letter-spacing: 0;
  font-size: 9px;
}
.detail-dialog.replay-expanded.replay-controls-hidden .replay-quiet-clock {
  display: block;
  position: absolute;
  right: 16px;
  bottom: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--replay-glass);
  color: #e8edf4;
  font:
    12px 'Geist Mono',
    monospace;
  z-index: 1100;
  pointer-events: none;
}
.detail-dialog.replay-expanded.replay-controls-hidden .replay-quiet-progress {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #ffffff20;
  z-index: 1100;
  pointer-events: none;
}
.replay-quiet-progress i {
  display: block;
  height: 100%;
  background: #7dbbf7;
}
@media (max-width: 760px) {
  .detail-dialog.replay-expanded .replay-flight-caption {
    top: 64px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 7px 12px;
    font-size: 11px;
  }
  .detail-dialog.replay-expanded .flight-replay-hud {
    top: 108px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
  .detail-dialog.replay-expanded .flight-replay-hud > div {
    padding: 7px 9px;
  }
  .detail-dialog.replay-expanded .flight-replay-hud strong {
    font-size: 14px;
  }
  dialog.detail-dialog.replay-expanded:not(.replay-media-paused) .detail-map > .replay-player {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: 36px 86px minmax(0, 1fr) 58px 30px;
    gap: 6px;
    padding: 8px;
  }
  .detail-dialog.replay-expanded:not(.replay-media-paused) .replay-actions > [data-replay-toggle] {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 9px;
  }
  .detail-dialog.replay-expanded [data-replay-clock-time] {
    font-size: 12px;
  }
  .detail-dialog.replay-expanded [data-replay-clock-progress] {
    font-size: 9px;
  }
  .detail-dialog.replay-expanded .replay-tempo select {
    width: 58px;
    font-size: 11px;
  }
  .detail-dialog.replay-expanded .replay-profile-toggle {
    width: 30px;
    height: 30px;
    min-height: 30px;
  }
  .detail-dialog.replay-expanded.replay-profile-open .replay-actions > .flight-chart-buttons {
    grid-column: 1 / -1;
  }
  .detail-dialog.replay-expanded.replay-profile-open .replay-player [data-replay-charts],
  .detail-dialog.replay-expanded.replay-profile-open .replay-player > .flight-segment-strip {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .detail-dialog.replay-expanded.replay-profile-open .replay-actions > [data-replay-toggle],
  .detail-dialog.replay-expanded.replay-profile-open .replay-actions > [data-replay-clock],
  .detail-dialog.replay-expanded.replay-profile-open .replay-actions > .replay-tempo,
  .detail-dialog.replay-expanded.replay-profile-open .replay-compact-tempo,
  .detail-dialog.replay-expanded.replay-profile-open .replay-profile-toggle {
    grid-row: 3;
  }
  .detail-dialog.replay-expanded.replay-controls-hidden .flight-replay-hud {
    top: 10px;
  }
  .detail-dialog.replay-expanded.replay-controls-hidden .flight-replay-hud > div {
    display: block;
    padding: 7px 9px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .replay-flight-caption {
    top: 16px;
    max-width: calc(100% - 370px);
  }
  .detail-dialog.replay-expanded .flight-replay-hud {
    top: 68px;
  }
}

.detail-dialog.replay-expanded .replay-player .replay-clock-primary strong {
  font-size: 16px;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player [data-replay-charts] {
  display: block !important;
}
.detail-dialog.replay-expanded.replay-media-paused .replay-mini-profile,
.detail-dialog.replay-expanded.replay-media-paused .replay-profile-toggle,
.detail-dialog.replay-expanded.replay-media-paused .replay-view-menu {
  display: none !important;
}
@media (max-width: 760px) {
  .detail-dialog.replay-expanded .replay-player .replay-clock-primary strong {
    font-size: 12px;
  }
  .detail-dialog.replay-expanded .replay-camera-panel {
    right: -104px;
  }
  .detail-dialog.replay-expanded .replay-layers-panel {
    right: -52px;
  }
}
.detail-dialog.replay-expanded .flight-replay-hud > div {
  background: transparent;
  border: 0;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player .flight-chart-frame {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player .flight-chart-plot {
  height: 100%;
  width: 100%;
  margin: 0;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player .flight-chart-plot .altitude {
  height: 100%;
  width: 100%;
  margin: 0;
}
.detail-dialog.replay-expanded.replay-profile-open .replay-player .replay-cursor {
  stroke: #fff;
}
.detail-dialog.replay-expanded .replay-camera-panel,
.detail-dialog.replay-expanded .replay-layers-panel {
  top: 52px;
  max-height: calc(100dvh - 90px);
}
.detail-dialog.replay-expanded.replay-controls-hidden .leaflet-control-zoom,
.detail-dialog.replay-expanded.replay-controls-hidden .leaflet-control-scale {
  visibility: hidden;
  pointer-events: none;
}
.detail-dialog.replay-expanded.replay-controls-hidden .replay-quiet-clock {
  bottom: 24px;
}
.detail-dialog.replay-expanded.replay-controls-hidden .tile-status {
  visibility: hidden;
  pointer-events: none;
}

/* Export: options, archive preview and persistent progress. */
#dialog.export-dialog {
  width: min(960px, calc(100vw - 24px));
  max-width: 960px;
}
.export-dialog .dialog-body {
  padding: 0;
}
.export-dialog .dialog-head {
  border-bottom: 1px solid var(--border);
}
.export-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
}
.export-options {
  padding: 24px;
  display: grid;
  gap: 24px;
  min-width: 0;
}
.export-options fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: 12px;
}
.export-options legend,
.export-sidebar h3 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 12px;
}
.export-scopes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.export-choice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  min-width: 0;
}
.export-choice:has(input:checked:not([value='none'])) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}
.export-choice input {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--accent);
  margin: 3px 0;
}
.export-choice strong {
  font-size: 15px;
}
.export-choice small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 5px;
}
.export-choice em {
  display: inline-block;
  background: color-mix(in srgb, var(--ok) 17%, transparent);
  color: var(--ok);
  font-style: normal;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}
.export-symbol {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-shrink: 0;
}
.export-component > span:nth-child(2) {
  flex: 1;
}
.export-media > div {
  min-width: 0;
  flex: 1;
}
.export-media-choices {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 12px 0;
  padding: 3px;
}
.export-media-choices label {
  flex: 1;
  position: relative;
  cursor: pointer;
  min-width: 0;
}
.export-media-choices input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.export-media-choices span {
  display: block;
  text-align: center;
  padding: 10px 5px;
  font-size: 12px;
  border-radius: 8px;
}
.export-media-choices input:checked + span {
  background: var(--solid);
  color: var(--text);
}
.export-media-choices input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.export-more summary {
  cursor: pointer;
  color: var(--accent);
}
.export-more > label {
  display: block;
  margin-top: 16px;
}
.export-sidebar {
  padding: 24px 20px;
  border-left: 1px solid var(--border);
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.export-tree {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 16px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.export-estimates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.export-estimates > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.export-estimates small {
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
}
.export-estimates strong {
  font-size: 13px;
}
.export-warning {
  border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  color: var(--warn);
  padding: 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
}
.export-last {
  margin-top: auto;
  padding-top: 24px;
  font-size: 12px;
  color: var(--muted);
}
.export-dialog .dialog-footer {
  align-items: center;
  gap: 12px;
}
.export-dialog .dialog-footer > small {
  color: var(--muted);
  margin-right: auto;
  font-size: 12px;
}
.export-progress,
.export-success {
  padding: 24px;
  margin: 20px;
  border: 1px solid var(--accent);
  border-radius: 16px;
}
.export-progress p {
  color: var(--muted);
}
.export-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}
.export-step > span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.export-step .export-done {
  color: var(--ok);
}
.export-step small {
  margin-left: auto;
  color: var(--muted);
}
.export-progress progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
.export-success {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 9%, transparent);
}
.export-success h3 {
  color: var(--ok);
}
.export-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.export-download strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.export-dialog .dialog-body > .export-warning {
  margin: 20px;
}
.export-status {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  background: var(--solid);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
@media (max-width: 700px) {
  .export-layout {
    grid-template-columns: 1fr;
  }
  .export-options,
  .export-sidebar {
    padding: 18px;
  }
  .export-sidebar {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .export-scopes {
    grid-template-columns: 1fr;
  }
  .export-symbol {
    display: none;
  }
  .export-dialog .dialog-footer {
    flex-wrap: wrap;
  }
  .export-dialog .dialog-footer > small {
    width: 100%;
    order: 3;
  }
  .export-choice {
    padding: 13px;
  }
  .export-progress,
  .export-success {
    padding: 16px;
    margin: 14px;
  }
  .export-step {
    font-size: 13px;
  }
  .export-status {
    bottom: 90px;
    right: 12px;
  }
}

.export-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  max-height: 90dvh;
}
.export-dialog .dialog-head,
.export-dialog .dialog-footer {
  flex-shrink: 0;
  background: var(--solid);
}
.export-dialog .dialog-body {
  overflow-y: auto;
  min-height: 0;
}
.export-more > label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.export-more input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
@media (max-width: 700px) {
  .book-heading .actions > [data-export] {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 0;
    padding: 10px;
    min-width: 0;
  }
  .book-heading .actions > [data-export] > .icon {
    width: 24px;
    height: 24px;
  }
  .flight-book:not(.journal-book) .book-heading {
    padding-right: 105px;
  }
  .flight-book:not(.journal-book) .book-heading > .segment {
    width: calc(100% + 105px);
  }
}
.export-dialog .dialog-footer .btn,
.export-download .btn {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
}

/* Gallery period filter mirrors the flight-book rail. */
.gallery-content {
  min-width: 0;
}
.gallery-content > .page-heading {
  flex-wrap: wrap;
}
.gallery-with-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 24px;
  align-items: start;
}
.gallery-timeline {
  position: sticky;
  right: auto;
  top: 95px;
  width: 70px;
  background: #1b2433;
}
[data-theme='light'] .gallery-timeline {
  background: #f5f7fa;
}
.gallery-timeline .gallery-timeline-year {
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.gallery-timeline button[aria-pressed='true'] {
  color: var(--accent);
  font-weight: 700;
}
.gallery-timeline button[aria-pressed='true'] i {
  background: var(--accent);
}
@media (max-width: 700px) {
  .gallery-with-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .gallery-with-timeline > .gallery-content {
    display: contents;
  }
  .gallery-with-timeline .page-heading {
    order: 0;
  }
  .gallery-with-timeline .gallery-filters {
    order: 1;
  }
  .gallery-with-timeline > .gallery-timeline {
    order: 2;
  }
  .gallery-with-timeline .gallery-section,
  .gallery-with-timeline .gallery-map-layout,
  .gallery-with-timeline .empty {
    order: 3;
    width: 100%;
  }
  .gallery-timeline {
    display: block;
    position: static;
    width: 100%;
    max-height: none;
    margin: 18px 0;
    padding: 12px;
    border-radius: 14px;
    background: var(--panel);
  }
  .gallery-timeline .gallery-timeline-year {
    width: auto;
    margin-bottom: 6px;
  }
  .gallery-timeline-months,
  .gallery-timeline-years {
    display: flex;
    gap: 12px;
    overflow-x: auto;
  }
  .gallery-timeline-months {
    flex-direction: row-reverse;
  }
  .gallery-timeline-months button {
    flex: 1 0 35px;
    flex-direction: column;
    align-items: flex-start;
    min-height: 44px;
    font-size: 12px;
  }
  .gallery-timeline-years button {
    width: auto;
    flex-shrink: 0;
    min-height: 40px;
    font-size: 12px;
  }
}

/* Unified flight editor: the preview stays beside independently scrolling tabs. */
.flight-editor-dialog {
  width: min(1250px, calc(100vw - 32px));
  max-width: 1250px;
  background: #1b2433;
}
.flight-editor-dialog .dialog-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.flight-editor-dialog .dialog-head h2 {
  margin: 0;
  font-size: 22px;
}
.flight-editor-dialog .dialog-head p {
  flex-basis: 100%;
  margin: 0;
}
.flight-draft-badge {
  border: 1px solid #6a5328;
  background: #2a2214;
  color: #f0b44c;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.flight-editor-dialog .dialog-body {
  padding: 0;
  overflow: hidden;
}
.flight-editor-layout {
  display: grid;
  grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
  height: min(680px, calc(90dvh - 190px));
  min-height: 260px;
}
.flight-editor-preview {
  min-width: 0;
  background: #172030;
  border-right: 1px solid #263243;
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flight-editor-dialog .flight-track-preview .geo-map {
  height: 250px !important;
}
.flight-editor-dialog .flight-track-preview .altitude {
  height: 105px;
}
.flight-editor-dialog .flight-track-preview .missing-data,
.flight-editor-dialog .flight-track-preview .chart-title,
.flight-editor-dialog .flight-track-preview .altitude-legend {
  display: none;
}
.flight-editor-dialog .flight-track-metrics {
  grid-template-columns: 1fr 1fr;
  margin: 0;
}
.flight-editor-dialog .flight-track-metrics > div {
  border: 1px solid #2c3849;
  background: #151d2a;
  padding: 10px 12px;
}
.flight-editor-dialog .flight-track-metrics strong {
  font-family: monospace;
  font-size: 19px;
}
.flight-editor-dialog .flight-track-metrics > div:nth-child(3) strong {
  color: #8fddb0;
}
.flight-preview-status {
  padding: 12px;
  border: 1px solid #296144;
  background: #15271f;
  color: #8fddb0;
  border-radius: 12px;
  font-size: 12px;
  margin: 0;
}
.flight-preview-route {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.flight-editor-preview > .flight-preview-hint {
  margin-top: auto;
  border: 0;
  padding: 0;
  font-size: 11px;
}
.flight-editor-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.flight-editor-tabs {
  display: flex;
  border-bottom: 1px solid #263243;
  flex-shrink: 0;
  overflow-x: auto;
  padding: 0 10px;
  scrollbar-width: thin;
}
.flight-editor-tabs > button {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  padding: 16px 12px;
  font-size: 13px;
  cursor: pointer;
}
.flight-editor-tabs > button[aria-selected='true'] {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: #5ea8f2;
}
.flight-tab-status {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px dashed #3a475a;
  border-radius: 50%;
  font-size: 11px;
}
.flight-tab-status.done {
  background: #1e3a2c;
  border: 0;
  color: #8fddb0;
}
.flight-editor-panel {
  padding: 22px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.flight-editor-dialog .flight-when .form-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}
.flight-editor-dialog .flight-where .form-grid {
  grid-template-columns: 1fr 1fr;
}
.flight-editor-dialog .flight-where label:has([name='area']) {
  grid-column: 1/-1;
}
.flight-editor-dialog .form-grid label {
  position: relative;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.flight-editor-dialog .form-grid label > input,
.flight-editor-dialog .form-grid label > select,
.flight-editor-dialog .form-grid label > textarea {
  width: 100%;
  flex-basis: 100%;
  margin-top: 0;
  background: #151d2a;
  border-color: #2c3849;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
}
.flight-editor-dialog .form-grid label > small.flight-place-distance {
  display: block !important;
  font-size: 11px;
  order: 5;
  flex-basis: 100%;
}
.flight-editor-dialog .flight-chips {
  margin-left: 0 !important;
  flex-basis: 100%;
}
.flight-editor-dialog .flight-chips button[data-field='wing'] {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.flight-editor-dialog .flight-chips .flight-wing-serial {
  display: inline;
  font-size: 0.85em;
  font-weight: 400;
  color: inherit;
}
.flight-editor-dialog .flight-source-chip {
  order: -1;
  font-size: 10px;
  border: 0;
  background: #1f3550;
  color: #9cc3ea;
  border-radius: 999px;
  padding: 4px 7px;
  cursor: pointer;
}
.flight-editor-dialog .flight-source-chip:disabled {
  opacity: 1;
  cursor: default;
}
.flight-editor-dialog .flight-source-chip.changed {
  background: #2a2214;
  color: #f0b44c;
}
.flight-place-edit {
  margin-left: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  order: -1;
}
.flight-time-summary {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.flight-source-help {
  font-size: 12px;
  line-height: 1.6;
  padding: 14px;
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 12px;
}
.flight-editor-dialog .flight-fields:has([name='wing']) label > small {
  display: none;
}
.flight-tag-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 12px;
}
.flight-tag-box .flight-chips {
  flex-basis: auto;
}
.flight-tag-box input {
  flex: 1;
  min-width: 180px !important;
  background: none;
  border: 0;
}
.flight-frequent-tags > span {
  border: 0;
  padding: 0;
  color: var(--muted);
}
.flight-editor-dialog .editor-section {
  margin: 14px 0;
}
.flight-editor-dialog #form-error:not(:empty) {
  padding: 10px 22px;
  flex-shrink: 0;
}
.flight-editor-dialog #form-error:empty {
  display: none;
}
.flight-no-track {
  border-radius: 14px;
  background: #20354b;
  padding: 35px 20px;
  text-align: center;
  line-height: 1.8;
}
.flight-no-track small {
  color: var(--muted);
}
.flight-editor-dialog .dialog-footer > span {
  max-width: 420px;
}
.flight-height-switch {
  border: 1px solid #2c3849;
  border-radius: 12px;
  padding: 4px;
  background: #151d2a;
}
.flight-height-switch > button {
  flex: 1;
  border-radius: 8px;
  border: 0;
}
.flight-editor-dialog .flight-height-switch button:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 1000px) {
  .flight-editor-tabs > button {
    font-size: 12px;
    padding: 14px 8px;
    gap: 5px;
  }
  .flight-editor-panel {
    padding: 16px;
  }
  .flight-editor-dialog .dialog-footer > span {
    flex-basis: 100%;
    max-width: none;
  }
}
@media (max-width: 760px) {
  .flight-editor-dialog {
    width: calc(100vw - 16px);
  }
  .flight-editor-dialog .dialog-body {
    overflow: auto;
  }
  .flight-editor-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .flight-editor-preview {
    border-right: 0;
    border-bottom: 1px solid #263243;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .flight-editor-preview > .flight-track-preview,
  .flight-editor-preview > .flight-no-track {
    grid-column: 1/-1;
  }
  .flight-editor-dialog .flight-track-preview .geo-map {
    height: 150px !important;
  }
  .flight-editor-dialog .flight-track-preview .altitude {
    height: 70px;
  }
  .flight-editor-preview > .flight-preview-hint {
    display: none;
  }
  .flight-editor-preview .flight-track-metrics {
    grid-column: 1/-1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .flight-editor-preview .flight-track-metrics > div {
    padding: 8px;
  }
  .flight-editor-preview .flight-track-metrics strong {
    font-size: 14px;
  }
  .flight-editor-preview .flight-preview-status,
  .flight-editor-preview .flight-preview-route {
    grid-column: 1/-1;
  }
  .flight-editor-main {
    overflow: visible;
  }
  .flight-editor-tabs {
    position: sticky;
    top: 0;
    background: #1b2433;
    z-index: 2;
  }
  .flight-editor-panel {
    overflow: visible;
    padding: 16px;
  }
  .flight-editor-dialog .flight-when .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .flight-editor-dialog .flight-when label:has([name='date']) {
    grid-column: 1/-1;
  }
  .flight-editor-dialog .flight-where .form-grid {
    grid-template-columns: 1fr;
  }
  .flight-editor-dialog .dialog-footer > span {
    font-size: 11px;
  }
  .flight-editor-dialog .dialog-footer .btn {
    flex: 1;
    white-space: normal;
  }
  .flight-draft-badge {
    font-size: 10px;
  }
  .flight-editor-dialog .flight-chips button {
    padding: 8px 10px;
    font-size: 12px;
  }
  .flight-editor-dialog .flight-time-details .form-grid {
    grid-template-columns: 1fr;
  }
}

.flight-editor-dialog .flight-fields.flight-where .form-grid {
  grid-template-columns: 1fr 1fr;
}
.flight-field-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 22px;
}
.flight-editor-dialog .flight-field-heading .flight-source-chip,
.flight-editor-dialog .flight-field-heading .flight-place-edit {
  order: 0;
}
.flight-editor-dialog .flight-fields:has([name='site']) {
  margin-bottom: 18px;
}
@media (max-width: 760px) {
  .flight-editor-dialog .flight-fields.flight-where .form-grid {
    grid-template-columns: 1fr;
  }
}

.flight-editor-dialog .flight-file-info {
  border: 0;
  padding: 0;
  background: none;
}
.flight-file-info dl {
  margin: 12px 0;
}
.flight-file-info dl > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #263243;
  font-size: 13px;
}
.flight-file-info dt {
  color: var(--muted);
}
.flight-file-info dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.flight-preview-status.has-warnings {
  border-color: #6a5328;
  background: #2a2214;
  color: #f0b44c;
}
.flight-editor-panel .track-quality:not(.has-warnings) {
  background: #15271f;
  border-color: #296144;
}
.flight-file-info > summary {
  color: #8fa8c6;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}
@media (max-width: 760px) {
  .flight-file-info dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Equipment: shared private products and maintenance, designs 17–17j. */
.eq-page {
  --eq-bg: #121925;
  --eq-card: #1b2433;
  --eq-border: #2c3849;
  --eq-inner: #151d2a;
  --eq-text: #e8edf4;
  --eq-muted: #a3afc0;
  color: var(--eq-text);
  font-family: 'IBM Plex Sans', sans-serif;
  padding-bottom: 32px;
}
.eq-page .muted,
.eq-page small {
  color: var(--eq-muted);
}
.eq-page .card {
  background: var(--eq-card);
  border: 1px solid var(--eq-border);
  border-radius: 18px;
  box-shadow: none;
}
.eq-page h1 {
  font-size: 32px;
  margin: 0 0 6px;
}
.eq-page h2 {
  font-size: 21px;
  margin: 0 0 16px;
}
.eq-page h3 {
  font-size: 20px;
  margin: 0;
}
.eq-page p {
  margin: 8px 0 16px;
}
.eq-page .btn,
.eq-dialog .btn {
  min-height: 44px;
  border-radius: 12px;
}
.eq-page button:focus-visible,
.eq-page a:focus-visible,
.eq-dialog button:focus-visible,
.eq-choice:has(input:focus-visible),
.eq-drop:focus-visible {
  outline: 2px solid var(--eq-link, #7dbbf7);
  outline-offset: 3px;
}
.eq-glider {
  --eq-color: #5ea8f2;
  --eq-type-bg: #16283f;
}
.eq-harness {
  --eq-color: #5cc48a;
  --eq-type-bg: #15291f;
}
.eq-reserve {
  --eq-color: #f2946b;
  --eq-type-bg: #2e1e17;
}
.eq-instrument {
  --eq-color: #5fcfd8;
  --eq-type-bg: #132a2d;
}
.eq-type-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--eq-type-bg);
  color: var(--eq-color);
}
.eq-type-icon svg {
  width: 24px;
  height: 24px;
}
.eq-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--eq-type-bg, var(--eq-inner));
  color: var(--eq-color, var(--eq-muted));
  font-size: 13px;
  white-space: nowrap;
}
.eq-chip svg {
  width: 19px;
  height: 19px;
}
.eq-text-button {
  color: var(--eq-link, #7dbbf7);
  background: none;
  border: 0;
  padding: 5px 0;
  min-height: 40px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.eq-text-button h3 {
  color: var(--eq-text);
}
.eq-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin: 0;
}
.eq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eq-chips .btn {
  gap: 7px;
  font-size: 14px;
}
.eq-chips svg {
  width: 20px;
  height: 20px;
  color: var(--eq-color);
}
.eq-filters .eq-chips .btn {
  --button-height: 23px;
  min-height: 23px;
  padding: 1px 7px;
  border-radius: 7px;
  gap: 4px;
  font-size: 12px;
}
.eq-filters .eq-chips svg {
  width: 14px;
  height: 14px;
}
.eq-chips .selected {
  background: #203853;
  border-color: #4375a4;
}
.eq-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--eq-muted);
  white-space: nowrap;
}
.eq-toggle input {
  width: 22px;
  height: 22px;
  accent-color: #2470c8;
}
.eq-summary {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin: 20px 0 32px;
}
.eq-panel {
  padding: 24px;
  margin: 0 0 24px;
}
.eq-page > .eq-summary {
  margin-top: 0;
}
.eq-summary .eq-panel {
  margin: 0;
}
.eq-term {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--eq-border);
  font-size: 13px;
}
.eq-term .eq-text-button:first-of-type {
  flex: 1;
  color: var(--eq-text);
}
.eq-term small,
.eq-term strong {
  display: block;
}
.eq-term .eq-type-icon {
  width: 32px;
  height: 32px;
}
.eq-term .eq-pill {
  font-size: 12px;
  white-space: normal;
}
.eq-legend {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.eq-legend > div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.eq-legend i {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 3px;
}
.eq-legend button {
  color: var(--eq-text);
  flex: 1;
  min-height: 30px;
}
.eq-legend span {
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
}
.eq-summary .equipment-hint {
  margin-top: 26px;
}
.eq-section {
  margin: 28px 0;
}
.eq-section > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.eq-section > h2:after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--eq-border);
}
.eq-section > h2 small {
  font-weight: 400;
  font-size: 14px;
}
.eq-section .equipment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  display: grid;
}
.eq-card {
  position: relative;
  padding: 14px 14px 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eq-card p {
  font-size: 14px;
  margin: 0 0 8px;
}
.eq-card .equipment-badge {
  position: absolute;
  left: 26px;
  top: 26px;
  background: #111b29;
  color: #d9e6f7;
  border: 1px solid var(--eq-border);
  max-width: calc(100% - 50px);
  font-size: 12px;
  padding: 6px 10px;
}
.eq-card .equipment-badge.active {
  color: #76d4a0;
  border-color: #305d46;
}
.eq-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.eq-card-title .eq-text-button {
  min-width: 0;
}
.eq-card-title h3 {
  overflow-wrap: anywhere;
}
.eq-card .equipment-data {
  margin: 2px 0 6px;
}
.eq-card .equipment-data strong {
  font-size: 21px;
  font-family: 'IBM Plex Mono', monospace;
}
.eq-card .equipment-data small {
  font-size: 12px;
}
.eq-card .equipment-data > div {
  min-width: 0;
}
.eq-card-edit {
  align-self: flex-end;
}
.eq-card-footer {
  margin-top: auto;
  border-top: 1px solid var(--eq-border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.eq-linked {
  background: var(--eq-inner);
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
}
.eq-linked button {
  min-height: 24px;
}
.eq-photo {
  height: 220px;
  width: 100%;
  border: 1px dashed var(--eq-border);
  border-radius: 14px;
  background: var(--eq-type-bg);
  color: var(--eq-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.eq-photo > svg {
  width: 64px;
  height: 64px;
}
.eq-photo > span {
  color: var(--eq-muted);
  font-size: 13px;
}
.eq-photo.has-photo {
  background: linear-gradient(135deg, #243247, var(--eq-inner));
  border-style: solid;
}
.eq-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.eq-add-tile {
  min-height: 230px;
  border: 1px dashed var(--eq-border);
  background: transparent;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--eq-text);
  cursor: pointer;
}
.eq-add-tile svg {
  width: 42px;
  height: 42px;
  padding: 10px;
  box-sizing: content-box;
  border-radius: 15px;
  background: var(--eq-type-bg);
  color: var(--eq-color);
}
.eq-add-tile small {
  max-width: 80%;
  font-size: 13px;
}
.eq-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--eq-border);
  font-size: 12px;
  background: var(--eq-inner);
  color: var(--eq-muted);
  overflow-wrap: anywhere;
  white-space: normal;
}
.eq-pill.incomplete {
  border-style: dashed;
  font-weight: 600;
}
.eq-pill.ok {
  background: #19352b;
  color: #79d6a1;
  border-color: #29523e;
}
.eq-pill.soon {
  background: #302715;
  color: #f0b44c;
  border-color: #695022;
}
.eq-pill.late {
  background: #3c2228;
  color: #ff8a8a;
  border-color: #663039;
}
.eq-page progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  appearance: none;
  background: #101824;
  accent-color: #5ea8f2;
}
.eq-page progress::-webkit-progress-bar {
  background: #101824;
}
.eq-page progress::-webkit-progress-value {
  background: #5ea8f2;
  border-radius: 8px;
}
.eq-page progress::-moz-progress-bar {
  background: #5ea8f2;
}
.eq-page progress.soon::-webkit-progress-value {
  background: #f0b44c;
}
.eq-page progress.late::-webkit-progress-value {
  background: #ff8a8a;
}
.eq-page progress.ok::-webkit-progress-value {
  background: #5cc48a;
}
.eq-detail-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.eq-detail-head > div {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.eq-detail-head > span {
  font-size: 14px;
}
.eq-hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  margin-bottom: 28px;
}
.eq-hero .eq-photo {
  height: 100%;
  min-height: 370px;
  box-sizing: border-box;
}
.eq-hero > .eq-facts {
  margin-top: 0;
  box-sizing: border-box;
}
.eq-hero > .eq-flight-link {
  align-self: start;
  margin-top: 0;
}
.eq-photo-tools {
  min-width: 0;
}
.eq-detail-title {
  margin-bottom: 24px;
}
.eq-detail-title h1 {
  margin: 12px 0 8px;
  font-size: 36px;
}
.eq-detail-title p {
  margin: 0 0 12px;
}
.eq-detail-labels {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eq-detail-labels > .eq-chip,
.eq-detail-labels > .eq-pill {
  height: 32px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.eq-event-date {
  min-height: 32px;
  font-size: 13px;
}
.eq-photo-caption {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #111b29;
  padding: 8px 12px;
  border-radius: 9px;
}
.eq-thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.eq-thumbnails button {
  width: 64px;
  height: 64px;
  background: var(--eq-inner);
  border: 1px dashed var(--eq-border);
  border-radius: 10px;
  color: var(--eq-muted);
  cursor: pointer;
  font-size: 24px;
}
.eq-thumbnails button[aria-pressed='true'] {
  border: 2px solid #5ea8f2;
}
.eq-thumbnails img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.eq-photo-actions {
  display: flex;
  gap: 20px;
}
.eq-hero h1 {
  margin-top: 16px;
  font-size: 36px;
}
.eq-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
  margin-top: 20px;
}
.eq-facts > div {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--eq-border);
  padding-bottom: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.eq-facts small {
  font-size: 12px;
  display: block;
}
.eq-facts span {
  padding-top: 8px;
  font-size: 14px;
}
.eq-facts .eq-text-button {
  font-size: 14px;
  min-height: 30px;
}
.eq-facts p {
  grid-column: 1/-1;
  margin: 0;
}
.eq-flight-link {
  margin-top: 12px;
}
.eq-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.eq-metrics > div {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--eq-border);
  background: var(--eq-inner);
  border-radius: 14px;
  min-width: 0;
}
.eq-metrics strong {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
}
.eq-metrics small {
  font-size: 12px;
}
.eq-number {
  font-family: 'IBM Plex Mono', monospace;
}
.eq-link-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--eq-inner);
  border: 1px solid var(--eq-border);
  padding: 16px;
  border-radius: 14px;
}
.eq-link-row > div {
  flex: 1;
}
.eq-link-row p {
  margin: 8px 0;
}
.eq-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.eq-panel-head h2 {
  margin: 0;
}
.eq-maintenance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.eq-check-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: 20px;
  margin-bottom: 12px;
  background: var(--eq-inner);
  border: 1px solid var(--eq-border);
  border-radius: 14px;
}
.eq-check-status {
  display: grid;
  justify-items: start;
  gap: 10px;
  min-width: 0;
}
.eq-check-status h3 {
  margin: 0;
  color: var(--eq-text);
  font-size: 22px;
}
.eq-check-card p {
  margin: 0;
  line-height: 1.5;
}
.eq-check-card > .equipment-hint {
  margin: 12px 0;
}
.eq-check-criteria {
  display: grid;
  gap: 14px;
  margin: 0;
}
.eq-check-criteria > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.eq-check-criteria dt {
  color: var(--eq-muted);
  font-size: 13px;
}
.eq-check-criteria dd {
  margin: 0;
  text-align: right;
  color: var(--eq-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.eq-check-disclosure {
  border-top: 1px solid var(--eq-border);
}
.eq-check-disclosure > summary {
  padding: 16px 0;
  cursor: pointer;
  color: var(--eq-text);
  font-weight: 500;
}
.eq-check-disclosure > summary small {
  margin-left: 8px;
  color: var(--eq-muted);
  font-weight: 400;
}
.eq-check-settings,
.eq-check-details {
  display: grid;
  gap: 16px;
  padding-bottom: 20px;
  max-width: 760px;
}
.eq-check-disclosure > .eq-timeline {
  padding: 4px 0 8px;
}
@media (max-width: 600px) {
  .eq-check-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
  }
}
.eq-inset {
  padding: 20px;
  background: var(--eq-inner);
  border: 1px solid var(--eq-border);
  border-radius: 14px;
}
.eq-inset h2 {
  margin-top: 20px;
}
.eq-timeline > div {
  border-left: 2px solid var(--eq-border);
  padding: 0 0 24px 20px;
  position: relative;
}
.eq-timeline > div:before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5ea8f2;
  left: -6px;
  top: 6px;
}
.eq-timeline h3 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--eq-muted);
  margin-bottom: 20px;
}
.eq-timeline small {
  display: block;
  margin-top: 6px;
}
.eq-timeline a {
  display: block;
  color: var(--eq-link, #7dbbf7);
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.eq-document {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--eq-border);
  border-radius: 14px;
  background: var(--eq-inner);
  padding: 14px;
  margin-top: 12px;
}
.eq-document > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.eq-document strong {
  font-size: 14px;
}
.eq-document small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}
.eq-file-icon {
  font-size: 28px;
  color: var(--eq-muted);
  background: #243247;
  padding: 10px;
  border-radius: 10px;
}
.eq-document a {
  text-decoration: none;
}
.eq-drop {
  margin-top: 16px;
  padding: 20px;
  border: 1px dashed #4375a4;
  border-radius: 14px;
  background: var(--eq-inner);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  cursor: pointer;
}
.eq-drop small {
  flex: 1;
  min-width: 160px;
}
.eq-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.eq-dialog {
  box-sizing: border-box;
  min-width: 0;
  max-width: 1120px !important;
  width: calc(100vw - 32px) !important;
  color: var(--eq-text);
  background: var(--eq-card) !important;
  border: 1px solid var(--eq-border) !important;
  border-radius: 18px !important;
  --eq-card: #1b2433;
  --eq-text: #e8edf4;
  --eq-muted: #a3afc0;
  --eq-border: #2c3849;
  --eq-inner: #151d2a;
}
.eq-dialog .dialog-body {
  padding: 24px;
}
.eq-dialog .dialog-head,
.eq-dialog .dialog-footer {
  border-color: var(--eq-border);
}
.eq-dialog .eq-photo {
  height: 270px;
}
.eq-dialog .muted {
  color: var(--eq-muted);
}
.eq-editor-columns {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
}
.eq-type-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.eq-type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 10px;
  color: var(--eq-text);
  border: 1px solid var(--eq-border);
  background: var(--eq-inner);
  border-radius: 16px;
  min-height: 76px;
  cursor: pointer;
  font: inherit;
}
.eq-type-option svg {
  width: 30px;
  height: 30px;
  color: var(--eq-color);
}
.eq-type-option.selected {
  border: 2px solid var(--eq-color);
  background: var(--eq-type-bg);
}
.eq-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-width: 0;
}
.eq-fieldset legend {
  color: var(--eq-muted);
  margin-bottom: 12px;
  font-size: 14px;
}
.eq-fields {
  display: grid;
  gap: 18px;
}
.eq-fields label,
.eq-form-row label,
.eq-document-draft label,
.eq-dialog #eq-document-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--eq-muted);
}
.eq-form-row {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  align-items: flex-start;
}
.eq-form-row > * {
  flex: 1;
  min-width: 0;
}
.eq-fields .eq-form-row {
  margin: 0;
}
.eq-reserve-lifecycle {
  margin: 0;
}
.eq-reserve-lifecycle-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.eq-reserve-lifecycle-content > p {
  margin: 0;
  line-height: 1.55;
}
.eq-history {
  padding-top: 16px;
  border-top: 1px solid var(--eq-border);
}
.eq-history legend {
  padding-right: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--eq-text);
}
.eq-history-content {
  display: grid;
  gap: 24px;
}
.eq-history-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.eq-history-section + .eq-history-section {
  padding-top: 20px;
  border-top: 1px solid var(--eq-border);
}
.eq-history-section h3 {
  margin: 0;
  color: var(--eq-text);
  font-size: 16px;
}
.eq-history p {
  margin: 0;
  line-height: 1.55;
}
.eq-history-help {
  font-size: 13px;
}
.eq-history-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 16px;
}
.eq-history-explanation {
  color: var(--eq-muted);
  font-size: 13px;
  line-height: 1.55;
}
.eq-history-explanation summary {
  cursor: pointer;
}
.eq-history-explanation[open] summary {
  margin-bottom: 8px;
}
.eq-fields .eq-history-confirm {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  background: var(--eq-inner);
  line-height: 1.5;
  cursor: pointer;
}
.eq-fields .eq-history-confirm input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #2470c8;
}
@media (max-width: 600px) {
  .eq-history-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.eq-fields input,
.eq-fields select,
.eq-fields textarea,
.eq-inset input,
.eq-dialog input:not([type='radio']):not([type='checkbox']),
.eq-dialog select,
.eq-dialog textarea {
  width: 100%;
  min-height: 44px;
  background: var(--eq-inner);
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  color: var(--eq-text);
  padding: 12px;
  box-sizing: border-box;
  font: inherit;
}
.eq-fields input[type='number'],
.eq-fields input[type='date'] {
  font-family: 'IBM Plex Mono', monospace;
}
.eq-choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.eq-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.eq-choice span {
  display: block;
  border: 1px solid var(--eq-border);
  border-radius: 22px;
  padding: 10px 14px;
  color: var(--eq-muted);
  font-size: 14px;
}
.eq-choice input:checked + span {
  border-color: #5ea8f2;
  background: #203853;
  color: var(--eq-text);
}
.eq-staged-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.eq-staged-photos > div {
  position: relative;
  width: 64px;
  height: 64px;
}
.eq-staged-photos img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.eq-staged-photos button {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 40px;
  min-height: 40px;
  background: var(--eq-inner);
  color: var(--eq-text);
  border: 1px solid var(--eq-border);
  border-radius: 10px;
}
.eq-staged-doc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.eq-staged-doc label {
  font-size: 13px;
  display: grid;
  gap: 6px;
}
.eq-staged-doc button {
  align-self: flex-end;
  min-height: 40px;
  min-width: 40px;
}
.eq-link-heading {
  display: flex;
  justify-content: center;
  gap: 30px;
  align-items: center;
  margin-bottom: 20px;
}
.eq-link-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 58px;
  border: 1px solid var(--eq-border);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
  cursor: pointer;
}
.eq-link-choice:has(input:checked) {
  border-color: #5ea8f2;
  background: #203853;
}
.eq-link-choice input {
  width: 20px;
  height: 20px;
  accent-color: #2470c8;
}
#eq-link-form h3,
.eq-link-choice strong,
.eq-link-choice small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.eq-link-choice small {
  width: 100%;
  padding-left: 32px;
  color: var(--eq-muted);
}
.eq-link-choice.occupied {
  opacity: 0.75;
}
.eq-link-choice.occupied small {
  color: #f0b44c;
}
.eq-reserve-options {
  margin-left: 20px;
}
.eq-document-draft {
  padding: 14px;
  border-bottom: 1px solid var(--eq-border);
}
.eq-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 1150px) {
  .eq-section .equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eq-summary {
    grid-template-columns: 1fr;
  }
  .eq-filters {
    align-items: flex-start;
    flex-direction: column;
  }
  .eq-hero {
    grid-template-columns: 1fr 1fr;
  }
  .eq-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eq-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .eq-page h1 {
    font-size: 27px;
  }
  .eq-section .equipment-grid,
  .eq-hero,
  .eq-maintenance,
  .eq-editor-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .eq-panel {
    padding: 16px;
  }
  .eq-summary {
    gap: 16px;
  }
  .eq-term {
    flex-wrap: wrap;
  }
  .eq-term .eq-text-button:first-of-type {
    min-width: calc(100% - 60px);
  }
  .eq-term .eq-pill {
    margin-left: 44px;
  }
  .eq-detail-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .eq-detail-head > span {
    flex: 1;
  }
  .eq-detail-head > div {
    width: 100%;
    justify-content: flex-end;
  }
  .eq-hero .eq-photo {
    height: 300px;
    min-height: 0;
  }
  .eq-hero > .eq-photo-tools {
    grid-row: 2;
  }
  .eq-detail-title h1 {
    font-size: 27px;
  }
  .eq-document {
    flex-wrap: wrap;
  }
  .eq-document > div {
    min-width: calc(100% - 70px);
  }
  .eq-type-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eq-dialog .dialog-body {
    padding: 16px;
  }
  .eq-type-option {
    padding: 12px 8px;
    font-size: 14px;
  }
  .eq-form-row {
    flex-wrap: wrap;
  }
  .eq-form-row > label {
    flex-basis: 140px;
  }
  .eq-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .eq-legend > div {
    flex-wrap: wrap;
  }
  .eq-legend button {
    min-width: 100px;
  }
  .eq-toggle {
    white-space: normal;
  }
  .eq-chip {
    white-space: normal;
  }
  .eq-dialog .dialog-footer {
    flex-wrap: wrap;
  }
  .eq-dialog .dialog-footer p {
    flex-basis: 100%;
  }
  .eq-reserve-options {
    margin-left: 0;
  }
}
.eq-page .btn.primary,
.eq-dialog .btn.primary {
  background: #2470c8;
  color: #fff;
  border-color: #2470c8;
}
.eq-dialog:has(#eq-link-form) {
  max-width: 820px !important;
}
.eq-dialog:has(#eq-event-form),
.eq-dialog:has(#eq-document-form) {
  max-width: 640px !important;
}
.eq-dialog {
  font-family: 'IBM Plex Sans', sans-serif;
}
.eq-page .btn,
.eq-dialog .btn {
  font-family: inherit;
}

.flight-tag-suggestions {
  flex-basis: 100%;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #4375a4;
  border-radius: 12px;
  background: #151d2a;
  padding: 4px;
  box-sizing: border-box;
}
.flight-tag-suggestions[hidden] {
  display: none;
}
.flight-tag-suggestions button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8edf4;
  text-align: left;
  padding: 12px;
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.flight-tag-suggestions button:hover,
.flight-tag-suggestions button[aria-selected='true'] {
  background: #203853;
  color: #9cc3ea;
}

/* Standard action buttons share their outer height in every view. */
:root .btn:not(.text):not([data-replay-toggle]):not(.flight-map-fullscreen) {
  height: var(--button-height);
  min-height: var(--button-height);
  padding-block: 0;
}

@media (max-width: 760px) {
  .flight-editor-dialog .dialog-footer .btn {
    flex: 1 1 140px;
  }
}

/* Landing approach: readable findings, supporting facts and replay actions. */
.approach-summary {
  margin: 18px 0 12px;
}
.analysis-approach h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.approach-summary p {
  margin: 4px 0 0;
  font-size: 12px;
}
.approach-summary strong {
  color: var(--text);
}
.approach-hints {
  list-style: none;
  margin: 12px 0 18px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--panel);
  font-size: 12px;
  line-height: 1.6;
}
.approach-hints li + li {
  margin-top: 6px;
}
.approach-facts {
  margin: 0;
  display: grid;
  gap: 0;
  font-size: 12px;
  line-height: 1.6;
}
.approach-facts > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.approach-facts dt {
  color: var(--muted);
  font-weight: 500;
}
.approach-facts dd {
  margin: 0;
  color: var(--text);
}
.approach-facts dd span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.approach-legs-heading {
  margin-top: 22px;
}
.approach-legs-heading p {
  margin: 4px 0 8px;
}
.approach-legs thead th {
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
}
.approach-legs tbody th .btn {
  font-size: 12px;
}
.approach-legs .approach-missing {
  font:
    11px Geist,
    system-ui;
  color: var(--muted);
}
.approach-map-notes {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.approach-map-notes summary {
  cursor: pointer;
  font-weight: 500;
}
.approach-map-notes p {
  margin: 8px 0 0;
}
@media (max-width: 600px) {
  .approach-facts > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.approach-legs caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Journal 18 / 18b: a single editor and the shared feed card. */
.flight-journal-page.journal-simple-page {
  display: block;
  background: #121925;
  padding: 28px 20px;
  color: #e8edf4;
  font-family: 'IBM Plex Sans', sans-serif;
}
.journal-simple-page > div {
  max-width: 960px;
  margin: auto;
  min-width: 0;
}
.journal-simple-page [hidden] {
  display: none !important;
}
.journal-simple-page .journal-simple {
  background: #1b2433;
  border: 1px solid #2c3849;
  border-radius: 20px;
  overflow: hidden;
}
.journal-simple-page .journal-simple .journal-entry-text {
  padding: 24px 28px;
  min-height: 0;
}
.journal-simple .journal-title-input {
  font:
    700 24px/1.3 'IBM Plex Sans',
    sans-serif !important;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #2c3849;
  border-radius: 0;
  padding: 12px 0 16px;
  margin: 0 0 22px;
  color: #e8edf4;
}
.journal-simple .journal-text-field {
  border: 1px solid #2c3849;
  border-radius: 14px;
  overflow: hidden;
  background: #151d2a;
}
.journal-simple .journal-text-field:focus-within {
  border-color: #2470c8;
}
.journal-simple .journal-template-tools {
  margin-bottom: 16px;
}
.journal-simple .journal-template-tools button {
  min-height: 44px;
  white-space: normal;
  color: var(--text);
  border: 1px solid var(--border);
}
.journal-simple .journal-template-picker {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--journal-inset);
  color: var(--text);
}
.journal-simple .journal-template-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.journal-simple .journal-template-choices button[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.journal-simple .journal-template-questions {
  margin: 16px 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}
.journal-simple .journal-template-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.journal-simple .journal-template-hint {
  flex: 1 1 230px;
  color: var(--muted);
  font-size: 13px;
}
.journal-simple .journal-toolbar {
  border: 0;
  border-bottom: 1px solid #2c3849;
  border-radius: 0;
  margin: 0;
  padding: 0 10px;
  background: #151d2a;
}
.journal-simple .journal-rich-editor {
  font:
    400 16px/1.7 'IBM Plex Sans',
    sans-serif;
  min-height: 260px;
  padding: 16px 18px;
  box-shadow: none;
  color: #e8edf4;
}
.journal-simple .journal-rich-editor:empty:before {
  font-style: normal;
  color: #a3afc0;
}
.journal-simple button,
.journal-simple summary,
.journal-simple-page .journal-editor-head button,
.journal-feed-post button {
  min-height: 40px;
  font-family: inherit;
}
.journal-simple button:focus-visible,
.journal-simple summary:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 2px;
}
.journal-simple .journal-media-strip {
  display: block !important;
  padding: 24px 28px 0 !important;
  border: 0;
  background: transparent;
}
.journal-simple .journal-media-strip[hidden] {
  display: none !important;
}
.journal-simple .photo-grid {
  gap: 14px;
  padding: 4px;
  scrollbar-width: thin;
}
.journal-simple .photo-grid figure,
.journal-simple .photo-grid figure:first-child,
.journal-simple .photo-grid .journal-track,
.journal-simple .photo-grid .journal-add-media {
  position: relative;
  flex: 0 0 200px;
  min-width: 200px;
  width: 200px;
  height: 132px;
  min-height: 132px;
  max-height: 132px;
  margin: 0;
  border-radius: 14px;
}
.journal-simple .photo-grid figure.is-cover {
  outline: 3px solid #f0b44c;
}
.journal-simple .photo-grid .journal-track {
  background: #1b3029;
  padding: 0;
}
.journal-simple .photo-grid .journal-track svg {
  width: 100%;
  height: 100%;
}
.journal-simple .journal-cover-button {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 40px;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: #121925dd;
  color: #e8edf4;
  z-index: 2;
  font-size: 17px;
  pointer-events: auto;
}
.journal-simple .journal-cover-button.journal-cover-label {
  color: #121925;
  background: #f0b44c;
  font-size: 13px;
  font-weight: 700;
}
.journal-simple .photo-grid .photo-remove {
  top: 8px;
  right: 8px;
  bottom: auto;
  width: 40px;
  height: 40px;
  min-height: 40px;
  background: #121925dd !important;
}
.journal-simple .journal-cover-hint {
  color: #a3afc0;
  font-size: 12px;
  margin: 12px 0 0;
}
.journal-simple .journal-add-media {
  border: 1px dashed #3c6fa3 !important;
  color: #7dbbf7 !important;
}
.journal-add-media small {
  display: block;
  color: #a3afc0;
  margin-top: 6px;
}
.journal-add-media.dragging {
  background: #203853;
}
.journal-meta-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid #2c3849;
  padding: 14px 0;
  align-items: start;
  margin-top: 20px;
  color: #a3afc0;
  font-size: 13px;
}
.journal-meta-row + .journal-meta-row {
  margin-top: 0;
}
.journal-meta-row > span {
  padding-top: 10px;
}
.journal-simple .journal-tags {
  margin: 0;
  gap: 8px;
}
.journal-simple .journal-tags button {
  border: 1px solid #2c3849;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.journal-simple .journal-suggestions {
  margin-top: 8px;
  flex-wrap: wrap;
}
.journal-meta-row input {
  max-width: 100%;
  margin: 8px 0;
  background: #151d2a;
}
.journal-simple .journal-paper-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 28px;
  gap: 12px;
  background: #151d2a;
}
.journal-simple .journal-save-status {
  margin-right: auto;
  color: #8fddb0;
  font-size: 13px;
}
.journal-simple .journal-save-status.pending {
  color: #a3afc0;
}
.journal-simple .journal-delete-text {
  color: #ff8a8a !important;
}
.journal-simple .journal-privacy summary {
  font-size: 13px;
}
.journal-simple .primary,
.journal-simple-page .primary {
  background: #2470c8;
  color: #fff !important;
  border-radius: 10px;
  padding: 10px 22px;
}
.journal-simple-page .journal-editor-head {
  padding: 0;
  margin-bottom: 20px;
  color: #e8edf4;
  display: flex;
  gap: 14px;
}
.journal-preview-caption {
  flex: 1;
  font-weight: 700;
}
.journal-preview-caption small {
  display: block;
  font-weight: 400;
  color: #a3afc0;
  font-size: 12px;
  margin-top: 4px;
}
.journal-simple-page .journal-read-host {
  max-width: 640px;
  margin: auto;
}
.journal-feed-post {
  font-family: 'IBM Plex Sans', sans-serif;
  background: #1b2433;
  border-color: #2c3849;
  color: #e8edf4;
}
.journal-feed-post .journal-entry-text h3 {
  font:
    700 19px/1.4 'IBM Plex Sans',
    sans-serif;
}
.journal-feed-post .journal-prose {
  font:
    400 16px/1.7 'IBM Plex Sans',
    sans-serif;
  white-space: pre-wrap;
}
.journal-feed-post .journal-tags button {
  color: #7dbbf7;
}
.journal-placeholder {
  color: #77879b !important;
}
.journal-feed-post .journal-photo-prev,
.journal-feed-post .journal-photo-next {
  min-width: 40px;
  min-height: 40px;
}
.journal-slide > .journal-topo-canvas {
  width: 100%;
  height: 100%;
}
.book-tile-open > img,
.book-tile-open > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 600px) {
  .flight-journal-page.journal-simple-page {
    padding: 16px 12px;
  }
  .journal-simple-page .journal-simple .journal-entry-text {
    padding: 20px 16px;
  }
  .journal-simple .journal-media-strip {
    padding: 16px 12px 0 !important;
  }
  .journal-meta-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .journal-meta-row > span {
    padding-top: 0;
  }
  .journal-simple .journal-paper-footer {
    padding: 14px 16px;
    gap: 8px;
  }
  .journal-simple .journal-save-status {
    flex-basis: 100%;
    margin-bottom: 4px;
  }
  .journal-simple .journal-paper-footer .btn {
    font-size: 13px;
    padding: 10px 14px;
  }
  .journal-simple-page .journal-editor-head {
    flex-wrap: wrap;
  }
  .journal-preview-caption {
    order: 3;
    flex-basis: 100%;
  }
  .journal-simple-page .journal-read-host {
    width: 100%;
  }
}
.journal-feed-post .journal-entry-text,
.flight-journal-page .journal-feed-post .journal-entry-text {
  padding: 22px 24px;
}
.journal-feed-post .journal-entry-text .journal-prose {
  display: block;
}
.journal-feed-post .journal-post-actions button {
  color: #a3afc0;
}
@media (max-width: 600px) {
  .journal-feed-post .journal-post-head {
    order: 0;
  }
  .journal-feed-post .journal-entry-text {
    order: 1;
  }
  .journal-feed-post .journal-media {
    order: 2;
  }
  .journal-feed-post .journal-flight-preview,
  .journal-feed-post:has(.journal-media) > .journal-flight-preview {
    display: flex;
    order: 3;
  }
  .journal-feed-post .journal-topo-attribution {
    order: 4;
  }
  .journal-feed-post .journal-post-actions {
    order: 5;
  }
  .journal-feed-post .journal-entry-text,
  .flight-journal-page .journal-feed-post .journal-entry-text {
    padding: 18px 16px;
  }
  .journal-feed-post .journal-entry-text h3 {
    display: block;
  }
}
.journal-simple button.journal-cover-button {
  background: #121925dd;
  color: #e8edf4;
}
.journal-simple button.journal-cover-button.journal-cover-label {
  background: #f0b44c;
  color: #121925;
}
.journal-simple .journal-paper-footer .btn:not(.primary) {
  color: #e8edf4;
}
.journal-simple .journal-title-input::placeholder {
  color: #a3afc0;
  opacity: 1;
}
.journal-feed-post .journal-topo-attribution {
  display: block;
  color: #a3afc0;
}
.journal-simple .journal-media-strip > summary {
  display: none !important;
}

/* Journal metadata uses the same input box and suggestion list as flight editing. */
.journal-meta-row > label {
  padding-top: 16px;
}
.journal-chip-controls {
  min-width: 0;
}
.journal-simple .flight-tag-box {
  box-sizing: border-box;
  min-height: 70px;
}
.journal-simple .flight-tag-box input {
  margin: 0;
  padding: 12px 10px;
  min-width: min(180px, 100%) !important;
  color: #e8edf4;
  font: inherit;
  min-height: 40px;
  box-sizing: border-box;
}
.journal-simple .flight-tag-box:focus-within {
  border-color: #7dbbf7;
}
.journal-simple .flight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.journal-simple .flight-chips:empty {
  display: none;
}
.journal-simple .flight-chips button {
  min-height: 40px;
  border: 1px solid #2c3849;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: #e8edf4;
  font: inherit;
  cursor: pointer;
}
.journal-simple .flight-chips button:disabled {
  opacity: 0.45;
  cursor: default;
}
.journal-simple .journal-suggestions {
  align-items: center;
}
.journal-simple .flight-tag-suggestions {
  margin-top: 6px;
}
.journal-simple .flight-tag-suggestions button {
  min-height: 40px;
}
@media (max-width: 600px) {
  .journal-meta-row > label {
    padding-top: 0;
  }
}

/* The detail sidebar reuses the journal card, without a second map or flight summary. */
.flight-journal-preview {
  padding: 0;
  min-width: 0;
}
.flight-detail-side > .flight-journal-preview + #flight-panel-file {
  margin-top: 20px;
}
.flight-journal-preview .journal-more {
  display: none;
}
.flight-journal-preview .journal-feed-compact {
  margin: 0;
  border: 1px solid #2c3849;
  border-radius: 16px;
  overflow: hidden;
  background: #1b2433;
}
.journal-feed-compact .journal-post-head {
  padding: 14px;
  gap: 8px;
  font-size: 12px;
}
.journal-feed-compact .journal-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.journal-feed-compact .journal-post-head small {
  font-size: 11px;
}
.journal-feed-compact .journal-type {
  display: none;
}
.journal-feed-compact .journal-more {
  min-width: 32px;
  width: 32px;
  height: 40px;
}
.journal-feed-compact .journal-entry-text {
  padding: 12px 16px !important;
}
.journal-feed-compact .journal-entry-text h3 {
  font-size: 17px;
  display: block;
  margin: 0 0 6px;
}
.journal-feed-compact .journal-prose {
  display: -webkit-box !important;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.7;
}
.journal-feed-compact .journal-entry-text p {
  font-size: 13px;
  margin: 8px 0;
}
.journal-feed-compact .journal-tags {
  font-size: 12px;
  gap: 8px;
}
.journal-feed-compact .journal-tags button {
  font-size: 12px;
}
.journal-feed-compact .journal-slide {
  aspect-ratio: 4/3;
}
.journal-feed-compact .journal-post-actions {
  padding: 8px 12px !important;
  gap: 12px !important;
  justify-content: space-around !important;
}
.journal-feed-compact .journal-post-actions button {
  font-size: 12px !important;
  min-height: 40px;
}
.journal-feed-compact .journal-post-actions svg {
  width: 16px;
  height: 16px;
}
.journal-compact-empty {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 13px;
  color: #a3afc0;
}
/* Flight sharing, prototypes 19–19d. */
.share-flight-card,
.public-flight {
  font-family: 'IBM Plex Sans', sans-serif;
  color: #e8edf4;
  color-scheme: dark;
}
dialog.flight-share-page {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  background: #1b2433;
  overflow: auto;
}
.share-flight-card [hidden] {
  display: none !important;
}
.share-page-head {
  background: #121925;
  position: sticky;
  top: 0;
  z-index: 5;
  flex-wrap: wrap;
  justify-content: space-between;
}
.share-page-head > div:first-of-type {
  flex: 1;
}
.share-page-head small {
  color: #a3afc0;
}
.share-page-head [role='tablist'] {
  display: flex;
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 14px;
  padding: 4px;
  flex: 1;
  min-width: 300px;
}
.share-page-head [role='tab'] {
  background: none;
  border: 0;
  border-radius: 10px;
  color: #a3afc0;
  min-height: 48px;
  flex: 1;
  font-weight: 600;
}
.share-page-head [aria-selected='true'] {
  background: #1f3550;
  color: #e8edf4;
}
.share-workspace {
  max-width: 1400px;
  gap: 56px;
  padding: 32px 32px 48px;
}
.share-settings {
  max-width: 760px;
  gap: 26px;
}
.share-style {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.share-style [data-card-style='map'] {
  background: #314a37;
}
.share-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-chips button {
  border: 1px solid #2c3849;
  background: #151d2a;
  color: #a3afc0;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 24px;
  font: inherit;
}
.share-chips [aria-pressed='true'] {
  background: #1f3550;
  color: #cfe4fa;
  border-color: #5ea8f2;
}
.share-export {
  justify-content: flex-start;
  gap: 16px;
}
.share-export button {
  flex: 0 1 110px;
  height: auto;
  min-height: 90px;
  background: none;
  border: 0;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.share-export button span,
.share-targets > a > span,
.share-targets > button > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 16px;
  color: #7dbbf7;
  font-size: 26px;
}
.share-export [data-card-share] {
  background: none;
  color: #e8edf4;
}
.share-export [data-card-download] span {
  color: #5cc48a;
}
.share-hint {
  color: #a3afc0;
  font-size: 13px;
}
.share-cross {
  border: 1px dashed #5ea8f2;
  border-radius: 14px;
  background: transparent;
  color: #e8edf4;
  padding: 16px;
  text-align: left;
  min-height: 70px;
}
.share-cross small {
  display: block;
  color: #a3afc0;
  margin-top: 8px;
}
.share-dots {
  display: flex;
  gap: 0;
}
.share-dots button {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
}
.share-dots button:after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c3849;
  position: absolute;
  left: 18px;
  top: 18px;
}
.share-dots [aria-pressed='true']:after {
  background: #a3afc0;
}
.share-preview img {
  touch-action: pan-y;
}
.share-link-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #162820;
  border: 1px solid #306b49;
  border-radius: 14px;
  padding: 18px;
  gap: 20px;
}
.share-link-state small,
.share-recipient small {
  display: block;
  color: #a3afc0;
  margin-top: 4px;
}
.share-flight-card input[role='switch'] {
  appearance: none;
  width: 50px;
  height: 30px;
  min-width: 50px;
  min-height: 30px;
  background: #2c3849;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
}
.share-flight-card input[role='switch']:after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
}
.share-flight-card input[role='switch']:checked {
  background: #2470c8;
}
.share-flight-card input[role='switch']:checked:after {
  left: 24px;
}
.share-link-copy {
  display: flex;
  gap: 10px;
}
.share-link-copy input {
  flex: 1;
  min-width: 0;
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 12px;
  padding: 14px;
  color: #e8edf4;
  font:
    13px 'IBM Plex Mono',
    monospace;
}
.share-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.share-targets > a,
.share-targets > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #e8edf4;
  font:
    13px 'IBM Plex Sans',
    sans-serif;
  border: 0;
  background: none;
  padding: 0;
  min-width: 74px;
  cursor: pointer;
}
.share-targets img {
  width: 28px;
  height: 28px;
}
.share-targets [aria-disabled='true'] {
  opacity: 0.4;
  pointer-events: none;
}
.share-recipient {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  border-top: 1px solid #2c3849;
  padding: 12px 0;
  gap: 12px;
}
.share-recipient > span:last-child:not(:first-child) {
  color: #a3afc0;
  white-space: nowrap;
}
.share-validity {
  display: flex;
  gap: 8px;
}
.share-validity button {
  flex: 1;
  min-height: 48px;
  background: #151d2a;
  border: 1px solid #2c3849;
  color: #e8edf4;
  border-radius: 12px;
}
.share-validity [aria-pressed='true'] {
  background: #1f3550;
  border-color: #5ea8f2;
}
.share-revoke {
  color: #ff8a8a !important;
  border-color: #804545 !important;
  align-self: flex-start;
}
.share-chat {
  border-radius: 22px;
  background: #243449;
  overflow: hidden;
  width: 100%;
  max-width: 380px;
}
.share-chat img {
  width: 100%;
  aspect-ratio: 1200/630;
  object-fit: cover;
}
.share-chat strong,
.share-chat small {
  display: block;
  padding: 5px 16px;
}
.share-chat small {
  color: #a3afc0;
}
.share-chat p {
  margin: 12px 0 0;
  padding: 16px;
  background: #2470c8;
}
.share-qr {
  background: #1b2433;
  color: #e8edf4;
  border: 1px solid #2c3849;
  border-radius: 20px;
  width: min(480px, 90vw);
  padding: 24px;
}
.share-qr img {
  width: 100%;
  height: auto;
  background: white;
}
.share-qr .btn {
  margin: 8px;
}
.share-demo {
  padding: 40px;
}
.share-flight-card button:focus-visible,
.share-flight-card a:focus-visible,
.public-flight button:focus-visible {
  outline: 2px solid #5ea8f2;
  outline-offset: 3px;
}
.public-flight {
  margin: 0;
  background: #121925;
}
.public-flight .btn,
.public-map-toolbar button {
  border: 1px solid #2c3849;
  border-radius: 12px;
  background: #1b2433;
  color: #e8edf4;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}
.public-head {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 18px 4%;
  border-bottom: 1px solid #2c3849;
}
.public-head > span:last-child {
  margin-left: auto;
  color: #a3afc0;
}
.public-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #e8edf4;
  font-size: 22px;
  font-weight: 700;
}
.public-brand img {
  width: 42px;
  height: 42px;
}
.public-owner {
  display: flex;
  gap: 8px;
  align-items: center;
}
.public-owner b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #1f3550;
  border-radius: 50%;
  margin-right: 10px;
}
.public-body {
  max-width: 1600px;
  margin: auto;
  padding: 28px 4% 60px;
}
.public-body h1 {
  font-size: 32px;
  margin-bottom: 8px;
}
.public-date {
  color: #a3afc0;
  margin-top: 0;
  margin-bottom: 26px;
}
.public-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr);
  gap: 26px;
}
.public-player {
  min-width: 0;
  border: 1px solid #2c3849;
  background: #1b2433;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}
.public-player .detail-map {
  height: 520px;
  border-radius: 0;
  margin: 0;
  position: relative;
}
.public-player .geo-map-wrap,
.public-player .geo-map {
  height: 100%;
  width: 100%;
}
.public-map-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 450;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.public-map-toolbar [role='group'] {
  display: flex;
  border-radius: 12px;
  background: #151d2a;
  padding: 4px;
}
.public-map-toolbar button {
  font-size: 13px;
  background: #151d2a;
}
.public-map-toolbar [aria-pressed='true'] {
  background: #2470c8;
}
.public-player .replay-values {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 450;
  background: #121925e8;
  border: 1px solid #2c3849;
  border-radius: 14px;
  padding: 12px;
  gap: 14px;
  display: flex;
}
.public-player .replay-values span:nth-child(2) {
  display: none;
}
.public-player .replay-values span {
  font-size: 11px;
  color: #a3afc0;
}
.public-player .replay-values strong {
  display: block;
  color: #7dbbf7;
  font:
    600 22px 'IBM Plex Mono',
    monospace;
}
.public-player .replay-values small {
  display: none;
}
.public-player .replay-controls {
  padding: 18px;
  margin: 0;
  border: 0;
}
.public-player .replay-actions {
  gap: 12px;
}
.public-player .replay-actions > label:not(.replay-tempo) {
  display: none;
}
.public-player .replay-actions > [data-replay-start],
.public-player .replay-actions > [data-replay-end] {
  display: none;
}
.public-player [data-replay-toggle] {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2470c8;
  border: 0;
}
.public-player .replay-toggle-label {
  display: none;
}
.public-player .replay-transport svg {
  width: 26px;
  height: 26px;
}
.public-player [data-replay-clock] {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
}
.public-player [data-replay-clock-time] {
  font-size: 24px;
}
.public-player .replay-view-controls,
.public-player .replay-chart-choice,
.public-player .replay-controls > .dialog-hint,
.public-player [data-replay-terrain-info],
.public-player [data-replay-chart-toggle] {
  display: none;
}
.public-player [data-replay-status] {
  font-size: 11px;
  color: #a3afc0;
}
.public-player [data-replay-charts] {
  padding: 0 18px 12px;
}
.public-player .replay-timeline {
  display: block;
  position: relative;
  margin-top: 12px;
}
.public-media-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
}
.public-media-markers button {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: auto;
  width: 44px;
  height: 44px;
  top: -12px;
  border: 0;
  background: transparent;
}
.public-media-markers button:after {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #f0b44c;
  margin: auto;
}
.public-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.public-metrics,
.public-media,
.public-promo,
.public-journal {
  padding: 20px;
  border: 1px solid #2c3849;
  background: #1b2433;
  border-radius: 20px;
}
.public-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.public-metrics > div {
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}
.public-metrics small {
  display: block;
  color: #a3afc0;
  font-size: 13px;
}
.public-metrics strong {
  display: block;
  font:
    600 22px 'IBM Plex Mono',
    monospace;
  margin-top: 6px;
}
.public-metrics p {
  grid-column: 1/-1;
  font-size: 13px;
  color: #a3afc0;
  margin-bottom: 0;
}
.public-side h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
.public-side p {
  color: #a3afc0;
}
.public-media header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.public-media header small {
  font-size: 11px;
  color: #a3afc0;
}
.public-media [data-public-media] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.public-media [data-public-media] button {
  position: relative;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  background: #151d2a;
  cursor: pointer;
  min-height: 100px;
}
.public-media img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.public-media button.active {
  border-color: #f0b44c;
}
.public-media button small {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: #121925dd;
  color: #e8edf4;
  padding: 4px 8px;
  border-radius: 8px;
  font:
    12px 'IBM Plex Mono',
    monospace;
}
.public-journal p {
  white-space: pre-wrap;
}
.public-promo .btn {
  display: block;
  text-align: center;
  text-decoration: none;
}
.public-next {
  position: absolute;
  z-index: 440;
  bottom: 95px;
  right: 54px;
  width: 140px;
  padding: 0;
  overflow: hidden;
  border: 2px solid #f0b44c;
  border-radius: 14px;
  background: #1b2433;
  color: #f0b44c;
  cursor: pointer;
}
.public-next img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}
.public-next small {
  display: block;
  padding: 6px;
}
.public-next[hidden],
.public-flight [hidden] {
  display: none !important;
}
.public-lightbox {
  width: min(900px, 94vw);
  height: min(750px, 90dvh);
  border: 1px solid #2c3849;
  background: #121925;
  border-radius: 18px;
  color: #e8edf4;
}
.public-lightbox .replay-media {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  transform: none;
}
.public-unavailable {
  max-width: 600px;
  margin: 15vh auto;
  padding: 30px;
}
.public-unavailable a {
  color: #7dbbf7;
}
.public-flight .replay-expanded .detail-map {
  height: 100dvh;
}
.public-flight .replay-expanded .detail-map > .geo-map-wrap {
  position: absolute;
  inset: 0;
}
.public-flight .replay-expanded .replay-player {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 460;
  padding: 14px;
  background: #121925e8;
}
@media (max-width: 760px) {
  .share-page-head {
    padding: 12px 16px;
    gap: 12px;
  }
  .share-page-head [role='tablist'] {
    order: 5;
    flex-basis: 100%;
    min-width: 0;
  }
  .share-page-head > div:first-of-type {
    flex-basis: calc(100% - 120px);
  }
  .share-page-head > [data-card-back] {
    order: 3;
  }
  .share-page-head > [data-share-close] {
    order: 4;
    margin-left: auto;
  }
  .share-workspace {
    padding: 22px 16px 36px;
    gap: 24px;
  }
  .share-settings {
    max-width: none;
  }
  .share-format {
    gap: 6px;
  }
  .share-format button {
    font-size: 12px;
  }
  .share-style {
    gap: 6px;
  }
  .share-link-copy {
    flex-direction: column;
  }
  .share-recipient {
    font-size: 14px;
  }
  .share-targets {
    gap: 10px;
  }
  .share-targets > a,
  .share-targets > button {
    min-width: 64px;
    font-size: 11px;
  }
  .public-head {
    padding: 14px 16px;
    gap: 10px;
    font-size: 13px;
    flex-wrap: wrap;
  }
  .public-brand {
    font-size: 15px;
  }
  .public-brand img {
    width: 28px;
    height: 28px;
  }
  .public-head > span:last-child {
    font-size: 11px;
  }
  .public-owner b {
    display: none;
  }
  .public-body {
    padding: 18px 0 40px;
  }
  .public-body h1,
  .public-date {
    margin-left: 16px;
    margin-right: 16px;
  }
  .public-body h1 {
    font-size: 24px;
  }
  .public-date {
    font-size: 13px;
  }
  .public-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .public-player {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .public-player .detail-map {
    height: 400px;
  }
  .public-map-toolbar {
    flex-wrap: wrap;
  }
  .public-map-toolbar button {
    padding: 8px;
    font-size: 11px;
  }
  .public-player .replay-values {
    left: 12px;
    right: auto;
    bottom: 12px;
  }
  .public-player .replay-values strong {
    font-size: 18px;
  }
  .public-side {
    padding: 0 16px;
  }
  .public-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    background: none;
    border: 0;
    gap: 8px;
  }
  .public-metrics > div {
    padding: 12px 8px;
  }
  .public-metrics > div:nth-child(n + 4) {
    display: none;
  }
  .public-metrics strong {
    font-size: 18px;
  }
  .public-metrics small {
    font-size: 11px;
  }
  .public-media {
    padding: 0;
    border: 0;
    background: none;
  }
  .public-media [data-public-media] {
    display: flex;
    overflow-x: auto;
  }
  .public-media [data-public-media] button {
    flex: 0 0 140px;
  }
  .public-media img {
    height: 100px;
  }
  .public-promo {
    padding: 16px;
  }
  .public-next {
    bottom: 14px;
    width: 115px;
  }
  .public-next img {
    height: 68px;
  }
  .public-player .replay-values span:last-child {
    display: none;
  }
  .public-player [data-replay-charts] {
    padding: 0 8px 8px;
  }
}
dialog.flight-share-page > .btn[hidden] {
  display: none;
}
.share-flight-card input[role='switch'] {
  width: 56px;
  height: 44px;
  min-height: 44px;
  background: linear-gradient(#2c3849, #2c3849) center/50px 30px no-repeat;
}
.share-flight-card input[role='switch']:after {
  top: 11px;
  left: 7px;
}
.share-flight-card input[role='switch']:checked {
  background: linear-gradient(#2470c8, #2470c8) center/50px 30px no-repeat;
}
.share-flight-card input[role='switch']:checked:after {
  left: 27px;
}
.share-flight-card input[role='switch'],
.share-flight-card input[role='switch']:checked {
  width: 64px;
  min-width: 64px;
  height: 44px;
  background: #2c3849;
  border-radius: 24px;
}
.share-flight-card input[role='switch']:checked {
  background: #2470c8;
}
.share-flight-card input[role='switch']:after {
  width: 32px;
  height: 32px;
  top: 6px;
  left: 6px;
}
.share-flight-card input[role='switch']:checked:after {
  left: 26px;
}
.public-flight #public-flight {
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}
.public-player [data-replay-fullscreen] svg {
  width: 22px;
  height: 22px;
}
.public-player .tile-status {
  top: 76px;
  bottom: auto;
  left: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  font-size: 11px;
}
.public-player .replay-values span:last-child {
  font-size: 0;
}
.public-player .replay-values span:last-child:before {
  content: none;
  font-size: 11px;
  color: #a3afc0;
}
@media (max-width: 760px) {
  .public-owner b {
    display: grid;
    width: 28px;
    height: 28px;
    font-size: 14px;
    margin-right: 0;
  }
  .public-owner {
    gap: 5px;
    font-size: 12px;
  }
  .public-head > span:last-child {
    display: none;
  }
  .public-player [data-replay-toggle] {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
  }
  .public-player .replay-tempo-label {
    display: none;
  }
  .public-player .replay-tempo {
    width: auto;
    min-width: 0;
  }
  .public-player [data-replay-clock-time] {
    font-size: 21px;
  }
  .public-player .replay-values span:last-child {
    display: block;
  }
  .public-player .replay-values span:nth-child(3) {
    display: none;
  }
  .public-player [data-replay-charts] .chart-title,
  .public-player [data-replay-charts] .flight-chart-legend,
  .public-player [data-replay-charts] .chart-summary {
    display: none;
  }
  .public-player [data-replay-charts] .flight-chart-frame {
    height: 110px;
    min-height: 110px;
  }
  .public-player [data-replay-charts] .flight-chart-plot,
  .public-player [data-replay-charts] svg {
    height: 110px;
    min-height: 110px;
  }
  .public-player [data-replay-charts] {
    padding: 0 12px 8px;
  }
}

#public-flight .public-player .leaflet-control-zoom a {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  line-height: 28px;
  font-size: 20px;
}
.public-flight .replay-expanded .detail-map {
  position: fixed;
  inset: 0;
  width: 100vw;
  z-index: 2000;
  border-radius: 0;
}
@media (max-width: 700px) {
  .public-player .replay-values {
    left: 70px;
    bottom: 34px;
  }
}

/* Profile and settings share the account sheet from prototypes 20 / 20b. */
.account-dialog,
.account-crop-dialog {
  --account-bg: #1b2433;
  --account-card: #151d2a;
  --account-border: #2c3849;
  --account-muted: #a3afc0;
  --account-text: #e8edf4;
  --account-blue: #7dbbf7;
  --account-group: #8fa8c6;
  color: var(--account-text);
  background: var(--account-bg);
  border: 1px solid var(--account-border);
  border-radius: 22px;
  font-family: 'IBM Plex Sans', sans-serif;
  width: min(940px, calc(100vw - 48px));
  max-width: 940px;
  max-height: calc(100dvh - 48px);
  padding: 0;
}
:root[data-theme='light'] :is(.account-dialog, .account-crop-dialog) {
  --account-bg: #f8fafc;
  --account-card: #fff;
  --account-border: #d2dbe7;
  --account-muted: #59677a;
  --account-text: #192538;
  --account-blue: #2469b0;
  --account-group: #536d8c;
}
.account-dialog .dialog-head,
.account-crop-dialog .dialog-head {
  padding: 24px;
  border-bottom: 1px solid var(--account-border);
  align-items: center;
}
.account-dialog .dialog-head h2,
.account-crop-dialog .dialog-head h2 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
}
.account-dialog .dialog-head p,
.account-crop-dialog .dialog-head p {
  font-size: 15px;
  color: var(--account-muted);
}
.settings-dialog .dialog-head p:empty {
  display: none;
}
.account-dialog .dialog-head .icon-button,
.account-crop-dialog .dialog-head .icon-button {
  border: 1px solid var(--account-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: var(--account-text);
}
.account-dialog .dialog-body {
  padding: 24px;
}
.account-dialog .btn,
.account-crop-dialog .btn {
  font-family: inherit;
  font-size: 14px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--account-border);
  border-radius: 11px;
  color: var(--account-text);
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
}
.account-dialog .btn.primary,
.account-crop-dialog .btn.primary {
  color: white;
  background: #2470c8;
  border-color: #2470c8;
  font-weight: 700;
}
.account-dialog .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.account-dialog .dialog-footer,
.account-crop-dialog .dialog-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--account-border);
  background: var(--account-card);
}
.account-dialog .account-footer-note,
.account-storage {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--account-muted);
  font-size: 14px;
}
.account-storage::before {
  content: '';
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #8793a4;
}
.account-storage[data-state='saved'] {
  color: #5cc48a;
}
.account-storage[data-state='saved']::before {
  background: #5cc48a;
}
.account-storage[data-state='saving'] {
  color: #e5b864;
}
.account-storage[data-state='saving']::before {
  background: #e5b864;
}
.account-storage[data-state='error'] {
  color: #ff8a8a;
}
.account-storage[data-state='error']::before {
  background: #ff8a8a;
}
:root[data-theme='light'] .account-storage[data-state='saved'] {
  color: #187340;
}
.account-dialog .account-danger {
  color: #ff8a8a;
}
.account-dialog .btn.account-danger {
  border-color: #633539;
}
:root[data-theme='light'] .account-dialog .account-danger {
  color: #b62836;
}
.account-profile-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
}
.account-photo-column {
  text-align: center;
}
.account-photo {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 16px;
}
.account-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2c486a;
  color: #e8edf4;
  font-size: 18px;
  font-weight: 600;
}
.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-photo .account-avatar {
  width: 148px;
  height: 148px;
  border: 3px solid var(--account-border);
  font-size: 45px;
}
.account-camera {
  display: grid;
  place-items: center;
  position: absolute;
  bottom: 4px;
  right: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--account-bg);
  background: #2470c8;
  color: white;
}
.account-photo-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.account-hint {
  font-size: 13px;
  color: var(--account-muted);
  margin: 16px 0 0;
}
.account-profile-fields label {
  display: block;
  font-size: 15px;
  color: var(--account-muted);
  margin-bottom: 18px;
}
.account-profile-fields input,
.account-profile-fields textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 15px;
  border: 1px solid var(--account-border);
  border-radius: 12px;
  background: var(--account-card);
  color: var(--account-text);
  font-family: inherit;
  font-size: 17px;
}
.account-profile-fields input:focus,
.account-profile-fields textarea:focus {
  outline: 2px solid #2470c8;
  outline-offset: 1px;
}
.account-profile-fields textarea {
  resize: vertical;
  min-height: 132px;
}
.account-profile-fields textarea::placeholder {
  color: var(--account-muted);
  opacity: 0.75;
}
.account-field-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
[data-bio-count] {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  white-space: nowrap;
}
.account-preview-label {
  color: var(--account-muted);
  font-size: 15px;
  margin: 18px 0 10px;
}
.account-profile-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid var(--account-border);
  background: var(--account-card);
}
.account-profile-preview p {
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.account-profile-preview small {
  font-size: 13px;
  color: var(--account-muted);
}
.account-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--account-muted);
  font-size: 13px;
}
.account-privacy .icon {
  color: var(--account-blue);
  flex-shrink: 0;
}
.account-more {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--account-border);
}
.account-more h3 {
  font-size: 15px;
  color: var(--account-muted);
  font-weight: 400;
  margin: 0 0 12px;
}
.account-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.account-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  text-align: left;
  padding: 17px;
  background: var(--account-card);
  color: var(--account-text);
  border: 1px solid var(--account-border);
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
}
.account-tile > .icon {
  color: var(--account-blue);
  flex-shrink: 0;
}
.account-tile > .icon:last-child {
  margin-left: auto;
  color: var(--account-muted);
  width: 14px;
}
.account-tile strong,
.account-tile small {
  display: block;
}
.account-tile small {
  font-size: 13px;
  font-weight: 400;
  color: var(--account-muted);
  margin-top: 3px;
}
.settings-dialog {
  width: min(820px, calc(100vw - 48px));
}
.account-settings-group + .account-settings-group {
  margin-top: 22px;
}
.account-settings-group h3 {
  margin: 0 0 9px;
  color: var(--account-group);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.1px;
}
.account-settings-card {
  border: 1px solid var(--account-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--account-card);
}
.account-settings-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
}
.account-settings-card > .account-settings-row + .account-settings-row,
.account-settings-card > [data-install-row] {
  border-top: 1px solid var(--account-border);
}
.account-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--account-bg);
  color: var(--account-blue);
}
.account-danger .account-icon {
  color: #ff8a8a;
}
.account-row-copy {
  min-width: 0;
  flex: 1;
}
.account-row-copy strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--account-text);
}
.account-row-copy small {
  display: block;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.account-row-action {
  flex-shrink: 0;
}
.account-theme-control {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--account-border);
  border-radius: 12px;
  background: var(--account-bg);
}
.account-theme-control button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--account-muted);
  font: inherit;
  padding: 8px 10px;
}
.account-theme-control button[aria-pressed='true'] {
  background: #2c3b52;
  color: #fff;
}
.account-theme-control .icon {
  width: 17px;
  height: 17px;
}
.account-crop-dialog {
  width: min(480px, calc(100vw - 24px));
}
.account-crop-dialog canvas {
  display: block;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  border: 2px solid var(--account-blue);
  touch-action: none;
  cursor: grab;
}
.account-crop-dialog .dialog-body {
  padding: 20px;
}
.account-crop-dialog label {
  display: block;
  color: var(--account-muted);
  margin-top: 14px;
}
.account-crop-dialog input[type='range'] {
  width: 100%;
  margin: 5px 0;
  min-height: 24px;
}
.account-crop-dialog .dialog-footer {
  justify-content: flex-end;
}
.account-dialog [hidden],
.account-crop-dialog [hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .account-settings-row {
    flex-wrap: wrap;
  }
  .account-settings-row:has(.account-theme-control) .account-row-action {
    width: 100%;
    padding-left: 53px;
  }
  .account-theme-control {
    width: fit-content;
  }
  .account-profile-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
  }
  .account-photo-actions .btn {
    padding: 8px;
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  dialog.account-dialog {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .account-dialog #dialog-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }
  .account-dialog .dialog-head {
    padding: 18px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--account-bg);
  }
  .account-dialog .dialog-head h2 {
    font-size: 23px;
  }
  .account-dialog .dialog-body {
    padding: 20px 16px;
    flex: 1;
  }
  .account-dialog .dialog-footer {
    position: sticky;
    bottom: 0;
    padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    flex-wrap: wrap;
    z-index: 1;
  }
  .account-profile-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .account-photo-column {
    max-width: 100%;
  }
  .account-photo-actions .btn {
    font-size: 14px;
    padding: 10px 14px;
  }
  .account-tiles {
    grid-template-columns: 1fr;
  }
  .account-settings-row {
    gap: 12px;
    padding: 14px;
  }
  .account-row-copy strong {
    font-size: 15px;
  }
  .account-row-copy small {
    font-size: 12px;
  }
  .account-row-action {
    margin-left: auto;
    max-width: 100%;
  }
  .account-settings-row:has(.account-theme-control) .account-row-action {
    padding-left: 0;
  }
  .account-theme-control {
    width: 100%;
  }
  .account-theme-control button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
  }
  .account-storage,
  .account-footer-note {
    width: 100%;
    font-size: 12px;
  }
  .account-dialog .dialog-footer .primary {
    margin-left: auto;
  }
  .account-profile-preview {
    padding: 12px;
    gap: 10px;
  }
  .account-profile-preview p {
    font-size: 15px;
  }
  .account-profile-preview small {
    font-size: 12px;
  }
}
.account-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
}
.account-dialog .dialog-head,
.account-dialog .dialog-footer {
  flex-shrink: 0;
}
.account-dialog .dialog-body {
  overflow-y: auto;
  min-height: 0;
}
@media (max-width: 600px) {
  .account-dialog #dialog-content {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
  }
}

.thermal-circle-path {
  opacity: 0.7;
  transition: opacity 0.15s;
}
.thermal-circle-path.is-muted {
  opacity: 0.1;
}
.thermal-circle-path.is-selected {
  opacity: 1;
}
.thermal-circle-path.is-selected polyline {
  stroke-width: 3.5;
}
[data-thermal-circle-centres][hidden] {
  display: none;
}
.thermal-circle-readout {
  min-height: 1.5em;
  color: var(--text) !important;
  font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  .thermal-circle-path {
    transition: none;
  }
}

.thermal-climb-legend {
  margin: 12px 0;
}
.thermal-climb-legend p {
  margin: 6px 0;
  font-size: 11px;
  color: var(--muted);
}
.thermal-climb-scale {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.thermal-climb-scale span {
  flex: 1;
  min-width: 0;
}
.thermal-climb-ticks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text);
}

.thermal-circle-marker {
  opacity: 1;
  pointer-events: none;
}
.thermal-circle-marker.is-muted {
  opacity: 0.2;
}

[data-thermal-areas][hidden] {
  display: none;
}
.thermal-area-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}
.thermal-area-note {
  font-size: 11px !important;
  color: var(--muted);
  margin: 6px 0 12px;
}

.thermal-circle-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 4px;
}
.thermal-circle-controls .centering-thermal-choice {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}
.thermal-circle-controls select {
  max-width: 240px;
  padding: 6px 9px;
}
.thermal-circle-controls .thermal-area-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
}
.thermal-circle-controls input[type='checkbox'] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex: 0 0 14px;
  margin: 0;
  padding: 0;
}
.thermal-circles-view .thermal-area-note {
  margin: 4px 0 8px;
  font-size: 10px !important;
}
@media (max-width: 380px) {
  .thermal-circle-controls select {
    max-width: 200px;
  }
}

.analysis-observations {
  grid-column: 1/-1;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  min-width: 0;
  container: analysis-observations / inline-size;
}
.analysis-observations h3 {
  margin: 0 0 12px;
}
.analysis-observations ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.analysis-observations strong {
  font-size: 12px;
  color: var(--text);
}
.analysis-observations li p {
  margin: 5px 0 0;
  font-size: 12px;
}
.analysis-observations .analysis-observations-note {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .analysis-observations ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
@container analysis-observations (max-width:760px) {
  .analysis-observations ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.glide-details {
  margin: 16px 0 24px;
  min-width: 0;
}
.glide-course-plots {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.glide-course-chart {
  min-width: 0;
}
.glide-course-chart h3 {
  margin-bottom: 8px;
}
.glide-distance-label {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin: 4px 0 0;
}
.glide-details [data-glide-readout] {
  font-size: 12px;
  min-height: 1.5em;
  font-variant-numeric: tabular-nums;
}
.glide-observations {
  margin-top: 16px;
}
[data-glide-guide][hidden],
[data-glide-dot][hidden] {
  display: none;
}

[data-glide-terrain] .chart-summary {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.polar-trend-note {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0;
}
[data-polar-trend-status]:empty {
  display: none;
}

.thermal-entry-view > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.thermal-entry-view[open] > summary {
  margin-bottom: 14px;
}

.start-landing-layout {
  display: grid;
  gap: 14px;
}
.start-landing-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.start-landing-top > article {
  min-width: 0;
}
.start-landing-place {
  font-size: 13px;
  margin: 0 0 16px;
  color: var(--text);
}
.start-landing-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  margin: 0;
}
.start-landing-facts > div {
  min-width: 0;
}
.start-landing-facts dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.start-landing-facts dd {
  margin: 0;
  font:
    600 20px 'Geist Mono',
    monospace;
  color: var(--text);
  overflow-wrap: anywhere;
}
.start-landing-facts span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.start-landing-layout .analysis-approach > h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.start-landing-layout .analysis-approach h3 small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.approach-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.approach-layout > div {
  min-width: 0;
}
.approach-observations > p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 14px;
}
.approach-observations .analysis-detail-table th,
.approach-observations .analysis-detail-table td {
  padding: 9px 7px;
}
@media (max-width: 900px) {
  .approach-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .start-landing-top {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 380px) {
  .start-landing-facts {
    grid-template-columns: 1fr;
  }
}

/* Story media stays visible together; flight-book tiles keep their cover. */
.journal-story-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
}
.journal-feed-post .journal-story-photo {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--journal-inset);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.journal-story-photo img,
.journal-story-photo video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.journal-story-photo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.journal-story-layout-1 {
  grid-template-columns: minmax(0, 1fr);
}
.journal-story-layout-1 .journal-story-photo {
  aspect-ratio: 3/2;
}
.journal-story-layout-3 {
  grid-template-rows: repeat(2, clamp(110px, 18vw, 180px));
}
.journal-story-layout-3 .journal-story-photo {
  aspect-ratio: auto;
  height: 100%;
}
.journal-story-layout-3 .journal-story-photo:first-child {
  grid-row: span 2;
}
.journal-story-layout-5 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(100px, 16vw, 160px);
}
.journal-story-layout-5 .journal-story-photo {
  aspect-ratio: auto;
  height: 100%;
}
.journal-story-layout-5 .journal-story-photo:first-child {
  grid-column: span 2;
}
/* Journal cards and editor follow the light theme, including shared previews. */
:root[data-theme='light'] :is(.journal-feed-post, .journal-simple-page) {
  --muted: #59677a;
  color: var(--text);
}
:root[data-theme='light']
  :is(
    .journal-feed-post,
    .flight-journal-preview .journal-feed-compact,
    .journal-simple-page .journal-simple
  ) {
  background: var(--journal-surface);
  border-color: var(--border);
}
:root[data-theme='light'] .flight-journal-page.journal-simple-page {
  background: var(--bg);
}
:root[data-theme='light'] .journal-post-head {
  color: var(--muted);
}
:root[data-theme='light'] .journal-post-head strong {
  color: var(--text);
}
:root[data-theme='light'] .journal-type {
  background: #e0f2e7;
  color: #17683a;
}
:root[data-theme='light'] .journal-more {
  background: var(--journal-inset) !important;
  color: var(--text);
}
:root[data-theme='light'] .journal-feed-post .journal-tags button {
  color: var(--accent);
}
:root[data-theme='light']
  :is(.journal-feed-post .journal-topo-attribution, .journal-compact-empty) {
  color: var(--muted);
}
:root[data-theme='light'] .journal-feed-post .journal-placeholder {
  color: var(--muted) !important;
}
:root[data-theme='light'] .journal-simple-page .journal-editor-head {
  color: var(--text);
}
:root[data-theme='light']
  :is(
    .journal-simple .journal-title-input,
    .journal-simple .journal-rich-editor,
    .journal-simple .flight-tag-box input,
    .journal-simple .flight-chips button
  ) {
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .journal-simple .journal-text-field,
    .journal-simple .journal-toolbar,
    .journal-simple .journal-paper-footer,
    .journal-simple .flight-tag-box,
    .journal-simple .journal-meta-row input
  ) {
  background: var(--journal-inset);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(.journal-simple .journal-text-field, .journal-simple .flight-tag-box):focus-within {
  border-color: var(--accent);
}
:root[data-theme='light'] .journal-simple .journal-meta-row {
  color: var(--muted);
  border-color: var(--border);
}
:root[data-theme='light'] .journal-simple .journal-tags button {
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .journal-simple .journal-cover-hint,
    .journal-simple .journal-add-media small,
    .journal-preview-caption small,
    .journal-simple .journal-save-status.pending
  ) {
  color: var(--muted);
}
:root[data-theme='light'] .journal-simple .journal-title-input::placeholder,
:root[data-theme='light'] .journal-simple .journal-rich-editor:empty:before {
  color: var(--muted);
}
:root[data-theme='light'] .journal-simple .journal-add-media {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}
:root[data-theme='light'] .journal-simple .journal-add-media.dragging {
  background: var(--accent-soft);
}
:root[data-theme='light'] .journal-simple .journal-save-status {
  color: var(--ok);
}
:root[data-theme='light'] .journal-simple .journal-paper-footer .btn:not(.primary) {
  color: var(--text);
}
:root[data-theme='light'] .journal-simple .journal-delete-text {
  color: #b62836 !important;
}
:root[data-theme='light'] .journal-simple .photo-grid .photo-remove {
  color: #fff;
}
:root[data-theme='light'] .journal-simple button:focus-visible,
:root[data-theme='light'] .journal-simple summary:focus-visible {
  outline-color: var(--accent);
}
:root[data-theme='light'] .journal-actions-dialog .dialog-footer .btn {
  background: var(--journal-inset);
  color: var(--text);
}
/* Shared light palette for private views and dialogs. Media overlays keep their own contrast. */
:root[data-theme='light'] {
  --light-inset: #eaf0f6;
  --light-muted: #59677a;
  --light-success-bg: #e0f2e7;
  --light-warning-bg: #fff4d9;
  --light-warning: #805400;
  --light-danger-bg: #fbe9ec;
  --light-danger: #b62836;
}
:root[data-theme='light'] :is(.eq-page, .eq-dialog) {
  --eq-bg: #fff;
  --eq-card: #f4f6f9;
  --eq-border: #d2dbe7;
  --eq-inner: #eaf0f6;
  --eq-text: #192538;
  --eq-muted: #59677a;
  --eq-link: #1a5fbf;
}
:root[data-theme='light'] .eq-glider {
  --eq-color: #1a5fbf;
  --eq-type-bg: #e1edfc;
}
:root[data-theme='light'] .eq-harness {
  --eq-color: #15753b;
  --eq-type-bg: #e0f2e7;
}
:root[data-theme='light'] .eq-reserve {
  --eq-color: #a34820;
  --eq-type-bg: #fbeadf;
}
:root[data-theme='light'] .eq-instrument {
  --eq-color: #146f78;
  --eq-type-bg: #e0f2f4;
}
:root[data-theme='light'] .eq-chips .selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--eq-text);
}
:root[data-theme='light'] .eq-photo.has-photo {
  background: var(--eq-inner);
}
:root[data-theme='light'] .eq-photo-caption {
  background: var(--eq-card);
  color: var(--eq-text);
}
:root[data-theme='light'] .eq-card .equipment-badge {
  background: var(--eq-card);
  color: var(--eq-muted);
}
:root[data-theme='light'] .eq-card .equipment-badge.active {
  color: var(--ok);
  border-color: var(--ok);
}
:root[data-theme='light'] .eq-pill.ok {
  background: var(--light-success-bg);
  color: var(--ok);
  border-color: var(--ok);
}
:root[data-theme='light'] .eq-pill.soon {
  background: var(--light-warning-bg);
  color: var(--light-warning);
  border-color: var(--light-warning);
}
:root[data-theme='light'] .eq-pill.late {
  background: var(--light-danger-bg);
  color: var(--light-danger);
  border-color: var(--light-danger);
}
:root[data-theme='light'] .eq-file-icon {
  background: var(--eq-inner);
  color: var(--eq-muted);
}
:root[data-theme='light'] :is(.eq-choice input:checked + span, .eq-link-choice:has(input:checked)) {
  background: var(--accent-soft);
  color: var(--eq-text);
  border-color: var(--accent);
}
:root[data-theme='light'] .eq-link-choice.occupied small {
  color: var(--light-warning);
}
:root[data-theme='light'] .eq-page progress,
:root[data-theme='light'] .eq-page progress::-webkit-progress-bar {
  background: var(--eq-inner);
}

:root[data-theme='light'] .flight-editor-dialog {
  background: var(--solid);
  color: var(--text);
}
:root[data-theme='light'] :is(.flight-editor-preview, .flight-editor-tabs) {
  background: var(--solid);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .flight-editor-dialog .flight-track-metrics > div,
    .flight-editor-dialog .form-grid label > input,
    .flight-editor-dialog .form-grid label > select,
    .flight-editor-dialog .form-grid label > textarea,
    .flight-source-help,
    .flight-tag-box,
    .flight-height-switch,
    .flight-tag-suggestions
  ) {
  background: var(--light-inset);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light'] .flight-tag-suggestions button {
  color: var(--text);
}
:root[data-theme='light']
  :is(
    .flight-tag-suggestions button:hover,
    .flight-tag-suggestions button[aria-selected='true'],
    .flight-editor-dialog .flight-source-chip,
    .flight-no-track
  ) {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light']
  :is(
    .flight-draft-badge,
    .flight-preview-status.has-warnings,
    .flight-editor-dialog .flight-source-chip.changed
  ) {
  background: var(--light-warning-bg);
  color: var(--light-warning);
  border-color: var(--light-warning);
}
:root[data-theme='light']
  :is(
    .flight-preview-status:not(.has-warnings),
    .flight-tab-status.done,
    .flight-editor-panel .track-quality:not(.has-warnings),
    .flight-quality-status:not(.has-warnings)
  ) {
  background: var(--light-success-bg);
  color: var(--ok);
  border-color: var(--ok);
}
:root[data-theme='light']
  :is(
    .flight-quality-status.has-warnings,
    .flight-attention,
    .flight-add-dialog .flight-uncertain small
  ) {
  color: var(--light-warning) !important;
}
:root[data-theme='light']
  :is(
    .flight-title-type,
    .flight-height-grid > div:last-child strong,
    .flight-editor-dialog .flight-track-metrics > div:nth-child(3) strong,
    .flight-recognized,
    .flight-row-status,
    .flight-type-hint
  ) {
  color: var(--ok) !important;
}
:root[data-theme='light'] :is(.flight-new, .flight-preview-number) {
  background: var(--light-success-bg) !important;
  color: var(--ok) !important;
  border-color: var(--ok);
}
:root[data-theme='light']
  :is(.flight-file-info > summary, .flight-fields h3, .flight-add-visual > h3) {
  color: var(--light-muted);
}
:root[data-theme='light'] .flight-upload-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

:root[data-theme='light']
  :is(
    .book-search-input,
    .book-map-list,
    .book-map-panel,
    .book-map-popup,
    .map-book .book-search,
    .book-area-chips button,
    .book-map-tools,
    .book-map-outside,
    .book-map-legend,
    .book-time-label button,
    .book-time-label select,
    .book-map-layer-toggle
  ) {
  background: var(--solid);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light'] .book-map-panel .geo-map {
  background: var(--map);
}
:root[data-theme='light']
  :is(.book-popup-close, .book-map-mobile-views button, .book-map-panel .leaflet-control-zoom a) {
  background: var(--light-inset);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .book-map-list .compact-row.hovered,
    .book-map-panel .leaflet-control-zoom a:hover,
    .book-search-result.active,
    .book-search-result:hover,
    .book-area-chips button[aria-pressed='true']
  ) {
  background: var(--accent-soft);
  color: var(--text);
}
:root[data-theme='light']
  :is(.book-map-tools .segment button[aria-pressed='true'], .flight-book .segment .selected) {
  background: var(--accent);
  color: #fff;
}
:root[data-theme='light']
  :is(
    .book-area-chips small,
    .book-hit-name small,
    .book-search-hits header strong,
    .book-search-bottom h3
  ) {
  color: var(--light-muted);
}
:root[data-theme='light']
  :is(
    .book-search-input > .icon,
    .book-search-input button,
    .book-hit-name strong > span,
    .book-quick [data-book-quick='videos'],
    .book-video-count > .icon
  ) {
  color: var(--accent);
}
:root[data-theme='light'] .book-search-bottom button > .icon {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light']
  :is(.book-search-hits header > span, .book-quick [data-book-photos], .book-photo-count > .icon) {
  color: var(--ok);
}
:root[data-theme='light']
  :is(
    .book-map-review,
    .book-quick [data-book-quick='records'],
    .book-longest button small,
    .book-map-mobile-views button:last-child
  ) {
  color: var(--light-warning);
}
:root[data-theme='light'] .book-map-review {
  background: var(--light-warning-bg);
  border-color: var(--light-warning);
}
:root[data-theme='light'] .record-gold {
  color: var(--light-warning) !important;
}
:root[data-theme='light'] .book-filter-chip span {
  background: var(--accent-soft);
  color: var(--accent);
}

:root[data-theme='light']
  :is(
    .detail-dialog .flight-detail-tabs button[aria-selected='true'],
    .analysis-jump-nav button[aria-pressed='true'],
    .analysis-sections header button[aria-pressed='true'],
    .centering-table-choice[aria-pressed='true'],
    .detail-dialog .flight-chart-buttons button[aria-pressed='true']
  ) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
:root[data-theme='light'] .detail-dialog .flight-tempo-buttons button[aria-pressed='true'] {
  background: var(--accent);
  color: #fff;
}
:root[data-theme='light'] :is(.analysis-kind-icon, .analysis-index) {
  background: var(--light-inset);
  color: var(--light-muted);
}
:root[data-theme='light'] :is(.segment-row-circling .analysis-kind-icon, .analysis-index) {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light'] :is(.analysis-index-gold, .analysis-near) {
  background: var(--light-warning-bg);
  color: var(--light-warning);
}
:root[data-theme='light'] .analysis-takeaways {
  background: var(--light-success-bg);
}
:root[data-theme='light'] .analysis-takeaways h3 {
  color: var(--ok);
}
:root[data-theme='light'] :is(.analysis-detail-table .analysis-seek, .centering-table-choice) {
  color: var(--accent);
}
:root[data-theme='light'] .analysis-red {
  color: var(--light-danger);
}
:root[data-theme='light'] .development-record {
  background: var(--light-warning-bg);
  color: var(--text);
  border-color: var(--light-warning);
}
:root[data-theme='light'] :is(.development-record > span:first-child, .development-record small) {
  color: var(--light-warning);
}
:root[data-theme='light'] .development-record > span:last-child {
  color: var(--accent);
}

:root[data-theme='light'] :is(.flight-detail-actions, .flight-detail-actions-panel) {
  color: var(--text);
}
:root[data-theme='light'] :is(.flight-detail-actions > summary, .flight-detail-actions-panel) {
  background: var(--solid);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .flight-detail-actions[open] > summary,
    .flight-action-row:hover,
    .flight-action-row:focus-visible,
    .flight-action-primary
  ) {
  background: var(--accent-soft);
  color: var(--text);
}
:root[data-theme='light']
  :is(
    .flight-actions-caption,
    .flight-action-group h3,
    .flight-action-symbol,
    .flight-action-row kbd
  ) {
  color: var(--light-muted);
}
:root[data-theme='light'] .flight-action-group {
  border-color: var(--border);
}
:root[data-theme='light'] :is(.flight-action-danger, .flight-action-danger .flight-action-symbol) {
  color: var(--light-danger);
}

:root[data-theme='light']
  :is(.media-steps .complete, .media-auto-row p, .media-upload-list .done span, .media-done) {
  color: var(--ok);
}
:root[data-theme='light'] .media-steps .complete span {
  background: var(--light-success-bg);
  color: var(--ok);
}
:root[data-theme='light']
  :is(
    .media-upload-list .failed span,
    .media-notice.failed .media-done,
    .account-storage[data-state='error'],
    .account-danger .account-icon
  ) {
  color: var(--light-danger);
}
:root[data-theme='light'] .account-storage[data-state='saving'] {
  color: var(--light-warning);
}
:root[data-theme='light'] .journal-delete-action {
  background: var(--light-danger-bg);
  color: var(--light-danger);
}
:root[data-theme='light'] .journal-delete-action small {
  color: var(--light-danger);
}
:root[data-theme='light'] .journal-delete-preserved {
  background: var(--light-success-bg);
  color: var(--ok);
}
:root[data-theme='light'] .journal-display input:not(:checked) {
  background: #b7c4d4;
}
:root[data-theme='light'] .journal-display input:before {
  background: #fff;
}
:root[data-theme='light'] .site-status.approved {
  background: var(--light-success-bg);
  color: var(--ok);
}
:root[data-theme='light'] .site-warnings {
  background: var(--light-warning-bg);
  color: var(--light-warning);
  border-color: var(--light-warning);
}
:root[data-theme='light'] .site-warnings :is(h2, h3, a) {
  color: var(--light-warning);
}
:root[data-theme='light'] .site-warnings article {
  background: #fff8;
}

:root[data-theme='light'] .detail-dialog .flight-map-settings[open] {
  color: var(--text);
}
:root[data-theme='light'] .flight-segment-legend {
  color: var(--light-muted);
}
:root[data-theme='light'] .flight-segment-strip button,
:root[data-theme='light'] .flight-segment-legend span:before {
  background: #64748b;
}
:root[data-theme='light'] .flight-segment-strip .segment-circling,
:root[data-theme='light'] .flight-segment-legend .segment-circling:before {
  background: #2467af;
}
:root[data-theme='light'] .flight-segment-strip .segment-glide,
:root[data-theme='light'] .flight-segment-legend .segment-glide:before {
  background: #95651f;
}
:root[data-theme='light'] .flight-segment-strip .segment-missing,
:root[data-theme='light'] .flight-segment-legend .segment-missing:before {
  background: #a13c3c;
}
:root[data-theme='light'] .flight-segment-strip:after {
  background: #b42332;
}
:root[data-theme='light'] .detail-dialog {
  --replay-climb-up: #397218;
  --replay-climb-down: #a34820;
}
:root[data-theme='light'] .detail-dialog .flight-map-modes {
  background: var(--panel);
}
:root[data-theme='light'] .detail-dialog .flight-replay-hud [data-replay-gps] {
  color: #1a5fbf;
}
:root[data-theme='light'] .detail-dialog .flight-replay-hud [data-replay-agl] {
  color: #7043b0;
}
:root[data-theme='light'] .detail-dialog.replay-expanded .flight-replay-hud {
  background: var(--panel);
  color: var(--text);
}
:root[data-theme='light'] .detail-dialog.replay-expanded .flight-replay-hud small strong {
  color: var(--muted);
}
:root[data-theme='light']
  :is(.replay-camera-panel, .replay-layers-panel, .replay-view-panel, .replay-help-card) {
  background: var(--solid);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .replay-camera-menu > summary,
    .replay-layers-menu > summary,
    .detail-dialog.replay-expanded .replay-camera-menu > summary,
    .detail-dialog.replay-expanded .flight-map-settings > summary,
    .detail-dialog.replay-expanded .replay-view-menu
  ) {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .replay-choice button,
    .replay-popover-close,
    .replay-track-legend,
    .replay-help-card dd,
    .replay-view-panel button
  ) {
  background: var(--light-inset);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .replay-choice button[aria-pressed='true'],
    .replay-view-panel button[aria-pressed='true'],
    .replay-camera-menu[open] > summary,
    .detail-dialog .flight-map-settings[open] > summary
  ) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
:root[data-theme='light']
  :is(
    .replay-setting h4,
    .replay-media-settings > h4,
    .replay-choice button small,
    .replay-switch-row small,
    .replay-color-picker,
    .replay-advanced > summary,
    .replay-pitch output,
    .replay-help-card p
  ) {
  color: var(--light-muted);
}
:root[data-theme='light'] :is(.replay-switch-row, .replay-pitch) {
  color: var(--text);
}
:root[data-theme='light']
  :is(.replay-media-settings, .replay-advanced, .replay-help-card dl > div) {
  border-color: var(--border);
}
:root[data-theme='light'] .replay-switch-row input:not(:checked) {
  background: #b7c4d4;
}
:root[data-theme='light'] .replay-key-help {
  background: #eaf0f6ed;
  color: var(--text);
}
:root[data-theme='light'] .detail-dialog .flight-highlight-icon {
  background: var(--light-success-bg);
  color: var(--ok);
}
:root[data-theme='light'] .flight-memory-tags .tag {
  background: var(--accent-soft);
  color: var(--accent);
}

:root[data-theme='light'] .gallery-viewer {
  --text: #192538;
  --muted: #59677a;
  --border: #d2dbe7;
  background: #f4f6f9;
  color: var(--text);
  color-scheme: light;
}
:root[data-theme='light']
  :is(
    .gallery-viewer-layout > aside,
    .gallery-recorded,
    .gallery-details dl > div,
    .gallery-viewer textarea,
    .gallery-viewer select,
    .gallery-viewer .btn
  ) {
  background: var(--light-inset);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .gallery-viewer-header p,
    .gallery-mini-track span,
    .gallery-facts small,
    .gallery-details dt
  ) {
  color: var(--light-muted);
}
:root[data-theme='light'] :is(.gallery-recorded h3, .gallery-relink) {
  color: var(--accent);
}
:root[data-theme='light'] .gallery-viewer .btn.primary {
  background: #2470c8;
  color: #fff;
}
:root[data-theme='light'] .gallery-viewer [data-gv='favorite'][aria-pressed='true'] {
  color: var(--light-danger);
}
:root[data-theme='light'] .gallery-flight-map-status {
  background: var(--panel);
  color: var(--text);
}
:root[data-theme='light'] :is(.gallery-prev, .gallery-next) {
  background: var(--light-inset);
  color: var(--text);
}

:root[data-theme='light']
  :is(
    dialog.flight-share-page,
    .detail-dialog[data-flight-view='share'],
    .share-flight-card,
    .share-qr
  ) {
  background: var(--solid);
  color: var(--text);
  color-scheme: light;
}
:root[data-theme='light'] .share-flight-card .share-page-head {
  background: var(--bg);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .share-flight-card .share-page-head [role='tablist'],
    .share-flight-card .share-format button,
    .share-flight-card .share-chips button,
    .share-flight-card .share-link-copy input,
    .share-flight-card .share-validity button,
    .share-flight-card .share-export button span,
    .share-flight-card .share-targets > a > span,
    .share-flight-card .share-targets > button > span,
    .share-qr
  ) {
  background: var(--light-inset);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme='light']
  :is(
    .share-flight-card .share-settings h3,
    .share-flight-card .share-page-head .btn,
    .share-flight-card .share-export button,
    .share-flight-card .share-cross,
    .share-flight-card .share-targets > a,
    .share-flight-card .share-targets > button
  ) {
  color: var(--text);
}
:root[data-theme='light']
  :is(
    .share-flight-card .share-page-head small,
    .share-flight-card .share-page-head [role='tab'],
    .share-flight-card .share-preview > p,
    .share-flight-card [data-card-status],
    .share-flight-card .share-hint,
    .share-flight-card .share-cross small,
    .share-flight-card .share-link-state small,
    .share-flight-card .share-recipient small,
    .share-flight-card .share-recipient > span:last-child:not(:first-child),
    .share-flight-card .share-chat small
  ) {
  color: var(--light-muted);
}
:root[data-theme='light']
  :is(
    .share-flight-card .share-page-head [aria-selected='true'],
    .share-flight-card .share-format button[aria-pressed='true'],
    .share-flight-card .share-chips [aria-pressed='true'],
    .share-flight-card .share-validity [aria-pressed='true']
  ) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
:root[data-theme='light']
  :is(
    .share-flight-card .share-options label,
    .share-flight-card .share-recipient,
    .share-flight-card .share-page-head .btn
  ) {
  border-color: var(--border);
}
:root[data-theme='light'] .share-flight-card .share-privacy {
  background: var(--light-inset);
  color: var(--light-muted);
  border-color: var(--border);
}
:root[data-theme='light'] .share-flight-card .share-link-state {
  background: var(--light-success-bg);
  color: var(--text);
  border-color: var(--ok);
}
:root[data-theme='light'] .share-flight-card .share-chat {
  background: var(--light-inset);
  color: var(--text);
}
:root[data-theme='light'] .share-flight-card .share-chat p {
  color: #fff;
}
:root[data-theme='light'] .share-flight-card .share-revoke {
  color: var(--light-danger) !important;
  border-color: var(--light-danger) !important;
}
:root[data-theme='light'] .share-flight-card input[role='switch']:not(:checked) {
  background: #b7c4d4;
}
:root[data-theme='light'] .share-flight-card .share-export [data-card-download] span {
  color: var(--ok);
}
:root[data-theme='light'] .share-flight-card .share-dots [aria-pressed='true']:after {
  background: var(--accent);
}
@media (max-width: 600px) {
  .journal-story-layout-3 {
    grid-template-rows: repeat(2, 130px);
  }
  .journal-story-layout-5 {
    grid-auto-rows: 110px;
  }
}

/* Distance distribution and comparable annual typical distances. */
.stat-distance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.stat-distance {
  padding: 22px;
  min-width: 0;
}
.stat-distance header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-distance header h2 {
  margin: 0;
  font-size: 18px;
}
.stat-distance header small {
  color: var(--muted);
  line-height: 1.5;
}
.distance-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.distance-facts > div {
  min-width: 0;
}
.distance-facts small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.distance-facts strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.distance-bin {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  margin: 17px 0;
  font-size: 13px;
}
.distance-bin > span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.distance-rail {
  height: 16px;
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
}
.distance-rail i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}
.distance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 16px;
}
.distance-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.distance-legend i {
  display: block;
  width: 18px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}
.distance-year {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  font-size: 13px;
}
.distance-year > span {
  color: var(--muted);
}
.distance-year.selected > span {
  font-weight: 700;
  color: var(--text);
}
.distance-pair {
  display: grid;
  gap: 5px;
}
.distance-pair > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
}
.distance-pair i {
  display: block;
  height: 9px;
  background: var(--accent);
  border-radius: 2px;
}
.distance-pair span {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.distance-pair i.distance-average,
.distance-legend i.distance-average {
  background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 5px);
}
.distance-note {
  border-top: 1px solid var(--border);
  margin: 22px 0 0;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .stat-distance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .stat-distance {
    padding: 16px;
  }
  .distance-facts {
    gap: 12px;
  }
  .distance-facts strong {
    font-size: 18px;
  }
  .distance-bin {
    grid-template-columns: 68px minmax(0, 1fr) 42px;
    gap: 8px;
  }
  .distance-pair > div {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 8px;
  }
}
@media (max-width: 380px) {
  .distance-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .distance-facts > div:last-child {
    grid-column: 1/-1;
  }
}

/* Contact and project description, accessible from every app footer. */
.footer-imprint {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 4px 6px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-imprint:hover {
  color: var(--accent);
}
.imprint-dialog {
  width: 460px;
  max-width: calc(100vw - 32px);
}
.imprint-dialog .dialog-head p:empty {
  display: none;
}
.imprint-content {
  font-size: 14px;
  line-height: 1.7;
}
.imprint-content p {
  margin: 0 0 4px;
}
.imprint-content address {
  font-style: normal;
  color: var(--muted);
}
.imprint-content h3 {
  font-size: 14px;
  margin: 18px 0 4px;
}
.imprint-content a {
  color: var(--accent);
  overflow-wrap: anywhere;
}
.imprint-content .imprint-description {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.footer-legal {
  flex-wrap: wrap;
}
.privacy-dialog {
  width: 720px;
  max-width: calc(100vw - 32px);
}
.privacy-content {
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.privacy-content h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 24px 0 8px;
}
.privacy-content p {
  margin: 0 0 12px;
  color: var(--muted);
}
.privacy-content strong {
  color: var(--text);
}
.privacy-content a,
.privacy-page > a,
.auth-legal a {
  color: var(--accent);
}
.privacy-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px 40px;
}
.privacy-page article {
  margin-top: 24px;
}
.auth-legal {
  margin: 20px 0;
  font-size: 13px;
}
@media (max-width: 600px) {
  .privacy-page {
    margin: 24px auto;
    padding: 0 16px 24px;
  }
  .footnote {
    flex-wrap: wrap;
  }
  .footer-legal {
    justify-content: center;
  }
}

/* Header help and feedback use the shared accessible dialog. */
.help-dialog {
  width: 720px;
  max-width: calc(100vw - 32px);
}
.feedback-dialog {
  width: 460px;
  max-width: calc(100vw - 32px);
}
.support-content {
  font-size: 14px;
  line-height: 1.65;
}
.support-content > p {
  margin: 0 0 20px;
  color: var(--muted);
}
.support-content a {
  color: var(--accent);
  overflow-wrap: anywhere;
}
.help-topics details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.help-topics summary {
  font-weight: 600;
  cursor: pointer;
}
.help-topics details p {
  margin: 12px 0 0;
  color: var(--muted);
}
.feedback-form {
  display: grid;
  gap: 8px;
}
.feedback-form label {
  font-size: 13px;
  margin-top: 12px;
}
.feedback-form label span {
  color: var(--muted);
  font-weight: 400;
}
.feedback-form input,
.feedback-form textarea {
  font-size: 14px;
  padding: 12px;
  min-width: 0;
}
.feedback-form textarea {
  resize: vertical;
}
.feedback-form .feedback-delivery {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.feedback-form > button {
  font-size: 14px;
  min-height: 40px;
  margin-top: 8px;
}
.feedback-form [data-feedback-status]:empty {
  display: none;
}
@media (max-width: 600px) {
  .header {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .header .header-actions {
    gap: 6px;
    margin-left: auto;
  }
  .header .brand {
    flex-shrink: 1;
    min-width: 0;
  }
  .header .brand > span {
    display: none;
  }
  .feedback-form input,
  .feedback-form textarea {
    font-size: 16px;
  }
}

/* Function guide: jump links open the requested chapter inside the help dialog. */
.privacy-dialog {
  overflow: hidden;
}
.privacy-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  max-height: calc(90dvh - 2px);
}
.privacy-dialog .dialog-head {
  flex-shrink: 0;
  background: var(--solid);
}
.privacy-dialog .dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.help-contents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  scroll-margin-top: 16px;
}
.help-contents button,
.help-back {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}
.help-contents button:hover,
.help-back:hover {
  border-color: var(--accent);
}
.help-contents button:focus-visible,
.help-back:focus-visible,
.help-topics summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.help-topics details {
  scroll-margin-top: 16px;
}
.help-topics details strong {
  color: var(--text);
}
.help-topics ol {
  padding-left: 24px;
  color: var(--muted);
  margin: 12px 0;
}
.help-topics li + li {
  margin-top: 8px;
}
.help-back {
  margin-top: 16px;
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 12px;
}
@media (max-width: 600px) {
  .help-contents {
    grid-template-columns: 1fr;
  }
  .help-contents button {
    min-height: 44px;
  }
}

/* Optional IGC sensor values use the existing replay HUD. */
.detail-dialog .flight-replay-hud.flight-hud-sensors {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 580px;
}
.flight-chart-buttons {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .detail-dialog .flight-replay-hud.flight-hud-sensors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    top: calc(var(--flight-map-height) - 130px);
  }
}

/* Keep equipment actions and assignment provenance visible in the flight editor. */
.flight-editor-dialog .form-grid label > small.flight-harness-create,
.flight-editor-dialog .form-grid label > small.flight-source-help:not([hidden]) {
  display: block;
}

/* Private Learnings: shared cards, list context and responsive editors. */
.ln-page {
  --ln-bg: #121925;
  --ln-card: #1b2433;
  --ln-border: #2c3849;
  --ln-field: #151d2a;
  --ln-text: #e8edf4;
  --ln-muted: #a3afc0;
  --ln-blue: #9cc3ea;
  color: var(--ln-text);
  font-family: 'IBM Plex Sans', sans-serif;
}
:root[data-theme='light'] .ln-page,
:root[data-theme='light'] .ln-dialog,
:root[data-theme='light'] .ln-picker,
:root[data-theme='light'] .ln-filter-dialog,
:root[data-theme='light'] .ln-filter-choice {
  --ln-bg: #f5f7fb;
  --ln-card: #fff;
  --ln-border: #d7e0ec;
  --ln-field: #f0f4fa;
  --ln-text: #192537;
  --ln-muted: #59677b;
  --ln-blue: #2864a5;
}
.ln-dialog,
.ln-picker,
.ln-filter-dialog,
.ln-filter-choice {
  --ln-bg: #121925;
  --ln-card: #1b2433;
  --ln-border: #2c3849;
  --ln-field: #151d2a;
  --ln-text: #e8edf4;
  --ln-muted: #a3afc0;
  --ln-blue: #9cc3ea;
  color: var(--ln-text);
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--ln-card);
  border: 1px solid var(--ln-border);
}
.ln-page h1 {
  font-size: 32px;
  margin: 8px 0;
  line-height: 1.2;
}
.ln-page .page-heading p {
  color: var(--ln-muted);
}
.ln-page .btn,
.ln-dialog .btn,
.ln-picker .btn,
.ln-filter-dialog .btn {
  font-family: inherit;
}
.ln-page .actions [data-ln-new] {
  background: #2470c8;
  color: #fff;
  border-color: #2470c8;
}
.ln-page button:focus-visible,
.ln-dialog button:focus-visible,
.ln-picker button:focus-visible,
.ln-filter-dialog button:focus-visible,
.ln-page a:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
.ln-label {
  color: #8da7c5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 24px 0 14px;
}
.ln-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.ln-search-row .input-wrap {
  flex: 1;
  background: var(--ln-field);
  border: 1px solid var(--ln-border);
  border-radius: 14px;
}
.ln-search-row .input-wrap > .icon {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.ln-search-row .input-wrap input {
  padding-left: 44px;
}
.ln-search-row .segment .btn {
  gap: 6px;
}
.ln-search-row .segment .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.ln-search-row .segment {
  flex-shrink: 0;
}
.ln-search-row .segment button[aria-pressed='true'],
.ln-list-controls .segment button[aria-pressed='true'] {
  background: #2b3b53;
  color: #e8edf4;
}
.ln-search-row [data-ln-filters] {
  display: none;
}
.ln-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
.ln-workspace > aside {
  position: sticky;
  top: 24px;
}
.ln-workspace > aside > [data-ln-theme] {
  display: flex;
  width: 100%;
  justify-content: space-between;
  border: 0;
  background: transparent;
  margin: 2px 0;
}
.ln-workspace > aside > [aria-pressed='true'] {
  background: #1e3854;
}
.ln-filters {
  background: var(--ln-card);
  border: 1px solid var(--ln-border);
  border-radius: 20px;
  padding: 18px;
}
.ln-filters header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ln-border);
  padding-bottom: 8px;
}
.ln-filters header .btn {
  padding: 0;
  font-size: 12px;
  border: 0;
  color: var(--ln-blue);
  background: none;
}
.ln-filters fieldset {
  border: 0;
  border-bottom: 1px solid var(--ln-border);
  margin: 18px 0;
  padding: 0 0 14px;
}
.ln-filters legend {
  color: #8da7c5;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 10px;
}
.ln-filters fieldset label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 14px;
}
.ln-filters input[type='checkbox'],
.ln-picker input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: #2470c8;
  flex-shrink: 0;
}
.ln-filters fieldset label > small {
  margin-left: auto;
  color: var(--ln-muted);
}

.ln-page select,
.ln-page input,
.ln-dialog input,
.ln-picker input:not([type='checkbox']),
.ln-filter-dialog select,
.ln-dialog select,
.ln-picker select {
  color: var(--ln-text);
  background: var(--ln-field);
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  max-width: 100%;
}
.ln-filters select {
  width: 100%;
  margin-top: 6px;
}
.ln-filter-pickers > .ln-label {
  margin: 0 0 10px;
  font-size: 11px;
}
.ln-filter-picker {
  display: block;
  position: relative;
  margin-top: 8px;
}
.ln-filter-picker > .icon,
.ln-filter-picker > .ln-filter-symbol {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--ln-muted);
  pointer-events: none;
}
.ln-filter-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.ln-filters .ln-filter-picker select {
  appearance: none;
  margin: 0;
  height: 36px;
  padding: 6px 10px 6px 34px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--ln-muted);
  cursor: pointer;
}
.ln-filters .ln-filter-picker.is-selected select {
  color: var(--ln-text);
}
.ln-filter-picker select:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 2px;
}
.ln-list-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  color: var(--ln-muted);
}
.ln-list-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ln-result-count {
  white-space: nowrap;
  font-size: 14px;
}
.ln-sort {
  position: relative;
  max-width: 100%;
}
.ln-sort > .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.ln-list-controls .ln-sort select {
  padding: 10px 12px 10px 36px;
  width: 100%;
  font-size: 13px;
}
.ln-list-controls > .segment {
  grid-column: 1 / -1;
  width: max-content;
}
.ln-list-controls .segment .btn {
  --button-height: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
}
.ln-list-controls .segment .icon {
  width: 14px;
  height: 14px;
}
.ln-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ln-active-filters .btn {
  --button-height: 24px;
  border-radius: 6px;
  background: #1e3854;
  border: 0;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  gap: 7px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
}
.ln-active-filters .icon {
  width: 14px;
  height: 14px;
}
.ln-active-filters .btn[data-ln-reset] {
  background: transparent;
  border-radius: 6px;
  color: var(--ln-blue);
  padding: 0 4px;
}
.ln-active-filters .btn[data-ln-reset]:hover {
  text-decoration: underline;
}
.ln-filter-origin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ln-filter-origin[data-origin='own'] .icon {
  color: #7dbbf7;
}
.ln-filter-origin[data-origin='course'] .icon {
  color: #8fddb0;
}
.ln-filter-origin[data-origin='person'] .icon {
  color: #f2c38b;
}
.ln-filter-origin[data-origin='external'] .icon {
  color: #c9b8f0;
}
.ln-filters fieldset label > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ln-filters fieldset label .icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.ln-filters input[type='checkbox'] {
  appearance: none;
  display: inline-grid;
  place-content: center;
  border: 2px solid #4c5e74;
  border-radius: 5px;
  background: var(--ln-field);
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.ln-filters input[type='checkbox']:checked {
  background: #2470c8;
  border-color: #7dbbf7;
}
.ln-filters input[type='checkbox']:checked::before {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.ln-filters input[type='checkbox']:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
.ln-month {
  margin: 24px 4px 14px;
}
.ln-card {
  background: var(--ln-card);
  border: 1px solid var(--ln-border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}
.ln-card-content {
  padding: 20px;
}
.ln-card header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.ln-card header > div:not(.ln-chips) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}
.ln-card time {
  font-size: 13px;
  color: var(--ln-muted);
}
.ln-origin {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  vertical-align: middle;
}
.ln-own {
  background: #16283f;
  color: #7dbbf7;
}
.ln-course {
  background: #15291f;
  color: #8fddb0;
}
.ln-person {
  background: #2e2417;
  color: #f2c38b;
}
.ln-external {
  background: #231f33;
  color: #c9b8f0;
}
.ln-card header > .ln-chips {
  margin-left: auto;
  max-width: 55%;
  justify-content: flex-end;
}
.ln-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ln-chips .btn,
.ln-theme-select label > span {
  border-radius: 24px;
  padding: 6px 12px;
  border: 1px solid #3d74a7;
  background: #20364e;
  color: #bed5ef;
  font-size: 13px;
  min-height: 32px;
}
.ln-chips .btn[data-ln-theme],
.ln-overview .ln-chips .btn[data-ln-gear-filter],
.ln-links-editor .ln-chips .btn {
  --button-height: 24px;
  border-radius: 6px;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
}
.ln-chips small {
  font-size: 10px;
  opacity: 0.75;
  margin-left: 5px;
}
.ln-title,
.ln-excerpt {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  color: var(--ln-text);
  font-family: inherit;
}
.ln-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}
.ln-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ln-muted);
  cursor: pointer;
}
.ln-keywords {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.ln-keywords .btn {
  --button-height: 24px;
  border: 1px solid var(--ln-border);
  border-radius: 6px;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  color: var(--ln-blue);
  background: var(--ln-field);
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
}
.ln-keywords .btn:hover {
  border-color: var(--ln-blue);
}
.ln-linked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--ln-border);
  background: var(--ln-field);
  border-radius: 16px;
  margin-top: 18px;
  color: var(--ln-muted);
  font-size: 12px;
}
.ln-linked small {
  color: #8da7c5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ln-linked span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ln-linked svg {
  width: 16px;
  height: 16px;
}
.ln-card footer {
  display: flex;
  border-top: 1px solid var(--ln-border);
  padding: 8px 16px;
}
.ln-card footer .btn {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ln-muted);
  justify-content: center;
  min-width: 0;
}
.ln-card [data-ln-mark][aria-pressed='true'] svg,
.ln-mini > svg {
  color: #f0b44c;
  fill: #f0b44c;
}
.ln-marked {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ln-mini {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--ln-border);
  border-radius: 20px;
  background: var(--ln-card);
  color: var(--ln-text);
  font-family: inherit;
}
.ln-mini span {
  min-width: 0;
}
.ln-mini strong {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.ln-mini small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ln-muted);
  margin-top: 5px;
}
.ln-mini-origin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ln-mini-origin .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ln-mini-origin[data-origin='own'] .icon {
  color: #7dbbf7;
}
.ln-mini-origin[data-origin='course'] .icon {
  color: #8fddb0;
}
.ln-mini-origin[data-origin='person'] .icon {
  color: #f2c38b;
}
.ln-mini-origin[data-origin='external'] .icon {
  color: #c9b8f0;
}
.ln-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ln-section-heading .btn {
  border: 0;
  color: var(--ln-blue);
  background: transparent;
}
.ln-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.ln-theme {
  padding: 18px;
  border: 1px solid var(--ln-border);
  background: var(--ln-card);
  border-radius: 20px;
  min-height: 148px;
}
.ln-theme-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: 0;
  color: var(--ln-text);
  text-align: left;
  font: inherit;
  padding: 0 0 12px;
}
.ln-theme-heading strong {
  font-size: 18px;
}
.ln-theme-heading > span {
  margin-left: auto;
  color: var(--ln-muted);
}
.ln-theme-heading small {
  font-size: 10px;
  color: var(--ln-muted);
  border: 1px solid var(--ln-border);
  border-radius: 5px;
  padding: 2px 5px;
}
.ln-theme-entry {
  display: block;
  width: 100%;
  padding: 8px 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  border: 0;
  border-top: 1px solid var(--ln-border);
  background: none;
  text-align: left;
  font: inherit;
  color: var(--ln-muted);
}
.ln-theme .muted {
  font-size: 12px;
}
.ln-theme-empty,
.ln-theme-add {
  border-style: dashed;
  background: none;
}
.ln-theme-add {
  color: var(--ln-blue);
  font: inherit;
  line-height: 2;
}
.ln-theme-add small {
  color: var(--ln-muted);
}
.ln-theme [data-ln-new] {
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--ln-blue);
}
.ln-overview-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 10px;
}
.ln-empty {
  padding: 35px 20px;
  text-align: center;
  color: var(--ln-muted);
}
.ln-dialog {
  width: min(1240px, calc(100vw - 64px));
  max-width: none;
  max-height: calc(100dvh - 64px);
  border-radius: 24px;
}
.ln-dialog .dialog-head {
  border-bottom: 1px solid var(--ln-border);
  padding: 20px 24px;
  align-items: flex-start;
}
.ln-dialog .dialog-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
}
.ln-dialog .dialog-body {
  padding: 24px;
}
.ln-dialog .dialog-footer {
  position: sticky;
  bottom: 0;
  background: var(--ln-card);
  padding: 16px 24px;
  border-top: 1px solid var(--ln-border);
}
.ln-detail-grid,
.ln-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 28px;
}
.ln-detail-grid h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 20px 0;
}
.ln-detail-grid aside {
  border: 1px solid var(--ln-border);
  border-radius: 20px;
  padding: 18px;
  background: var(--ln-field);
}
.ln-detail-grid aside .ln-label:first-child {
  margin-top: 0;
}
.ln-rich {
  font-size: 18px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.ln-rich a {
  color: var(--ln-blue);
}
.ln-rich ul,
.ln-rich ol {
  padding-left: 24px;
}
.ln-updated {
  padding-top: 14px;
  margin-top: 20px;
  border-top: 1px solid var(--ln-border);
  color: var(--ln-muted);
  font-size: 12px;
}
.ln-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.ln-detail-actions > span {
  color: var(--ln-muted);
  font-family: 'IBM Plex Mono', monospace;
}
.ln-detail-actions [aria-pressed='true'],
.ln-page-detail-header [aria-pressed='true'] {
  background: #2e2417;
  color: #f0b44c;
  border-color: #705322;
}
.ln-detail-actions [aria-pressed='true'] svg {
  fill: currentColor;
}
.ln-page-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.ln-editor-page > .ln-page-detail-header {
  justify-content: space-between;
}
.ln-editor-page > .ln-page-detail-header > [data-ln-draft-mark] {
  margin-left: auto;
}
.ln-page-detail-header > span small {
  display: block;
  margin-top: 6px;
  color: var(--ln-muted);
}
.ln-page-detail-header .ln-detail-actions {
  margin-left: auto;
}
.ln-menu {
  position: relative;
}
.ln-menu summary {
  list-style: none;
  cursor: pointer;
}
.ln-menu[open] {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ln-menu .btn {
  font-size: 13px;
}
.ln-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--ln-text);
  background: var(--ln-field);
  border: 1px solid var(--ln-border);
  border-radius: 14px;
  padding: 14px;
  margin: 8px 0;
  text-align: left;
  font-family: inherit;
}
.ln-link-row > svg {
  color: #7dbbf7;
  flex-shrink: 0;
}
.ln-link-row > span {
  flex: 1;
  min-width: 0;
}
.ln-link-row strong {
  display: block;
  font-size: 14px;
}
.ln-link-row small {
  display: block;
  color: var(--ln-muted);
  font-size: 12px;
  margin-top: 4px;
}
.ln-link-row:disabled {
  opacity: 0.6;
}
.ln-form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
.ln-edit-grid label,
.ln-edit-grid legend {
  color: var(--ln-muted);
  font-size: 14px;
}
.ln-edit-grid section > label,
.ln-edit-grid aside > label {
  display: block;
  margin: 18px 0;
}
.ln-edit-grid label input:not([type='checkbox']):not([type='radio']) {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.ln-editor {
  border: 1px solid var(--ln-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--ln-field);
  margin: 10px 0 18px;
}
.ln-toolbar {
  display: flex;
  gap: 5px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--ln-border);
}
.ln-toolbar .btn {
  min-height: 34px;
  border: 0;
  padding: 4px 8px;
  background: none;
}
.ln-editor [contenteditable] {
  padding: 16px;
  min-height: 240px;
  outline: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ln-text);
  overflow-wrap: anywhere;
}
.ln-editor [contenteditable]:focus {
  box-shadow: inset 0 0 0 2px #7dbbf7;
}
.ln-theme-select {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
.ln-theme-select .ln-chips {
  margin: 12px 0;
}
.ln-theme-select label {
  position: relative;
}
.ln-theme-select label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ln-theme-select label > span {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border-color: var(--ln-border);
  background: var(--ln-field);
  color: var(--ln-muted);
}
.ln-theme-select input:checked + span {
  border-color: #3d74a7;
  background: #20364e;
  color: #bed5ef;
}
.ln-theme-select input:checked + span:before {
  content: '✓';
  margin-right: 5px;
}
.ln-theme-select input:focus-visible + span {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
.ln-theme-create-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.ln-theme-create-field {
  flex: 1 1 280px;
  min-width: 0;
}
.ln-theme-create-field > input {
  width: 100%;
}
.ln-theme-create-row > small {
  flex: 1 1 260px;
  padding-top: 14px;
  font-size: 13px;
}
.ln-theme-create-row > small:empty {
  display: none;
}
.ln-theme-create-row > small strong {
  color: var(--ln-text);
}
.ln-theme-suggestions {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  background: var(--ln-card);
}
.ln-theme-suggestions[hidden] {
  display: none;
}
.ln-theme-create-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ln-blue) 15%, var(--ln-card));
  color: var(--ln-text);
  font: inherit;
  text-align: left;
}
.ln-theme-create-action span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ln-theme-create-action svg {
  flex-shrink: 0;
}
.ln-theme-create-action:hover {
  background: color-mix(in srgb, var(--ln-blue) 23%, var(--ln-card));
}
.ln-theme-suggestions > small {
  display: block;
  padding: 8px 10px 2px;
}
.ln-theme-suggestions > small:empty {
  display: none;
}
.ln-origin-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}
.ln-origin-select legend {
  margin-bottom: 8px;
}
.ln-origin-select label {
  position: relative;
}
.ln-origin-select input {
  position: absolute;
  opacity: 0;
}
.ln-origin-select label span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  min-height: 48px;
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  background: var(--ln-field);
  cursor: pointer;
  color: var(--ln-text);
}
.ln-origin-select input:checked + span {
  border-color: #5ea8f2;
  background: #20364e;
  box-shadow: inset 0 0 0 1px #5ea8f2;
}
.ln-origin-select input:focus-visible + span {
  outline: 2px solid #7dbbf7;
}
.ln-links-editor {
  border: 1px solid var(--ln-border);
  border-radius: 20px;
  padding: 16px;
  background: var(--ln-field);
}
.ln-links-editor .ln-label {
  margin-top: 0;
}
.ln-link-field {
  margin-top: 20px;
}
.ln-link-field header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--ln-muted);
}
.ln-link-field header .btn {
  --button-height: 24px;
  color: var(--ln-blue);
  border-style: dashed;
  border-radius: 6px;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 20px;
}
.ln-attachments {
  margin: 20px 0 0;
}
.ln-drop {
  border: 1px dashed #3d74a7;
  border-radius: 12px;
  padding: 14px;
  color: var(--ln-muted);
  font-size: 13px;
}
.ln-drop small {
  display: block;
  font-size: 11px;
  margin-top: 8px;
}
.ln-drop .btn {
  color: var(--ln-blue);
  background: none;
  border-style: dashed;
  margin-left: 6px;
}
.ln-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ln-border);
  border-radius: 14px;
  background: var(--ln-field);
  margin-top: 8px;
}
.ln-file-type {
  font-size: 10px;
  color: #8fddb0;
  background: #15291f;
  border-radius: 10px;
  padding: 16px 10px;
  font-weight: 700;
}
.ln-attachment > div {
  min-width: 0;
  flex: 1;
}
.ln-attachment strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.ln-attachment small {
  display: block;
  color: var(--ln-muted);
  font-size: 11px;
  margin-top: 4px;
}
.ln-attachment .btn {
  min-width: 32px;
  width: 32px;
  min-height: 32px;
  padding: 5px;
  flex-shrink: 0;
}
.ln-attachment [data-ln-retry-file] {
  width: auto;
}
.ln-editor-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.ln-dialog .dialog-footer > .ln-editor-footer {
  width: 100%;
}
.ln-editor-footer [data-ln-dirty] {
  margin-left: auto;
  color: #f0b44c;
  font-size: 13px;
}
.ln-editor-footer [data-ln-delete] {
  color: #ff8a8a;
}
.ln-editor-page > .ln-editor-footer {
  position: sticky;
  bottom: 0;
  background: var(--ln-bg);
  padding: 16px 0;
  border-top: 1px solid var(--ln-border);
  margin-top: 24px;
  z-index: 2;
}
.ln-picker {
  width: min(700px, calc(100vw - 32px));
  max-height: 85dvh;
  border-radius: 20px;
  padding: 20px;
}
.ln-picker > header,
.ln-filter-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.ln-picker h2 {
  font-size: 20px;
  margin: 0;
}
.ln-picker > input {
  width: 100%;
}
.ln-picker-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
}
.ln-picker-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ln-picker-options input[type='date'] {
  width: 150px;
}
.ln-picker #ln-picker-results {
  max-height: 38dvh;
  overflow: auto;
  margin-top: 14px;
}
.ln-picker-result {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--ln-border);
  padding: 14px 4px;
  cursor: pointer;
}
.ln-picker-result span {
  min-width: 0;
}
.ln-picker-result strong {
  display: block;
  font-size: 14px;
}
.ln-picker-result small {
  display: block;
  color: var(--ln-muted);
  font-size: 12px;
  margin-top: 6px;
}
.ln-picker mark {
  background: #20364e;
  color: #bed5ef;
}
.ln-picker > footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--ln-border);
  margin-top: 16px;
}
.ln-picker > footer span {
  margin-right: auto;
  color: var(--ln-muted);
}
.ln-manage-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ln-border);
}
.ln-manage-row > span {
  flex: 1;
  min-width: 160px;
}
.ln-manage-row small {
  display: block;
  color: var(--ln-muted);
}
.ln-manage-row .btn {
  font-size: 12px;
  padding: 5px 8px;
}
.ln-picker #ln-manage-add {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.ln-picker #ln-manage-add label {
  flex: 1;
}
.ln-picker #ln-manage-add input {
  width: 100%;
  margin-top: 8px;
}
.ln-related {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  margin: 20px 0;
}
.ln-related h2 {
  font-size: 18px;
}
.ln-related .ln-link-row {
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
}
.ln-new-badge {
  font-size: 10px;
  color: #f0b44c;
  background: #2e2417;
  border-radius: 20px;
  padding: 2px 6px;
  margin-left: auto;
}
@media (max-width: 1100px) {
  .ln-workspace {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 18px;
  }
  .ln-detail-grid,
  .ln-edit-grid {
    gap: 20px;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr);
  }
  .ln-origin-select {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .navigation {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .navigation .ln-new-badge {
    display: none;
  }
  .ln-workspace {
    display: block;
  }
  .ln-workspace > aside {
    display: none;
  }
  .ln-search-row [data-ln-filters] {
    display: flex;
  }
  .ln-filter-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    margin: 0;
    border-radius: 20px 20px 0 0;
    padding: 20px;
  }
  .ln-filter-dialog .ln-filters {
    border: 0;
    padding: 0;
  }
  .ln-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .ln-detail-grid,
  .ln-edit-grid {
    grid-template-columns: 1fr;
  }
  .ln-dialog .dialog-body {
    padding: 20px;
  }
  .ln-dialog .dialog-head {
    padding: 16px 20px;
  }
  .ln-dialog .dialog-footer {
    padding: 12px 16px;
  }
  .ln-detail-grid h1 {
    font-size: 25px;
  }
  .ln-rich {
    font-size: 16px;
  }
  .ln-origin-select {
    grid-template-columns: 1fr 1fr;
  }
  .ln-editor-page > .ln-editor-footer {
    bottom: calc(var(--mobile-navigation-height) + env(safe-area-inset-bottom));
  }
  .ln-page .page-heading {
    align-items: center;
  }
  .ln-page .page-heading p {
    font-size: 13px;
  }
  .ln-page .actions .btn {
    font-size: 13px;
    padding: 10px 12px;
  }
  .ln-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ln-overview-bottom {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .ln-page h1 {
    font-size: 26px;
  }
  .ln-search-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .ln-search-row .input-wrap {
    flex-basis: calc(100% - 58px);
  }
  .ln-search-row > .segment {
    width: 100%;
    order: 3;
  }
  .ln-search-row > .segment button {
    flex: 1;
    justify-content: center;
  }
  .ln-search-row [data-ln-filters] {
    width: 48px;
    padding: 12px;
  }
  .ln-list-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .ln-list-controls .ln-sort select {
    font-size: 12px;
  }
  .ln-list-controls > .segment {
    grid-column: auto;
  }
  .ln-card {
    border-radius: 16px;
  }
  .ln-card-content {
    padding: 16px;
  }
  .ln-card header {
    gap: 10px;
  }
  .ln-card .ln-origin {
    width: 38px;
    height: 38px;
  }
  .ln-card header > div:not(.ln-chips) {
    font-size: 14px;
  }
  .ln-card header > .ln-chips .btn:nth-child(n + 2) {
    display: none;
  }
  .ln-card header > .ln-chips {
    max-width: 42%;
  }
  .ln-title {
    font-size: 16px;
  }
  .ln-excerpt {
    font-size: 14px;
  }
  .ln-card footer {
    padding: 5px;
  }
  .ln-card footer .btn {
    font-size: 12px;
    gap: 5px;
    padding: 8px 4px;
  }
  .ln-linked {
    gap: 10px;
    font-size: 11px;
  }
  .ln-marked {
    grid-template-columns: 1fr;
  }
  .ln-theme-grid {
    gap: 10px;
  }
  .ln-theme {
    padding: 14px;
    min-height: 140px;
  }
  .ln-theme-heading strong {
    font-size: 16px;
  }
  .ln-theme-entry {
    font-size: 13px;
  }
  .ln-theme-heading {
    flex-wrap: wrap;
  }
  .ln-theme-heading small {
    order: 2;
  }
  .ln-form-row {
    grid-template-columns: 1fr;
  }
  .ln-detail-actions .btn {
    padding: 8px;
    font-size: 12px;
  }
  .ln-dialog .dialog-head h2 {
    font-size: 16px;
  }
  .ln-detail-actions .ln-origin {
    display: none;
  }
  .ln-editor-footer {
    gap: 8px;
  }
  .ln-editor-footer [data-ln-dirty] {
    flex-basis: 100%;
    text-align: right;
  }
  .ln-editor-footer [data-ln-cancel] {
    margin-left: auto;
  }
  .ln-picker {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
    height: 100dvh;
    padding: 18px;
  }
  .ln-picker #ln-picker-results {
    max-height: 45dvh;
  }
  .ln-attachment {
    gap: 6px;
    padding: 8px;
  }
  .ln-attachment .ln-file-type {
    padding: 12px 6px;
  }
  .ln-origin-select span {
    font-size: 12px;
  }
  .ln-page-detail-header {
    align-items: flex-start;
  }
}
.mobile-more {
  display: none;
}
@media (max-width: 900px) {
  :root {
    --mobile-navigation-height: 64px;
  }
  .navigation {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: 48px;
  }
  .navigation [data-view='gallery'],
  .navigation [data-view='stats'],
  .navigation [data-view='gear'],
  .navigation [data-view='sites'],
  .navigation [data-settings] {
    display: none;
  }
  .navigation .mobile-more {
    display: flex;
  }
}
.ln-tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--ln-field);
  border: 1px solid var(--ln-border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 14px;
}
.ln-tag-input #ln-keyword-new {
  flex: 1;
  min-width: 160px;
  border: 0;
  padding: 6px;
  background: transparent;
}
.ln-tag-input .ln-chips .btn {
  --button-height: 24px;
  border-radius: 6px;
  height: 24px;
  min-height: 24px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
}
.ln-link-row > span:has(> svg) {
  flex: 0 0 24px;
}
.ln-filters details summary {
  color: var(--ln-blue);
  font-size: 12px;
  cursor: pointer;
  padding: 8px 0;
}
.ln-page .btn.primary,
.ln-dialog .btn.primary,
.ln-picker .btn.primary {
  background: #2470c8;
  border-color: #2470c8;
  color: #fff;
}
.ln-card time,
.ln-edit-grid input[type='date'] {
  font-family: 'IBM Plex Mono', monospace;
}
.ln-picker-type-icon {
  display: inline-flex;
  width: 28px;
  flex-shrink: 0;
}

/* Searchable, staged multi-selects for Learning filters. */
.ln-filters button.ln-filter-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 6px 10px 6px 34px;
  border: 1px solid var(--ln-border);
  border-radius: 10px;
  background: var(--ln-field);
  color: var(--ln-muted);
  font: inherit;
  font-size: 12px;
  text-align: left;
}
.ln-filter-picker > span:not(.ln-filter-symbol):not(.ln-choice-arrow) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ln-filters button.ln-filter-picker.is-selected {
  color: var(--ln-text);
}
.ln-filters button.ln-filter-picker[aria-expanded='true'] {
  border-color: #7dbbf7;
  box-shadow: inset 0 0 0 1px #7dbbf7;
}
.ln-choice-arrow {
  margin-left: auto;
  color: var(--ln-blue);
}
.ln-filter-picker[aria-expanded='true'] .ln-choice-arrow {
  transform: rotate(180deg);
}
.ln-filter-choice {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  border: 1px solid #34445a;
  border-radius: 16px;
  background: #202c3d;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: 440px;
  box-shadow: 0 18px 45px #0005;
  overflow: hidden;
  z-index: 50;
}
.ln-filter-choice[open] {
  display: flex;
  flex-direction: column;
}
:root[data-theme='light'] .ln-filter-choice {
  background: var(--ln-card);
  border-color: var(--ln-border);
}
.ln-filter-choice > header {
  padding: 14px 14px 8px;
  flex-shrink: 0;
}
.ln-choice-search {
  position: relative;
}
.ln-choice-search > .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ln-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.ln-filter-choice .ln-choice-search input {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 9px 36px;
  border: 2px solid #5ea8f2;
  border-radius: 11px;
  background: var(--ln-field);
  color: var(--ln-text);
  font: inherit;
  font-size: 14px;
}
.ln-choice-search input:focus {
  outline: none;
  box-shadow: 0 0 0 1px #7dbbf7;
}
.ln-choice-search input::placeholder {
  color: var(--ln-muted);
}
.ln-choice-search [data-choice-close] {
  position: absolute;
  right: 5px;
  top: 6px;
  width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 5px;
  background: transparent;
  border: 0;
  color: var(--ln-muted);
}
.ln-choice-caption {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--ln-muted);
}
.ln-choice-caption > span:last-child {
  white-space: nowrap;
}
.ln-choice-results {
  overflow-y: auto;
  min-height: 0;
  padding: 0 7px 8px;
}
.ln-choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 3px 0;
  padding: 12px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ln-text);
}
.ln-choice-row:hover,
.ln-choice-row:focus-within {
  background: #20364e;
}
:root[data-theme='light'] .ln-choice-row:hover,
:root[data-theme='light'] .ln-choice-row:focus-within {
  background: #e5effb;
}
.ln-choice-row input[type='checkbox'] {
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 2px solid #52657c;
  border-radius: 5px;
  cursor: pointer;
}
.ln-choice-row input:checked {
  background: #2470c8;
  border-color: #7dbbf7;
}
.ln-choice-row input:checked::before {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.ln-choice-row input:focus-visible,
.ln-filter-choice button:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 2px;
}
.ln-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: #16283f;
  color: #9cc3ea;
  font-weight: 700;
  font-size: 18px;
}
.ln-choice-icon svg {
  width: 18px;
  height: 18px;
}
.ln-choice-text {
  min-width: 0;
  flex: 1;
}
.ln-choice-text strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ln-choice-text small {
  display: block;
  font-size: 12px;
  color: var(--ln-muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.ln-choice-total {
  color: var(--ln-muted);
  font-size: 12px;
  padding-left: 6px;
}
.ln-filter-choice > footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #34445a;
  padding: 12px 14px;
  flex-shrink: 0;
}
.ln-filter-choice > footer > span {
  flex: 1;
  font-size: 12px;
  color: var(--ln-muted);
}
.ln-filter-choice > footer .btn {
  height: 34px;
  min-height: 34px;
  padding: 6px 12px;
  border-color: #34445a;
  background: transparent;
  font-size: 13px;
  color: var(--ln-text);
}
.ln-filter-choice > footer .btn.primary {
  background: #2470c8;
  border-color: #2470c8;
  color: #fff;
}
.ln-choice-empty {
  text-align: center;
  color: var(--ln-muted);
  font-size: 13px;
  padding: 24px 12px;
}
@media (max-width: 900px) {
  .ln-filter-choice {
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 80dvh;
    border-radius: 20px 20px 0 0;
    margin: 0;
  }
  .ln-filter-choice > footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

.ln-text-link {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 6px 14px;
  margin-top: 6px;
  color: var(--ln-blue);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.ln-text-link:hover {
  text-decoration: underline;
}
.ln-section-heading .ln-text-link {
  padding: 0;
  margin: 0;
}

.ln-list-controls > .segment {
  height: 34px;
  padding: 3px;
}
.ln-topic-page .ln-back-link {
  padding: 0;
  margin: 0 0 20px;
  color: var(--ln-blue);
}
.ln-topic-page .page-heading .ln-label {
  color: var(--ln-muted);
}
.ln-topic-workspace {
  margin-top: 22px;
}
.ln-topic-workspace .ln-search-row {
  margin: 0 0 14px;
}
.ln-topic-workspace > aside > .ln-label {
  margin: 0 0 14px;
}
.ln-topic-workspace .ln-list-controls {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}
.ln-topic-workspace .ln-list-controls > .segment {
  grid-column: auto;
}
.ln-topic-workspace .ln-sort select {
  height: 34px;
  width: clamp(200px, 22vw, 320px);
  padding-top: 6px;
  padding-bottom: 6px;
}
@media (max-width: 1100px) {
  .ln-topic-workspace .ln-list-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ln-topic-workspace .ln-list-summary {
    grid-column: 1 / -1;
  }
  .ln-topic-workspace .ln-sort select {
    width: 100%;
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .ln-topic-workspace .ln-list-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .ln-topic-workspace .ln-list-summary {
    grid-column: auto;
  }
}

/* Read modal: identity left, navigation and actions right. */
.ln-dialog .dialog-head.ln-read-header {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}
.ln-modal-context {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.ln-modal-context > div {
  min-width: 0;
}
.ln-read-header .ln-origin {
  width: 52px;
  height: 52px;
}
.ln-dialog .ln-read-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ln-dialog .ln-read-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ln-muted);
}
.ln-read-header .ln-detail-actions {
  margin: 0;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 12px;
}
.ln-modal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--ln-border);
  padding-right: 14px;
  margin-right: 2px;
}
.ln-modal-nav > span {
  color: var(--ln-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  white-space: nowrap;
}
.ln-read-header .ln-modal-nav .btn {
  --button-height: 40px;
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 22px;
}
.ln-read-header .ln-detail-actions > .btn {
  font-size: 14px;
  padding: 0 14px;
}
.ln-read-header .ln-menu summary {
  --button-height: 44px;
  height: 44px;
  min-height: 44px;
  width: 44px;
  padding: 0;
  font-size: 22px;
}
.ln-read-header > [data-close] {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  flex-shrink: 0;
}
.ln-read-header .ln-menu[open] {
  display: block;
}
.ln-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 8px;
  background: var(--ln-field);
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px #0003;
  z-index: 5;
}
.ln-menu-panel .btn {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  border: 0;
}
.ln-menu-panel [data-ln-delete] {
  color: #ff8a8a;
}
@media (max-width: 1000px) {
  .ln-dialog .dialog-head.ln-read-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ln-read-header > [data-close] {
    grid-column: 2;
    grid-row: 1;
  }
  .ln-read-header .ln-detail-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 8px;
  }
}
@media (max-width: 600px) {
  .ln-read-header .ln-origin {
    width: 44px;
    height: 44px;
  }
  .ln-read-header .ln-detail-actions > .btn {
    font-size: 12px;
    padding: 0 10px;
  }
  .ln-modal-nav {
    padding-right: 8px;
  }
  .ln-read-header .ln-modal-nav .btn {
    --button-height: 34px;
    width: 34px;
    min-width: 34px;
  }
  .ln-modal-nav > span {
    font-size: 12px;
  }
}

/* Standalone Learning: contextual return, title and metadata above the content. */
.ln-page-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.ln-page-return > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ln-page-return .ln-text-link {
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.ln-page-return > div > span {
  color: var(--ln-muted);
  font-size: 13px;
}
.ln-page-return .ln-detail-actions {
  margin: 0;
  flex-shrink: 0;
}
.ln-read-page .ln-page-learning-header h1 {
  margin: 20px 0 18px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ln-page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--ln-muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.ln-page-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ln-page-meta .icon {
  width: 16px;
  height: 16px;
}
.ln-meta-separator {
  opacity: 0.6;
}
.ln-read-page .ln-rich {
  font-size: 20px;
  line-height: 1.75;
}
.ln-read-page .ln-rich > :first-child {
  margin-top: 0;
}
@media (max-width: 1000px) {
  .ln-page-return {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .ln-read-page .ln-page-learning-header h1 {
    font-size: 28px;
  }
  .ln-page-meta {
    font-size: 12px;
    gap: 8px;
  }
  .ln-read-page .ln-rich {
    font-size: 16px;
  }
  .ln-page-return {
    gap: 12px;
    margin-bottom: 22px;
  }
}

.ln-dialog .dialog-head.ln-edit-header {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}
.ln-edit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #7dbbf7;
  background: #20364e;
}
.ln-edit-badge .icon {
  width: 24px;
  height: 24px;
}
.ln-edit-heading {
  flex: 1;
  min-width: 0;
}
.ln-dialog .ln-edit-heading h2 {
  margin: 0;
  font-size: 20px;
}
.ln-dialog .ln-edit-heading p {
  margin: 4px 0 0;
  color: var(--ln-muted);
  font-size: 13px;
}
.ln-edit-header > [data-ln-draft-mark] {
  flex-shrink: 0;
  font-size: 14px;
  padding: 0 14px;
}
.ln-edit-header > [data-ln-draft-mark][aria-pressed='true'] {
  color: #f0b44c;
  background: #2e2417;
  border-color: #705322;
}
.ln-edit-header > [data-ln-draft-mark][aria-pressed='true'] .icon {
  fill: currentColor;
}
.ln-edit-header > [data-close] {
  width: 44px;
  height: 44px;
  min-height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--ln-border);
  border-radius: 12px;
}
@media (max-width: 600px) {
  .ln-dialog .dialog-head.ln-edit-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }
  .ln-edit-badge {
    width: 44px;
    height: 44px;
    grid-column: 1;
    grid-row: 1;
  }
  .ln-edit-heading {
    grid-column: 2 / -1;
    grid-row: 1;
  }
  .ln-edit-header > [data-ln-draft-mark] {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    font-size: 12px;
  }
  .ln-edit-header > [data-close] {
    grid-column: 3;
    grid-row: 2;
  }
}

/* Flight notes: shared typography, isolated from other rich editors. */
.pj-prose {
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}
.pj-prose p {
  margin: 0 0 0.55em;
  white-space: pre-wrap;
}
.pj-prose > :last-child {
  margin-bottom: 0;
}
.pj-prose h3 {
  margin: 0.8em 0 0.4em;
  font-size: 1.15em;
  font-weight: 600;
}
.pj-prose ul,
.pj-prose ol {
  margin: 0.4em 0 0.65em;
  padding-inline-start: 1.5em;
}
.pj-prose li {
  margin: 0.15em 0;
}
.pj-prose li p {
  margin: 0;
}
.pj-prose a {
  color: var(--accent);
  text-decoration: underline;
}
.pj-prose.pj-notes-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  white-space: normal;
}
.pj-notes-editor {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.pj-notes-editor:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.pj-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 6px;
  border-bottom: 1px solid var(--border);
}
.pj-notes-toolbar button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.pj-notes-toolbar button svg {
  width: 22px;
  height: 22px;
  display: block;
}
.pj-notes-toolbar button[aria-pressed='true'] {
  color: var(--accent);
  background: var(--accent-soft);
}
.pj-notes-toolbar button:disabled {
  opacity: 0.35;
  cursor: default;
}
.pj-notes-toolbar button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.pj-notes-toolbar .pj-notes-undo {
  margin-inline-start: auto;
}
.pj-notes-body .pj-prose {
  min-height: 140px;
  padding: 12px;
  outline: none;
}
.pj-notes-body textarea {
  width: 100%;
  min-height: 140px;
}
.pj-notes-body .pj-prose p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  color: var(--muted);
  pointer-events: none;
}
.pj-notes-status {
  display: block;
  padding: 0 12px 8px;
  color: var(--muted);
}
.pj-notes-status:empty {
  display: none;
}

.journal-feed-post .journal-prose.pj-prose {
  white-space: normal;
}
.journal-feed-post .journal-entry-text .pj-prose h3 {
  font: inherit;
  font-size: 1.15em;
  font-weight: 600;
}
.journal-feed-compact .journal-entry-text .pj-prose p {
  font: inherit;
  margin: 0 0 0.55em;
}

/* Theme management: grouped lists with inline editing and staged merging. */
.ln-picker.ln-theme-manager,
.ln-picker.ln-theme-merge {
  padding: 0;
  overflow: hidden;
  color: var(--ln-text);
  background: var(--ln-card);
  border: 1px solid var(--ln-border);
  font-family: 'IBM Plex Sans', sans-serif;
}
.ln-picker.ln-theme-manager {
  width: min(680px, calc(100vw - 24px));
  max-height: 90dvh;
}
.ln-theme-manager > .ln-theme-manager-head {
  padding: 20px;
  margin: 0;
  border-bottom: 1px solid var(--ln-border);
}
.ln-theme-manager-head h2,
.ln-theme-merge h2 {
  font-size: 22px;
  line-height: 1.3;
}
.ln-theme-manager-head p,
.ln-theme-merge header p {
  margin: 4px 0 0;
  color: var(--ln-muted);
  font-size: 14px;
}
.ln-theme-manager-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ln-border);
  border-radius: 50%;
  background: transparent;
  color: var(--ln-text);
}
.ln-theme-manager-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  max-height: calc(90dvh - 172px);
  scrollbar-gutter: stable;
}
.ln-theme-manager #ln-manage-add {
  margin: 0 0 18px;
  align-items: center;
  gap: 8px;
}
.ln-theme-manager #ln-manage-add .ln-theme-add-input {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--ln-border);
  border-radius: 11px;
  background: var(--ln-field);
  color: var(--ln-muted);
}
.ln-theme-manager #ln-manage-add .ln-theme-add-input:focus-within {
  outline: 2px solid var(--ln-blue);
}
.ln-theme-manager #ln-manage-add input {
  min-width: 0;
  margin: 0;
  height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}
.ln-theme-manager #ln-manage-add > .btn {
  --button-height: 44px;
  flex-shrink: 0;
  border-radius: 11px;
}
.ln-theme-manager-group + .ln-theme-manager-group {
  margin-top: 18px;
}
.ln-theme-manager-group > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 6px;
}
.ln-theme-manager-group h3 {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ln-blue);
  margin: 0;
}
.ln-theme-manager-group header > span {
  font-size: 11px;
  color: var(--ln-muted);
}
.ln-theme-manager-list {
  border: 1px solid var(--ln-border);
  border-radius: 14px;
  background: var(--ln-field);
  padding: 0 4px;
}
.ln-theme-manager-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 8px 8px 0;
  position: relative;
}
.ln-theme-manager-row + .ln-theme-manager-row {
  border-top: 1px solid var(--ln-border);
}
.ln-theme-grip {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 40px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  color: var(--ln-muted);
  background: transparent;
  cursor: grab;
  touch-action: none;
}
.ln-theme-grip svg {
  width: 16px;
  height: 16px;
}
.ln-theme-grip:active {
  cursor: grabbing;
}
.ln-theme-manager-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  color: var(--ln-blue);
  background: color-mix(in srgb, var(--ln-blue) 15%, var(--ln-field));
}
.ln-theme-manager-icon svg {
  width: 18px;
  height: 18px;
}
.ln-theme-manager-name {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
.ln-theme-manager-name strong {
  font-size: 15px;
}
.ln-theme-manager-name small {
  border: 1px solid var(--ln-border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--ln-muted);
}
.ln-theme-count {
  min-height: 36px;
  color: var(--ln-blue);
  border: 0;
  background: transparent;
  white-space: nowrap;
  font:
    12px 'IBM Plex Mono',
    monospace;
  padding: 4px;
}
.ln-theme-more {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 24px;
}
.ln-theme-more[aria-expanded='true'] {
  border-color: var(--ln-blue);
  background: color-mix(in srgb, var(--ln-blue) 12%, var(--ln-card));
}
.ln-theme-rename {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
}
.ln-theme-rename input {
  min-width: 0;
  flex: 1;
  height: 36px;
}
.ln-theme-rename .btn {
  --button-height: 36px;
  font-size: 13px;
  padding-inline: 10px;
  border-radius: 9px;
}
.ln-theme-manager-empty {
  padding: 12px;
  margin: 0;
  font-size: 13px;
  color: var(--ln-muted);
}
.ln-theme-hidden {
  border: 1px dashed var(--ln-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 16px;
  color: var(--ln-muted);
}
.ln-theme-hidden > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ln-theme-hidden > div:first-child > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ln-theme-hidden .ln-theme-manager-list {
  margin-top: 10px;
}
.ln-theme-hidden small {
  color: var(--ln-muted);
}
.ln-theme-manager > .ln-theme-manager-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--ln-border);
  margin: 0;
  padding: 14px 20px;
  background: var(--ln-field);
}
.ln-theme-manager-footer > span {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.ln-theme-manager-footer > .btn {
  --button-height: 40px;
}
.ln-theme-actions-menu {
  position: absolute;
  z-index: 4;
  width: min(290px, calc(100% - 16px));
  max-height: calc(90dvh - 16px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  background: var(--ln-card);
  box-shadow: 0 12px 36px #0005;
}
.ln-theme-actions-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 9px 8px;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  color: var(--ln-text);
  font-size: 14px;
}
.ln-theme-actions-menu button:hover {
  background: var(--ln-field);
}
.ln-theme-actions-menu button > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.ln-theme-actions-menu small {
  display: block;
  font-size: 11px;
  margin-top: 2px;
  color: var(--ln-muted);
}
.ln-theme-actions-menu hr {
  margin: 6px 4px;
  border: 0;
  border-top: 1px solid var(--ln-border);
}
.ln-theme-actions-menu .ln-theme-delete {
  color: var(--warn);
}
.ln-theme-manager-row.ln-theme-dragging {
  border-radius: 10px;
  outline: 2px solid var(--ln-blue);
  background: var(--ln-card);
}
.ln-theme-manager-row[data-drop-position='before']::before,
.ln-theme-manager-row[data-drop-position='after']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ln-blue);
  border-radius: 2px;
}
.ln-theme-manager-row[data-drop-position='before']::before {
  top: 0;
}
.ln-theme-manager-row[data-drop-position='after']::after {
  bottom: 0;
}
.ln-manager-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ln-picker.ln-theme-merge {
  width: min(560px, calc(100vw - 24px));
  max-height: 90dvh;
}
.ln-theme-merge > header {
  padding: 20px 20px 8px;
  margin: 0;
}
.ln-theme-merge-body {
  padding: 8px 20px 16px;
  max-height: calc(90dvh - 188px);
  overflow-y: auto;
}
.ln-theme-merge fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 8px;
}
.ln-merge-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.ln-merge-choice:has(input:checked) {
  outline: 2px solid var(--ln-blue);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--ln-blue) 16%, var(--ln-card));
}
.ln-theme-merge .ln-merge-choice input[type='radio'] {
  appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border: 1.5px solid var(--ln-muted);
  border-radius: 50%;
  background: transparent;
  flex: 0 0 16px;
}
.ln-theme-merge .ln-merge-choice input[type='radio']:checked {
  border-color: var(--ln-blue);
  background: radial-gradient(circle at center, var(--ln-blue) 3px, transparent 3.5px);
}
.ln-merge-choice > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ln-merge-choice > small {
  font:
    12px 'IBM Plex Mono',
    monospace;
  color: var(--ln-muted);
  white-space: nowrap;
}
.ln-theme-merge-body > .ln-text-link {
  margin: 4px 12px 12px;
}
#ln-merge-preview {
  border: 1px solid var(--ln-border);
  border-radius: 12px;
  background: var(--ln-field);
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.ln-theme-merge > footer {
  padding: 14px 20px;
  margin: 0;
  border-top: 1px solid var(--ln-border);
  background: var(--ln-field);
  flex-wrap: wrap;
}
.ln-theme-merge > footer .btn {
  --button-height: 40px;
  white-space: normal;
}
@media (max-width: 520px) {
  .ln-theme-manager > .ln-theme-manager-head {
    padding: 16px;
  }
  .ln-theme-manager-body {
    padding: 14px 10px;
  }
  .ln-theme-manager-row {
    gap: 6px;
  }
  .ln-theme-manager-name small {
    display: none;
  }
  .ln-theme-count {
    font-size: 10px;
  }
  .ln-theme-manager #ln-manage-add input {
    font-size: 12px;
  }
  .ln-theme-manager #ln-manage-add > .btn {
    padding-inline: 10px;
  }
  .ln-theme-rename {
    flex-wrap: wrap;
  }
  .ln-theme-rename input {
    flex-basis: 100%;
  }
  .ln-theme-manager-row:has(.ln-theme-rename) {
    align-items: flex-start;
  }
  .ln-theme-merge > footer .primary {
    flex: 1;
  }
}
.ln-theme-manager[open],
.ln-theme-merge[open] {
  display: flex;
  flex-direction: column;
}
.ln-theme-manager > header,
.ln-theme-manager > footer,
.ln-theme-merge > header,
.ln-theme-merge > footer {
  flex-shrink: 0;
}
.ln-theme-manager-body,
.ln-theme-merge-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
.ln-picker.ln-theme-confirm {
  width: min(480px, calc(100vw - 24px));
}
.ln-theme-confirm #ln-delete-theme-description {
  margin: 0;
  color: var(--ln-muted);
  line-height: 1.6;
}
.ln-theme-confirm #ln-delete-theme-description strong {
  color: var(--ln-text);
}
.ln-theme-confirm [data-delete-theme-confirm] {
  color: #ff8a8a;
  border-color: #ff8a8a;
}

/* Private Learning links inside the flight detail tabs. */
.ln-flight-card,
.ln-flight-drawer,
.ln-flight-existing {
  --ln-bg: var(--bg);
  --ln-card: var(--card);
  --ln-text: var(--text);
  --ln-border: var(--border);
  --ln-field: var(--panel);
  --ln-blue: var(--accent);
  --ln-muted: var(--muted);
  color: var(--text);
}
.detail-dialog .flight-weather {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.flight-weather img {
  flex-shrink: 0;
  border-radius: 4px;
}
.ln-flight-card {
  background: var(--card);
  border: 1px solid #705322;
  border-radius: 16px;
  overflow: hidden;
}
.ln-flight-replay {
  margin-bottom: 14px;
}
.ln-flight-journal {
  width: 100%;
  max-width: 640px;
  margin: 16px auto 0;
}
.flight-journal-page:has(.journal-editing:not([hidden])) .ln-flight-journal {
  max-width: none;
}
.ln-flight-card > header,
.ln-flight-drawer > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
}
.ln-flight-card > header > .icon,
.ln-flight-drawer > header > .icon {
  color: #f0b44c;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
.ln-flight-card > header > div,
.ln-flight-drawer > header > div {
  flex: 1;
  min-width: 0;
}
.ln-flight-card h3,
.ln-flight-drawer h3 {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}
.ln-flight-card header small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 12px;
}
.ln-flight-card header .ln-text-link,
.ln-flight-drawer header .ln-text-link {
  font-size: 12px;
  white-space: nowrap;
}
.ln-flight-learning-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}
.ln-flight-replay .ln-flight-learning-list {
  max-height: 48dvh;
  overflow-y: auto;
}
.ln-flight-learning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.ln-flight-learning > .ln-origin,
.ln-flight-existing-list .ln-origin {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.ln-flight-learning-body {
  flex: 1;
  min-width: 0;
}
.ln-flight-open {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
}
.ln-flight-open strong {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ln-flight-open > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--accent);
}
.ln-flight-learning-body > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin: 5px 0;
}
.ln-flight-learning-body > .ln-content-preview {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
}
.ln-flight-learning-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.ln-flight-learning-tags > span,
.ln-flight-moment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
}
.ln-flight-moment {
  border-color: #705322;
  background: #2e2417;
  color: #f0b44c;
  font-family: 'IBM Plex Mono', monospace;
}
.ln-flight-moment .icon {
  width: 12px;
  height: 12px;
}
.ln-flight-moment-unavailable {
  color: var(--muted);
  font-size: 11px;
}
.ln-flight-card > footer,
.ln-flight-drawer > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.ln-flight-card > footer .btn,
.ln-flight-drawer > footer .btn {
  --button-height: 36px;
  flex: 1 1 120px;
  font-size: 12px;
  padding-inline: 10px;
  border-radius: 8px;
}
.ln-flight-journal h3 {
  font-size: 16px;
}
.ln-flight-journal .ln-flight-open strong {
  font-size: 14px;
}
.ln-flight-journal > footer {
  background: var(--panel);
}
.ln-flight-journal > footer .btn {
  flex-basis: 150px;
}
.ln-flight-create-hint {
  padding: 0 14px 12px;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.ln-flight-empty {
  margin: 4px 0;
  font-size: 13px;
  color: var(--muted);
}
.ln-flight-drawer {
  position: absolute;
  z-index: 6;
  top: 100px;
  right: 12px;
  bottom: 12px;
  width: min(390px, calc(100% - 24px));
  overflow-y: auto;
  padding-top: 38px;
  border: 1px solid #705322;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 16px 50px #0006;
}
.ln-flight-drawer[hidden] {
  display: none;
}
.ln-flight-drawer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.ln-flight-existing-list {
  max-height: 48dvh;
  overflow-y: auto;
  margin-top: 12px;
}
.ln-flight-existing-list > label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ln-flight-existing-list label > span:last-child {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ln-flight-existing-list strong {
  display: block;
  font-size: 14px;
}
.ln-flight-existing-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.ln-flight-existing-list input[type='checkbox'] {
  appearance: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  padding: 0;
  margin: 0;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  background: var(--panel);
}
.ln-flight-existing-list input:checked {
  border-color: var(--accent);
  background: var(--accent);
}
.ln-flight-existing-list input:checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  line-height: 1;
}
.ln-flight-moment-fields {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ln-border);
}
.ln-flight-moment-fields > label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.ln-flight-moment-fields label > span {
  flex: 1;
  min-width: 0;
}
.ln-flight-moment-fields small {
  display: block;
  font-size: 10px;
  color: var(--ln-muted);
  margin-top: 3px;
}
.ln-edit-grid .ln-flight-moment-fields label input[type='number'] {
  margin-top: 0;
  width: 110px;
  flex: 0 0 110px;
  min-width: 0;
  font-size: 12px;
}
.ln-chart-moment {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-width: 0;
  padding: 3px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: #2e2417;
  transform: translateX(-50%);
  cursor: pointer;
  color: #f0b44c;
}
.ln-chart-moment-guide {
  stroke: #f0b44c;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.ln-chart-moment > svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ln-chart-moment:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .detail-dialog .flight-header-actions .flight-weather {
    gap: 4px;
    padding-inline: 7px;
    font-size: 11px;
  }
  .ln-flight-card > header {
    padding: 12px;
  }
  .ln-flight-journal > footer .btn {
    flex-basis: 160px;
  }
  .ln-flight-journal h3 {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .detail-dialog .flight-header-actions:has(.flight-weather) {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-self: end;
    flex-wrap: wrap;
  }
}
.ln-flight-overlay {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  max-height: 90dvh;
  padding: 0;
  overflow-y: auto;
}

/* Learnings stay beside the equipment they describe, before maintenance. */
.ln-equipment-card {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #665022;
  border-radius: 20px;
  background: var(--panel);
  scroll-margin-top: 24px;
}
.ln-equipment-card > header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.ln-equipment-card h2 {
  font-size: 18px;
  margin: 0;
}
.ln-equipment-card header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.ln-equipment-card header .ln-text-link {
  margin-left: auto;
}
.ln-equipment-bulb {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: #f4b84b;
  background: #2c2313;
  border-radius: 10px;
}
.ln-equipment-card svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ln-equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ln-equipment-learning {
  position: relative;
  display: flex;
  gap: 10px;
  text-align: left;
  padding: 14px;
  color: var(--text);
  background: #151e2a;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
}
.ln-equipment-learning:hover {
  border-color: #75baff;
}
.ln-equipment-learning > div {
  min-width: 0;
  flex: 1;
}
.ln-equipment-learning > div > strong {
  display: block;
  font-size: 14px;
  padding-right: 16px;
}
.ln-equipment-learning small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 12px;
}
.ln-equipment-learning .ln-content-preview {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
}
.ln-equipment-marked {
  position: absolute;
  top: 14px;
  right: 12px;
  color: #f4b84b;
}
.ln-equipment-marked svg {
  fill: currentColor;
  width: 12px;
}
.ln-equipment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ln-equipment-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #427aad;
  background: #1d3851;
  color: #bed6ee;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  max-width: 100%;
}
.ln-equipment-tags > .ln-equipment-flight {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.ln-equipment-flight svg {
  width: 13px;
  height: 13px;
}
.ln-equipment-card > footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.ln-equipment-card footer label {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.ln-equipment-card footer input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  padding: 0;
}
@media (max-width: 1000px) {
  .ln-equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .ln-equipment-grid {
    grid-template-columns: 1fr;
  }
  .ln-equipment-card {
    padding: 14px;
  }
  .ln-equipment-card > header {
    flex-wrap: wrap;
  }
  .ln-equipment-card header .ln-text-link {
    margin-left: 50px;
  }
  .ln-equipment-card footer label {
    margin-left: 0;
  }
}

/* One area section combines the area's own Learnings and its individual places. */
.ln-site-jump {
  color: #f4b84b;
  background: #2c2313;
  border-color: #665022;
}
.ln-site-jump svg,
.ln-site-location-count svg {
  width: 16px;
  height: 16px;
}
.ln-site-jump b {
  background: #f4b84b;
  color: #30230c;
  border-radius: 6px;
  padding: 1px 8px;
}
.ln-site-card .ln-equipment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ln-site-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.ln-site-filters .btn {
  --button-height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}
.ln-site-filters [aria-pressed='true'] {
  background: #1d3851;
  border-color: #427aad;
  color: #bed6ee;
}
.ln-site-empty-filter {
  opacity: 0.55;
}
.ln-site-location-count {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #665022;
  background: #2c2313;
  color: #f4b84b;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  white-space: nowrap;
}
.ln-site-create {
  position: relative;
}
.ln-site-create-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(360px, 75vw);
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  background: #202c3d;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px #0007;
  z-index: 10;
}
.ln-site-create-menu[hidden] {
  display: none;
}
.ln-site-create-menu button {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}
.ln-site-create-menu button:hover,
.ln-site-create-menu button:focus-visible {
  background: #2b3b53;
}
.ln-site-create-menu small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.ln-site-link-target {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.ln-site-link-target select {
  width: 100%;
}
@media (max-width: 650px) {
  .ln-site-card .ln-equipment-grid {
    grid-template-columns: 1fr;
  }
  .ln-site-location-count {
    padding: 2px 4px;
  }
}

/* Flight selection, review and recoverable deletion. */
.flight-bulk-dialog {
  width: min(1250px, 96vw);
  max-width: 1250px;
  height: min(890px, 94dvh);
  padding: 0;
}
.flight-delete-dialog {
  width: min(850px, 94vw);
  max-width: 850px;
  padding: 0;
}
.flight-bulk-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.flight-bulk-dialog .dialog-head,
.flight-delete-dialog .dialog-head {
  padding: 22px;
  border-bottom: 1px solid var(--border);
}
.flight-bulk-dialog .dialog-head > div,
.flight-delete-dialog .dialog-head > div {
  padding-left: 65px;
  position: relative;
  flex: 1;
}
.bulk-head-badge {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}
.bulk-head-badge.danger {
  color: #ff8a8a;
  background: #3e2025;
}
.bulk-step {
  position: absolute;
  right: 12px;
  top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.bulk-step strong {
  color: var(--text);
}
.flight-bulk-dialog .dialog-body {
  padding: 0;
  flex: 1;
}
.flight-bulk-dialog .dialog-footer,
.flight-delete-dialog .dialog-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.flight-bulk-dialog .dialog-footer > :first-child,
.flight-delete-dialog .dialog-footer > :first-child {
  margin-right: auto;
}
.flight-delete-dialog .dialog-body {
  padding: 22px;
}
.bulk-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 620px;
}
.bulk-selection {
  padding: 20px;
  border-right: 1px solid var(--border);
  background: var(--card);
}
.bulk-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.bulk-section-head .btn {
  font-size: 12px;
}
.bulk-layout h3,
.flight-delete-dialog h3 {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 24px 0 12px;
}
.bulk-flight {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 16px;
  padding: 16px;
  margin: 8px 0;
  min-width: 0;
}
.bulk-flight strong,
.bulk-flight small {
  display: block;
}
.bulk-flight small {
  color: var(--muted);
  margin-top: 5px;
}
.bulk-flight-icon {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.bulk-selection-row {
  position: relative;
}
.bulk-selection-row .bulk-flight {
  padding: 14px 48px 14px 10px;
}
.bulk-selection-row > .btn {
  position: absolute;
  right: 5px;
  top: 20px;
  border: 0;
  padding: 5px;
  min-height: 32px;
  color: var(--muted);
}
.bulk-dot {
  color: #f0b44c;
  position: absolute;
  right: 35px;
  top: 30px;
}
.bulk-editor {
  min-width: 0;
}
.bulk-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  gap: 6px;
}
.bulk-tabs .btn {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-size: 14px;
  padding: 16px 8px;
  color: var(--muted);
}
.bulk-tabs [aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--text);
}
.bulk-panel {
  padding: 0 22px 22px;
}
.bulk-field {
  display: block;
  margin: 16px 0;
}
.bulk-field > span {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.bulk-field select,
.bulk-field textarea {
  width: 100%;
}
.bulk-field.changed select,
.bulk-field.changed textarea,
.bulk-times input.changed {
  border-color: #6a5328;
  background: #2a2214;
  color: #f0b44c;
}
.bulk-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: normal;
}
.bulk-status.equal {
  color: #8fddb0;
  background: #1e3a2c;
}
.bulk-status.changed,
.bulk-count {
  color: #f0b44c;
  background: #2a2214;
}
.bulk-status .btn {
  border: 0;
  min-height: 20px;
  padding: 0 3px;
  color: inherit;
}
.bulk-count {
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 5px;
}
.bulk-info {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
}
.bulk-info p {
  color: var(--muted);
  margin-bottom: 0;
}
.bulk-times {
  font-size: 12px;
}
.bulk-times th small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
.bulk-times input {
  min-width: 105px;
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
}
.bulk-times td {
  padding: 7px;
}
.bulk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.bulk-chips .btn {
  font-size: 14px;
}
.bulk-chips [aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.bulk-chips small {
  color: var(--muted);
}
.bulk-tag {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.bulk-tag .btn {
  border: 0;
  background: transparent;
}
.bulk-tag.partial {
  border-style: dashed;
}
.bulk-tag.changed {
  border-color: #6a5328;
  background: #2a2214;
  color: #f0b44c;
}
.bulk-warning {
  color: #f0b44c;
}
.bulk-review-stats,
.bulk-delete-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
}
.bulk-delete-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
}
.bulk-review-stats > div,
.bulk-delete-stats > div {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 16px;
}
.bulk-review-stats small,
.bulk-delete-stats small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.bulk-review-stats strong,
.bulk-delete-stats strong {
  display: block;
}
.bulk-review {
  margin: 0 22px;
  width: calc(100% - 44px);
}
.bulk-review td {
  max-width: 340px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bulk-review td strong {
  color: #f0b44c;
}
.bulk-review del {
  color: var(--muted);
}
.bulk-review td small {
  display: block;
  color: var(--muted);
}
.bulk-review label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bulk-review input[type='checkbox'],
.bulk-delete-confirm input[type='checkbox'] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.flight-bulk-dialog #bulk-error,
.flight-bulk-dialog .dialog-hint {
  margin: 16px 22px;
}
.bulk-delete-effects {
  line-height: 1.6;
}
.bulk-delete-effects li {
  margin-bottom: 10px;
}
.bulk-delete-effects li::marker {
  color: #ff8a8a;
}
.bulk-delete-effects li:last-child::marker {
  color: #8fddb0;
}
.bulk-delete-confirm {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #2b181c;
  border: 1px solid #62363a;
  border-radius: 14px;
  color: #e8edf4;
}
.bulk-picker {
  display: grid;
  gap: 8px;
  padding: 20px;
}
.bulk-picker > label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.flight-operation-toast {
  position: fixed;
  z-index: 1100;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  background: #212d3e;
  color: #e8edf4;
  border: 1px solid #35445a;
  border-radius: 16px;
  box-shadow: 0 10px 40px #0007;
  width: min(720px, calc(100vw - 32px));
  overflow: hidden;
}
.flight-operation-toast > svg {
  color: #ff8a8a;
  flex-shrink: 0;
}
.flight-operation-toast strong {
  margin-right: auto;
}
.flight-operation-toast .btn {
  color: #c9e3ff;
  background: #203b57;
  flex-shrink: 0;
}
.undo-seconds {
  color: #a3afc0;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}
.undo-progress {
  position: absolute;
  height: 4px;
  background: #5eabf7;
  bottom: 0;
  left: 0;
}
@media (max-width: 900px) {
  .bulk-layout {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .bulk-step {
    position: static;
    display: block;
  }
  .bulk-tabs {
    overflow-x: auto;
    padding: 0 8px;
  }
  .bulk-tabs .btn {
    flex-shrink: 0;
  }
}
@media (max-width: 640px) {
  .flight-bulk-dialog,
  .flight-delete-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .bulk-layout {
    display: block;
    min-height: 0;
  }
  .bulk-selection {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .bulk-selection .bulk-info {
    display: none;
  }
  .bulk-review-stats,
  .bulk-delete-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bulk-review-stats > div:last-child {
    grid-column: 1 / -1;
  }
  .flight-bulk-dialog .dialog-footer,
  .flight-delete-dialog .dialog-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg);
  }
  .flight-operation-toast {
    bottom: 12px;
    gap: 8px;
    padding: 12px;
    font-size: 14px;
  }
}
.bulk-field.changed .bulk-chips [aria-pressed='true'] {
  color: #f0b44c;
  border-color: #6a5328;
  background: #2a2214;
}

/* Shared Learning / Journal editor and its read-only content. */
.pj-rich-editor {
  --rich-field: #151d2a;
  --rich-line: #2c3849;
  --rich-text: #e8edf4;
  --rich-muted: #8794a6;
  --rich-accent: #5ea8f2;
  position: relative;
  min-width: 0;
  overflow: visible;
  background: var(--rich-field);
  color: var(--rich-text);
  border: 1px solid var(--rich-line);
  border-radius: 14px;
}
.pj-rich-editor:focus-within {
  border-color: var(--rich-accent);
  box-shadow:
    0 0 0 1px var(--rich-accent),
    0 0 0 5px rgb(94 168 242 / 15%);
}
.pj-rich-prose,
.ln-editor .pj-rich-prose {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
.pj-rich-body .pj-rich-prose {
  min-height: 190px;
  padding: 20px;
  color: var(--rich-text);
  outline: none;
}
.ln-editor .pj-rich-prose:focus {
  box-shadow: none;
}
.pj-rich-prose p {
  margin: 0 0 0.6em;
}
.pj-prose h3,
.journal-feed-post .journal-entry-text .pj-prose h3 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fa8c6;
}
.pj-prose mark {
  color: #fbe3b8;
  background: rgb(240 180 76 / 22%);
  border-radius: 3px;
}
.pj-prose aside[data-type='callout'] {
  display: block;
  padding: 10px 14px;
  margin: 0.6em 0;
  border: 0;
  border-left: 3px solid #f0b44c;
  border-radius: 10px;
  background: #2a2214;
  color: #fbe3b8;
}
.pj-prose aside[data-type='callout']::before {
  content: 'Merke · ';
  color: #f0b44c;
  font-weight: 700;
}
.pj-prose blockquote {
  padding-left: 14px;
  margin: 0.6em 0;
  border-left: 3px solid #3c6fa3;
  color: #c9d3e0;
}
.pj-prose ul[data-type='taskList'] {
  padding: 0;
  list-style: none;
}
.pj-prose li[data-type='taskItem'] {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pj-prose li[data-type='taskItem'] > label {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
.pj-prose li[data-type='taskItem'] > div {
  flex: 1;
  min-width: 0;
}
.pj-prose li[data-type='taskItem'] input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  border: 2px solid #4a5a70;
  border-radius: 5px;
  vertical-align: middle;
}
.pj-prose li[data-type='taskItem'] input:checked {
  background: #2470c8;
  border-color: #5ea8f2;
}
.pj-prose li[data-type='taskItem'] input:checked::after {
  content: '✓';
  display: block;
  text-align: center;
  color: white;
  font-size: 12px;
  line-height: 14px;
}
.pj-prose li[data-checked='true'] > div {
  color: #8794a6;
  text-decoration: line-through;
}
.pj-prose [data-type='mention'] {
  background: #1f3550;
  color: #cfe4fa;
  border-radius: 7px;
  padding: 2px 6px;
  box-decoration-break: clone;
}
.pj-prose [data-kind='keyword'] {
  border: 1px solid #2c3849;
  background: transparent;
  color: #9cc3ea;
}
.pj-prose [data-missing='true'] {
  background: transparent;
  border: 1px dashed #8794a6;
  color: #8794a6;
}
/* Additional TipTap formats shared by editor, detail view and previews. */
.pj-prose h1,
.pj-prose h2 {
  margin: 0.8em 0 0.4em;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
}
.pj-prose h1 {
  font-size: 1.6em;
}
.pj-prose h2 {
  font-size: 1.3em;
}
.pj-prose code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: rgb(127 151 181 / 15%);
  white-space: break-spaces;
}
.pj-prose pre {
  margin: 0.6em 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgb(127 151 181 / 10%);
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.pj-prose pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  white-space: inherit;
}
.pj-prose hr {
  margin: 1em 0;
  border: 0;
  border-top: 1px solid var(--border);
}
/* Learning list previews preserve the TipTap blocks within a compact height. */
.ln-content-preview.pj-prose {
  display: block;
  max-height: 9em;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.ln-content-preview.pj-prose > :first-child {
  margin-top: 0;
}
.ln-content-preview.pj-prose p {
  display: block;
  margin: 0 0 0.55em;
  font-size: inherit;
  line-height: inherit;
  overflow: visible;
}
.ln-content-preview.pj-prose li p {
  margin: 0;
}
.ln-content-preview .ln-preview-link {
  color: var(--accent);
  text-decoration: underline;
}
.ln-content-preview li[data-type='taskItem'] > span {
  flex: 0 0 auto;
}
.ln-preview-checkbox {
  color: var(--accent);
}
.pj-rich-prose p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  white-space: pre-line;
  color: #718196;
  pointer-events: none;
}
.pj-rich-template {
  margin: 0 20px 20px;
  max-width: calc(100% - 40px);
  padding: 8px 12px;
  border: 1px dashed #3c6fa3;
  border-radius: 9px;
  background: transparent;
  color: #7dbbf7;
  cursor: pointer;
}
.pj-rich-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #222d3f;
  font-size: 12px;
  color: var(--rich-muted);
}
.pj-rich-footer > [role='status'] {
  margin-left: auto;
}
.pj-rich-notice {
  padding: 0 14px 10px;
  font-size: 12px;
  color: #f0b44c;
}
.pj-rich-notice:empty {
  display: none;
}
.pj-rich-bubble,
.pj-rich-link-box,
.pj-rich-suggestions {
  position: absolute;
  z-index: 20;
  border: 1px solid #34445a;
  border-radius: 12px;
  background: #222d3f;
  color: #e8edf4;
  box-shadow: 0 16px 40px rgb(0 0 0 / 40%);
  padding: 6px;
}
.pj-rich-bubble {
  display: flex;
  max-width: calc(100% - 16px);
  flex-wrap: wrap;
}
.pj-rich-link-box {
  width: min(380px, calc(100% - 16px));
  max-height: min(70dvh, 420px);
  overflow-y: auto;
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.pj-rich-link-box > strong,
.pj-rich-link-box > label,
.pj-rich-link-box > small {
  display: block;
}
.pj-rich-link-box > strong {
  margin-bottom: 12px;
  font-size: 16px;
}
.pj-rich-link-box > label {
  margin-bottom: 6px;
}
.pj-rich-link-box > input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #4a5a70;
  border-radius: 8px;
  background: #151e2a;
  color: #e8edf4;
  font: inherit;
}
.pj-rich-link-box > input:focus-visible {
  outline: 2px solid #5ea8f2;
  outline-offset: 2px;
}
.pj-rich-link-box > small {
  margin-top: 8px;
  color: #a2b0c3;
}
.pj-rich-link-error {
  margin: 8px 0;
  color: #ffb4ab;
}
.pj-rich-link-error:empty {
  display: none;
}
.pj-rich-link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.pj-rich-link-actions .btn {
  min-height: 36px;
  padding: 8px 10px;
}
.pj-rich-bubble[hidden],
.pj-rich-link-box[hidden],
.pj-rich-suggestions[hidden],
.pj-rich-template[hidden] {
  display: none;
}
.pj-rich-bubble button,
.pj-rich-suggestions button {
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 36px;
  cursor: pointer;
  font: inherit;
}
.pj-rich-bubble button:first-child {
  font-weight: 700;
}
.pj-rich-bubble button:nth-child(2) {
  font-style: italic;
}
.pj-rich-bubble button[aria-label='Unterstreichen'] {
  text-decoration: underline;
}
.pj-rich-bubble button[aria-label='Durchstreichen'] {
  text-decoration: line-through;
}
.pj-rich-bubble button[aria-label='Code'] {
  font-family: 'Geist Mono', monospace;
}
.pj-rich-bubble button:last-child {
  color: #f0b44c;
}
.pj-rich-bubble button[aria-pressed='true'],
.pj-rich-suggestions button[aria-selected='true'] {
  background: #2c3b52;
}
.pj-rich-bubble button:focus-visible,
.pj-rich-template:focus-visible,
.pj-rich-suggestions button:focus-visible {
  outline: 2px solid #5ea8f2;
}
.pj-rich-suggestions {
  width: min(360px, calc(100% - 16px));
  max-height: 320px;
  overflow-y: auto;
}
.pj-rich-suggestions button {
  display: block;
  width: 100%;
  text-align: left;
}
.pj-rich-suggestions small {
  display: block;
  color: #8794a6;
  font-size: 12px;
}
.pj-rich-group {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #8fa8c6;
}
.pj-rich-footer .error {
  color: #ff8a8a;
}
.ln-dialog .pj-rich-body,
dialog .journal-rich-editor-host .pj-rich-body {
  max-height: min(55dvh, 600px);
  overflow-y: auto;
}
@media (max-width: 640px) {
  .pj-rich-hints {
    display: none;
  }
  .pj-rich-bubble,
  .pj-rich-link-box,
  .pj-rich-suggestions {
    position: fixed;
    top: auto !important;
    bottom: var(--rich-keyboard-offset, 0px);
    left: 8px !important;
    right: 8px;
    width: auto;
    max-width: none;
    max-height: min(40dvh, 320px);
    z-index: 100;
    border-radius: 12px 12px 0 0;
  }
  .pj-rich-bubble {
    justify-content: center;
  }
  .pj-rich-body .pj-rich-prose {
    padding: 16px;
  }
}

/* Light colors for the shared editor, its menus and Learning selections. */
:root[data-theme='light'] .pj-rich-editor {
  --rich-field: #f0f4fa;
  --rich-line: #d2dbe7;
  --rich-text: var(--text);
  --rich-muted: var(--light-muted);
  --rich-accent: var(--accent);
}
:root[data-theme='light'] :is(.ln-origin-select, .ln-theme-select) input:checked + span {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
:root[data-theme='light'] .ln-chips .btn {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--border);
}
:root[data-theme='light'] .ln-active-filters .btn[data-ln-remove-filter] {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light'] .ln-workspace > aside > [data-ln-theme][aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light'] .pj-rich-footer {
  border-color: var(--rich-line);
}
:root[data-theme='light'] :is(.pj-rich-bubble, .pj-rich-link-box, .pj-rich-suggestions) {
  background: var(--bg);
  color: var(--text);
  border-color: var(--rich-line);
  box-shadow: 0 8px 30px rgb(15 23 42 / 15%);
}
:root[data-theme='light'] .pj-rich-link-box > input {
  background: var(--rich-field);
  color: var(--rich-text);
  border-color: var(--rich-line);
}
:root[data-theme='light']
  :is(
    .pj-rich-link-box > small,
    .pj-rich-suggestions small,
    .pj-rich-group,
    .pj-rich-prose p.is-editor-empty:first-child::before
  ) {
  color: var(--rich-muted);
}
:root[data-theme='light']
  :is(
    .pj-rich-bubble button[aria-pressed='true'],
    .pj-rich-suggestions button[aria-selected='true']
  ) {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light'] .pj-rich-template {
  color: var(--accent);
  border-color: var(--accent);
}
:root[data-theme='light']
  :is(
    .pj-rich-bubble button,
    .pj-rich-template,
    .pj-rich-suggestions button,
    .pj-rich-link-box > input
  ):focus-visible {
  outline-color: var(--accent);
}
:root[data-theme='light'] :is(.pj-rich-notice, .pj-rich-bubble button:last-child) {
  color: var(--light-warning);
}
:root[data-theme='light'] :is(.pj-rich-link-error, .pj-rich-footer .error) {
  color: var(--light-danger);
}
:root[data-theme='light'] .pj-prose h3,
:root[data-theme='light'] .journal-feed-post .journal-entry-text .pj-prose h3 {
  color: var(--light-muted);
}
:root[data-theme='light'] .pj-prose a {
  color: var(--accent);
}
:root[data-theme='light'] .pj-prose mark,
:root[data-theme='light'] .pj-prose aside[data-type='callout'] {
  background: var(--light-warning-bg);
  color: var(--light-warning);
}
:root[data-theme='light'] .pj-prose aside[data-type='callout'],
:root[data-theme='light'] .pj-prose aside[data-type='callout']::before {
  border-color: var(--light-warning);
  color: var(--light-warning);
}
:root[data-theme='light'] .pj-prose blockquote {
  color: var(--light-muted);
  border-color: var(--accent);
}
:root[data-theme='light'] .pj-prose li[data-type='taskItem'] input {
  border-color: var(--light-muted);
}
:root[data-theme='light'] .pj-prose li[data-type='taskItem'] input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
:root[data-theme='light'] .pj-prose li[data-checked='true'] > div {
  color: var(--light-muted);
}
:root[data-theme='light'] .pj-prose [data-type='mention'] {
  background: var(--accent-soft);
  color: var(--accent);
}
:root[data-theme='light'] .pj-prose [data-kind='keyword'] {
  border-color: var(--border);
}
:root[data-theme='light'] .pj-prose [data-missing='true'] {
  background: transparent;
  color: var(--light-muted);
  border-color: var(--light-muted);
}

/* Flight comparison: a shared identity for cards, map, profile and replay. */
dialog.flight-comparison-dialog {
  width: calc(100% - 40px);
  max-width: 1440px;
  max-height: 94dvh;
  overflow: hidden;
}
.flight-comparison-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  max-height: 94dvh;
}
.flight-comparison-dialog .dialog-head,
.flight-comparison-dialog .dialog-footer {
  flex: 0 0 auto;
  background: var(--solid);
}
.flight-comparison-dialog .dialog-body {
  overflow: auto;
  min-height: 0;
  padding: 20px 24px;
}
.flight-comparison-dialog .dialog-footer {
  padding: 14px 24px;
  align-items: center;
  flex-wrap: wrap;
}
.flight-comparison-dialog .dialog-footer > span {
  flex: 1;
}
.flight-comparison-dialog [data-compare-start] {
  color: white;
  background: #2470c8;
  border-color: #2470c8;
  font-weight: 600;
}
.compare-loading {
  margin: 0;
  padding: 8px 24px;
  color: var(--muted);
}
.compare-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.compare-flight {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 320px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--flight-color);
  border-radius: 15px;
  background: var(--bg);
}
.compare-flight > div {
  flex: 1;
  min-width: 0;
}
.compare-flight strong {
  font-size: 16px;
}
.compare-flight p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.compare-flight .btn {
  padding: 6px;
  color: var(--accent);
  white-space: nowrap;
  background: transparent;
  border: 0;
}
.compare-flight .icon-button {
  flex: 0 0 30px;
}
.compare-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  background: var(--flight-color);
  color: #08101c;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}
.compare-add {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  max-width: 300px;
  border: 2px dashed var(--border);
  border-radius: 15px;
  padding: 12px;
  color: var(--accent);
  text-align: center;
}
.compare-add small {
  color: var(--muted);
}
.compare-add select {
  width: 100%;
  min-width: 0;
  font-size: 12px;
}
.compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
}
.compare-layout > *,
.compare-visuals > * {
  min-width: 0;
}
.compare-map {
  height: 300px;
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
  background: var(--bg);
}
.compare-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}
.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0;
  font-size: 12px;
}
.compare-legend > span,
.compare-tooltip > span,
.compare-race-values > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compare-legend .compare-badge,
.compare-tooltip .compare-badge,
.compare-race-values .compare-badge {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  font-size: 12px;
}
.compare-legend i {
  width: 20px;
  border-top: 2px solid;
}
.compare-profile,
.compare-replay,
.compare-table-wrap {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg);
}
.compare-profile header,
.compare-metrics header,
.compare-replay > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.compare-layout h3 {
  margin: 0;
  font-size: 16px;
}
.compare-layout header label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.compare-profile header .btn {
  padding: 6px 10px;
  font-size: 12px;
}
.compare-profile [aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.compare-profile svg {
  width: 100%;
  display: block;
  touch-action: pan-y;
  color: var(--muted);
  font-size: 10px;
  font-family: ui-monospace, monospace;
}
.compare-profile svg text {
  fill: currentColor;
}
.flight-comparison-dialog [hidden] {
  display: none !important;
}
.compare-tooltip,
.compare-race-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.compare-tooltip {
  background: var(--solid);
  border-radius: 8px;
}
.compare-replay {
  margin-top: 12px;
}
.compare-replay input[type='range'] {
  display: block;
  width: 100%;
  margin: 12px 0;
}
.compare-inspect {
  display: block;
  margin: 8px 0;
  font-size: 11px;
  color: var(--muted);
}
.compare-inspect input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.compare-replay label,
.compare-replay output {
  font-size: 12px;
}
.compare-table-wrap {
  padding: 4px;
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compare-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 12px 10px;
  min-width: 100px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  vertical-align: top;
}
.compare-table th[scope='row'] {
  color: var(--muted);
  min-width: 150px;
}
.compare-table td {
  font-variant-numeric: tabular-nums;
}
.compare-table .compare-delta {
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
}
.compare-group th {
  padding-top: 24px;
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.compare-table strong {
  font-weight: 750;
}
.compare-bar {
  display: block;
  height: 4px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.compare-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
@media (max-width: 1050px) {
  .compare-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .compare-add {
    max-width: none;
  }
}
@media (max-width: 600px) {
  dialog.flight-comparison-dialog {
    width: calc(100% - 12px);
    max-height: 96dvh;
  }
  .flight-comparison-dialog #dialog-content {
    max-height: 96dvh;
  }
  .flight-comparison-dialog .dialog-body {
    padding: 12px;
  }
  .flight-comparison-dialog .dialog-footer {
    padding: 10px 12px;
    gap: 8px;
  }
  .flight-comparison-dialog .dialog-footer .btn {
    flex: 1 1 auto;
    min-height: 40px;
    font-size: 12px;
  }
  .flight-comparison-dialog [data-compare-start] {
    flex-basis: 100%;
  }
  .flight-comparison-dialog .dialog-footer > span {
    display: none;
  }
  .compare-flight {
    flex-wrap: wrap;
    flex-basis: 100%;
  }
  .compare-flight > div {
    flex-basis: calc(100% - 85px);
  }
  .compare-map {
    height: 240px;
  }
  .compare-table th,
  .compare-table td {
    padding: 10px 8px;
  }
}

/* Mobile portrait replay: the scene above, all playback controls below. */
.flight-portrait-meta,
.replay-mobile-state,
.replay-mobile-settings {
  display: none;
}
dialog.replay-mobile-sheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: min(100%, 600px);
  max-width: 100%;
  max-height: 85dvh;
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid #354255;
  border-radius: 24px 24px 0 0;
  padding: 28px 18px max(28px, env(safe-area-inset-bottom));
  background: #1c2737;
  color: #e8edf4;
}
.replay-mobile-sheet::backdrop {
  background: #0008;
}
.replay-mobile-sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.replay-mobile-sheet h2 {
  font-size: 20px;
  margin: 0;
}
.replay-mobile-sheet header button {
  background: transparent;
  border: 0;
  color: #7dbbf7;
  min-height: 44px;
}
.replay-mobile-sheet fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
  min-width: 0;
}
.replay-mobile-sheet legend {
  color: #a3afc0;
  margin-bottom: 8px;
}
.replay-mobile-segments {
  display: flex;
  padding: 3px;
  background: #0f1621;
  border: 1px solid #354255;
  border-radius: 14px;
}
.replay-mobile-segments button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  padding: 8px 4px;
  font: inherit;
  font-size: 13px;
}
.replay-mobile-segments button[aria-pressed='true'] {
  background: #2472ca;
  color: white;
}
.replay-mobile-sheet .replay-switch-row {
  margin-top: 20px;
}
.replay-mobile-sheet .dialog-hint {
  color: #a3afc0;
}
@media (max-width: 600px) and (orientation: portrait) {
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-summary,
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-detail-metrics,
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-nav-group,
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-weather,
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-title-type {
    display: none;
  }
  .replay-mobile-portrait[data-flight-view='replay'] .dialog-head p {
    font-size: 0;
  }
  .replay-mobile-portrait[data-flight-view='replay'] .flight-mobile-meta {
    display: none;
  }
  .replay-mobile-portrait[data-flight-view='replay'] .flight-portrait-meta {
    display: block;
    font-size: 11px;
    white-space: normal;
  }
  .replay-mobile-portrait .replay-mobile-state {
    display: block;
    position: absolute;
    top: 12px;
    left: 10px;
    max-width: calc(100% - 76px);
    border: 1px solid #ffffff30;
    border-radius: 20px;
    background: #101a29c9;
    color: #d5deea;
    padding: 6px 10px;
    font-size: 11px;
    pointer-events: none;
    z-index: 600;
  }
  .replay-mobile-portrait .replay-mobile-settings {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: 1px solid #ffffff40;
    border-radius: 13px;
    background: #101a29db;
    color: white;
    font-size: 26px;
    z-index: 610;
  }
  .detail-dialog.replay-mobile-portrait .flight-map-fullscreen {
    top: 62px;
    right: 10px;
    width: 44px;
    height: 44px;
  }
  .detail-dialog.replay-mobile-portrait .flight-map-modes,
  .detail-dialog.replay-mobile-portrait .flight-map-settings,
  .detail-dialog.replay-mobile-portrait .replay-camera-menu,
  .detail-dialog.replay-mobile-portrait .replay-view-menu,
  .detail-dialog.replay-mobile-portrait .leaflet-control-zoom,
  .detail-dialog.replay-mobile-portrait .mapboxgl-ctrl-group,
  .detail-dialog.replay-mobile-portrait .replay-free-camera > strong {
    display: none !important;
  }
  .detail-dialog.replay-mobile-portrait .replay-free-camera:not([hidden]) {
    display: flex;
    top: auto;
    bottom: 16px;
    left: 50%;
    right: auto;
    width: max-content;
    max-width: calc(100% - 24px);
    transform: translateX(-50%);
    padding: 0;
    border: 0;
    background: transparent;
  }
  .replay-mobile-portrait .replay-free-camera button {
    border-radius: 24px;
    min-height: 44px;
    background: #17251cdb;
    color: white;
    border: 1px solid #ffffff40;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-stage {
    display: flex;
    flex-direction: column;
    --flight-map-height: max(200px, calc(100dvh - 430px));
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .detail-map {
    height: var(--flight-map-height);
    min-height: 200px;
    flex: none;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud {
    position: static;
    transform: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 12px 4px;
    box-sizing: border-box;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: var(--panel, #121925);
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud > div {
    padding: 0;
    background: transparent;
    border: 0;
    min-width: 0;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud strong {
    font-size: clamp(16px, 5vw, 22px);
    white-space: nowrap;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud small {
    font-size: 10px;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud .flight-hud-sub {
    font-size: 10px;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud > div:has([data-replay-g-load]) {
    display: none;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-chart-buttons {
    display: flex;
    width: auto;
    margin: 4px 12px 0;
    gap: 4px;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-chart-buttons button {
    flex: none;
    padding: 5px 12px;
    min-height: 36px;
    border: 0;
    border-radius: 20px;
    font-size: 13px;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-main-chart {
    position: relative;
    padding: 0;
    margin: 0;
    height: 90px;
    overflow: hidden;
  }
  .replay-mobile-portrait:not(.replay-expanded)
    .flight-main-chart
    :is(
      .chart-title,
      .chart-summary,
      .flight-chart-legend,
      .chart-axis-labels,
      .replay-hover-preview
    ) {
    display: none;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)
    .flight-main-chart
    :is(.flight-chart-frame, .flight-chart-plot, svg.altitude) {
    height: 90px;
    min-height: 0;
    margin: 0;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart .replay-timeline {
    display: block;
    position: absolute;
    inset: 0 4.84% 0 8.87%;
    margin: 0;
    padding: 0;
    z-index: 8;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input {
    width: 100%;
    height: 100%;
    margin: 0;
    appearance: none;
    background: transparent;
    cursor: ew-resize;
    touch-action: pan-y;
  }
  .replay-mobile-portrait:not(.replay-expanded)
    .replay-timeline
    input::-webkit-slider-runnable-track {
    height: 2px;
    background: transparent;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 2px solid #2472ca;
    margin-top: -10px;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input::-moz-range-track {
    background: transparent;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 2px solid #2472ca;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .flight-replay-dock {
    order: 5;
    padding: 10px 12px max(16px, env(safe-area-inset-bottom));
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .replay-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px 56px 40px 48px;
    gap: 6px;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-actions > [data-replay-clock] {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-clock-primary strong {
    font-size: clamp(15px, 4.5vw, 21px);
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-clock-primary small {
    display: none;
  }
  .replay-mobile-portrait:not(.replay-expanded) [data-replay-clock-progress] {
    font-size: 10px;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded) .replay-actions > .replay-step {
    display: block;
    padding: 0;
    min-width: 0;
    width: 40px;
    height: 44px;
    border-radius: 50%;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)
    .replay-actions
    > [data-replay-toggle] {
    width: 56px;
    min-width: 56px;
    height: 56px;
    border-radius: 50%;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-actions .flight-tempo-buttons {
    margin: 0;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-tempo-cycle {
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
  }
  .replay-mobile-portrait:not(.replay-expanded)
    .replay-actions
    > :is(
      .replay-help-button,
      .replay-tempo,
      .replay-compact-tempo,
      [data-replay-start],
      [data-replay-end]
    ),
  .replay-mobile-portrait:not(.replay-expanded)
    .replay-controls
    > :is(
      .flight-segment-strip,
      .flight-segment-legend,
      [data-replay-chart-toggle],
      .flight-keyboard-hint
    ) {
    display: none;
  }
  .detail-dialog.replay-mobile-portrait.replay-expanded:not(.replay-mobile-overlay-values)
    .flight-replay-hud {
    display: none;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay'] .dialog-head h2::after {
    content: ' · Replay';
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart .chart-data-note {
    display: none;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart .replay-timeline:focus-within {
    outline: 2px solid #7dbbf7;
    outline-offset: -2px;
  }
  .replay-mobile-portrait .replay-mobile-sheet button:focus-visible {
    outline: 2px solid #7dbbf7;
    outline-offset: 2px;
  }
  :root[data-theme='light'] .replay-mobile-portrait:not(.replay-expanded) .flight-replay-hud {
    background: #f4f7fb;
    color: #182536;
  }
}
:root[data-theme='light'] dialog.replay-mobile-sheet {
  background: #f4f7fb;
  color: #182536;
  border-color: #c1ccdb;
}
:root[data-theme='light'] .replay-mobile-sheet .replay-mobile-segments {
  background: #e6edf5;
  border-color: #c1ccdb;
}
:root[data-theme='light'] .replay-mobile-sheet :is(legend, .dialog-hint) {
  color: #53657a;
}
@media (max-width: 600px) and (orientation: portrait) {
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input::-webkit-slider-thumb {
    transform: translateY(var(--mobile-thumb-offset, 0px));
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input::-moz-range-thumb {
    transform: translateY(var(--mobile-thumb-offset, 0px));
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .dialog-head {
    grid-template-columns: minmax(0, 1fr) auto 32px;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .dialog-head
    > div:not(.flight-header-actions):not(.flight-nav-group) {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-header-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-close {
    grid-column: 3;
    grid-row: 1;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)
    .flight-main-chart
    .flight-chart-plot {
    width: 100%;
    margin: 0;
  }
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)
    .flight-replay-hud
    .flight-hud-sub
    strong {
    font-size: 10px;
  }
  .replay-mobile-portrait:not(.replay-expanded) .replay-timeline input {
    width: calc(100% + 22px);
    margin-left: -11px;
    padding: 0;
    border: 0;
    box-sizing: border-box;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart [data-chart-dot] {
    visibility: hidden;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart .replay-cursor {
    stroke: #fff;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .detail-dialog.replay-expanded .flight-map-settings[open] {
    right: 66px;
  }
}
.replay-mobile-weather {
  display: none;
}
.replay-mobile-sheet .replay-mobile-advanced {
  margin-top: 24px;
  border-top: 1px solid #53657a;
  padding-top: 16px;
}
.replay-mobile-sheet .replay-mobile-advanced > summary {
  cursor: pointer;
  min-height: 44px;
}
.detail-dialog .replay-mobile-sheet :is(.replay-layers-panel, .replay-camera-panel) {
  position: static;
  width: auto;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
@media (max-width: 600px) and (orientation: portrait) {
  .detail-dialog.replay-mobile-portrait .flight-detail-actions-panel .replay-mobile-weather {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart .replay-timeline {
    z-index: 1;
  }
  .replay-mobile-portrait:not(.replay-expanded) .flight-main-chart .replay-timeline-markers {
    z-index: 3;
  }
}

.flight-batch-progress [data-batch-filter][aria-pressed='true'] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  font-weight: 700;
}

/* Flight sharing studio: template selection and responsive image editor. */
.share-studio {
  --studio-bg: #0f1621;
  --studio-panel: #1b2534;
  --studio-border: #2c3849;
  --studio-text: #e8edf4;
  --studio-muted: #a3afc0;
  color: var(--studio-text);
  background: var(--studio-bg);
}
.share-studio [hidden] {
  display: none !important;
}
.share-studio button,
.share-studio select,
.share-studio input,
.share-studio textarea {
  font: inherit;
}
.share-studio button {
  cursor: pointer;
}
.share-studio button:disabled {
  cursor: default;
  opacity: 0.5;
}
.share-studio button:focus-visible,
.share-studio input:focus-visible,
.share-studio select:focus-visible,
.share-studio summary:focus-visible,
.share-studio textarea:focus-visible {
  outline: 3px solid #7dbbf7;
  outline-offset: 3px;
}
.share-studio .share-page-head {
  flex-wrap: wrap;
}
.share-studio .share-page-head [role='tablist'] {
  margin-left: auto;
}
.studio-picker {
  padding: 32px;
}
.studio-picker h3 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 8px;
}
.studio-picker p,
.studio-section p,
.studio-preview > small {
  color: var(--studio-muted);
}
.studio-templates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.studio-templates > button {
  position: relative;
  min-width: 0;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--studio-border);
  border-radius: 22px;
  color: var(--studio-text);
  background: var(--studio-panel);
}
.studio-templates > button:not(:disabled):hover {
  border-color: #7dbbf7;
  transform: translateY(-2px);
}
.studio-templates strong {
  display: block;
  font-size: 19px;
  margin-top: 14px;
}
.studio-templates small {
  display: inline-block;
  border-radius: 20px;
  padding: 2px 8px;
  background: var(--studio-border);
  margin-top: 8px;
}
.studio-templates p {
  font-size: 14px;
  line-height: 1.5;
}
.studio-thumb {
  aspect-ratio: 4/5;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0b1018;
  color: #7dbbf7;
}
.studio-thumb > span {
  font-size: 80px;
}
.studio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.studio-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--studio-border);
}
.studio-toolbar button,
.studio-section button,
.studio-settings-head button,
.studio-chips button,
.studio-zoom button {
  padding: 8px 12px;
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  background: var(--studio-bg);
  color: var(--studio-text);
}
.studio-toolbar [data-size] {
  margin-left: auto;
  color: var(--studio-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}
.studio-toolbar [data-draft] {
  color: #8fddb0;
  font-size: 12px;
}
.studio-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
}
.studio-preview {
  min-width: 0;
  padding: 24px 32px 40px;
  background: #0b1018;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.studio-preview > .studio-toggle {
  align-self: flex-end;
  font-size: 13px;
}
.studio-image {
  display: block;
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #0f1621;
  box-shadow: 0 25px 60px #0004;
}
.share-studio .studio-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 0;
  margin: 0;
}
.studio-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.studio-guides i {
  position: absolute;
  left: 0;
  right: 0;
  height: 12%;
  border: 1px dashed #f39a9a;
  background: #d95b5b30;
  color: #ffbaba;
  text-align: right;
  font-size: 11px;
  padding: 8px;
  font-style: normal;
}
.studio-guides i:first-child {
  top: 0;
  height: var(--guide-top, 12%);
}
.studio-guides i:last-child {
  bottom: 0;
  height: var(--guide-bottom, 18%);
}
.studio-guides i:nth-child(2) {
  left: auto;
  top: 46%;
  bottom: var(--guide-bottom, 18%);
  width: var(--guide-right, 12%);
  height: auto;
}
.studio-settings {
  min-width: 0;
  background: var(--studio-panel);
  border-left: 1px solid var(--studio-border);
}
.studio-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}
.studio-settings-head h3 {
  margin: 0;
}
.studio-settings details {
  border-top: 1px solid var(--studio-border);
}
.studio-settings summary {
  cursor: pointer;
  padding: 20px;
  font-weight: 600;
}
.studio-settings summary > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--studio-border);
  margin-right: 12px;
}
.studio-section {
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.studio-section label:not(.studio-toggle) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--studio-muted);
  font-size: 14px;
}
.share-studio .studio-section input:not([type='checkbox']):not([type='range']),
.studio-section select,
.studio-section textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  padding: 12px;
  color: var(--studio-text);
  background: var(--studio-bg);
}
.studio-section textarea {
  resize: vertical;
}
.studio-section input[type='range'] {
  width: 100%;
  accent-color: #7dbbf7;
}
.studio-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
}
.studio-toggle input {
  width: 20px;
  height: 20px;
  accent-color: #2470c8;
  flex: none;
}
.studio-formats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.studio-formats button {
  padding: 16px 3px;
  font-size: 12px;
}
.studio-formats small {
  display: block;
  margin-top: 8px;
  color: var(--studio-muted);
}
.studio-section [aria-pressed='true'] {
  border-color: #7dbbf7;
  box-shadow: 0 0 0 1px #7dbbf7;
  background: #21364f;
}
.studio-accents {
  display: flex;
  gap: 12px;
}
.studio-accents button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: var(--swatch) !important;
}
.studio-accents [aria-pressed='true'] {
  outline: 2px solid var(--studio-text);
  outline-offset: 3px;
}
.studio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.studio-chips > span {
  padding: 6px 8px;
  border-radius: 20px;
  background: #21364f;
  font-size: 13px;
}
.studio-chips button {
  border: 0;
  padding: 2px 6px;
  background: transparent;
}
.studio-section fieldset {
  border: 1px solid var(--studio-border);
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
}
.studio-section fieldset label {
  flex-direction: row !important;
  align-items: center;
  margin: 10px 0;
}
.studio-file {
  display: grid;
  gap: 8px;
  font-size: 12px;
}
.studio-file dt {
  color: var(--studio-muted);
}
.studio-file dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: 'IBM Plex Mono', monospace;
}
.studio-privacy,
.share-studio [data-card-status] {
  margin: 16px 20px;
  font-size: 13px;
}
.studio-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  position: sticky;
  bottom: 0;
  background: var(--studio-bg);
  border-top: 1px solid var(--studio-border);
  z-index: 2;
}
.studio-actions button {
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  color: var(--studio-text);
  background: var(--studio-panel);
}
.studio-actions [data-card-share] {
  background: #2470c8;
  color: white;
}
.studio-zoom {
  max-width: 95vw;
  max-height: 95dvh;
  background: var(--studio-bg);
  border: 1px solid var(--studio-border);
  border-radius: 12px;
}
.studio-zoom::backdrop {
  background: #000b;
}
.studio-zoom img {
  display: block;
  max-width: 85vw;
  max-height: 80dvh;
  object-fit: contain;
}
:root[data-theme='light'] .share-studio {
  --studio-bg: #f3f5f8;
  --studio-panel: #fff;
  --studio-border: #c9d3e0;
  --studio-text: #182335;
  --studio-muted: #536176;
}
:root[data-theme='light'] .studio-chips > span {
  background: #dceafb;
}
@media (max-width: 1100px) {
  .studio-templates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .studio-picker {
    padding: 20px;
  }
  .studio-templates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .studio-templates > button {
    padding: 12px;
  }
  .studio-workspace {
    display: flex;
    flex-direction: column;
  }
  .studio-preview {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
  }
  .studio-settings {
    width: 100%;
    border-left: 0;
  }
  .studio-toolbar {
    gap: 10px;
    padding: 12px 16px;
  }
  .studio-toolbar [data-size] {
    width: 100%;
    margin: 0;
  }
  .studio-actions {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .studio-actions button {
    flex: 1;
    padding: 12px;
  }
  .share-studio .share-page-head {
    padding: 12px 16px;
  }
  .share-studio .share-page-head [role='tablist'] {
    order: 5;
    width: 100%;
    margin: 0;
  }
  .share-studio .studio-image img {
    max-height: none;
  }
}
.studio-output {
  background: var(--studio-panel);
  color: var(--studio-text);
  border: 1px solid var(--studio-border);
  padding: 20px;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 700px;
  max-height: 90dvh;
  box-sizing: border-box;
}
.studio-output::backdrop {
  background: #0009;
}
.studio-output > button {
  float: right;
  border: 0;
  background: transparent;
  color: var(--studio-text);
  padding: 8px;
}
.studio-output > [data-output-image] {
  display: block;
  width: 120px;
  height: 150px;
  object-fit: contain;
  margin: 16px auto;
}
.studio-output .studio-section {
  padding: 16px 0;
}
@media (max-width: 700px) {
  .studio-output {
    margin: auto 0 0;
    position: fixed;
    inset: auto 0 0;
  }
}
.share-studio .studio-image {
  width: min(100%, calc(76vh * var(--preview-ratio, 0.8)));
}
.share-studio .studio-image img {
  max-height: none;
}
@media (max-width: 700px) {
  .share-studio .studio-image {
    width: 100%;
  }
}

/* Compact flight-value catalogue: labels and values share one dense row. */
.share-studio [data-metrics] {
  display: grid;
  gap: 8px;
}
.share-studio .studio-section .studio-metric-group {
  margin: 0;
  padding: 4px 8px 6px;
  border-radius: 8px;
  min-width: 0;
}
.share-studio .studio-metric-group legend {
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--studio-muted);
}
.share-studio .studio-section .studio-metric-group .studio-metric {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 2px 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--studio-text);
}
.share-studio .studio-metric input[type='checkbox'] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2470c8;
}
.share-studio .studio-metric output {
  max-width: 100px;
  color: var(--studio-muted);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.share-studio .studio-section details:has([data-metrics]) > summary {
  padding: 10px 0;
  font-size: 13px;
}
.share-studio .studio-chips {
  gap: 5px;
}
.share-studio .studio-chips > span {
  padding: 3px 7px;
  font-size: 12px;
}

.share-studio .studio-formats button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.share-studio .studio-formats small {
  margin-top: 0;
}
.studio-format-icon {
  display: block;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 3px;
  flex: none;
}
.studio-format-icon[data-shape='post'] {
  width: 22px;
  height: 27.5px;
}
.studio-format-icon[data-shape='story'] {
  width: 17px;
  height: 30px;
}
.studio-format-icon[data-shape='landscape'] {
  width: 32px;
  height: 18px;
  margin-block: 6px;
}
.studio-format-icon[data-shape='square'] {
  margin-block: 3px;
}
.studio-format-icon[data-shape='post'] {
  margin-block: 1.25px;
}

.studio-background {
  display: grid;
  gap: 8px;
}
.studio-background > span {
  font-size: 14px;
  color: var(--studio-muted);
}
.share-studio .studio-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  background: var(--studio-bg);
}
.share-studio .studio-segmented button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--studio-text);
  font-size: 14px;
}
.share-studio .studio-segmented button[aria-pressed='true'] {
  background: #2b3a50;
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}
:root[data-theme='light'] .share-studio .studio-segmented button[aria-pressed='true'] {
  background: #dceafb;
  color: #182335;
}

/* Desktop editor: keep the preview still while settings scroll independently. */
@media (min-width: 701px) {
  dialog.flight-share-page:has(#share-image-panel:not([hidden]) .studio-editor:not([hidden])) {
    overflow: hidden;
  }
  .share-studio:has(#share-image-panel:not([hidden]) .studio-editor:not([hidden])) {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .share-studio .share-page-head {
    flex: none;
  }
  .share-studio #share-image-panel:has(.studio-editor:not([hidden])) {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .share-studio .studio-editor {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .share-studio .studio-workspace {
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
  }
  .share-studio .studio-settings {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
  .share-studio .studio-preview {
    min-height: 0;
    overflow: hidden;
    justify-content: center;
    padding-block: 16px;
    gap: 12px;
  }
  .share-studio .studio-image {
    flex: none;
    width: min(100%, calc((100dvh - 310px) * var(--preview-ratio, 0.8)));
  }
  .share-studio .studio-actions {
    position: static;
  }
}

/* Separate the exported image edges from the enlarged preview workspace. */
.share-studio .studio-zoom {
  padding: 0;
  width: min(1100px, 96vw);
  max-width: 96vw;
  max-height: 94dvh;
  border: 1px solid #63748a;
  border-radius: 14px;
  background: #354256;
  box-shadow: 0 24px 90px #0009;
}
.studio-zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--studio-bg);
  color: var(--studio-text);
  border-bottom: 1px solid #63748a;
}
.studio-zoom-head > span {
  font:
    12px 'IBM Plex Mono',
    monospace;
}
.studio-zoom-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px;
  background-color: #354256;
  background-image: repeating-conic-gradient(#ffffff09 0% 25%, transparent 0% 50%);
  background-size: 20px 20px;
}
.share-studio .studio-zoom-stage img {
  display: block;
  width: min(100%, calc((94dvh - 140px) * var(--zoom-ratio, 0.8)));
  max-width: 100%;
  max-height: none;
  height: auto;
  border: 1px solid #bac7d8;
  border-radius: 0;
  box-shadow: 0 8px 28px #0008;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  .studio-zoom-stage {
    padding: 18px;
  }
  .studio-zoom-head {
    padding: 10px;
    gap: 8px;
  }
}

/* Flight photo selection and direct crop controls. */
.share-studio .studio-photo-heading,
.share-studio .studio-crop-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.studio-photo-heading > span,
.studio-photo-options > small,
.studio-crop-card > small {
  font-size: 12px;
  color: var(--studio-muted);
}
.share-studio .studio-photo-heading > button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: #7dbbf7;
  font-size: 12px;
}
.studio-photo-options {
  display: grid;
  gap: 10px;
}
.studio-photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
  min-width: 0;
}
.share-studio .studio-photo-tile {
  position: relative;
  padding: 0;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border: 2px solid var(--studio-border);
  border-radius: 13px;
  background: var(--studio-bg);
  color: var(--studio-text);
}
.share-studio .studio-photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.share-studio .studio-photo-tile[aria-pressed='true'] {
  border-color: #7dbbf7;
  box-shadow: 0 0 0 2px #7dbbf7;
}
.studio-photo-star,
.studio-photo-check {
  position: absolute;
  top: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #101822dd;
  font-size: 14px;
}
.studio-photo-star {
  left: 4px;
  color: #f2b544;
}
.studio-photo-check {
  right: 4px;
  background: #2470c8;
  color: white;
}
.studio-photo-time {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px;
  background: linear-gradient(transparent, #000c);
  color: white;
  text-align: left;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-studio .studio-photo-add {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  min-height: 80px;
  flex: 0 0 80px;
  padding: 8px;
  border: 1px dashed #5b8bbb;
  border-radius: 13px;
  color: #7dbbf7;
  background: transparent;
  font-size: 12px;
}
.studio-photo-add > strong {
  font-size: 25px;
  line-height: 1;
}
.share-studio .studio-drop-active {
  outline: 2px dashed #7dbbf7;
  outline-offset: 3px;
}
.studio-crop-card {
  padding: 12px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  background: var(--studio-bg);
  display: grid;
  gap: 8px;
}
.studio-crop-card strong {
  font-size: 13px;
}
.share-studio .studio-crop-card [data-crop-start] {
  padding: 7px 10px;
  background: #2470c8;
  color: white;
  font-size: 12px;
}
.studio-crop-card [data-crop-panel] label {
  display: grid !important;
  grid-template-columns: auto minmax(40px, 1fr) 50px;
  align-items: center;
}
.studio-crop-card p {
  margin: 0 0 10px;
  font-size: 12px;
}
.studio-photo-stage {
  width: 100%;
  min-width: 0;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.studio-photo-stage .studio-image {
  position: relative;
  z-index: 1;
}
.share-studio .studio-crop-ghost {
  position: absolute;
  z-index: 0;
  max-width: none;
  max-height: none;
  object-fit: fill;
  pointer-events: none;
  opacity: 0.27;
  border-radius: 0;
}
.studio-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border: 2px solid #7dbbf7;
  background-image:
    linear-gradient(
      to right,
      transparent calc(33.333% - 0.5px),
      #ffffff80 calc(33.333% - 0.5px),
      #ffffff80 calc(33.333% + 0.5px),
      transparent calc(33.333% + 0.5px),
      transparent calc(66.666% - 0.5px),
      #ffffff80 calc(66.666% - 0.5px),
      #ffffff80 calc(66.666% + 0.5px),
      transparent calc(66.666% + 0.5px)
    ),
    linear-gradient(
      to bottom,
      transparent calc(33.333% - 0.5px),
      #ffffff80 calc(33.333% - 0.5px),
      #ffffff80 calc(33.333% + 0.5px),
      transparent calc(33.333% + 0.5px),
      transparent calc(66.666% - 0.5px),
      #ffffff80 calc(66.666% - 0.5px),
      #ffffff80 calc(66.666% + 0.5px),
      transparent calc(66.666% + 0.5px)
    );
}
.share-studio.studio-cropping .studio-image {
  cursor: grab;
  touch-action: none;
  border-radius: 4px;
}
.share-studio.studio-cropping .studio-image:active {
  cursor: grabbing;
}
.studio-crop-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  background: var(--studio-panel);
  box-shadow: 0 12px 25px #0005;
}
.studio-crop-zoom,
.studio-crop-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.studio-crop-zoom input {
  min-width: 40px;
  max-width: 140px;
  accent-color: #7dbbf7;
}
.share-studio .studio-crop-toolbar button,
.share-studio .studio-crop-mobile button,
.share-studio .studio-photo-dialog button {
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  color: var(--studio-text);
  background: var(--studio-bg);
  padding: 8px 12px;
  font: inherit;
}
.studio-crop-toolbar button {
  font-size: 12px !important;
}
.studio-crop-zoom output {
  font:
    12px 'IBM Plex Mono',
    monospace;
  white-space: nowrap;
}
.share-studio .studio-crop-tools [data-crop-done] {
  background: #2470c8;
  color: white;
}
.share-studio .studio-photo-dialog {
  width: min(980px, 94vw);
  max-width: 94vw;
  max-height: 90dvh;
  padding: 24px;
  border: 1px solid var(--studio-border);
  border-radius: 24px;
  background: var(--studio-panel);
  color: var(--studio-text);
  box-sizing: border-box;
}
.studio-photo-dialog::backdrop,
.studio-crop-mobile::backdrop {
  background: #000c;
}
.studio-photo-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.studio-photo-dialog h3 {
  margin: 0;
  font-size: 23px;
}
.studio-photo-dialog p {
  color: var(--studio-muted);
  font-size: 13px;
}
.studio-photo-tabs {
  display: flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  background: var(--studio-bg);
  margin-bottom: 20px;
}
.share-studio .studio-photo-tabs button {
  flex: 1;
  border: 0;
  padding: 10px;
  font-size: 13px;
}
.share-studio .studio-photo-tabs [aria-selected='true'] {
  background: #2b3a50;
  color: white;
  font-weight: 600;
}
.studio-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  max-height: 45dvh;
  overflow-y: auto;
  padding: 4px;
}
.share-studio .studio-photo-grid .studio-photo-tile,
.share-studio .studio-photo-grid .studio-photo-add {
  width: 100%;
  height: auto;
  aspect-ratio: 6/5;
  min-width: 0;
}
.studio-photo-grid .studio-photo-time {
  padding: 8px;
  font-size: 12px;
}
.studio-photo-dialog footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--studio-border);
  padding-top: 18px;
}
.studio-photo-dialog footer label {
  margin-right: auto;
  font-size: 13px;
}
.studio-photo-dialog input[type='checkbox'] {
  accent-color: #2470c8;
}
.share-studio .studio-photo-dialog [data-photo-use] {
  background: #2470c8;
  color: white;
}
.share-studio .studio-crop-mobile {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--studio-bg);
  color: var(--studio-text);
}
.studio-crop-mobile[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}
.studio-crop-mobile > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--studio-border);
}
.studio-crop-mobile > header button {
  color: #7dbbf7 !important;
  border: 0 !important;
  background: transparent !important;
}
.studio-crop-mobile > [data-crop-mobile-preview] {
  min-height: 0;
  overflow: hidden;
  display: grid;
}
.studio-crop-mobile .studio-preview {
  padding: 18px 24px;
  min-height: 0;
  justify-content: center;
  gap: 0;
}
.studio-crop-mobile .studio-preview > .studio-toggle,
.studio-crop-mobile .studio-preview > small {
  display: none;
}
.share-studio .studio-crop-mobile .studio-image {
  width: min(100%, calc((100dvh - 330px) * var(--preview-ratio, 0.8)));
}
.studio-crop-mobile > p {
  font-size: 12px;
  text-align: center;
  margin: 8px;
  color: var(--studio-muted);
}
.studio-crop-mobile-controls {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--studio-panel);
  display: grid;
  gap: 12px;
}
.studio-crop-mobile-controls .studio-crop-zoom {
  justify-content: center;
}
.studio-crop-mobile-controls .studio-crop-zoom input {
  flex: 1;
  max-width: none;
}
.studio-crop-mobile-controls .studio-crop-tools button {
  flex: 1;
  font-size: 12px;
}
.studio-crop-mobile-controls .studio-crop-tools [data-crop-done] {
  display: none;
}
@media (min-width: 701px) {
  .share-studio.studio-cropping .studio-image {
    width: min(100%, calc((100dvh - 390px) * var(--preview-ratio, 0.8)));
  }
}
@media (max-width: 700px) {
  .share-studio .studio-photo-dialog {
    padding: 16px;
    border-radius: 16px;
  }
  .studio-photo-dialog h3 {
    font-size: 20px;
  }
  .studio-photo-tabs {
    gap: 2px;
  }
  .share-studio .studio-photo-tabs button {
    padding: 10px 5px;
    font-size: 12px;
  }
  .studio-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .studio-photo-dialog footer label {
    width: 100%;
  }
}
/* Keep enough room for the crop header and touch controls on smaller phones. */
@media (max-width: 700px) {
  .share-studio .studio-crop-mobile .studio-image {
    width: min(100%, calc((100dvh - 390px) * var(--preview-ratio, 0.8)));
  }
}
.share-studio.studio-cropping .studio-preview > small {
  visibility: hidden;
}

/* Compact, background-specific choices in the sharing editor. */
.share-studio .studio-settings .studio-segmented {
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
}
.share-studio .studio-settings .studio-segmented button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 12px;
  line-height: 1.25;
  border-radius: 7px;
}
.share-studio .studio-map-styles {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.share-studio .studio-section {
  gap: 12px;
}
.share-studio .studio-section .studio-toggle {
  min-height: 24px;
  gap: 9px;
  font-size: 13px;
}
.share-studio .studio-section .studio-toggle input {
  width: 16px;
  height: 16px;
}
.share-studio .studio-section .studio-accents {
  gap: 10px;
  padding: 4px;
}
.share-studio .studio-section .studio-accents button {
  width: 26px;
  height: 26px;
  border: 1px solid #a3afc066;
}
.share-studio [data-background-colors] {
  display: grid;
  gap: 6px;
}
.share-studio [data-background-colors] > small,
.studio-color-label {
  color: var(--studio-muted);
  font-size: 12px;
}
.studio-map-renderer {
  position: fixed;
  left: -20000px;
  top: 0;
  pointer-events: none;
}

/* Adjust the 3D camera independently of the card's text and values. */
.share-studio .studio-map-editor {
  width: min(1100px, 96vw);
  max-width: 96vw;
  max-height: 94dvh;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid var(--studio-border);
  border-radius: 18px;
  background: var(--studio-panel);
  color: var(--studio-text);
}
.studio-map-editor::backdrop {
  background: #000b;
}
.studio-map-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.studio-map-editor h3 {
  margin: 0;
  font-size: 20px;
}
.share-studio .studio-map-editor button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--studio-border);
  border-radius: 9px;
  background: var(--studio-bg);
  color: var(--studio-text);
  font: inherit;
}
.share-studio .studio-map-editor [data-map-done],
.share-studio [data-map-adjust] {
  background: #2470c8;
  color: white;
}
.studio-map-editor-stage {
  position: relative;
  width: min(100%, calc(60dvh * var(--map-ratio, 1.3)));
  aspect-ratio: var(--map-ratio, 1.3);
  margin: auto;
  background: #263746;
  border: 1px solid #7dbbf7;
  overflow: hidden;
  box-sizing: border-box;
}
.studio-map-editor-stage > .terrain-stage {
  position: absolute;
  inset: 0;
  min-height: 0 !important;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.studio-map-editor-stage:has(> .terrain-stage) > :not(.terrain-stage) {
  display: none !important;
}
.studio-map-editor-stage canvas {
  display: block;
  touch-action: none;
}
.studio-map-editor > p {
  margin: 10px 0;
  font-size: 12px;
  color: var(--studio-muted);
}
.studio-map-editor > footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.share-studio .studio-map-editor .studio-segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.share-studio .studio-map-editor .studio-segmented button {
  min-height: 30px;
  font-size: 12px;
}
.share-studio .studio-map-editor .studio-segmented [aria-pressed='true'] {
  background: #2b3a50;
  color: white;
}
@media (max-width: 700px) {
  .share-studio .studio-map-editor {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }
  .studio-map-editor > header {
    gap: 8px;
  }
  .studio-map-editor h3 {
    font-size: 16px;
  }
  .studio-map-editor-stage {
    margin: 24px auto;
    width: min(100%, calc((100dvh - 260px) * var(--map-ratio, 1.3)));
  }
}

/* Photo-led Flight Moment template and style-specific controls. */
.studio-moment-options {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--studio-border);
}
.studio-moment-options > small {
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.share-studio[data-studio-template='moment'] [data-photo-style-group] .studio-segmented {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}
.share-studio[data-studio-template='moment'] [data-photo-style] {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px !important;
  border: 1px solid var(--studio-border) !important;
  background: var(--studio-bg);
}
.share-studio[data-studio-template='moment'] [data-photo-style][aria-pressed='true'] {
  border-color: #7dbbf7 !important;
  box-shadow: 0 0 0 1px #7dbbf7;
}
.studio-style-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: linear-gradient(150deg, #405c77, #101822);
  border-radius: 6px;
}
.share-studio .studio-style-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.studio-style-thumb img:not([src]) {
  visibility: hidden;
}
[data-sentence-count] {
  color: var(--studio-muted);
  font-size: 11px;
  text-align: right;
}
[data-moment-readability] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #dba34366;
  border-radius: 9px;
  background: #8b5a141c;
  color: #e9b556;
  font-size: 12px;
}
.share-studio [data-moment-darken] {
  padding: 4px 8px;
  color: #e9b556;
}
.studio-moment-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 350px;
  padding: 24px;
  border: 1px dashed #5b8bbb;
  border-radius: 14px;
  background: var(--studio-bg);
  color: var(--studio-text);
  text-align: center;
  box-sizing: border-box;
}
.studio-moment-empty > span {
  font-size: 44px;
  color: #7dbbf7;
}
.studio-moment-empty p {
  font-size: 13px;
  color: var(--studio-muted);
  margin: 0;
}
.share-studio .studio-moment-empty button {
  padding: 10px 14px;
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  background: #2470c8;
  color: white;
}
.share-studio .studio-moment-empty [data-template] {
  color: #7dbbf7;
  background: transparent;
}

.share-studio[data-studio-template='stats'] .studio-chips {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  overflow: hidden;
}
.share-studio[data-studio-template='stats'] .studio-chips > span {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 0;
  padding: 6px 9px;
  min-height: 30px;
  background: var(--studio-bg);
  border-bottom: 1px solid var(--studio-border);
  font-size: 12px;
}
.share-studio[data-studio-template='stats'] .studio-chips output {
  margin-left: auto;
  color: var(--studio-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.share-studio [data-balance-controls] {
  display: grid;
  gap: 12px;
}
.share-studio [data-balance-key='balanceLayout'] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: auto;
  padding: 7px !important;
}
.share-studio [data-balance-key='balanceLayout'] img {
  max-height: 100px;
  max-width: 100%;
  border-radius: 4px;
}
.share-studio [data-balance-text] {
  display: grid;
  gap: 10px;
}
.share-studio [data-balance-capacity] {
  display: block;
  padding: 0 20px 12px;
  color: var(--studio-muted);
}

.share-studio [data-balance-key='style'] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: auto;
  padding: 7px !important;
}
.share-studio [data-balance-key='style'] img {
  max-height: 100px;
  max-width: 100%;
  border-radius: 4px;
}
.share-studio [data-balance-key='style'] small {
  font-size: 10px;
  font-weight: 400;
  color: var(--studio-muted);
}
.share-studio [data-balance-key='style']:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.share-studio [data-balance-key='style'][aria-pressed='true'] {
  box-shadow: inset 0 0 0 2px #7dbbf7;
}
.studio-balance-style-options {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--studio-border);
}
.studio-balance-style-options > strong {
  color: var(--studio-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.studio-balance-style-options > div:empty {
  display: none;
}

.studio-route-group {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  margin-top: 6px;
  border-top: 1px solid var(--studio-border);
}
.studio-route-group > strong {
  font-size: 11px;
  font-weight: 600;
  color: var(--studio-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
[data-route-map-options] {
  display: grid;
  gap: 12px;
}
[data-route-ground] small,
.studio-route-group > small {
  font-size: 11px;
  color: var(--studio-muted);
}
[data-route-accent] {
  display: grid;
  gap: 6px;
}

.studio-map-inline-stage {
  position: absolute !important;
  z-index: 3;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden;
  border-radius: 12px;
  cursor: grab;
}
.share-studio .studio-map-inline-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}
.studio-map-inline-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  background: var(--studio-panel);
}
.studio-map-inline-tools header,
.studio-map-inline-tools footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-map-inline-tools h3 {
  font-size: 12px;
  margin: 0;
}
.share-studio .studio-map-inline-tools button {
  padding: 6px 10px;
}
.studio-map-inline-tools > p {
  flex-basis: 100%;
  margin: 0;
  color: var(--studio-muted);
  font-size: 11px;
}
@media (min-width: 901px) {
  .share-studio.studio-map-adjusting .studio-image {
    width: min(100%, calc((100dvh - 450px) * var(--preview-ratio, 0.8)));
  }
}
.share-studio .studio-map-inline-tools button {
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: var(--studio-bg);
  color: var(--studio-text);
  cursor: pointer;
}
.share-studio .studio-map-inline-tools [data-map-done] {
  background: #2470c8;
  border-color: #2470c8;
  color: white;
}

/* Compact native switches retain label clicks, keyboard control and semantics. */
.share-studio input[type='checkbox'][role='switch'] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #435166;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.15s ease;
}
.share-studio input[type='checkbox'][role='switch']::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #0003;
  transition: transform 0.15s ease;
}
.share-studio input[type='checkbox'][role='switch']:checked {
  background: #2470c8;
}
.share-studio input[type='checkbox'][role='switch']:checked::after {
  left: 3px;
  transform: translateX(14px);
}
.share-studio input[type='checkbox'][role='switch']:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
.share-studio input[type='checkbox'][role='switch']:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.share-studio .studio-metric {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}
.share-studio .studio-formats + .studio-toggle {
  margin-top: 12px;
  min-height: 32px;
}
@media (prefers-reduced-motion: reduce) {
  .share-studio input[role='switch'],
  .share-studio input[role='switch']::after {
    transition: none;
  }
}
.share-studio .studio-section .studio-metric-group .studio-metric {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}
.share-terrain-endpoint > svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* One consistent camera toolbar for all sharing maps. */
.share-studio [data-map-controls] {
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
  padding: 12px 14px;
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  background: var(--studio-panel);
  color: var(--studio-text);
}
.share-studio [data-map-controls].studio-map-inline-tools {
  align-self: center;
}
.studio-map-control-row,
.studio-map-action-row,
.studio-map-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-map-control-row {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.studio-map-control-group > strong {
  color: var(--studio-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.studio-map-control-group + .studio-map-control-group {
  border-left: 1px solid var(--studio-border);
  padding-left: 12px;
}
.share-studio [data-map-controls] input[type='range'] {
  width: 82px;
  min-width: 60px;
  accent-color: #7dbbf7;
}
.share-studio [data-map-controls] output {
  font:
    11px 'IBM Plex Mono',
    monospace;
  min-width: 36px;
  white-space: nowrap;
  color: var(--studio-muted);
}
.studio-map-action-row {
  border-top: 1px solid var(--studio-border);
  padding-top: 10px;
  margin-top: 10px;
}
.studio-map-action-row > span {
  flex: 1;
}
.share-studio [data-map-controls] button {
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--studio-text);
  font-size: 12px;
  cursor: pointer;
}
.share-studio [data-map-controls] button:hover {
  background: #7dbbf717;
}
.share-studio [data-map-controls] [data-map-done] {
  background: #2470c8;
  color: white;
  margin-left: 2px;
}
.share-studio [data-map-controls] button:disabled,
.share-studio [data-map-controls] input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.share-studio [data-map-controls] > p {
  margin: 9px 0 0;
  font-size: 11px;
  color: var(--studio-muted);
}
.share-studio [data-map-controls] [data-map-message]:empty {
  display: none;
}
.share-studio.studio-map-adjusting .studio-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #050a125e;
  pointer-events: none;
  z-index: 2;
}
.share-studio .studio-map-editor-stage {
  border: 2px solid #7dbbf7;
  box-shadow: 0 0 0 1px #7dbbf733;
  box-sizing: border-box;
}
.share-studio .studio-map-editor-stage > .studio-map-state {
  display: grid !important;
  position: absolute;
  z-index: 8;
  top: 8px;
  right: 8px;
  justify-items: center;
  gap: 3px;
  pointer-events: none;
}
.share-studio [data-map-compass] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 40px;
  border: 1px solid #aab8cb;
  border-radius: 50%;
  color: white;
  background: #101b29df;
  pointer-events: auto;
  cursor: pointer;
}
[data-map-compass] span {
  font-size: 8px;
  line-height: 1;
}
[data-map-compass] b {
  display: block;
  color: #f59696;
  font-size: 19px;
  line-height: 1.2;
}
[data-map-pitch-badge] {
  background: #101b29df;
  border-radius: 10px;
  padding: 2px 7px;
  color: white;
  font:
    10px 'IBM Plex Mono',
    monospace;
}
.share-studio [data-map-outside] {
  position: absolute;
  right: 44px;
  top: 0;
  width: max-content;
  max-width: 220px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #59431fea;
  color: #ffce70;
  font-size: 11px;
}
.share-studio [data-map-drag-value] {
  position: absolute;
  right: 40px;
  top: 60px;
  width: max-content;
  max-width: 240px;
  padding: 7px 12px;
  border-radius: 18px;
  background: #101b29e8;
  color: white;
  font-size: 13px;
}
.share-studio [data-map-active] {
  color: #8fddb0;
  font-size: 11px;
  margin-left: auto;
}
.share-studio.studio-map-adjusting .studio-settings button:disabled,
.share-studio.studio-map-adjusting .studio-settings input:disabled,
.share-studio.studio-map-adjusting .studio-settings select:disabled {
  opacity: 0.4;
}
.share-studio.studio-map-adjusting [data-map-adjust-card] {
  border-color: #7dbbf7;
}
@media (max-width: 900px) {
  .share-studio .studio-map-editor {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    padding: 12px;
  }
  .share-studio .studio-map-editor-stage {
    width: min(100%, calc(48dvh * var(--map-ratio, 1.3)));
  }
  .studio-map-control-row {
    justify-content: flex-start;
  }
  .studio-map-control-group + .studio-map-control-group {
    border-left: 0;
    padding-left: 0;
  }
  .share-studio [data-map-controls] button {
    min-height: 36px;
  }
}
@media (min-width: 901px) {
  .share-studio.studio-map-adjusting .studio-image {
    width: min(100%, calc((100dvh - 445px) * var(--preview-ratio, 0.8)));
  }
}
.share-studio .studio-map-editor-stage > .studio-map-state {
  display: block !important;
  inset: 0;
}
.share-studio [data-map-compass] {
  position: absolute;
  top: 8px;
  right: 8px;
}
.share-studio [data-map-pitch-badge] {
  position: absolute;
  top: 52px;
  right: 8px;
}
.share-studio [data-map-outside] {
  left: 8px;
  right: auto;
  top: 8px;
  max-width: calc(100% - 62px);
}
.share-studio [data-map-drag-value] {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 12px;
  transform: translateX(-50%);
  font-size: 15px;
}
.share-studio.studio-map-adjusting .studio-map-inline-overlay {
  opacity: 0.45;
}

.studio-guides[data-platform='instagram'] i:nth-child(2) {
  display: none;
}

.share-studio [data-guide-options] .studio-toggle + .studio-toggle {
  margin-top: 8px;
}

/* Fluggeschichte: shared photo/map tools, with a series filmstrip. */
.flight-story {
  --story-line: var(--studio-border, #2b3748);
  background: var(--studio-bg, #0b1018);
  color: var(--studio-text, #e8edf4);
}
.flight-story button,
.flight-story input,
.flight-story textarea,
.flight-story select {
  font: inherit;
}
.flight-story button {
  cursor: pointer;
}
.flight-story button:disabled {
  cursor: default;
  opacity: 0.45;
}
.flight-story button:focus-visible,
.flight-story a:focus-visible {
  outline: 3px solid #7dbbf7;
  outline-offset: 3px;
}
.flight-story [hidden] {
  display: none !important;
}
.story-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--story-line);
}
.story-toolbar > small {
  margin-right: auto;
}
.story-toolbar [data-story-draft] {
  color: #8fddb0;
  font-size: 0.85rem;
}
.story-toolbar button,
.story-template-menu summary,
.story-settings button,
.story-modal button,
.story-zoom > button {
  border: 1px solid var(--story-line);
  background: var(--studio-panel, #16202e);
  color: inherit;
  border-radius: 10px;
  padding: 10px 14px;
}
.story-toolbar [data-story-share],
.story-settings [data-story-share],
.story-modal footer > button:last-child {
  background: #2475ce;
  color: white;
}
.story-template-menu {
  position: relative;
}
.story-template-menu summary {
  cursor: pointer;
  font-weight: 600;
}
.story-template-menu[open] {
  z-index: 5;
}

.story-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
}
.story-stage {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
}
.story-stage > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.story-stage small {
  color: var(--studio-muted, #a3afc0);
}
.story-carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 360px;
}
.story-carousel > button {
  border: 1px solid var(--story-line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: 28px;
  background: var(--studio-panel, #16202e);
  color: inherit;
}
.flight-story .studio-preview {
  padding: 0;
  min-width: 0;
  width: min(100%, 480px);
}
.flight-story .studio-image {
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
  width: 100%;
  box-shadow: 0 12px 35px #0004;
  overflow: hidden;
  border-radius: 14px;
}
.flight-story .studio-image img {
  display: block;
  max-height: 68vh;
  width: 100%;
  object-fit: contain;
}
.story-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin: 15px 0;
}
.story-dots button {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #394b62;
  font-size: 12px;
}
.story-dots button[aria-pressed='true'] {
  color: #7dbbf7;
}
.story-film {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--story-line);
  border-radius: 16px;
  background: var(--studio-panel, #101722);
}
.story-frame {
  flex: 0 0 112px;
  min-width: 0;
}
.story-frame > button {
  width: 100%;
  aspect-ratio: var(--story-format-ratio, 4 / 5);
  display: grid;
  place-items: center;
  background: #0f1621;
  color: white;
  border: 3px solid transparent;
  border-radius: 10px;
  padding: 2px;
  overflow: hidden;
}
.story-frame > button[aria-pressed='true'] {
  border-color: #58a8fa;
  box-shadow: 0 0 0 2px #7dbbf744;
}
.flight-story .story-frame img {
  display: block;
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}
.story-frame > div {
  display: flex;
  align-items: center;
  gap: 2px;
}
.story-frame small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-size: 11px;
}
.story-frame [data-story-menu] {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 22px;
  padding: 0 3px;
}
.story-frame.is-hidden {
  opacity: 0.4;
}
.story-frame.story-dragging {
  outline: 3px solid #7dbbf7;
  touch-action: none;
}
.story-add {
  flex: 0 0 108px;
  align-self: stretch;
  border: 1px dashed #527399;
  border-radius: 12px;
  background: transparent;
  color: #7dbbf7;
  min-height: 130px;
}
.story-settings {
  border-left: 1px solid var(--story-line);
  background: var(--studio-panel, #1b2534);
  padding: 0;
  min-width: 0;
}
.story-settings > section {
  padding: 20px;
  border-bottom: 1px solid var(--story-line);
}
.story-settings h3 {
  margin: 0 0 20px;
  font-size: 1rem;
}
.story-settings p,
.story-settings small {
  font-size: 0.8rem;
  color: var(--studio-muted, #a3afc0);
}
.flight-story .story-settings .studio-toggle {
  min-height: 28px;
}
.flight-story .story-settings .studio-toggle + .studio-toggle {
  margin-top: 12px;
}
.story-settings label:not(.studio-toggle):not(.studio-metric),
.story-modal label:not(.story-preset) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}
.story-settings input:not([type='checkbox']):not([type='color']),
.story-settings textarea,
.story-settings select,
.story-modal input:not([type='checkbox']):not([type='radio']):not([type='range']),
.story-modal select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--story-line);
  border-radius: 10px;
  background: var(--studio-bg, #101722);
  color: inherit;
}
.story-settings input[type='color'] {
  width: 100%;
  height: 36px;
}
.story-settings .studio-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.story-settings .studio-segmented button {
  flex: 1;
  font-size: 0.8rem;
  padding: 8px;
}
.flight-story button[aria-pressed='true'] {
  border-color: #7dbbf7;
}
.story-settings .studio-segmented button[aria-pressed='true'] {
  background: #30445e;
  color: #fff;
}
.story-settings .studio-background {
  margin: 16px 0;
}
.story-settings .studio-background > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.story-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.story-settings .story-values label {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  font-size: 0.8rem;
}
.flight-story .studio-actions {
  display: flex;
  gap: 8px;
  padding: 18px;
}
.flight-story .studio-actions button {
  flex: 1;
}
.story-mobile-tabs {
  display: none;
}
.story-modal {
  width: min(1100px, calc(100vw - 36px));
  max-height: calc(100dvh - 44px);
  padding: 0;
  border: 1px solid var(--story-line);
  border-radius: 24px;
  background: var(--studio-panel, #1b2534);
  color: var(--studio-text, #e8edf4);
}
.story-modal::backdrop,
.story-zoom::backdrop {
  background: #03070cc9;
}
.story-modal > header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 28px 8px;
}
.story-modal h2 {
  font-size: 1.4rem;
  margin: 0;
}
.story-modal > header button {
  padding: 2px 8px;
  border: 0;
  background: transparent;
  font-size: 28px;
}
.story-modal-body {
  padding: 0 28px 24px;
}
.story-modal > footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid var(--story-line);
}
.story-modal > footer > small,
.story-modal > footer > label {
  margin-right: auto;
  flex: 1;
  font-size: 0.85rem;
}
.story-modal > footer > label {
  flex-direction: row !important;
}
.story-presets {
  display: grid;
  gap: 12px;
}
.story-preset {
  display: grid;
  grid-template-columns: 24px minmax(180px, 0.8fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 16px;
  background: var(--studio-bg, #141e2b);
  border: 2px solid var(--story-line);
  border-radius: 16px;
  cursor: pointer;
  align-items: center;
}
.story-preset:has(input:checked) {
  border-color: #58a8fa;
  background: #203b58;
  color: white;
}
.story-preset:has(input:disabled) {
  opacity: 0.4;
  cursor: default;
}
.story-preset strong small {
  color: #8fddb0;
  border: 1px solid #357356;
  border-radius: 5px;
  padding: 2px 6px;
}
.story-preset p {
  font-size: 0.85rem;
}
.story-preset-thumbs {
  display: flex;
  gap: 5px;
  overflow: hidden;
  margin-bottom: 7px;
}
.story-preset-thumbs img,
.story-preset-thumbs > span {
  width: 54px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 4px;
  background: #101722;
  font-size: 9px;
  color: #a3afc0;
}
.story-chapter-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.story-chapter-types button {
  text-align: left;
  min-height: 145px;
}
.story-chapter-types button[aria-pressed='true'] {
  outline: 2px solid #58a8fa;
  background: #203b58;
  color: white;
}
.story-chapter-types p {
  font-size: 0.8rem;
}
.story-chapter-types small {
  color: #7dbbf7;
}
.story-modal .studio-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.story-range-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
}
.story-range-grid canvas {
  width: 100%;
  border-radius: 14px;
  align-self: stretch;
  object-fit: contain;
}
.story-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.story-quick button {
  padding: 8px 12px;
  border-radius: 24px;
  font-size: 0.8rem;
}
[data-story-range-profile] {
  display: block;
  width: 100%;
  margin: 20px 0 8px;
  border-radius: 10px;
  touch-action: none;
}
.story-range-handles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.story-range-values {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.story-range-values > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  background: #101722;
  color: #e8edf4;
  border-radius: 12px;
  padding: 15px;
}
.story-journal-source {
  padding: 24px;
  border: 1px solid var(--story-line);
  border-radius: 14px;
  white-space: pre-wrap;
  user-select: text;
  line-height: 1.8;
}
.story-menu-actions {
  display: grid;
  gap: 8px;
}
.story-menu-actions .danger {
  color: #ff8585;
}
.story-save-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.story-save-grid a {
  display: grid;
  gap: 8px;
  color: #7dbbf7;
}
.story-save-grid img {
  width: 100%;
  border-radius: 8px;
}
.story-zoom {
  padding: 16px;
  background: #101722;
  max-height: 96dvh;
  border: 1px solid #2b3748;
  border-radius: 16px;
}
.story-zoom img {
  display: block;
  max-height: 84dvh;
  max-width: 90vw;
  object-fit: contain;
  margin-top: 12px;
}
@media (max-width: 1000px) {
  .story-workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .story-stage {
    padding: 16px;
  }
  .story-carousel {
    gap: 8px;
  }
}
@media (max-width: 760px) {
  .story-toolbar {
    padding: 12px 16px;
  }
  .story-toolbar > small,
  .story-toolbar > [data-story-size],
  .story-toolbar > [data-story-download],
  .story-toolbar > [data-story-share] {
    display: none;
  }
  .story-toolbar [data-story-draft] {
    margin-left: auto;
    font-size: 0.7rem;
  }
  .story-workspace {
    display: block;
  }
  .story-stage {
    padding: 14px 0;
  }
  .story-stage > header {
    padding: 0 16px;
    margin-bottom: 14px;
  }
  .story-stage > header > small {
    display: none;
  }
  .story-carousel {
    gap: 6px;
    overflow: hidden;
  }
  .story-carousel > button {
    width: 24px;
    height: 32px;
    border: 0;
    background: transparent;
  }
  .flight-story .studio-preview {
    width: calc(100% - 76px);
  }
  .flight-story .studio-image img {
    max-height: 56dvh;
  }
  .story-film {
    border: 0;
    border-radius: 0;
    padding: 12px 16px;
    gap: 8px;
  }
  .story-frame {
    flex-basis: 64px;
  }
  .story-frame small {
    font-size: 8px;
  }
  .story-frame [data-story-menu] {
    font-size: 18px;
  }
  .story-add {
    flex-basis: 64px;
    min-height: 80px;
    font-size: 10px;
  }
  .story-dots {
    margin: 8px 0;
  }
  .story-settings {
    border: 1px solid var(--story-line);
    border-radius: 24px 24px 0 0;
    position: relative;
    padding-top: 12px;
  }
  .story-settings::before {
    content: '';
    display: block;
    margin: 0 auto 8px;
    height: 4px;
    width: 40px;
    border-radius: 3px;
    background: #536176;
  }
  .story-mobile-tabs {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid var(--story-line);
  }
  .story-mobile-tabs button {
    flex: 1;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--studio-muted, #a3afc0);
    padding: 12px 5px;
    font-weight: 600;
  }
  .story-mobile-tabs [aria-selected='true'] {
    border-bottom: 3px solid #7dbbf7;
    color: var(--studio-text, #e8edf4);
  }
  .story-settings > section {
    display: none;
  }
  .story-settings > section.story-tab-active {
    display: block;
  }
  .story-settings .studio-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--studio-panel, #1b2534);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .story-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .story-modal-body {
    padding: 0 18px 20px;
  }
  .story-modal > header {
    padding: 22px 18px 8px;
  }
  .story-modal > footer {
    padding: 16px 18px;
  }
  .story-preset {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .story-preset > div:last-child {
    grid-column: 2;
  }
  .story-preset-thumbs img,
  .story-preset-thumbs > span {
    width: 40px;
    height: 50px;
  }
  .story-chapter-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-range-grid {
    grid-template-columns: 1fr;
  }
  .story-range-values > div {
    flex-basis: 90px;
  }
  .story-range-grid canvas {
    max-height: 220px;
  }
  .story-modal > footer > small {
    flex-basis: 100%;
  }
}
.flight-story .studio-image {
  position: relative;
}
.flight-story .story-neighbor {
  display: none;
  pointer-events: none;
}
@media (max-width: 760px) {
  .story-carousel {
    position: relative;
    touch-action: pan-y;
  }
  .story-carousel > button,
  .story-carousel > .studio-preview {
    z-index: 1;
  }
  .flight-story .story-neighbor:not([hidden]) {
    display: block;
    position: absolute;
    top: 0;
    width: calc(100% - 76px);
    height: 100%;
    object-fit: contain;
    opacity: 0.4;
  }
  .story-neighbor-before {
    right: calc(100% - 20px);
  }
  .story-neighbor-after {
    left: calc(100% - 20px);
  }
}
.story-chapter-types button > img {
  float: left;
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: 5px;
  margin: 0 12px 8px 0;
}
.story-mobile-position {
  display: none;
}
@media (max-width: 760px) {
  .story-mobile-position {
    display: inline;
    margin-left: auto;
    color: var(--studio-muted);
    font-family: 'IBM Plex Mono', monospace;
  }
  .story-toolbar [data-story-draft] {
    display: none;
  }
}
.flight-story.studio-cropping .studio-image {
  touch-action: none;
  cursor: grab;
  border-radius: 4px;
}
.flight-story.studio-cropping .story-carousel {
  touch-action: none;
}
.flight-story .studio-crop-mobile .studio-preview {
  width: 100%;
  padding: 18px 24px;
  box-sizing: border-box;
}
:root[data-theme='light'] .flight-story [data-story-draft] {
  color: #23784b;
}
:root[data-theme='light'] .flight-story .story-add {
  color: #276daf;
}

/* The series owns its sizing: unrelated share-image rules must not stretch
   neighbors, thumbnail images or the main preview. */
.flight-story .story-neighbor {
  margin: 0;
}
.flight-story .story-carousel {
  min-width: 0;
}
.flight-story .story-carousel > .studio-preview {
  flex: 0 1 min(480px, calc(64dvh * var(--preview-ratio, 0.8)));
  width: min(480px, calc(64dvh * var(--preview-ratio, 0.8)));
  min-width: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.flight-story .story-carousel .studio-image {
  width: 100%;
  max-width: none;
  aspect-ratio: var(--story-format-ratio, 4 / 5);
}
.flight-story .story-carousel [data-story-image] {
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: contain;
}
.flight-story .story-dots {
  min-height: 18px;
  align-items: center;
}
.flight-story .story-dots button {
  flex: 0 0 auto;
  width: 12px;
  height: 18px;
}
.flight-story .story-dots [aria-pressed='true'] {
  width: 24px;
}
.flight-story .story-film {
  flex-shrink: 0;
  align-items: start;
}
@media (min-width: 761px) {
  dialog.flight-share-page:has(.flight-story:not([hidden])) {
    overflow: hidden;
  }
  .share-studio:has(#share-image-panel:not([hidden]) > .flight-story:not([hidden])) {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .share-studio #share-image-panel:has(> .flight-story:not([hidden])) {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .flight-story:not([hidden]) {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .flight-story .story-toolbar {
    flex: none;
  }
  .flight-story .story-workspace {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .flight-story .story-stage {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .flight-story .story-stage > header {
    flex: none;
  }
  .flight-story .story-carousel {
    flex: 1 0 auto;
    min-height: 0;
  }
  .flight-story .story-settings {
    overflow-y: auto;
    min-height: 0;
  }
  .flight-story .story-carousel > .studio-preview {
    flex-basis: min(480px, calc((100dvh - 425px) * var(--preview-ratio, 0.8)));
    width: min(480px, calc((100dvh - 425px) * var(--preview-ratio, 0.8)));
  }
}
@media (max-width: 760px) {
  .flight-story .story-carousel > .studio-preview {
    flex: 0 0 min(calc(100% - 76px), calc(56dvh * var(--preview-ratio, 0.8)));
    width: min(calc(100% - 76px), calc(56dvh * var(--preview-ratio, 0.8)));
  }
  .flight-story .story-neighbor:not([hidden]) {
    width: min(calc(100% - 76px), calc(56dvh * var(--preview-ratio, 0.8)));
  }
}
@media (min-width: 761px) {
  .flight-story .story-carousel {
    flex: 1 1 0;
    min-height: 100px;
  }
  .flight-story .story-carousel > .studio-preview {
    flex-basis: min(480px, calc(var(--story-preview-height, 50dvh) * var(--preview-ratio, 0.8)));
    width: min(480px, calc(var(--story-preview-height, 50dvh) * var(--preview-ratio, 0.8)));
  }
  .flight-story.studio-cropping .story-carousel > .studio-preview {
    flex-basis: min(
      480px,
      calc((var(--story-preview-height, 50dvh) - 100px) * var(--preview-ratio, 0.8))
    );
    width: min(
      480px,
      calc((var(--story-preview-height, 50dvh) - 100px) * var(--preview-ratio, 0.8))
    );
  }
}
.flight-story .story-stage > [data-story-message]:empty {
  display: none;
}

/* Center the icon geometry rather than a text glyph's font baseline. */
.flight-story .story-carousel > button {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  box-sizing: border-box;
}
.flight-story .story-carousel > button > svg {
  display: block;
  flex: none;
}
.flight-story .story-template-menu {
  flex: none;
}
.flight-story .story-template-menu > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  white-space: nowrap;
}
.flight-story .story-template-menu > summary::marker {
  content: '';
}
.flight-story .story-template-menu > summary::-webkit-details-marker {
  display: none;
}
.flight-story .story-template-menu > summary > svg {
  display: block;
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}
.flight-story .story-template-menu[open] > summary > svg {
  transform: rotate(180deg);
}
.flight-story .story-template-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: max-content;
  min-width: 240px;
  max-width: calc(100vw - 48px);
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid var(--story-line);
  border-radius: 12px;
  background: var(--studio-panel);
  box-shadow: 0 12px 32px #0005;
}
.flight-story .story-template-options > button {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  white-space: normal;
}
.flight-story .story-template-options > button:hover {
  background: var(--accent-soft);
}
.flight-story [data-story-setting='format'] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 94px;
}
.flight-story [data-story-setting='format'] > small {
  color: inherit;
  opacity: 0.75;
}

/* The story tile previews this flight as a fan of actual chapter artwork. */
.share-studio [data-template='story'] {
  text-align: left;
}
.share-studio .story-tile-art {
  position: relative;
  isolation: isolate;
  display: block;
  background: radial-gradient(ellipse at 50% 25%, #24446680, transparent 75%), #101722;
}
.share-studio .story-tile-art > .story-tile-count {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  padding: 5px 9px;
  border: 1px solid #475b73;
  border-radius: 20px;
  color: #c6dbf1;
  background: #0b1522e8;
  font:
    11px 'IBM Plex Mono',
    monospace;
}
.share-studio .story-tile-count:empty {
  display: none;
}
.story-tile-fan {
  position: absolute;
  inset: 0;
}
.story-tile-page {
  position: absolute;
  top: 29%;
  width: 52%;
  aspect-ratio: 4 / 5;
  border: 1px solid #ffffff24;
  border-radius: 6px;
  overflow: hidden;
  background: #182535;
  box-shadow: 0 12px 24px #0008;
  transform-origin: 50% 100%;
  transform: rotate(var(--fan-angle));
  transition: transform 180ms ease-out;
}
.story-tile-page:nth-child(1) {
  left: -5%;
  --fan-angle: -13deg;
  --fan-open: -18.85deg;
  --fan-spread: -5%;
  z-index: 1;
}
.story-tile-page:nth-child(2) {
  left: 14%;
  top: 25%;
  --fan-angle: -5deg;
  --fan-open: -7.25deg;
  --fan-spread: -2%;
  z-index: 3;
}
.story-tile-page:nth-child(3) {
  left: 34%;
  top: 21%;
  --fan-angle: 3deg;
  --fan-open: 4.35deg;
  --fan-spread: 1%;
  z-index: 4;
}
.story-tile-page:nth-child(4) {
  left: 58%;
  --fan-angle: 13deg;
  --fan-open: 18.85deg;
  --fan-spread: 5%;
  z-index: 2;
}
.share-studio .story-tile-page > img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}
.share-studio [data-template='story']:is(:hover, :focus-visible) .story-tile-page {
  transform: translateX(var(--fan-spread)) rotate(var(--fan-open));
}
.story-tile-dots {
  position: absolute;
  bottom: 11%;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.story-tile-dots > i {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: #53667e;
}
.story-tile-dots > .is-current {
  width: 16px;
  background: #7dbbf7;
}
.share-studio .story-tile-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.share-studio .story-tile-title > strong {
  margin: 0;
}
.story-tile-new {
  border: 1px solid #377554;
  border-radius: 20px;
  background: #163e2b;
  color: #8fddb0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.story-tile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.story-tile-chips > span {
  padding: 4px 8px;
  border: 1px solid var(--studio-border);
  border-radius: 20px;
  background: var(--studio-bg);
  color: var(--studio-muted);
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .share-studio [data-template='story'] .story-tile-page {
    transition: none;
  }
  .share-studio [data-template='story']:is(:hover, :focus-visible) .story-tile-page {
    transform: rotate(var(--fan-angle));
  }
}

/* Public flight link from the template overview. */
.share-studio .studio-flight-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--border, #2c394b);
  background: var(--light-inset, #151e2a);
  cursor: pointer;
}
.studio-flight-link-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  color: #80bfff;
  background: #203750;
}
.studio-flight-link-icon svg {
  width: 22px;
  height: 22px;
}
.studio-flight-link-copy {
  flex: 1;
}
.share-studio .studio-flight-link small {
  margin-top: 4px;
}
.studio-flight-link-action {
  flex-shrink: 0;
  padding: 12px 18px;
  border: 1px solid var(--border, #2c394b);
  border-radius: 12px;
}
.share-studio .studio-flight-link:hover .studio-flight-link-action {
  border-color: #80bfff;
}
@media (max-width: 600px) {
  .share-studio .studio-flight-link {
    flex-wrap: wrap;
    gap: 12px;
  }
  .studio-flight-link-copy {
    flex-basis: calc(100% - 60px);
  }
  .studio-flight-link-action {
    margin-left: 56px;
  }
}

/* Navigation in the enlarged story preview. */
.story-zoom-stage {
  position: relative;
  touch-action: pan-y;
}
.share-flight-card .story-zoom-stage img {
  width: auto;
  height: auto;
  max-width: min(76vw, 1080px);
  max-height: 78dvh;
  margin: 12px auto 0;
  user-select: none;
}
.story-zoom-stage > button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #42516a;
  border-radius: 50%;
  background: #16202eee;
  color: #e8edf4;
  cursor: pointer;
}
.story-zoom-stage > button:first-child {
  left: 8px;
}
.story-zoom-stage > button:last-child {
  right: 8px;
}
.story-zoom-stage > button svg {
  width: 20px;
  height: 20px;
}
.story-zoom-stage > button:disabled {
  opacity: 0.35;
  cursor: default;
}
.story-zoom [data-story-zoom-position] {
  text-align: center;
  margin: 10px 0 0;
  color: #a3afc0;
}

/* Keep flight sharing scroll inside its modal, not the flight list behind it. */
html:has(dialog.flight-share-page[open]),
body:has(dialog.flight-share-page[open]) {
  overflow: hidden;
}
dialog.flight-share-page {
  width: 100%;
  max-width: 100%;
  overscroll-behavior: contain;
  overflow-x: hidden;
}
@media (min-width: 1001px) {
  .share-studio .studio-picker .studio-thumb {
    /* Leave room for the header, descriptions and public-link strip. */
    max-height: clamp(180px, calc(100dvh - 420px), 520px);
  }
  .share-studio .studio-picker .studio-thumb:not(.story-tile-art) img {
    object-fit: contain;
  }
}

.story-metric-groups {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.flight-story .story-settings fieldset.studio-metric-group {
  min-width: 0;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
}
.flight-story .story-settings .studio-metric-group label.studio-metric {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  padding: 3px 0;
  font-size: 12px;
  line-height: 1.35;
}
.story-settings .studio-metric output {
  max-width: 100px;
  text-align: right;
  font-size: 11px;
}
.story-settings .story-metric-picker .studio-chips {
  gap: 6px;
  margin-bottom: 14px;
}
.story-settings .story-metric-picker .studio-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: grab;
}
.story-settings .story-metric-picker .studio-chips button {
  padding: 3px;
  border: 0;
  background: transparent;
}

.flight-story .story-metric-picker input[type='checkbox'][role='switch'] {
  flex: none;
  box-sizing: border-box;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  align-self: center;
  margin: 0;
}
.flight-story .story-metric-picker .studio-metric > span {
  min-width: 0;
}
.flight-story .story-metric-picker .studio-metric > output {
  justify-self: end;
}

/* Space chapter content and separate the output section. */
.story-settings [data-story-text]:not(:empty) {
  margin-bottom: 24px;
}
.story-settings .studio-photo-options {
  margin-block: 20px;
  gap: 14px;
}
.story-settings [data-story-metrics]:not(:empty) {
  margin-top: 24px;
}
.story-settings .story-metric-picker > p {
  margin: 0 0 12px;
  line-height: 1.5;
}
.story-settings .story-metric-picker .studio-chips {
  margin-bottom: 20px;
}
.story-settings > [data-story-panel='1'] {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--story-line);
}
.story-settings > [data-story-panel='3'] {
  padding-top: 24px;
}

.story-modal > footer > label.story-remember-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex: 1 0 auto;
  margin: 0 auto 0 0;
}
.story-modal .story-remember-toggle > span {
  white-space: nowrap;
}
.share-studio .story-remember-toggle input[type='checkbox'][role='switch'] {
  flex: 0 0 38px;
  box-sizing: border-box;
  width: 38px;
  min-width: 38px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
}
@media (max-width: 480px) {
  .story-modal > footer > label.story-remember-toggle {
    flex-basis: 100%;
  }
  .story-modal .story-remember-toggle > span {
    white-space: normal;
  }
}

.story-template-options .story-named-row {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--story-line);
}
.story-template-options .story-named-row > button:first-child {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
}
.story-template-options .story-named-row > button:last-child {
  flex: 0 0 44px;
  color: #ff9494;
  text-align: center;
}
.flight-story .story-template-options {
  max-height: min(60dvh, 540px);
  overflow-y: auto;
}

.story-toolbar [data-story-save-draft] {
  background: #2475ce;
  color: #fff;
}

/* Size the enlarged artwork to the dialog's content box in both dimensions. */
.flight-story dialog.story-zoom {
  box-sizing: border-box;
  width: min(96vw, calc((96dvh - 140px) * var(--story-zoom-ratio, 0.8) + 34px), 1114px);
  max-width: 96vw;
  max-height: 96dvh;
  padding: 16px;
  overflow: auto;
}
.flight-story .story-zoom-stage {
  width: 100%;
  min-width: 0;
  aspect-ratio: var(--story-zoom-ratio, 0.8);
  margin-top: 12px;
}
.share-studio .flight-story .story-zoom-stage > img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
}

/* Replay map thumbnails match the gallery map markers. */
.map-photo-marker {
  height: 44px;
  padding: 0;
  border: 3px solid #000;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 4px 12px #0005;
}
.map-photo-marker :is(img, video) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.replay-spatial-photo {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 3px solid #000;
  pointer-events: auto;
}
.replay-spatial-photo[hidden] {
  display: none;
}
.gallery-highlight-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.gallery-media-swiper {
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y;
}
.gallery-media-swiper .swiper-wrapper {
  display: flex;
  height: 100%;
}
.gallery-media-swiper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}
.gallery-media-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  border-radius: 0;
  box-shadow: none;
}
.gallery-media-frame :is(.swiper-zoom-container, .gallery-video-surface) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.gallery-media-frame :is(img, video, iframe) {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border: 0;
}
.gallery-media-frame [hidden] {
  display: none;
}
.gallery-video-placeholder {
  color: #fff;
  font-size: 24px;
}
.gallery-video-surface {
  position: relative;
}
.gallery-stage :is(.gallery-prev, .gallery-next) {
  z-index: 3;
}
.gallery-filmstrip {
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.gallery-filmstrip button {
  flex-shrink: 0;
  scroll-snap-align: center;
}
.gallery-highlights {
  overflow: hidden;
  padding: 20px 0;
}
.gallery-highlights > .swiper {
  overflow-x: auto;
  padding: 16px 0 28px;
}
.gallery-highlights .swiper-wrapper {
  display: flex;
}
.gallery-highlights .swiper-slide {
  flex-shrink: 0;
  width: min(72vw, 430px);
}
.gallery-highlights .gallery-tile {
  margin: 0 12px;
  border: 0;
  border-radius: 3px;
}
.gallery-highlights [data-media-navigation='swiper'] {
  overflow: hidden;
}
@media (max-width: 700px) {
  .gallery-media-swiper {
    height: 48dvh;
  }
}

.photo-viewer .photo-viewer-swiper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
}
.photo-viewer-swiper .swiper-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}
.photo-viewer-swiper .swiper-slide {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}
.photo-viewer .photo-viewer-swiper :is(img, video, iframe) {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 0;
}
.photo-viewer .photo-viewer-swiper [hidden] {
  display: none;
}
.photo-viewer
  :is(.photo-viewer-prev, .photo-viewer-next, .photo-viewer-toolbar, .photo-viewer-error) {
  z-index: 2;
}
.photo-viewer-prev .icon {
  transform: rotate(180deg);
}
.photo-viewer-video-preview {
  color: #fff;
  font-size: 24px;
}

/* Bound both image dimensions to the stage, even after Swiper's CSS loads. */
.photo-viewer .photo-viewer-swiper img {
  position: static;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.photo-viewer .photo-viewer-toolbar button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 5px;
}

.photo-viewer-fullscreen {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: calc(max(12px, env(safe-area-inset-right)) + 40px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 1px solid #ffffff4d;
  border-radius: 50%;
  background: #0a121ccc;
  color: white;
  cursor: pointer;
}
.photo-viewer-fullscreen svg {
  width: 100%;
  height: 100%;
}
.photo-viewer-fullscreen:focus-visible {
  outline: 2px solid #80bdf5;
  outline-offset: 3px;
}
dialog.photo-viewer.photo-viewer-fullscreen-active {
  inset: 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
}

/* Fullscreen fits the entire original photo; differing screen ratios leave bars. */
.photo-viewer.photo-viewer-fullscreen-active .photo-viewer-swiper img {
  object-fit: contain;
  object-position: center;
}

/* Letterboxing stays black in both the regular and fullscreen photo viewer. */
dialog.photo-viewer,
.photo-viewer .photo-viewer-swiper,
.photo-viewer .photo-viewer-swiper .swiper-slide {
  background: #000;
}

/* In fullscreen the single X exits fullscreen; the viewer stays open. */
.photo-viewer-fullscreen-active .photo-viewer-close {
  display: none;
}
.photo-viewer-fullscreen-active .photo-viewer-fullscreen {
  right: max(12px, env(safe-area-inset-right));
}

/* The gallery media surface is borderless; its thumbnail strip stays separate. */
.gallery-stage,
.gallery-media-swiper,
.gallery-media-swiper .swiper-slide {
  background: #000;
}

/* Design 32: one full media surface, glass controls and an always-visible timeline. */
.detail-dialog .replay-media.replay-media-immersive,
.detail-dialog.replay-expanded.replay-media-paused .replay-media.replay-media-immersive,
.replay-media.replay-media-immersive {
  position: absolute;
  inset: 0;
  translate: none;
  transform: none;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: inherit;
  background: #000;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  container-type: size;
}
.detail-dialog .replay-media.replay-media-immersive > .rmi-background,
.replay-media.replay-media-immersive > .rmi-background {
  position: absolute;
  inset: -36px;
  width: calc(100% + 72px);
  height: calc(100% + 72px);
  max-height: none;
  object-fit: cover;
  filter: blur(32px) brightness(0.38) saturate(1.1);
  pointer-events: none;
}
.replay-media-immersive .rmi-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: pan-y;
  z-index: 1;
}
.rmi-stage .swiper-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}
.rmi-stage .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.replay-media-immersive .replay-media-player,
.rmi-stage .swiper-zoom-container {
  width: 100%;
  height: 100%;
}
.replay-media-immersive .replay-media-player {
  position: relative;
}
.detail-dialog .replay-media.replay-media-immersive .replay-media-player :is(img, video, iframe),
.replay-media.replay-media-immersive .replay-media-player :is(img, video, iframe) {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}
.replay-media-immersive .swiper-zoom-container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.replay-media-immersive .rmi-gradient {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s;
}
.rmi-top-gradient {
  top: 0;
  height: 100px;
  background: linear-gradient(#0008, transparent);
}
.rmi-bottom-gradient {
  bottom: 0;
  height: 180px;
  background: linear-gradient(transparent, #000b);
}
.replay-media-immersive .media-ui {
  z-index: 3;
  transition: opacity 0.2s;
}
.rmi-top {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.rmi-top-left,
.rmi-top-right {
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}
.replay-media-immersive .rmi-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  background: #0b10189e;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #ffffff24;
  border-radius: 999px;
  color: white;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.replay-media-immersive .replay-media-counter {
  position: static;
  font-variant-numeric: tabular-nums;
}
.rmi-top-right .rmi-glass {
  width: 40px;
  padding: 10px;
}
.rmi-top-right svg {
  width: 18px;
  height: 18px;
}
.rmi-top-right [data-rmi='menu'] {
  font-size: 24px;
  line-height: 1;
}
.rmi-menu {
  position: absolute;
  top: 62px;
  right: 16px;
  width: min(330px, calc(100% - 32px));
  padding: 6px;
  border: 1px solid #ffffff29;
  border-radius: 14px;
  background: #172131ed;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 35px #0006;
}
.replay-media-immersive .rmi-menu > :is(button, label) {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0;
  background: transparent;
  color: #eef3fa;
  text-align: left;
  font-size: 13px;
}
.rmi-menu button:hover {
  background: #ffffff12;
}
.rmi-menu select {
  display: block;
  width: 100%;
  padding: 6px;
  margin: 6px 0 0;
  background: #101722;
  color: white;
  border: 1px solid #ffffff29;
}
.rmi-bottom {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 28px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}
.rmi-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-shadow: 0 1px 8px #0009;
}
.replay-media-immersive .rmi-route {
  width: 86px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 12px;
  padding: 3px;
  cursor: default;
}
.rmi-route svg {
  width: 100%;
  height: 100%;
}
.rmi-clock {
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rmi-facts {
  max-width: 65ch;
  margin-top: 3px;
  color: #d1dae7;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.replay-media-immersive .rmi-status {
  margin: 4px 0 0;
  color: #e0e8f4;
  font-size: 12px;
}
.rmi-status:empty {
  display: none;
}
.replay-media-immersive .rmi-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 15px 6px 7px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: #2470c8;
  color: white;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}
.rmi-continue kbd {
  font-size: 10px;
  opacity: 0.7;
  font-family: inherit;
}
.rmi-ring {
  position: relative;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.rmi-ring svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #ffffff50;
  stroke-width: 3;
  transform: rotate(-90deg);
}
.rmi-ring .rmi-ring-value {
  stroke: white;
  stroke-dasharray: 100;
  stroke-linecap: round;
}
.rmi-ring > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.rmi-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px !important;
  padding: 0 !important;
  width: 40px;
}
.rmi-arrow[data-rmi='previous'] {
  left: 16px;
}
.rmi-arrow[data-rmi='next'] {
  right: 16px;
}
.rmi-arrow:disabled {
  opacity: 0.3;
}
.rmi-timeline {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: max(12px, env(safe-area-inset-bottom));
  height: 4px;
  background: #ffffff40;
  border-radius: 999px;
  z-index: 5;
}
.rmi-timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #80bdf5;
  border-radius: inherit;
  pointer-events: none;
}
.replay-media-immersive .rmi-stop {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.rmi-stop::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 3px;
  background: #ffffff88;
}
.rmi-stop[aria-current='true']::after {
  background: white;
}
.rmi-stop-video::after {
  border-radius: 50%;
}
.replay-media-immersive .rmi-rotate-hint {
  display: none;
}
.rmi-controls-hidden .media-ui,
.rmi-controls-hidden .rmi-gradient {
  opacity: 0;
  pointer-events: none;
}
.replay-media-immersive.rmi-portrait .rmi-stage {
  width: calc(100% - 280px);
}
.rmi-portrait .rmi-bottom {
  left: auto;
  width: 244px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  flex-direction: column;
  align-items: flex-start;
}
.rmi-portrait .rmi-info {
  flex-direction: column;
  align-items: flex-start;
}
.rmi-portrait .rmi-route {
  width: 100%;
  height: 100px;
}
.rmi-portrait .rmi-clock {
  font-size: 24px;
}
.detail-dialog .replay-media.replay-media-immersive.rmi-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
}
.replay-media-immersive [hidden] {
  display: none !important;
}
.replay-media-immersive button:focus-visible,
.replay-media-immersive select:focus-visible {
  outline: 2px solid #80bdf5;
  outline-offset: 3px;
}
@container (max-width: 600px) {
  .rmi-back-label,
  .rmi-top [data-rmi='fullscreen'],
  .rmi-continue kbd {
    display: none;
  }
  .rmi-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .rmi-continue {
    width: 100%;
  }
  .rmi-facts {
    font-size: 11px;
  }
  .rmi-clock {
    font-size: 20px;
  }
  .rmi-top {
    left: 12px;
    right: 12px;
  }
  .replay-media-immersive .rmi-rotate-hint {
    display: block;
    position: absolute;
    left: 50%;
    top: 64%;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 5px 10px;
    background: #0b1018aa;
    font-size: 11px;
    white-space: nowrap;
  }
}
@container (max-height: 360px) {
  .rmi-route,
  .rmi-continue kbd,
  .rmi-rotate-hint {
    display: none !important;
  }
  .rmi-top {
    top: 8px;
  }
  .rmi-bottom {
    flex-direction: row;
    align-items: flex-end;
    bottom: 28px;
  }
  .rmi-continue {
    width: auto;
    font-size: 12px;
  }
  .rmi-clock {
    font-size: 18px;
  }
  .rmi-facts {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .replay-media-immersive .media-ui,
  .replay-media-immersive .rmi-gradient {
    transition: none;
  }
}

.detail-dialog.replay-expanded.replay-media-paused
  .replay-media.replay-media-immersive.rmi-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
}
.replay-media-immersive.rmi-is-video .rmi-bottom {
  bottom: 82px;
}
.detail-dialog
  .replay-media.replay-media-immersive.rmi-is-video
  .replay-media-player
  :is(video, iframe) {
  bottom: 22px;
  height: calc(100% - 22px);
}

/* Fullscreen media owns playback controls; restore the flight player on return. */
dialog.detail-dialog.replay-expanded .detail-map:has(> .replay-media-immersive) > .replay-player,
.detail-map:has(> .replay-media-immersive.rmi-fullscreen) > .replay-player {
  display: none;
}

/* Click-opened media uses the same immersive surface, inside its own modal. */
dialog.flight-media-viewer {
  position: fixed;
  inset: 4px;
  width: calc(100vw - 8px);
  height: calc(100dvh - 8px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #263244;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.flight-media-viewer::backdrop {
  background: #000d;
}
.flight-media-viewer .replay-media.replay-media-immersive.rmi-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
}

/* Public replay uses the same compact grid and controls as the app replay. */
#public-flight .public-player .replay-player {
  display: grid;
  grid-template-columns: 44px 125px minmax(0, 1fr) 72px 38px;
  grid-template-rows: 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 18px;
  background: rgba(15, 24, 29, 0.78);
  backdrop-filter: blur(12px);
  color: #e8edf4;
}
#public-flight .public-player .replay-actions {
  display: contents;
}
#public-flight .public-player .replay-actions > * {
  display: none !important;
}
#public-flight .public-player .replay-actions > [data-replay-toggle] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 1;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #2472cc;
}
#public-flight .public-player .replay-actions > [data-replay-clock] {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  font-family: 'Geist Mono', monospace;
}
#public-flight .public-player .replay-clock-primary strong {
  font-size: 16px;
}
#public-flight .public-player [data-replay-clock-progress] {
  display: block;
  font-size: 11px;
}
#public-flight .public-player [data-replay-clock-zone],
#public-flight .public-player .replay-toggle-label {
  display: none;
}
#public-flight .public-player .public-replay-profile {
  display: block;
  position: relative;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  height: 44px;
}
#public-flight .public-player .replay-compact-tempo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px;
  border: 1px solid #ffffff12;
  border-radius: 8px;
  background: #ffffff12;
  color: #e8edf4;
  font-size: 13px;
}
#public-flight .public-player .public-profile-toggle {
  display: block;
  grid-column: 5;
  grid-row: 1;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: #ffffff12;
  color: #e8edf4;
}
#public-flight .public-player [data-replay-charts] {
  grid-column: 3;
  grid-row: 2;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
}
#public-flight.public-profile-open .public-player .replay-player {
  grid-template-rows: 32px minmax(100px, 18dvh);
}
#public-flight.public-profile-open .public-replay-profile {
  display: none;
}
#public-flight.public-profile-open .public-player .replay-actions > [data-replay-toggle],
#public-flight.public-profile-open .public-player .replay-actions > [data-replay-clock],
#public-flight.public-profile-open .public-player .replay-compact-tempo,
#public-flight.public-profile-open .public-player .public-profile-toggle {
  grid-row: 2;
}
#public-flight .public-player [data-replay-charts] .flight-chart-frame,
#public-flight .public-player [data-replay-charts] .flight-chart-plot,
#public-flight .public-player [data-replay-charts] .altitude {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#public-flight .public-player [data-replay-charts] .chart-title,
#public-flight .public-player [data-replay-charts] .chart-axis-labels,
#public-flight .public-player [data-replay-charts] .flight-chart-legend,
#public-flight .public-player [data-replay-charts] .chart-summary,
#public-flight .public-player [data-replay-charts] .chart-data-note {
  display: none;
}
#public-flight .public-player .public-media-markers {
  inset: 0;
}
#public-flight .public-player .public-media-markers button {
  top: -7px;
}
#public-flight .public-player .public-media-markers button:after {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
#public-flight.replay-expanded .detail-map {
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border-radius: 0;
}
#public-flight.replay-expanded .detail-map > .geo-map-wrap,
#public-flight .detail-map:fullscreen > .geo-map-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}
#public-flight.replay-expanded .detail-map .geo-map,
#public-flight .detail-map:fullscreen .geo-map,
#public-flight.replay-expanded [data-replay-3d] {
  width: 100%;
  height: 100%;
}
#public-flight.replay-expanded .detail-map > .replay-player {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  width: auto;
  max-height: calc(100dvh - 100px);
  margin: 0;
  overflow: auto;
}
#public-flight .detail-map > .public-map-fullscreen {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: auto;
  z-index: 470;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  background: rgba(15, 24, 29, 0.78);
  border: 0;
  border-radius: 50%;
}
#public-flight .public-map-toolbar {
  top: 16px;
  left: auto;
  right: 72px;
}
#public-flight .public-player .replay-values {
  top: 16px;
  left: 16px;
  right: auto;
  bottom: auto;
  max-width: calc(100% - 390px);
  padding: 10px 14px;
  gap: 22px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 24, 29, 0.78);
}
#public-flight .public-player .replay-values strong {
  font-family: 'Geist Mono', monospace;
  font-size: 18px;
}
#public-flight .public-player .replay-values span {
  font-size: 9px;
  text-transform: uppercase;
}
#public-flight .public-player .replay-values span:nth-child(3) {
  order: 3;
}
#public-flight .public-player .replay-values span:nth-child(4) {
  order: 2;
}
#public-flight .public-player .replay-values span:nth-child(5) {
  order: 4;
}
#public-flight .public-player .replay-values span:nth-child(3) strong {
  color: #e8edf4;
}
#public-flight .public-player .replay-values span:nth-child(4) {
  display: block;
}
#public-flight.replay-expanded .public-next {
  bottom: calc(var(--public-player-height, 84px) + 32px);
}
#public-flight.replay-expanded .leaflet-control-zoom {
  margin-bottom: calc(var(--public-player-height, 84px) + 32px);
}
#public-flight.replay-expanded .detail-map:has(> .replay-media-immersive) > .replay-player {
  visibility: hidden;
  pointer-events: none;
}
.public-flight .replay-media-immersive [data-rmi='menu'] {
  display: none;
}
@media (max-width: 760px) {
  #public-flight .public-player .replay-player {
    grid-template-columns: 36px 96px minmax(0, 1fr) 48px 32px;
    gap: 6px;
    padding: 8px;
  }
  #public-flight .public-player .replay-actions > [data-replay-toggle] {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 10px;
  }
  #public-flight .public-player .replay-clock-primary strong {
    font-size: 12px;
  }
  #public-flight .public-player [data-replay-clock-progress] {
    font-size: 9px;
  }
  #public-flight .public-player .public-profile-toggle {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
  }
  #public-flight .public-player .replay-values {
    top: 76px;
    max-width: calc(100% - 32px);
    gap: 16px;
  }
  #public-flight .public-player .replay-values strong {
    font-size: 16px;
  }
  #public-flight.replay-expanded .detail-map > .replay-player {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}
#public-flight .public-player [data-replay-toggle] svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
#public-flight .public-player .replay-values strong {
  white-space: nowrap;
}
#public-flight .public-player .replay-values {
  flex-wrap: wrap;
}

/* Public photo fullscreen includes the image, navigation and playback controls. */
.public-lightbox:has(.replay-media-immersive.rmi-fullscreen) {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.public-lightbox .replay-media.replay-media-immersive.rmi-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
}

/* Outside fullscreen, use the app's full replay dock and metric charts. */
#public-flight:not(.public-redesign):not(.replay-expanded) .public-player .replay-player {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .public-player .replay-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  .replay-actions
  > [data-replay-start],
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  .replay-actions
  > [data-replay-end],
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  .replay-actions
  > .replay-compact-tempo,
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  .replay-actions
  > .public-chart-buttons {
  display: inline-flex !important;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .public-player [data-replay-start],
#public-flight:not(.public-redesign):not(.replay-expanded) .public-player [data-replay-end] {
  min-width: 36px;
  width: 36px;
  height: 44px;
  padding: 8px;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .public-player .replay-compact-tempo {
  width: 72px;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  .replay-actions
  > [data-replay-clock] {
  flex: 0 0 auto;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .public-replay-profile,
#public-flight:not(.public-redesign):not(.replay-expanded) .public-profile-toggle {
  display: none;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .public-replay-timeline {
  display: block;
  position: relative;
  width: 100%;
  margin: 0;
}
#public-flight:not(.public-redesign) .public-chart-buttons {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
#public-flight:not(.public-redesign) .public-chart-buttons button {
  border: 1px solid #334152;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: #b9cadd;
  cursor: pointer;
  white-space: nowrap;
}
#public-flight:not(.public-redesign) .public-chart-buttons button[aria-pressed='true'] {
  border-color: #4382b8;
  background: #203752;
  color: #d3e7fa;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .public-player [data-replay-charts] {
  height: auto;
  margin-top: 16px;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .chart-title {
  display: flex;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .chart-axis-labels,
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .chart-summary,
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .chart-data-note {
  display: block;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .flight-chart-legend {
  display: flex;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .flight-chart-frame {
  height: auto;
  border: 1px solid #334152;
  border-radius: 14px;
  background: #121925;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .public-player
  [data-replay-charts]
  .altitude {
  height: 260px;
  min-height: 220px;
}
#public-flight:not(.public-redesign).replay-expanded .public-replay-timeline,
#public-flight:not(.public-redesign).replay-expanded .flight-segment-legend {
  display: none;
}
#public-flight:not(.public-redesign).replay-expanded .flight-segment-strip {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  height: 4px;
  margin: 0;
  z-index: 3;
}
#public-flight:not(.public-redesign).replay-expanded.public-profile-open .flight-segment-strip {
  grid-row: 2;
  margin-left: 8.87%;
  margin-right: 4.84%;
}
#public-flight:not(.public-redesign).replay-expanded .public-chart-buttons {
  display: none;
}
#public-flight:not(.public-redesign).replay-expanded.public-profile-open .public-chart-buttons {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
@media (max-width: 760px) {
  #public-flight:not(.public-redesign):not(.replay-expanded) .public-player .public-chart-buttons {
    flex-basis: 100%;
    justify-content: end;
  }
}
#public-flight:not(.public-redesign):not(.replay-expanded) .replay-player > .replay-actions {
  order: 0;
}
#public-flight:not(.public-redesign):not(.replay-expanded)
  .replay-player
  > .public-replay-timeline {
  order: 1;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .replay-player > .flight-segment-strip {
  order: 2;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .replay-player > .flight-segment-legend {
  order: 3;
}
#public-flight:not(.public-redesign):not(.replay-expanded) .replay-player > [data-replay-charts] {
  order: 4;
}

/* Public 3D topo fills the map surface instead of inheriting the preview height. */
#public-flight .detail-map > [data-replay-3d] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
#public-flight .detail-map > [data-replay-3d] > .terrain-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
}
#public-flight [data-replay-3d] > .terrain-load {
  position: absolute;
  left: 16px;
  bottom: calc(var(--public-player-height, 84px) + 40px);
  z-index: 2;
  max-width: calc(100% - 32px);
  padding: 6px 10px;
  border-radius: 8px;
  background: #121925dd;
  color: #e8edf4;
}
#public-flight [data-replay-3d] > .terrain-reference,
#public-flight [data-replay-3d] > [data-imagery-focus],
#public-flight [data-replay-3d] > [data-detail-retry],
#public-flight [data-replay-3d] > [data-detail-status] {
  display: none;
}
#public-flight [data-replay-3d] > .terrain-credits {
  position: absolute;
  right: 12px;
  bottom: 0;
  z-index: 4;
  max-width: min(560px, calc(100% - 24px));
  max-height: 40%;
  overflow: auto;
  padding: 4px 8px;
  background: #121925dd;
  color: #e8edf4;
  font-size: 10px;
}

/* MapLibre owns the map canvas; flight symbols and photos share its projection. */
.maplibre-stage .maplibregl-canvas {
  outline: none;
}
.maplibre-spatial-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 4;
}
.maplibre-stage .maplibregl-ctrl-attrib {
  max-width: min(100%, 640px);
  font-size: 10px;
  line-height: 1.3;
  background: rgb(255 255 255 / 88%);
  color: #18232d;
}
.maplibre-stage .maplibregl-ctrl-attrib a {
  color: #18232d;
}
.detail-dialog .maplibre-stage .maplibregl-ctrl-top-right {
  top: 65px;
}
.detail-dialog.replay-media-paused .maplibregl-ctrl-top-right {
  visibility: hidden;
}

/* Reuse the fullscreen view dropdown in the regular replay layout. The hidden
   source buttons still supply the existing desktop and mobile event handlers. */
.detail-dialog:has(.replay-view-menu) .flight-map-modes {
  display: none !important;
}
.detail-dialog:not(.replay-expanded):not(.replay-mobile-portrait) .replay-view-menu {
  display: block;
  position: absolute;
  top: 14px;
  left: 14px;
  right: auto;
  z-index: 1200;
  max-width: calc(100% - 140px);
  color: #e8edf4;
  --replay-glass: rgb(15 22 33 / 92%);
}
.detail-dialog:not(.replay-expanded) .replay-view-menu > summary {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.detail-dialog:not(.replay-expanded) .replay-view-panel {
  left: 0;
  right: auto;
  width: max-content;
  max-width: min(300px, calc(100vw - 50px));
}
.replay-view-panel {
  max-height: min(420px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
:root[data-theme='light'] .detail-dialog:not(.replay-expanded) .replay-view-menu > summary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}

/* The public replay shares one native view selector in normal and fullscreen mode. */
#public-flight .public-map-toolbar {
  max-width: min(260px, calc(100% - 88px));
}
.public-map-toolbar > select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #303e50;
  border-radius: 12px;
  background: #151d2a;
  color: #e8edf4;
  font: inherit;
  font-size: 13px;
}
:root[data-theme='light'] .public-map-toolbar > select {
  background: var(--solid);
  color: var(--text);
  border-color: var(--border);
}

/* Leave room for the public view selector and fullscreen close control. */
#public-flight .maplibre-stage .maplibregl-ctrl-top-right {
  top: 76px;
}

/* Öffentlicher Fluglink */
.flink-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 500px) minmax(0, 760px);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 28px 56px;
  max-width: 1440px;
  margin: auto;
  color: var(--text, #e8edf4);
}
.flink-workspace [hidden] {
  display: none;
}
.flink-preview {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: 24px;
  min-width: 0;
}
.flink-hero,
.flink-state {
  grid-column: 2;
  grid-row: 1;
}
.flink-settings {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 28px;
  min-width: 0;
}
.flink-workspace h3 {
  margin: 0 0 14px;
  font-size: 16px;
}
.flink-workspace small {
  color: #91a0b3;
  font-size: 13px;
  line-height: 1.5;
}
.flink-workspace header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.flink-workspace header h3 {
  margin: 0;
}
.flink-hero,
.flink-state,
.flink-options,
.flink-message {
  background: #151e2a;
  border: 1px solid #2c3849;
  border-radius: 18px;
}
.flink-hero {
  padding: 28px;
  background: linear-gradient(130deg, #1f3550, #151e2a 55%);
}
.flink-hero > small {
  font-weight: 700;
  letter-spacing: 0.12em;
}
.flink-hero h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.2;
  margin: 12px 0 24px;
}
.flink-hero dl {
  margin: 0 0 24px;
}
.flink-hero dt {
  font-weight: 700;
  margin-top: 16px;
}
.flink-hero dd {
  color: #a3afc0;
  margin: 4px 0 0 22px;
}
.flink-hero > div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.flink-state {
  padding: 22px;
}
.flink-state.is-active {
  background: linear-gradient(120deg, #132b23, #151e2a 80%);
  border-color: #286747;
}
.flink-state.is-active header strong {
  color: #83d4a6;
}
.flink-state.is-expired {
  background: #282215;
  border-color: #806226;
}
.flink-state.is-expired header strong {
  color: #f2b544;
}
.flink-state header {
  flex-wrap: wrap;
}
.flink-copy {
  display: flex;
  gap: 8px;
}
.flink-copy input {
  min-width: 0;
  flex: 1;
  font-family: ui-monospace, monospace;
  background: #0e1520;
  color: #e8edf4;
  border: 1px solid #2c3849;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px;
  cursor: text;
}
.flink-copy .btn {
  white-space: nowrap;
}
.flink-state.is-paused input {
  text-decoration: line-through;
  border-style: dashed;
  color: #8a99ac;
}
.flink-state > p {
  font-size: 13px;
  color: #83d4a6;
  margin: 12px 0 0;
}
.flink-state > p:empty {
  display: none;
}
.flink-reactivate {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.flink-workspace .is-copied {
  background: #1c6544;
  color: white;
  border-color: #1c6544;
}
.flink-preview-frame {
  padding: 18px;
  border: 1px solid #2c3849;
  border-radius: 22px;
  background: #0e151f;
  margin-bottom: 14px;
}
.flink-preview .share-chat {
  max-width: none;
  border-radius: 16px;
}
.flink-preview .share-chat p {
  background: #203650;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.flink-preview-note {
  display: block;
  text-align: right;
  margin-top: 10px;
}
.flink-preview > a {
  font-size: 14px;
  font-weight: 400;
  color: #7dbbf7;
  text-decoration: none;
}
.flink-desktop-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 20px;
}
.flink-desktop-open svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.flink-desktop-open small {
  font-size: inherit;
  color: #a3afc0;
}
.flink-preview > a:hover .flink-desktop-open > span {
  text-decoration: underline;
}
.flink-address {
  display: block;
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  margin: 0 0 16px;
}
.flink-preview .share-validity button {
  min-height: 40px;
  padding: 6px 12px;
  white-space: nowrap;
}
.flink-options {
  overflow: hidden;
}
.flink-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  min-height: 72px;
  border-bottom: 1px solid #2c3849;
  margin: 0;
}
.flink-row:last-child {
  border-bottom: 0;
}
.flink-row > span:first-child {
  flex: 1;
  min-width: 0;
}
.flink-row strong,
.flink-row small {
  display: block;
}
.flink-row > small {
  white-space: nowrap;
}
.flink-row > .btn {
  padding: 0;
  background: transparent;
  border: 0;
  color: #7dbbf7;
}
.flink-row input[role='switch'] {
  appearance: none;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 20px;
  background: #303e50;
  cursor: pointer;
  position: relative;
  margin: 0;
}
.flink-row input[role='switch']::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
}
.flink-row input[role='switch']:checked {
  background: #2470c8;
}
.flink-row input[role='switch']:checked::after {
  transform: translateX(18px);
}
.flink-row input:disabled {
  opacity: 0.45;
  cursor: default;
}
.flink-thumbs {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}
.flink-thumbs > * {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: cover;
  border-radius: 6px;
  overflow: hidden;
}
.flink-thumbs .flink-thumbnail img,
.flink-thumbs .flink-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.flink-thumbs > span {
  display: grid;
  place-items: center;
  background: #273449;
  font-size: 12px;
}
.flink-message {
  padding: 14px;
}
.flink-message header {
  margin: 0;
}
.flink-message .btn {
  border: 0;
  background: none;
  padding: 4px;
  color: #7dbbf7;
  font-size: 12px;
}
.flink-message textarea {
  width: 100%;
  resize: vertical;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 10px 0;
}
.flink-settings .share-validity {
  padding: 3px;
  border: 1px solid #2c3849;
  border-radius: 12px;
  background: #0e1520;
  margin-bottom: 6px;
}
.flink-settings .share-validity button {
  border: 0;
  background: transparent;
  border-radius: 9px;
}
.flink-settings .share-validity [aria-pressed='true'] {
  background: #2b3c54;
}
.flink-dialog {
  max-height: 90dvh;
  overflow-y: auto;
  width: min(420px, 92vw);
}
.flink-dialog::backdrop {
  background: #0009;
}
.flink-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.flink-dialog h2 {
  font-size: 20px;
  margin: 0;
}
.flink-dialog > p {
  color: #a3afc0;
  font-size: 14px;
}
.flink-dialog > img {
  border-radius: 14px;
}
.flink-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #2c3849;
}
.flink-dialog .btn {
  margin: 0;
}
.flink-warning {
  padding: 14px;
  border: 1px solid #803c42;
  background: #301e22;
  border-radius: 12px;
}
.flink-dialog .flink-danger {
  background: #c73f4b;
  color: white;
}
.flink-media-dialog {
  width: min(620px, 94vw);
}
.flink-media-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
}
.flink-media-tools small {
  margin-left: auto;
}
.flink-media-tools button {
  color: #7dbbf7;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.flink-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.flink-media-grid > button {
  position: relative;
  padding: 0;
  height: 108px;
  overflow: hidden;
  border: 2px solid #37465b;
  border-radius: 12px;
  background: #151e2a;
  color: white;
  cursor: pointer;
}
.flink-media-grid > button[aria-pressed='true'] {
  border-color: #67b4ff;
}
.flink-media-grid > button[aria-pressed='false'] > :first-child {
  opacity: 0.4;
}
.flink-media-grid img,
.flink-media-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flink-media-grid button > span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 4px;
  background: #0b1018c9;
  font-size: 11px;
  border-radius: 4px;
}
.flink-media-grid b {
  position: absolute;
  right: 5px;
  top: 5px;
  border: 2px solid white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  background: #2470c8;
}
.flink-media-grid [aria-pressed='false'] b {
  background: #17202c;
  color: transparent;
}
:root[data-theme='light'] .flink-workspace {
  color: #203048;
}
:root[data-theme='light'] :is(.flink-options, .flink-message, .flink-preview-frame, .flink-dialog) {
  background: #f5f8fc;
  color: #203048;
  border-color: #c6d3e2;
}
:root[data-theme='light'] .flink-hero {
  background: linear-gradient(120deg, #dceafa, #f5f8fc);
}
:root[data-theme='light'] .flink-state {
  background: #edf7f1;
  color: #203048;
}
:root[data-theme='light'] .flink-workspace small {
  color: #53667c;
}
@media (max-width: 900px) {
  .flink-workspace {
    grid-template-columns: minmax(250px, 2fr) minmax(0, 3fr);
    gap: 22px;
    padding: 24px 16px;
  }
  .flink-copy {
    flex-wrap: wrap;
  }
  .flink-copy input {
    flex-basis: 100%;
  }
  .flink-copy .primary,
  .flink-copy .is-copied {
    flex: 1;
  }
}
@media (max-width: 700px) {
  .flink-workspace {
    display: flex;
    flex-direction: column;
    padding: 20px 16px 40px;
    gap: 24px;
  }
  .flink-workspace > * {
    width: 100%;
  }
  .flink-preview {
    position: static;
  }
  .flink-hero {
    padding: 22px;
  }
  .flink-hero > div {
    flex-wrap: wrap;
  }
  .flink-preview header,
  .flink-preview .share-chat > :not(img),
  .flink-preview-note {
    display: none;
  }
  .flink-preview-frame {
    padding: 0;
    overflow: hidden;
  }
  .flink-preview .share-chat {
    border-radius: 0;
  }
  .flink-preview > a {
    display: block;
    margin-top: -14px;
    background: #151e2a;
    padding: 12px 16px;
    border: 1px solid #2c3849;
    border-radius: 0 0 16px 16px;
  }
  .flink-settings > section > header {
    flex-wrap: wrap;
  }
  .flink-row {
    gap: 10px;
    padding: 16px;
  }
  .flink-row > .btn {
    font-size: 13px;
  }
  .flink-thumbs {
    display: none;
  }
  .flink-state {
    padding: 18px;
  }
  .flink-state header small {
    font-size: 11px;
  }
  .flink-media-grid {
    gap: 6px;
  }
  .flink-media-grid > button {
    height: 86px;
  }
}
.public-owner[hidden] {
  display: none;
}
.flink-workspace input:focus-visible,
.flink-workspace button:focus-visible,
.flink-workspace textarea:focus-visible {
  outline: 2px solid #7dbbf7;
  outline-offset: 3px;
}
:root[data-theme='light'] .flink-workspace .share-chat {
  color: #e8edf4;
}
:root[data-theme='light'] .flink-workspace .share-chat small {
  color: #bed0e5;
}
.flink-mobile-open {
  display: none;
}
@media (max-width: 700px) {
  .flink-mobile-open {
    display: inline;
  }
  .flink-desktop-open {
    display: none;
  }
  [data-share-mode='link'] .share-page-head [data-share-subtitle] {
    display: none;
  }
}
.flink-state > p:has([data-action='enable']) {
  position: fixed;
  z-index: 20;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1b293a;
  padding: 12px 18px;
  border: 1px solid #40516a;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0006;
  max-width: calc(100vw - 24px);
  color: #e8edf4;
}
@media (max-width: 700px) {
  .flink-qr-label {
    display: none;
  }
  .flink-copy [data-action='qr'] {
    width: 48px;
    padding: 8px;
  }
}
.flink-thumbnail {
  position: relative;
  overflow: hidden;
}
.flink-thumbnail img,
.flink-thumbnail video {
  display: block;
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flink-thumbnail .video-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 11px;
}
.flink-media-grid .flink-thumbnail {
  width: 100%;
  height: 100%;
}

.flink-hero [data-action='create'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.flink-create-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.flink-row > .flink-private-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.flink-private-lock svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.flink-workspace [data-action='copy'],
.flink-workspace [data-action='message-copy'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.flink-copy-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.flink-copy [data-action='qr'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid #2c3849;
  border-radius: 12px;
  background: #151e2a;
  color: #e8edf4;
  font-weight: 400;
}
.flink-copy [data-action='qr']:hover {
  background: #1d2939;
}
.flink-qr-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
:root[data-theme='light'] .flink-copy [data-action='qr'] {
  background: #f5f8fc;
  color: #203048;
  border-color: #c6d3e2;
}

/* QR dialog: compact code area and a separate action bar. */
.flink-qr-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 24px));
  padding: 24px;
  background: #1b2533;
  border: 1px solid #2c3849;
  border-radius: 20px;
  color: #e8edf4;
}
.flink-qr-dialog header {
  margin: 0;
  align-items: flex-start;
}
.flink-qr-dialog h2 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
}
.flink-dialog [data-close] {
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  margin: -4px -4px 0 0;
  border: 0;
  background: transparent;
  color: #91a0b3;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}
.flink-qr-dialog > .flink-qr-subtitle {
  margin: 3px 0 0;
  color: #a3afc0;
  font-size: 13px;
  line-height: 19px;
}
.flink-qr-dialog > img {
  display: block;
  width: 232px;
  height: 232px;
  max-width: 100%;
  margin: 26px auto 18px;
  border-radius: 14px;
  background: white;
  object-fit: contain;
}
.flink-qr-dialog > .flink-address {
  margin: 0 0 22px;
  color: #e8edf4;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  overflow-wrap: anywhere;
}
.flink-qr-dialog footer {
  justify-content: space-between;
  align-items: center;
  margin: 0 -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid #2c3849;
}
.flink-qr-dialog footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #2c3849;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
}
.flink-qr-dialog footer .btn:hover {
  background: #253246;
}
.flink-qr-dialog footer svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
:root[data-theme='light'] .flink-qr-dialog > .flink-address {
  color: #203048;
}

.book-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  vertical-align: middle;
  cursor: pointer;
}
.book-share-link:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.book-share-link .icon {
  width: 16px;
  height: 16px;
}
.book-quick [data-book-quick='link'] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.book-quick [data-book-quick='link'] .icon {
  width: 14px;
  height: 14px;
}

/* Miniature guest page in the public-link browser preview. */
.flink-browser-window {
  overflow: hidden;
  border: 1px solid #2c3849;
  border-radius: 16px;
  background: #121a26;
  color: #e8edf4;
  font-size: 12px;
  line-height: 1.4;
}
.flink-browser-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #2c3849;
  background: #1c2635;
}
.flink-browser-toolbar > span {
  display: flex;
  gap: 6px;
}
.flink-browser-toolbar i {
  width: 9px;
  height: 9px;
  background: #fa6267;
  border-radius: 50%;
}
.flink-browser-toolbar i:nth-child(2) {
  background: #f2b544;
}
.flink-browser-toolbar i:nth-child(3) {
  background: #54bf8b;
}
.flink-browser-toolbar > div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  padding: 3px 8px;
  border-radius: 7px;
  background: #0d1520;
  color: #a3afc0;
  font:
    11px ui-monospace,
    monospace;
}
.flink-browser-toolbar svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.flink-browser-toolbar > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flink-browser-heading {
  padding: 12px 14px;
}
.flink-browser-heading > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.flink-browser-heading > div:first-child small {
  color: #7dbbf7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.flink-browser-heading > div:first-child > span {
  color: #91a0b3;
  font-size: 10px;
  font-weight: 700;
}
.flink-browser-heading h4 {
  margin: 2px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}
.flink-browser-person {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #a3afc0;
}
.flink-browser-person > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  border-radius: 4px;
}
.flink-browser-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2c3d50;
  color: #e8edf4;
  overflow: hidden;
  flex-shrink: 0;
}
.flink-browser-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.flink-browser-replay {
  position: relative;
}
.flink-browser-map {
  position: relative;
  background: #2e4530;
}
.flink-browser-map > svg {
  display: block;
  width: 100%;
  height: auto;
}
.flink-browser-map > small {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 9px;
  color: #c3cebc;
}
.flink-browser-camera > circle:first-child {
  fill: #14202b;
  stroke: #e8edf4;
  stroke-width: 2;
}
.flink-browser-camera path,
.flink-browser-camera > circle:last-child {
  fill: none;
  stroke: #e8edf4;
  stroke-width: 1.3;
}
.flink-browser-live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  gap: 4px;
}
.flink-browser-live span {
  padding: 4px 8px;
  border-radius: 7px;
  background: #0b151bdb;
  font:
    11px ui-monospace,
    monospace;
}
.flink-browser-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 0;
}
.flink-browser-play {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #2470c8;
  color: white;
  font-size: 17px;
}
.flink-browser-timeline {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: #464f5d;
}
.flink-browser-timeline b {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: #7dbbf7;
}
.flink-browser-timeline i {
  position: absolute;
  top: -4px;
  width: 10px;
  height: 12px;
  border-radius: 3px;
  background: #b7bdc6;
  opacity: 0.7;
  transform: translateX(-50%);
}
.flink-browser-player > small {
  color: #a3afc0;
  font-size: 11px;
}
.flink-browser-profile {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}
.flink-browser-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 14px;
}
.flink-browser-values > div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #273346;
  border-radius: 10px;
  background: #151e2a;
}
.flink-browser-values small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.flink-browser-values strong {
  display: block;
  margin-top: 2px;
  font:
    14px ui-monospace,
    monospace;
  white-space: nowrap;
}
.flink-browser-media {
  padding: 8px 14px 0;
}
.flink-browser-media > small {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}
.flink-browser-media > div {
  display: flex;
  gap: 5px;
  min-height: 50px;
  position: relative;
  border-radius: 12px;
  padding: 3px;
  margin: 0 -3px;
}
.flink-browser-photo,
.flink-browser-media > div > span {
  position: relative;
  width: 66px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
}
.flink-browser-photo .flink-thumbnail {
  width: 100%;
  height: 100%;
}
.flink-browser-photo img,
.flink-browser-photo video {
  margin: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flink-browser-photo > small {
  position: absolute;
  bottom: 3px;
  left: 4px;
  padding: 0 3px;
  background: #0b101880;
  color: white;
  font-size: 9px;
  border-radius: 3px;
}
.flink-browser-media > div > span {
  display: grid;
  place-items: center;
  background: #233044;
  color: #a3afc0;
}
.flink-browser-journal {
  position: relative;
  margin: 14px;
  padding: 10px;
  border: 1px solid #2c3849;
  border-radius: 8px;
}
.flink-browser-journal p {
  margin: 5px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #a3afc0;
}
.flink-browser-journal.is-off {
  border-style: dashed;
  color: #8191a8;
  text-align: center;
  font-size: 11px;
}
.flink-browser-window [data-browser-part].is-preview-highlight {
  outline: 2px solid #f2b544;
  outline-offset: 2px;
}
.flink-browser-window [data-browser-part].is-preview-highlight::after {
  content: attr(data-highlight-label);
  position: absolute;
  right: 0;
  top: -11px;
  z-index: 2;
  padding: 1px 7px;
  border-radius: 10px;
  background: #f2b544;
  color: #251b0c;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.flink-options .is-preview-source {
  box-shadow: inset 3px 0 #f2b544;
  background: #f2b54408;
}
.flink-browser-window[data-highlight='showMedia'] .flink-browser-camera > circle:first-child {
  stroke: #f2b544;
}
.flink-browser-window[data-highlight='showMedia'] .flink-browser-timeline i {
  background: #f2b544;
  opacity: 1;
}
.flink-browser-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0;
  color: #a3afc0;
  font-size: 12px;
}
.flink-browser-hint i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #f2b544;
  flex-shrink: 0;
}
.flink-browser-disclaimer {
  margin: 16px 0 0;
  color: #8191a8;
  font-size: 11px;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .flink-browser-hint,
  .flink-browser-disclaimer {
    display: none;
  }
  .flink-preview:has(.flink-browser-window) > a {
    margin-top: 0;
    border-radius: 0 0 16px 16px;
  }
  .flink-browser-values {
    padding: 10px;
  }
  .flink-browser-values > div {
    padding: 7px;
  }
  .flink-browser-values strong {
    font-size: 12px;
  }
}
:root[data-theme='light'] .flink-browser-window small {
  color: #a3afc0;
}
:root[data-theme='light'] .flink-browser-heading > div:first-child small {
  color: #7dbbf7;
}
:root[data-theme='light'] .flink-browser-photo > small {
  color: white;
}

/* Public flight: guest layout, shared replay and media components. */
#public-flight.public-redesign {
  background: #0b1018;
  color: #e8edf4;
}
#public-flight .public-head {
  min-height: 64px;
  padding: 14px max(24px, calc((100% - 1312px) / 2));
  justify-content: space-between;
}
#public-flight .public-head > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
#public-flight .public-shared-label {
  border: 1px solid #263243;
  border-radius: 30px;
  padding: 5px 10px;
  font-size: 12px;
  color: #a3afc0;
}
#public-flight .public-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}
#public-flight .public-copy svg {
  width: 18px;
  height: 18px;
}
#public-flight .public-body {
  box-sizing: border-box;
  max-width: 1440px;
  padding: 28px 64px 32px;
}
#public-flight .public-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}
#public-flight .public-date {
  color: #7dbbf7;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
#public-flight .public-body h1 {
  font-size: 38px;
  line-height: 1.15;
  margin: 0 0 12px;
}
#public-flight .public-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: #b8c3d2;
}
#public-flight .public-meta > span + span::before {
  content: '·';
  margin-right: 12px;
  color: #687b92;
}
#public-flight .public-pilot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#public-flight .public-pilot b {
  display: grid;
  place-items: center;
  background: #263243;
  border-radius: 50%;
  width: 28px;
  height: 28px;
}
#public-flight .public-meta .public-flight-type {
  background: #203750;
  border-radius: 30px;
  padding: 5px 10px;
  font-size: 12px;
}
#public-flight .public-meta .public-flight-type::before {
  content: none;
}
#public-flight .public-metrics {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
}
#public-flight .public-metrics > div {
  min-width: 120px;
  padding: 14px 16px;
  background: #151d2a;
  border: 1px solid #263243;
  border-radius: 15px;
}
#public-flight .public-metrics small {
  display: block;
  color: #8fa8c6;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
}
#public-flight .public-metrics strong {
  display: block;
  margin-top: 6px;
  font:
    700 25px 'Geist Mono',
    monospace;
  white-space: nowrap;
}
#public-flight .public-layout {
  grid-template-columns: minmax(0, 2.32fr) minmax(280px, 1fr);
  align-items: start;
  gap: 24px;
}
#public-flight.public-redesign .public-player {
  background: #151d2a;
  border-color: #263243;
  border-radius: 16px;
}
#public-flight.public-redesign .public-player .detail-map {
  height: auto;
  aspect-ratio: 900 / 520;
}
#public-flight.public-redesign .public-player .replay-controls {
  padding: 0;
}
#public-flight.public-redesign .public-player .replay-player {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 14px 18px 18px;
  background: #151d2a;
  border-radius: 0;
  backdrop-filter: none;
}
#public-flight.public-redesign .public-player .replay-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
#public-flight.public-redesign .public-player .replay-actions > .public-skip {
  display: inline-flex !important;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 10px;
  justify-content: center;
}
#public-flight.public-redesign .public-player .replay-actions > [data-replay-toggle] {
  display: inline-flex !important;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  min-height: 46px;
  min-width: 46px;
}
#public-flight.public-redesign .public-player .replay-actions > [data-replay-clock] {
  display: block !important;
  margin: 0;
}
#public-flight.public-redesign .public-player .replay-clock-primary strong {
  font-size: 20px;
}
#public-flight.public-redesign .public-player .replay-actions > .replay-compact-tempo {
  display: inline-flex !important;
  width: auto;
  min-width: 46px;
}
#public-flight.public-redesign .public-player .replay-actions > .public-chart-buttons {
  display: flex !important;
  margin-left: auto;
  gap: 0;
  background: #0e1520;
  padding: 3px;
  border: 1px solid #263243;
  border-radius: 12px;
}
#public-flight.public-redesign .public-chart-buttons button {
  color: #b8c3d2;
  background: transparent;
  border: 0;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
#public-flight.public-redesign .public-chart-buttons button[aria-pressed='true'] {
  color: #e8edf4;
  background: #2b3c54;
}
#public-flight.public-redesign .public-player [data-replay-charts] {
  display: block;
  height: auto;
  margin: 34px 0 0;
  padding: 0;
  touch-action: none;
}
#public-flight.public-redesign .public-player [data-replay-charts] .flight-chart-frame {
  height: 210px;
  position: relative;
  overflow: visible;
}
#public-flight.public-redesign .public-player [data-replay-charts] .flight-chart-plot,
#public-flight.public-redesign .public-player [data-replay-charts] .altitude {
  height: 210px;
  overflow: visible;
}
#public-flight.public-redesign .public-player [data-replay-charts] .chart-axis-labels {
  display: block;
}
#public-flight.public-redesign .public-player [data-replay-charts] .chart-title,
#public-flight.public-redesign .public-player [data-replay-charts] .flight-chart-legend,
#public-flight.public-redesign .public-player [data-replay-charts] .chart-summary,
#public-flight.public-redesign .public-player [data-replay-charts] .chart-data-note,
#public-flight.public-redesign .chart-landing-marker {
  display: none;
}
#public-flight.public-redesign .chart-axis-labels {
  color: #8fa8c6;
}
#public-flight.public-redesign .replay-cursor {
  stroke: white;
  stroke-width: 2px;
}
#public-flight.public-redesign .replay-series {
  stroke-width: 2px;
}
#public-flight .public-max-label {
  position: absolute;
  left: 10px;
  bottom: 4px;
  white-space: nowrap;
  color: #90ddb5;
  font:
    12px 'Geist Mono',
    monospace;
}
#public-flight .public-chart-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#public-flight .public-chart-overlays > button {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  width: 40px;
  height: 34px;
  padding: 0;
  border: 2px solid #f5b544;
  border-radius: 9px;
  pointer-events: auto;
  cursor: pointer;
  background: #263243;
  z-index: 3;
}
#public-flight .public-chart-overlays > button::after {
  content: '';
  position: absolute;
  top: 32px;
  left: 50%;
  height: 175px;
  border-left: 1px dashed #b9852c;
  pointer-events: none;
}
#public-flight .public-chart-overlays img,
#public-flight .public-chart-overlays video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}
#public-flight .public-chart-overlays b,
#public-flight .public-photo-marker b {
  position: absolute;
  right: -6px;
  bottom: -4px;
  background: #f5b544;
  color: #17130b;
  border-radius: 8px;
  min-width: 17px;
  font-size: 11px;
  text-align: center;
}
#public-flight .public-phases {
  position: absolute;
  left: 8.87%;
  right: 4.84%;
  top: 87%;
  height: 5px;
}
#public-flight .public-phases i {
  position: absolute;
  height: 5px;
  border-radius: 3px;
  background: none;
}
#public-flight .public-phases .segment-thermal {
  background: #3d8fe0;
}
#public-flight .public-phases .segment-glide {
  background: #b9852c;
}
#public-flight .public-playhead-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border: 4px solid #2472cc;
  border-radius: 50%;
  background: white;
}
#public-flight .public-profile-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 0 0 9%;
  font-size: 11px;
  color: #8fa8c6;
}
#public-flight .public-profile-legend span::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 4px;
  margin-right: 5px;
  background: #7dbbf7;
  border-radius: 2px;
  vertical-align: middle;
}
#public-flight .public-profile-legend span:nth-child(2)::before {
  background: #477a65;
}
#public-flight .public-profile-legend span:nth-child(3)::before {
  background: #3d8fe0;
}
#public-flight .public-profile-legend span:nth-child(4)::before {
  background: #b9852c;
}
#public-flight .public-profile-legend span:nth-child(5)::before {
  background: #f5b544;
}
#public-flight.public-redesign .public-player .replay-values {
  display: none;
  left: 14px;
  right: auto;
  top: 14px;
  bottom: auto;
  padding: 0;
  background: none;
  border: 0;
  gap: 6px;
}
#public-flight.public-redesign .public-player .replay-values.public-live-visible {
  display: flex;
}
#public-flight.public-redesign .public-player .replay-values > span {
  padding: 9px 10px;
  border: 1px solid #ffffff30;
  border-radius: 30px;
  background: #182620b8;
  backdrop-filter: blur(10px);
  color: #b9cadc;
  font-size: 10px;
}
#public-flight.public-redesign .public-player .replay-values strong {
  color: white;
  font:
    700 12px 'Geist Mono',
    monospace;
}
#public-flight.public-redesign .replay-values > span:nth-child(2),
#public-flight.public-redesign .replay-values > span:nth-child(n + 5),
#public-flight.public-redesign .replay-values small {
  display: none;
}
#public-flight.public-redesign .public-map-toolbar {
  left: auto;
  right: 14px;
  top: 14px;
  justify-content: flex-end;
  align-items: center;
}
#public-flight .public-map-menu {
  position: relative;
}
#public-flight .public-map-menu summary {
  display: none;
}
#public-flight .public-map-menu:not([open]) > .public-map-styles {
  display: flex;
}
#public-flight .public-map-styles {
  gap: 0;
}
#public-flight .public-map-toolbar button {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
}
#public-flight .public-map-toolbar [aria-pressed='true'] {
  background: #2b3c54;
}
#public-flight .public-touch-hint {
  display: none;
  position: absolute;
  inset: 45% 0 auto;
  z-index: 450;
  text-align: center;
  pointer-events: none;
  background: #101722b8;
  padding: 12px;
}
#public-flight.public-touch-active .public-touch-hint {
  display: block;
}
#public-flight .public-photo-marker {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 4px 12px #0007;
  background: #263243;
  cursor: pointer;
}
#public-flight .public-photo-marker img,
#public-flight .public-photo-marker video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
#public-flight .public-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#public-flight .public-media,
#public-flight .public-more,
#public-flight .public-journal {
  padding: 16px;
  border: 1px solid #263243;
  border-radius: 16px;
  background: #151d2a;
}
#public-flight .public-media header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
#public-flight .public-media h2,
#public-flight .public-journal h2,
#public-flight .public-promo h2 {
  margin: 0;
  font-size: 16px;
}
#public-flight .public-media header small {
  color: #8fa8c6;
  font-size: 11px;
}
#public-flight [data-public-media] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
#public-flight [data-public-media] button {
  position: relative;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #263243;
  background: #263243;
  color: white;
  cursor: pointer;
}
#public-flight [data-public-media] img,
#public-flight [data-public-media] video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#public-flight [data-public-media] small {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #0b1018cc;
  font:
    11px 'Geist Mono',
    monospace;
}
#public-flight .public-journal {
  background: #1e1a12;
  border-color: #6a5328;
}
#public-flight .public-journal > small {
  display: block;
  color: #f5b544;
  font-weight: 700;
  letter-spacing: 0.09em;
  font-size: 11px;
  margin-bottom: 10px;
}
#public-flight .public-journal .pj-prose {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #d9cfad;
  margin-top: 8px;
}
#public-flight .public-journal .pj-prose.is-expanded {
  display: block;
}
#public-flight .public-read-more {
  color: #f5b544;
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}
#public-flight .public-more summary {
  cursor: pointer;
  font-weight: 700;
}
#public-flight .public-more dl {
  margin: 16px 0 0;
}
#public-flight .public-more dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #263243;
}
#public-flight .public-more dt {
  color: #a3afc0;
}
#public-flight .public-more dd {
  margin: 0;
  font-family: 'Geist Mono', monospace;
}
#public-flight .public-promo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  margin-top: 26px;
  border: 1px solid #263243;
  border-radius: 16px;
  background: #151d2a;
}
#public-flight .public-promo > img {
  width: 40px;
  height: 40px;
}
#public-flight .public-promo p {
  margin: 4px 0 0;
  color: #a3afc0;
  font-size: 13px;
}
#public-flight .public-promo a {
  margin-left: auto;
  color: #7dbbf7;
  text-decoration: none;
  white-space: nowrap;
}
#public-flight .public-footer {
  margin-top: 18px;
  color: #8fa8c6;
  font-size: 11px;
  line-height: 1.6;
}
#public-flight.public-redesign.replay-expanded .detail-map > .replay-player {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 460;
  max-height: 45dvh;
  overflow: auto;
}
#public-flight.public-redesign.replay-expanded .detail-map {
  aspect-ratio: auto;
}
#public-flight.public-redesign :focus-visible {
  outline: 2px solid #f5b544;
  outline-offset: 3px;
}
@media (max-width: 1300px) {
  #public-flight .public-hero {
    flex-wrap: wrap;
  }
}
@media (max-width: 1099px) {
  #public-flight .public-body {
    padding: 24px;
  }
  #public-flight .public-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 639px) {
  #public-flight .public-head {
    padding: 16px;
    gap: 12px;
  }
  #public-flight .public-brand {
    font-size: 20px;
    gap: 10px;
  }
  #public-flight .public-brand img {
    width: 34px;
    height: 34px;
  }
  #public-flight .public-shared-label,
  #public-flight .public-copy span {
    display: none;
  }
  #public-flight .public-copy {
    padding: 10px;
  }
  #public-flight .public-body {
    padding: 12px 0 24px;
  }
  #public-flight .public-hero {
    padding: 0 16px;
    gap: 18px;
    margin-bottom: 18px;
  }
  #public-flight .public-body h1 {
    font-size: 24px;
  }
  #public-flight .public-date {
    font-size: 11px;
  }
  #public-flight .public-meta {
    font-size: 13px;
  }
  #public-flight .public-places,
  #public-flight .public-flight-type {
    display: none;
  }
  #public-flight .public-metrics {
    width: 100%;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }
  #public-flight .public-metrics > div {
    min-width: 104px;
    padding: 11px 12px;
  }
  #public-flight .public-metrics strong {
    font-size: 21px;
  }
  #public-flight .public-metrics small {
    font-size: 10px;
  }
  #public-flight.public-redesign .public-player {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  #public-flight.public-redesign .public-player .detail-map {
    height: 330px;
    aspect-ratio: auto;
  }
  #public-flight.public-redesign .public-player .replay-player {
    padding: 12px;
  }
  #public-flight.public-redesign .public-player .replay-actions {
    flex-wrap: wrap;
  }
  #public-flight.public-redesign .public-player .replay-actions > .public-skip {
    display: none !important;
  }
  #public-flight.public-redesign .public-player .replay-actions > .replay-compact-tempo {
    margin-left: auto;
  }
  #public-flight.public-redesign .public-player .replay-actions > .public-chart-buttons {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
  #public-flight.public-redesign .public-player .replay-player {
    position: relative;
    padding-bottom: 58px;
  }
  #public-flight.public-redesign .public-player [data-replay-charts] .flight-chart-frame,
  #public-flight.public-redesign .public-player [data-replay-charts] .flight-chart-plot,
  #public-flight.public-redesign .public-player [data-replay-charts] .altitude {
    height: 150px;
  }
  #public-flight .public-chart-overlays > button::after {
    height: 125px;
  }
  #public-flight .public-profile-legend {
    gap: 8px;
    font-size: 10px;
    padding-left: 0;
  }
  #public-flight.public-redesign .public-player .replay-values {
    top: auto;
    bottom: 14px;
    gap: 0;
    background: #182620b8;
    border-radius: 30px;
  }
  #public-flight.public-redesign .public-player .replay-values > span {
    background: none;
    border: 0;
    padding: 10px 8px;
    font-size: 0;
  }
  #public-flight.public-redesign .public-player .replay-values > span:nth-child(3) {
    display: none;
  }
  #public-flight.public-redesign .public-map-menu summary {
    display: block;
    list-style: none;
    cursor: pointer;
    padding: 7px 12px;
    border-radius: 50%;
    background: #182620b8;
    font-size: 22px;
  }
  #public-flight.public-redesign .public-map-menu:not([open]) > .public-map-styles {
    display: none;
  }
  #public-flight .public-map-menu[open] > .public-map-styles {
    position: absolute;
    right: 0;
    top: 45px;
  }
  #public-flight .public-side {
    padding: 0 16px;
  }
  #public-flight .public-media {
    padding: 0;
    border: 0;
    background: none;
  }
  #public-flight .public-media header {
    display: none;
  }
  #public-flight [data-public-media] {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
  }
  #public-flight [data-public-media] button {
    flex: 0 0 132px;
    height: 96px;
  }
  #public-flight .public-promo {
    margin: 24px 16px 0;
    padding: 16px;
    flex-wrap: wrap;
  }
  #public-flight .public-promo > div {
    flex: 1;
  }
  #public-flight .public-promo a {
    white-space: normal;
    margin-left: 56px;
  }
  #public-flight .public-footer {
    margin: 16px;
  }
}
#public-flight .public-phases .segment-circling {
  background: #3d8fe0;
}
#public-flight .public-replay-marker span {
  display: block;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 5px solid #2472cc;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 7px #2472cc33;
}
.flink-browser-values {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0;
}
.flink-browser-values strong {
  font-size: clamp(10px, 1.1vw, 14px);
}
.flink-browser-player > span:not(.flink-browser-play) {
  font-family: ui-monospace, monospace;
}
.flink-browser-player > span > small {
  display: block;
  color: #8fa8c6;
  font-size: 9px;
}
.flink-browser-player > small:last-child {
  margin-left: auto;
}
.flink-browser-live {
  display: none;
}
.flink-browser-person .is-off,
.flink-browser-media.is-off {
  padding: 6px;
  border: 1px dashed #6a5328;
  border-radius: 5px;
  color: #b7a786;
  font-size: 10px;
}
.flink-browser-ending {
  display: grid;
  gap: 4px;
  margin: 12px;
  padding: 12px;
  border: 1px solid #263243;
  border-radius: 10px;
  background: #151d2a;
}
.flink-browser-ending small {
  color: #8fa8c6;
}
.flink-browser-ending > span {
  color: #7dbbf7;
  font-size: 10px;
}
#public-flight.public-redesign [data-chart-dot] {
  display: none !important;
}
#public-flight.public-redesign .public-media [data-public-media] button.active {
  border-color: #f5b544;
}
#public-flight.public-redesign .public-map-toolbar [data-replay-fullscreen] {
  position: static;
  transform: none;
  border-radius: 50%;
}
@media (pointer: coarse) {
  #public-flight.public-redesign [data-public-map] {
    touch-action: pan-y;
  }
}
#public-flight .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#public-flight.public-redesign.replay-expanded .public-player .detail-map {
  height: 100dvh;
  aspect-ratio: auto;
}

/* Public map readouts and the restored 2D/3D selector. */
#public-flight.public-redesign .replay-values > span::before {
  content: none;
}
.replay-map-highlight .replay-highlight-svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  overflow: visible;
}
.replay-map-highlight:has(.replay-highlight-svg) {
  padding: 0;
  box-sizing: border-box;
  line-height: 1;
}
#public-flight.public-redesign .public-map-toolbar {
  max-width: min(280px, calc(100% - 28px));
}
#public-flight.public-redesign .public-map-toolbar > select {
  width: auto;
  min-width: 140px;
  flex: 1;
}

@media (max-width: 639px) {
  #public-flight.public-redesign .public-player .replay-player {
    padding-bottom: 12px;
  }
  #public-flight.public-redesign .public-player .replay-player > .public-chart-buttons {
    position: static;
    transform: none;
    display: flex;
    align-self: center;
    margin: 12px 0 0;
    padding: 3px;
    background: #0e1520;
    border: 1px solid #263243;
    border-radius: 12px;
  }
}

#public-flight.public-redesign .replay-player > [data-replay-charts] {
  order: 1;
}
#public-flight.public-redesign .replay-player > .public-profile-legend {
  order: 2;
}
#public-flight.public-redesign .replay-player > .public-chart-buttons {
  order: 3;
}
#public-flight.public-redesign .public-player [data-replay-charts] .flight-chart-frame {
  border: 0;
  border-radius: 0;
  background: none;
}
#public-flight.public-redesign .public-player [data-replay-charts] .altitude {
  min-height: 0;
}
#public-flight.public-redesign .public-player [data-replay-status] {
  display: none;
}
#public-flight.public-redesign .public-player .replay-actions > .replay-compact-tempo {
  flex: 0 0 auto;
  width: auto;
}
@media (max-width: 639px) {
  #public-flight.public-redesign .public-player .replay-values > span {
    font-size: 10px;
  }
}
.eq-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  overflow-wrap: anywhere;
}
.eq-upload-row > div {
  min-width: 0;
}
.eq-upload-row img,
.eq-upload-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  flex: 0 0 3.5rem;
  border-radius: 0.5rem;
}
.eq-upload-placeholder {
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.eq-upload-row p {
  margin: 0.35rem 0;
}
.eq-upload-row.has-error {
  border-inline-start: 3px solid currentColor;
  padding-inline-start: 0.75rem;
}
.eq-upload-row .btn {
  margin-block: 0.25rem;
}
.eq-upload-spinner {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-inline-end: 0.5em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: eq-upload-spin 1s linear infinite;
}
@keyframes eq-upload-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .eq-upload-spinner {
    animation: none;
  }
}

/* Supplementary equipment details are shown only for “Sonstige”. */
#equipment-form [data-eq-harness-other][hidden],
#equipment-form [data-eq-protector-other][hidden] {
  display: none !important;
}

/* Optional ascent — design series 35. Shared colors follow the selected theme. */
.hike-editor,
.hike-summary,
.hike-statistics,
.hike-range-dialog,
.hike-remove-dialog,
.hike-editor-overview,
.hike-map-legend,
.hike-type-hint {
  --hike-orange: #dc6b21;
  --hike-surface: color-mix(in srgb, var(--solid) 65%, var(--bg));
  --hike-soft: color-mix(in srgb, var(--hike-orange) 12%, var(--bg));
}
.hike-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  vertical-align: middle;
}
.hike-editor {
  container-type: inline-size;
}
.hike-editor [hidden],
.hike-map-legend[hidden],
.hike-type-hint[hidden] {
  display: none !important;
}
.hike-editor-head,
.hike-editor-title,
.hike-summary > header,
.hike-statistics > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.hike-editor-head {
  margin-bottom: 22px;
  align-items: flex-start;
}
.hike-editor-title {
  justify-content: flex-start;
}
.hike-title-icon,
.hike-empty > .hike-icon {
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid color-mix(in srgb, #dc6b21 45%, transparent);
  border-radius: 10px;
  color: var(--hike-orange);
  background: var(--hike-soft);
}
.hike-editor .hike-editor-head h3,
.hike-editor .hike-empty h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.hike-editor-head p,
.hike-empty p,
.hike-field-help,
.hike-preview-note {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.hike-editor-head > .btn {
  flex: 0 0 auto;
  font-size: 11px;
  padding-inline: 6px;
}
.hike-empty {
  padding: 24px;
  background: var(--hike-surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.hike-empty h3 {
  margin-top: 16px !important;
}
.hike-empty ul {
  padding-left: 18px;
  margin: 14px 0 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.hike-empty > div,
.hike-track-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hike-empty .btn {
  font-size: 12px;
}
.hike-measurements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}
.hike-duration-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.hike-metric-field {
  min-width: 0;
}
.hike-metric-field:last-child {
  grid-column: 1;
}
.hike-duration-field legend,
.hike-metric-field > label,
.hike-note-field > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
}
.hike-duration-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.hike-editor .hike-unit-input {
  display: block;
  position: relative;
  min-width: 0;
  margin: 0;
}
.hike-editor .hike-unit-input input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 10px 48px 10px 12px;
  font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.hike-unit-input input::-webkit-inner-spin-button,
.hike-unit-input input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.hike-unit-input > span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
.hike-source-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 18px;
  padding: 0 7px;
  border-radius: 20px;
  background: var(--hike-surface);
  color: var(--muted);
}
.hike-source-badge.is-gpx {
  background: var(--accent-soft);
  color: var(--accent);
}
.hike-source-badge.is-corrected {
  background: var(--hike-soft);
  color: var(--hike-orange);
}
.hike-metric-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}
.hike-metric-help:empty {
  display: none;
}
.hike-source-reset {
  background: transparent;
  border: 0;
  color: var(--accent);
  padding: 6px 0;
  min-height: 32px;
  font-size: 10px;
  cursor: pointer;
}
.hike-editor .hike-field-help {
  font-size: 11px;
  margin-top: 6px;
}
.hike-note-field {
  display: block;
  margin-top: 20px;
}
.hike-note-field small {
  color: var(--muted);
  font-size: 11px;
}
.hike-editor [data-hike-note] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  margin: 0;
  resize: vertical;
  font-size: 13px;
}
.hike-saved-summary {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--hike-surface);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 16px 0;
}
.hike-upload-invite {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
}
.hike-upload-invite > .hike-icon {
  color: var(--muted);
}
.hike-upload-invite > div {
  flex: 1;
  min-width: 0;
}
.hike-upload-invite strong {
  display: block;
  font-size: 13px;
}
.hike-upload-invite small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
}
.hike-upload-invite .btn {
  font-size: 12px;
  flex: 0 0 auto;
}
.hike-upload-invite.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.hike-track-card {
  display: grid;
  grid-template-columns: minmax(120px, 28%) minmax(0, 1fr);
  gap: 16px;
  background: var(--hike-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.hike-track-thumbnail {
  min-height: 150px;
  border-radius: 10px;
  overflow: hidden;
}
.hike-track-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.hike-track-filename {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}
.hike-track-info > small {
  color: var(--muted);
  font-size: 11px;
}
.hike-track-actions {
  margin-top: auto;
  gap: 6px;
}
.hike-track-actions .btn {
  padding: 6px 10px;
  font-size: 11px;
}
.hike-track-hints {
  margin: 0;
  padding-left: 16px;
  color: var(--warn);
  font-size: 11px;
  line-height: 1.7;
}
.hike-status,
.hike-track-warning {
  font-size: 12px;
  color: var(--warn);
  line-height: 1.6;
}
.hike-status:empty {
  display: none;
}
.hike-replaced,
.hike-undo {
  background: var(--hike-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  font-size: 12px;
}
.hike-replaced p {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
}
.hike-type-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, #dc6b21 35%, transparent);
  border-radius: 9px;
  background: var(--hike-soft);
  font-size: 12px;
}
.hike-type-hint .btn {
  font-size: 11px;
  white-space: nowrap;
}
.hike-tab-optional {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  margin-left: 4px;
}
.flight-editor-tabs {
  overflow-x: auto;
}
.flight-editor-tabs > button {
  flex: 0 0 auto;
}
.hike-editor-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.hike-editor-overview article {
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
}
.hike-editor-overview small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 650;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.hike-editor-overview strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(16px, 1.5vw, 22px);
  margin: 6px 0;
}
.hike-editor-overview span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.hike-editor-overview .is-hike {
  border-color: color-mix(in srgb, #dc6b21 60%, transparent);
}
.hike-editor-overview .is-hike small {
  color: var(--hike-orange);
}
.hike-preview-note {
  font-size: 11px;
}
/* Standalone selection and confirmation dialogs preserve the underlying draft. */
dialog.hike-range-dialog,
dialog.hike-remove-dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--solid);
  color: var(--text);
  max-height: 94dvh;
  overflow: auto;
  box-shadow: 0 30px 100px #0008;
}
dialog.hike-range-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
}
dialog.hike-remove-dialog {
  width: min(540px, calc(100vw - 32px));
  max-width: none;
}
.hike-range-dialog::backdrop,
.hike-remove-dialog::backdrop {
  background: #05090eb8;
}
.hike-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}
.hike-dialog-head h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.hike-dialog-head p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.hike-dialog-body {
  padding: 24px;
}
.hike-dialog-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.hike-dialog-footer > span {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  min-width: 200px;
}
.hike-range-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
}
.hike-range-map-wrap {
  position: relative;
  min-width: 0;
  min-height: 350px;
}
.hike-range-map {
  height: 100%;
  min-height: 350px;
  border-radius: 12px;
  overflow: hidden;
}
.hike-range-legend {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 450;
  display: grid;
  gap: 5px;
  pointer-events: none;
}
.hike-range-legend > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #fff;
  color: #18202c;
  border-radius: 6px;
  font-size: 11px;
}
.hike-range-legend i {
  width: 26px;
  border-top: 3px dashed #dc6b21;
}
.hike-range-legend span + span i {
  border-top: 3px dotted #8794a6;
}
.hike-section-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.hike-range-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.hike-range-shortcuts .btn {
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 20px;
}
.hike-range-metrics {
  display: grid;
  gap: 8px;
}
.hike-range-metrics article {
  background: var(--hike-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.hike-range-metrics small,
.hike-range-metrics article > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.hike-range-metrics strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  margin: 5px 0;
}
.hike-range-note,
.hike-range-help {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.hike-range-profile {
  position: relative;
  margin-top: 20px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--hike-surface);
}
.hike-range-handles {
  position: absolute;
  inset: 42px calc(3.33% + 10px) 38px calc(8% + 10px);
  pointer-events: none;
}
.hike-range-handles input[type='range'] {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}
.hike-range-handles input::-webkit-slider-runnable-track {
  background: transparent;
  border: 0;
}
.hike-range-handles input::-moz-range-track {
  background: transparent;
  border: 0;
}
.hike-range-handles input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 38px;
  border: 2px solid #5ea8f2;
  border-radius: 5px;
  background: #fff;
  pointer-events: auto;
  cursor: ew-resize;
}
.hike-range-handles input::-moz-range-thumb {
  width: 14px;
  height: 36px;
  border: 2px solid #5ea8f2;
  border-radius: 5px;
  background: #fff;
  pointer-events: auto;
  cursor: ew-resize;
}
.hike-range-handles input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.hike-range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.hike-range-labels .btn {
  text-align: left;
  font-size: 12px;
}
.hike-range-labels .btn[aria-pressed='true'] {
  color: var(--accent);
}
.hike-range-labels span {
  display: block;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.hike-remove-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}
.hike-remove-choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.hike-remove-choice input {
  width: auto;
  margin: 3px 0 0;
  flex: 0 0 auto;
}
.hike-remove-choice strong {
  font-size: 13px;
}
.hike-remove-choice small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 5px;
}
/* Detail cards and the elevation profile contain no technical file metadata. */
.hike-summary {
  padding: 18px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card);
}
.hike-summary > header h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15px;
}
.hike-summary > header .hike-icon {
  color: var(--hike-orange);
}
.hike-summary > header .btn {
  font-size: 12px;
}
.hike-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.hike-summary dt {
  font-size: 11px;
  color: var(--muted);
}
.hike-summary dd {
  margin: 5px 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(13px, 1.4vw, 19px);
  font-weight: 600;
}
.hike-summary dl small {
  color: var(--muted);
  font-size: 10px;
}
.hike-summary blockquote {
  margin: 14px 0;
  padding: 12px;
  background: var(--hike-surface);
  border-radius: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.6;
}
.hike-profile {
  margin-top: 18px;
}
.hike-profile header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 11px;
  color: var(--muted);
}
.hike-profile header span + span {
  font-family: 'IBM Plex Mono', monospace;
}
.hike-profile svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 210px;
  overflow: visible;
}
.hike-profile svg text {
  fill: var(--muted);
  font-size: 10px;
}
.hike-profile-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.hike-profile-line {
  stroke: #dc6b21;
  stroke-width: 2.4;
  fill: none;
}
.hike-profile-line.is-rest {
  stroke: #8794a6;
  opacity: 0.6;
}
.hike-profile-fill {
  fill: #dc6b2124;
  stroke: none;
}
.hike-profile-empty {
  color: var(--muted);
  font-size: 12px;
}
.detail-dialog .flight-summary.has-hike {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
}
.detail-dialog .flight-summary.has-hike > div {
  display: flex;
  align-items: center;
  flex: 1 1 400px;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding: 0;
  border: 0;
}
.detail-dialog .flight-summary.has-hike > .flight-summary-hike {
  flex: 1 1 340px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.hike-group-label {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 650;
  letter-spacing: 0.08em;
}
.flight-summary-hike .hike-group-label {
  color: #dc6b21;
}
.flight-summary.has-hike small {
  font-size: 10px;
  color: var(--muted);
}
.flight-summary.has-hike strong {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  margin-left: 4px;
}
.hike-replay-note {
  color: var(--muted);
  font-size: 11px;
  padding: 6px 12px;
}
.hike-map-mode-note {
  position: absolute;
  top: 62px;
  right: 12px;
  max-width: 240px;
  z-index: 460;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--solid);
  color: var(--muted);
  font-size: 10px;
  pointer-events: none;
}
.hike-map-legend {
  background: var(--solid);
  color: var(--text);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 8px #0003;
}
.hike-map-legend label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-size: 12px;
  cursor: pointer;
}
.hike-map-legend input {
  width: auto;
  accent-color: #2470c8;
}
.hike-map-legend small {
  color: var(--muted);
  font-size: 10px;
}
.hike-legend-flight,
.hike-legend-hike {
  width: 28px;
  border-top: 4px solid #2470c8;
}
.hike-legend-hike {
  border-top: 4px dashed #dc6b21;
}
.hike-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #dc8b36;
  border: 1px solid #a975385e;
  border-radius: 5px;
  padding: 2px 6px;
  white-space: nowrap;
}
.hike-badge .hike-icon {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
}
:root[data-theme='light'] .hike-badge {
  color: #9c5014;
  background: #fff4e6;
}
/* All figures are derived from the selected statistics period. */
.hike-statistics {
  padding: 20px;
}
.hike-statistics h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 17px;
}
.hike-statistics h2 .hike-icon {
  color: var(--hike-orange);
}
.hike-statistics > header > span,
.hike-statistics > p {
  font-size: 12px;
  color: var(--muted);
}
.hike-statistic-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.hike-statistic-cards article {
  background: var(--hike-surface);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.hike-statistic-cards small {
  display: block;
  min-height: 32px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.hike-statistic-cards strong {
  display: block;
  font-size: clamp(17px, 2vw, 26px);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  margin-block: 6px;
}
.hike-statistic-cards article > span {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
.hike-statistic-cards article > .hike-coverage {
  color: var(--hike-orange);
}
.hike-month-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.hike-month-chart {
  display: flex;
  align-items: end;
  gap: 8px;
  min-height: 116px;
  overflow-x: auto;
}
.hike-month-chart > div {
  flex: 1 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: stretch;
  height: 116px;
  gap: 7px;
}
.hike-month-chart small {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.hike-month-bar {
  display: block;
  border-radius: 5px 5px 0 0;
  background: var(--hike-orange);
  opacity: 0.82;
}
.hike-legacy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px dashed var(--border);
  background: var(--hike-surface);
  border-radius: 10px;
  margin-top: 18px;
  padding: 12px;
}
.hike-legacy strong {
  font-size: 12px;
}
.hike-legacy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.hike-legacy .btn {
  font-size: 12px;
}
.flink-row[data-preview-row='showHike'] {
  background: color-mix(in srgb, #dc6b21 10%, transparent);
  border-radius: 10px;
  padding-inline: 12px;
}
.flink-row[data-preview-row='showHike'] small {
  line-height: 1.6;
}
@container (max-width: 540px) {
  .hike-editor-head {
    flex-wrap: wrap;
    gap: 4px;
  }
  .hike-editor-head > .btn {
    margin-left: auto;
  }
  .hike-duration-field {
    grid-column: 1 / -1;
  }
  .hike-metric-field:last-child {
    grid-column: auto;
  }
  .hike-track-card {
    grid-template-columns: 1fr;
  }
  .hike-track-thumbnail {
    min-height: 160px;
  }
  .hike-upload-invite {
    flex-wrap: wrap;
  }
  .hike-upload-invite .btn {
    margin-left: auto;
  }
}
@media (max-width: 700px) {
  .hike-range-layout {
    grid-template-columns: 1fr;
  }
  .hike-range-map,
  .hike-range-map-wrap {
    min-height: 240px;
    height: 240px;
  }
  .hike-range-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hike-range-metrics article {
    padding: 10px;
  }
  .hike-range-metrics strong {
    font-size: 14px;
  }
  .hike-range-metrics article > span {
    font-size: 9px;
  }
  .hike-dialog-head {
    padding: 18px 16px 0;
  }
  .hike-dialog-body {
    padding: 16px;
  }
  .hike-dialog-footer {
    padding: 12px 16px;
  }
  .hike-dialog-footer > span {
    flex-basis: 100%;
  }
  .hike-statistic-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hike-summary {
    padding: 15px;
  }
  .hike-summary dd {
    font-size: 14px;
  }
  .hike-map-legend {
    padding: 6px 9px;
  }
  .hike-map-legend small {
    display: none;
  }
  .hike-map-mode-note {
    display: none;
  }
  .detail-dialog .flight-summary.has-hike > div {
    flex: 1 1 100%;
    gap: 10px;
  }
  .detail-dialog .flight-summary.has-hike > .flight-summary-hike {
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .flight-summary.has-hike strong {
    font-size: 13px;
  }
  .flight-summary.has-hike .flight-summary-flight > div:nth-of-type(2),
  .flight-summary.has-hike .flight-summary-flight > div:nth-of-type(3),
  .flight-summary.has-hike .flight-summary-flight > div:nth-of-type(4),
  .flight-summary.has-hike .flight-summary-flight > div:nth-of-type(6) {
    display: none;
  }
  .hike-editor-overview strong {
    font-size: 16px;
  }
}
.hike-dialog-footer {
  position: sticky;
  bottom: 0;
  z-index: 600;
  background: var(--solid);
}
.flight-editor-preview .flight-no-track.hike-only-map {
  min-height: 230px;
  padding: 0;
  display: block;
  overflow: hidden;
}
@media (max-height: 800px) and (min-width: 701px) {
  .hike-range-map,
  .hike-range-map-wrap {
    min-height: 280px;
  }
  .hike-range-profile .hike-profile svg {
    max-height: 160px;
  }
  .hike-range-metrics article {
    padding: 9px 12px;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .detail-dialog.replay-mobile-portrait:not(.replay-expanded)[data-flight-view='replay']
    .flight-summary.has-hike {
    display: flex;
  }
  .flight-editor-dialog:has(#editor-tab-hike[aria-selected='true']) .flight-editor-preview {
    display: none;
  }
}

/* Schirm bearbeiten: shared live preview and four independently scrolling tabs. */
.eq-glider-dialog {
  max-width: 1240px !important;
  height: min(940px, 94dvh);
  max-height: 94dvh;
  overflow: hidden;
}
.eq-glider-dialog #dialog-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.eq-glider-dialog .dialog-head,
.eq-glider-dialog .dialog-footer {
  flex: 0 0 auto;
}
.eq-glider-dialog .dialog-head {
  padding: 20px 24px 12px;
}
.eq-glider-dialog .dialog-head p {
  font-size: 13px;
}
.eq-glider-dialog .dialog-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.eq-glider-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.eq-glider-tabs {
  flex: 0 0 auto;
  padding: 0 24px;
  margin: 0;
  border-color: var(--eq-border);
}
.eq-glider-tabs > button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 52px;
  font-size: 14px;
}
.eq-tab-warning {
  color: #f5b544;
}
.eq-tab-complete {
  color: #5cc48a;
}
.eq-glider-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}
.eq-glider-sidebar {
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.eq-glider-sidebar .eq-photo {
  height: 150px;
  border: 1px dashed var(--eq-border);
  border-radius: 14px;
  background: transparent;
}
.eq-glider-sidebar .eq-photo svg {
  width: 34px;
  height: 34px;
}
.eq-glider-sidebar .eq-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.eq-glider-sidebar .eq-form-row {
  margin: 10px 0;
}
.eq-glider-identity h3 {
  margin: 20px 0 4px;
  font-size: 18px;
}
.eq-glider-identity p {
  font-size: 13px;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.eq-glider-panels {
  display: block;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
  scrollbar-width: thin;
  padding-right: 4px;
}
.eq-glider-panel[hidden],
.eq-glider-editor [hidden] {
  display: none !important;
}
.eq-glider-panel > section {
  display: grid;
  gap: 16px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--eq-border);
  margin-bottom: 24px;
  min-width: 0;
}
.eq-glider-panel h3 {
  font-size: 16px;
  margin: 0;
}
.eq-glider-panel p {
  margin: 0;
  line-height: 1.55;
  font-size: 13px;
}
.eq-glider-panel .eq-fieldset {
  margin: 0;
}
.eq-glider-panel .eq-fieldset legend {
  margin-bottom: 8px;
}
.eq-glider-panel .eq-choice {
  display: block;
}
.eq-glider-panel .eq-choice span {
  font-size: 13px;
  padding: 9px 12px;
}
.eq-glider-panel .eq-choice input:focus-visible + span {
  outline: 2px solid #5ea8f2;
  outline-offset: 3px;
}
.eq-glider-names > label:last-child {
  flex: 0 1 130px;
}
.eq-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.eq-editor-badge {
  border: 1px solid var(--eq-border);
  border-radius: 16px;
  background: var(--eq-inner);
  color: var(--eq-muted);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
}
.eq-more-types {
  position: relative;
  color: var(--eq-muted);
  font-size: 13px;
}
.eq-more-types summary {
  border: 1px dashed var(--eq-border);
  border-radius: 24px;
  padding: 10px 14px;
  cursor: pointer;
}
.eq-more-types > div {
  position: absolute;
  z-index: 5;
  inset: 100% 0 auto auto;
  min-width: 180px;
  padding: 8px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  background: var(--eq-card);
  box-shadow: 0 8px 24px #0004;
}
.eq-selected-type {
  display: block;
  border: 1px solid #5ea8f2;
  color: #7dbbf7;
  background: #2470c822;
  border-radius: 22px;
  padding: 9px 12px;
  font-size: 13px;
}
.eq-segmented {
  flex-wrap: nowrap;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  background: var(--eq-inner);
}
.eq-segmented > .eq-choice {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.eq-segmented .eq-choice span {
  border: 0;
  border-radius: 8px;
  height: 100%;
}
.eq-segmented input:checked + span {
  background: #2470c833;
  color: var(--eq-text);
}
.eq-purchase-condition {
  flex: 2;
}
.eq-editor-info,
.eq-split-hint,
.eq-last-check {
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  padding: 14px;
  background: var(--eq-inner);
  font-size: 13px;
  line-height: 1.6;
}
.eq-editor-info {
  margin-bottom: 24px;
}
.eq-split-hint {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  background: #f5b54412;
  border-color: #b28232;
  color: #eeb64e;
}
.eq-last-check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--eq-muted);
}
.eq-last-check strong {
  color: var(--eq-text);
}
.eq-last-check button,
.eq-split-hint button {
  flex-shrink: 0;
}
.eq-glider-panel .eq-check-disclosure {
  margin: 0;
  border: 0;
  padding: 0;
  font-size: 13px;
  color: var(--eq-muted);
}
.eq-glider-panel .eq-check-disclosure summary {
  padding: 4px 0;
  cursor: pointer;
}
.eq-glider-panel .eq-check-disclosure[open] {
  display: grid;
  gap: 12px;
}
.eq-glider-panel .eq-check-disclosure[open] > :not(summary) {
  margin-top: 12px;
}
.eq-interval-sentence {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}
.eq-interval-sentence label {
  position: relative;
  flex: 0 0 116px;
}
.eq-glider-dialog .eq-interval-sentence label > input[type='number'] {
  /* Override the dialog's font: inherit: the inline labels use font-size: 0. */
  font-size: 14px;
  padding-right: 58px;
}
.eq-interval-sentence label::after {
  position: absolute;
  right: 10px;
  top: 15px;
  color: var(--eq-muted);
  pointer-events: none;
  font-size: 12px;
}
.eq-interval-sentence label:nth-of-type(1)::after {
  content: 'Monate';
}
.eq-interval-sentence label:nth-of-type(2)::after {
  content: 'Std.';
}
.eq-interval-sentence label {
  font-size: 0;
  gap: 0;
}
.eq-usage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}
.eq-glider-panel label {
  line-height: 1.4;
}
.eq-usage-timeline {
  border: 1px solid var(--eq-border);
  border-radius: 14px;
  background: var(--eq-inner);
  padding: 16px;
}
.eq-usage-timeline svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.eq-timeline-label {
  fill: var(--eq-text);
  font-size: 12px;
  font-weight: 600;
}
.eq-timeline-date {
  fill: var(--eq-muted);
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
}
.eq-timeline-sources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  text-align: center;
  font-size: 12px;
}
.eq-timeline-sources strong {
  color: #eeb64e;
}
.eq-timeline-sources > div:last-child strong {
  color: #7dbbf7;
}
.eq-timeline-sources small {
  display: block;
  color: var(--eq-muted);
  margin-top: 4px;
}
.eq-confirm-box {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid #967126;
  border-radius: 12px;
  background: #f5b54413;
  font-size: 13px;
  line-height: 1.6;
}
.eq-confirm-box button {
  flex-shrink: 0;
}
.eq-confirmed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #70cf9f;
  font-size: 13px;
  line-height: 1.6;
}
.eq-confirmed:focus {
  outline: 2px solid #5cc48a;
  outline-offset: 4px;
  border-radius: 4px;
}
.eq-live-check {
  --check-color: #5cc48a;
  border: 1px solid var(--eq-border);
  border-top: 3px solid var(--check-color);
  border-radius: 16px;
  padding: 16px;
  background: var(--eq-inner);
}
.eq-state-due {
  --check-color: #ff646d;
}
.eq-state-pending,
.eq-state-incomplete {
  --check-color: #f5b544;
}
.eq-state-unknown {
  --check-color: #8794a6;
}
.eq-live-title {
  display: block;
  font-size: 14px;
}
.eq-live-title > span {
  color: var(--check-color);
  margin-right: 4px;
}
.eq-live-criterion {
  border-top: 1px solid var(--eq-border);
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  gap: 10px;
}
.eq-live-criterion svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--eq-muted);
}
.eq-live-criterion strong,
.eq-live-criterion small {
  display: block;
}
.eq-live-criterion strong {
  margin: 3px 0;
  font-size: 14px;
}
.eq-live-criterion small {
  font-size: 12px;
  color: var(--eq-muted);
}
.eq-live-check > p {
  border-top: 1px solid var(--eq-border);
  padding-top: 12px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--eq-muted);
  line-height: 1.6;
}
.eq-preview-hint {
  font-size: 13px;
  line-height: 1.6;
}
.eq-glider-dialog .dialog-footer {
  align-items: center;
  padding: 16px 24px;
}
.eq-glider-dialog .dialog-footer > [data-eq-glider-save-reason] {
  margin: 0 auto 0 0;
  font-size: 12px;
  color: var(--eq-muted);
}
.eq-glider-dialog .dialog-footer > [data-eq-upload-save-hint]:empty {
  display: none;
}
.eq-glider-dialog .btn {
  min-height: 42px;
  font-size: 14px;
}
.eq-glider-dialog .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.eq-glider-dialog [data-eq-status-announcement] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.eq-tab-short,
.eq-mobile-status,
.eq-mobile-save,
[data-eq-mobile-title] {
  display: none;
}
.eq-add-type {
  flex: 0 0 auto;
  padding: 8px 24px;
  font-size: 13px;
}
.eq-add-type .eq-type-options {
  margin: 8px 0;
}
.eq-glider-panel .eq-staged-doc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.eq-glider-panel .eq-staged-doc strong {
  overflow-wrap: anywhere;
  flex: 1 1 140px;
}
.eq-glider-panel .eq-staged-doc small {
  color: var(--eq-muted);
}
@media (max-width: 1050px) {
  .eq-glider-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
  }
  .eq-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .eq-interval-sentence {
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .eq-glider-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .eq-glider-dialog .dialog-head {
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    gap: 12px;
  }
  .eq-glider-dialog .dialog-head > div {
    display: none;
  }
  .eq-glider-dialog .dialog-head > .icon-button {
    order: -1;
  }
  .eq-glider-dialog [data-eq-mobile-title] {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }
  .eq-glider-dialog .eq-mobile-save {
    display: block;
    padding: 9px 13px;
  }
  .eq-glider-tabs {
    padding: 0 14px;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .eq-glider-tabs > button {
    font-size: 13px;
    min-height: 46px;
    padding-left: 0;
    padding-right: 0;
  }
  .eq-glider-tabs [data-eq-tab-state] {
    font-size: 10px;
  }
  .eq-tab-long {
    display: none;
  }
  .eq-tab-short {
    display: inline;
  }
  .eq-glider-layout {
    display: block;
    overflow-y: auto;
    padding: 16px;
  }
  .eq-glider-sidebar,
  .eq-glider-panels {
    overflow: visible;
    padding: 0;
  }
  .eq-glider-identity,
  .eq-desktop-status,
  .eq-preview-hint {
    display: none;
  }
  .eq-glider-photo[data-active='false'] {
    display: none;
  }
  .eq-glider-sidebar .eq-photo {
    height: 120px;
  }
  .eq-glider-photo {
    margin-bottom: 16px;
  }
  .eq-mobile-status {
    display: block;
    margin-bottom: 20px;
    border: 1px solid var(--eq-border);
    border-left: 3px solid #5cc48a;
    border-radius: 12px;
    background: var(--eq-inner);
  }
  .eq-mobile-status[data-state='due'] {
    border-left-color: #ff646d;
  }
  .eq-mobile-status[data-state='pending'],
  .eq-mobile-status[data-state='incomplete'] {
    border-left-color: #f5b544;
  }
  .eq-mobile-status[data-state='unknown'] {
    border-left-color: #8794a6;
  }
  .eq-mobile-status > summary {
    cursor: pointer;
    padding: 12px;
    font-size: 13px;
  }
  .eq-mobile-status > summary strong {
    display: inline;
  }
  .eq-mobile-status > summary span {
    display: block;
    margin-top: 4px;
    color: var(--eq-muted);
  }
  .eq-mobile-status .eq-live-check {
    border: 0;
  }
  .eq-glider-panel > section {
    gap: 14px;
  }
  .eq-glider-panel .eq-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .eq-glider-names > label:nth-child(-n + 2) {
    grid-column: 1 / -1;
  }
  .eq-glider-panel .eq-form-row > fieldset {
    grid-column: 1 / -1;
  }
  .eq-glider-panel .eq-form-row:has([name='check_usage_hours']) > label {
    grid-column: 1 / -1;
  }
  .eq-interval-sentence {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .eq-interval-sentence > span {
    display: none;
  }
  .eq-interval-sentence label {
    font-size: 14px;
    gap: 8px;
  }
  .eq-interval-sentence label::after {
    top: 42px;
  }
  .eq-interval-sentence label:nth-of-type(1)::after {
    content: 'Mon.';
  }
  .eq-interval-sentence label:nth-of-type(2)::after {
    content: 'h';
  }
  .eq-glider-panel .eq-segmented .eq-choice span {
    padding: 9px 6px;
  }
  .eq-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .eq-glider-panel label {
    font-size: 12px;
  }
  .eq-glider-panel input {
    min-width: 0;
    padding: 10px;
    font-size: 14px;
  }
  .eq-split-hint,
  .eq-last-check,
  .eq-confirm-box,
  .eq-confirmed {
    flex-wrap: wrap;
  }
  .eq-usage-timeline {
    padding: 10px;
  }
  .eq-usage-timeline svg {
    min-height: 70px;
  }
  .eq-timeline-sources {
    font-size: 11px;
    gap: 8px;
  }
  .eq-timeline-sources small {
    display: none;
  }
  .eq-glider-dialog .dialog-footer {
    padding: 9px 16px max(9px, env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .eq-glider-dialog .dialog-footer > [data-eq-glider-save-reason] {
    width: 100%;
    font-size: 11px;
  }
  .eq-glider-dialog .dialog-footer > button {
    display: none;
  }
}
:root[data-theme='light'] .eq-glider-dialog {
  --eq-card: #fff;
  --eq-inner: #f4f7fb;
  --eq-border: #d5dfe9;
  --eq-text: #25354a;
  --eq-muted: #576980;
}
:root[data-theme='light'] .eq-glider-dialog .eq-confirmed {
  color: #287847;
}
:root[data-theme='light'] .eq-glider-dialog .eq-timeline-sources > div:first-child strong,
:root[data-theme='light'] .eq-glider-dialog .eq-split-hint {
  color: #916008;
}
:root[data-theme='light'] .eq-glider-dialog .eq-timeline-sources > div:last-child strong {
  color: #2468ac;
}
.eq-source-short {
  display: none;
}
.eq-glider-dialog input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.eq-glider-dialog input[type='number']::-webkit-inner-spin-button,
.eq-glider-dialog input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
@media (max-width: 700px) {
  .eq-source-long {
    display: none;
  }
  .eq-source-short {
    display: inline;
  }
  .eq-timeline-label {
    font-size: 24px;
  }
  .eq-timeline-date {
    font-size: 18px;
  }
}

/* Optional month/day precision on the glider's type plate date. */
.eq-serial-manufacture-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: start;
}
.eq-serial-manufacture-row > div {
  min-width: 0;
}
.eq-serial-manufacture-row > div > p {
  margin-top: 8px;
}
.eq-manufacture-field {
  display: grid;
  gap: 8px;
  position: relative;
}
.eq-manufacture-field > small {
  line-height: 1.5;
  font-size: 12px;
}
.eq-manufacture-field > small:empty {
  display: none;
}
.eq-manufacture-field .equipment-hint {
  margin: 0;
  color: #eeb64e;
}
.eq-manufacture-input {
  position: relative;
}
.eq-glider-dialog .eq-manufacture-input > input[type='text'] {
  padding-left: 44px;
}
.eq-manufacture-input > input[aria-invalid='true'] {
  border-color: #ff646d;
}
.eq-manufacture-picker {
  position: absolute;
  left: 10px;
  top: 10px;
}
.eq-manufacture-picker > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  list-style: none;
  color: var(--eq-muted);
}
.eq-manufacture-picker > summary::-webkit-details-marker {
  display: none;
}
.eq-manufacture-picker > summary svg {
  width: 18px;
  height: 18px;
}
.eq-manufacture-picker > summary:focus-visible {
  outline: 2px solid #5ea8f2;
  border-radius: 4px;
}
.eq-manufacture-calendar {
  position: absolute;
  z-index: 10;
  top: 34px;
  right: -146px;
  width: 300px;
  max-width: calc(100vw - 48px);
  padding: 12px;
  background: var(--eq-card);
  color: var(--eq-text);
  border: 1px solid var(--eq-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px #0004;
}
.eq-manufacture-year {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}
.eq-manufacture-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.eq-manufacture-calendar .btn {
  min-height: 36px;
  padding: 7px 5px;
  font-size: 12px;
}
.eq-manufacture-calendar .btn[aria-pressed='true'] {
  border-color: #5ea8f2;
  background: #2470c833;
}
.eq-manufacture-calendar-actions {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.eq-manufacture-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}
:root[data-theme='light'] .eq-manufacture-field .equipment-hint {
  color: #916008;
}
@media (max-width: 700px) {
  .eq-serial-manufacture-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .eq-glider-dialog .eq-manufacture-input > input[type='text'] {
    padding-left: 44px;
  }
  .eq-manufacture-calendar {
    left: -10px;
    right: auto;
  }
  .eq-manufacture-calendar .btn {
    min-height: 40px;
  }
}

/* 37i: one device-local navigation state across all application views. */
#navigation-toggle {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  margin-right: -18px;
}
#navigation-toggle:hover {
  background: var(--accent-soft);
}
#navigation-toggle .icon {
  width: 16px;
  height: 16px;
}
:root[data-nav-viewport='mobile'] #navigation-toggle,
.nav-collapse,
.nav-import-tooltip {
  display: none;
}
#navigation-backdrop[hidden] {
  display: none;
}
#navigation-backdrop {
  position: fixed;
  inset: var(--navigation-top, 70px) 0 0;
  z-index: 8;
  border: 0;
  border-radius: 0;
  background: rgba(5, 8, 12, 0.55);
}
:root.navigation-overlay-open,
:root.navigation-overlay-open body {
  overflow: hidden;
  overscroll-behavior: none;
}
:root:not([data-nav-viewport='mobile']) #navigation {
  --navigation-width: 200px;
  top: var(--navigation-top, 70px);
  bottom: 0;
  right: auto;
  width: var(--navigation-width);
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 12px 0;
  gap: 4px;
  border-top: 0;
  border-right: 1px solid var(--border);
  transition:
    width 150ms ease-out,
    transform 150ms ease-out;
}
:root:not([data-nav-viewport='mobile']) #navigation .nav-button {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  justify-content: flex-start;
  width: calc(100% - 16px);
  min-height: 34px;
  height: auto;
  margin: 0 8px;
  padding: 7px 8px;
  gap: 8px;
  border-radius: 8px;
}
:root:not([data-nav-viewport='mobile']) #navigation .icon {
  width: 16px;
  height: 16px;
}
:root:not([data-nav-viewport='mobile']) #navigation .nav-button span {
  position: static;
  opacity: 1;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  white-space: normal;
  pointer-events: none;
}
:root:not([data-nav-viewport='mobile']) #navigation .nav-button.active {
  background: var(--accent-soft);
  color: var(--accent);
}
:root:not([data-nav-viewport='mobile']) #navigation .mobile-more {
  display: none;
}
:root:not([data-nav-viewport='mobile']) #navigation .nav-collapse {
  margin-top: auto;
}
:root:not([data-nav-viewport='mobile']) #navigation .nav-bottom {
  margin-top: 0;
  margin-bottom: 0;
}
.nav-collapse-symbol {
  width: 16px;
  font-size: 20px;
  line-height: 16px;
  text-align: center;
  font-weight: 400;
}
:root:not([data-nav-viewport='mobile']) #navigation .cockpit-dropzone {
  display: flex;
  position: relative;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: calc(100% - 16px);
  min-height: 32px;
  margin: 8px;
  padding: 6px;
  gap: 4px;
  border-radius: 8px;
  font-size: 11px;
}
:root:not([data-nav-viewport='mobile']) #navigation .cockpit-dropzone > span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root[data-nav-viewport='desktop'] #main {
  min-width: 0;
  max-width: 1328px;
  margin-left: 200px;
  margin-right: auto;
  padding: 24px;
  transition: margin-left 150ms ease-out;
}
:root[data-nav-state='rail'] #navigation {
  --navigation-width: 56px;
}
:root[data-nav-state='rail'] #main {
  margin-left: 56px;
}
:root[data-nav-state='rail'] #navigation .nav-button {
  justify-content: center;
}
:root[data-nav-state='rail'] #navigation .nav-button span,
:root[data-nav-state='rail'] #navigation .nav-import-tooltip {
  display: block;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  max-width: 240px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--solid);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0s;
  z-index: 1;
}
:root[data-nav-state='rail']
  #navigation
  :is(.nav-button, .cockpit-dropzone):is(:hover, :focus-visible)
  span {
  opacity: 1;
  transition-delay: 300ms;
}
:root[data-nav-state='rail']
  #navigation.tooltips-ready
  :is(.nav-button, .cockpit-dropzone):is(:hover, :focus-visible)
  span {
  transition-delay: 0s;
}
:root[data-nav-state='rail'] #navigation .cockpit-dropzone > span:first-of-type {
  display: none;
}
:root[data-nav-state='rail'] #navigation .cockpit-dropzone {
  border: 0;
  margin-top: 8px;
  margin-bottom: 8px;
}
:root[data-nav-viewport='overlay'] #main {
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
}
:root[data-nav-viewport='overlay'] #navigation .nav-collapse {
  display: none;
}
:root[data-nav-viewport='overlay'] #navigation .nav-bottom {
  margin-top: auto;
}
:root[data-nav-state='hidden'] #navigation {
  transform: translateX(-100%);
  visibility: hidden;
  transition:
    transform 150ms ease-out,
    visibility 0s 150ms;
}
:root[data-nav-state='overlay'] #navigation {
  transform: translateX(0);
  overflow-y: auto;
}
.navigation-mode-control {
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.navigation-mode-control button {
  min-height: 28px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}
.account-settings-row:has(.navigation-mode-control) {
  flex-wrap: wrap;
}
.account-settings-row:has(.navigation-mode-control) .account-row-action {
  margin-left: auto;
  max-width: 100%;
}
:root:not([data-nav-viewport='desktop']) .navigation-mode-control button {
  min-height: 40px;
}
@media (prefers-reduced-motion: reduce) {
  :root #navigation,
  :root #main {
    transition: none;
  }
}

/* Keep the search in its own header column when adding the leading toggle. */
:root:not([data-nav-viewport='mobile']) .header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
}
:root:not([data-nav-viewport='mobile']) #navigation-toggle {
  margin-right: 0;
}
:root[data-nav-viewport='overlay'] .header {
  grid-template-columns: 32px auto minmax(0, 1fr) auto;
}
:root[data-nav-viewport='overlay'] .global-search {
  width: 100%;
  min-width: 0;
}
:root[data-nav-viewport='mobile'] #navigation .nav-collapse {
  display: none;
}
:root[data-nav-state='expanded'] #navigation {
  overflow-y: auto;
}

/* Flight book 37e: compact toolbar, a single statistics row and monthly lists. */
.flight-book.compact-flight-book {
  gap: 16px;
  min-width: 0;
}
.flight-book.compact-flight-book:has(.book-timeline) {
  padding-right: 0;
}
.flight-book.compact-flight-book .book-timeline,
.flight-book.compact-flight-book .book-scrubber {
  display: none;
}
.flight-book.compact-flight-book .card {
  border-radius: 12px;
}
.flight-book.compact-flight-book .book-heading {
  position: static;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  gap: 8px 16px;
}
.flight-book.compact-flight-book .book-heading h1 {
  font-size: 22px;
  letter-spacing: -0.4px;
}
.flight-book.compact-flight-book .book-heading p {
  margin: 0;
  font-size: 13px;
}
.flight-book.compact-flight-book .book-heading > .segment {
  width: auto;
  margin-left: auto;
  flex-shrink: 0;
}
.flight-book.compact-flight-book .book-heading .actions {
  position: static;
  width: auto;
  gap: 8px;
  margin: 0;
}
.flight-book.compact-flight-book .btn {
  --button-height: 32px;
  font-size: 12px;
  border-radius: 8px;
}
:root
  .flight-book.compact-flight-book
  .btn:not(.text):not([data-replay-toggle]):not(.flight-map-fullscreen) {
  height: auto;
  min-height: var(--button-height);
  padding: 4px 12px;
}
.flight-book.compact-flight-book .book-heading [data-export] {
  width: 32px;
  min-width: 32px;
  padding: 4px;
  font-size: 0;
  border-color: transparent;
  background: transparent;
}
.flight-book.compact-flight-book .book-heading [data-export] .icon {
  width: 16px;
  height: 16px;
  margin: 0;
}
.flight-book.compact-flight-book .segment {
  min-height: 28px;
  padding: 2px;
  gap: 0;
  border-radius: 8px;
}
.flight-book.compact-flight-book .segment button {
  flex: 1;
  min-height: 24px;
  border-radius: 6px;
  padding: 2px 12px;
  font-size: 12px;
}
.flight-book.compact-flight-book .book-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  align-items: start;
  gap: 8px;
  margin-bottom: -8px;
  min-width: 0;
}
.flight-book.compact-flight-book .book-search {
  position: static;
  display: flex;
  min-height: 32px;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 4px 12px;
  gap: 8px;
  border-radius: 8px;
  border-color: var(--border);
}
.flight-book.compact-flight-book .book-search > .icon {
  width: 14px;
  height: 14px;
}
.flight-book.compact-flight-book .book-search input {
  min-width: 0;
  height: auto;
  padding: 0;
  font-size: 13px;
}
.flight-book.compact-flight-book .book-search-key {
  display: block;
  min-width: 20px;
  min-height: 20px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 11px;
}
.flight-book.compact-flight-book .book-year {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding-left: 8px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 12px;
  background: var(--book-card);
}
.flight-book.compact-flight-book .book-year select {
  min-height: 30px;
  height: auto;
  width: auto;
  max-width: 120px;
  padding: 4px 8px;
  border: 0;
  background: none;
  font-size: 12px;
}
.flight-book.compact-flight-book .book-toolbar > #sort {
  width: auto;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  background: var(--book-card);
}
.flight-book.compact-flight-book .book-filter-menu {
  position: relative;
  margin: 0;
  min-width: 0;
}
.flight-book.compact-flight-book .book-filter-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--solid);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}
.flight-book.compact-flight-book .book-filter-menu > summary::-webkit-details-marker {
  display: none;
}
.flight-book.compact-flight-book .book-filter-menu > summary .icon {
  width: 14px;
  height: 14px;
}
.flight-book.compact-flight-book .book-filter-menu[open] > summary {
  border-color: var(--accent);
}
.flight-book.compact-flight-book .book-filter-panel {
  position: absolute;
  z-index: 7;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  background: var(--solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px #0003;
}
.flight-book.compact-flight-book .book-filter-panel .book-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.flight-book.compact-flight-book .book-filter-panel select {
  width: 100%;
  max-width: none;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px !important;
  font-size: 12px;
}
.flight-book.compact-flight-book .book-filter-panel .collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
}
.flight-book.compact-flight-book .book-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
}
.flight-book.compact-flight-book #book-active-filters:not(:empty) {
  display: contents;
}
.flight-book.compact-flight-book .book-quick .book-photo-filter,
.flight-book.compact-flight-book .book-quick .book-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  white-space: normal;
}
.flight-book.compact-flight-book .book-quick .book-filter-chip,
.flight-book.compact-flight-book .book-photo-filter.selected {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}
.flight-book.compact-flight-book .book-photo-filter.selected::after {
  content: '×';
}
.flight-book.compact-flight-book .book-quick .icon {
  width: 14px;
  height: 14px;
}
:root .flight-book.compact-flight-book .book-quick > [data-reset-filters] {
  margin-left: auto;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--text);
}
.flight-book.compact-flight-book .book-kpis {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 44px;
  padding: 8px 14px;
}
.flight-book.compact-flight-book .book-kpis article {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  padding: 0;
  gap: 4px;
  border: 0;
  background: none;
}
.flight-book.compact-flight-book .book-kpis strong {
  display: inline;
  margin: 0;
  font:
    600 20px/1.4 'Geist Mono',
    monospace;
  white-space: normal;
}
.flight-book.compact-flight-book .book-kpis small {
  display: inline;
  font-size: 12px;
}
.flight-book.compact-flight-book .book-kpis button {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
}
.flight-book.compact-flight-book .book-kpi-context {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.flight-book.compact-flight-book:not(.map-book) #filtered-summary .filtered-summary {
  display: none;
}
.flight-book.compact-flight-book:not(.map-book)
  #filtered-summary:has(> .filtered-summary:only-child),
.flight-book.compact-flight-book #bulk-toolbar[hidden] {
  display: none;
}
.flight-book.compact-flight-book .book-month {
  margin-bottom: 16px;
}
.flight-book.compact-flight-book .book-month > summary {
  min-height: 40px;
  padding: 8px 12px;
  gap: 8px;
}
.flight-book.compact-flight-book .book-month-name,
.flight-book.compact-flight-book .book-month:not([open]) .book-month-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  gap: 4px 12px;
  font-size: 14px;
}
.flight-book.compact-flight-book .book-month-name small {
  margin: 0 !important;
  font:
    12px Geist,
    sans-serif;
  white-space: normal;
}
.flight-book.compact-flight-book .book-calendar,
.flight-book.compact-flight-book .book-month-award {
  display: none;
}
.flight-book.compact-flight-book .book-columns {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 110px 90px 90px;
  gap: 16px;
  padding: 6px 56px 6px 48px;
  font-size: 11px;
}
.flight-book.compact-flight-book .book-columns > span:nth-last-child(-n + 2) {
  text-align: right;
}
.flight-book.compact-flight-book .book-row {
  display: grid;
  grid-template-columns: 20px 40px 56px minmax(0, 1fr) 110px 196px 24px;
  gap: 16px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.flight-book.compact-flight-book .book-row .book-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: auto;
  grid-row: auto;
  width: 56px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--map);
  overflow: hidden;
}
.flight-book.compact-flight-book .book-row .book-thumbnail .cockpit-thumbnail {
  display: block;
  width: 56px;
  height: 32px;
  background: none;
}
.flight-book.compact-flight-book .book-row .book-thumbnail path {
  stroke: var(--accent);
}
.flight-book.compact-flight-book .book-columns > span:nth-child(2) {
  padding-left: 72px;
}
.flight-book.compact-flight-book .book-row .date-block {
  grid-column: auto;
  grid-row: auto;
  padding: 0;
  margin: 0;
}
.flight-book.compact-flight-book .book-row .date-block strong {
  font-size: 14px;
}
.flight-book.compact-flight-book .book-row .date-block small {
  font-size: 11px;
}
.flight-book.compact-flight-book .book-row-name {
  display: block;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  padding: 0;
}
.flight-book.compact-flight-book .book-row-name > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.flight-book.compact-flight-book .book-row .flight-title {
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.flight-book.compact-flight-book .book-type {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}
.flight-book.compact-flight-book .book-row .book-time,
.flight-book.compact-flight-book .book-row .book-row-wing {
  display: inline;
  font-size: 11px !important;
  margin: 0 !important;
  white-space: normal;
}
.flight-book.compact-flight-book .book-row .book-row-wing::before {
  content: ' · ';
}
.flight-book.compact-flight-book .book-row .book-end {
  display: inline;
}
.flight-book.compact-flight-book .book-row .book-media {
  position: static;
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  transform: none;
  margin-left: 8px;
}
.flight-book.compact-flight-book .book-row .book-record {
  padding: 0 6px;
  min-height: 20px;
  border-radius: 6px;
  font-size: 11px;
}
.flight-book.compact-flight-book .book-row .book-record span {
  display: none;
}
.flight-book.compact-flight-book .book-row-share {
  display: block;
  height: 4px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.flight-book.compact-flight-book .book-row-share > i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.flight-book.compact-flight-book .book-row .book-measures {
  display: grid;
  grid-column: auto;
  grid-row: auto;
  grid-template-columns: 90px 90px;
  gap: 16px;
  margin: 0;
}
.flight-book.compact-flight-book .book-row .book-number {
  font:
    500 13px/1.4 'Geist Mono',
    monospace;
  text-align: right;
  white-space: normal;
}
.flight-book.compact-flight-book .book-row .metric-bar {
  display: none;
}
.flight-book.compact-flight-book .book-row > .icon-button {
  display: inline-flex;
  width: 24px;
  height: auto;
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
}
.flight-book.compact-flight-book .book-row .flight-selection {
  position: static;
  display: flex;
  opacity: 1;
  width: 20px;
  min-height: 28px;
  justify-content: center;
  grid-column: auto;
  grid-row: auto;
}
.flight-book.compact-flight-book .book-row .flight-selection input {
  width: 18px;
  height: 18px;
}
@media (max-width: 1100px) {
  .flight-book.compact-flight-book .book-row {
    grid-template-columns: 20px 32px 56px minmax(0, 1fr) 72px 156px 24px;
    gap: 8px;
  }
  .flight-book.compact-flight-book .book-row .book-measures {
    grid-template-columns: 74px 74px;
    gap: 8px;
  }
  .flight-book.compact-flight-book .book-columns {
    grid-template-columns: 32px minmax(0, 1fr) 72px 74px 74px;
    padding: 6px 44px 6px 40px;
    gap: 8px;
  }
  .flight-book.compact-flight-book .book-columns > span:nth-child(2) {
    padding-left: 64px;
  }
}
@media (max-width: 767px) {
  body:has(.flight-book.compact-flight-book) #main {
    padding: 16px 16px
      calc(var(--mobile-navigation-height, 64px) + 80px + env(safe-area-inset-bottom));
  }
  .flight-book.compact-flight-book .book-heading > .segment {
    margin: 0;
    order: 3;
    flex-basis: 100%;
  }
  .flight-book.compact-flight-book .segment button {
    min-height: 40px;
    padding: 4px 8px;
  }
  .flight-book.compact-flight-book .book-heading .actions {
    position: fixed;
    top: auto;
    z-index: 8;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-navigation-height, 64px) + env(safe-area-inset-bottom));
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    background: var(--panel);
  }
  .flight-book.compact-flight-book .btn {
    --button-height: 40px;
  }
  .flight-book.compact-flight-book .book-heading [data-export] {
    display: inline-flex;
    width: 40px;
    min-width: 40px;
  }
  .flight-book.compact-flight-book .book-toolbar {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }
  .flight-book.compact-flight-book .book-search {
    grid-column: 1 / -1;
    min-height: 40px;
  }
  .flight-book.compact-flight-book .book-search input {
    font-size: 14px;
  }
  .flight-book.compact-flight-book .book-search-key {
    display: none;
  }
  .flight-book.compact-flight-book .book-year,
  .flight-book.compact-flight-book .book-year select,
  .flight-book.compact-flight-book .book-toolbar > #sort,
  .flight-book.compact-flight-book .book-filter-menu > summary,
  .flight-book.compact-flight-book .book-filter-panel select {
    min-height: 40px;
  }
  .flight-book.compact-flight-book .book-quick .book-photo-filter,
  .flight-book.compact-flight-book .book-quick .book-filter-chip,
  :root .flight-book.compact-flight-book .book-quick > [data-reset-filters] {
    min-height: 40px;
  }
  .flight-book.compact-flight-book .book-kpis {
    gap: 8px 16px;
    padding: 12px;
  }
  .flight-book.compact-flight-book .book-kpis article {
    display: flex;
  }
  .flight-book.compact-flight-book .book-kpis article:nth-child(4) {
    min-height: 40px;
  }
  .flight-book.compact-flight-book .book-kpis article:nth-child(4) button {
    min-height: 40px;
  }
  .flight-book.compact-flight-book .book-kpi-context {
    width: 100%;
    margin-left: 0;
  }
  .flight-book.compact-flight-book .book-columns,
  .flight-book.compact-flight-book .book-row-share {
    display: none;
  }
  .flight-book.compact-flight-book .book-row {
    grid-template-columns: 24px 40px minmax(0, 1fr) 72px;
    gap: 4px 8px;
    padding: 8px;
  }
  .flight-book.compact-flight-book .book-row .flight-selection {
    width: 24px;
    min-height: 40px;
  }
  .flight-book.compact-flight-book .book-row .flight-selection input {
    width: 20px;
    height: 20px;
  }
  .flight-book.compact-flight-book .book-row .book-measures {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .flight-book.compact-flight-book .book-row .book-number {
    font-size: 12px;
  }
  .flight-book.compact-flight-book .book-row > .icon-button {
    grid-column: 4;
    min-height: 40px;
    min-width: 40px;
    justify-self: end;
  }
  .flight-book.compact-flight-book .book-row-name {
    grid-column: 3;
    grid-row: span 2;
  }
  .flight-book.compact-flight-book .book-row .book-media {
    display: flex;
    margin-left: 0;
    margin-top: 4px;
  }
  .flight-book.compact-flight-book .book-row .book-photo-count > span,
  .flight-book.compact-flight-book .book-row .book-video-count > span {
    display: none;
  }
  .flight-book.compact-flight-book .book-row .book-type {
    font-size: 11px;
  }
  body:has(.flight-book.compact-flight-book) #toast {
    bottom: calc(var(--mobile-navigation-height, 64px) + 64px + env(safe-area-inset-bottom));
  }
}
.flight-book.compact-flight-book .book-filter-panel {
  max-height: min(560px, calc(100dvh - 220px));
  overflow: auto;
}
.flight-book.compact-flight-book .book-filter-panel .book-timeline {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  max-height: none;
  margin-top: 16px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: none;
  overflow: visible;
}
.flight-book.compact-flight-book .book-timeline strong {
  width: 100%;
  text-align: left;
  margin-bottom: 4px;
}
.flight-book.compact-flight-book .book-timeline button {
  width: auto;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.flight-book.compact-flight-book .book-timeline button:not(:disabled):hover {
  background: var(--accent-soft);
  color: var(--text);
}
.flight-book.compact-flight-book .book-timeline button i {
  display: none;
}
.flight-book.compact-flight-book .book-timeline hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
}
@media (max-width: 767px) {
  .flight-book.compact-flight-book .book-quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 0 4px;
  }
  .flight-book.compact-flight-book .book-quick button {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .flight-book.compact-flight-book .book-timeline button {
    min-height: 40px;
  }
}
/* A real available update stays a narrow banner; update safety logic is unchanged. */
body:has(.flight-book.compact-flight-book) .update-banner {
  top: calc(var(--navigation-top, 70px) + 16px);
  bottom: auto;
  right: 24px;
  left: 24px;
  max-width: 1280px;
  width: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--solid);
  font-size: 12px;
}
body:has(.flight-book.compact-flight-book) .update-banner[hidden] {
  display: none;
}
body:has(.flight-book.compact-flight-book) .update-banner > div {
  margin: 0 0 0 auto;
  gap: 8px;
}
body:has(.flight-book.compact-flight-book) .update-banner .btn {
  --button-height: 28px;
  font-size: 12px;
}
body:has(.flight-book.compact-flight-book) .update-feedback:not(:empty) {
  flex-basis: 100%;
  font-size: 12px;
}
body:has(.update-banner:not([hidden])) .flight-book.compact-flight-book {
  margin-top: 64px;
}
:root[data-nav-state='expanded'] body:has(.flight-book.compact-flight-book) .update-banner {
  left: 224px;
}
:root[data-nav-state='rail'] body:has(.flight-book.compact-flight-book) .update-banner {
  left: 80px;
}
@media (max-width: 767px) {
  body:has(.flight-book.compact-flight-book) .update-banner {
    left: 16px;
    right: 16px;
  }
  body:has(.flight-book.compact-flight-book) .update-banner .btn {
    --button-height: 40px;
  }
  body:has(.update-banner:not([hidden])) .flight-book.compact-flight-book {
    margin-top: 112px;
  }
}

@media (max-width: 767px) {
  .flight-book.compact-flight-book .book-heading .actions [data-add] {
    width: auto;
    min-width: 40px;
    border-radius: 8px;
    font-size: 12px;
    padding: 4px 12px;
  }
  .flight-book.compact-flight-book .book-heading .actions [data-add] > .icon {
    width: 16px;
    height: 16px;
  }
  .flight-book.compact-flight-book .book-heading .actions > [data-export] {
    border-radius: 8px;
    padding: 4px;
  }
  .flight-book.compact-flight-book .book-heading .actions > [data-export] > .icon {
    width: 16px;
    height: 16px;
  }
}
@media (max-width: 767px) {
  .flight-book.compact-flight-book .book-row .flight-selection {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .flight-book.compact-flight-book .book-row .date-block {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .flight-book.compact-flight-book .book-row .book-row-name {
    grid-column: 3;
    grid-row: 1 / 3;
  }
  .flight-book.compact-flight-book .book-row .book-measures {
    grid-column: 4;
    grid-row: 1;
  }
  .flight-book.compact-flight-book .book-row > .icon-button {
    grid-column: 4;
    grid-row: 2;
  }
}
@media (max-width: 767px) {
  .flight-book.compact-flight-book:has(#bulk-toolbar .bulk-toolbar) .book-row .flight-selection {
    grid-row: 1 / 3;
    background: none;
  }
  .flight-book.compact-flight-book:has(#bulk-toolbar .bulk-toolbar) .book-row .date-block {
    visibility: visible;
  }
}
@media (max-width: 767px) {
  .flight-book.compact-flight-book .book-row .flight-selection {
    width: 40px;
    margin-left: -8px;
  }
}
@media (max-width: 380px) {
  .flight-book.compact-flight-book .book-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .flight-book.compact-flight-book .book-filter-menu {
    grid-column: 1 / -1;
  }
  .flight-book.compact-flight-book .book-toolbar > #sort {
    width: 100%;
    min-width: 0;
  }
  .flight-book.compact-flight-book .book-year {
    min-width: 0;
  }
  .flight-book.compact-flight-book .book-year select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .flight-book.compact-flight-book .book-row .book-thumbnail {
    grid-column: 2;
    grid-row: 2;
    width: 40px;
    height: 40px;
    background: none;
  }
  .flight-book.compact-flight-book .book-row .book-thumbnail .cockpit-thumbnail {
    width: 40px;
    height: 28px;
    border-radius: 6px;
    background: var(--map);
  }
  .flight-book.compact-flight-book .book-row .date-block {
    grid-row: 1;
  }
}

/* Flight detail 37f: compact chrome, unified cards and more space for the replay. */
dialog.detail-dialog .dialog-head h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 22px;
  letter-spacing: -0.4px;
}
dialog.detail-dialog .flight-title-type {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  line-height: 1.5;
}
dialog.detail-dialog .dialog-head p {
  font-size: 12px;
  line-height: 1.5;
}
dialog.detail-dialog .flight-view-tabs {
  gap: 0;
  padding: 2px;
  border-radius: 8px;
}
dialog.detail-dialog .flight-view-tabs button {
  border-radius: 6px;
}
dialog.detail-dialog .flight-view-tabs button[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--text);
}
dialog.detail-dialog .flight-summary {
  gap: 8px 24px;
  padding: 8px 24px;
  margin-bottom: 16px;
}
dialog.detail-dialog .flight-summary small {
  font-size: 12px;
}
dialog.detail-dialog .flight-summary strong {
  font:
    600 20px/1.4 'Geist Mono',
    monospace;
}
dialog.detail-dialog .detail-layout {
  gap: 16px;
}
dialog.detail-dialog .flight-replay-stage,
dialog.detail-dialog .flight-highlights,
dialog.detail-dialog .flight-file-card,
dialog.detail-dialog .flight-data-card,
dialog.detail-dialog .ln-flight-replay,
dialog.detail-dialog .flight-journal-preview {
  border-radius: 12px;
}
dialog.detail-dialog .flight-replay-column {
  gap: 16px;
}
dialog.detail-dialog .flight-detail-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
dialog.detail-dialog .flight-detail-side > * {
  margin: 0;
}
dialog.detail-dialog .flight-highlights,
dialog.detail-dialog .ln-flight-replay {
  padding: 0;
  border-color: var(--border);
  background: var(--surface);
}
dialog.detail-dialog .flight-highlights-heading,
dialog.detail-dialog .ln-flight-replay > header,
dialog.detail-dialog .flight-preview-heading,
dialog.detail-dialog .flight-data-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
dialog.detail-dialog .flight-highlights-heading h3,
dialog.detail-dialog .ln-flight-replay h3,
dialog.detail-dialog .flight-preview-heading h3,
dialog.detail-dialog .flight-data-header h3 {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
dialog.detail-dialog .ln-flight-replay > header > .icon {
  display: none;
}
dialog.detail-dialog .ln-flight-replay .ln-flight-learning-list {
  padding: 12px;
}
dialog.detail-dialog .ln-flight-replay .ln-flight-empty {
  font-size: 12px;
  margin: 0;
}
dialog.detail-dialog .ln-flight-replay > footer {
  gap: 8px;
  padding: 0 12px 12px;
  border-top: 0;
}
dialog.detail-dialog .ln-flight-replay > footer .btn {
  --button-height: 28px;
  flex: 0 1 auto;
  font-size: 12px;
}
dialog.detail-dialog .ln-flight-replay > footer .btn.primary {
  color: var(--text);
  border-color: var(--border);
  background: var(--solid);
}
dialog.detail-dialog .flight-analysis-link {
  padding: 0;
  margin: 0;
  min-height: 28px;
  font-size: 12px;
  white-space: nowrap;
}
dialog.detail-dialog .flight-highlight {
  width: calc(100% - 24px);
  margin: 12px;
  padding: 8px;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--solid);
}
dialog.detail-dialog .flight-highlight strong,
dialog.detail-dialog .flight-highlight small {
  display: inline;
  margin: 0;
  font-size: 12px;
}
dialog.detail-dialog .flight-highlight small::before {
  content: ' · ';
}
dialog.detail-dialog .flight-highlights > .muted {
  padding: 12px;
  font-size: 12px;
}
dialog.detail-dialog .flight-journal-preview {
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}
dialog.detail-dialog .flight-journal-preview .journal-feed-compact {
  border: 0;
  border-radius: 0;
  background: none;
}
dialog.detail-dialog .flight-preview-heading .btn {
  --button-height: 28px;
  border: 0;
  padding: 0 4px;
  font-size: 12px;
  background: none;
  color: var(--text);
}
dialog.detail-dialog .flight-journal-preview .journal-post-head {
  display: none;
}
dialog.detail-dialog .flight-journal-preview .journal-entry-text h3 {
  display: none;
}
dialog.detail-dialog .flight-journal-preview .journal-prose {
  -webkit-line-clamp: 3;
  font-size: 12px;
  line-height: 1.5;
}
dialog.detail-dialog .flight-journal-preview .journal-slide {
  aspect-ratio: auto;
  height: 96px;
}
dialog.detail-dialog .flight-journal-preview .journal-post-actions {
  padding: 4px 12px !important;
}
dialog.detail-dialog .flight-file-card {
  padding: 12px;
}
dialog.detail-dialog .flight-file-card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
dialog.detail-dialog .flight-data-card {
  padding: 0 16px 16px;
}
dialog.detail-dialog .flight-data-header {
  margin: 0 -16px 12px;
}
dialog.detail-dialog .flight-data-route {
  padding: 12px;
  gap: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
dialog.detail-dialog .flight-route-time {
  font-size: 20px;
}
dialog.detail-dialog .flight-route-place {
  font-size: 14px;
}
dialog.detail-dialog .flight-data-columns {
  gap: 16px;
}
@media (min-width: 901px) {
  dialog.detail-dialog:not(.replay-expanded) {
    --flight-map-height: clamp(280px, calc(100dvh - 320px), 560px);
  }
  dialog.detail-dialog .dialog-head {
    --flight-header-control-height: 32px;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    padding: 8px 16px;
    gap: 8px;
  }
  dialog.detail-dialog .dialog-body {
    padding: 0 24px 24px;
  }
  dialog.detail-dialog .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 28%);
  }
  dialog.detail-dialog .flight-view-tabs button {
    height: auto;
    min-height: 24px;
    max-height: none;
    padding: 2px 12px;
  }
  dialog.detail-dialog .flight-map-modes {
    top: 12px;
    left: 12px;
    padding: 2px;
    border-radius: 8px;
    max-width: calc(100% - 240px);
    flex-wrap: wrap;
  }
  dialog.detail-dialog .flight-map-modes button {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 6px;
  }
  dialog.detail-dialog:not(.replay-expanded) .flight-replay-dock {
    padding: 8px 12px;
  }
  dialog.detail-dialog:not(.replay-expanded) .replay-actions {
    gap: 8px;
  }
  dialog.detail-dialog:not(.replay-expanded) .replay-actions .btn {
    --button-height: 28px;
    min-height: 28px;
    border-radius: 8px;
  }
  dialog.detail-dialog:not(.replay-expanded) .replay-actions [data-replay-toggle] {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 6px;
  }
  dialog.detail-dialog:not(.replay-expanded) .flight-main-chart {
    padding: 4px 12px 12px;
  }
  dialog.detail-dialog:not(.replay-expanded) .flight-main-chart .altitude {
    height: 160px;
  }
  dialog.detail-dialog .flight-chart-buttons {
    padding: 2px;
    gap: 0;
    border-radius: 8px;
  }
  dialog.detail-dialog .flight-chart-buttons button,
  dialog.detail-dialog .flight-tempo-buttons button {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 6px;
  }
  dialog.detail-dialog .flight-replay-hud {
    gap: 4px;
  }
  dialog.detail-dialog .flight-replay-hud > div {
    padding: 4px 8px;
    border-radius: 8px;
  }
  dialog.detail-dialog .flight-replay-hud strong {
    font-size: 14px;
  }
}
@media (max-width: 900px) {
  dialog.detail-dialog .flight-detail-side {
    gap: 16px;
  }
  dialog.detail-dialog .flight-preview-heading .btn,
  dialog.detail-dialog .ln-flight-replay > footer .btn {
    --button-height: 40px;
  }
  dialog.detail-dialog .flight-analysis-link,
  dialog.detail-dialog .flight-data-edit,
  dialog.detail-dialog .flight-file-details > summary {
    min-height: 40px;
  }
  dialog.detail-dialog .flight-data-edit {
    min-width: 40px;
  }
  dialog.detail-dialog .flight-view-tabs button {
    min-height: 40px;
    height: auto;
    max-height: none;
  }
}
@media (min-width: 901px) {
  :root dialog.detail-dialog .dialog-head .flight-view-tabs > button {
    --flight-header-control-height: 24px;
    max-height: none;
  }
  dialog.detail-dialog .flight-view-tabs {
    padding: 1px;
  }
  dialog.detail-dialog:not(.replay-expanded) [data-replay-charts]:not(.flight-main-chart) {
    padding: 12px;
  }
  dialog.detail-dialog:not(.replay-expanded)
    [data-replay-charts]:not(.flight-main-chart)
    .altitude
    svg {
    display: block;
    width: 100%;
    max-height: 160px;
  }
}
@media (max-width: 900px) {
  dialog.detail-dialog .dialog-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
  }
  dialog.detail-dialog .dialog-head .flight-detail-identity {
    order: 1;
    min-width: 0;
    flex: 1;
  }
  dialog.detail-dialog .dialog-head .flight-nav-group {
    min-width: 0;
    order: 0;
    flex: 0 0 auto;
  }
  dialog.detail-dialog .dialog-head .flight-close {
    order: 2;
  }
  dialog.detail-dialog .flight-view-tabs {
    order: 3;
    flex: 0 1 auto;
    margin: 0 auto 0 0;
  }
  dialog.detail-dialog .flight-header-actions {
    order: 4;
    width: auto;
    margin: 0 0 0 auto;
    padding: 0;
    gap: 4px;
    overflow: visible;
  }
  :root
    dialog.detail-dialog
    .dialog-head
    :is(
      .flight-nav,
      .flight-close,
      .flight-header-actions > .btn,
      .flight-detail-actions > summary,
      .flight-view-tabs > button
    ) {
    --flight-header-control-height: 40px;
    --button-height: 40px;
    min-height: 40px;
    height: auto;
    max-height: none;
  }
  dialog.detail-dialog .flight-view-tabs > button {
    padding-inline: 8px;
    font-size: 12px;
  }
  :root dialog.detail-dialog .dialog-head .flight-header-actions > .btn {
    width: 40px;
    min-width: 40px;
    padding: 4px;
    font-size: 0;
  }
  dialog.detail-dialog .flight-header-actions > .btn .icon {
    width: 16px;
    height: 16px;
    margin: 0;
  }
  dialog.detail-dialog .flight-summary {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding: 8px 16px;
    margin-bottom: 16px;
  }
  dialog.detail-dialog .flight-summary > div,
  dialog.detail-dialog .flight-summary-flight > div,
  dialog.detail-dialog .flight-summary-hike > div {
    flex-shrink: 0;
  }
}

@media (max-width: 900px) {
  dialog.detail-dialog .flight-summary {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }
}
@media (max-width: 900px) {
  dialog.detail-dialog .dialog-head .flight-detail-identity {
    flex: 1 1 calc(100% - 138px);
  }
}
dialog.detail-dialog .flight-summary > div:nth-child(5) strong {
  color: var(--ok);
}
dialog.detail-dialog .flight-analysis-link {
  color: var(--accent);
}

/* 38b: mobile navigation, creation sheet and unified local search. */
.mobile-page-bar,
.mobile-new {
  display: none;
}
@media (max-width: 767px) {
  :root {
    --mobile-navigation-height: 64px;
  }
  :root .header,
  :root body:has(.cockpit) .header {
    display: block;
    min-height: 48px;
    height: auto;
    padding: env(safe-area-inset-top) 8px 0 16px;
  }
  :root .header > :not(.mobile-page-bar) {
    display: none;
  }
  .mobile-page-bar {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: 4px;
  }
  .mobile-page-title {
    flex: 1;
    min-width: 0;
    font-size: 22px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-page-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: 8px;
  }
  .mobile-page-bar button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .mobile-page-bar .icon {
    width: 20px;
    height: 20px;
  }
  :root #navigation {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: minmax(48px, auto);
    align-items: stretch;
    height: auto;
    min-height: 64px;
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    gap: 0;
    background: var(--panel);
    border-top: 1px solid var(--border);
  }
  :root
    #navigation
    > :not(
      [data-view='overview'],
      [data-view='flights'],
      [data-view='learnings'],
      .mobile-new,
      .mobile-more
    ) {
    display: none;
  }
  :root #navigation .nav-button {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 44px;
    min-height: 48px;
    height: auto;
    margin: 0;
    padding: 4px 0;
    gap: 4px;
    border: 0;
    position: relative;
  }
  :root
    #navigation
    > .nav-button:is(
      [data-view='overview'],
      [data-view='flights'],
      [data-view='learnings'],
      .mobile-new,
      .mobile-more
    ) {
    display: flex;
  }
  :root #navigation .nav-button.active {
    background: transparent;
  }
  #navigation [data-view='overview'] {
    order: 1;
  }
  #navigation [data-view='flights'] {
    order: 2;
  }
  #navigation .mobile-new {
    order: 3;
  }
  #navigation [data-view='learnings'] {
    order: 4;
  }
  #navigation .mobile-more {
    order: 5;
  }
  :root #navigation .nav-button .icon {
    width: 20px;
    height: 20px;
  }
  :root #navigation .nav-button span {
    display: block;
    position: static;
    left: auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    opacity: 1;
    font-size: 10px;
    line-height: 1.2;
  }
  :root #navigation .mobile-new .icon {
    box-sizing: content-box;
    padding: 6px 12px;
    margin-top: -4px;
    border-radius: 12px;
    background: #2470c8;
    color: white;
  }
  :root .pwa-install {
    display: none;
  }
  #navigation .has-due-checks::after {
    content: '';
    position: absolute;
    top: 4px;
    left: calc(50% + 10px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warning, #f0b44c);
  }
  :root.mobile-nested-view #navigation,
  :root:has(dialog[open]) #navigation {
    display: none;
  }
  :root.mobile-nested-view,
  :root:has(dialog[open]) {
    --mobile-navigation-height: 0px;
  }
  :root main,
  :root body:has(.cockpit) main {
    padding-top: 8px;
    padding-bottom: calc(var(--mobile-navigation-height) + 24px + env(safe-area-inset-bottom));
  }
  :root main > :is(.cockpit, .flight-book, .ln-page) > .page-heading > div:first-child,
  :root main > .ln-page > .page-heading [data-ln-new],
  :root main > .flight-book > .page-heading [data-add],
  :root main .cockpit-primary-actions,
  :root main .cockpit-empty [data-add],
  :root main .flight-book .empty [data-add] {
    display: none;
  }
  :root main :is(.cockpit-heading, .book-heading, .ln-page > .page-heading) {
    min-height: 0;
    margin-bottom: 8px;
    padding-block: 0;
  }
  :root main > .ln-page > .page-heading:not(:has([data-ln-rename])) {
    display: none;
  }
  :root.mobile-nested-view .mobile-page-title {
    font-size: 18px;
  }
  /* Native modal focus containment and Escape handling remain in use. */
  :root dialog.mobile-navigation-sheet {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
    margin: 0;
    padding: 12px 0 env(safe-area-inset-bottom);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: var(--bg);
    color: var(--text);
    overflow-y: auto;
  }
  .mobile-navigation-sheet::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 4px;
    background: var(--muted);
  }
  :root .mobile-navigation-sheet .dialog-head {
    padding: 0 16px 8px;
    min-height: 44px;
  }
  .mobile-navigation-sheet .dialog-head p {
    display: none;
  }
  :root .mobile-navigation-sheet .dialog-head h2 {
    font-size: 16px;
  }
  :root .mobile-navigation-sheet .dialog-body {
    padding: 0 16px 16px;
  }
  .mobile-navigation-sheet h3,
  .mobile-search-dialog h3 {
    margin: 16px 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
  .mobile-navigation-sheet .dialog-body > button,
  .mobile-navigation-sheet .mobile-menu-row > button,
  .mobile-profile-row > button,
  .mobile-create-grid > button,
  .mobile-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
  }
  .mobile-navigation-sheet button .icon,
  .mobile-search-result > .icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--accent);
  }
  .mobile-navigation-sheet button strong,
  .mobile-search-result strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
  }
  .mobile-navigation-sheet button small,
  .mobile-search-result small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
  }
  .mobile-profile-row,
  .mobile-create-grid > button {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .mobile-menu-row {
    position: relative;
  }
  .mobile-menu-row > button {
    padding-right: 40px;
  }
  .mobile-check-count {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--text);
    font-size: 12px;
  }
  .mobile-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .mobile-create-grid > button {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 112px;
    padding: 16px;
  }
  .mobile-appearance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }
  .mobile-appearance > span {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
  }
  .mobile-appearance > span .icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
  }
  .mobile-appearance [role='group'] {
    display: flex;
    gap: 2px;
  }
  .mobile-appearance button,
  .mobile-search-filters button {
    min-height: 44px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
  }
  .mobile-appearance button[aria-pressed='true'],
  .mobile-search-filters button[aria-pressed='true'] {
    color: var(--text);
    background: var(--accent-soft);
    border-color: var(--accent);
  }
  .mobile-sheet-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
  }
  .mobile-sheet-legal button {
    min-height: 44px;
    border: 0;
    background: none;
    color: inherit;
    padding: 4px;
    font: inherit;
  }
  :root dialog.mobile-search-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    border: 0;
    border-radius: 0;
    background: var(--bg);
    color: var(--text);
  }
  .mobile-search-dialog > #dialog-content > .dialog-head {
    display: none;
  }
  :root .mobile-search-dialog .dialog-body {
    padding: 16px;
  }
  .mobile-search-input {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .mobile-search-input > .icon {
    width: 20px;
    flex: 0 0 20px;
    color: var(--muted);
  }
  .mobile-search-input input {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }
  .mobile-search-input button {
    min-height: 44px;
    background: none;
    border: 0;
    color: var(--accent);
    padding: 0 4px;
  }
  .mobile-search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
  }
  .mobile-search-result > span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .mobile-navigation-sheet button:focus-visible,
  .mobile-search-dialog button:focus-visible,
  .mobile-page-bar button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  :root dialog.detail-dialog .flight-close {
    font-size: 0;
  }
  :root dialog.detail-dialog .flight-close::after {
    content: '‹';
    font-size: 28px;
  }
}
@media (max-width: 767px) {
  :root main > .equipment-page > .equipment-heading,
  :root main > .sites-page > .sites-heading,
  :root main > .gallery-page > .gallery-content > .page-heading > div:first-child,
  :root main > .gallery-page [data-gallery-import],
  :root main > .development > .development-heading > div:first-child {
    display: none;
  }
  :root dialog:not(.mobile-navigation-sheet, .mobile-search-dialog) .dialog-head > [data-close],
  :root dialog.detail-dialog .dialog-head .flight-close {
    order: -1;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
  }
  :root dialog.detail-dialog .flight-close .icon {
    display: none;
  }
  #mobile-search-count {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (max-width: 767px) {
  :root body:has(.flight-book.compact-flight-book) #main {
    padding: 8px 16px calc(var(--mobile-navigation-height) + 24px + env(safe-area-inset-bottom));
  }
  :root .flight-book.compact-flight-book .book-heading .actions {
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
    border: 0;
  }
  :root body:has(.cockpit) #toast {
    bottom: calc(var(--mobile-navigation-height) + 16px + env(safe-area-inset-bottom));
  }
}

/* Mobile sheets: shared surfaces and quiet headers; creation tiles (38b). */
@media (max-width: 767px) {
  :root dialog.mobile-navigation-sheet {
    --create-sheet-bg: #1b2433;
    --create-card-bg: #151d2a;
    --create-card-border: #243042;
    --create-icon-bg: #1f3550;
    --create-icon-color: #7dbbf7;
    --create-muted: #8b98aa;
    padding-top: 8px;
    background: var(--create-sheet-bg);
    border-color: var(--create-card-border);
  }
  :root[data-theme='light'] dialog.mobile-navigation-sheet {
    --create-sheet-bg: #fff;
    --create-card-bg: #f3f6fa;
    --create-card-border: #d8e1ed;
    --create-icon-bg: #e2edf9;
    --create-icon-color: #1a5fbf;
    --create-muted: #5d6a7b;
  }
  .mobile-navigation-sheet::before {
    margin-bottom: 4px;
    background: var(--create-muted);
  }
  :root .mobile-navigation-sheet .dialog-head {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    background: transparent;
  }
  :root .mobile-navigation-sheet .dialog-head [data-close] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--text);
  }
  :root .mobile-navigation-sheet .dialog-head [data-close] .icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    color: inherit;
  }
  :root .mobile-navigation-sheet .dialog-body {
    padding: 8px 16px 12px;
  }
  .mobile-navigation-sheet[data-mobile-sheet='new'] .mobile-create-grid > button {
    gap: 8px;
    min-width: 0;
    min-height: 112px;
    padding: 14px;
    border: 1px solid var(--create-card-border);
    border-radius: 12px;
    background: var(--create-card-bg);
  }
  .mobile-create-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--create-icon-bg);
    color: var(--create-icon-color);
  }
  .mobile-navigation-sheet .mobile-create-icon .icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: inherit;
  }
  .mobile-create-grid > button strong {
    font-weight: 700;
    line-height: 1.3;
  }
  .mobile-create-grid > button small {
    margin-top: 4px;
    line-height: 1.4;
    color: var(--create-muted);
  }
  .mobile-navigation-sheet[data-mobile-sheet='new'] .dialog-hint {
    margin: 12px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--create-muted);
  }
}

/* More sheet: profile card, inset menu icons and one appearance segment. */
@media (max-width: 767px) {
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-profile-row {
    background: var(--create-card-bg);
    border: 0;
    border-radius: 12px;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-profile-row > button {
    min-height: 56px;
    padding: 10px 12px;
    gap: 12px;
  }
  .mobile-profile-row .account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #369aca, #159c9c);
    color: white;
    font-size: 14px;
    font-weight: 700;
  }
  .mobile-profile-row .account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .mobile-profile-copy {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .mobile-profile-link {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 500;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] h3 {
    margin: 16px 0 4px;
    color: #8fa8c6;
    line-height: 1.4;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .dialog-body > button,
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-menu-row > button {
    min-height: 48px;
    padding: 6px 0;
    gap: 12px;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-menu-row > button {
    padding-right: 36px;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] button strong {
    font-weight: 400;
    line-height: 1.3;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-profile-copy strong {
    font-weight: 600;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] button small {
    color: var(--create-muted);
    line-height: 1.3;
  }
  .mobile-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--create-card-bg);
    color: var(--create-icon-color);
  }
  .mobile-navigation-sheet .mobile-menu-icon .icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: inherit;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-check-count {
    right: 0;
    padding: 2px 6px;
    background: #302511;
    color: #f0b44c;
    font-weight: 600;
    line-height: 1.2;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-appearance {
    min-height: 48px;
    padding: 6px 0;
    gap: 8px;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-appearance [role='group'] {
    position: relative;
    padding: 2px;
    gap: 2px;
    border: 1px solid var(--create-card-border);
    border-radius: 8px;
    background: var(--create-card-bg);
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-appearance button {
    position: relative;
    min-width: 44px;
    min-height: 24px;
    padding: 2px 8px;
    border: 0;
    border-radius: 6px;
    color: var(--create-muted);
    background: transparent;
    font-size: 12px;
    line-height: 20px;
  }
  /* Extend the compact visual segment to non-overlapping 44px touch targets. */
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-appearance button::before {
    content: '';
    position: absolute;
    inset: -10px 0;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more']
    .mobile-appearance
    button[aria-pressed='true'] {
    background: var(--create-icon-bg);
    color: var(--text);
    font-weight: 600;
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-sheet-legal {
    margin-top: 8px;
    gap: 3px;
    color: var(--create-muted);
  }
  .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-sheet-legal button {
    min-height: 44px;
    padding: 0 2px;
  }
  :root[data-theme='light'] .mobile-navigation-sheet[data-mobile-sheet='more'] h3 {
    color: #536d8b;
  }
  :root[data-theme='light'] .mobile-navigation-sheet[data-mobile-sheet='more'] .mobile-check-count {
    background: #fff0cf;
    color: #825000;
  }
}

/* One aligned footer group for legal links and the shared release label. */
.footnote {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.4;
}
.footnote .footer-storage {
  flex-wrap: wrap;
  min-width: 0;
  min-height: 24px;
  gap: 6px;
}
.footnote .footer-storage > .icon {
  flex: 0 0 12px;
}
.footnote [data-storage-status] {
  min-width: 0;
  overflow-wrap: anywhere;
}
.footnote .footer-demo {
  flex-wrap: wrap;
  gap: 4px;
}
.footnote .footer-demo a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: inherit;
  text-underline-offset: 3px;
}
.footnote .footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0 12px;
}
.footnote .footer-legal > button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: nowrap;
  text-decoration: none;
}
.footnote .footer-legal > button:hover,
.footnote .footer-demo a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footnote .footer-legal > button:focus-visible,
.footnote .footer-demo a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 767px) {
  .footnote {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
}

/* Compact equipment overview and details (37g); scoped to these views. */
.equipment-page.eq-page {
  display: block;
}
.eq-page {
  max-width: 1280px;
  margin-inline: auto;
  font-family: inherit;
  padding-bottom: 16px;
}
.eq-page .card {
  border-radius: 12px;
}
.eq-page h1 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}
.eq-page h2,
.eq-page h3 {
  font-size: 14px;
  line-height: 1.4;
}
.eq-page p {
  font-size: 13px;
  margin: 8px 0;
}
.eq-page .btn {
  --button-height: 32px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 20px;
}
.eq-page .eq-text-button {
  min-height: 28px;
  padding-block: 4px;
  font-size: 13px;
  line-height: 20px;
}
.eq-page .equipment-heading {
  min-height: 0;
  margin-bottom: 16px;
  gap: 16px;
  align-items: end;
}
.eq-page .equipment-heading p {
  margin: 4px 0 0;
}
.eq-page .eq-panel {
  padding: 16px;
  margin-bottom: 16px;
  min-width: 0;
}
.eq-page .eq-panel-head {
  min-height: 40px;
  margin: -16px -16px 12px;
  padding: 4px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--eq-border);
  box-sizing: border-box;
}
.eq-page .eq-panel-head h2 {
  margin: 0;
}
.eq-page .eq-panel-head .btn {
  --button-height: 28px;
  min-height: 28px;
  padding: 3px 10px;
}
.eq-page .eq-chip,
.eq-page .eq-pill,
.eq-page .eq-detail-labels > :is(.eq-chip, .eq-pill) {
  min-height: 20px;
  height: auto;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 16px;
  box-sizing: border-box;
  gap: 4px;
}
.eq-page .eq-chip svg {
  width: 14px;
  height: 14px;
}
.eq-page .eq-pill small {
  display: block;
  color: inherit;
  font-size: 11px;
}
.eq-page .eq-filters {
  gap: 8px 16px;
  margin-bottom: 16px;
}
.eq-page .eq-chips .btn {
  --button-height: 24px;
  min-height: 24px;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.eq-page .eq-chips .selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--eq-link, #7dbbf7);
}
.eq-page .eq-chips .selected:not([data-eq-filter='all'], [data-eq-doc-filter='all'])::after {
  content: '×';
  margin-left: 4px;
}
.eq-page .eq-toggle {
  white-space: normal;
  font-size: 12px;
}
.eq-page .eq-toggle input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.eq-page .eq-summary {
  gap: 16px;
  margin: 0 0 16px;
  align-items: stretch;
}
.eq-page .eq-summary .eq-panel {
  margin: 0;
}
.eq-page .equipment-distribution {
  min-height: 0;
  display: block;
}
.eq-page .equipment-bar {
  margin: 12px 0;
  height: 8px;
}
.eq-page .eq-summary .equipment-hint {
  margin: 12px 0 0;
  font-size: 11px;
}
.eq-page .eq-term {
  gap: 8px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.eq-page .eq-term > .eq-text-button:first-of-type {
  min-width: 100px;
}
.eq-page .eq-term > .eq-text-button:last-child:not(:first-of-type) {
  padding: 3px 8px;
  border: 1px solid var(--eq-border);
  border-radius: 6px;
  color: var(--eq-text);
}
.eq-page .eq-term .eq-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.eq-page .eq-legend {
  gap: 4px;
  margin-top: 8px;
}
.eq-page .eq-legend > div {
  flex-wrap: wrap;
}
.eq-page .eq-legend button {
  min-width: 100px;
}
.eq-page .eq-legend span {
  font-size: 11px;
}
.eq-page .eq-section {
  margin: 16px 0;
}
.eq-page .eq-section > h2 {
  gap: 8px;
  margin-bottom: 8px;
}
.eq-page .eq-section > h2 .eq-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.eq-page .eq-section .equipment-grid {
  gap: 16px;
}
.eq-page .equipment-card.eq-card {
  padding: 12px;
  gap: 8px;
}
.eq-page .eq-card .eq-photo {
  height: 160px;
  border-radius: 8px;
  gap: 8px;
}
.eq-page .eq-photo > svg {
  width: 40px;
  height: 40px;
}
.eq-page .eq-card-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.eq-page .eq-card .equipment-badge {
  position: static;
  max-width: 100%;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 16px;
}
.eq-page .eq-card-title {
  align-items: baseline;
}
.eq-page .eq-card-title h3 {
  font-size: 14px;
}
.eq-page .eq-card p {
  font-size: 12px;
  margin: 0;
}
.eq-page .eq-card .equipment-data {
  gap: 8px;
  margin: 4px 0;
}
.eq-page .eq-card .equipment-data strong {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.eq-page .eq-card .equipment-data small {
  font-size: 11px;
}
.eq-page .eq-card-footer {
  padding-top: 8px;
  flex-wrap: wrap;
  font-size: 11px;
}
.eq-page .eq-card-edit {
  --button-height: 28px;
  min-height: 28px;
  padding: 3px 10px;
}
.eq-page .eq-add-tile {
  min-height: 120px;
  align-self: start;
  width: 100%;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
}
.eq-page .eq-add-tile svg {
  width: 24px;
  height: 24px;
  padding: 8px;
  border-radius: 8px;
}
.eq-page .eq-add-tile small:empty,
.eq-page .eq-card-labels:empty {
  display: none;
}
.eq-page .eq-detail-head {
  gap: 4px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.eq-page .eq-detail-head > span {
  font-size: 12px;
}
.eq-page .eq-detail-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 8px 16px;
  margin: 0 0 16px;
}
.eq-page .eq-detail-title > div:first-child {
  min-width: 0;
}
.eq-page .eq-detail-title h1 {
  overflow-wrap: anywhere;
}
.eq-page .eq-detail-title p {
  margin: 4px 0;
  font-size: 12px;
}
.eq-page.eq-detail-glider .eq-detail-title p {
  display: none;
}
.eq-page .eq-detail-labels {
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.eq-page .eq-detail-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.eq-page [data-eq-menu] {
  width: 32px;
  padding-inline: 0;
  background: transparent;
  border-color: transparent;
}
.eq-page .eq-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 16px;
}
.eq-page .eq-metrics > div {
  min-height: 64px;
  padding: 8px 14px;
  border-radius: 12px;
  flex-direction: column-reverse;
  justify-content: center;
  box-sizing: border-box;
}
.eq-page .eq-metrics strong {
  font-family: 'Geist Mono', monospace;
  font-size: 20px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.eq-page .eq-metrics small {
  font-size: 11px;
  line-height: 16px;
}
.eq-page .eq-hero {
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.eq-page .eq-gallery {
  min-width: 0;
  overflow: hidden;
  padding: 0;
}
.eq-page .eq-gallery .eq-photo {
  height: auto;
  min-height: 180px;
  aspect-ratio: 1.2;
  border: 0;
  border-radius: 0;
}
.eq-page .eq-gallery .eq-photo img {
  padding: 0;
}
.eq-page .eq-photo-caption {
  bottom: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 1px solid var(--eq-border);
  border-radius: 8px;
  background: var(--eq-card);
  color: var(--eq-text);
  font-size: 12px;
}
.eq-page .eq-photo-tools {
  padding: 8px;
  border-top: 1px solid var(--eq-border);
}
.eq-page .eq-thumbnails {
  margin-top: 0;
}
.eq-page .eq-thumbnails button {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}
.eq-page .eq-photo-actions {
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.eq-page [data-eq-photo-delete] {
  color: var(--danger);
}
.eq-page .eq-detail-content {
  min-width: 0;
  display: grid;
  gap: 16px;
}
.eq-page .eq-detail-content > .eq-panel {
  margin: 0;
}
.eq-page .eq-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 16px;
  margin: 0;
}
.eq-page .eq-facts > header {
  grid-column: 1 / -1;
}
.eq-page .eq-facts > div {
  min-height: 32px;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  box-sizing: border-box;
}
.eq-page .eq-facts small,
.eq-page .eq-facts span,
.eq-page .eq-facts .eq-text-button {
  font-size: 13px;
  line-height: 23px;
  padding: 0;
}
.eq-page .eq-facts small {
  flex-shrink: 0;
  max-width: 60%;
}
.eq-page .eq-facts span,
.eq-page .eq-facts .eq-text-button {
  min-width: 0;
  min-height: 24px;
  text-align: right;
}
.eq-page .eq-facts > p {
  font-size: 11px;
  margin-top: 8px;
}
.eq-page .eq-check-summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0;
  margin-bottom: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.eq-page .eq-check-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.eq-page .eq-check-status h3 {
  font-size: 14px;
}
.eq-page .eq-check-status p {
  margin: 0;
  font-size: 12px;
}
.eq-page .eq-check-criteria {
  gap: 4px;
}
.eq-page .eq-check-criteria > div {
  min-height: 28px;
  font-size: 12px;
  border-bottom: 1px solid var(--eq-border);
}
.eq-page .eq-check-disclosure > summary {
  min-height: 32px;
  padding: 6px 0;
  box-sizing: border-box;
  font-size: 12px;
}
.eq-page .eq-check-settings,
.eq-page .eq-check-details {
  gap: 12px;
  padding-block: 8px;
}
.eq-page .eq-flight-link {
  margin: 0;
  justify-self: start;
}
.eq-page .eq-maintenance {
  gap: 16px;
}
.eq-page .eq-inset,
.eq-page .eq-linked,
.eq-page .eq-link-row {
  padding: 12px;
  border-radius: 8px;
}
.eq-page .eq-documents {
  margin-block: 12px;
}
.eq-page .eq-document {
  gap: 8px;
  padding: 8px 0;
  min-width: 0;
}
.eq-page .eq-document > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.eq-page .eq-drop {
  min-height: 0;
  padding: 16px;
  gap: 8px;
  border-radius: 8px;
}
.eq-page .ln-equipment-card {
  margin-bottom: 16px;
  border-radius: 12px;
  padding: 16px;
}
.eq-page .ln-equipment-card > header {
  min-height: 40px;
  margin: -16px -16px 12px;
  padding: 4px 16px;
  border-bottom: 1px solid var(--eq-border);
}
@media (max-width: 1100px) {
  .eq-page .eq-hero {
    grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1fr);
  }
  .eq-page .eq-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .eq-page .eq-detail-title {
    flex-wrap: wrap;
  }
}
@media (max-width: 767px) {
  :root main > .equipment-page > .equipment-heading {
    display: flex;
  }
  :root main > .equipment-page > .equipment-heading > div:first-child {
    display: none;
  }
  .eq-page {
    padding-bottom: 64px;
  }
  .eq-page .equipment-heading {
    margin: 0;
    height: 0;
  }
  .eq-page .equipment-heading-actions,
  .eq-page .eq-detail-actions {
    position: fixed;
    z-index: 35;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-navigation-height, 64px) + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-top: 1px solid var(--eq-border);
    border-radius: 0;
    background: var(--eq-bg);
  }
  .eq-page .equipment-heading-actions > .primary {
    flex: 1;
  }
  .eq-page .btn,
  .eq-page .eq-text-button,
  .eq-page .eq-panel-head .btn,
  .eq-page .eq-card-edit,
  .eq-page .eq-chips .btn {
    min-height: 40px;
    --button-height: 40px;
  }
  .eq-page [data-eq-menu] {
    width: 40px;
  }
  .eq-page .eq-chips {
    gap: 4px 8px;
  }
  .eq-page .eq-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .eq-page .eq-toggle {
    min-height: 40px;
  }
  .eq-page .eq-hero,
  .eq-page .eq-section .equipment-grid,
  .eq-page .eq-summary,
  .eq-page .eq-maintenance {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .eq-page .eq-gallery .eq-photo {
    max-height: 300px;
    aspect-ratio: 1.4;
  }
  .eq-page .eq-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .eq-page .eq-term .eq-pill {
    margin-left: 0;
  }
  .eq-page .eq-facts .eq-text-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: end;
  }
  .eq-page .eq-check-disclosure > summary {
    min-height: 40px;
    padding-block: 10px;
  }
  .eq-page .eq-facts > div {
    align-items: center;
  }
  .eq-page .eq-detail-actions > .btn:first-child:not(.primary):not([data-eq-menu]) {
    flex: 1;
    text-align: left;
  }
}

/* Flight uploads reuse the gallery progress view above the unsaved editor. */
dialog.flight-upload-dialog {
  border-radius: 12px;
}
.flight-upload-dialog .dialog-head,
.flight-upload-dialog .dialog-body,
.flight-upload-dialog .dialog-footer {
  padding: 16px;
}
.flight-upload-dialog .dialog-head h2 {
  font-size: 20px;
}
.flight-upload-dialog .btn,
.flight-upload-dialog .icon-button {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
}
.flight-upload-dialog .icon-button {
  width: 32px;
  padding: 4px;
  border-radius: 6px;
}
@media (pointer: coarse) {
  .flight-upload-dialog .btn,
  .flight-upload-dialog .icon-button {
    min-height: 40px;
  }
  .flight-upload-dialog .icon-button {
    width: 40px;
  }
}
