/* TrackLog V39 · UI refresh
   Visual-only layer. Core state, storage, GPS and cloud contracts stay untouched. */

:root {
  --bg: #080a0d;
  --panel: #11151a;
  --panel2: #171c22;
  --panel3: #1d232b;
  --text: #f5f7f9;
  --muted: #98a1ad;
  --accent: #ff4338;
  --accent2: #ff7a1a;
  --ok: #3ecf8e;
  --warn: #f2b84b;
  --line: rgba(161, 174, 192, 0.17);
  --line-strong: rgba(181, 194, 211, 0.28);
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  --radius: 16px;
  --radius-sm: 11px;
  --content-gap: 16px;
}

html { color-scheme: dark; }
[hidden] { display: none !important; }

body {
  line-height: 1.45;
  background:
    radial-gradient(circle at 86% -10%, rgba(255, 67, 56, 0.13), transparent 34rem),
    radial-gradient(circle at 8% 80%, rgba(255, 122, 26, 0.04), transparent 30rem),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

:where(button, input, select, textarea, [role="button"]):focus-visible {
  outline: 3px solid rgba(255, 184, 84, 0.9) !important;
  outline-offset: 2px;
}

.app {
  max-width: 1560px;
  padding: 18px 22px 42px;
}

header {
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: 72px;
  margin: 0 -4px 16px;
  padding: 10px 4px;
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.96), rgba(8, 10, 13, 0.84));
  backdrop-filter: blur(18px);
}

.brand { gap: 12px; }
.logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  font-size: 14px;
  transform: none;
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(255, 67, 56, 0.24);
}

h1 {
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(23px, 2vw, 30px); letter-spacing: -0.025em; }
h3 { letter-spacing: -0.012em; }
.subtitle { font-size: 13px; }
.app-status-pill { margin-top: 3px; font-size: 11px; }

.top-actions { align-items: center; gap: 9px; }
.header-drive-action { min-height: 52px; padding-inline: 18px; }
.header-drive-action .ph { font-size: 19px; }
.header-profile-chip {
  overflow: hidden;
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(255, 67, 56, 0.11), rgba(17, 21, 26, 0.98));
  box-shadow: none;
}
.header-profile-helmet {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.11), transparent 66%);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel2);
  padding: 10px 14px;
  font-weight: 760;
  box-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--panel3); }
