/* haulora/pwa - fresh mobile-first stylesheet (not dashboard.css's desktop
   sidebar layout system). Color tokens match web/public/assets/css/
   dashboard.css's :root so the PWA reads as the same product. */

:root {
  /* Topbar height including the notch / status bar (iOS standalone draws
     under it: viewport-fit=cover + black-translucent status bar). */
  --topbar-h: calc(56px + env(safe-area-inset-top));
  --bg:      #08071E;
  --bg-2:    #181B22;
  --accent:  #0098D6;
  --text:    #DCE1FA;
  --text-2:  #9BA1B5;
  --text-3:  #838B9F;
  --border:  #1E2130;
  --border-2: #272C3D;
  --danger:  #E5484D;
  --success: #3DD68C;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* ── APP SHELL ─────────────────────────────────────────────── */

/* Hamburger (left) + centered logo, no page title or back button -
   navigation lives entirely in the slide-out sidebar (below), reachable
   from any page via the hamburger. A same-width spacer opposite the
   hamburger button keeps the logo visually centered regardless of the
   button's own footprint - centering with plain flex/space-between would
   drift since only one side has a button. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  height: var(--topbar-h);
  padding: env(safe-area-inset-top) max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-inline-start: -0.75rem;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.topbar-menu-btn:active {
  background: rgba(255, 255, 255, 0.06);
}

.topbar-logo {
  /* No flex-grow here - auto margins alone already absorb the row's free
     space and center a fixed-size item between the button and spacer.
     flex:1 (flex-basis:0%) was overriding the explicit width below and
     letting the image's own box stretch to fill the row instead. */
  height: 26px;
  width: auto;
  margin: 0 auto;
  display: block;
}

.topbar-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-inline-end: -0.75rem;
  border-radius: 8px;
  color: var(--text);
}

.topbar-settings-btn:active {
  background: rgba(255, 255, 255, 0.06);
}

.content {
  min-height: calc(100dvh - var(--topbar-h));
  padding: 1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.loading, .error, .empty {
  color: var(--text-3);
  font-size: 0.875rem;
  padding: 2rem 0;
  text-align: center;
}

.error { color: var(--danger); }

/* ── LOGIN / AUTH-COMPLETE ─────────────────────────────────── */

.login-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.login-logo {
  /* logo_text.png is a 1563x342 wordmark, not a square icon - sized by
     height with auto width to keep its aspect ratio, no crop radius. */
  height: 48px;
  width: auto;
}

.login-sub   { margin: 0 0 1rem; color: var(--text-2); }
.login-status { color: var(--text-2); }

.btn-steam {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── STAT / CARD PRIMITIVES ────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

.stat-value { font-size: 1.25rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--text-3); margin-top: 0.125rem; }

.section-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 1.5rem 0 0.5rem;
}

.list { display: flex; flex-direction: column; gap: 0.5rem; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.875rem;
}

