:root {
  color-scheme: light dark;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  /* --navy/--teal exist only as --accent's source values now (used via
     var(--navy)/var(--teal) below) - every other component-level color
     comes from the wc- token set beneath them. */
  --navy: #1f3a5c;
  --teal: #3ecfae;
  --slate: #6c7580;

  --accent: var(--navy);
  --on-accent: #ffffff;

  /* Seat-count bands (loads board leg borders): green/amber/red, kept in
     the same family as the app's existing positive (teal) and error (red)
     colors rather than introducing an unrelated palette. */
  --go: #2f8f4e;
  --hold: #b8790f;
  --no: #c0392b;

  /* Destructive-action treatment (delete icon buttons, the confirm dialog's
     danger button) - a soft red fill at rest rather than only appearing on
     hover, so a delete control reads as destructive before you touch it. */
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, 0.12);
  /* Soft amber fill for the "Delayed" status pill - same family as --hold,
     theme-aware the same way --danger-soft is for --danger. */
  --hold-soft: rgba(184, 121, 15, 0.14);

  /* Watch card redesign (Sep 2026 developer spec), since extended app-wide
     as the single design-token set for every surface/border/text color in
     the app - --navy/--slate/etc. above now only back --accent. */
  --wc-card-bg: #ffffff;
  --wc-navy: #13253a;
  --wc-green: #08785a;
  --wc-pale-green: #e0f5ec;
  --wc-muted: #7b8798;
  --wc-secondary: #a0acba;
  --wc-subtle: #f4f6f8;
  --wc-border: #dde3ea;
  --wc-blue: #2557d6;
  --wc-orange: #e88900;
  /* Seat map product colors - lifted from Alaska's own seatmap design
     tokens (fare-business/fare-premiumeconomy/fare-economy) rather than
     invented, so the map reads the same way theirs does. */
  --wc-seat-first: #01426a;
  --wc-seat-premium: #005154;
  --wc-seat-main: #0074ca;
  --wc-seat-unavailable: #f1f3f3;
  --wc-seat-mine: #1f8a3b;
  --wc-seat-on-mine: #ffffff;
  /* Page background, distinct from --wc-card-bg - now that cards have no
     border, a plain white page would leave a white card readable only by
     its shadow. A tinted page gives every card real contrast to sit on. */
  --wc-page-bg: #f4f6f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: var(--teal); /* bright teal reads better than navy on dark backgrounds */
    --on-accent: #0b1623;

    --go: #4fbf78;
    --hold: #e0a83e;
    --no: #e5695f;

    --danger: #e5695f;
    --danger-soft: rgba(229, 105, 95, 0.16);
    --hold-soft: rgba(224, 168, 62, 0.18);

    --wc-card-bg: #182230;
    --wc-navy: #eaf0f7;
    --wc-green: #4cd9ae;
    --wc-pale-green: rgba(76, 217, 174, 0.16);
    --wc-muted: #94a3b4;
    --wc-secondary: #7c8898;
    --wc-subtle: rgba(255, 255, 255, 0.06);
    --wc-border: #3a4048;
    --wc-blue: #7b9bff;
    --wc-orange: #f2a93c;
    --wc-seat-first: #3f7fb8;
    --wc-seat-premium: #2f8f92;
    --wc-seat-main: #4a9fe0;
    --wc-seat-unavailable: #232b34;
    --wc-seat-mine: #4cd964;
    --wc-seat-on-mine: #08210f;
    --wc-page-bg: #0d131b;
  }
}

* {
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  .logo-word {
    fill: #eaf0f7;
  }
  .logo-accent {
    fill: #3ecfae;
  }
  .logo-sub {
    fill: #94a3b4;
  }
}

/* Form controls don't inherit the page font by default in most browsers
   (most noticeably the type="date" field, which falls back to a system UI
   font) - inherit explicitly so everything matches. */
input,
button,
select,
textarea {
  font-family: inherit;
}

html {
  /* Lets the pull-to-refresh gesture (see initPullToRefresh in app.js)
     claim a downward drag at the top of the page for itself - without
     this, iOS's own native rubber-band bounce at the scroll boundary
     fights it, and in standalone/Home-Screen mode that native bounce is
     handled by a UIScrollView wrapper underneath the WebView that a plain
     touchmove preventDefault can't fully suppress on its own. */
  overscroll-behavior-y: contain;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--wc-page-bg);
  color: var(--wc-navy);
  max-width: 720px;
  margin: 0 auto;
  /* Extra bottom padding clears the fixed tab bar; env() adds the Home
     Screen PWA's safe-area inset on notched iPhones, and is simply 0 on
     everything else. */
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(84px + var(--safe-b)) calc(16px + var(--safe-l));
  line-height: 1.4;
  font-size: 16px;
}

.logo-lockup {
  flex: 0 1 150px;
  min-width: 0;
}
.logo-lockup svg {
  display: block;
  width: 100%;
  height: auto;
}
/* No box at all - not even a background - per explicit request to stop
   wrapping the page's own content in its own white square. Content sits
   directly on the grey page background now, inset only by body's own
   16px edge padding (the same margin the old bordered box used to leave
   around itself) instead of that padding PLUS this wrapper's own; on a
   phone that second layer of inset was real width lost for no reason.
   Individually meaningful boxes (.watch-card, .flight-card, the detail-
   page sections) keep their own background/shadow - only this generic
   outer wrapper goes fully transparent. */
.card {
  margin-top: 16px;
}
.card h2 {
  margin-top: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--wc-navy);
}

/* True page title (Currently watched / AS101 Flight Information - see
   the #watches-heading call sites in app.js), sitting above the card
   rather than as a small heading inside it - promoted once the card lost
   its border, so the page still reads as having a clear top-level title
   instead of one that was only ever a bordered box's own internal h2. */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
/* The open flight's back arrow and icon row sit close under the header. */
.page-header.compact {
  margin-top: 10px;
}
/* Back-link and the detail page's bell/overflow controls (see
   detailHeaderActionsHtml in app.js) share a row - empty/hidden on the
   Watches dashboard itself, where nothing ever populates
   #page-header-actions. */
.page-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.page-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--wc-navy);
}
/* Last-checked indicator and the notify-chip panel, both promoted here
   from the card's own footer/body on the detail page (see
   renderSingleFlight) - empty on the Watches dashboard. */
#page-header-meta:not(:empty) {
  margin-top: -2px;
}

@keyframes sync-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pull-to-refresh indicator (detail page only - see initPullToRefresh in
   app.js). Fixed in place right at the top of the viewport and never
   itself moved - it's #page-scroll below that gets dragged down by JS,
   uncovering this sitting underneath, the same way a native
   pull-to-refresh spinner reveals from behind the content it's
   refreshing rather than floating in over top of it. Its own z-index only
   has to lose to #page-scroll's - opacity is what actually keeps it
   invisible at rest (rather than z-index alone), since a short page's
   content can end well before this indicator's own vertical position,
   which would otherwise leave it visible through the gap. There's no
   native pull-to-refresh inside a standalone Home Screen PWA the way
   there is in a plain Android Chrome tab, hence rolling our own here. */
#pull-refresh-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-card-bg);
  border: 1px solid var(--wc-border);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  color: var(--accent);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
#pull-refresh-indicator.pulling,
#pull-refresh-indicator.refreshing {
  opacity: 1;
}
#pull-refresh-indicator.refreshing .pull-refresh-icon {
  animation: sync-spin 0.7s linear infinite;
}

/* Wraps everything but the fixed bottom tab bar (see index.html) - JS sets
   this element's own transform during a pull, so the sticky header and
   the rest of the page move down together as one piece instead of the
   indicator alone floating in over a page that stays put. z-index above
   the indicator's own so it stays opaque over it at rest; the transition
   is what animates the snap-back once a drag ends (suppressed by
   .dragging below while a touch is actually in progress, so the page
   tracks the finger exactly instead of lagging behind it). */
#page-scroll {
  position: relative;
  z-index: 20;
  background: var(--wc-page-bg);
  transition: transform 0.25s ease;
}
#page-scroll.dragging {
  transition: none;
}