.btn:active { transform: translateY(0); }
.btn.primary {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 67, 56, 0.19);
}
.btn.primary:hover { background: #ff554b; }
.btn.quiet { background: rgba(255, 255, 255, 0.045); }
.btn.danger { background: rgba(255, 67, 56, 0.08); border-color: rgba(255, 67, 56, 0.3); }
.btn.small { min-height: 36px; padding: 7px 11px; }
.btn:disabled { opacity: 0.44; cursor: not-allowed; transform: none; box-shadow: none; }

.layout { grid-template-columns: 244px minmax(0, 1fr); gap: 18px; }
.sidebar, .card {
  border-color: var(--line);
  background: rgba(17, 21, 26, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar {
  top: 94px;
  max-height: calc(100vh - 112px);
  padding: 11px;
  overflow: auto;
}

.desktop-nav { display: grid; gap: 2px; }
.nav-section-label {
  margin: 15px 11px 5px;
  color: #6f7986;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.nav-section-label:first-child { margin-top: 4px; }
.nav-btn {
  min-height: 44px;
  margin: 0;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 720;
}
.nav-btn .ph { width: 22px; font-size: 20px; color: #8994a2; text-align: center; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.04); }
.nav-btn.active {
  border-color: rgba(255, 86, 69, 0.16);
  background: rgba(255, 67, 56, 0.11);
  color: #fff;
}
.nav-btn.active .ph { color: #ff746b; }
.nav-settings { margin-top: 9px; border-top-color: var(--line); border-radius: 0 0 11px 11px; }

.sidebar-profile-card {
  min-height: 66px;
  margin-bottom: 7px;
  border-color: var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}
.sidebar-profile-card:hover { border-color: rgba(255, 84, 70, 0.35); background: rgba(255, 67, 56, 0.06); }
.sidebar-profile-helmet { width: 52px; height: 44px; }

.card { padding: 18px; }
.section-head { margin-bottom: 14px; }
.page-kicker, .focus-eyebrow {
  color: #ff8b82;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

input, select, textarea {
  min-height: 44px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #0c1015;
  padding: 10px 12px;
}
textarea { min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: rgba(190, 203, 219, 0.4); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(255, 87, 72, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 67, 56, 0.12);
}

/* Start */
.dashboard-welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: var(--content-gap);
  margin-bottom: var(--content-gap);
}

.dashboard-focus-card, .dashboard-profile-card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-focus-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(255, 67, 56, 0.12), transparent 42%),
    var(--panel);
}
.dashboard-focus-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
}
.focus-eyebrow { display: flex; align-items: center; gap: 8px; }
.focus-icon {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 67, 56, 0.13);
  color: #ff786f;
  font-size: 16px;
}
.dashboard-focus-card h2 { max-width: 760px; margin: 13px 0 5px; font-size: clamp(27px, 3vw, 42px); }
.dashboard-focus-card > p { max-width: 720px; margin: 0; color: #aab2bc; }
.focus-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 19px 0; }
.focus-chip {
  min-width: 126px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}
.focus-chip span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.focus-chip strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.focus-chip.ready { border-color: rgba(62, 207, 142, 0.25); }
.focus-chip.missing { border-color: rgba(242, 184, 75, 0.28); }
.focus-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.focus-actions .btn.primary { min-height: 48px; padding-inline: 18px; }

.dashboard-profile-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 99, 76, 0.1), transparent 10rem),
    var(--panel);
  text-align: center;
}
.dashboard-profile-card .helmet-button {
  min-width: 164px;
  min-height: 122px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 22px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.075), transparent 68%);
}
.dashboard-profile-card .start-profile-helmet { width: 158px; height: 112px; }
.dashboard-profile-copy { min-width: 0; }
.dashboard-profile-copy h3 { margin: 4px 0 2px; overflow-wrap: anywhere; }
.dashboard-profile-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-profile-actions { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.text-button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #ff8e86;
  padding: 4px 0;
  font-weight: 800;
}

.vehicle-strip { gap: 8px; padding-bottom: 10px; }
.vehicle-chip {
  min-width: 168px;
  border-radius: 11px;
  background: var(--panel);
}
.race-banner {
  min-height: 82px;
  margin-bottom: var(--content-gap);
  padding: 15px 18px;
  border-color: var(--line);
  border-radius: 15px;
  background: var(--panel);
}
.race-banner::after { opacity: 0.22; }
.race-banner h2 { font-size: 22px; }
.grid { gap: var(--content-gap); }
.grid.kpi { gap: 11px; margin-bottom: var(--content-gap); }
.kpi-card { min-height: 104px; padding: 16px; }
.kpi-card::after { opacity: 0.5; }
.kpi-value { font-size: 27px; }
.kpi-label { font-size: 10px; }
.empty { padding: 26px 14px; background: rgba(0, 0, 0, 0.08); }

/* Fahrt vorbereiten */
#trackmode > .card { max-width: 1080px; margin: 0 auto; padding: 24px; }
.track-prep-progress {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  margin: 18px 0 9px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

#trackModeStatusBadge {
  flex: 0 0 auto;
  white-space: nowrap;
}
.track-prep-progress strong, .track-prep-progress small { display: block; }
.track-prep-progress small { margin-top: 2px; color: var(--muted); }
.track-progress-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #262d36; }
.track-progress-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.25s ease; }
.readiness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.ready-item {
  min-height: 76px;
  padding: 12px;
  border-radius: 11px;
  background: #0d1116;
}
.ready-item strong { font-size: 13px; }
.ready-item.good { border-color: rgba(62, 207, 142, 0.27); }
.ready-item.warn { border-color: rgba(242, 184, 75, 0.34); }
.readiness-grid .ready-item:nth-child(n + 4) {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.018);
  opacity: 0.75;
}
.track-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.track-quick-actions:empty { display: none; }
.track-quick-actions .btn { min-height: 38px; }
.advanced-track-settings {
  margin-top: 16px !important;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.028), rgba(0, 0, 0, 0.12));
}
.track-config-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.track-config-heading > span:last-child { display: grid; gap: 2px; }
.track-config-heading strong { font-size: 14px; }
.track-config-heading small { color: var(--muted); font-size: 11px; }
.track-config-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 67, 56, 0.11); color: #ff7e75; font-size: 18px; }
.track-config-panel .form-grid { align-items: end; }
.track-library-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.track-library-actions .badge { display: inline-flex; align-items: center; gap: 6px; }
.track-start-primary { min-height: 52px; font-size: 16px; }