.list-row-main { min-width: 0; }
.list-row-title { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-sub   { font-size: 0.75rem; color: var(--text-3); margin-top: 0.125rem; }
/* Settings save/error line under a section: takes no room until it has a message. */
.settings-msg        { margin-top: 0.5rem; }
.settings-msg:empty  { display: none; }
.form-field:has(+ .settings-msg:empty:last-child) { margin-bottom: 0; }
.list-row-value { font-size: 0.875rem; font-weight: 600; white-space: nowrap; }

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.tab {
  flex: 0 0 auto;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── SIDEBAR DRAWER (opened via the topbar's hamburger button) ────────── */

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.is-open { opacity: 1; }

.sidebar-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  z-index: 21;
  width: min(65vw, 235px);
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-inline-end: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.sidebar-drawer.is-open { transform: translateX(0); }

.sidebar-drawer-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 56px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-drawer-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.sidebar-drawer-title {
  flex: 1;
  font-weight: 700;
  font-size: 1rem;
}

.sidebar-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
}
.sidebar-drawer-close:active { background: rgba(255, 255, 255, 0.06); }

.sidebar-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.sidebar-drawer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
}

/* A flex item's default min-width:auto stops it shrinking below its own
   content's natural width, which is how the label was getting clipped
   against the drawer's edge instead of wrapping onto a second line at
   narrower drawer widths - min-width:0 lets it actually shrink/wrap. */
.sidebar-drawer-item span {
  flex: 1;
  min-width: 0;
}

.sidebar-drawer-item:active { background: rgba(255, 255, 255, 0.06); }

.sidebar-drawer-item.is-active {
  background: rgba(0, 152, 214, 0.12);
  color: var(--accent);
}
.sidebar-drawer-item.is-active .sidebar-drawer-icon { color: var(--accent); }

.sidebar-drawer-icon { color: var(--text-2); flex-shrink: 0; }

.sidebar-drawer-item-disabled { color: var(--text-3); }
.sidebar-drawer-item-disabled .sidebar-drawer-icon { color: var(--text-3); }

.sidebar-drawer-item-logout { color: var(--danger); }
.sidebar-drawer-item-logout .sidebar-drawer-icon { color: var(--danger); }

/* ── INSTALL BANNER ────────────────────────────────────────── */

/* Bottom sheet, not a top banner - keeps the topbar/logo undisturbed and
   lands near the thumb on a phone. Fixed (not sticky) since it should
   float over content rather than push it down. */
/* Author `display` rules beat the browser's own `[hidden]{display:none}`
   regardless of selector order, so without this the element stayed
   visible the whole time and the JS `.hidden` toggle was a no-op. */
.install-banner[hidden] {
  display: none;
}

.install-banner {
  position: fixed;
  inset-inline-start: 0.75rem;
  inset-inline-end: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.install-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.install-banner-text { flex: 1; min-width: 0; }
.install-banner-title { font-weight: 700; font-size: 0.875rem; }
.install-banner-sub { font-size: 0.75rem; color: var(--text-3); margin-top: 0.125rem; }

.install-banner-btn {
  flex-shrink: 0;
  border: none;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
}

.install-banner-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* ── WEBSITE CATCH-UP PAGES ────────────────────────────────── */
/* Shared pieces for the pages added to match the website (notifications,
   achievements, dispatch, members, livetracker, the redesigned haul page,
   discovery, insights, ...). Same tokens as above. */

:root {
  --warn: #F5A524;
  --bg-3: #20242E;
}

/* Logo stays centred now that the topbar has two buttons on the right. */
.topbar { position: sticky; }
.topbar-logo { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 11px); transform: translateX(-50%); margin: 0; }
.topbar-bell-btn { position: relative; margin-inline-start: auto; margin-inline-end: 0; }
.topbar-badge {
  position: absolute; top: 2px; inset-inline-end: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.625rem; font-weight: 700;
  line-height: 16px; text-align: center;
}
.topbar-badge[hidden] { display: none; }

.page-title { margin: 0 0 0.25rem; font-size: 1.25rem; }
.page-sub { color: var(--text-3); margin: 0 0 1rem; font-size: 0.875rem; }
.eyebrow { margin: 0 0 0.25rem; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.link { color: var(--accent); }
.muted { color: var(--text-3); }
.wrap { white-space: normal !important; overflow: visible; text-overflow: clip; }
.grow { flex: 1; min-width: 0; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

button.list-row { width: 100%; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.list-row-stack { flex-direction: column; align-items: stretch; gap: 0.375rem; }
.row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.row-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }

.card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.875rem 1rem; margin-bottom: 0.75rem;
}
.card-danger { border-color: rgba(229, 72, 77, 0.4); }
.summary-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 0.875rem 1rem; margin-bottom: 1rem; }
.summary-row { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.summary-value { font-size: 1.25rem; font-weight: 700; }

.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid-3 .stat-value { font-size: 1.0625rem; }
.stat-value small { font-size: 0.75rem; color: var(--text-3); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  border: 1px solid transparent; border-radius: 8px; padding: 0.55rem 0.95rem;
  font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--bg-3); color: var(--text);
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-danger-text { color: var(--danger); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
.btn-block { display: flex; width: 100%; margin-top: 0.75rem; }
.btn-row, .btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.btn-group { margin-top: 0; }

/* Form fields */
.field {
  width: 100%; padding: 0.625rem 0.75rem; border-radius: 8px; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 0.875rem;
}
.field-sm { width: auto; padding: 0.4rem 0.6rem; font-size: 0.8125rem; }
.form-field { display: block; margin-bottom: 0.875rem; }
.form-label { display: block; font-size: 0.8125rem; color: var(--text-2); margin-bottom: 0.375rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.toolbar .tabs { margin-bottom: 0; }
.toolbar-search .field { flex: 1; }
.count-pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 0.4rem; font-size: 0.6875rem; }
.count-pill[hidden] { display: none; }
.toggle-row { cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.6875rem; font-weight: 600; background: var(--bg-3); color: var(--text-2);
  border: 1px solid var(--border-2); white-space: nowrap; vertical-align: middle;
}
.chip-accent { color: var(--accent); border-color: rgba(0, 152, 214, 0.4); }
.chip-staff { color: var(--danger); border-color: rgba(229, 72, 77, 0.4); }
.chip-supporter { color: var(--chip-color); border-color: var(--chip-color); }
.chip-warn { color: var(--warn); border-color: rgba(245, 165, 36, 0.4); }
.chip-danger { color: var(--danger); border-color: rgba(229, 72, 77, 0.4); }
.chip-status-delivered, .chip-status-accepted { color: var(--success); border-color: rgba(61, 214, 140, 0.4); }
.chip-status-in_progress, .chip-status-enroute { color: var(--accent); border-color: rgba(0, 152, 214, 0.4); }
.chip-status-pending, .chip-status-unfinished { color: var(--warn); border-color: rgba(245, 165, 36, 0.4); }
.chip-status-declined, .chip-status-failed, .chip-status-cancelled, .chip-status-expired { color: var(--danger); border-color: rgba(229, 72, 77, 0.4); }
.chip-board-realistic { color: var(--success); }
.chip-board-arcade { color: var(--warn); }
.chip-board-ets2la { color: #B48CFF; }

/* Progress bars */
.bar { display: block; height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; margin-top: 0.375rem; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bar-fill.is-done { background: var(--success); }
.bar-damage { flex: 1; margin: 0; }
.bar-damage .bar-fill { background: var(--danger); }

/* Empty states */
.empty-state { text-align: center; padding: 1.5rem 0.5rem; }
.empty-title { font-weight: 600; margin: 0 0 0.25rem; }
.empty-desc { color: var(--text-3); font-size: 0.8125rem; margin: 0 0 0.75rem; }

/* Bottom sheet */
body.sheet-open { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); }
.sheet {
  position: fixed; inset-inline-start: 0; inset-inline-end: 0; bottom: 0; z-index: 41; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg); border-top: 1px solid var(--border-2); border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); }
.sheet-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-close { border: none; background: none; color: var(--text-2); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.sheet-body { overflow-y: auto; padding: 1rem; }

/* Toasts */
.toast-holder { position: fixed; inset-inline-start: 1rem; inset-inline-end: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast {
  pointer-events: auto; padding: 0.75rem 0.875rem; border-radius: 10px; font-size: 0.8125rem;
  background: var(--bg-3); border: 1px solid var(--border-2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: opacity 0.4s, transform 0.4s;
}
.toast-success { border-color: rgba(61, 214, 140, 0.5); }
.toast-error { border-color: rgba(229, 72, 77, 0.6); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }

/* Service worker bars: offline notice + "new version, reload" */
.sw-bar {
  position: fixed; z-index: 70; top: calc(0.5rem + env(safe-area-inset-top)); inset-inline-start: 50%; transform: translateX(-50%);
  max-width: calc(100% - 2rem); display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.875rem; border-radius: 999px; font-size: 0.8125rem;
  background: var(--bg-3); border: 1px solid var(--border-2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
[dir="rtl"] .sw-bar { transform: translateX(50%); }
.sw-bar-offline { border-color: rgba(229, 160, 72, 0.6); }
.sw-bar-update { top: auto; bottom: calc(4.5rem + env(safe-area-inset-bottom)); border-color: rgba(0, 152, 214, 0.55); }
.sw-bar-close { border: none; background: none; color: var(--text-2); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 0.125rem; }

/* Notifications */
.notif-row { justify-content: flex-start; align-items: flex-start; }
.notif-row.is-unread { border-color: rgba(0, 152, 214, 0.45); }
.notif-icon { width: 28px; flex-shrink: 0; text-align: center; font-size: 1.1rem; }
.notif-main { flex: 1; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 0.4rem; }

/* Achievements */
.ach-card {
  display: block; width: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 0.875rem;
}
.ach-card.is-complete { border-color: rgba(61, 214, 140, 0.35); }
.ach-card-head { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.ach-card-name { font-weight: 600; font-size: 0.875rem; margin-inline-end: auto; }
.ach-card-desc { display: block; font-size: 0.75rem; color: var(--text-3); margin-top: 0.25rem; }
.ach-card-foot { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-2); margin-top: 0.375rem; }
.list-row.is-unlocked { border-color: rgba(61, 214, 140, 0.35); }
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 1rem; font-size: 0.8125rem; }
.checklist li { display: flex; gap: 0.375rem; padding: 0.2rem 0; color: var(--text-3); break-inside: avoid; }
.checklist li.is-done { color: var(--text); }
.checklist .check { width: 1rem; color: var(--success); }

/* Message threads */
.thread { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.thread-msg { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.625rem 0.75rem; }
.thread-meta { font-size: 0.6875rem; color: var(--text-3); margin-bottom: 0.25rem; }
.thread-body { font-size: 0.8125rem; white-space: pre-wrap; word-break: break-word; }
.composer { display: flex; gap: 0.5rem; align-items: flex-end; }
.composer .field { flex: 1; resize: vertical; }

/* Livetracker */
.lt-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 0.875rem; }
.lt-head { display: flex; align-items: center; gap: 0.625rem; }
.lt-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.lt-avatar.has-custom-color { border: 2px solid var(--marker-custom); }
.lt-avatar.has-glow { box-shadow: 0 0 0 3px color-mix(in srgb, var(--marker-custom, #00b8e8) 35%, transparent), 0 0 14px 4px color-mix(in srgb, var(--marker-custom, #00b8e8) 55%, transparent); }
.lt-head .list-row-main { flex: 1; }
.lt-speed { font-size: 1.375rem; font-weight: 700; text-align: end; line-height: 1; }
.lt-speed small { display: block; font-size: 0.625rem; color: var(--text-3); font-weight: 500; }
.lt-speed.is-over { color: var(--danger); }
.lt-job { margin-top: 0.625rem; }
.lt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; margin-top: 0.5rem; font-size: 0.6875rem; color: var(--text-3); }
.lt-stats b { display: block; color: var(--text); font-size: 0.8125rem; }

/* Haul page */
.haul-head { margin-bottom: 0.75rem; }
.haul-route { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0; }
.haul-city { font-size: 1.125rem; font-weight: 700; }
.haul-arrow { color: var(--accent); font-size: 1.25rem; }
.haul-tags { display: flex; flex-wrap: wrap; gap: 0.375rem 0.75rem; font-size: 0.75rem; color: var(--text-2); }
.xp { color: var(--success); }
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.375rem 0; font-size: 0.8125rem; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: none; }
.kv-row span:first-child { color: var(--text-2); }
.kv-value { font-weight: 600; text-align: end; }
.damage-row { display: flex; align-items: center; gap: 0.625rem; font-size: 0.75rem; color: var(--text-2); margin-top: 0.5rem; }
.damage-row > span:first-child { width: 5.5rem; flex-shrink: 0; }
.damage-row .kv-value { width: 3rem; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline-item { display: flex; gap: 0.75rem; padding-block: 0.5rem 0.5rem; padding-inline: 0.875rem 0; border-inline-start: 2px solid var(--border-2); }
.timeline-item.tone-good { border-inline-start-color: var(--success); }
.timeline-item.tone-alert { border-inline-start-color: var(--danger); }
.timeline-time { width: 3.25rem; flex-shrink: 0; font-size: 0.75rem; color: var(--text-2); display: flex; flex-direction: column; }
.timeline-gap { font-size: 0.6875rem; color: var(--text-3); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-detail { margin-top: 0.375rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 0.375rem 0.625rem; }
.timeline-detail .btn { margin: 0.375rem 0; }
.timeline-compact .timeline-item { padding-inline-start: 0.75rem; }
.fin-head { display: flex; justify-content: space-between; align-items: baseline; }
.fin-profit { font-size: 1.25rem; font-weight: 700; }
.fin-profit.is-pos { color: var(--success); }
.fin-profit.is-neg { color: var(--danger); }
.fin-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--bg-3); margin: 0.5rem 0; }
.fin-bar-in { background: var(--success); }
.fin-bar-out { background: var(--danger); }
.fin-details summary { cursor: pointer; font-size: 0.75rem; color: var(--accent); margin-top: 0.5rem; }

/* Profile */
.profile-hero {
  position: relative; height: 110px; margin: -1rem -1rem 2.5rem; background: var(--bg-2) center / cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  position: absolute; inset-inline-start: 1rem; bottom: -32px; width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--bg); object-fit: cover; background: var(--bg-3);
}
.profile-head { margin-bottom: 0.75rem; }
.follow-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.follow-count { border: none; background: none; color: var(--text-2); font: inherit; font-size: 0.8125rem; padding: 0; cursor: pointer; }
.follow-count strong { color: var(--text); }
.follow-row .btn { margin-inline-start: auto; }
.medal { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; background: var(--bg-3); }
.medal-1 { color: #FFC107; }
.medal-2 { color: #C0C7D4; }
.medal-3 { color: #D08A4E; }
.dlc-row.is-off { opacity: 0.55; }
.dlc-img { width: 64px; height: 30px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }

/* Discovery + insights */
.disc-map { height: 55dvh; min-height: 280px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 0.5rem; background: #242f3e; }
.legend { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.75rem; color: var(--text-2); margin: 0.5rem 0 0.75rem; }
.legend > span { display: inline-flex; align-items: center; gap: 0.375rem; }
.map-dot { width: 10px; height: 10px; border-radius: 50%; background: #4b5563; display: inline-block; }
.map-dot.is-visited { background: #00B8E8; }
.map-popup { color: #111; font-size: 0.75rem; }
.chart { width: 100%; height: auto; display: block; margin-top: 0.5rem; }
.chart-axis { stroke: var(--border-2); stroke-width: 1; }
.chart-bar { fill: var(--accent); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart-dot { fill: var(--accent); }
.chart-label { fill: var(--text-3); font-size: 9px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.toplist-row { padding: 0.375rem 0; font-size: 0.8125rem; }

/* Rules */
.rule-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; margin-top: 0.3rem; }
.rule-dot-good { background: var(--success); }
.rule-dot-alert { background: var(--warn); }
.rule-dot-warn { background: #B48CFF; }
.rule-value { font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-top: 0.125rem; }
.legend .rule-dot { margin-top: 0; }

/* Blog + bulletin bodies */
.prose { font-size: 0.875rem; line-height: 1.6; color: var(--text); word-break: break-word; }
.prose h2, .prose h3, .prose h4 { margin: 1rem 0 0.375rem; font-size: 1rem; }
.prose p { margin: 0 0 0.75rem; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; margin: 0 0 0.75rem; }
.prose a { color: var(--accent); }
.prose code { background: var(--bg-3); padding: 0 0.25rem; border-radius: 4px; font-size: 0.8125rem; }
.prose blockquote { margin: 0 0 0.75rem; padding-inline-start: 0.75rem; border-inline-start: 3px solid var(--border-2); color: var(--text-2); }
.prose-sm { font-size: 0.8125rem; margin-top: 0.25rem; }
.prose-sm p:last-child { margin-bottom: 0; }
.post-banner { width: 100%; border-radius: 12px; margin-bottom: 0.75rem; aspect-ratio: 16 / 6; object-fit: cover; }
.post-banner-sm { margin-bottom: 0.25rem; }
.image-strip { display: flex; gap: 0.5rem; overflow-x: auto; margin-top: 0.5rem; }
.image-strip img { height: 80px; border-radius: 8px; flex-shrink: 0; }
.convoy { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.attendees { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.5rem; }

/* Settings images */
.image-settings { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.settings-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--bg-3); flex-shrink: 0; }
.settings-bg { flex: 1; aspect-ratio: 640 / 240; border-radius: 8px; background: var(--bg-3) center / cover no-repeat; }
.bar-plain .bar-fill.is-done { background: var(--accent); }

/* ---------------------------------------------------------------------------
   RTL (Arabic - RTL_LOCALES in app.js). Layout flips through the logical
   properties above (margin-inline-*, inset-inline-*, ...); these are the
   bits they can't express.
   ------------------------------------------------------------------------- */
[dir="rtl"] .sidebar-drawer { transform: translateX(100%); }
[dir="rtl"] .sidebar-drawer.is-open { transform: translateX(0); }

/* Standalone arrows ("go" chevrons, back links, origin -> destination
   between two city blocks) point the reading direction. */
[dir="rtl"] .dir-arrow,
[dir="rtl"] .haul-arrow { display: inline-block; transform: scaleX(-1); }

/* Typed text (bios, URLs, names) takes its direction from its own content,
   so an English bio in an Arabic page reads and truncates correctly. */
[dir="rtl"] textarea,
[dir="rtl"] input:not([type="checkbox"]):not([type="radio"]) { unicode-bidi: plaintext; }

/* The livemap's panels hang off MapLibre's physical corner controls
   (company-livemap.js, livemap.css) - keep the whole map layout LTR. */
[dir="rtl"] .livemap-layout,
[dir="rtl"] .maplibregl-map { direction: ltr; }

/* ── Garage ───────────────────────────────────────────────── */
.garage-plate {
  display: inline-block;
  padding: 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.garage-star { color: #f5c542; }
.garage-row.is-favourite { box-shadow: inset 3px 0 0 #f5c542; }
[dir="rtl"] .garage-row.is-favourite { box-shadow: inset -3px 0 0 #f5c542; }

/* ── Live (renderLive + /js/live.js, a copy of the website's) ─ */
.live [hidden] { display: none !important; }
.live-head { margin-bottom: 0.75rem; }
.live-head .page-title { margin-bottom: 0.15rem; }
.live-status {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--success);
  background: rgba(61, 214, 140, 0.12);
}
.live-status.is-paused { color: var(--text-2); background: var(--bg-3); }
.live-clock { font-family: 'JetBrains Mono', monospace; }
.live-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.live-actions .btn.is-active { color: var(--warn); }
.live-grid { display: grid; gap: 0.75rem; }
.live-speed-card { display: flex; align-items: center; justify-content: space-around; gap: 1rem; }
.live-speed { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.live-speed-value { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 4.5rem; font-variant-numeric: tabular-nums; }
.live-speed-unit { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.live-speed-card.is-over .live-speed-value { color: var(--danger); }
.live-limit {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 5px solid #dc2626;
  background: #fff;
  color: #111;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}
.live-speed-meta { font-size: 0.75rem; color: var(--accent); }
.live-job { display: flex; flex-direction: column; gap: 0.4rem; }
.live-job-route { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.15rem; text-transform: uppercase; }
.live-job-cargo { font-size: 0.8125rem; color: var(--text-2); }
.live-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.4rem; }
.live-kv-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live-kv > div { display: flex; flex-direction: column; gap: 0.15rem; }
.live-kv-value { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.35rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.live-kv-value small { font-size: 0.75rem; color: var(--text-2); }
.live-kv-label { font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.live-map-card { padding: 0; overflow: hidden; }
.live-map { height: 260px; width: 100%; }
.live-marker {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  color: #fff;
}
.live:fullscreen { background: var(--bg); padding: 1rem; overflow: auto; }
@media (orientation: landscape) and (min-width: 640px) {
  .live-grid { grid-template-columns: 1fr 1fr; }
  .live-map-card { grid-column: 1 / -1; }
}

/* ── Haul replay (renderHaulReplay + /js/haul-replay.js) ───── */
.replay-open { display: inline-block; margin-bottom: 0.75rem; }
.replay { padding: 0; overflow: hidden; }
.replay-map { height: 320px; width: 100%; }
.replay-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; padding: 0.6rem 0.75rem; border-top: 1px solid var(--border); font-size: 0.8125rem; color: var(--text-2); }
.replay-play { min-width: 2.5rem; }
.replay-speed, .replay-follow { display: inline-flex; align-items: center; gap: 0.35rem; }
.replay-speed select { background: var(--bg-3); color: var(--text); border: 1px solid var(--border-2); border-radius: 6px; padding: 0.15rem 0.3rem; }
.replay-readout { width: 100%; font-family: 'JetBrains Mono', monospace; }
.replay-readout strong { color: var(--text); }
.replay-timeline { padding: 0.25rem 0.75rem 0.75rem; border-top: 1px solid var(--border); }
.replay-chart-wrap { position: relative; }
.replay-chart { display: block; width: 100%; height: 100px; }
.replay-chart .insight-grid { stroke: var(--border); stroke-width: 1; }
.replay-chart .insight-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.replay-area { fill: rgba(0, 152, 214, 0.14); }
.replay-cursor { stroke: var(--text); stroke-width: 1.5; }
.replay-axis-label { position: absolute; inset-inline-start: 4px; translate: 0 -110%; color: var(--text-3); font-size: 10px; pointer-events: none; }
.replay-events { position: relative; height: 24px; margin-top: 4px; }
.replay-tick, .replay-event-pin {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.7rem;
  padding: 0;
}
.replay-tick { position: absolute; top: 0; translate: -50% 0; }
[dir="rtl"] .replay-tick { translate: 50% 0; }
.replay-tick.is-warning, .replay-event-pin.is-warning { color: var(--warn); border-color: var(--warn); }
.replay-tick.is-critical, .replay-event-pin.is-critical { color: var(--danger); border-color: var(--danger); }
.replay-glyph { font-weight: 700; }
.replay-scrub { position: absolute; inset: 0 0 auto 0; width: 100%; height: 100px; margin: 0; opacity: 0; }
.replay-tooltip { position: absolute; top: 0; translate: -50% -100%; padding: 0.2rem 0.45rem; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--border-2); font-size: 0.75rem; white-space: nowrap; pointer-events: none; }
.replay-event-list { list-style: none; margin: 0; padding: 0.5rem 0.75rem 0.75rem; border-top: 1px solid var(--border); display: grid; gap: 0.35rem; }
.replay-event-row { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text); font-size: 0.8125rem; text-align: start; }
.replay-event-row.is-warning .replay-glyph { color: var(--warn); }
.replay-event-row.is-critical .replay-glyph { color: var(--danger); }
.replay-event-time { margin-inline-start: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-3); }

/* ── Community events ─────────────────────────────────────── */
.event-banner { height: 140px; border-radius: 10px; background: center / cover no-repeat; margin-bottom: 0.75rem; }
.event-desc { color: var(--text-2); font-size: 0.875rem; line-height: 1.5; margin: 0 0 0.5rem; }
.event-phase { display: inline-block; padding: 0 0.4rem; border-radius: 999px; font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); background: var(--bg-3); vertical-align: middle; }
.event-phase.is-live { color: var(--success); background: rgba(61, 214, 140, 0.12); }
.event-rules { margin: 0 0 0.5rem; padding-inline-start: 1.25rem; color: var(--text-2); font-size: 0.8125rem; display: grid; gap: 0.3rem; }
.event-place { flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%; background: var(--bg-3); font-size: 0.75rem; margin-inline-end: 0.6rem; }
.event-place.is-gold { background: #f5c542; color: #1a1300; }
.event-place.is-silver { background: #c9d1e0; color: #12151f; }
.event-place.is-bronze { background: #cd8a4f; color: #1e0f02; }
.list-row.is-me { box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .list-row.is-me { box-shadow: inset -3px 0 0 var(--accent); }
.list[hidden] { display: none; }

/* Map data layers (map-base.js addDataLayers): speed camera + fuel price
   toggles and popups on every game map (livemap, live, replay, Discovery). */
.map-layer-toggle { display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.map-layer-toggle.active { color: #00B8E8; background-color: rgba(0, 152, 214, 0.12); }
.mymap-popup .maplibregl-popup-content { background: rgb(11, 14, 51); color: var(--text); border: 1px solid var(--border-2); border-radius: 2px; padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
.mymap-popup .maplibregl-popup-tip { display: none; }
.map-layer-popup-title { font-weight: 700; color: var(--text); }
.map-layer-popup-value { font-size: 1rem; color: #00B8E8; }
.livemap-scope-tabs { margin-bottom: 0.5rem; }

/* Route benchmark card on the haul page */
.bench-card { margin-bottom: 1rem; }
.bench-rank { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.bench-rank-value { font-size: 1.375rem; font-weight: 700; color: #00B8E8; }
.bench-delta { font-size: 0.6875rem; color: var(--text-2); margin-inline-start: 0.25rem; }
.bench-delta.is-good { color: #3DD68C; }
.bench-delta.is-bad { color: #E5484D; }

/* Trips logbook (/hauls/trips) */
.trips-link { margin-bottom: 0.75rem; }
.trips-month { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 0 0 1rem; }
.trips-month-label { font-weight: 700; min-width: 9rem; text-align: center; }
.trips-month .is-off { opacity: 0.35; pointer-events: none; }
.trip-card { margin-top: 0.75rem; }
.trip-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.trip-day { font-weight: 700; }
.trip-time { font-size: 0.75rem; color: var(--text-2); }
.trip-time sup { color: #00B8E8; }
.trip-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.trip-chip { font-size: 0.6875rem; padding: 0.15rem 0.45rem; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--border-2); white-space: nowrap; }
.trip-chip.is-muted { color: var(--text-2); }
.trip-bar { position: relative; height: 10px; margin: 0.75rem 0 0.5rem; border-radius: 5px; background: var(--bg-3); overflow: hidden; }
.trip-bar-seg { position: absolute; top: 0; bottom: 0; border-radius: 5px; min-width: 3px; background: linear-gradient(90deg, #0098D6, #00B8E8); }
.trip-bar-seg.is-bus { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.trip-bar-seg.is-cancelled, .trip-bar-seg.is-unfinished { background: linear-gradient(90deg, #92400e, #f59e0b); }
.trip-hauls { list-style: none; margin: 0; padding: 0; }
.trip-haul { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0.5rem; padding: 0.4rem 0; border-top: 1px solid var(--border); font-size: 0.8125rem; }
.trip-haul-time { color: var(--text-2); font-size: 0.75rem; padding-top: 0.1rem; }
.trip-haul-main { min-width: 0; }
.trip-haul-route { color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-haul-status { color: #f59e0b; }
.bench-card .section-title { margin-top: 0; }

/* Report sheet (driver / company) */
.report-reasons { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.25rem 0 0.875rem; }
.report-reason { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.report-form textarea { width: 100%; resize: vertical; }
.report-company { display: block; margin: 0.75rem 0 0 auto; }

/* Supporter wall + perks, API keys, cargo requests */
.supporter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.5rem; }
.supporter { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.5rem 0.25rem; border-radius: 10px; background: var(--bg-2); color: var(--text); text-decoration: none; font-size: 0.75rem; text-align: center; min-width: 0; }
.supporter img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.supporter span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perk-form { margin-top: 0.75rem; }
.perk-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; margin: 0.5rem 0 0.375rem; }
.perk-form input[type="color"] { width: 3rem; height: 2rem; padding: 0; border: 1px solid var(--border-2); border-radius: 6px; background: none; }
.perk-form .btn-block { margin-top: 0.875rem; }
.api-key-once { display: block; margin-top: 0.375rem; padding: 0.5rem; border-radius: 6px; background: var(--bg-3); word-break: break-all; user-select: all; }
.cargo-check { margin: 0.375rem 0; padding: 0.5rem; border-radius: 8px; background: var(--bg-3); font-size: 0.8125rem; }
.cargo-status-added { color: var(--success); }
.cargo-status-declined { color: var(--danger); }
.cargo-status-planned { color: #00B8E8; }

/* Failed load: message + Try again */
.error-state { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding-bottom: 1rem; }
.error-state .error { padding-bottom: 0.5rem; }

/* Touch targets: every control at least 44 x 44 px (WCAG 2.5.5 / Apple
   HIG); inline text links are the exception. */
.btn, .btn-sm, .tab, .field-sm, .install-banner-btn { min-height: 44px; }
.tab { display: inline-flex; align-items: center; }
.btn-sm { min-width: 44px; }
.sheet-close, .sw-bar-close, .install-banner-close {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
}
.sheet-close { margin: -0.5rem -0.75rem -0.5rem 0; }
.report-reason, .perk-check, .toggle-row { min-height: 44px; }
.toggle-row input, .report-reason input, .perk-check input { width: 20px; height: 20px; }

/* Reduced motion: no animations or transitions beyond an instant change. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keyboard focus: a clear ring on whatever has focus from the keyboard
   (not on taps or clicks). */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sheet:focus-visible, .sidebar-drawer:focus-visible { outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

/* Profile "Driving now" card (followLive in 30-realtime.js) */
.profile-live { display: flex; align-items: center; gap: 0.625rem; margin: 0.75rem 0; padding: 0.625rem 0.75rem; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent); color: var(--text); text-decoration: none; }
.profile-live[hidden] { display: none; }
.profile-live-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.profile-live-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.profile-live-title { font-weight: 700; font-size: 0.875rem; }
.profile-live-meta { font-size: 0.75rem; color: var(--text-2); }
.profile-live-cta { font-size: 0.75rem; color: var(--accent); white-space: nowrap; }

/* ── COOKIE NOTICE (shared Truxion component, /js/cookie-notice.js) ── */
:root {
  --tm-cookie-bg: var(--bg-2);
  --tm-cookie-fg: var(--text);
  --tm-cookie-muted: var(--text-2);
  --tm-cookie-accent: var(--accent);
  --tm-cookie-accent-fg: #ffffff;
  --tm-cookie-border: var(--border-2);
  --tm-cookie-radius: 10px;
  --tm-cookie-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body .tm-cookie { bottom: calc(16px + env(safe-area-inset-bottom)); }