/* Search form: stacked fields at every width. */
.route-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Origin/destination typeahead - .airport-field is the positioning context
   (a plain .route-form label plus position:relative) for its own dropdown,
   which floats below the input rather than pushing the rest of the form
   down. Matches Fly's own city-typeahead behavior/data (see
   public/airports.json), styled as a small popover card consistent with
   the rest of the app rather than a native <select>/<datalist>. */
.airport-field {
  position: relative;
}
/* Wraps just the input (not the whole .airport-field label, which also
   carries the "Origin"/"Destination" text above it) so the clear button
   below can center itself vertically against the input's own box, not the
   label's overall height. */
.input-clear-wrap {
  position: relative;
}
.input-clear-wrap input {
  padding-right: 38px;
}
/* Small X-in-circle to clear an origin/destination field in one tap
   instead of holding backspace - per explicit request. Toggled by
   setupAirportTypeahead's own updateClearBtn, not CSS :placeholder-shown
   or similar - a typeahead selection can leave the input non-empty with no
   further "input" event to key off, so the show/hide has to be driven
   from the same JS that already tracks the field's value.
   Selector is `.input-clear-wrap .clear-field-btn`, not just
   `.clear-field-btn`, on purpose - a bare class selector here loses the
   specificity fight to `.route-form button`'s own `width: 100%` (both
   this button and the airport-field inputs live inside a .route-form),
   which was stretching the button to the full field width and breaking
   both its size and its right-alignment. min-width/flex-shrink:0 guard
   against the same width:100% fight re-breaking this if another `button`
   rule with equal-or-higher specificity ever gets added upstream. */
.input-clear-wrap .clear-field-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 0;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--wc-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.input-clear-wrap .clear-field-btn:hover {
  color: var(--wc-navy);
}
.airport-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--wc-card-bg);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  max-height: 260px;
  overflow-y: auto;
}
.airport-suggestion {
  padding: 8px;
  border-radius: 8px;
  color: var(--wc-navy);
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
}
.airport-suggestion:hover,
.airport-suggestion.active {
  background: var(--wc-subtle);
}
/* iOS Safari renders input[type=date] with its own native OS widget
   chrome, which carries an intrinsic content width that ignores
   width:100%/max-width:100% entirely - confirmed on a real device that
   min-width:0/max-width:100% alone (the usual flex-overflow fix) weren't
   enough here. -webkit-appearance:none strips that native chrome so Safari
   falls back to treating it as a normal box-model element that actually
   respects these constraints - the standard fix for this exact issue. A
   Chromium-based dev tool never reproduces this, it's WebKit-only. */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

/* Compact, auto-width (unlike the full-width route-form inputs above) so
   it sits inline with the filter chips instead of forcing its own row.
   Native dropdown chrome is stripped in favor of a custom chevron that
   matches --slate, so it still reads as part of the same design system as
   the surrounding inputs and buttons rather than a stray OS widget. */
#loads-sort {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  width: auto;
  padding: 6px 26px 6px 10px;
  border: 1px solid var(--wc-border);
  border-radius: 10px;
  font-size: 0.8em;
  min-height: 32px;
  background-color: var(--wc-subtle);
  color: var(--wc-navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237b8798'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

button,
a.button {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95em;
  min-height: 44px; /* comfortable touch target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}
button:hover,
a.button:hover {
  opacity: 0.9;
}
button.secondary,
a.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
button.full-width,
a.button.full-width {
  width: 100%;
  margin-top: 12px;
}

/* Confirm/cancel modal (confirmDialog in app.js) - used for the watch
   remove action so a mis-tap can't silently delete a flight anymore. */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}
.dialog-box {
  width: 100%;
  max-width: 340px;
  padding: 20px;
  border-radius: 20px;
  background: var(--wc-card-bg);
  color: var(--wc-navy);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.dialog-box h3 {
  margin: 0;
  font-size: 1.05em;
}
.dialog-box .empty-message {
  margin-top: 6px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.dialog-actions button {
  flex: 1;
  margin-top: 0;
}
button.danger {
  background: var(--danger);
  color: #fff;
}

/* Results and watches: one card per flight, stacks on mobile, grid on desktop.
   align-items: start overrides CSS grid's default row-stretch behavior - a
   shorter card (e.g. a watch with no seat-map/boarding-pass buttons) should
   size to its own content instead of stretching to match a taller card
   sharing its row. */
.card-list {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 600px) {
  /* An even count, so the fold of an opened phone falls between columns. */
  .card-list,
  #loads-results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #loads-results-list > button {
    grid-column: 1 / -1;
  }
}

.flight-card {
  border-radius: 20px;
  padding: 16px;
  background: var(--wc-card-bg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* Watched-flight card: same radius/padding/shadow as every other top-level
   card in the app (.flight-card, .dialog-box, the detail-page section
   group) - a UI-consistency pass previously left this one at a wider 24px,
   the only large box in the app not matching that shared 20px. Padding
   still steps down on very narrow screens (see the max-width: 359px block
   near the bottom of this file). */
.watch-card {
  border-radius: 20px;
  padding: 16px;
  background: var(--wc-card-bg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.flight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-weight: 700;
}
.flight-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--wc-navy);
}

/* Watch card header: flight number + status pill on one line, the date
   just beneath (left), and the bell/overflow controls at top-right -
   replaces the old shared .flight-card-header layout for this card
   specifically, since the watch card's header needs its own two-line left
   column rather than a single row of space-between content. */
.watch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.watch-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.watch-card .flight-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--wc-navy);
}
.flight-number-link {
  color: inherit;
  text-decoration: none;
}
.flight-number-link:hover .flight-number {
  text-decoration: underline;
}
/* Bell (notification disclosure) and overflow (remove-watch menu) - two
   32px rounded-square hit targets top-right, each independent of the
   other (see the bellBtn/overflowBtn wiring in app.js, which closes one
   when the other opens). */
.watch-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.wc-icon-btn {
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--wc-border);
  background: var(--wc-subtle);
  color: var(--wc-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}
.wc-icon-btn:hover {
  opacity: 0.85;
}
/* Bell's "the chip panel is open" state - filled accent, same active
   treatment as a selected notify-chip/filter-chip elsewhere in the app,
   so "this control is currently toggled on" reads the same way
   everywhere. Applied/removed in app.js's bellBtn click handler, not tied
   to whether anyone's actually subscribed. */
.wc-icon-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.overflow-wrap {
  position: relative;
}
/* Anchored dropdown (see the overflow-btn/overflow-menu wiring in
   app.js) - no explicit `display` here so the native [hidden] behavior
   (display:none) isn't fighting a same-specificity class rule for it. */
.overflow-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  min-width: 170px;
  padding: 6px;
  border-radius: 14px;
  background: var(--wc-card-bg);
  color: var(--wc-navy);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--wc-navy);
  font-weight: 700;
  font-size: 0.9em;
  text-align: left;
  text-decoration: none;
}
.menu-item:hover {
  background: var(--wc-subtle);
}
/* Overrides the generic `button.danger` rule's solid red fill (used
   elsewhere for the confirm-dialog's destructive button) - this menu item
   only wants danger-colored text at rest, with a soft red tint on hover,
   not a filled button. */
.menu-item.danger {
  background: none;
  color: var(--danger);
}
.menu-item.danger:hover {
  background: var(--danger-soft);
}

/* Neutral clock + bare age (see formatCheckedAgeShort in app.js) -
   deliberately never colored by how stale the data is; flight status is
   the card's only color-coded signal. The full sentence lives in the
   element's aria-label/title instead of in the visible text. */
.last-checked {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--wc-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: default;
}
/* Overdue check (see isCheckOverdue in app.js): amber, and the text says
   "old" so color isn't the only signal. */
.last-checked.is-old,
.page-header-actions .last-checked.is-old {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hold-soft);
  color: #8a5a07;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .last-checked.is-old,
  .page-header-actions .last-checked.is-old {
    color: var(--hold);
  }
}