/* Verlauf */
.view-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 2px 2px 0;
}
.view-page-header h2 { margin: 3px 0 1px; }
.view-page-header p { margin: 0; }
.segmented-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(17, 21, 26, 0.78);
}
.segment {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 800;
}
.segment .ph { font-size: 17px; }
.segment.active { background: var(--panel3); color: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2); }
.session-calendar-card[hidden], #sessionStintsCard[hidden] { display: none !important; }
.session-calendar-card.is-history .calendar-toolbar,
.session-calendar-card.is-history .calendar-weekdays,
.session-calendar-card.is-history #driveCalendar { display: none; }
.session-calendar-card:not(.is-history) .session-archive { display: none; }
.session-archive { margin-top: 4px; padding-top: 0; border-top: 0; }

/* Profile, settings and large management screens */
.profile-shell { grid-template-columns: 300px minmax(0, 1fr); gap: var(--content-gap); }
.profile-identity { top: 94px; background: var(--panel); }
.profile-helmet-large { width: 228px; height: 156px; }
.profile-name { font-size: 23px; }
.profile-menu { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #0c1015; }
.profile-menu { scrollbar-width: none; }
.profile-menu::-webkit-scrollbar { display: none; }
.profile-tab { min-height: 40px; border: 0; background: transparent; padding: 8px 11px; }
.profile-tab.active { border: 0; background: var(--panel3); color: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2); }
.account-action-card { background: rgba(0, 0, 0, 0.11); }
.helmet-canvas { background: #0c1015; }
.helmet-svg { overflow: visible; }
.helmet-svg .helmet-ground-shadow { opacity: 0.15; }
.helmet-svg .helmet-outline { stroke: #05080d; stroke-width: 3; }
.helmet-svg .helmet-shell-light { opacity: 0.78; mix-blend-mode: screen; }
.helmet-svg .helmet-shell-spec { opacity: 0.6; }
.helmet-svg .helmet-visor { stroke: #d8e6f3; stroke-width: 2.2; }
.helmet-svg .helmet-visor-highlight { stroke-width: 2; stroke-opacity: 0.82; }
.helmet-svg .helmet-rear-spoiler { fill: #090d13; stroke: #28323f; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.helmet-svg .helmet-chin-spoiler { fill: #070a0f; opacity: 0.92; pointer-events: none; }
.helmet-editor-svg { filter: drop-shadow(0 22px 23px rgba(0, 0, 0, 0.38)); }

.modal { background: rgba(2, 4, 7, 0.77); backdrop-filter: blur(8px); }
.modal-card { border-color: var(--line-strong); border-radius: 18px; background: #12171d; }
.close { min-width: 44px; min-height: 44px; border-radius: 10px; }

.table-wrap { border: 1px solid var(--line); border-radius: 12px; }
th { background: rgba(255, 255, 255, 0.025); }
th, td { padding: 12px; }
.badge { border: 1px solid rgba(255, 255, 255, 0.06); }

.vehicle-hub-shell, .vh-main { background: var(--bg); }
.vh-topbar, .vh-sidebar { background: rgba(12, 15, 19, 0.97); }
.vh-main { background: var(--bg); }
.vh-card, .vh-kpi, .vh-vehicle-card { border-color: var(--line); background: var(--panel); }
.vh-detail-hero { border-color: var(--line); background: var(--panel); }
.vh-page-head h2, .vh-title strong { text-transform: none; font-style: normal; }
.vh-tab.active { border-color: rgba(255, 67, 56, 0.28); background: rgba(255, 67, 56, 0.1); }

.install-card, .license-card {
  border-color: var(--line-strong);
  border-radius: 20px;
  background: rgba(17, 21, 26, 0.98);
}
.license-logo { border-radius: 12px; background: var(--accent); }
.install-card h2, .license-card h2 { text-transform: none; font-style: normal; letter-spacing: -0.03em; }

/* Mobile */
@media (max-width: 1050px) {
  .layout { grid-template-columns: 218px minmax(0, 1fr); }
  .dashboard-welcome-grid { grid-template-columns: 1fr; }
  .dashboard-profile-card { grid-template-columns: 104px minmax(0, 1fr); justify-items: stretch; text-align: left; }
  .dashboard-profile-card .helmet-button { min-width: 98px; min-height: 80px; }
  .dashboard-profile-card .start-profile-helmet { width: 98px; height: 74px; }
  .dashboard-profile-actions { justify-content: flex-start; }
  .readiness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-shell { grid-template-columns: 1fr; }
  .profile-identity { position: static; }
}

@media (max-width: 760px) {
  :root { --bottom-nav-h: 72px; --content-gap: 12px; }
  body { background: #090b0e; }
  body:not(.timer-fullscreen) { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .app { padding: 8px 12px 12px; }
  .layout { display: block; grid-template-columns: 1fr; }
  header {
    min-height: 62px;
    margin: 0 -2px 10px;
    padding: max(7px, env(safe-area-inset-top)) 2px 7px;
  }
  .logo { width: 42px; height: 42px; border-radius: 11px; font-size: 11px; }
  .brand { flex: 1 1 auto; min-width: 0; gap: 9px; }
  .brand > div:last-child { min-width: 0; }
  .brand h1 { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .app-status-pill { max-width: 205px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-status-pill > span:nth-child(3), .app-status-pill > span:last-child { display: none; }
  .top-actions { flex: 0 0 auto; width: auto !important; margin-left: auto; }
  .top-actions .btn { flex: none; }
  .header-profile-chip { flex: 0 0 48px; min-width: 48px; width: 48px; height: 48px; min-height: 48px; padding: 2px; border-radius: 50%; }
  .header-profile-helmet { width: 44px; height: 40px; border-radius: 50%; }
  .main { width: 100%; }
  .card { padding: 15px; border-radius: 15px; box-shadow: none; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 22px; }
  .dashboard-welcome-grid { gap: 10px; margin-bottom: 10px; }
  .dashboard-focus-card { padding: 20px 17px; border-radius: 17px; box-shadow: none; }
  .dashboard-focus-card h2 { margin-top: 11px; font-size: 29px; line-height: 1.05; }
  .dashboard-focus-card > p { font-size: 13px; }
  .focus-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 15px 0; }
  .focus-chip { min-width: 0; padding: 8px; }
  .focus-chip strong { font-size: 11px; }
  .focus-actions { display: grid; grid-template-columns: 1fr; }
  .focus-actions .btn { width: 100%; min-height: 46px; }
  .dashboard-profile-card { grid-template-columns: 94px minmax(0, 1fr); padding: 12px; border-radius: 15px; box-shadow: none; }
  .dashboard-profile-card .helmet-button { min-width: 90px; min-height: 76px; }
  .dashboard-profile-card .start-profile-helmet { width: 90px; height: 68px; }
  .dashboard-profile-actions .badge { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vehicle-strip { margin-inline: -12px; padding: 2px 12px 9px; }
  .vehicle-chip { min-width: 154px; }
  .race-banner { min-height: 0; align-items: flex-start; padding: 14px; }
  .race-banner h2 { font-size: 19px; }
  .race-banner .btn { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  .grid.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi-card { min-height: 88px; padding: 13px; }
  .kpi-value { font-size: 24px; }
  .grid.two { grid-template-columns: 1fr; }
  #dashboard > .card[style*="margin-top"] { margin-top: 12px !important; }

  #trackmode > .card { padding: 17px; }
  .track-prep-progress { grid-template-columns: 1fr; gap: 9px; margin-top: 14px; }
  .readiness-grid { grid-template-columns: 1fr; }
  .readiness-grid .ready-item:nth-child(n + 4) { display: none; }
  .ready-item { min-height: 66px; }
  .track-quick-actions { display: grid; grid-template-columns: 1fr; }
  .advanced-track-settings { padding: 13px; }
  .advanced-track-settings .form-grid { grid-template-columns: 1fr; }
  .track-start-primary { min-height: 52px; }

  .view-page-header { display: grid; gap: 12px; align-items: start; }
  .segmented-tabs { width: 100%; }
  .segment { flex: 1; justify-content: center; padding-inline: 8px; font-size: 12px; }
  .calendar-toolbar { margin-top: 6px; }
  .calendar-day { min-height: 58px; }
  .calendar-day-number { font-size: 13px; }

  .profile-identity {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    grid-template-areas:
      "helmet name"
      "helmet handle"
      "helmet cloud"
      "stats stats"
      "best best";
    gap: 4px 13px;
    align-items: center;
    text-align: left;
  }
  #profileAvatar { grid-area: helmet; width: 105px; height: 82px; margin: 0; }
  #profileDisplayName { grid-area: name; font-size: 20px; }
  #profileEventHandle { grid-area: handle; margin: 0; }
  #profileCloudBadge { grid-area: cloud; justify-self: start; margin-top: 2px !important; }
  .profile-stats { grid-area: stats; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
  #profileBestTimes { grid-area: best; }
  .profile-menu { margin-inline: -2px; overflow: auto; }
  .profile-tab { min-width: max-content; }

  .mobile-bottom-nav {
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding: 6px 7px env(safe-area-inset-bottom);
    background: rgba(13, 16, 20, 0.97);
    border-color: var(--line);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
  }
  .mobile-nav-btn { min-height: 56px; gap: 4px; border-radius: 11px; font-size: 11px; font-weight: 760; }
  .mobile-nav-btn .ph { font-size: 22px; }
  .mobile-nav-btn.active { background: rgba(255, 67, 56, 0.09); color: #fff; }
  .mobile-nav-btn.track {
    margin: -13px 2px 3px;
    border-radius: 15px;
    background: #272c33;
    color: #d5d9df;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.22);
  }
  .mobile-nav-btn.track.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 67, 56, 0.25);
  }
  .fab {
    width: 52px;
    height: 52px;
    right: 14px;
    bottom: calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom));
    background: var(--accent);
    font-size: 23px;
  }
  .mobile-more-sheet.open { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(7px); }
  .mobile-more-card { border-color: var(--line-strong); border-radius: 22px 22px 0 0; background: #12171d; }
  .mobile-more-grid .btn { justify-content: flex-start; gap: 10px; font-size: 14px; }
  .mobile-more-grid .btn .ph { font-size: 20px; }
}

@media (max-width: 430px) {
  .app { padding-inline: 10px; }
  #dashboard #vehicleStrip,
  #dashboard #activeVehicleBanner { display: none !important; }
  header { gap: 8px; }
  .brand h1 { font-size: 17px; }
  .app-status-pill { max-width: 172px; }
  .focus-summary { grid-template-columns: 1fr; }
  .focus-chip { grid-template-columns: 78px minmax(0, 1fr); align-items: center; }
  .dashboard-profile-card { grid-template-columns: 80px minmax(0, 1fr); }
  .dashboard-profile-card .helmet-button { min-width: 76px; }
  .dashboard-profile-card .start-profile-helmet { width: 78px; height: 60px; }
  .dashboard-profile-copy h3 { font-size: 16px; }
  .segment span { display: none; }
  .segment .ph { font-size: 20px; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-more-grid { grid-template-columns: 1fr 1fr; }
  .track-library-actions { width: 100%; justify-content: stretch; }
  .track-library-actions .badge { flex: 1; justify-content: center; }
  .track-library-actions .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* V39 workflow refinements */
.install-browser-option {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.install-browser-option .btn { width: 100%; }
.advanced-record-fields {
  margin-top: 14px;
  padding: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}
.advanced-record-fields summary {
  padding: 14px 0;
  color: var(--text);
  font-weight: 780;
  cursor: pointer;
}
.advanced-record-fields > .muted { margin: -5px 0 13px; }
.vh-vehicle-card { cursor: default; }

@media (max-width: 760px) {
  .dashboard-profile-card.profile-ready { display: none; }
  .vehicle-essential-fields { grid-template-columns: 1fr; }
  .advanced-record-fields { padding-inline: 12px; }
  #pitModal .actions { display: grid; grid-template-columns: 1fr; }
  #pitModal .actions .btn { width: 100%; }
}