.checkin-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--wc-navy);
}
.checkin-slot-done {
  color: var(--wc-green);
}
.checkin-slot-failed {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

/* "Updating…" state (see lastCheckedHtml's isUpdating param in app.js) -
   same live-poll-pulse keyframe as .availability-grid.is-live-polling
   above, just on the age text instead of the stat tiles. */
.last-checked.is-live-polling span {
  animation: live-poll-pulse 1.1s ease-in-out infinite;
}
/* In the detail page's own icon row (see actionsSlot in app.js), styled
   as the same kind of pill-shaped chip as the bell/overflow/boarding-pass
   icon buttons beside it - same height/background/border as .wc-icon-btn,
   just fully rounded (999px) rather than a 32x32 circle, since this one
   has text to fit rather than a single glyph. */
.page-header-actions .last-checked {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--wc-border);
  background: var(--wc-subtle);
}

/* Footer: 20px tall, clock+sync-age on the left, caret-only details link
   on the right, space-between per the card spec. */
.wc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 20px;
  margin-top: 12px;
}
/* Icon-only chevron to the flight-detail page (see flightDetailsHtml in
   app.js) - no visible "Flight details" text per the latest spec. 20x20px
   per the footer spec (caret-only details target). */
.chevron-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--wc-muted);
}

/* Shared availability-tile grid: three equal tiles (First/Coach/Total) on
   the watch card (see availabilityGridHtml in app.js), or four
   (+Listed, via .availability-grid-4) on a search result leg
   (statsGridHtml) - a search result has no standby-position tile to
   repeat Listed in, so it keeps its own column here instead. All tiles
   read in the same neutral navy/grey for now, per explicit request - no
   per-tile color coding until that's revisited later. 12px margin-top
   matches every other block-to-block gap down the card/detail-page
   sections (.wc-route, .confirmation-tile-row, .wc-actions, .notify-
   panel, .standby-stats-grid all use the same value) - this one and
   .wc-route had drifted to 14px, .confirmation-tile-row to 8px, before a
   spacing-consistency pass brought all three back in line. */
.availability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  text-align: center;
}
.availability-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.availability-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 4px;
  border-radius: 12px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
}
.availability-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--wc-navy);
  font-variant-numeric: tabular-nums;
}
.availability-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-muted);
}
/* Card's own Priority tile, when it's showing a guidance message ("Save
   priority to estimate") instead of a number - same reasoning as
   .standby-value-msg, just for the 3-column availability-grid context
   (see cardPriorityValueHtml in app.js). */
.availability-value-msg {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  white-space: normal;
  line-height: 1.2;
}

/* While a live-poll check is in flight for this watch (see
   scheduleLivePollFollowup/dueForLivePoll in app.js and the `livePolling`
   flag GET /watches[/:id] puts in its response) - pulses the numbers
   rather than replacing them with a spinner, since the stale ones are
   still a reasonable guess at the truth for the second or two this
   usually takes. Same reasoning as .last-checked.is-live-polling below,
   just for the tile row instead of the age text. */
.availability-grid.is-live-polling .availability-value {
  animation: live-poll-pulse 1.1s ease-in-out infinite;
}
@keyframes live-poll-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* Watch card's own route block - same grey rounded surface as the
   availability/standby/confirmation tiles below it, with a dotted center
   connector per the card spec. Distinct classes (wc-*) from the shared
   .watch-route/.time-endpoint/.airport-code/.time-value used by the
   search-result itinerary's own leg rows further below, so restyling one
   doesn't touch the other. */
.wc-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
}
.wc-route-endpoint {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wc-route-endpoint-dest {
  align-items: flex-end;
}
.wc-airport-code {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--wc-navy);
  line-height: 1;
}
.wc-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wc-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--wc-navy);
  white-space: nowrap;
}
/* Departure/arrival time once it's showing Fly's live delayed estimate
   instead of the original schedule (see routes/watches.js's
   formatWatchForClient) - per explicit request, this stays color-coded
   even though the tiles/standby value below it don't: the pill says
   "something's off," this says "the number itself changed, look again." */
.wc-time-delayed {
  color: var(--wc-orange);
}
.wc-route-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.wc-duration {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wc-muted);
  white-space: nowrap;
}
/* A radial-gradient tile instead of border-style: dotted - the native
   dotted border renders inconsistently across browsers (uneven spacing,
   dots that merge into dashes at this thickness), while a repeating
   background tile gives perfectly even, evenly-spaced round dots. */
.wc-connector {
  width: 52px;
  height: 2px;
  background-image: radial-gradient(circle, var(--wc-secondary) 1px, transparent 1.1px);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-position: left center;
}

/* Prominent single tile: standby position (or its estimate look-alike -
   see standbyPositionHtml/estimatePositionTileHtml in app.js). Neutral
   grey per explicit request - no color coding for now (may return later). */
.standby-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
}
.standby-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-muted);
}
.standby-value {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--wc-navy);
  text-align: right;
  white-space: nowrap;
}

/* Assigned-seat summary (assignedSeatsHtml in app.js) - the watch card's
   own copy sits above the Open/Standby/Priority row, the detail page's
   above Standby Details' availability grid, per explicit request; both
   share this one block. Pale-green per the same "go" treatment as the
   on-time status pill (.status-pill-on_time) - this is unambiguously good
   news, worth reading as such at a glance rather than neutral grey like
   every other tile here. */
.assigned-seats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--wc-pale-green);
}
.assigned-seats-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-green);
}
.assigned-seats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.assigned-seat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--wc-card-bg);
}
.assigned-seat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--wc-muted);
}
.assigned-seat-number {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--wc-green);
}
/* A guidance message ("Save priority to estimate") rather than a number -
   too long to read well at the numeric tile size, so it steps down. */
.standby-value-msg {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: normal;
  white-space: normal;
}

/* Confirmation number + boarding time - two equal tiles, or one full-width
   tile when only one of the two has data (see confirmationBoardingHtml in
   app.js, which renders exactly the tiles that apply). */
.confirmation-tile-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.confirmation-tile {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
}
.confirmation-tile-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-muted);
}
.confirmation-tile-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wc-navy);
}
.confirmation-copy-btn {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  border-radius: 4px;
  background: none;
  color: var(--wc-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.confirmation-copy-btn:hover {
  opacity: 0.75;
}
.confirmation-copy-btn.copied {
  color: var(--wc-green);
}

/* 44px touch areas around controls that look smaller. */
.wc-icon-btn,
.chevron-link {
  position: relative;
}
.wc-icon-btn::after,
.chevron-link::after {
  content: '';
  position: absolute;
  inset: -7px;
}
.chevron-link::after {
  inset: -12px;
}
/* Wide enough that neighbouring touch areas don't overlap. */
.watch-header-controls,
.page-header-actions {
  gap: 12px;
}
.watch-card-link,
.confirmation-tile:has(.copy-btn) {
  cursor: pointer;
}

a.availability-tile-link {
  color: inherit;
  text-decoration: none;
}
/* Clear of the sticky header when jumped to. */
#standby,
#standby-details {
  scroll-margin-top: 96px;
}

/* Travel day (see travelDayHtml in app.js). */
.travel-pass .wc-action-btn {
  height: 52px;
  font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  .travel-pass .wc-action-btn-filled {
    background: var(--accent);
    border-color: var(--accent);
    color: #0b1623;
  }
}
.travel-tiles .confirmation-tile-value {
  font-size: 22px;
  font-weight: 800;
}
.travel-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--wc-muted);
}

/* Seat map / Boarding pass action row - equal-width buttons, or one
   full-width button when only one is available (see actionsRowHtml in
   app.js). Icon in the boarding-pass button matches the separate button
   reference image provided with the card spec, not the full mock-up's own
   icon (per explicit instruction to use that reference instead), and the
   seat-map button carries no icon at all for the same reason. */
.wc-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.wc-action-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.wc-action-btn-outline {
  background: var(--wc-card-bg);
  border: 1px solid var(--wc-border);
  color: var(--wc-navy);
}
/* Deliberately a fixed navy fill (not the theme-flipped --wc-navy text
   token, which turns light-on-dark in dark mode) - the spec's "navy fill,
   white content" button should look the same brand color in both themes. */
.wc-action-btn-filled {
  background: #13253a;
  border: 1px solid #13253a;
  color: #fff;
}

/* Small red "+N" pill beside the arrival time, e.g. an overnight
   westbound flight landing the next local calendar day (see
   arrivalOffsetPillHtml/arrivalDayOffset in app.js and routes/watches.js).
   The text itself ("+1") is the accessible content; aria-label on the
   wrapping span in app.js spells it out further for a screen reader. */
.arrival-offset-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.72em;
  font-weight: 700;
  white-space: nowrap;
}

.flight-date {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--wc-muted);
}

/* On-time/delayed/cancelled pill (statusPillHtml in app.js), combined with
   the departure gate (e.g. "On time • Gate B32" - see that function's own
   comment). Text-only (no dot) per the latest spec - the label itself is
   the accessible content, so color is decoration, not the only signal. */
.status-pill {
  display: inline-flex;
  align-items: center;
  height: auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill-on_time {
  background: var(--wc-pale-green);
  color: var(--wc-green);
}
.status-pill-delayed {
  background: var(--hold-soft);
  color: var(--hold);
}
.status-pill-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Visually hidden but still announced - the "Copied" confirmation for the
   confirmation-number copy button, so the toast-like feedback isn't purely
   visual (see the copy-btn click handler in app.js). */
.copy-announce {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Compact alternate-flight rows (alternatesHtml in app.js) - quiet hairline
   dividers rather than a filled banner, since these are secondary "here's
   another option" data, not a call to action. .alternates-detail-section
   itself joins the shared detail-page card styling further below (see
   that selector group) rather than having its own box rules here. */
.alternate-item {
  padding: 6px 0;
}
.alternate-item + .alternate-item {
  border-top: 1px solid var(--wc-border);
}
.alternate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}
.alternate-id {
  color: var(--wc-muted);
  font-size: 13px;
  font-weight: 600;
}
.alternate-flight {
  color: var(--wc-navy);
  font-weight: 700;
}
.alternate-sep {
  margin: 0 2px;
  opacity: 0.6;
}

/* Notification disclosure (see the bellBtn wiring in app.js) - chips only,
   no visible heading per the latest spec; the bell's own accessible label
   ("Notification settings") carries that context instead. */
/* Bell disclosure panel - moved to the bottom of the card (below the
   action buttons, just above the footer) per explicit request, restyled
   to match the tile language used everywhere else on the card. */
.notify-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
}
/* Detail page's own notify box - white (well, --wc-card-bg, the same
   theme-aware token every other white surface on the page uses) instead of
   the grey every other tile/panel gets, per explicit request. Scoped to
   the detail page's fixed id only - the dashboard card's own notify panel
   (shared .notify-panel class, no id) keeps the grey tile treatment. */
#detail-notify-panel {
  background: var(--wc-card-bg);
}
.notify-panel-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-muted);
}
.notify-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notify-chip {
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--wc-border);
  background: var(--wc-card-bg);
  color: var(--wc-navy);
  font-size: 12px;
  font-weight: 700;
  opacity: 0.6;
}
/* Fixed navy fill (not the theme-flipped --wc-navy text token), same
   reasoning as .wc-action-btn-filled - a selected chip should read as the
   same "on" state in both themes rather than turning light-on-dark. */
.notify-chip.active {
  background: #13253a;
  border-color: #13253a;
  color: #fff;
  opacity: 1;
}
.notify-chip:disabled {
  cursor: default;
}

.empty-message {
  margin-top: 12px;
  font-size: 0.9em;
  opacity: 0.7;
}

/* "Can't refresh · Retry" - a failed load, with the old content left below. */
.refresh-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: var(--hold-soft);
  font-size: 14px;
  font-weight: 700;
}
.refresh-error button {
  min-height: 44px;
  margin: 0;
}

/* !important is deliberate here: .hidden is a utility class meant to always
   win regardless of what other component-specific `display` rule a element
   also carries (e.g. .back-link's `display: inline-block` below) - without
   it, whichever rule happens to be declared later in this file wins the
   cascade tie, which is exactly the bug that let the back-link show up on
   the dashboard when it shouldn't have. */
.hidden {
  display: none !important;
}

/* Icon-only now (see index.html) - .wc-icon-btn supplies the actual
   sizing/shape/color, this class is just the hidden/hook id target. */
.back-link {
  text-decoration: none;
}

/* Detail-page sections (Flight Details, Standby Details, Awaiting seats,
   Booking breakdown, Alternates, History) - each its own card, same
   visual language as the watch card above them: white/dark surface,
   rounded corners, soft shadow. Wrapping each in its own card gives the
   whole detail page one consistent "stack of cards" feel instead of one
   card followed by plain text sections. */
.flight-details-section,
.standby-details-section,
.alternates-detail-section,
.history-section,
.booking-totals-section,
.awaiting-seats-section {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  background: var(--wc-card-bg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
/* The very first card on the detail page sits directly under the icon
   row now (see .page-header.compact above) rather than a visible title -
   its own 16px top margin on top of that row's gap read as too much
   space, per explicit request, so this one instance (not the 16px
   card-to-card gap the rest of these sections still want) steps down. */
#flight-details-box .flight-details-section {
  margin-top: 8px;
}
.standby-details-section h3,
.alternates-detail-section h3,
.history-section h3,
.booking-totals-section h3,
.awaiting-seats-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--wc-navy);
}
/* Alternates heading + "Updated Xh ago" badge (see alternatesHtml in
   app.js) on one row - the h3's own bottom margin still applies to the
   row as a whole, so the rows/button below sit the same distance away as
   every other section's plain heading does. */
.alternates-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.alternates-heading-row h3 {
  margin-bottom: 0;
}
.alternates-updated {
  font-size: 11px;
  font-weight: 600;
  color: var(--wc-muted);
  white-space: nowrap;
}

/* Flight Details card's own header - flight number/"Flight Details" title
   and status pill on one row, departure date on its own row beneath - per
   explicit request, replacing both the old page-level title row above the
   card and this card's own plain "Flight Details" <h3>. The synced-time
   that briefly lived in this same row moved back out to the icon row
   above the card instead (see .page-header-actions/detailHeaderActionsHtml
   in app.js). margin-bottom matches the plain-h3 sections' own 12px so the
   route block right after it lines up with how every other section's
   heading-to-content gap already reads. */
.detail-card-header {
  margin-bottom: 12px;
}
.detail-card-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--wc-navy);
}
.history-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--wc-border);
}
/* Each row stacks its timestamp above a wrapping row of tags (see
   historyDetailParts/renderHistorySection in app.js) instead of the old
   single-line "time ... detail" layout - that squeezed the detail string
   against the time and became unreadable once it wrapped on a phone. */
.history-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--wc-border);
}
.history-time {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-muted);
}
.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.history-tag {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--wc-subtle);
  color: var(--wc-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.history-tag strong {
  color: var(--wc-navy);
  font-weight: 700;
}

/* table-scroll lets a table overflow horizontally on a narrow screen
   without breaking the page's own layout, per this app's "wide content
   scrolls in its own container" rule. */
.table-scroll {
  overflow-x: auto;
}
.booking-totals-table,
.awaiting-seats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.booking-totals-table th,
.awaiting-seats-table th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wc-muted);
  padding: 8px;
  border-bottom: 1px solid var(--wc-border);
  white-space: nowrap;
}
.booking-totals-table td,
.awaiting-seats-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--wc-border);
  color: var(--wc-navy);
  white-space: nowrap;
}
.booking-totals-table th:not(:first-child),
.booking-totals-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.awaiting-seats-table th:first-child,
.awaiting-seats-table td:first-child {
  text-align: center;
}
.awaiting-seats-subheading {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wc-navy);
}
.awaiting-seats-subheading:first-child {
  margin-top: 0;
}
/* Small square stat boxes under the Standby heading (see
   awaitingSeatsHtml's standbyStatsHtml) - same neutral grey-tile styling,
   gap, and radius as the watch card's own .availability-grid/.availability-
   tile, since it's the same "N equal stat tiles in a row" pattern just
   applied to a different stat set. */
.standby-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
  text-align: center;
}
/* Rev Not Checked In/Rev Standby/Upgradeable Elites in the Standby
   Details box (see revStandbyStatsHtml in app.js) - three columns
   instead of the Awaiting Seats section's own four. */
.standby-stats-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.standby-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 4px;
  border-radius: 12px;
  background: var(--wc-subtle);
  border: 1px solid var(--wc-border);
}
.standby-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--wc-navy);
  font-variant-numeric: tabular-nums;
  /* Overrides .standby-value's own text-align: right (see
     alternatesHtml/estimateValueHtml in app.js, which apply both classes
     together for the Est. Position cell) - this grid's cells are centered
     via .standby-stats-grid's own text-align, and .standby-value's right
     alignment (correct in its original horizontal-tile context) otherwise
     wins since it's the more specific rule for this shared element. */
  text-align: center;
}
.standby-stat-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--wc-muted);
  line-height: 1.2;
}
.cell-dash {
  color: var(--wc-secondary);
}
.checkin-check {
  color: var(--wc-green);
}
/* # and Name column padding is uniform across every standby row,
   grouped or not - a grouped-only padding-left made ungrouped rows'
   names sit further left than grouped ones, misaligning the whole
   column. Applied here on the table itself, not per row-state. */
.standby-table td:first-child {
  padding-right: 12px;
  color: var(--wc-muted);
}
.standby-table td:nth-child(2) {
  padding-left: 12px;
}
/* Connects consecutive rows sharing the same confirmationCode with a
   vertical line - the same travel-party grouping Fly's own Awaiting Seats
   widget shows as a bracket. The line itself is a background-image, not a
   border - a border runs the full row height edge-to-edge with no way to
   shorten it, so two *different* adjacent parties' lines would touch and
   look like one continuous group. A background-image can be inset from
   the row's own top/bottom edge instead: the start row's line is
   bottom-anchored and shorter (gap above, nothing to connect to there),
   the end row's is top-anchored and shorter (gap below), and the middle
   row's runs the full height (connects seamlessly above and below within
   the same party). */
.standby-row-group-start td:nth-child(2),
.standby-row-group-middle td:nth-child(2),
.standby-row-group-end td:nth-child(2) {
  background-repeat: no-repeat;
  background-image: linear-gradient(var(--wc-border), var(--wc-border));
  background-size: 2px 100%;
}
.standby-row-group-start td:nth-child(2) {
  background-size: 2px calc(100% - 5px);
  background-position: left bottom;
}
.standby-row-group-end td:nth-child(2) {
  background-size: 2px calc(100% - 5px);
  background-position: left top;
}
.standby-row-mine {
  background: var(--wc-pale-green);
}

/* Bottom tab bar: the app's only navigation (Watches / Search / Settings),
   present on every screen including a deep-linked flight detail page - see
   init()'s single-flight branch in app.js. Fixed and full-width rather than
   constrained to body's max-width, so it always spans the viewport
   regardless of how wide the content column is. */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Above #page-scroll's own z-index (20 - see that rule's comment) - both
     are fixed/positioned children of body, so without this the page
     content wrapper (which now contains everything else, including the
     scrolled-down bottom of the page) paints over the tab bar instead of
     staying tucked underneath it. Regression from the pull-to-refresh
     wrapper, not an original design choice. */
  z-index: 30;
  display: flex;
  border-top: 1px solid var(--wc-border);
  background: canvas; /* matches the page background in both color schemes */
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  color: var(--wc-muted);
  border: none;
  border-radius: 0;
  padding: 8px 6px 6px;
  min-height: 54px;
  font-size: 0.75em;
  font-weight: 600;
}
.tab-icon {
  flex: 0 0 auto;
}
.tab-btn.active {
  color: var(--accent);
}
.tab-btn:hover {
  opacity: 1;
}

/* Watch card at very narrow widths (down to 320px, e.g. a small phone in
   portrait with no room to spare) - padding, radius, and the largest type
   sizes on the card step down a notch, but the four availability tiles
   stay on one row and nothing here truncates. */
@media (max-width: 359px) {
  .watch-card {
    padding: 14px;
    border-radius: 18px;
  }
  .watch-card .flight-number {
    font-size: 18px;
  }
  .wc-airport-code {
    font-size: 28px;
  }
  .availability-value {
    font-size: 18px;
  }
  .availability-label {
    font-size: 9px;
  }
}

/* ID90 card's per-watch sync button: spins while its refresh is in flight. */
.wc-icon-btn.syncing svg {
  animation: sync-spin 0.8s linear infinite;
}

/* ---- Layout by available space (classes set by applyLayout in app.js) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* One pane at a time: the list, or the open flight. */
#view-watches:not(.has-flight) .detail-pane,
#view-watches.has-flight .list-pane,
.pane-empty,
.loads-detail {
  display: none;
}

/* Side rail instead of the bottom bar, buttons at the bottom of the column:
   on the opened or folded Duo the camera and clock sit at the top of it. */
html.has-rail {
  --rail-w: max(76px, var(--safe-r));
}
html.has-rail body {
  padding-right: calc(16px + var(--rail-w));
  padding-bottom: calc(16px + var(--safe-b));
}
html.has-rail .tab-bar {
  top: 0;
  left: auto;
  width: var(--rail-w);
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: var(--safe-t) 0 calc(12px + var(--safe-b));
  border-top: 0;
  border-left: 1px solid var(--wc-border);
}
html.has-rail .tab-btn {
  flex: 0 0 auto;
  min-height: 60px;
}

/* List on the left, what's selected on the right, meeting at the middle of
   the screen (where the fold is). */
html.is-split body {
  max-width: none;
}
html.is-split #view-watches,
html.is-split #loads-section {
  display: grid;
  grid-template-columns: calc(50vw - 28px - var(--safe-l)) minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
}
html.is-split #refresh-error {
  grid-column: 1 / -1;
}
html.is-split #view-watches .list-pane,
html.is-split #view-watches .detail-pane,
html.is-split .loads-detail {
  display: block;
  min-width: 0;
}
html.is-split .detail-pane,
html.is-split .loads-detail {
  position: sticky;
  top: var(--safe-t);
  max-height: calc(100vh - var(--safe-t));
  max-height: calc(100dvh - var(--safe-t));
  overflow-y: auto;
  /* Up and down only: without this the pane can be dragged sideways. */
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding-bottom: 16px;
}
/* The card beside it already shows the flight and its numbers, so the pane
   starts at the standby list when there is one. */
html.is-split .detail-pane > .card:has(#flight-awaiting-seats > *) > :is(#flight-details-box, #flight-standby-box) {
  display: none;
}
html.is-split #view-watches:not(.has-flight) .pane-empty {
  display: block;
  margin-top: 40px;
  text-align: center;
  color: var(--wc-muted);
  font-weight: 600;
}
html.is-split #view-watches:not(.has-flight) .detail-pane > :not(.pane-empty),
html.is-split #back-link {
  display: none;
}
html.is-split .card-list,
html.is-split #loads-results-list {
  grid-template-columns: minmax(0, 1fr);
}
html.is-split #view-settings,
html.is-split #view-search:has(#search-pane-id90:not(.hidden)) {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
/* Beside its results, the Alaska search keeps title and source over the list. */
html.is-split #view-search:has(#search-pane-alaska:not(.hidden)) > :is(.sh-page-header, .subtabs) {
  width: calc(50vw - 28px - var(--safe-l));
}
.watch-card.is-selected,
.itin.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ---- Watches redesign: list, flight page, sheets --------------------------
   Values follow the approved mock-ups; --sh-* are their tokens. */
:root {
  --sh-ink: #13253a;
  --sh-muted: #56667a;
  --sh-card: #ffffff;
  --sh-subtle: #f4f6f8;
  --sh-border: #dde3ea;
  --sh-green: #08785a;
  --sh-you: #2557d6;
  --sh-down: #b03a2e;
  --sh-dot: #93a1b3;
  --sh-fill: #13253a;
  --sh-onfill: #ffffff;
  --sh-me: #e8eefc;
  --sh-switch-off: #c3ccd6;
  --sh-toast: #13253a;
  --sh-ontoast: #ffffff;
  --sh-undo: #7fe3c6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sh-ink: #eaf0f7;
    --sh-muted: #94a3b4;
    --sh-card: #182230;
    --sh-subtle: rgba(255, 255, 255, 0.06);
    --sh-border: #3a4048;
    --sh-green: #4cd9ae;
    --sh-you: #7b9bff;
    --sh-down: #ff8577;
    --sh-dot: #6b7888;
    --sh-fill: #3ecfae;
    --sh-onfill: #0b1623;
    --sh-me: rgba(123, 155, 255, 0.18);
    --sh-switch-off: #4a5563;
    --sh-toast: #eaf0f7;
    --sh-ontoast: #0b1623;
    --sh-undo: #08785a;
  }
}

/* No logo bar: each tab starts with its title and sits 12px from the edges. */
body.app {
  padding-top: var(--safe-t);
  padding-left: calc(12px + var(--safe-l));
  padding-right: calc(12px + var(--safe-r));
  color: var(--sh-ink);
  font-variant-numeric: tabular-nums;
}
/* With no top bar, keep scrolled cards from running under the status bar. */
body.app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-t);
  z-index: 25;
  background: var(--wc-page-bg);
}
.sh-sheet:focus {
  outline: none;
}
html.has-rail body.app {
  padding-right: calc(12px + var(--rail-w));
}
#view-watches,
#view-search,
#view-settings,
.login-main,
.sh-sheet {
  line-height: normal;
}
#view-watches .card {
  margin-top: 0;
}

.sh-page-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 16px 2px 10px 4px;
}
.sh-page-header .page-title {
  font-size: 28px;
  letter-spacing: -0.025em;
}

/* Icon buttons: a 40px circle in a 44px target. */
button.sh-iconbtn,
a.sh-iconbtn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sh-ink);
  text-decoration: none;
}
.sh-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--sh-border);
  border-radius: 50%;
  background: var(--sh-card);
}
.sh-iconbtn-lg .sh-circle {
  width: 44px;
  height: 44px;
}
.sh-badge {
  position: absolute;
  top: 0;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border: 1.5px solid var(--sh-card);
  border-radius: 10px;
  background: var(--sh-muted);
  color: var(--sh-card);
  font-size: 11px;
  font-weight: 800;
}
.sh-iconbtn.syncing svg {
  animation: sync-spin 0.8s linear infinite;
}

/* Cards */
#view-watches .card-list {
  gap: 14px;
  margin-top: 6px;
}
.sh-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 24px;
  background: var(--sh-card);
  box-shadow: 0 8px 22px -16px rgba(19, 37, 58, 0.35);
}
.sh-card-compact {
  gap: 10px;
}
.sh-card h2 {
  margin: 0;
}
.sh-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sh-title-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sh-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.sh-card h2.sh-flight {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sh-ink);
}
.sh-card h2.sh-flight-compact {
  font-size: 19px;
}
.sh-flight-link {
  color: inherit;
  text-decoration: none;
}
.sh-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-actions {
  display: flex;
  gap: 4px;
  margin-right: -2px;
}
.sh-title .status-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Route */
.sh-route {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--sh-subtle);
}
.sh-end {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.sh-end-dest {
  align-items: flex-end;
}
.sh-code {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sh-time {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.sh-time.is-delayed {
  color: var(--hold);
}
.sh-route-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
}
.sh-duration {
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-muted);
  white-space: nowrap;
}
.sh-route-mid .sh-dots {
  width: 100%;
  max-width: 72px;
}
.sh-dots {
  border-top: 2px dotted var(--sh-dot);
}
.sh-miniroute {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}
.sh-miniroute .sh-dots {
  flex: 1;
  min-width: 6px;
}
.sh-miniroute .sh-time:not(.is-delayed) {
  color: var(--sh-ink);
}
.sh-miniroute .sh-duration {
  font-size: 12px;
}

/* Boarding */
a.sh-pass {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  flex: none;
  border-radius: 16px;
  background: var(--sh-fill);
  color: var(--sh-onfill);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}
.sh-boarding {
  display: flex;
  gap: 8px;
}
.sh-boarding-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 4px;
}
.sh-boarding-boards {
  flex: 3;
}
.sh-boarding-gate {
  flex: 1;
}
.sh-big {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.sh-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-muted);
}

/* Open / Standby / place */
.sh-facts {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--sh-subtle);
}
.sh-facts-compact {
  padding: 8px 14px;
  border-radius: 14px;
}
.sh-fact {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.sh-fact-mid {
  align-items: center;
}
.sh-fact-end {
  align-items: flex-end;
  text-align: right;
}
.sh-fact-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-muted);
}
.sh-fact-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.sh-boarding .sh-fact-row {
  gap: 8px;
}
.sh-fact-value,
.sh-fact-value .availability-value,
.sh-fact-value .standby-value {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sh-ink);
  white-space: nowrap;
}
.sh-facts-compact .sh-fact-value,
.sh-facts-compact .sh-fact-value .availability-value,
.sh-facts-compact .sh-fact-value .standby-value {
  font-size: 22px;
}
.sh-fact.is-you .sh-fact-value,
.sh-facts:not(.sh-facts-compact) .sh-fact.is-you .availability-value {
  color: var(--sh-you);
}
.sh-fact-value .availability-value-msg,
.sh-fact-value .standby-value-msg {
  font-size: 12px;
  letter-spacing: 0;
  white-space: normal;
}
.sh-fact-of {
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-muted);
}
.sh-change {
  font-size: 12px;
  font-weight: 800;
}
.sh-change.is-down {
  color: var(--sh-down);
}
.sh-change.is-up {
  color: var(--sh-green);
}
.sh-facts.is-live-polling .sh-fact-value {
  opacity: 0.45;
}

/* Confirmation, seat map, footer */
.sh-linkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0;
}
.sh-card-compact .sh-linkrow {
  margin: -8px 0;
}
button.sh-textbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sh-ink);
  font-size: 14px;
  font-weight: 700;
}
.sh-muted {
  color: var(--sh-muted);
  font-weight: 600;
}
.sh-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px 0 -4px;
  min-height: 24px;
  color: var(--sh-muted);
}
.sh-foot .last-checked,
#page-header-actions .last-checked {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-foot .last-checked svg,
#page-header-actions .last-checked svg {
  width: 14px;
  height: 14px;
}
.sh-foot .last-checked.is-old,
#page-header-actions .last-checked.is-old {
  color: var(--sh-down);
}
.sh-card .assigned-seats,
.sh-card .checkin-slot,
.sh-card .empty-message {
  margin: 0;
}

/* Flight page */
.detail-pane .page-header.compact {
  margin: 0;
}
.detail-pane .page-header-top {
  gap: 4px;
  margin: 0 -2px;
  padding: 14px 0 10px;
}
.detail-pane .page-header-actions {
  gap: 4px;
}
.detail-pane .page-header-actions .last-checked {
  margin-right: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  min-height: 0;
  height: auto;
  font-weight: 700;
}
.detail-pane .page-header-actions .sh-circle {
  width: 44px;
  height: 44px;
}
.detail-pane #page-header-meta {
  display: none;
}
.detail-pane > .card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-pane > .card > div:empty {
  display: none;
}
.detail-pane #standby,
.detail-pane #standby-details {
  scroll-margin-top: 12px;
}
.sh-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sh-card .sh-head h2,
.sh-card summary h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--sh-ink);
}
.sh-head span,
.sh-fold-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-split {
  display: flex;
  padding: 2px 0;
}
.sh-split div {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
}
.sh-split span {
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-muted);
}
.sh-split strong {
  font-size: 18px;
  font-weight: 800;
}
button.sh-outline,
a.sh-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  min-height: 0;
  flex: none;
  box-sizing: border-box;
  border: 1px solid var(--sh-border);
  border-radius: 14px;
  background: var(--sh-card);
  color: var(--sh-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.sh-standby-card {
  gap: 10px;
}
.sh-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-weight: 700;
}
.sh-table th,
.sh-table td {
  padding: 0;
  text-align: left;
  vertical-align: middle;
}
.sh-table thead th {
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-muted);
}
.sh-table .sh-mid {
  text-align: center;
}
.sh-standby th:nth-child(1) {
  width: 44px;
}
.sh-standby th:nth-child(3) {
  width: 90px;
}
.sh-standby th:nth-child(4) {
  width: 50px;
}
.sh-standby th:nth-child(5) {
  width: 46px;
}
.sh-standby th:first-child,
.sh-standby td:first-child {
  padding-left: 8px;
}
.sh-standby td {
  height: 44px;
  font-size: 15px;
}
.sh-standby .sh-num {
  position: relative;
  font-weight: 800;
  color: var(--sh-muted);
}
.sh-standby .sh-priority {
  font-size: 13px;
  color: var(--sh-muted);
}
/* One unbroken line down a party, with a mark beside each person. */
.sh-standby tr.in-party .sh-num::before,
.sh-standby tr.in-party .sh-num::after {
  content: '';
  position: absolute;
  left: 30px;
  background: var(--sh-dot);
}
.sh-standby tr.in-party .sh-num::before {
  top: 0;
  bottom: -1px;
  width: 2px;
}
.sh-standby tr.party-first .sh-num::before {
  top: 50%;
}
.sh-standby tr.party-last .sh-num::before {
  bottom: 50%;
}
.sh-standby tr.in-party .sh-num::after {
  left: 28px;
  top: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.sh-standby tr.is-mine td {
  background: var(--sh-me);
}
.sh-standby tr.is-mine .sh-num {
  color: var(--sh-you);
}
.sh-standby tr.is-mine td:first-child {
  border-radius: 12px 0 0 12px;
}
.sh-standby tr.is-mine td:last-child {
  border-radius: 0 12px 12px 0;
}
.sh-standby tr.is-mine.in-party td {
  border-radius: 0;
}
.sh-check {
  display: inline-flex;
  color: var(--sh-green);
  vertical-align: middle;
}
.sh-table .cell-dash {
  color: var(--sh-muted);
}
.sh-guests {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--sh-border);
  font-size: 14px;
  font-weight: 700;
}
.sh-confirmed td {
  height: 36px;
  font-size: 14px;
}
.sh-confirmed td:not(:first-child) {
  width: 50px;
}

.sh-fold {
  gap: 0;
}
.sh-fold summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: -10px 0;
  list-style: none;
  cursor: pointer;
}
.sh-fold summary::-webkit-details-marker {
  display: none;
}
.sh-fold-hint {
  margin-left: auto;
}
.sh-fold summary svg {
  color: var(--sh-muted);
}
.sh-fold details[open] summary svg {
  transform: rotate(180deg);
}
.sh-fold-body {
  padding-top: 18px;
}
.sh-booking th:first-child {
  width: auto;
}
.sh-booking thead th:not(:first-child) {
  width: 52px;
  padding-bottom: 6px;
}
.sh-booking td,
.sh-booking thead th:not(:first-child) {
  text-align: right;
}
.sh-booking tbody th,
.sh-booking tbody td {
  height: 40px;
  border-top: 1px solid var(--sh-border);
  font-size: 14px;
  font-weight: 700;
}
.sh-history {
  font-variant-numeric: tabular-nums;
}
.sh-history th:first-child {
  width: 36%;
}
.sh-history thead th:not(:first-child),
.sh-history td {
  text-align: right;
}
.sh-history tbody th,
.sh-history tbody td {
  height: 40px;
  border-top: 1px solid var(--sh-border);
  font-size: 15px;
}
.sh-history tbody th {
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-history td {
  font-weight: 800;
}
.sh-history td.sh-same {
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-history .sh-history-day th {
  height: 38px;
  padding-top: 10px;
  border-top: 0;
  font-size: 13px;
  font-weight: 800;
  color: inherit;
}
.sh-info {
  gap: 4px;
  padding: 14px;
}
.sh-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
}
.sh-kv > span:first-child {
  color: var(--sh-muted);
}
.sh-kv + .sh-kv {
  border-top: 1px solid var(--sh-border);
  padding-top: 4px;
}
.sh-alt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sh-alt-name {
  font-size: 15px;
  font-weight: 700;
}

/* Tab bar */
.tab-bar {
  background: var(--sh-card);
}
.tab-btn {
  gap: 3px;
  min-height: 60px;
  padding: 0 6px 6px;
  font-size: 13px;
}
.tab-btn.active {
  color: var(--sh-ink);
  font-weight: 800;
}

/* Bottom sheets */
.sh-sheet-open {
  overflow: hidden;
}
.sh-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(19, 37, 58, 0.45);
}
.sh-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 10px 20px calc(24px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: var(--sh-card);
  color: var(--sh-ink);
}
.sh-grabber {
  align-self: center;
  flex: none;
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: var(--sh-border);
}
.sh-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sh-sheet-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sh-sheet-head span {
  font-size: 14px;
  font-weight: 600;
  color: var(--sh-muted);
}
button.sh-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sh-subtle);
  color: var(--sh-ink);
}
/* Seat map sheet: header, your seats and the key stay put; the cabin
   scrolls. Product colors are Alaska's own. */
.sh-sheet.sm-sheet {
  --sm-lane: 20px;
  height: 92dvh;
  gap: 0;
  padding: 10px 0 0;
  overflow: hidden;
}
.sm-sheet .sh-sheet-head {
  flex: none;
  padding: 8px 20px 10px;
}
.sm-chips {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
}
button.sm-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  min-height: 0;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 22px;
  background: var(--sh-subtle);
  color: var(--sh-ink);
  font-size: 14px;
  font-weight: 700;
}
.sm-chip i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--wc-seat-mine);
  color: var(--wc-seat-on-mine);
  font-style: normal;
  font-weight: 800;
}
.sm-chip b {
  font-weight: 800;
}
.sm-key {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  min-height: 27px;
  padding: 0 20px 10px;
  border-bottom: 1px solid var(--sh-border);
  font-size: 12px;
  font-weight: 700;
}
.sm-key > span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.sm-swatch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  overflow: hidden;
}
.sm-swatch svg {
  width: 9px;
  height: 9px;
}
.sm-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: var(--safe-b);
}
.sm-scroll:focus-visible {
  outline: 2px solid var(--sh-you);
  outline-offset: -2px;
}
.sm-message {
  margin: 0;
  padding: 32px 20px;
  text-align: center;
  color: var(--sh-muted);
  font-weight: 600;
}
.sm-plane {
  margin: 10px 6px 0;
  padding: 34px 0 30px;
  border: 1.5px solid var(--sh-border);
  border-bottom: 0;
  border-radius: 120px 120px 0 0 / 70px 70px 0 0;
}
.sm-cabin {
  margin-top: 6px;
}
.sm-cabin h3 {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 30px;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.sm-letters {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  align-items: center;
  height: 30px;
  background: var(--sh-card);
  color: var(--sh-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.sm-body {
  position: relative;
}
.sm-grid {
  display: grid;
}
.sm-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-seat {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: min(38px, 100% - 6px);
  aspect-ratio: 1;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 800;
}
.sm-seat.is-first {
  width: min(54px, 100% - 6px);
  height: 38px;
  aspect-ratio: auto;
}
.sm-first {
  background: var(--wc-seat-first);
}
.sm-premium {
  background: var(--wc-seat-premium);
}
.sm-main {
  background: var(--wc-seat-main);
}
/* Main Preferred: the white corner Alaska draws. */
.sm-preferred::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  border-top: 9px solid #fff;
  border-left: 9px solid transparent;
  border-top-right-radius: 3px;
}
.sm-swatch.sm-preferred::after {
  top: 1px;
  right: 1px;
  border-top-width: 6px;
  border-left-width: 6px;
}
.sm-taken {
  background: var(--wc-seat-unavailable);
  color: var(--sh-muted);
}
.sm-mine {
  background: var(--wc-seat-mine);
  color: var(--wc-seat-on-mine);
  box-shadow: 0 0 0 2px var(--sh-card), 0 0 0 4px var(--wc-seat-mine);
}
.sm-row {
  align-self: center;
  text-align: center;
  color: var(--sh-muted);
  font-size: 13px;
  font-weight: 700;
}
.sm-facility {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 3px;
  border-radius: 10px;
  background: var(--wc-seat-unavailable);
  color: var(--sh-muted);
}
.sm-exit {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 2px;
  height: 38px;
  color: var(--sh-muted);
}
.sm-exit-right {
  flex-direction: row-reverse;
}
.sm-exit i {
  width: 4px;
  height: 38px;
  border-radius: 3px;
  background: var(--sh-muted);
}
.sm-exit b {
  writing-mode: vertical-rl;
  font-size: 10px;
  font-weight: 800;
  line-height: 12px;
}
.sm-exit-left b {
  transform: rotate(180deg);
}
.sm-wing {
  position: absolute;
  width: 6px;
  background: var(--sh-border);
}
.sm-wing-left {
  left: -6px;
}
.sm-wing-right {
  right: -6px;
}

.sh-person {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}
.sh-person + .sh-person {
  border-top: 1px solid var(--sh-border);
}
.sh-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sh-subtle);
  font-size: 14px;
  font-weight: 800;
}
.sh-person.is-on .sh-avatar {
  background: var(--sh-fill);
  color: var(--sh-onfill);
}
.sh-person-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 700;
}
button.sh-switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--sh-switch-off);
}
button.sh-switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: left 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
button.sh-switch[aria-checked='true'] {
  background: var(--sh-green);
}
button.sh-switch[aria-checked='true'] span {
  left: 22px;
}
.sh-sheet-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-toast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 2px 6px 2px 16px;
  border-radius: 16px;
  background: var(--sh-toast);
  color: var(--sh-ontoast);
  font-size: 14px;
  font-weight: 700;
}
.sh-toast[hidden],
.sh-toast button[hidden] {
  display: none;
}
.sh-toast button {
  height: 44px;
  min-height: 0;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--sh-undo);
  font-size: 14px;
  font-weight: 800;
}
.sh-group {
  display: flex;
  flex-direction: column;
  flex: none;
  border-radius: 16px;
  background: var(--sh-subtle);
  overflow: hidden;
}
button.sh-item,
a.sh-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  height: 56px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sh-ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.sh-group .sh-item + .sh-item {
  border-top: 1px solid var(--sh-border);
}
button.sh-item-danger {
  color: var(--sh-down);
}

/* Inside the iPhone app: the system tab bar replaces ours, and the page's
   bottom safe area already clears it. */
html.in-app .tab-bar,
html.in-app #push-section {
  display: none;
}
html.in-app body {
  padding-bottom: calc(16px + var(--safe-b));
}

/* ---- Search, Settings and Log in, in the same style ---------------------- */
.sh-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
.sh-card h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--sh-ink);
}
.sh-card p {
  margin: 0;
}
.sh-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sh-card a:not([class]) {
  color: var(--sh-you);
}
button.sh-primary,
a.sh-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  min-height: 0;
  flex: none;
  box-sizing: border-box;
  border: 0;
  border-radius: 14px;
  background: var(--sh-fill);
  color: var(--sh-onfill);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}
button.sh-primary.hidden {
  display: none;
}
button.sh-outline:disabled {
  color: var(--sh-muted);
  cursor: default;
  opacity: 1;
}
button.sh-outline.sh-danger {
  color: var(--sh-down);
}

/* A field is a grey block with its label inside, like the route on a card. */
.sh-field {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 9px 14px 8px;
  border-radius: 16px;
  background: var(--sh-subtle);
  cursor: text;
}
.sh-field:focus-within {
  outline: 2px solid var(--sh-you);
  outline-offset: -2px;
}
.sh-field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-muted);
}
.sh-field input {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sh-ink);
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  caret-color: var(--sh-you);
}
.sh-field input::placeholder {
  color: var(--sh-muted);
  font-weight: 500;
  opacity: 1;
}
.sh-field input::-webkit-date-and-time-value {
  text-align: left;
}
.sh-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.route-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}
.route-inputs {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  min-width: 0;
}
.recent-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.recent-routes.hidden {
  display: none;
}

.subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--sh-border);
  border-radius: 999px;
  background: var(--sh-card);
}
button.subtab-btn {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sh-muted);
  font-size: 15px;
  font-weight: 700;
}
button.subtab-btn.active {
  background: var(--sh-fill);
  color: var(--sh-onfill);
}

.loads-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.loads-sort-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sh-muted);
}
#loads-sort {
  min-height: 36px;
  padding: 6px 28px 6px 14px;
  border-color: var(--sh-border);
  border-radius: 999px;
  background-color: var(--sh-card);
  color: var(--sh-ink);
  font-size: 13px;
  font-weight: 700;
}
button.filter-chip {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--sh-border);
  border-radius: 999px;
  background: var(--sh-card);
  color: var(--sh-ink);
  font-size: 13px;
  font-weight: 700;
}
button.filter-chip.active {
  border-color: var(--sh-fill);
  background: var(--sh-fill);
  color: var(--sh-onfill);
}
#loads-status,
#other-status {
  margin: 12px 4px;
}
#loads-status:empty,
#other-status:empty,
#priority-status:empty {
  display: none;
}

/* Results: one short card each; open seats carry the colour. */
#loads-results-list {
  gap: 10px;
}
.itin {
  overflow: hidden;
  border-radius: 18px;
  background: var(--sh-card);
  box-shadow: 0 8px 22px -16px rgba(19, 37, 58, 0.35);
}
div.itin-row,
button.itin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 3px 12px;
  width: 100%;
  min-height: 0;
  padding: 13px 16px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--sh-ink);
  text-align: left;
}
.itin-times {
  font-size: 17px;
  font-weight: 800;
}
.itin-open {
  text-align: right;
  font-size: 19px;
  font-weight: 800;
}
.itin-go .itin-open,
.sh-fact.is-go .sh-fact-value {
  color: var(--sh-green);
}
.itin-hold .itin-open,
.sh-fact.is-hold .sh-fact-value {
  color: var(--hold);
}
.itin-no .itin-open,
.itin-cancelled .itin-open,
.sh-fact.is-no .sh-fact-value {
  color: var(--sh-down);
}
.itin-cancelled .itin-times {
  color: var(--sh-muted);
}
.itin-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--sh-muted);
}
.itin-listed {
  text-align: right;
}
.itin-detail .itinerary-card {
  border-top: 1px solid var(--sh-border);
  border-radius: 0;
  box-shadow: none;
}
.leg {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.leg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.leg-actions > button.sh-outline {
  flex: 1 1 140px;
  width: auto;
}
.priority-estimate {
  flex: 1 1 140px;
  font-size: 14px;
  font-weight: 700;
}
.priority-estimate.hint {
  flex-basis: 100%;
  color: var(--sh-muted);
  font-size: 13px;
  font-weight: 600;
}
.priority-estimate.resolved {
  color: var(--sh-you);
  text-align: center;
}
.layover-divider {
  padding-top: 10px;
  border-top: 1px dashed var(--sh-border);
  color: var(--sh-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
#other-results-list {
  gap: 14px;
}
#other-results-list.hidden,
#loads-results-list.hidden {
  display: none;
}
html.is-split .loads-detail .itinerary-card {
  margin-top: 16px;
}

.sh-prose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--sh-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.sh-prose h3 {
  margin: 6px 0 0;
  color: var(--sh-ink);
  font-size: 15px;
}
#account-section .sh-person {
  height: auto;
}

/* Log in: the lockup over one card, centred on the screen. */
.login-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  max-width: 380px;
  min-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 40px);
  margin: 0 auto;
}
body.login {
  padding-bottom: calc(16px + var(--safe-b));
}
.logo-lockup.logo-lockup-full {
  flex: none;
  align-self: center;
  width: 280px;
  max-width: 100%;
}
.login-error {
  margin: 0;
  color: var(--sh-down);
  font-size: 14px;
  font-weight: 700;
}
