/* ==========================================================================
   BUSBIB – stylesheet
   Eén bestand voor de hele site. Volgorde = cascade:
     1. Basis en onderdelen
     2. Herwerkte vormen
     3. Huisstijl (kleuren, thema's, kop, instellingen, foto's, animaties)
   ========================================================================== */

/* ==========================================================================
   1. Basis en onderdelen (oorspronkelijke stijl)
   ========================================================================== */

:root {
  color-scheme: light;
  --app-height: 100dvh;
  --visual-viewport-height: 100dvh;
  --visual-viewport-offset-top: 0px;
  --keyboard-offset: 0px;
  --page: #f2f5f8;
  --page-top: #f8fafc;
  --bg: var(--page);
  --bg-gradient-top: var(--page-top);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f5f7fa;
  --surface-tint: #edf3f9;
  --ink: #1b2733;
  --muted: #657382;
  --faint: #8b97a3;
  --line: #e0e6ed;
  --line-strong: #ccd5df;
  --accent: #477eaf;
  --accent-hover: #376b9a;
  --accent-soft: #e8f0f8;
  --accent-ink: #ffffff;
  --danger: #bd3d3a;
  --warning: #98640b;
  --success: var(--accent);
  --overlay: rgba(20, 24, 28, 0.52);
  --shadow-sm: 0 2px 8px rgba(24, 30, 34, 0.06);
  --shadow-md: 0 12px 32px rgba(24, 30, 34, 0.09);
  --shadow-lg: 0 28px 80px rgba(14, 18, 22, 0.2);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --content-width: 1240px;
  --page-card-pad: clamp(20px, 3vw, 28px);
  --page-card-radius: var(--radius-xl);
  --page-card-gap: 20px;
  --nested-card-radius: var(--radius-md);
  --nested-card-background: var(--surface-soft);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
  --header-surface-a: color-mix(in srgb, var(--accent) 62%, #18212b);
  --header-surface-b: color-mix(in srgb, var(--accent) 42%, #101720);
  --page-pattern: repeating-linear-gradient(
    135deg,
    transparent 0 52px,
    color-mix(in srgb, var(--accent) 3%, transparent) 52px 53px
  );
  --page-pattern-size: auto;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111a16;
  --page-top: #17221c;
  --bg: var(--page);
  --bg-gradient-top: var(--page-top);
  --surface: #1b2821;
  --surface-raised: #202f27;
  --surface-soft: #24342b;
  --surface-tint: #20392c;
  --ink: #edf5ef;
  --muted: #b0bfb5;
  --faint: #899b8f;
  --line: #34473b;
  --line-strong: #496052;
  --accent: #79a9d5;
  --accent-hover: #94bce0;
  --accent-soft: #25384c;
  --accent-ink: #111a23;
  --danger: #ff817c;
  --warning: #f2c66e;
  --overlay: rgba(0, 0, 0, 0.68);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.48);
  --focus-ring: 0 0 0 3px rgba(84, 200, 137, 0.26);
}

:root[data-color-theme="blue"] {
  --accent: #2875c7;
  --accent-hover: #1f5fa5;
  --accent-soft: #e7f1fc;
  --page-pattern: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 3%, transparent) 1px,
    transparent 1.5px
  );
  --page-pattern-size: 36px 36px;
}

:root[data-color-theme="green"] {
  --accent: #07884f;
  --accent-hover: #066c40;
  --accent-soft: #e4f3ea;
  --page-pattern-size: 48px 48px;
  --page-pattern: repeating-linear-gradient(
    90deg,
    transparent 0 34px,
    color-mix(in srgb, var(--accent) 3%, transparent) 34px 35px
  );
}

:root[data-color-theme="yellow"] {
  --accent: #b07800;
  --accent-hover: #8e6000;
  --accent-soft: #fbf2d9;
  --page-pattern: radial-gradient(
    circle at 50% 50%,
    transparent 0 7px,
    color-mix(in srgb, var(--accent) 2%, transparent) 7.5px 8.5px,
    transparent 9px
  );
  --page-pattern-size: 44px 44px;
}

:root[data-color-theme="orange"] {
  --accent: #c35a18;
  --accent-hover: #9e4814;
  --accent-soft: #fcece2;
  --page-pattern-size: 56px 56px;
  --page-pattern: repeating-linear-gradient(
    45deg,
    transparent 0 26px,
    color-mix(in srgb, var(--accent) 3%, transparent) 26px 27px,
    transparent 27px 52px
  );
}

:root[data-color-theme="red"] {
  --accent: #c23f48;
  --accent-hover: #9f3038;
  --accent-soft: #f9e8e9;
  --page-pattern: repeating-conic-gradient(
    from 15deg at 50% 50%,
    transparent 0deg 28deg,
    color-mix(in srgb, var(--accent) 1.5%, transparent) 28deg 29deg,
    transparent 29deg 60deg
  );
  --page-pattern-size: 64px 64px;
}

:root[data-color-theme="purple"] {
  --accent: #7652ba;
  --accent-hover: #5e4097;
  --accent-soft: #f0eafd;
  --page-pattern: repeating-linear-gradient(
      45deg,
      transparent 0 30px,
      color-mix(in srgb, var(--accent) 2.5%, transparent) 30px 31px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0 30px,
      color-mix(in srgb, var(--accent) 2.5%, transparent) 30px 31px
    );
  --page-pattern-size: 84px 84px, 84px 84px;
}

:root[data-color-theme="classic"] {
  --accent: #426f91;
  --accent-hover: #315a78;
  --accent-soft: #e9f0f5;
  --accent-ink: #ffffff;
  --warning: #987638;
  --header-surface-a: #304f6b;
  --header-surface-b: #263f56;
  --page-pattern: repeating-linear-gradient(
    135deg,
    transparent 0 55px,
    color-mix(in srgb, var(--accent) 3%, transparent) 55px 56px
  );
  --page-pattern-size: 56px 56px;
}

:root[data-color-theme="classic"] .card h2 {
  border-left-color: #c6a24f;
}

:root[data-color-theme="classic"] .header-visual-kicker {
  color: #ead79f;
}

:root[data-theme="dark"] {
  --page: color-mix(in srgb, var(--accent) 10%, #101317);
  --page-top: color-mix(in srgb, var(--accent) 14%, #171a1f);
  --surface: color-mix(in srgb, var(--accent) 6%, #1b1e24);
  --surface-raised: color-mix(in srgb, var(--accent) 8%, #20232a);
  --surface-soft: color-mix(in srgb, var(--accent) 13%, #24272e);
  --surface-tint: color-mix(in srgb, var(--accent) 21%, #20232a);
  --ink: color-mix(in srgb, var(--accent) 3%, #f0f1f3);
  --line: color-mix(in srgb, var(--accent) 24%, #343840);
  --line-strong: color-mix(in srgb, var(--accent) 32%, #494d56);
  --muted: color-mix(in srgb, var(--accent) 9%, #b0b3ba);
  --faint: color-mix(in srgb, var(--accent) 8%, #898d96);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, #20232a);
  --accent-ink: #111a23;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  --header-surface-a: color-mix(in srgb, var(--accent) 62%, #171a20);
  --header-surface-b: color-mix(in srgb, var(--accent) 42%, #101317);
}

:root[data-color-theme] {
  --page: color-mix(in srgb, var(--accent) 8%, #f3f5f7);
  --page-top: color-mix(in srgb, var(--accent) 5%, #ffffff);
  --surface: color-mix(in srgb, var(--accent) 3%, #ffffff);
  --surface-raised: color-mix(in srgb, var(--accent) 4%, #ffffff);
  --surface-soft: color-mix(in srgb, var(--accent) 12%, #f5f6f8);
  --surface-tint: color-mix(in srgb, var(--accent) 19%, #ffffff);
  --ink: color-mix(in srgb, var(--accent) 4%, #20242a);
  --line: color-mix(in srgb, var(--accent) 19%, #dfe3e8);
  --line-strong: color-mix(in srgb, var(--accent) 27%, #cbd1d8);
  --muted: color-mix(in srgb, var(--accent) 10%, #627078);
  --faint: color-mix(in srgb, var(--accent) 8%, #899197);
}

:root[data-theme="dark"][data-color-theme],
:root:not([data-theme])[data-resolved-theme="dark"][data-color-theme] {
  --page: color-mix(in srgb, var(--accent) 10%, #101317);
  --page-top: color-mix(in srgb, var(--accent) 14%, #171a1f);
  --surface: color-mix(in srgb, var(--accent) 6%, #1b1e24);
  --surface-raised: color-mix(in srgb, var(--accent) 8%, #20232a);
  --surface-soft: color-mix(in srgb, var(--accent) 13%, #24272e);
  --surface-tint: color-mix(in srgb, var(--accent) 21%, #20232a);
  --ink: color-mix(in srgb, var(--accent) 3%, #f0f1f3);
  --line: color-mix(in srgb, var(--accent) 24%, #343840);
  --line-strong: color-mix(in srgb, var(--accent) 32%, #494d56);
  --muted: color-mix(in srgb, var(--accent) 9%, #b0b3ba);
  --faint: color-mix(in srgb, var(--accent) 8%, #898d96);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, #20232a);
  --header-surface-a: color-mix(in srgb, var(--accent) 62%, #171a20);
  --header-surface-b: color-mix(in srgb, var(--accent) 42%, #101317);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: color-mix(in srgb, var(--accent) 10%, #101317);
    --page-top: color-mix(in srgb, var(--accent) 14%, #171a1f);
    --surface: color-mix(in srgb, var(--accent) 6%, #1b1e24);
    --surface-raised: color-mix(in srgb, var(--accent) 8%, #20232a);
    --surface-soft: color-mix(in srgb, var(--accent) 13%, #24272e);
    --surface-tint: color-mix(in srgb, var(--accent) 21%, #20232a);
    --ink: color-mix(in srgb, var(--accent) 3%, #f0f1f3);
    --muted: color-mix(in srgb, var(--accent) 9%, #b0b3ba);
    --faint: color-mix(in srgb, var(--accent) 8%, #898d96);
    --line: color-mix(in srgb, var(--accent) 17%, #343840);
    --line-strong: color-mix(in srgb, var(--accent) 23%, #494d56);
    --accent-ink: #111a23;
    --danger: #ff817c;
    --warning: #f2c66e;
    --overlay: rgba(0, 0, 0, 0.68);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.48);
    --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
    --header-surface-a: color-mix(in srgb, var(--accent) 62%, #171a20);
    --header-surface-b: color-mix(in srgb, var(--accent) 42%, #101317);
  }
}

:root[data-color-theme="classic"] .card h2 {
  border-left-color: #c6a24f;
}

:root[data-color-theme="classic"] .header-visual-kicker {
  color: #ead79f;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
  scroll-padding-top: 1rem;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: var(--app-height);
  margin: 0;
  background: var(--page-pattern),
    radial-gradient(ellipse at 12% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 34rem),
    linear-gradient(180deg, var(--page-top), var(--page) 34rem);
  background-size: var(--page-pattern-size), auto, auto;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 180ms ease, color 180ms ease;
}

body,
button,
input,
select,
textarea {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

body.favoritesPanelOpen,
body.pdf-modal-open,
body.overlay-open,
body.offline-active,
body.funny-open {
  overflow: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font-size: inherit;
}

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

a {
  color: var(--accent);
}

h1,
h2,
h3,
h4,
h5,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.22;
}

p {
  margin-top: 0;
}

[hidden],
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: var(--app-height);
  visibility: visible;
}

.container {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
  padding: 28px 0 32px;
}

.container > .tracking-status-banner,
.container > .header-bar,
.container > .primary-nav,
.container > .home-gtfs-map-panel,
.container > .results-wrap,
.container > footer {
  margin-block: 0;
}

.container > .home-gtfs-map-panel {
  margin-top: 4px;
}

.container > footer {
  margin-top: auto;
}

.tracking-status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.tracking-status-banner__text {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

#trackingStatusBanner {
  border-color: color-mix(in srgb, var(--warning) 30%, var(--line));
  background: color-mix(in srgb, var(--warning) 9%, var(--surface));
  color: var(--warning);
}

#photoDelayBanner {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent);
}

.header-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 20px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  box-shadow: var(--shadow-sm);
}

.primary-nav__link {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.home-map-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 12px 0;
  font-weight: 600;
}

.home-map-filter select {
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.favorite-alerts {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.favorite-alerts h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.favorite-alerts-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.favorite-alerts-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.favorite-alerts-list p {
  margin: 6px 0 0;
  white-space: pre-line;
}

.photo-upload-form,
.photo-upload-form > label:not(.photo-upload-consent) {
  display: grid;
  gap: 8px;
}

.photo-upload-form {
  gap: 14px;
}

.photo-upload-form input:not([type="checkbox"]) {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.photo-upload-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.container:has(> .primary-nav:not([hidden])) ~ .menu-overlay .more-extra-functions,
body:has(.container > .primary-nav) .more-extra-functions {
  display: none;
}

@media (max-width: 680px) {
  body:has(.container > .primary-nav) .more-extra-functions {
    display: block;
  }
}

.primary-nav__link svg {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.primary-nav__link:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.primary-nav__link:active {
  transform: translateY(1px);
}

.primary-nav__link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.primary-nav__link[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: var(--surface);
  color: var(--accent-hover);
}

.primary-nav__link[hidden] {
  display: none;
}

.header-intro,
.header-side {
  min-width: 0;
}

.header-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.title-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: inherit;
  cursor: pointer;
  text-align: left;
}

.title-home-heading {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.065em;
}

.header-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.search-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  margin-top: 8px;
}

.search-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.search-row input,
.suggestion-input-shell input,
.halte-module-form input,
.pdf-modal input,
.pdf-modal select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.35;
  box-shadow: inset 0 1px 2px rgba(24, 30, 34, 0.025);
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
  opacity: 1;
}

.search-row input {
  min-height: 54px;
  padding-inline: 17px;
  border-radius: 14px;
  font-size: 1rem;
}

.search-row input:focus,
.suggestion-input-shell input:focus,
.halte-module-form input:focus,
.pdf-modal input:focus,
.pdf-modal select:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: var(--focus-ring);
}

#searchBtn {
  display: inline-grid;
  flex: 0 0 54px;
  place-items: center;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

#searchBtn:hover {
  background: var(--accent-hover);
}

#searchBtn:active,
.btn:active,
.header-actions button:active {
  transform: translateY(1px);
}

.search-btn-icon {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

#suggestielijst,
.inline-suggestion-list,
.floating-suggestion-list,
.primary-suggestion-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: min(360px, 55vh);
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}

#suggestielijst li,
.vehicle-suggestion-item,
.halte-suggestion-item {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--ink);
  cursor: pointer;
  overflow-wrap: anywhere;
}

#suggestielijst li:hover,
.vehicle-suggestion-item:hover,
.halte-suggestion-item:hover,
.vehicle-suggestion-item.is-active,
.halte-suggestion-item.is-active {
  background: var(--accent-soft);
}

.primary-suggestion-list {
  padding: 8px;
  border-color: var(--line-strong);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: 0 16px 40px color-mix(in srgb, #101820 18%, transparent);
}

.floating-suggestion-list {
  position: fixed;
  z-index: 1200;
}

.home-gtfs-vehicle-card {
  position: fixed;
  z-index: 2000;
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-raised);
  box-shadow: 0 18px 48px rgba(10, 18, 28, 0.35);
  animation: vehicle-card-in 160ms ease-out;
}

.home-gtfs-vehicle-card::after {
  content: "";
  position: absolute;
  left: var(--tail-x, 50%);
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 4px 0;
  background: var(--surface-raised);
  transform: translateX(-50%) rotate(45deg);
}

.home-gtfs-vehicle-card.is-below::after {
  top: -8px;
  bottom: auto;
  transform: translateX(-50%) rotate(225deg);
}

.home-gtfs-vehicle-card[hidden] {
  display: none;
}

@keyframes vehicle-card-in {
  from { opacity: 0; scale: 0.96; }
  to { opacity: 1; scale: 1; }
}

.vehicle-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 8%, var(--surface-raised));
  color: var(--ink);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.vehicle-card-close:hover {
  background: color-mix(in srgb, var(--ink) 16%, var(--surface-raised));
}

.vehicle-card-close:active {
  transform: scale(0.94);
}

.vehicle-card-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.primary-suggestion-list .vehicle-suggestion-item {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.primary-suggestion-list .vehicle-suggestion-primary {
  display: inline-flex;
  min-width: 68px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.15;
  white-space: nowrap;
  overflow-wrap: normal;
}

.primary-suggestion-list .vehicle-suggestion-secondary {
  min-width: 0;
  align-self: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.primary-suggestion-list .vehicle-suggestion-item:hover,
.primary-suggestion-list .vehicle-suggestion-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 68%, var(--surface));
}

.primary-suggestion-list .vehicle-suggestion-item:hover .vehicle-suggestion-primary,
.primary-suggestion-list .vehicle-suggestion-item.is-active .vehicle-suggestion-primary {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: var(--surface);
}

.header-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-inline-search .header-side {
  gap: 0;
}

.menu-inline-search .favorites-top {
  display: none;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
}

.favorites-top {
  flex: 0 0 auto;
  width: auto;
}

.menu-inline-search .search-menu-btn {
  min-width: 54px;
  min-height: 54px;
}

.header-actions button,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.header-actions button:hover,
.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.more-toggle-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.header-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 174px);
  gap: 16px;
  flex: 1;
  align-items: center;
  min-height: 138px;
  padding: 24px 28px;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 83% 4%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 32%),
    linear-gradient(135deg, var(--header-surface-a), var(--header-surface-b) 72%);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.header-visual-copy {
  display: grid;
  min-width: 0;
  max-width: none;
  gap: 5px;
}

.header-visual-kicker {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-visual-copy strong {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.35;
}

.header-visual-card-route {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  max-width: 100%;
  padding: 4px 9px;
  overflow-wrap: anywhere;
  border: 1px solid var(--header-banner-line-border, #0072ce);
  border-radius: 6px;
  background: var(--header-banner-line-bg, #0072ce);
  color: var(--header-banner-line-fg, #ffffff);
  box-shadow: 0 0 0 1px var(--header-banner-line-outline, rgba(255, 255, 255, 0.58));
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.header-visual-card-destination {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  color: #17324a;
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  hyphens: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.home-gtfs-map-panel,
.card,
.results-wrap,
footer {
  min-width: 0;
}

.home-gtfs-map-panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.home-gtfs-map-panel {
  margin-bottom: 12px;
  padding: clamp(18px, 3vw, 28px);
}

.home-gtfs-map-head,
.vehicle-photo-header,
.more-panel-header,
.pdf-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.home-gtfs-map-head {
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.home-gtfs-map-refresh-btn {
  display: inline-grid;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.home-gtfs-map-refresh-btn:hover:not(:disabled) {
  transform: rotate(-12deg);
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.home-gtfs-map-refresh-btn:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.home-gtfs-map-refresh-btn:disabled {
  cursor: wait;
  background: var(--accent-soft);
}

.refresh-icon {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.home-gtfs-map-refresh-btn:disabled .refresh-icon {
  animation: refresh-spin 900ms linear infinite;
}

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

.home-gtfs-map-head h2,
.card h2,
.pdf-modal-header h3,
.more-panel-header h3 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
}

.home-gtfs-map-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-gtfs-map-head + .home-gtfs-map {
  margin-top: 18px;
}

.home-gtfs-map,
#map {
  width: 100%;
  min-width: 0;
  height: clamp(260px, 38vw, 430px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

#map {
  height: 340px;
  margin-top: 16px;
}

.leaflet-control-location-button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
}

.leaflet-control-location-button:hover:not(:disabled) {
  background: var(--surface-soft);
}

.leaflet-control-location-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.leaflet-control-location-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.leaflet-control-location-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.leaflet-location-marker {
  border: 0;
  background: transparent;
}

.leaflet-location-marker svg {
  display: block;
  width: 32px;
  height: 40px;
  overflow: visible;
  fill: #1677d2;
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 45%));
}

.bus-div-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bus-div-icon__img {
  display: block;
  width: 31px;
  height: 36px;
  object-fit: contain;
  transform-origin: center;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  margin: 0 0 12px;
}

.results-wrap:not(.show) {
  display: none;
}

.close-btn,
.btn,
.settings-close-btn,
.photo-nav-btn,
#offlineRetryBtn,
.funny-modal-card button,
.pdf-modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.close-btn:hover,
.settings-close-btn:hover,
.photo-nav-btn:hover,
.pdf-modal-actions button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.btn,
#searchBtn,
#offlineRetryBtn,
.funny-modal-card button,
.pdf-modal-actions .btn {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn:hover,
#offlineRetryBtn:hover,
.funny-modal-card button:hover,
.pdf-modal-actions .btn:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.close-btn-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.card h2 {
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  font-size: 1.28rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.vehicle-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0 0 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface-tint);
}

.voertuignummer-display {
  min-width: 0;
  margin: 0;
  color: var(--accent);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.vehicle-id-display {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.vehicle-kind-icon {
  display: block;
  flex: 0 0 auto;
  width: 0.82em;
  height: 0.82em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.vehicle-kind-icon--bus {
  width: 1em;
  height: 1em;
}

.vehicle-kind-icon--tram {
  width: 1em;
  height: 1em;
  stroke-width: 1.9;
}

.vehicle-suggestion-primary .vehicle-id-display {
  justify-content: center;
}

.vehicle-favorite-btn {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.45rem;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.vehicle-favorite-btn:hover,
.vehicle-favorite-btn.is-favorite {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.vehicle-type {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#vasteData table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

#vasteData tr + tr th,
#vasteData tr + tr td {
  border-top: 1px solid var(--line);
}

#vasteData th,
#vasteData td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

#vasteData th {
  width: 42%;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

#vasteData td {
  color: var(--ink);
  font-weight: 600;
}

.hansea-number-display {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hansea-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ig-btn-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.ig-btn-wrap .btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.btn--instagram,
.btn--story {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.btn--instagram:hover,
.btn--story:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.realtime-summary-card {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface-tint);
}

.route-destination-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.route-destination-row.route-link:hover .destination-text {
  color: var(--accent);
}

.line-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--line-badge-bg, var(--accent));
  color: var(--line-badge-fg, var(--accent-ink));
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.destination-text {
  min-width: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.realtime-meta-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.current-stop-row,
.realtime-block-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.87rem;
}

.current-stop-link,
.realtime-block-id strong {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.delay-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
}

.delay-late {
  background: color-mix(in srgb, var(--warning) 13%, var(--surface));
  color: var(--warning);
}

.delay-early {
  background: color-mix(in srgb, #2875c7 12%, var(--surface));
  color: #2875c7;
}

#vasteData,
#realtime,
.loading {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.loading {
  padding: 11px 0;
}

#realtimeVehicleCard #map {
  height: clamp(300px, 36vw, 430px);
  margin-top: 0;
  border-radius: var(--radius-md);
}

#lastUpdate {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

#resultsGrid {
  align-items: stretch;
  gap: 16px;
}

#staticVehicleCard,
#realtimeVehicleCard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
}

#staticVehicleCard > h2,
#realtimeVehicleCard > h2 {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.vehicle-title-row {
  position: relative;
  min-height: 0;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.voertuignummer-display {
  font-size: clamp(1.7rem, 2.5vw, 2rem);
  letter-spacing: -0.055em;
}

.vehicle-favorite-btn {
  width: 30px;
  height: 32px;
  flex-basis: 30px;
  margin-left: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e6b800;
  font-size: 1.45rem;
}

.vehicle-favorite-btn:hover {
  background: var(--surface-soft);
}

.vehicle-favorite-btn.is-favorite {
  border-color: transparent;
  background: transparent;
  color: #e6b800;
}

.vehicle-type {
  display: block;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0;
}

#vasteData table {
  border: 0;
  border-spacing: 0;
  overflow: visible;
  background: transparent;
}

#vasteData tbody {
  display: grid;
  gap: 0;
}

#vasteData tr {
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

#vasteData tr + tr th,
#vasteData tr + tr td {
  border-top: 0;
}

#vasteData th,
#vasteData td {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 7px 0;
  line-height: 1.4;
}

#vasteData th {
  width: auto;
  background: transparent;
  font-size: 0.82rem;
}

#vasteData td {
  border-left: 0;
  background: transparent;
  font-size: 0.9rem;
}

.ig-btn-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ig-btn-wrap .btn {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border-color: var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.84rem;
}

.ig-btn-wrap .btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.ig-btn-wrap .btn--compare {
  box-shadow: none;
}

.realtime-summary-card {
  gap: 7px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.route-destination-row {
  gap: 8px;
}

.line-badge {
  min-width: 38px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.9rem;
}

.destination-text {
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  letter-spacing: -0.025em;
}

.realtime-meta-stack {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.current-stop-row,
.realtime-block-id,
.delay-status {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.84rem;
  line-height: 1.35;
}

.delay-status {
  font-size: 0.9rem;
}

.delay-ontime {
  color: #168a52;
}

.delay-early {
  color: #2875c7;
}

#realtimeVehicleCard .weather-block {
  margin: 0 0 14px;
  border-radius: 15px;
}

#realtimeVehicleCard #map {
  flex: 1 1 260px;
  min-height: 240px;
  height: auto;
  border-color: var(--line);
  border-radius: 16px;
  box-shadow: none;
}

#lastUpdate {
  margin-top: 11px;
  padding-left: 2px;
  font-size: 0.76rem;
}

.weather-block {
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.weather-card {
  display: block;
  width: 100%;
  padding: 14px;
  border: 0;
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.weather-card:hover {
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
}

.weather-card:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.weather-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.weather-icon {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, currentColor 12%, var(--surface));
  color: var(--accent);
}

.weather-svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.weather-svg--sun {
  color: #c78000;
}

.weather-svg--moon {
  color: #667ac0;
}

.weather-svg--cloud,
.weather-svg--fog {
  color: #63758a;
}

.weather-svg--partly {
  color: #bc8500;
}

.weather-svg--drizzle,
.weather-svg--rain {
  color: #2875c7;
}

.weather-svg--snow {
  color: #3286a7;
}

.weather-svg--storm {
  color: #a16a00;
}

:root[data-resolved-theme="dark"] .weather-svg--sun,
:root[data-resolved-theme="dark"] .weather-svg--partly {
  color: #ffd166;
}

:root[data-resolved-theme="dark"] .weather-svg--moon {
  color: #b8c4ff;
}

:root[data-resolved-theme="dark"] .weather-svg--cloud,
:root[data-resolved-theme="dark"] .weather-svg--fog {
  color: #c1cedb;
}

:root[data-resolved-theme="dark"] .weather-svg--drizzle,
:root[data-resolved-theme="dark"] .weather-svg--rain {
  color: #8fc4ff;
}

:root[data-resolved-theme="dark"] .weather-svg--snow {
  color: #8de0f4;
}

:root[data-resolved-theme="dark"] .weather-svg--storm {
  color: #ffd166;
}

.weather-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.weather-title {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
}

.weather-source {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
}

.weather-source-meta {
  color: var(--faint);
  font-size: 0.75rem;
}

.weather-card-side {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.weather-temperature {
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

.weather-temperature--inline {
  font-size: 1.2rem;
}

.weather-card-chevron {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.weather-svg--arrow {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.weather-modal-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--accent-soft), var(--surface));
}

.weather-modal-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
}

.weather-svg--hero {
  width: 40px;
  height: 40px;
  stroke-width: 1.65;
}

.weather-modal-hero-copy,
.weather-modal-temp {
  display: grid;
  gap: 4px;
}

.weather-modal-hero-copy strong {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.1rem;
}

.weather-modal-hero-copy span,
.weather-modal-temp span,
.weather-modal-source {
  color: var(--muted);
  font-size: 0.84rem;
}

.weather-modal-temp {
  justify-items: end;
  text-align: right;
}

.weather-modal-temp strong {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.75rem;
  line-height: 1;
}

.weather-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.weather-detail-card {
  display: grid;
  justify-items: start;
  gap: 7px;
  min-width: 0;
  padding: 12px;
}

.weather-detail-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.weather-svg--detail {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.weather-detail-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.weather-detail-value {
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.weather-modal-source {
  margin: 12px 2px 0;
}

.photo-card {
  grid-column: 1 / -1;
}

.settings-close-btn {
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

.vehicle-photo-shell {
  min-width: 0;
}

.vehicle-photo-header {
  align-items: center;
  margin-bottom: 14px;
}

.vehicle-photo-counter {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.vehicle-photo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(210px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.vehicle-photo-media-panel,
.vehicle-photo-side-panel {
  min-width: 0;
}

.vehicle-photo-frame {
  position: relative;
  display: grid;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: radial-gradient(ellipse at 50% 45%, #3b4652, #202832 76%);
}

.vehicle-photo-frame.is-empty {
  background: linear-gradient(135deg, var(--surface-soft), var(--surface-tint));
}

.vehicle-photo-image {
  display: block;
  width: 100%;
  max-height: min(68vh, 680px);
  object-fit: contain;
  cursor: zoom-in;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
}

.vehicle-photo-image.is-visible {
  animation: busbib-fade-in 320ms ease-out;
}

.vehicle-photo-loader {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%) 0 0 / 250% 100%,
    radial-gradient(ellipse at 50% 45%, #3b4652, #202832 76%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  pointer-events: none;
  animation: busbib-fade-in 220ms ease-out, busbib-shimmer 1.7s ease-in-out infinite;
}

.vehicle-photo-loader[hidden] {
  display: none;
}

.vehicle-photo-loader .vehicle-photo-loader-spinner {
  width: 44px;
  height: 44px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.16);
  border-top-color: color-mix(in srgb, var(--accent) 55%, #ffffff);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 30%, transparent);
}

.spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2.5px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  vertical-align: -3px;
  animation: spin 800ms linear infinite;
}

.skeleton-line {
  display: block;
  border-radius: 8px;
  background: linear-gradient(100deg, transparent 25%, color-mix(in srgb, var(--accent) 14%, var(--surface)) 50%, transparent 75%) 0 0 / 250% 100%,
    var(--surface-soft);
  animation: busbib-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
}

.skeleton-line--long {
  width: 86%;
}

.skeleton-line--medium {
  width: 64%;
}

.skeleton-line--short {
  width: 42%;
}

.loading-skeleton {
  display: grid;
  gap: 12px;
  padding: 4px 0 8px;
}

.loading-skeleton-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}

.loading-skeleton-head .loading {
  padding: 0;
}

.home-gtfs-map-status[data-tone="loading"] {
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes busbib-shimmer {
  from { background-position: 150% 0, 0 0; }
  to { background-position: -50% 0, 0 0; }
}

@keyframes busbib-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.photo-nav-btn {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 50%;
  border-color: color-mix(in srgb, var(--line-strong) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.photo-nav-btn:hover {
  transform: translateY(-50%) scale(1.06);
  border-color: var(--accent);
  background: var(--surface);
}

.photo-nav-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.photo-nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.photo-nav-btn--prev {
  left: 12px;
}

.photo-nav-btn--next {
  right: 12px;
}

.photo-fullscreen-btn {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(15, 20, 27, 0.76);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.photo-fullscreen-btn:hover {
  border-color: #fff;
  background: rgba(15, 20, 27, 0.9);
}

.photo-fullscreen-btn svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.vehicle-photo-actions {
  position: relative;
}

.vehicle-photo-actions--frame {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 62px;
}

.vehicle-photo-actions-trigger {
  display: grid;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(15, 20, 27, 0.82);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.vehicle-photo-actions-trigger:hover,
.vehicle-photo-actions-trigger[aria-expanded="true"] {
  border-color: #fff;
  background: rgba(15, 20, 27, 0.96);
}

.vehicle-photo-actions-trigger svg,
.vehicle-photo-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.vehicle-photo-actions-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: min(270px, calc(100vw - 28px));
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(24, 29, 36, 0.97);
  color: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.vehicle-photo-actions-menu[hidden] {
  display: none;
}

.vehicle-photo-action {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.vehicle-photo-action:hover,
.vehicle-photo-action:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.vehicle-photo-action:focus-visible,
.vehicle-photo-actions-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.vehicle-photo-action svg {
  flex: 0 0 20px;
  opacity: 0.84;
}

.vehicle-photo-viewer {
  position: fixed;
  z-index: 1300;
  inset: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  overflow: hidden;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: rgba(3, 5, 8, 0.97);
  color: #fff;
}

.vehicle-photo-viewer[hidden] {
  display: none;
}

.vehicle-photo-viewer-toolbar {
  position: absolute;
  z-index: 2;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 12px;
}

.vehicle-photo-viewer-counter {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.vehicle-photo-viewer-close,
.vehicle-photo-viewer-nav {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.vehicle-photo-viewer-close {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.8rem;
  line-height: 1;
}

.vehicle-photo-viewer-close:hover,
.vehicle-photo-viewer-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.vehicle-photo-viewer-figure {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 12px;
  margin: 0;
  padding: 54px 54px 0;
}

.vehicle-photo-viewer-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.5));
}

.vehicle-photo-viewer-caption {
  max-width: min(760px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  text-align: center;
}

.vehicle-photo-viewer-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  transform: translateY(-50%);
}

.vehicle-photo-viewer-nav--prev {
  left: max(14px, env(safe-area-inset-left));
}

.vehicle-photo-viewer-nav--next {
  right: max(14px, env(safe-area-inset-right));
}

.vehicle-photo-viewer-nav svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.vehicle-photo-viewer :focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.vehicle-photo-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 420px);
  padding: 32px 20px;
  text-align: center;
}

.vehicle-photo-empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-bottom: 5px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}

.vehicle-photo-empty-icon svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.vehicle-photo-empty-title {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

.vehicle-photo-empty-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.vehicle-photo-side-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.photo-card.has-no-photo .vehicle-photo-layout {
  grid-template-columns: minmax(0, 1fr);
}

.photo-card.has-no-photo .vehicle-photo-side-panel {
  display: none;
}

.photo-card.has-no-photo .vehicle-photo-frame {
  min-height: clamp(260px, 34vw, 360px);
  border-color: var(--line);
  background: var(--surface-soft);
}

.photo-card.has-no-photo .vehicle-photo-empty {
  width: min(100%, 520px);
  gap: 12px;
  padding: clamp(24px, 4vw, 40px) 22px;
}

.photo-card.has-no-photo .vehicle-photo-empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.photo-card.has-no-photo .vehicle-photo-empty-title {
  color: var(--ink);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.photo-card.has-no-photo .vehicle-photo-empty-text {
  max-width: 44ch;
  font-size: 0.95rem;
  line-height: 1.5;
}

.photo-card.has-no-photo .vehicle-photo-upload-btn {
  margin-top: 2px;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 8px;
}

.vehicle-photo-caption {
  margin: 0 0 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.vehicle-photo-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.vehicle-photo-meta-card {
  display: grid;
  gap: 10px;
}

.vehicle-photo-meta-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px;
}

.vehicle-photo-meta-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.vehicle-photo-meta-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.vehicle-photo-meta-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.vehicle-photo-meta-label {
  color: var(--muted);
  font-size: 0.76rem;
}

.vehicle-photo-meta-value {
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.vehicle-photo-meta-link {
  color: var(--accent);
  text-decoration: none;
}

.vehicle-photo-meta-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-loading-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

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

footer {
  display: grid;
  gap: 0;
  margin-top: clamp(16px, 2.5vw, 24px);
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface) 58%);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.info-donation-badge {
  display: block;
  width: clamp(96px, 30vw, 108px);
  height: auto;
  aspect-ratio: 3.6;
  object-fit: contain;
}

.info-value--donation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  text-decoration: none;
}

.info-value--donation:hover {
  text-decoration: none;
}

.info-value--donation:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  footer {
    margin-top: 14px;
    padding: 15px;
    border-radius: 20px;
  }
}

@media (forced-colors: active) {
  footer {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

.menu-overlay,
.pdf-modal,
.funny-modal,
.offline-overlay,
.page-loading-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
}

.menu-overlay {
  z-index: 1100;
}

.pdf-modal::before,
.funny-modal::before {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  content: "";
}

.favorites-panel,
.pdf-modal-card,
.funny-modal-card,
.offline-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: calc(var(--visual-viewport-height) - 36px);
  margin: 18px auto;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.favorites-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(480px, 100%);
  height: 100%;
  max-height: var(--visual-viewport-height);
  margin: 0;
  padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.more-panel-header {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.more-panel-header h3 {
  font-size: 1.28rem;
}

.more-panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.more-panel-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.more-panel-section:last-child {
  border-bottom: 0;
}

.more-panel-section-head h4 {
  margin: 0 0 11px;
  font-size: 0.91rem;
}

.settings-panel-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.settings-panel-intro h4 {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.settings-panel-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.settings-categories {
  display: grid;
  gap: 12px;
}

.settings-category {
  min-width: 0;
  padding: 13px;
}

.chip-row,
.more-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.favorite-item,
.favorites-empty-state {
  min-width: 0;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.favorites-empty-state {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.88rem;
}

.more-action-grid .btn {
  width: 100%;
  min-height: 46px;
}

.more-secondary-btn {
  border-color: var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

.more-secondary-btn:hover {
  background: var(--surface-soft) !important;
}

.settings-card--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  cursor: pointer;
}

.settings-card--toggle input[type="checkbox"] {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.settings-card--toggle input[type="checkbox"]::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: transform 160ms ease, background-color 160ms ease;
}

.settings-card--toggle input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.settings-card--toggle input[type="checkbox"]:checked::before {
  transform: translateX(18px);
  background: var(--accent-ink);
}

.settings-card--toggle input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.settings-feed-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

:root[data-text-scale="large"] {
  font-size: 112.5%;
}

:root[data-text-scale="largest"] {
  font-size: 125%;
}

:root[data-high-contrast="true"][data-color-theme][data-resolved-theme] {
  --muted: var(--ink);
  --faint: var(--ink);
  --line: color-mix(in srgb, var(--ink) 65%, var(--surface));
  --line-strong: color-mix(in srgb, var(--ink) 82%, var(--surface));
  --focus-ring: 0 0 0 4px var(--ink);
}

:root[data-high-contrast="true"][data-color-theme][data-resolved-theme] :focus-visible {
  outline: 3px solid var(--ink) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

:root[data-reduce-motion="true"] *,
:root[data-reduce-motion="true"] *::before,
:root[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

.pdf-modal {
  z-index: 1200;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
}

.pdf-modal-card {
  width: min(100%, 680px);
  margin: auto;
}

.pdf-modal-header {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pdf-modal-header h3 {
  font-size: 1.28rem;
}

.pdf-modal-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pdf-modal-body {
  padding: 18px 0;
}

.pdf-modal-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.pdf-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.pdf-modal-actions button {
  min-width: 100px;
}

.pdf-theme-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.suggestion-input-shell {
  position: relative;
  min-width: 0;
}

.inline-suggestion-list {
  z-index: 20;
}

.info-modal-body,
.legal-modal-body,
.weather-modal-body {
  max-height: min(58vh, 620px);
  overflow: auto;
  overflow-wrap: anywhere;
}

.review-embed-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.review-form-frame {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
  background: var(--surface);
}

.review-mobile-fallback {
  display: none;
  margin-top: 12px;
}

.review-mobile-fallback .btn {
  width: 100%;
}

#reportModal .review-mobile-fallback {
  display: block;
}

.halte-module-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.halte-module-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.line-search-modal-card {
  width: min(100%, 1180px);
}

.line-search-form {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.line-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.line-search-controls input {
  min-height: 54px;
  padding-inline: 18px;
  border-radius: 12px;
  font-size: 1rem;
}

.line-search-controls .btn {
  min-width: 120px;
}

.line-search-suggestions {
  display: grid;
  max-height: 250px;
  margin-top: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.line-search-suggestion-group {
  display: grid;
  padding: 6px;
}

.line-search-suggestion-group + .line-search-suggestion-group {
  border-top: 1px solid var(--line);
}

.line-search-suggestion-heading {
  padding: 6px 9px 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.line-search-suggestion {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.line-search-suggestion:hover,
.line-search-suggestion:focus-visible {
  background: var(--accent-soft);
}

.line-search-suggestion:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.line-search-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.line-search-suggestion-copy strong,
.line-search-suggestion-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-search-suggestion-copy strong {
  font-size: 0.88rem;
}

.line-search-suggestion-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.line-search-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.line-search-status.is-error {
  color: var(--danger);
}

.line-search-status:empty {
  display: none;
}

.line-search-results {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.line-search-route {
  min-width: 0;
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.line-search-route-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.line-search-route-copy {
  min-width: 0;
}

.line-search-route-copy h4 {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  overflow-wrap: anywhere;
}

.line-search-route-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.line-search-route-count {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
}

.line-search-route-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-search-map-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 10px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.line-search-map {
  width: 100%;
  height: clamp(300px, 42vw, 460px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 8px 24px rgb(0 0 0 / 12%);
}

.line-search-map.is-unavailable {
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.line-map-vehicle-icon {
  background: transparent;
  border: 0;
}

.line-map-vehicle-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.line-map-popup {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.line-map-popup-button {
  margin-top: 4px;
}

.line-search-trip-list {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.line-search-trip {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}

.line-search-trip-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.line-search-trip-heading strong {
  overflow-wrap: anywhere;
}

.line-search-trip-heading span {
  color: var(--muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.line-search-vehicles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.line-search-vehicle {
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--accent-hover);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.line-search-vehicle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.line-search-vehicle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.line-search-empty {
  margin: 0;
  padding: 12px 0 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

.halte-module-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.halte-suggestion-item {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
}

.halte-suggestion-item .vehicle-suggestion-primary {
  font-weight: 700;
}

.halte-suggestion-item .vehicle-suggestion-secondary {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.floating-suggestion-list {
  max-width: calc(100vw - 24px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.floating-suggestion-list.opens-above {
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.22);
}

.install-guide-steps {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  color: var(--muted);
}

.app-dialog-message {
  margin: 0;
  overflow-wrap: anywhere;
}

.app-dialog-card.is-pending .pdf-modal-actions {
  opacity: 0.65;
}

.funny-modal {
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 18px;
}

.funny-modal-card {
  width: min(100%, 420px);
  margin: 0;
  text-align: center;
}

.funny-modal-card h3 {
  margin: 0 0 10px;
}

.funny-modal-card p {
  color: var(--muted);
}

.offline-overlay {
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--overlay);
  backdrop-filter: blur(5px);
}

.offline-shell {
  width: min(100%, 480px);
  margin: 0;
  text-align: center;
}

.offline-shell h2 {
  margin: 12px 0 8px;
  font-size: 1.45rem;
}

.offline-shell p {
  color: var(--muted);
}

.offline-pill,
.site-disabled-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 800;
}

.page-loading-overlay {
  z-index: 1500;
  display: grid;
  place-items: start center;
  height: 5px;
  background: transparent;
  pointer-events: none;
}

.page-loading-shell,
.page-loading-bar {
  display: block;
  width: 100%;
  height: 4px;
}

.page-loading-bar {
  transform-origin: left;
  background: var(--accent);
  animation: loading-bar 1.5s ease-in-out infinite;
}

@keyframes loading-bar {
  0% { transform: scaleX(0.05); }
  50% { transform: scaleX(0.72); }
  100% { transform: scaleX(1); }
}

#splash {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--page);
  color: var(--ink);
  transition: opacity 300ms ease, visibility 300ms ease;
}

#splash .logo {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

#splash .logo img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.splash-title {
  margin: 4px 0 0;
  font-size: 1.4rem;
}

.splash-credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

body.site-disabled {
  min-height: 100vh;
  margin: 0;
}

.site-disabled-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34rem),
    var(--page);
}

.site-disabled-card {
  width: min(100%, 520px);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.site-disabled-card h1 {
  margin: 14px 0 9px;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  letter-spacing: -0.04em;
}

.site-disabled-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.site-maintenance-card {
  border-color: color-mix(in srgb, var(--warning) 30%, var(--line));
}

.site-maintenance-badge {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--warning);
}

.is-pending,
.is-loading {
  cursor: progress;
}

.is-dragging {
  opacity: 0.7;
}

.is-empty {
  color: var(--muted);
}

.is-favorite {
  color: var(--accent);
}

.has-no-photo {
  background: var(--surface-soft);
}

.info-list {
  display: grid;
  gap: 0;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.info-value {
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.info-value-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  object-fit: contain;
}

:root[data-resolved-theme="dark"] .leaflet-container {
  background: #12161b;
}

:root[data-resolved-theme="dark"] .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.92) saturate(0.85);
}

:root[data-resolved-theme="dark"] .leaflet-control-zoom a,
:root[data-resolved-theme="dark"] .leaflet-bar a {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--ink);
}

:root[data-resolved-theme="dark"] .leaflet-bar a:hover {
  background: var(--surface-soft);
}

:root[data-resolved-theme="dark"] .leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
}

:root[data-resolved-theme="dark"] .leaflet-control-attribution a {
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
}

:root[data-resolved-theme="dark"] .home-gtfs-map,
:root[data-resolved-theme="dark"] #map {
  background: #12161b;
}

.info-value--github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
}

.info-value--github:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-value--github:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .header-bar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-intro {
    padding: 21px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .container {
    width: min(100% - 28px, var(--content-width));
    padding-top: 14px;
    padding-bottom: 20px;
  }

  .header-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
  }

  .primary-nav {
    display: none;
  }

  .menu-inline-search .favorites-top {
    display: block;
  }

  .header-intro {
    gap: 8px;
    padding: 20px 17px;
    border-radius: var(--radius-lg);
  }

  .title-home-heading {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .title-home-btn {
    gap: 9px;
  }

  .header-copy p {
    font-size: 0.92rem;
  }

  .search-shell {
    margin-top: 5px;
  }

  .search-row input {
    min-height: 50px;
    padding-inline: 13px;
    font-size: 0.92rem;
  }

  #searchBtn {
    flex-basis: 50px;
    min-height: 50px;
  }

  .header-side {
    gap: 9px;
  }

  .header-actions {
    justify-content: stretch;
  }

  .header-actions button {
    width: 100%;
    min-height: 45px;
  }

  .header-visual {
    display: none;
  }

  .home-gtfs-map-panel {
    margin-bottom: 10px;
  }

  .home-gtfs-map,
  #map {
    height: 240px;
  }

  .results-toolbar {
    min-height: 40px;
    margin-bottom: 8px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #staticVehicleCard,
  #realtimeVehicleCard {
    min-height: 0;
  }

  #staticVehicleCard > h2,
  #realtimeVehicleCard > h2 {
    margin-bottom: 9px;
    padding-bottom: 0;
  }

  #vasteData tr {
    grid-template-columns: minmax(96px, 0.68fr) minmax(0, 1.32fr);
  }

  #realtimeVehicleCard #map {
    flex-basis: 240px;
    min-height: 220px;
    border-radius: 15px;
  }

  .photo-card {
    grid-column: auto;
  }

  .vehicle-photo-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .vehicle-photo-frame {
    min-height: 230px;
  }

  .vehicle-photo-image {
    max-height: 56vh;
  }

  .photo-fullscreen-btn {
    top: 10px;
    right: 10px;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .vehicle-photo-actions--frame {
    top: 10px;
    right: 58px;
  }

  .vehicle-photo-actions-trigger {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .vehicle-photo-viewer {
    padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .vehicle-photo-viewer-figure {
    padding: 52px 0 52px;
  }

  .vehicle-photo-viewer-nav {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    transform: none;
  }

  .vehicle-photo-viewer-nav--prev {
    left: calc(50% - 58px);
  }

  .vehicle-photo-viewer-nav--next {
    right: calc(50% - 58px);
  }

  .weather-card {
    padding: 12px;
  }

  .weather-card-main {
    gap: 10px;
  }

  .weather-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .weather-source-meta {
    display: none;
  }

  .weather-modal-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .weather-modal-temp {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .weather-modal-temp strong {
    font-size: 1.4rem;
  }

  .vehicle-photo-side-panel {
    padding: 13px;
  }

  footer {
    margin-top: 10px;
    padding: 17px;
    border-radius: var(--radius-md);
  }

  .favorites-panel {
    inset: auto 0 0;
    width: 100%;
    height: min(88vh, var(--visual-viewport-height));
    max-height: var(--visual-viewport-height);
    padding: max(18px, env(safe-area-inset-top)) 17px max(18px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }

  .favorites-panel::before {
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 99px;
    background: var(--line-strong);
    content: "";
  }

  .pdf-modal {
    align-items: end;
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  }

  .pdf-modal-card {
    width: 100%;
    max-height: calc(var(--visual-viewport-height) - 20px);
    margin: auto auto 0;
    padding: 19px 17px;
    border-radius: 22px;
  }

  .pdf-modal-header h3 {
    font-size: 1.15rem;
  }

  .pdf-modal-body {
    padding: 15px 0;
  }

  .info-modal-body,
  .legal-modal-body,
  .weather-modal-body {
    max-height: min(55vh, 560px);
  }

  .review-mobile-fallback {
    display: block;
  }

  .review-form-frame {
    min-height: 340px;
  }

  .pdf-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdf-modal-actions button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 20px);
  }

  .header-intro {
    padding: 17px 14px;
  }

  .chip-row,
  .more-action-grid,
  .halte-module-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-search-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .line-search-controls .btn {
    width: 100%;
  }

  .info-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 8px 0;
  }

  #realtimeVehicleCard #map {
    flex-basis: 210px;
    min-height: 210px;
  }
}

@media (max-width: 360px) {
  .menu-inline-search #menuToggleText {
    display: none;
  }

  .menu-inline-search .search-menu-btn {
    min-width: 46px;
    padding-inline: 10px;
  }
}

@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;
  }
}

body.route-page-open .container > .home-gtfs-map-panel,
body.route-page-open .container > .results-wrap {
  display: none;
}

.route-page-outlet:not(:has(> :not([hidden]))) {
  display: none;
}

.route-page-outlet > .app-route-page:not([hidden]) {
  margin-block: 4px 14px;
}

#routePageOutlet .pdf-modal.app-route-page {
  position: relative;
  z-index: auto;
  inset: auto;
  display: block;
  padding: clamp(18px, 3vw, 28px);
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

#routePageOutlet .pdf-modal.app-route-page::before {
  display: none;
}

#routePageOutlet .pdf-modal.app-route-page,
#routePageOutlet .pdf-modal.app-route-page .pdf-modal-card,
#routePageOutlet #favoritesBackdrop.menu-overlay.app-route-page,
#routePageOutlet #favoritesPanel.favorites-panel {
  overscroll-behavior: auto;
}

#routePageOutlet .pdf-modal.app-route-page .pdf-modal-card {
  width: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#routePageOutlet #favoritesBackdrop.menu-overlay.app-route-page {
  position: relative;
  z-index: auto;
  inset: auto;
  display: block;
  overflow: visible;
}

#routePageOutlet #favoritesPanel.favorites-panel {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  overflow: visible;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

#routePageOutlet #favoritesPanel.favorites-panel::before {
  display: none;
}

@media (max-width: 680px) {
  .route-page-outlet > .app-route-page:not([hidden]) {
    margin-block: 0 10px;
  }

  .container > .home-gtfs-map-panel {
    margin-top: 0;
  }

  #routePageOutlet .pdf-modal.app-route-page,
  #routePageOutlet #favoritesPanel.favorites-panel {
    padding: 16px;
    border-radius: var(--radius-lg);
  }
}

.vehicle-not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--nested-card-radius);
  background: var(--surface-soft);
}

.vehicle-not-found p {
  margin: 0;
}

.vehicle-not-found .vehicle-not-found-title {
  color: var(--ink);
  font-weight: 700;
}

.vehicle-not-found .vehicle-not-found-description {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.vehicle-not-found-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--ink);
}

.vehicle-not-found-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

#halteSearchCloseBtn,
#lineSearchCloseBtn,
#favoritesPanelCloseBtn {
  display: none;
}

@media (max-width: 680px) {
  #halteSearchCloseBtn,
  #lineSearchCloseBtn,
  #favoritesPanelCloseBtn {
    display: inline-grid;
    flex: 0 0 auto;
  }
}

.vehicle-not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-not-found-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.vehicle-not-found-btn:hover:not(:disabled) {
  background: var(--surface-tint);
}

.vehicle-not-found-btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.vehicle-not-found-btn--primary:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.vehicle-not-found-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.home-gtfs-map-panel,
#routePageOutlet > .app-route-page:not([hidden]) {
  animation: page-enter 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-gtfs-map-panel,
.card,
#routePageOutlet .pdf-modal.app-route-page,
#routePageOutlet #favoritesPanel.favorites-panel {
  position: relative;
  width: 100%;
  max-height: none;
  margin: 0;
  padding: var(--page-card-pad);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 3%, var(--surface)), var(--surface) 140px);
  box-shadow: var(--shadow-sm);
}

.settings-category,
.weather-detail-card,
.vehicle-photo-meta-item,
.favorite-item,
.favorites-empty-state,
.line-search-route,
.line-search-trip {
  border: 1px solid var(--line);
  border-radius: var(--nested-card-radius);
  background: var(--nested-card-background);
}

.home-gtfs-map-head,
#routePageOutlet .pdf-modal-header,
#routePageOutlet .more-panel-header,
.card > h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 var(--page-card-gap);
  padding: 0 0 var(--page-card-gap);
  border: 0;
  border-bottom: 1px solid var(--line);
}

.home-gtfs-map-head h2,
.pdf-modal-header h3,
.more-panel-header h3,
.card h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.home-gtfs-map-status,
.pdf-modal-summary,
.more-panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

#routePageOutlet .pdf-modal-body,
.home-gtfs-map-head + .home-gtfs-map {
  padding: 0;
  margin-top: 0;
}

#routePageOutlet .more-panel-section:first-of-type {
  padding-top: 0;
}

@media (max-width: 680px) {
  :root {
    --page-card-pad: 18px;
    --page-card-radius: var(--radius-lg);
    --page-card-gap: 16px;
  }

  #routePageOutlet .settings-categories {
    gap: 0;
  }

  #routePageOutlet .settings-category {
    padding: 16px 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  #routePageOutlet .settings-category:first-child {
    padding-top: 4px;
    border-top: 0;
  }

  #routePageOutlet .chip-row,
  #routePageOutlet .more-action-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-gtfs-map-head h2,
  .pdf-modal-header h3,
  .more-panel-header h3,
  .card h2 {
    font-size: 1.2rem;
  }

  .home-gtfs-map-panel,
  .card,
  #routePageOutlet .pdf-modal.app-route-page,
  #routePageOutlet #favoritesPanel.favorites-panel {
    padding: var(--page-card-pad);
    border-radius: var(--page-card-radius);
  }
}

.compare-result-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 860px);
  max-height: calc(var(--visual-viewport-height, 100vh) - 36px);
}

.compare-result-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.compare-vehicles-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.compare-vs {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-vehicle-pill {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.compare-vehicle-pill:hover,
.compare-vehicle-pill:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-soft));
}

.compare-vehicle-pill strong {
  overflow: hidden;
  font-size: 1.15rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-vehicle-pill span {
  color: var(--muted);
  font-size: 0.75rem;
}

.compare-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
}

.compare-table thead th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-soft));
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
}

.compare-table .compare-table-corner,
.compare-table tbody th {
  width: 26%;
}

.compare-table tbody th {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  vertical-align: top;
}

.compare-table tbody td {
  padding: 12px 14px;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.compare-table tbody tr + tr > * {
  border-top: 1px solid var(--line);
}

.compare-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.compare-cell-value {
  display: grid;
  gap: 3px;
}

.compare-cell-main {
  color: var(--ink);
  font-weight: 700;
}

.compare-cell-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.compare-empty {
  color: var(--muted);
}

@media (max-width: 640px) {
  .compare-result-card {
    width: 100%;
  }

  .compare-vehicles-head {
    grid-template-columns: 1fr 1fr;
  }

  .compare-vs {
    display: none;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table,
  .compare-table tbody {
    display: block;
  }

  .compare-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .compare-table tbody th {
    grid-column: 1 / -1;
    width: auto;
    padding: 10px 12px 2px;
    font-size: 0.72rem;
    text-transform: uppercase;
  }

  .compare-table tbody td {
    padding: 2px 12px 10px;
  }

  .compare-table tbody td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    content: attr(data-column);
    font-size: 0.7rem;
    font-weight: 700;
  }

  .compare-mobile-vehicle-label {
    display: inline-flex;
    margin-bottom: 4px;
    font-weight: 700;
  }

  .compare-table tbody tr + tr > * {
    border-top: 0;
  }

  .compare-table tbody tr + tr {
    border-top: 1px solid var(--line);
  }
}

:root {
  --shadow-sm: 0 1px 2px rgba(20, 28, 38, 0.05), 0 4px 14px rgba(20, 28, 38, 0.05);
  --shadow-md: 0 2px 4px rgba(20, 28, 38, 0.05), 0 16px 36px rgba(20, 28, 38, 0.1);
  --radius-xl: 24px;
}

.card,
.home-gtfs-map-panel,
.header-intro,
.primary-nav {
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.card:hover,
.home-gtfs-map-panel:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card h2,
.home-gtfs-map-head h2 {
  position: relative;
  border-left: 0;
}

.primary-nav {
  backdrop-filter: blur(10px);
}

.primary-nav__link {
  border-radius: 14px;
}

.primary-nav__link[aria-current="page"] {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 32%, transparent);
}

.primary-nav__link[aria-current="page"]:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.search-row input {
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

#searchBtn {
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

#searchBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 38%, transparent);
}

.btn {
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

:root[data-color-theme="classic"] {
  --accent: #1f4e79;
  --accent-hover: #163b5c;
  --accent-soft: #e6eef6;
  --gold: #c6a24f;
  --gold-soft: #ead79f;
  --header-surface-a: #1b3a5a;
  --header-surface-b: #12283f;
}

:root[data-color-theme="classic"]:not([data-theme="dark"]):not([data-resolved-theme="dark"]) {
  --page: #f3f0e8;
  --page-top: #faf8f2;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f6f3ec;
  --surface-tint: #ece8dc;
  --ink: #17263a;
  --muted: #5d6a7a;
  --faint: #8a93a0;
  --line: #e3ddcf;
  --line-strong: #d1c9b6;
}

:root[data-color-theme="classic"][data-theme="dark"],
:root[data-color-theme="classic"][data-resolved-theme="dark"] {
  --accent: #7fa8d3;
  --accent-hover: #9dbde0;
  --accent-ink: #0d1a29;
  --page: #0c1724;
  --page-top: #11233a;
  --surface: #14253a;
  --surface-raised: #182c44;
  --surface-soft: #1b3150;
  --surface-tint: #1f3a5c;
  --ink: #eef2f7;
  --muted: #a9b7c8;
  --faint: #7e8fa4;
  --line: #27415f;
  --line-strong: #36557a;
  --accent-soft: #1f3a5c;
}

:root[data-color-theme="classic"] .card,
:root[data-color-theme="classic"] .home-gtfs-map-panel,
:root[data-color-theme="classic"] .header-intro {
  border-top: 3px solid var(--gold);
}

:root[data-color-theme="classic"] .primary-nav {
  border-color: var(--line-strong);
  border-bottom: 3px solid var(--gold);
}

:root[data-color-theme="classic"] .primary-nav__link[aria-current="page"] {
  background: linear-gradient(135deg, var(--header-surface-a), var(--header-surface-b));
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(18, 40, 63, 0.35), inset 0 -2px 0 var(--gold);
}

:root[data-color-theme="classic"] #searchBtn {
  background: linear-gradient(135deg, var(--header-surface-a), var(--header-surface-b));
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(18, 40, 63, 0.32);
}

:root[data-color-theme="classic"] .search-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent);
}

:root[data-color-theme="classic"] .header-intro {
  background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 22rem),
    var(--surface);
}

:root[data-color-theme="classic"] .compare-table thead th {
  background: linear-gradient(135deg, var(--header-surface-a), var(--header-surface-b));
  color: #ffffff;
}

#splash {
  gap: 0;
  background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    linear-gradient(180deg, var(--page-top), var(--page));
}

#splash .logo {
  width: clamp(112px, 30vw, 148px);
  height: clamp(112px, 30vw, 148px);
  border-radius: 34px;
  box-shadow: 0 18px 48px color-mix(in srgb, var(--accent) 28%, transparent), 0 2px 6px rgba(20, 28, 38, 0.1);
  animation: splash-pop 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#splash .logo img {
  width: 84%;
  height: 84%;
}

.splash-title {
  margin: 22px 0 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  animation: splash-rise 600ms 150ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash-welcome {
  margin: 6px 0 0;
  color: var(--accent);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1rem, 3.6vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: splash-rise 600ms 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash-rule {
  display: block;
  width: 44px;
  height: 3px;
  margin: 18px 0 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent));
  animation: splash-rise 600ms 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

:root[data-color-theme="classic"] .splash-rule {
  background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 30%, transparent));
}

:root[data-color-theme="classic"] .splash-welcome {
  color: var(--gold);
}

.splash-credit {
  animation: splash-rise 600ms 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes splash-pop {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes splash-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .container {
    padding-top: 8px;
  }

  .primary-nav__link {
    min-height: 50px;
    font-size: 0.96rem;
  }

  .header-intro {
    padding: 30px 36px;
  }

  .card,
  .home-gtfs-map-panel {
    padding: 30px 34px;
  }
}

@media (max-width: 680px) {
  .card,
  .home-gtfs-map-panel,
  .header-intro {
    border-radius: 20px;
  }

  .primary-nav {
    position: sticky;
    top: 8px;
    z-index: 40;
    gap: 2px;
    padding: 5px;
    border-radius: 18px;
  }

  .primary-nav__link {
    flex-direction: column;
    gap: 3px;
    min-height: 54px;
    padding: 6px 4px;
    font-size: 0.7rem;
  }

  .primary-nav__link svg {
    flex-basis: 21px;
    width: 21px;
    height: 21px;
  }

  .search-row input {
    font-size: 16px;
  }

  .btn,
  #searchBtn {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #splash .logo,
  .splash-title,
  .splash-welcome,
  .splash-rule,
  .splash-credit {
    animation: none;
  }
}

.container {
  gap: 16px;
  padding: calc(max(env(safe-area-inset-top), 0px) + clamp(28px, 5vw, 44px)) 0 calc(max(env(safe-area-inset-bottom), 0px) + 40px);
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 28px);
    padding-top: calc(max(env(safe-area-inset-top), 0px) + 32px);
  }
}

:root[data-color-theme="classic"] {
  --accent: #647887;
  --accent-hover: #4f626f;
  --accent-soft: #e7ecef;
  --gold: #8696a2;
  --gold-soft: #dce3e7;
  --header-surface-a: #4a5d6a;
  --header-surface-b: #354550;
  --page-pattern: repeating-linear-gradient(
    0deg,
    transparent 0 55px,
    color-mix(in srgb, var(--accent) 3%, transparent) 55px 56px
  );
  --page-pattern-size: 56px 56px;
}

:root[data-color-theme="classic"]:not([data-theme="dark"]):not([data-resolved-theme="dark"]) {
  --page: #edf0f2;
  --page-top: #f7f8f9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f4f6f7;
  --surface-tint: #e7ecef;
  --ink: #26313a;
  --muted: #5d6972;
  --faint: #84909a;
  --line: #d9dfe3;
  --line-strong: #c4cdd3;
}

:root[data-color-theme="classic"][data-theme="dark"],
:root[data-color-theme="classic"][data-resolved-theme="dark"] {
  --accent: #a1b3c0;
  --accent-hover: #bac8d1;
  --accent-ink: #182027;
  --page: #171c20;
  --page-top: #1d2429;
  --surface: #22292f;
  --surface-raised: #293138;
  --surface-soft: #2b343b;
  --surface-tint: #323d45;
  --ink: #edf1f3;
  --muted: #b0bbc2;
  --faint: #87949d;
  --line: #39434a;
  --line-strong: #4d5a63;
  --accent-soft: #35434d;
  --page-pattern: repeating-linear-gradient(
    0deg,
    transparent 0 55px,
    rgba(174, 190, 202, 0.045) 55px 56px
  );
}

:root[data-color-theme="classic"] .card,
:root[data-color-theme="classic"] .home-gtfs-map-panel,
:root[data-color-theme="classic"] .header-intro {
  border-top-width: 2px;
  border-top-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

:root[data-color-theme="classic"] .primary-nav {
  border-bottom-width: 2px;
  border-bottom-color: var(--line-strong);
}

.header-bar {
  gap: 16px;
}

:root[data-color-theme="classic"] {
  --shadow-sm: 0 1px 2px rgba(31, 43, 52, 0.04), 0 5px 16px rgba(31, 43, 52, 0.045);
  --shadow-md: 0 2px 5px rgba(31, 43, 52, 0.06), 0 14px 30px rgba(31, 43, 52, 0.1);
}

:root[data-color-theme="classic"] .header-intro {
  background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 24rem),
    var(--surface);
}

:root[data-color-theme="classic"] .header-visual {
  background: radial-gradient(circle at 83% 4%, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(135deg, var(--header-surface-a), var(--header-surface-b) 76%);
}

:root[data-color-theme="classic"] .primary-nav {
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
  backdrop-filter: blur(12px);
}

:root[data-color-theme="classic"] .primary-nav__link[aria-current="page"] {
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
}

:root[data-color-theme="classic"] #searchBtn {
  background: var(--accent);
  box-shadow: none;
}

:root[data-color-theme="classic"] .card:hover,
:root[data-color-theme="classic"] .home-gtfs-map-panel:hover {
  box-shadow: var(--shadow-md);
}

.container {
  width: min(var(--content-width), calc(100% - clamp(40px, 6vw, 88px)));
  padding-top: calc(max(env(safe-area-inset-top), 0px) + clamp(24px, 3vw, 36px));
  padding-bottom: calc(max(env(safe-area-inset-bottom), 0px) + 36px);
}

@media (min-width: 1200px) {
  .container {
    width: calc(100% - 88px);
  }

  .header-bar {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
    gap: 20px;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .container {
    width: calc(100% - 40px);
  }

  .header-bar {
    grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
    gap: 14px;
  }

  .header-intro {
    padding: 22px;
  }

  .header-visual {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 130px);
    gap: 10px;
    padding: 20px;
  }

  .card,
  .home-gtfs-map-panel {
    padding: 24px;
  }
}

@media (min-width: 681px) and (max-width: 760px) {
  .header-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-side {
    display: grid;
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
    align-items: stretch;
  }

  .header-actions {
    align-items: start;
    justify-content: stretch;
  }

  .header-actions button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .container {
    width: calc(100% - 28px);
    gap: 13px;
    padding-top: calc(max(env(safe-area-inset-top), 0px) + 20px);
    padding-bottom: calc(max(env(safe-area-inset-bottom), 0px) + 24px);
  }

  .header-bar {
    gap: 10px;
  }

  .header-intro {
    padding: 19px 16px;
  }

  .card,
  .home-gtfs-map-panel {
    padding: 20px 17px;
  }

  .primary-nav {
    box-shadow: var(--shadow-sm);
  }
}

@media (max-width: 380px) {
  .container {
    width: calc(100% - 22px);
  }

  .header-intro {
    padding: 17px 14px;
  }

  .card,
  .home-gtfs-map-panel {
    padding: 18px 14px;
  }
}

:root {
  --heading-size: 1.35rem;
  --subheading-size: 1rem;
}

.home-gtfs-map-head h2,
.card h2,
#staticVehicleCard > h2,
#realtimeVehicleCard > h2,
.pdf-modal-header h3,
.more-panel-header h3,
.funny-modal-card h3,
.offline-shell h2 {
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: var(--heading-size);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

#staticVehicleCard > h2,
#realtimeVehicleCard > h2 {
  margin: 0 0 var(--page-card-gap);
  padding: 0 0 var(--page-card-gap);
  border-bottom: 1px solid var(--line);
}

.vehicle-photo-header {
  margin: 0 0 var(--page-card-gap);
  padding-bottom: var(--page-card-gap);
  border-bottom: 1px solid var(--line);
}

.vehicle-photo-header h2 {
  margin: 0;
  padding: 0;
  border: 0;
}

.more-panel-section-head h4,
.settings-panel-intro h4,
.line-search-route-copy h4,
.legal-copy h4,
.photo-card.has-no-photo .vehicle-photo-empty-title {
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: var(--subheading-size);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

@media (max-width: 680px) {
  :root {
    --heading-size: 1.2rem;
  }
}

.container > .home-favorites-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 3%, var(--surface)), var(--surface) 140px);
  box-shadow: var(--shadow-sm);
}

.home-favorites-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.home-favorites-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.home-favorites-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-favorites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-favorites-group {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 10px;
}

.home-favorites-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.home-favorites-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.home-favorite-entry {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--nested-card-radius);
  background: var(--nested-card-background);
}

.home-favorite-open {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-favorite-open:hover,
.home-favorite-open:focus-visible {
  background: var(--accent-soft);
}

.home-favorite-open:focus-visible,
.home-favorite-remove:focus-visible,
.favorite-line-toggle:focus-visible,
.favorite-stop-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.home-favorite-open > strong,
.home-favorite-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.home-favorite-open strong,
.home-favorite-copy strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-favorite-open small,
.home-favorite-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-favorite-remove {
  flex: 0 0 38px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.home-favorite-remove:hover {
  background: var(--surface-soft);
  color: var(--danger);
}

.home-favorite-line-badge,
.halte-departure-line {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 35px;
  min-height: 31px;
  place-items: center;
  padding: 3px 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.75rem;
  font-weight: 800;
}

.home-favorite-stop-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.65rem;
}

.home-favorite-empty {
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.favorite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-color: var(--line);
  background: var(--nested-card-background);
  cursor: pointer;
}

.favorite-item:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
}

.favorite-chip {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.favorite-open {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.favorite-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.favorite-chip .chip-title {
  color: var(--ink);
  font-weight: 800;
}

.favorite-chip .chip-subtitle {
  color: var(--muted);
  font-size: 0.75rem;
}

.favorite-action-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.favorite-action-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.halte-nearby {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.halte-nearby-heading,
.halte-nearby-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.halte-nearby-heading h4,
.halte-nearby-stop-copy h5 {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.halte-nearby-heading p,
.halte-nearby-stop-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.halte-nearby-heading .btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding-inline: 14px;
}

.halte-nearby-status,
.halte-nearby-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.halte-nearby-status.is-error {
  color: var(--danger);
}

.halte-nearby-status:empty {
  display: none;
}

.halte-nearby-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.halte-nearby-stop {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.halte-nearby-stop-copy {
  min-width: 0;
}

.halte-nearby-stop-copy > span {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.halte-nearby-stop-actions {
  display: flex;
}

.halte-nearby-open {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-hover);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.halte-nearby-open:hover {
  background: var(--accent-soft);
}

.favorite-stop-toggle,
.favorite-line-toggle {
  display: inline-grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.favorite-stop-toggle:hover,
.favorite-line-toggle:hover,
.favorite-stop-toggle.is-favorite,
.favorite-line-toggle.is-favorite {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.halte-departure-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.halte-departure {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.halte-departure time {
  color: var(--ink);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.halte-departure .halte-departure-line {
  min-width: 30px;
  min-height: 27px;
  font-size: 0.72rem;
}

.halte-departure-copy,
.halte-nearby-no-departures {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.halte-suggestion-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.halte-suggestion-item {
  flex-direction: row;
  align-items: center;
}

.line-search-route-header {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

@media (max-width: 600px) {
  .line-search-modal-card {
    width: 100%;
  }

  .line-search-route {
    padding: 14px;
    border-radius: 16px;
  }

  .line-search-route-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .line-search-route-count {
    grid-column: 2;
    text-align: left;
  }

  .line-search-route-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: flex-end;
  }

  .line-search-route-actions .transit-share-btn {
    min-width: 0;
    padding-inline: 10px;
  }
}

@media (max-width: 760px) {
  .home-favorites-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container > .home-favorites-panel {
    gap: 14px;
    padding: 16px;
  }

  .halte-nearby-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .halte-nearby-heading .btn {
    width: 100%;
  }

  .halte-departure {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 6px;
  }
}

body.route-page-open .container > .home-favorites-panel {
  display: none;
}

#homeFavoritesPanel[hidden] {
  display: none;
}

.settings-panel-section {
  --settings-accent: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.settings-panel-intro {
  gap: 8px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 16px;
  background: linear-gradient(120deg, var(--settings-accent), var(--surface) 72%);
}

.settings-panel-intro h4 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.settings-panel-intro p {
  max-width: 58ch;
  line-height: 1.6;
}

.settings-categories {
  gap: 16px;
}

.settings-category {
  padding: 18px;
  border-color: var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgb(0 0 0 / 5%);
}

.settings-card--toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface-soft));
}

.settings-card--toggle {
  min-height: 68px;
  padding-inline: 15px;
}

.widget-photo-settings {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .settings-panel-intro {
    padding: 16px;
  }

  .settings-categories {
    gap: 12px;
  }

  .settings-category,
  #routePageOutlet .settings-category {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }
}

.settings-panel-intro {
  position: relative;
  isolation: isolate;
  min-height: 118px;
  align-content: center;
  overflow: hidden;
  padding: 22px 88px 22px 22px;
  border-radius: 20px;
  background: radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent) 26%, transparent) 0 3px, transparent 4px) 0 0 / 18px 18px,
    linear-gradient(115deg, color-mix(in srgb, var(--accent) 19%, var(--surface)), var(--surface) 76%);
}

.settings-panel-intro::after {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 22px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 8px 22px rgb(0 0 0 / 10%);
  color: var(--accent-hover);
  content: "?";
  font-size: 28px;
  transform: translateY(-50%) rotate(-8deg);
}

.settings-panel-intro h4 {
  max-width: 24ch;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

.settings-panel-intro p {
  max-width: 52ch;
}

@media (max-width: 420px) {
  .settings-panel-intro {
    min-height: 112px;
    padding: 18px 72px 18px 16px;
  }

  .settings-panel-intro::after {
    right: 13px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 23px;
  }
}

:root[data-color-theme="gta6"] {
  --accent: #df526c;
  --accent-hover: #bd3d58;
  --accent-soft: #fde9ed;
  --accent-ink: #ffffff;
  --warning: #b27b32;
  --header-surface-a: #b44c62;
  --header-surface-b: #72506e;
  --page-pattern: radial-gradient(ellipse at 20% 20%, color-mix(in srgb, #f3a64a 12%, transparent), transparent 58%), radial-gradient(ellipse at 80% 75%, color-mix(in srgb, #bf5578 9%, transparent), transparent 56%);
  --page-pattern-size: auto;
}

:root[data-color-theme="gta6"]:not([data-theme="dark"]):not([data-resolved-theme="dark"]) {
  --page: #f7f1ee;
  --page-top: #fff9f3;
  --surface: #fffdfb;
  --surface-raised: #ffffff;
  --surface-soft: #f8eeeb;
  --surface-tint: #f5e5e4;
  --ink: #30282c;
  --muted: #786b70;
  --faint: #998c91;
  --line: #eadcda;
  --line-strong: #d7c3c3;
}

:root[data-color-theme="gta6"][data-theme="dark"],
:root[data-color-theme="gta6"][data-resolved-theme="dark"] {
  --page: #17181d;
  --page-top: #24202a;
  --surface: #24232a;
  --surface-raised: #302b34;
  --surface-soft: #302b33;
  --surface-tint: #3a2d38;
  --ink: #f8eef0;
  --muted: #c4b2b7;
  --faint: #a28f96;
  --line: #493b44;
  --line-strong: #65505b;
  --accent: #f17b8c;
  --accent-hover: #ff9aa7;
  --accent-soft: #492e3b;
  --accent-ink: #21191e;
  --header-surface-a: #6b3d55;
  --header-surface-b: #352b3c;
}

:root[data-color-theme="gta6"] .card h2 {
  border-left-color: #e7a64e;
}

/* ==========================================================================
   2. Tweede laag: herwerkte vormen
   ========================================================================== */

:root,
:root[data-color-theme],
:root[data-color-theme="classic"]:not([data-theme="dark"]):not([data-resolved-theme="dark"]) {
  --page: #f3f5f4;
  --page-top: #f3f5f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f6f8f7;
  --surface-tint: #edf2f0;
  --ink: #1c2928;
  --muted: #62706d;
  --faint: #76827f;
  --line: #dce4e1;
  --line-strong: #bbc9c4;
  --radius-sm: 7px;
  --radius-md: 9px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --page-card-radius: 12px;
  --nested-card-radius: 8px;
  --nested-card-background: var(--surface-soft);
  --shadow-sm: 0 1px 3px rgba(20, 35, 30, 0.045);
  --shadow-md: 0 8px 24px rgba(20, 35, 30, 0.08);
  --page-pattern: none;
}

:root[data-color-theme="classic"] {
  --accent: #395e79;
  --accent-hover: #2d4d65;
  --accent-soft: #e8eef3;
  --accent-ink: #ffffff;
  --gold: #c1a66e;
  --gold-soft: #eee8d8;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

:root[data-color-theme="classic"]:not([data-theme="dark"]):not([data-resolved-theme="dark"]) {
  --page: #f2f4f6;
  --page-top: #f2f4f6;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f7f9fa;
  --surface-tint: #eaf0f3;
  --ink: #24323e;
  --muted: #61717c;
  --faint: #61717c;
  --line: #dce3e7;
  --line-strong: #becbd3;
}

:root[data-resolved-theme="dark"][data-color-theme],
:root[data-theme="dark"][data-color-theme],
:root:not([data-theme])[data-resolved-theme="dark"][data-color-theme] {
  --page: #151c1b;
  --page-top: #151c1b;
  --surface: #1d2725;
  --surface-raised: #25312e;
  --surface-soft: #24302d;
  --surface-tint: #293a35;
  --ink: #e8f0ed;
  --muted: #b0bfba;
  --faint: #94a49f;
  --line: #364741;
  --line-strong: #50635c;
  --nested-card-background: var(--surface-soft);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"][data-resolved-theme="dark"][data-color-theme="classic"],
:root:not([data-theme])[data-resolved-theme="dark"][data-color-theme="classic"] {
  --page: #151c24;
  --page-top: #151c24;
  --surface: #202b34;
  --surface-raised: #28343e;
  --surface-soft: #27343e;
  --surface-tint: #30404a;
  --ink: #e9eef2;
  --muted: #b5c2cc;
  --faint: #a9bac6;
  --line: #3b4a55;
  --line-strong: #586b78;
  --accent: #adc1d2;
  --accent-hover: #c3d2de;
  --accent-soft: #344755;
  --accent-ink: #172633;
  --gold: #d0b779;
  --gold-soft: #514936;
}

:root[data-high-contrast="true"][data-color-theme][data-resolved-theme],
:root:not([data-theme])[data-high-contrast="true"][data-color-theme][data-resolved-theme] {
  --muted: var(--ink);
  --faint: var(--ink);
  --line: color-mix(in srgb, var(--ink) 65%, var(--surface));
  --line-strong: color-mix(in srgb, var(--ink) 82%, var(--surface));
}

body {
  background: var(--page);
}

html.map-fullscreen-open,
body.map-fullscreen-open {
  overflow: hidden;
  scrollbar-gutter: auto;
}

#photoUploadModal .photo-upload-card {
  width: min(100%, 580px);
  padding: clamp(20px, 3vw, 30px);
}

#photoUploadModal .pdf-modal-header {
  gap: 16px;
}

#photoUploadModal .pdf-modal-body {
  max-height: min(65vh, 660px);
  padding: 20px 2px 2px;
}

.photo-upload-form {
  gap: 16px;
}

.photo-upload-form > label:not(.photo-upload-consent) {
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

#photoUploadModal .photo-upload-form input:not([type="checkbox"]) {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

#photoUploadModal .photo-upload-form input[type="file"] {
  padding: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.photo-upload-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.photo-upload-consent {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

#photoUploadPrivacy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.photo-upload-status {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.photo-upload-status:empty,
#photoUploadChallenge:empty {
  display: none;
}

.photo-upload-status[data-state="error"],
.photo-upload-status[data-state="unavailable"] {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

#photoUploadModal .photo-upload-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  font-weight: 700;
}

.photo-upload-submit svg,
.photo-upload-success-icon svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.photo-upload-success {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.photo-upload-success-icon {
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.photo-upload-success p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
}

.home-gtfs-map-panel:fullscreen,
.home-gtfs-map-panel.map-fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh;
  min-height: 0 !important;
  margin: 0 !important;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
  overflow: hidden;
  animation: none;
}

.home-gtfs-map-panel.map-fullscreen-fallback {
  z-index: 10000;
}

#realtimeVehicleCard #map:fullscreen,
#realtimeVehicleCard #map.map-fullscreen-fallback,
.line-search-map:fullscreen,
.line-search-map.map-fullscreen-fallback {
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

#realtimeVehicleCard #map.map-fullscreen-fallback,
.line-search-map.map-fullscreen-fallback {
  position: fixed !important;
  inset: 0;
  z-index: 10000;
  width: 100vw !important;
  height: 100dvh !important;
}

.home-gtfs-map-panel:fullscreen > .home-gtfs-map,
.home-gtfs-map-panel.map-fullscreen-fallback > .home-gtfs-map {
  flex: 1 1 0;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 0;
}

.home-gtfs-map-panel:fullscreen > .home-map-filter,
.home-gtfs-map-panel.map-fullscreen-fallback > .home-map-filter {
  flex: 0 0 auto;
  margin: 0;
}

.leaflet-control-fullscreen-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 3px;
  border: 0;
  background: #fff;
  color: #000;
  cursor: pointer;
}

.leaflet-control-fullscreen-button:hover {
  background: #f4f4f4;
}

.leaflet-touch .leaflet-control-fullscreen-button {
  width: 30px;
  height: 30px;
  padding: 5px;
}

:root[data-resolved-theme="dark"] .leaflet-control-fullscreen-button {
  background: var(--surface-raised);
  color: var(--ink);
}

:root[data-resolved-theme="dark"] .leaflet-control-fullscreen-button:hover {
  background: var(--surface-soft);
}

.leaflet-control-fullscreen-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.leaflet-control-fullscreen-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-gtfs-vehicle-card.is-map-fullscreen-top {
  z-index: 10001;
  top: max(12px, env(safe-area-inset-top)) !important;
  right: max(12px, env(safe-area-inset-right));
  left: auto !important;
  max-height: min(42dvh, 360px);
  overflow-y: auto;
}

.home-gtfs-vehicle-card.is-map-fullscreen-top::after {
  display: none;
}

.container {
  gap: 16px;
  padding-top: calc(max(env(safe-area-inset-top), 0px) + 24px);
}

@media (min-width: 1000px) {
  .container {
    width: min(var(--content-width), 88%);
  }
}

.header-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 0;
  align-items: stretch;
  margin: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.header-intro,
:root[data-color-theme="classic"] .header-intro {
  gap: 8px;
  padding: clamp(24px, 3vw, 36px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.title-home-heading {
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  letter-spacing: -0.045em;
}

.title-home-btn {
  gap: 0;
}

.header-copy p {
  color: var(--muted);
  font-size: 1rem;
}

.search-shell {
  max-width: 760px;
  margin-top: 16px;
}

.search-row {
  gap: 8px;
}

.search-row input {
  min-height: 52px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  box-shadow: none;
}

#searchBtn,
:root[data-color-theme="classic"] #searchBtn {
  flex-basis: 52px;
  min-height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
}

:root[data-color-theme="classic"] #searchBtn {
  color: var(--accent-ink);
}

:root[data-color-theme="yellow"] #searchBtn,
:root[data-color-theme="orange"] #searchBtn {
  color: #000000;
}

#searchBtn:hover,
:root[data-color-theme="classic"] #searchBtn:hover {
  background: var(--accent-hover);
}

:root[data-color-theme="yellow"] #searchBtn:hover,
:root[data-color-theme="orange"] #searchBtn:hover {
  color: #ffffff;
}

.header-side,
.menu-inline-search .header-side {
  display: flex;
  min-width: 0;
  padding: 24px 28px;
}

.header-visual,
:root[data-color-theme="classic"] .header-visual {
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
  box-shadow: none;
}

.header-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 300px;
  gap: 10px;
}

.header-visual-kicker,
:root[data-color-theme="classic"] .header-visual-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.header-visual-copy strong {
  color: var(--ink);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.45;
}

@media (min-width: 1280px) {
  .header-visual-copy {
    max-width: 55%;
  }
}

.primary-nav,
:root[data-color-theme="classic"] .primary-nav {
  justify-content: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.primary-nav__link {
  position: relative;
  flex: 0 1 auto;
  min-height: 49px;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.94rem;
  box-shadow: none;
}

.primary-nav__link:hover {
  border: 0;
  background: var(--surface-tint);
  color: var(--ink);
}

.primary-nav__link[aria-current="page"],
:root[data-color-theme="classic"] .primary-nav__link[aria-current="page"],
:root[data-color-theme="classic"] .primary-nav__link[aria-current="page"]:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
}

:root[data-color-theme="classic"] .primary-nav__link[aria-current="page"],
:root[data-color-theme="classic"] .primary-nav__link[aria-current="page"]:hover {
  box-shadow: inset 0 -3px var(--gold);
}

.container > .home-favorites-panel,
.container > .home-photo-widget,
.home-gtfs-map-panel,
.card,
#routePageOutlet .pdf-modal.app-route-page,
#routePageOutlet #favoritesPanel.favorites-panel,
:root[data-color-theme="classic"] .home-gtfs-map-panel,
:root[data-color-theme="classic"] .card {
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card:hover,
.home-gtfs-map-panel:hover,
:root[data-color-theme="classic"] .card:hover,
:root[data-color-theme="classic"] .home-gtfs-map-panel:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.home-favorites-head,
.home-gtfs-map-head,
#routePageOutlet .pdf-modal-header,
#routePageOutlet .more-panel-header,
.vehicle-photo-header,
.card > h2 {
  border-bottom-color: var(--line);
}

.home-favorites-head h2,
.home-gtfs-map-head h2,
.card h2,
.pdf-modal-header h3,
.more-panel-header h3 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.mobile-vehicle-close {
  display: none;
}

.home-favorites-grid {
  gap: 18px;
}

#homeFavoritesPanel .home-favorites-grid {
  grid-template-columns: minmax(0, 1fr);
}

.transit-favorites-section {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.transit-favorites-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.transit-favorites-section .home-favorites-list {
  gap: 10px;
}

.transit-favorites-section .home-favorite-entry {
  min-height: 64px;
  background: var(--surface-soft);
}

.transit-favorites-section .home-favorite-open {
  padding: 12px 14px;
}

.transit-favorites-section .home-favorite-remove {
  flex-basis: 44px;
}

.transit-favorites-section .home-favorite-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--nested-card-radius);
  background: var(--surface-soft);
  line-height: 1.4;
}

.container > .home-photo-widget {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  background: var(--surface);
}

.home-photo-widget-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-photo-widget-list.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.home-photo-widget-item {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--nested-card-radius);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-photo-widget-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-tint);
}

.home-photo-widget-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.home-photo-widget-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-tint);
}

.home-photo-widget-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
}

.home-photo-widget-copy > span,
.home-photo-widget-copy small {
  color: var(--muted);
}

.widget-photo-settings {
  grid-column: 1 / -1;
}

.widget-photo-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.widget-photo-choice {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.widget-photo-choice select {
  width: 100%;
}

.widget-photo-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--nested-card-radius);
}

.widget-photo-error {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100px;
  padding: 12px;
  background: var(--surface-tint);
  color: var(--muted);
  text-align: center;
}

#homePhotoWidget[hidden],
#favoriteAlertsPanel[hidden],
body.route-page-open .container > .home-photo-widget,
body.route-page-open .container > .home-alerts-panel {
  display: none;
}

@media (max-width: 680px) {
  .widget-photo-choices {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-photo-widget-list {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }

  .home-photo-widget-item {
    scroll-snap-align: start;
  }
}

.home-favorites-group h3 {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.home-favorite-entry,
.settings-category,
.weather-detail-card,
.vehicle-photo-meta-item,
.favorite-item,
.favorites-empty-state,
.line-search-route,
.line-search-trip {
  border-color: var(--line);
  border-radius: var(--nested-card-radius);
  background: var(--surface-soft);
  box-shadow: none;
}

.home-favorite-entry:hover {
  border-color: var(--line-strong);
}

.vehicle-photo-side-panel {
  display: flex;
  flex-direction: column;
}

.vehicle-photo-info:not([hidden]) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
}

#vehiclePhotoAddBtn {
  width: 100%;
  margin-top: auto;
}

.home-gtfs-map,
#map {
  border-color: var(--line);
  border-radius: var(--radius-md);
}

.home-gtfs-map-panel.is-unavailable > .home-gtfs-map-head,
.home-gtfs-map-panel.is-unavailable > .home-map-filter,
.home-gtfs-map-panel.is-unavailable > .home-gtfs-map {
  display: none;
}

.home-map-error {
  display: grid;
  min-height: clamp(280px, 38vw, 430px);
  justify-items: center;
  align-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.home-map-error-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
}

.home-map-error-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.home-map-error p {
  max-width: 38ch;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

.home-map-error .btn {
  min-height: 44px;
}

.home-map-filter {
  gap: 10px 12px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-map-filter label {
  color: var(--ink);
}

.home-map-filter select {
  min-height: 40px;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.btn,
.close-btn,
.settings-close-btn,
.photo-nav-btn,
.icon-btn,
.pdf-modal-actions button,
.home-gtfs-map-refresh-btn,
.favorite-stop-toggle,
.favorite-line-toggle,
.favorite-action-btn,
.halte-nearby-open,
.line-search-vehicle {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.btn,
.pdf-modal-actions .btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

:root[data-color-theme="classic"] .btn,
:root[data-color-theme="classic"] .pdf-modal-actions .btn {
  color: var(--accent-ink);
}

:root[data-color-theme="yellow"] .btn,
:root[data-color-theme="orange"] .btn,
:root[data-color-theme="yellow"] .pdf-modal-actions .btn,
:root[data-color-theme="orange"] .pdf-modal-actions .btn {
  color: #000000;
}

.btn:hover,
.pdf-modal-actions .btn:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

:root[data-color-theme="classic"] .btn:hover,
:root[data-color-theme="classic"] .pdf-modal-actions .btn:hover {
  color: var(--accent-ink);
}

:root[data-color-theme="yellow"] .btn:hover,
:root[data-color-theme="orange"] .btn:hover,
:root[data-color-theme="yellow"] .pdf-modal-actions .btn:hover,
:root[data-color-theme="orange"] .pdf-modal-actions .btn:hover {
  color: #ffffff;
}

:root[data-color-theme] .ig-btn-wrap .btn,
:root[data-color-theme] .ig-btn-wrap .btn:hover {
  color: var(--ink);
}

.suggestion-input-shell input,
.halte-module-form input,
.pdf-modal input:not([type="checkbox"]),
.pdf-modal select,
.photo-upload-form input:not([type="checkbox"]) {
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  box-shadow: none;
}

.pdf-modal .photo-upload-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
}

.pdf-modal-card,
.funny-modal-card,
.offline-shell {
  border-radius: var(--radius-lg);
}

footer {
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 680px) {
  footer {
    padding: 16px;
  }
}

@media (forced-colors: active) {
  footer {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

@media (min-width: 1200px) {
  .header-bar {
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    gap: 0;
  }
}

@media (min-width: 1280px) {
  .header-bar {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

@media (max-width: 760px) {
  .header-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-side,
  .menu-inline-search .header-side {
    display: none;
  }
}

@media (max-width: 680px) {
  .container {
    gap: 12px;
    padding-top: calc(max(env(safe-area-inset-top), 0px) + 14px);
  }

  .header-bar {
    margin: 0;
  }

  .header-intro,
  :root[data-color-theme="classic"] .header-intro {
    padding: 20px 16px;
  }

  .title-home-heading {
    font-size: 1.65rem;
  }

  .search-shell {
    margin-top: 12px;
  }

  .search-row input,
  #searchBtn,
  .menu-inline-search .search-menu-btn {
    min-height: 48px;
  }

  #searchBtn {
    flex-basis: 48px;
  }

  .menu-inline-search .search-menu-btn {
    min-width: 48px;
    padding: 8px;
  }

  .results-toolbar {
    display: none;
  }

  #staticVehicleCard > h2 {
    min-height: 44px;
    padding-right: 56px;
  }

  #staticVehicleCard .mobile-vehicle-close {
    position: absolute;
    top: 20px;
    right: 17px;
    display: inline-flex;
  }

  .home-map-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 16px 0;
  }

  .home-map-filter select {
    width: 100%;
    min-height: 48px;
  }

  .home-gtfs-map-head {
    align-items: flex-start;
    gap: 12px;
  }

  .home-gtfs-map-head > div {
    min-width: 0;
  }

  .home-gtfs-map-status {
    line-height: 1.45;
  }
}

/* ==========================================================================
   3. Huisstijl BUSBIB
   ========================================================================== */

:root:root:root[data-color-theme]:not([data-resolved-theme="dark"]) {
  --page: #f6f7f9;
  --page-top: #f6f7f9;
  --bg: var(--page);
  --bg-gradient-top: var(--page-top);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f8f9fb;
  --surface-tint: #f0f1f5;
  --ink: #12131c;
  --muted: #5a5d6d;
  --faint: #6b6e7e;
  --line: #e5e7ee;
  --line-strong: #d0d3dd;
  --nested-card-background: var(--surface-soft);
  --shadow-sm: 0 1px 2px rgba(18, 19, 28, 0.05);
  --shadow-md: 0 10px 30px rgba(18, 19, 28, 0.08);
  --page-pattern: none;
}

:root:root:root[data-color-theme][data-resolved-theme="dark"] {
  --page: #0c0d12;
  --page-top: #0c0d12;
  --bg: var(--page);
  --bg-gradient-top: var(--page-top);
  --surface: #15161d;
  --surface-raised: #1b1c24;
  --surface-soft: #191a21;
  --surface-tint: #20212a;
  --ink: #f1f2f6;
  --muted: #afb2c0;
  --faint: #9295a6;
  --line: #262833;
  --line-strong: #373a48;
  --nested-card-background: var(--surface-soft);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --page-pattern: none;
}

:root:root:root[data-color-theme] {
  --brand-1: #7c3aed;
  --brand-2: #4f6bf0;
  --brand-3: #22d3ee;
  --brand-grad: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  --header-surface-a: #17161f;
  --header-surface-b: #0c0d12;
  --gold: #0e9fb8;
  --gold-soft: color-mix(in srgb, #0e9fb8 12%, var(--surface));
  --accent-hover: color-mix(in srgb, var(--accent) 84%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, var(--surface));
  --accent-ink: #ffffff;
}

:root:root:root[data-color-theme][data-resolved-theme="dark"] {
  --gold: #22d3ee;
  --accent-hover: color-mix(in srgb, var(--accent) 80%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--surface));
  --accent-ink: #0c0d12;
}

:root:root:root[data-color-theme="classic"] {
  --accent: #6d28d9;
}

:root:root:root[data-color-theme="classic"][data-resolved-theme="dark"] {
  --accent: #a99bff;
}

:root:root:root[data-color-theme="blue"] {
  --accent: #2563eb;
  --brand-1: #2563eb;
  --brand-2: #3b82f6;
  --brand-3: #22d3ee;
}

:root:root:root[data-color-theme="blue"][data-resolved-theme="dark"] {
  --accent: #6ea8ff;
}

:root:root:root[data-color-theme="green"] {
  --accent: #15803d;
  --brand-1: #15803d;
  --brand-2: #16a34a;
  --brand-3: #22d3ee;
}

:root:root:root[data-color-theme="green"][data-resolved-theme="dark"] {
  --accent: #4ade80;
}

:root:root:root[data-color-theme="yellow"] {
  --accent: #a16207;
  --accent-ink: #ffffff;
  --brand-1: #ca8a04;
  --brand-2: #eab308;
  --brand-3: #fde047;
}

:root:root:root[data-color-theme="yellow"][data-resolved-theme="dark"] {
  --accent: #facc15;
  --accent-ink: #1a1500;
}

:root:root:root[data-color-theme="orange"] {
  --accent: #c2410c;
  --brand-1: #c2410c;
  --brand-2: #f97316;
  --brand-3: #fbbf24;
}

:root:root:root[data-color-theme="orange"][data-resolved-theme="dark"] {
  --accent: #fb923c;
}

:root:root:root[data-color-theme="red"] {
  --accent: #dc2626;
  --brand-1: #b91c1c;
  --brand-2: #ef4444;
  --brand-3: #fb7185;
}

:root:root:root[data-color-theme="red"][data-resolved-theme="dark"] {
  --accent: #f87171;
}

:root:root:root[data-color-theme="purple"] {
  --accent: #9333ea;
  --brand-1: #7e22ce;
  --brand-2: #a855f7;
  --brand-3: #e879f9;
}

:root:root:root[data-color-theme="purple"][data-resolved-theme="dark"] {
  --accent: #c084fc;
}

:root:root:root[data-color-theme="gta6"] {
  --brand-1: #ff3cac;
  --brand-2: #784ba0;
  --brand-3: #2bd2ff;
  --brand-grad: linear-gradient(135deg, #ffe29f 0%, #ff719a 38%, #ff3cac 62%, #784ba0 82%, #2bd2ff 100%);
  --accent: #d4127a;
  --gold: #0891b2;
  --warning: #c2621b;
  --header-surface-a: #2a0b3f;
  --header-surface-b: #12021e;
}

:root:root:root[data-color-theme="gta6"]:not([data-resolved-theme="dark"]) {
  --page: #fff6f4;
  --page-top: #fff0f3;
  --surface: #ffffff;
  --surface-soft: #fff7f8;
  --surface-tint: #ffecf3;
  --ink: #23102f;
  --muted: #6e5670;
  --faint: #806882;
  --line: #f4dde6;
  --line-strong: #e6c2d2;
  --page-pattern: radial-gradient(60rem 30rem at 0% 0%, rgba(255, 113, 154, 0.12), transparent 60%), radial-gradient(50rem 30rem at 100% 100%, rgba(43, 210, 255, 0.1), transparent 60%);
}

:root:root:root[data-color-theme="gta6"][data-resolved-theme="dark"] {
  --page: #10061c;
  --page-top: #1c0a2c;
  --surface: #190b29;
  --surface-raised: #211033;
  --surface-soft: #1d0e2e;
  --surface-tint: #28133d;
  --ink: #fff2f8;
  --muted: #d6bdd8;
  --faint: #b39bb8;
  --line: #34204a;
  --line-strong: #4a2f66;
  --accent: #ff4fae;
  --accent-ink: #1a0614;
  --gold: #2bd2ff;
  --page-pattern: radial-gradient(60rem 30rem at 0% 0%, rgba(255, 60, 172, 0.16), transparent 60%), radial-gradient(50rem 30rem at 100% 100%, rgba(43, 210, 255, 0.12), transparent 60%);
}

@media (prefers-color-scheme: dark) {
  :root:root:root[data-color-theme]:not([data-resolved-theme]) {
    --page: #0c0d12;
    --page-top: #0c0d12;
    --surface: #15161d;
    --ink: #f1f2f6;
    --muted: #afb2c0;
    --line: #262833;
    --accent: #a99bff;
  }
}

:root[data-color-theme] body {
  background: var(--page-pattern, none), var(--page);
  background-attachment: fixed;
}

:root:root {
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --page-card-radius: 16px;
  --nested-card-radius: 12px;
  --control-height: 44px;
}

body,
button,
input,
select,
textarea {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.015em;
}

:root[data-color-theme] ::selection {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}

.suggestion-input-shell input,
.halte-module-form input,
.pdf-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.pdf-modal select,
.bb-settings select {
  min-height: var(--control-height);
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  box-shadow: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.pdf-modal select,
.bb-settings select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236e6c7d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  cursor: pointer;
}

.suggestion-input-shell input:hover,
.halte-module-form input:hover,
.pdf-modal select:hover,
.bb-settings select:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong));
}

.suggestion-input-shell input:focus,
.halte-module-form input:focus,
.pdf-modal input:focus,
.pdf-modal select:focus,
.bb-settings select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--focus-ring);
}

.settings-card--toggle input[type="checkbox"],
.bb-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  margin: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.settings-card--toggle input[type="checkbox"]::before,
.bb-switch::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 150ms ease;
}

.settings-card--toggle input[type="checkbox"]:checked,
.bb-switch:checked {
  background: var(--accent);
}

.settings-card--toggle input[type="checkbox"]:checked::before,
.bb-switch:checked::before {
  transform: translateX(18px);
  background: #ffffff;
}

.btn,
.pdf-modal-actions .btn,
.more-secondary-btn {
  min-height: var(--control-height);
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

:root:root[data-color-theme] .btn:not(.more-secondary-btn) {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

:root:root[data-color-theme] .btn:not(.more-secondary-btn):hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.more-secondary-btn,
:root:root .btn.more-secondary-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.more-secondary-btn:hover,
:root:root .btn.more-secondary-btn:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
  color: var(--accent);
}

.btn:disabled,
.more-secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

:root[data-color-theme] .header-bar {
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

:root[data-color-theme] .search-row input {
  min-height: 50px;
  padding-inline: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

:root[data-color-theme] .search-row input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus-ring);
  outline: none;
}

:root:root[data-color-theme] #searchBtn {
  flex-basis: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

:root:root[data-color-theme] #searchBtn:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

:root:root[data-color-theme] .header-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  color: var(--ink);
}

:root:root[data-color-theme] .header-visual-kicker {
  color: var(--accent);
}

:root:root[data-color-theme] .primary-nav {
  border-bottom-color: var(--line);
}

:root[data-color-theme] .primary-nav__link {
  font-weight: 600;
}

:root:root[data-color-theme] .primary-nav__link[aria-current="page"],
:root:root[data-color-theme] .primary-nav__link[aria-current="page"]:hover {
  color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
}

:root:root .card,
:root:root .home-gtfs-map-panel,
:root:root footer {
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius);
  box-shadow: var(--shadow-sm);
}

:root:root .card:hover,
:root:root .home-gtfs-map-panel:hover {
  box-shadow: var(--shadow-sm);
}

:root[data-color-theme] .card h2 {
  border-left-color: var(--accent);
}

.pdf-modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.pdf-modal-header {
  border-bottom: 1px solid var(--line);
}

.pdf-modal-actions {
  gap: 10px;
}

.settings-close-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  transition: background-color 120ms ease, color 120ms ease;
}

.settings-close-btn:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.bb-settings {
  display: grid;
  gap: 20px;
}

.bb-settings .bb-settings-intro {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.bb-settings .bb-settings-intro::before,
.bb-settings .bb-settings-intro::after {
  display: none;
}

.bb-settings .bb-settings-intro h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.bb-settings .bb-settings-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bb-set-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  align-items: start;
}

.bb-set-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.bb-set-group-title {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-set-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.bb-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bb-set-row + .bb-set-row {
  border-top: 1px solid var(--line);
}

.bb-set-row--toggle {
  cursor: pointer;
}

.bb-set-row--toggle:hover {
  background: var(--surface-soft);
}

.bb-set-row--stack {
  flex-direction: column;
  align-items: stretch;
}

.bb-set-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bb-set-text label,
.bb-set-label {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.bb-set-hint {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
}

.bb-set-control {
  flex: 0 0 auto;
  width: min(220px, 45%);
}

.bb-set-control select,
.bb-set-control .bb-set-btn {
  width: 100%;
}

.bb-set-btn {
  min-height: 40px;
  padding: 8px 14px;
}

.bb-set-btn--danger {
  color: var(--danger);
}

.bb-set-btn--danger:hover,
:root:root .bb-set-btn--danger:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
}

.bb-settings:has(#showPhotoWidgetToggle:not(:checked)) .widget-photo-settings {
  display: none;
}

.bb-settings .widget-photo-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.bb-settings .widget-photo-choices label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.settings-feed-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.more-panel-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.more-panel-section-head h4 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.more-action-grid {
  gap: 10px;
}

.tracking-status-banner {
  border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  color: var(--ink);
  box-shadow: none;
}

.page-loading-bar {
  background: var(--accent);
}

:root[data-color-theme] #splash {
  background: var(--page);
}

:root[data-color-theme] #splash .logo {
  width: clamp(96px, 26vw, 128px);
  height: clamp(96px, 26vw, 128px);
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root[data-color-theme] #splash .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:root:root[data-color-theme] .splash-welcome {
  color: var(--accent);
  letter-spacing: 0.16em;
}

:root:root[data-color-theme] .splash-rule {
  width: 40px;
  height: 2px;
  background: var(--accent);
}

@media (max-width: 640px) {
  .bb-set-row {
    flex-wrap: wrap;
  }

  .bb-set-row:not(.bb-set-row--toggle) .bb-set-control {
    width: 100%;
  }

  .bb-set-row--toggle {
    flex-wrap: nowrap;
  }

  .bb-set-groups {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-switch,
  .bb-switch::before,
  .settings-card--toggle input[type="checkbox"]::before {
    transition: none;
  }
}

:root[data-reduce-motion="true"] .bb-switch,
:root[data-reduce-motion="true"] .bb-switch::before {
  transition: none;
}

:root:root .bb-settings .settings-category.bb-set-group {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

:root:root .bb-settings .settings-panel-intro.bb-settings-intro {
  margin: 0;
  padding: 0;
}

:root:root .bb-settings .settings-categories.bb-set-groups {
  margin: 0;
  padding: 0;
}

:root:root .bb-settings .more-secondary-btn.bb-set-btn--danger {
  color: var(--danger);
}

:root:root .bb-settings .more-secondary-btn.bb-set-btn--danger:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
}

#routePageOutlet .bb-settings .settings-category.bb-set-group,
#favoritesPanel .bb-settings .settings-category.bb-set-group {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

#routePageOutlet .bb-settings .bb-set-groups,
#favoritesPanel .bb-settings .bb-set-groups {
  gap: 20px;
}

#routePageOutlet .bb-settings .bb-set-row,
#favoritesPanel .bb-settings .bb-set-row {
  padding: 12px 16px;
}

#photoUploadModal .bb-upload {
  width: min(100%, 560px);
  padding: 0;
  overflow: hidden;
}

#photoUploadModal .bb-upload .pdf-modal-header {
  padding: 20px 22px 16px;
}

#photoUploadModal .bb-upload-body {
  max-height: min(72vh, 720px);
  padding: 18px 22px 22px;
  overflow-y: auto;
}

.bb-upload-form {
  display: grid;
  gap: 16px;
}

.bb-upload-form[hidden],
.bb-upload-success[hidden] {
  display: none;
}

.bb-upload-field {
  display: grid;
  gap: 6px;
}

.bb-upload-field[hidden] {
  display: none;
}

.bb-upload-field > label,
.bb-upload-label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.bb-upload-hint,
.bb-upload-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.bb-upload-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.bb-upload-error[hidden] {
  display: none;
}

#photoUploadModal input[aria-invalid="true"] {
  border-color: var(--danger);
}

.bb-upload-vehicle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.bb-upload-vehicle[hidden] {
  display: none;
}

.bb-upload-vehicle-icon {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.bb-upload-vehicle-icon svg,
.bb-upload-lock svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-upload-vehicle-text {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.bb-upload-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bb-upload-vehicle-text strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bb-upload-muted {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-upload-muted[hidden] {
  display: none;
}

.bb-upload-lock {
  flex: 0 0 auto;
  color: var(--faint);
}

.bb-upload-lock svg {
  width: 18px;
  height: 18px;
}

.bb-upload-switch {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  margin-top: -6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.bb-upload-switch[hidden] {
  display: none;
}

.bb-upload-switch:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bb-upload-switch svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-upload-drop {
  position: relative;
  display: block;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.bb-upload-drop:hover,
.bb-upload-drop.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.bb-upload-drop.is-invalid {
  border-color: var(--danger);
}

.bb-upload-drop.has-file {
  border-style: solid;
}

.bb-upload-drop:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.bb-upload-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip: rect(0 0 0 0);
}

.bb-upload-drop-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 26px 16px;
  text-align: center;
}

.bb-upload-drop-empty[hidden] {
  display: none;
}

.bb-upload-drop-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.bb-upload-drop-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-upload-drop-empty strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.bb-upload-drop-empty span {
  color: var(--muted);
  font-size: 0.82rem;
}

.bb-upload-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.bb-upload-preview[hidden] {
  display: none;
}

.bb-upload-preview img {
  flex: 0 0 auto;
  width: 96px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-tint);
}

.bb-upload-preview-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.bb-upload-preview-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-upload-preview-meta span {
  color: var(--muted);
  font-size: 0.82rem;
}

.bb-upload-preview-meta .bb-upload-link-text {
  margin-top: 4px;
  color: var(--accent);
  font-weight: 600;
}

#photoUploadModal .bb-upload-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

#photoUploadModal .bb-upload-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

#photoUploadConsentError {
  margin-top: -8px;
}

.bb-upload-challenge:empty {
  display: none;
}

#photoUploadModal .photo-upload-submit {
  position: relative;
  min-height: 48px;
  font-size: 0.98rem;
}

.bb-upload-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bb-upload-spin 700ms linear infinite;
}

.photo-upload-submit.is-sending .bb-upload-spinner {
  display: inline-block;
}

.photo-upload-submit.is-sending .bb-upload-submit-icon {
  display: none;
}

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

.photo-upload-status[data-state="sending"] {
  color: var(--muted);
}

.photo-upload-status[data-state="error"],
.photo-upload-status[data-state="unavailable"] {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
  color: var(--ink);
}

#photoUploadModal .bb-upload-success {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 8px 6px;
  border: 0;
  background: none;
  text-align: center;
}

#photoUploadModal .bb-upload-success .photo-upload-success-icon {
  width: 56px;
  height: 56px;
  flex: none;
  margin-bottom: 6px;
}

#photoUploadModal .bb-upload-success .photo-upload-success-icon svg {
  width: 28px;
  height: 28px;
}

.bb-upload-success h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

#photoUploadModal .bb-upload-success p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.bb-upload-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  #photoUploadModal .bb-upload .pdf-modal-header,
  #photoUploadModal .bb-upload-body {
    padding-inline: 16px;
  }

  .bb-upload-success-actions .btn {
    flex: 1 1 100%;
  }
}

.bb-photo-widget .bb-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bb-widget-head-text h2 {
  margin: 0 0 2px;
}

.bb-widget-head-text p {
  margin: 0;
  color: var(--muted);
}

.bb-widget-edit {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 6px 14px;
}

.bb-widget-edit[hidden] {
  display: none;
}

#homePhotoWidgetList.home-photo-widget-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

#homePhotoWidgetList.is-empty {
  grid-template-columns: 1fr;
}

#homePhotoWidgetList .bb-widget-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

#homePhotoWidgetList .bb-widget-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-md);
}

.bb-widget-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-tint);
}

#homePhotoWidgetList .bb-widget-media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  transition: transform 250ms ease;
}

#homePhotoWidgetList .bb-widget-card:hover .bb-widget-media img {
  transform: scale(1.03);
}

#homePhotoWidgetList .bb-widget-copy {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 14px 14px;
}

#homePhotoWidgetList .bb-widget-copy strong {
  font-size: 1.05rem;
}

#homePhotoWidgetList .bb-widget-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homePhotoWidgetList .bb-widget-copy small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.78rem;
}

.bb-widget-add {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 180px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.bb-widget-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bb-widget-add-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 1.4rem;
  line-height: 1;
}

.bb-widget-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  text-align: center;
}

.bb-widget-empty p {
  margin: 0;
  color: var(--muted);
}

.bb-widget-empty-icon,
.bb-slot-placeholder {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.bb-widget-empty-icon svg,
.bb-slot-placeholder svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-settings .widget-photo-choices {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
}

.bb-settings .bb-slot {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.bb-slot-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-slot-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.bb-slot.is-filled .bb-slot-number {
  background: var(--accent);
  color: var(--accent-ink);
}

.bb-slot-title {
  flex: 1 1 auto;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.bb-slot-remove {
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.bb-slot-remove:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.bb-slot-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
}

.bb-settings .bb-slot .widget-photo-preview {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

.bb-settings .bb-slot-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.bb-slot-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  #homePhotoWidgetList.home-photo-widget-list {
    grid-auto-columns: minmax(220px, 72%);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  #homePhotoWidgetList > * {
    scroll-snap-align: start;
  }

  #homePhotoWidgetList.is-empty {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }
}

#termsModal .legal-modal-card {
  width: min(100%, 720px);
}

.bb-terms {
  display: grid;
  gap: 20px;
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.6;
}

.bb-terms-intro {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
}

.bb-terms-section {
  display: grid;
  gap: 8px;
}

.bb-terms-section + .bb-terms-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bb-terms h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.bb-terms-number {
  display: grid;
  flex: 0 0 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.bb-terms p {
  max-width: 65ch;
  margin: 0;
  color: var(--muted);
}

.bb-terms ul {
  display: grid;
  gap: 6px;
  max-width: 65ch;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.bb-terms li::marker {
  color: var(--accent);
}

.bb-terms a:not(.btn) {
  color: var(--accent);
  font-weight: 600;
}

.bb-terms-footer {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bb-terms-updated {
  font-size: 0.83rem;
}

.bb-terms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bb-terms-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  text-decoration: none;
}

.bb-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 14px 0 12px;
}

.bb-map-toolbar .home-map-filter {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.9rem;
}

.bb-map-toolbar .home-map-filter select {
  flex: 1 1 180px;
  min-height: 40px;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
}

.bb-map-kind {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.bb-map-kind-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.bb-map-kind-btn:hover {
  color: var(--ink);
}

.bb-map-kind-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.bb-map-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.bb-map-kind-btn.is-active .bb-map-count {
  background: var(--accent-soft);
  color: var(--accent);
}

.bb-map-find {
  display: flex;
  flex: 0 1 260px;
  min-width: 200px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.bb-map-find:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.bb-map-find input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
}

.bb-map-find input:focus-visible {
  outline: none;
}

.bb-map-find button {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--accent);
  cursor: pointer;
}

.bb-map-find button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.bb-map-find-message {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.bb-map-find-message[hidden],
.bb-map-follow[hidden] {
  display: none;
}

.bb-map-follow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.bb-map-follow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);
  animation: bb-follow-pulse 1.6s ease-out infinite;
}

@keyframes bb-follow-pulse {
  to { box-shadow: 0 0 0 8px transparent; }
}

.bb-map-follow span:nth-child(2) {
  flex: 1 1 auto;
}

.bb-map-follow button {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.home-gtfs-vehicle-card {
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(10, 8, 25, 0.22);
}

.bb-vcard {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.bb-vcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bb-vcard-kind {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.bb-vcard-kind svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-vcard-title {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.bb-vcard-title strong {
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.2;
}

.bb-vcard-title > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-gtfs-vehicle-card .bb-vcard-close {
  position: static;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.home-gtfs-vehicle-card .bb-vcard-close svg {
  width: 16px;
  height: 16px;
}

.bb-vcard-route {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.bb-vcard-route .line-badge {
  flex: 0 0 auto;
}

.bb-vcard-destination {
  display: grid;
  min-width: 0;
}

.bb-vcard-destination small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bb-vcard-destination strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-vcard-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.bb-vcard-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}

.bb-vcard-facts > div + div {
  border-top: 1px solid var(--line);
}

.bb-vcard-facts dt {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.bb-vcard-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: right;
}

.bb-vcard-age {
  color: var(--faint);
  font-weight: 500;
}

.bb-vcard-actions {
  display: flex;
  gap: 8px;
}

.bb-vcard-open {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.bb-vcard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.bb-vcard-btn--icon {
  padding: 0;
}

.bb-vcard-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-vcard-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bb-vcard-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.bb-vcard-btn[data-vehicle-card-favorite].is-active svg {
  fill: currentColor;
}

@media (max-width: 640px) {
  .bb-map-kind,
  .bb-map-find {
    flex: 1 1 100%;
  }

  .bb-map-kind-btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-map-follow-dot {
    animation: none;
  }
}

.bb-vcard-title > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

:root:root #splash {
  display: grid;
  place-items: center;
  gap: 0;
  background: radial-gradient(38rem 26rem at 50% 42%, color-mix(in srgb, var(--brand-2) 14%, transparent), transparent 70%),
    var(--page);
  transition: opacity 260ms ease, visibility 260ms ease;
}

:root:root[data-color-theme="gta6"] #splash {
  background: radial-gradient(36rem 24rem at 50% 36%, rgba(255, 113, 154, 0.28), transparent 70%),
    radial-gradient(40rem 28rem at 50% 110%, rgba(43, 210, 255, 0.18), transparent 70%),
    linear-gradient(180deg, #2a0b3f, #12021e);
  color: #fff2f8;
}

:root:root[data-color-theme="gta6"]:not([data-resolved-theme="dark"]) #splash {
  background: radial-gradient(36rem 24rem at 50% 36%, rgba(255, 113, 154, 0.22), transparent 70%),
    linear-gradient(180deg, #fff5f8, #ffe9f1);
  color: #23102f;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bb-splash-stage {
  display: grid;
  justify-items: center;
  text-align: center;
}

.bb-splash-mark {
  position: relative;
  width: clamp(104px, 28vw, 136px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: bb-splash-mark 820ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.bb-splash-glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-1));
  filter: blur(34px);
  opacity: 0.28;
  animation: bb-spin 2.4s linear infinite, bb-fade-in 600ms ease both;
}

.bb-splash-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%) no-repeat;
  background-size: 260% 100%;
  -webkit-mask: url("../media/brand/busbib-beeldmerk.svg") center / contain no-repeat;
  mask: url("../media/brand/busbib-beeldmerk.svg") center / contain no-repeat;
  mix-blend-mode: soft-light;
  animation: bb-shine 900ms 260ms ease-out both;
}

:root[data-color-theme="gta6"] .bb-splash-shine {
  display: none;
}

:root:root #splash .splash-welcome {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: bb-rise 520ms 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

:root:root #splash .splash-title {
  margin: 4px 0 0;
  color: inherit;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  animation: bb-rise-track 620ms 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

:root:root #splash .splash-credit {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  animation: bb-rise 520ms 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

:root:root[data-color-theme="gta6"][data-resolved-theme="dark"] #splash .splash-credit,
:root:root[data-color-theme="gta6"][data-resolved-theme="dark"] #splash .splash-welcome {
  color: #f5c6de;
}

:root:root #splash .splash-rule {
  position: relative;
  display: block;
  width: 120px;
  height: 3px;
  margin: 22px 0 0;
  overflow: hidden;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  animation: bb-fade-in 300ms 300ms both;
}

#splash .splash-rule span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--brand-grad);
  transform-origin: left;
  animation: bb-progress 900ms 120ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes bb-splash-mark {
  0% { opacity: 0; transform: translateY(10px) scale(0.78) rotate(-6deg); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; }
}

@keyframes bb-shine {
  from { background-position: 130% 0; }
  to { background-position: -40% 0; }
}

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

@keyframes bb-fade-in {
  from { opacity: 0; }
}

@keyframes bb-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes bb-rise-track {
  from { opacity: 0; letter-spacing: 0.22em; }
  to { opacity: 1; letter-spacing: 0.02em; }
}

@keyframes bb-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

:root:root .header-bar.bb-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

:root:root .bb-hero .header-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: clamp(22px, 3.4vw, 40px);
}

.bb-hero .header-copy {
  margin-top: clamp(14px, 2vw, 22px);
}

:root:root .bb-hero .header-copy .bb-hero-slogan {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 3.3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

:root:root .bb-hero .header-copy .bb-hero-lead {
  max-width: 46ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.5;
}

:root:root .bb-hero .search-shell {
  margin-top: clamp(16px, 2vw, 22px);
  max-width: 620px;
}

:root:root[data-color-theme] .bb-hero #searchBtn {
  background: var(--brand-grad);
  color: var(--brand-ink, #ffffff);
  border: 0;
  transition: transform 140ms ease, filter 140ms ease;
}

:root:root[data-color-theme] .bb-hero #searchBtn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

:root:root[data-color-theme] .bb-hero #searchBtn:active {
  transform: scale(0.96);
}

.bb-hero #searchBtn .search-btn-icon {
  stroke: currentColor;
}

:root:root .bb-hero .header-side {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

:root:root .bb-hero .header-side .header-actions:empty {
  display: none;
}

:root:root[data-color-theme] .bb-hero-art {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  min-height: 300px;
  padding: 24px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: radial-gradient(22rem 16rem at 88% 8%, color-mix(in srgb, var(--brand-1) 45%, transparent), transparent 70%),
    radial-gradient(20rem 14rem at 10% 100%, color-mix(in srgb, var(--brand-3) 28%, transparent), transparent 70%),
    linear-gradient(160deg, #15132a, #0b0a16);
  color: #ffffff;
}

:root:root[data-color-theme="gta6"] .bb-hero-art {
  background: radial-gradient(14rem 14rem at 82% 22%, rgba(255, 179, 140, 0.55), rgba(255, 113, 154, 0.35) 45%, transparent 70%),
    radial-gradient(22rem 14rem at 0% 100%, rgba(43, 210, 255, 0.28), transparent 70%),
    linear-gradient(180deg, #3a0f52, #12021e 75%);
}

.bb-hero-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.bb-hero-line {
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.35;
}

.bb-hero-line--a {
  stroke: var(--brand-3);
}

.bb-hero-line--b {
  stroke: var(--brand-1);
}

.bb-hero-line--c {
  stroke: #ffffff;
  opacity: 0.12;
}

.bb-hero-run {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 46 600;
  animation: bb-run 6s linear infinite;
}

.bb-hero-run--a {
  stroke: var(--brand-3);
  filter: drop-shadow(0 0 6px var(--brand-3));
}

.bb-hero-run--b {
  stroke: #ffffff;
  opacity: 0.85;
  animation-duration: 7.5s;
  animation-delay: -3s;
  filter: drop-shadow(0 0 6px var(--brand-1));
}

.bb-hero-stop {
  fill: #0b0a16;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
}

:root[data-color-theme="gta6"] .bb-hero-stop {
  fill: #1d0730;
}

@keyframes bb-run {
  from { stroke-dashoffset: 646; }
  to { stroke-dashoffset: 0; }
}

@keyframes bb-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

:root:root .bb-hero-art .header-visual-copy {
  display: grid;
  gap: 6px;
  max-width: 30ch;
}

:root:root[data-color-theme] .bb-hero-art .header-visual-kicker {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:root:root .bb-hero-art .header-visual-copy strong {
  color: #ffffff;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
}

.bb-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bb-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
}

.bb-hero-stat strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.bb-hero-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: bb-pulse 2s ease-out infinite;
}

@keyframes bb-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}


@media (max-width: 980px) {
  :root:root .header-bar.bb-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  :root:root .bb-hero .header-side {
    padding: 0 12px 12px;
  }

  :root:root[data-color-theme] .bb-hero-art {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px 18px;
  }

  :root:root .bb-hero-art .header-visual-copy {
    max-width: none;
    flex: 1 1 60%;
  }

  .bb-hero-stats {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  :root:root .bb-hero .header-intro {
    padding: 18px 16px 16px;
  }

  :root:root .bb-hero .header-copy {
    margin-top: 12px;
  }

  :root:root .bb-hero .header-copy .bb-hero-lead {
    font-size: 0.92rem;
  }

  :root:root .bb-hero-art .header-visual-copy strong {
    font-size: 0.98rem;
  }

  .bb-hero-stat {
    min-height: 28px;
    font-size: 0.76rem;
  }
}

html.bb-ready .container > .header-bar,
html.bb-ready .container > .primary-nav,
html.bb-ready .container > .home-gtfs-map-panel,
html.bb-ready .container > .card,
html.bb-ready .container > section {
  animation: bb-enter 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

html.bb-ready .container > .primary-nav {
  animation-delay: 60ms;
}

html.bb-ready .container > .home-gtfs-map-panel {
  animation-delay: 120ms;
}

html.bb-ready .container > .card,
html.bb-ready .container > section {
  animation-delay: 180ms;
}

@keyframes bb-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.pdf-modal:not([hidden]) .pdf-modal-card {
  animation: bb-pop 220ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

@keyframes bb-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

#routePageOutlet > :not([hidden]) {
  animation: bb-enter 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bb-widget-card,
.bb-set-group,
.bb-vcard {
  animation: bb-enter 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bb-set-group:nth-child(2) {
  animation-delay: 40ms;
}

.bb-set-group:nth-child(3) {
  animation-delay: 80ms;
}

.bb-set-group:nth-child(4) {
  animation-delay: 120ms;
}

.bb-set-group:nth-child(5) {
  animation-delay: 160ms;
}

.bb-set-group:nth-child(6) {
  animation-delay: 200ms;
}

.bb-widget-card:nth-child(2) {
  animation-delay: 60ms;
}

.bb-widget-card:nth-child(3) {
  animation-delay: 120ms;
}

.btn,
.more-secondary-btn,
.primary-nav__link {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.btn:active,
.more-secondary-btn:active {
  transform: scale(0.98);
}

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

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
}

.bb-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(10, 9, 20, 0.92) 0%, rgba(10, 9, 20, 0.55) 42%, transparent 72%);
  pointer-events: none;
}

:root[data-color-theme="gta6"] .bb-hero-art::after {
  background: linear-gradient(0deg, rgba(18, 2, 30, 0.92) 0%, rgba(18, 2, 30, 0.5) 42%, transparent 72%);
}

@media (max-width: 980px) {
  .bb-hero-art::after {
    background: linear-gradient(90deg, rgba(10, 9, 20, 0.88) 0%, rgba(10, 9, 20, 0.6) 55%, rgba(10, 9, 20, 0.2) 100%);
  }

  :root[data-color-theme="gta6"] .bb-hero-art::after {
    background: linear-gradient(90deg, rgba(18, 2, 30, 0.88) 0%, rgba(18, 2, 30, 0.55) 55%, rgba(18, 2, 30, 0.15) 100%);
  }
}

.bb-set-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 2px;
}

.bb-set-group-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-grad);
  color: var(--brand-ink, #ffffff);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-2) 25%, transparent);
}

.bb-set-group-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root:root .bb-set-group-head .bb-set-group-title {
  padding: 0;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.bb-set-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-tint);
  color: var(--accent);
  transition: background-color 140ms ease, color 140ms ease;
}

.bb-set-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-set-row:hover .bb-set-icon {
  background: var(--accent-soft);
}

.bb-set-row > .bb-set-text {
  flex: 1 1 auto;
}

.bb-set-row:has(.bb-set-btn--danger) .bb-set-icon {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

@media (max-width: 640px) {
  .bb-set-row:not(.bb-set-row--toggle):not(.bb-set-row--stack) {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 10px;
  }

  .bb-set-row:not(.bb-set-row--toggle):not(.bb-set-row--stack) .bb-set-control {
    grid-column: 1 / -1;
    width: 100%;
  }

  .bb-set-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }
}

.more-action-grid .more-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-inline: 14px;
}

.more-action-grid .more-secondary-btn::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  -webkit-mask: var(--bb-btn-icon) center / contain no-repeat;
  mask: var(--bb-btn-icon) center / contain no-repeat;
}

#lineSearchToggleBtn {
  --bb-btn-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2219%22%20r%3D%222.4%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%225%22%20r%3D%222.4%22%2F%3E%3Cpath%20d%3D%22M8.4%2019H15a3.5%203.5%200%200%200%200-7H9a3.5%203.5%200%200%201%200-7h6.6%22%2F%3E%3C%2Fsvg%3E");
}

#halteSearchToggleBtn {
  --bb-btn-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%2021h8M12%2021V12%22%2F%3E%3Crect%20x%3D%225%22%20y%3D%222.5%22%20width%3D%2214%22%20height%3D%229.5%22%20rx%3D%222.5%22%2F%3E%3Cpath%20d%3D%22M9%207.2h6%22%2F%3E%3C%2Fsvg%3E");
}

#moreUploadPhotoBtn {
  --bb-btn-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14.5%204h-5L7.5%206.5H5A2%202%200%200%200%203%208.5V18a2%202%200%200%200%202%202h14a2%202%200%200%200%202-2V8.5a2%202%200%200%200-2-2h-2.5z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2213%22%20r%3D%223.5%22%2F%3E%3C%2Fsvg%3E");
}






:root:root .vehicle-photo-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

:root:root .vehicle-photo-frame {
  isolation: isolate;
  min-height: 0;
  aspect-ratio: 3 / 2;
  border: 0;
  border-radius: 14px;
  background: #0d0e14;
}

:root:root .vehicle-photo-frame::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: var(--bb-photo-bg, none) center / cover no-repeat;
  filter: blur(28px) saturate(1.15) brightness(0.6);
  transform: scale(1.1);
  transition: background-image 300ms ease;
}

:root:root .vehicle-photo-frame.is-empty {
  aspect-ratio: auto;
  min-height: 240px;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
}

:root:root .vehicle-photo-frame.is-empty::before {
  display: none;
}

:root:root .vehicle-photo-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  filter: none;
}

:root:root .vehicle-photo-image.is-visible {
  animation: bb-photo-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes bb-photo-in {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: none; }
}

:root:root .photo-nav-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 10, 16, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #ffffff;
  box-shadow: none;
  transition: background-color 140ms ease, transform 140ms ease;
}

:root:root .photo-nav-btn:hover {
  background: rgba(10, 10, 16, 0.78);
  transform: scale(1.05);
}

:root:root .photo-nav-btn svg {
  stroke: currentColor;
}

:root:root .photo-fullscreen-btn,
:root:root .vehicle-photo-frame .vehicle-photo-actions-trigger {
  border: 0;
  background: rgba(10, 10, 16, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #ffffff;
}

.bb-photo-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.bb-photo-thumbs[hidden] {
  display: none;
}

.bb-photo-thumb {
  flex: 0 0 auto;
  width: 84px;
  aspect-ratio: 3 / 2;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--surface-tint);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.bb-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bb-photo-thumb:hover {
  opacity: 0.9;
}

.bb-photo-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

:root:root .vehicle-photo-side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
}

:root:root .vehicle-photo-info:not([hidden]) {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

:root:root .vehicle-photo-meta {
  flex: 1 1 320px;
  min-width: 0;
}

:root:root .vehicle-photo-meta-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}

:root:root .vehicle-photo-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

:root:root .vehicle-photo-meta-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

:root:root #vehiclePhotoAddBtn {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

:root:root .vehicle-photo-caption:empty {
  display: none;
}

@media (max-width: 600px) {
  :root:root .vehicle-photo-frame {
    border-radius: 12px;
    aspect-ratio: 4 / 3;
  }

  :root:root #vehiclePhotoAddBtn {
    width: 100%;
  }

  .bb-photo-thumb {
    width: 72px;
  }

  :root:root .photo-nav-btn {
    width: 38px;
    height: 38px;
  }
}

:root:root[data-color-theme]:not([data-color-theme="gta6"])[data-resolved-theme="dark"] .btn:not(.more-secondary-btn):not(.bb-hero-chip) {
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line-strong));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-raised));
  color: var(--ink);
}

:root:root[data-color-theme]:not([data-color-theme="gta6"])[data-resolved-theme="dark"] .btn:not(.more-secondary-btn):not(.bb-hero-chip):hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-raised));
  color: #ffffff;
}

:root:root .search-menu-btn {
  border-color: var(--line-strong);
}

:root:root button:focus:not(:focus-visible),
:root:root a:focus:not(:focus-visible) {
  box-shadow: none;
  outline: none;
}

:root:root .header-bar.bb-hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  border-radius: 18px;
}

:root:root .bb-hero .header-intro {
  padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.6vw, 30px);
}

.bb-hero .header-copy {
  margin-top: 12px;
}

:root:root .bb-hero .header-copy .bb-hero-slogan {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.03em;
}

:root:root .bb-hero .header-copy .bb-hero-lead {
  margin-top: 4px;
  font-size: 0.92rem;
}

:root:root .bb-hero .search-shell {
  margin-top: 14px;
}

:root:root .bb-hero .search-row input,
:root:root[data-color-theme] .bb-hero #searchBtn {
  min-height: 46px;
}

:root:root[data-color-theme] .bb-hero #searchBtn {
  flex-basis: 46px;
  min-width: 46px;
}

:root:root .bb-hero .header-side {
  padding: 10px;
}

:root:root[data-color-theme] .bb-hero-art {
  min-height: 0;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 20px;
}

:root:root .bb-hero-art .header-visual-copy {
  max-width: 34ch;
  gap: 4px;
}

:root:root[data-color-theme] .bb-hero-art .header-visual-kicker {
  font-size: 0.68rem;
}

:root:root .bb-hero-art .header-visual-copy strong {
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
}

.bb-hero-stat {
  min-height: 28px;
  font-size: 0.78rem;
}

.bb-hero-lines {
  opacity: 0.85;
}

@media (max-width: 760px) {
  :root:root .bb-hero .header-side .bb-hero-art {
    display: none;
  }

  :root:root .header-bar.bb-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  :root:root .bb-hero .header-side:not(:has(.header-actions *)) {
    display: none;
  }

  :root:root .bb-hero .header-side {
    padding: 0;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  :root:root .header-bar.bb-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  :root:root .bb-hero .header-side {
    padding: 0 10px 10px;
  }

  :root:root[data-color-theme] .bb-hero-art {
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
  }
}

@media (max-width: 600px) {
  :root:root .bb-hero .header-intro {
    padding: 16px;
  }

  .bb-hero .header-copy {
    margin-top: 10px;
  }

  :root:root .bb-hero .header-copy .bb-hero-slogan {
    font-size: 1.3rem;
  }

  :root:root .bb-hero .header-copy .bb-hero-lead {
    font-size: 0.86rem;
  }

  :root:root .bb-hero .search-shell {
    margin-top: 12px;
  }
}

:root:root .bb-hero .header-copy .bb-hero-lead {
  max-width: 62ch;
}

:root:root:root[data-color-theme="classic"] {
  --accent: #3a3c48;
  --accent-hover: #24262f;
  --accent-soft: #eeeff3;
  --accent-ink: #ffffff;
  --gold: #6b7080;
  --gold-soft: #f0f1f4;
  --brand-1: #6b6f80;
  --brand-2: #8a8fa1;
  --brand-3: #b3bccb;
  --brand-grad: linear-gradient(135deg, #2c2e38, #474a58);
  --brand-ink: #ffffff;
  --focus-ring: 0 0 0 3px rgba(58, 60, 72, 0.18);
}

:root:root:root[data-color-theme="classic"][data-resolved-theme="dark"] {
  --accent: #d5d7df;
  --accent-hover: #ffffff;
  --accent-soft: #23242d;
  --accent-ink: #0c0d12;
  --gold: #9aa1b2;
  --gold-soft: #1c1d25;
  --brand-1: #5a5e70;
  --brand-2: #7c8194;
  --brand-3: #a8b1c2;
  --brand-grad: linear-gradient(135deg, #eceef3, #c3c7d2);
  --brand-ink: #0c0d12;
  --focus-ring: 0 0 0 3px rgba(213, 215, 223, 0.2);
}

@media (prefers-color-scheme: dark) {
  :root:root:root[data-color-theme="classic"]:not([data-resolved-theme]) {
    --accent: #d5d7df;
  }
}

:root:root[data-color-theme="classic"][data-resolved-theme="dark"] .btn:not(.more-secondary-btn):not(.bb-hero-chip) {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--ink);
}

:root:root[data-color-theme="classic"][data-resolved-theme="dark"] .btn:not(.more-secondary-btn):not(.bb-hero-chip):hover {
  border-color: #6b6f80;
  background: var(--surface-tint);
}

:root:root[data-color-theme="classic"] .bb-hero-art {
  background: radial-gradient(22rem 16rem at 88% 8%, rgba(148, 163, 184, 0.22), transparent 70%),
    radial-gradient(20rem 14rem at 10% 100%, rgba(125, 140, 170, 0.16), transparent 70%),
    linear-gradient(160deg, #1b1c23, #0e0f14);
}

:root[data-color-theme="classic"] .bb-hero-run--a {
  stroke: #c9d2e0;
  filter: drop-shadow(0 0 5px rgba(201, 210, 224, 0.6));
}

:root[data-color-theme="classic"] .bb-hero-run--b {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

:root[data-color-theme="classic"] .bb-splash-glow {
  opacity: 0.16;
}

:root[data-color-theme="classic"] #splash {
  background: radial-gradient(38rem 26rem at 50% 42%, rgba(148, 163, 184, 0.12), transparent 70%), var(--page);
}

:root[data-color-theme="classic"] .bb-set-group-icon {
  box-shadow: none;
}

:root[data-color-theme="classic"] .bb-set-icon {
  color: var(--ink);
}

:root:root .bb-ob {
  padding: 16px;
}

:root:root .bb-ob-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  width: min(860px, 100%);
  max-width: 860px;
  max-height: min(680px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.bb-ob-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: 28px;
  overflow: hidden;
  background: radial-gradient(20rem 16rem at 80% 10%, color-mix(in srgb, var(--brand-1) 50%, transparent), transparent 70%),
    radial-gradient(18rem 14rem at 0% 100%, color-mix(in srgb, var(--brand-3) 32%, transparent), transparent 70%),
    linear-gradient(165deg, #16142a, #0b0a16);
  color: #ffffff;
}

:root[data-color-theme="gta6"] .bb-ob-visual {
  background: radial-gradient(14rem 14rem at 78% 18%, rgba(255, 179, 140, 0.6), rgba(255, 113, 154, 0.35) 45%, transparent 70%),
    radial-gradient(20rem 14rem at 0% 100%, rgba(43, 210, 255, 0.3), transparent 70%),
    linear-gradient(180deg, #3a0f52, #12021e 78%);
}

:root[data-color-theme="classic"] .bb-ob-visual {
  background: radial-gradient(20rem 16rem at 80% 10%, rgba(148, 163, 184, 0.25), transparent 70%),
    radial-gradient(18rem 14rem at 0% 100%, rgba(125, 140, 170, 0.18), transparent 70%),
    linear-gradient(165deg, #1d1e26, #0e0f14);
}

.bb-ob-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(8, 8, 14, 0.85), transparent 55%);
}

.bb-ob-lines {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.bb-ob-lines .bb-ob-line {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
  stroke-linecap: round;
}

.bb-ob-lines .bb-ob-run {
  stroke: var(--brand-3);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 50 640;
  filter: drop-shadow(0 0 6px var(--brand-3));
  animation: bb-ob-run 6.5s linear infinite;
}

.bb-ob-lines .bb-ob-run--b {
  stroke: #ffffff;
  opacity: 0.8;
  animation-duration: 8s;
  animation-delay: -3s;
}

.bb-ob-lines circle {
  fill: #0b0a16;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2;
}

@keyframes bb-ob-run {
  from { stroke-dashoffset: 690; }
  to { stroke-dashoffset: 0; }
}

.bb-ob-mark {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 112px;
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.5));
  animation: bb-float 6s ease-in-out infinite;
}

.bb-ob-visual-copy {
  display: grid;
  gap: 6px;
}

.bb-ob-visual-copy span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bb-ob-visual-copy strong {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.bb-ob-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 26px 30px 22px;
  overflow-y: auto;
}

.bb-ob-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.bb-ob-dot {
  width: 22px;
  height: 5px;
  border-radius: 5px;
  background: var(--line-strong);
  transition: width 220ms ease, background-color 220ms ease;
}

.bb-ob-dot.is-active {
  width: 36px;
  background: var(--accent);
}

.bb-ob-dot.is-done {
  background: color-mix(in srgb, var(--accent) 45%, var(--line-strong));
}

.bb-ob-step-label {
  margin-left: 6px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
}

.bb-ob-screen {
  animation: bb-ob-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bb-ob-screen[hidden] {
  display: none;
}

@keyframes bb-ob-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

.bb-ob-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

:root:root .bb-ob-title {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

:root:root .bb-ob-title--sm {
  font-size: clamp(1.45rem, 3vw, 1.75rem);
}

.bb-ob-intro {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.bb-ob-features {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.bb-ob-features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bb-ob-features li > span:last-child {
  display: grid;
  gap: 1px;
}

.bb-ob-features strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.bb-ob-features li > span:last-child > span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.bb-ob-feat-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-tint);
  color: var(--accent);
}

.bb-ob-feat-icon svg,
.bb-ob-segment svg,
.bb-ob-btn-primary svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-ob-field {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.bb-ob-label {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bb-ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bb-ob-chip {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 0.86rem/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.bb-ob-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.bb-ob-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.bb-ob-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.bb-ob-segment button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 64px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: 600 0.82rem/1.2 "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.bb-ob-segment button:hover {
  color: var(--ink);
}

.bb-ob-segment button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.bb-ob-segment button[aria-pressed="true"] svg,
.bb-ob-segment button[aria-pressed="true"] .bb-ob-aa {
  color: var(--accent);
}

.bb-ob-aa {
  font-weight: 800;
  line-height: 1;
}

.bb-ob-swatches {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.bb-ob-swatch {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 6px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.bb-ob-swatch-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 0 0 3px var(--surface), 0 0 0 4px transparent;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.bb-ob-swatch:hover .bb-ob-swatch-dot {
  transform: scale(1.08);
}

.bb-ob-swatch[aria-pressed="true"] .bb-ob-swatch-dot {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 0 0 3px var(--surface), 0 0 0 5px var(--ink);
}

.bb-ob-swatch-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-ob-swatch[aria-pressed="true"] .bb-ob-swatch-name {
  color: var(--ink);
}

.bb-ob-toggles {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.bb-ob-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 14px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.bb-ob-toggle + .bb-ob-toggle {
  border-top: 1px solid var(--line);
}

.bb-ob-toggle:hover {
  background: var(--surface-soft);
}

.bb-ob-actions {
  position: sticky;
  bottom: -22px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: auto -30px -22px;
  padding: 16px 30px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.bb-ob-actions .bb-ob-btn-secondary,
.bb-ob-actions .bb-ob-btn-primary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
}

:root:root[data-color-theme] .bb-ob-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--brand-grad);
  color: var(--brand-ink, #ffffff);
  transition: transform 140ms ease, filter 140ms ease;
}

:root:root[data-color-theme] .bb-ob-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  background: var(--brand-grad);
  color: var(--brand-ink, #ffffff);
}

.bb-ob-btn-primary.is-final svg {
  display: none;
}

.bb-ob-card {
  margin-top: 22px;
}

.bb-ob-main > .bb-ob-progress + .bb-ob-screen {
  margin-top: 0;
}

@media (max-width: 720px) {
  :root:root .bb-ob {
    padding: 0;
    align-items: flex-end;
  }

  :root:root .bb-ob-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    max-height: 100dvh;
    border-radius: 22px 22px 0 0;
  }

  .bb-ob-visual {
    min-height: 0;
    height: 132px;
    padding: 18px 20px;
    justify-content: center;
  }

  .bb-ob-visual-copy {
    margin-left: 92px;
  }

  .bb-ob-visual-copy strong {
    font-size: 1.15rem;
  }

  .bb-ob-mark {
    top: 50%;
    left: 18px;
    width: 72px;
    margin-top: -38px;
  }

  .bb-ob-card[data-ob-step="2"] .bb-ob-visual {
    height: 84px;
  }

  .bb-ob-card[data-ob-step="2"] .bb-ob-mark {
    width: 52px;
    margin-top: -27px;
  }

  .bb-ob-card[data-ob-step="2"] .bb-ob-visual-copy {
    margin-left: 64px;
  }

  .bb-ob-card[data-ob-step="2"] .bb-ob-visual-copy span {
    display: none;
  }

  .bb-ob-main {
    padding: 20px 18px 16px;
  }

  .bb-ob-actions {
    bottom: -16px;
    margin: auto -18px -16px;
    padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  }

  .bb-ob-actions button {
    flex: 1 1 0;
    justify-content: center;
  }

  .bb-ob-swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bb-ob-features {
    gap: 10px;
    margin-top: 16px;
  }

  .bb-ob-field {
    margin-top: 16px;
  }
}

:root:root .bb-ob input.bb-switch {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

:root:root .bb-ob input.bb-switch:checked {
  background: var(--accent);
}

.bb-ob-toggle > span {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 721px) {
  :root:root .bb-ob-card {
    grid-template-rows: minmax(0, 1fr);
    height: min(640px, calc(100dvh - 32px));
    max-height: none;
  }

  .bb-ob-visual {
    min-height: 0;
  }
}

.bb-ob-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.bb-ob-label-value {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.bb-ob-swatch-name {
  display: none;
}

.bb-ob-swatches {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.bb-ob-swatch {
  padding: 4px 0;
}

.bb-ob-swatch-dot {
  width: 34px;
  height: 34px;
}

@media (min-width: 721px) {
  :root:root .bb-ob-card {
    height: min(700px, calc(100dvh - 32px));
  }

  .bb-ob-screen[data-ob-screen="2"] .bb-ob-field {
    margin-top: 14px;
  }

  .bb-ob-screen[data-ob-screen="2"] .bb-ob-segment button {
    min-height: 54px;
    gap: 3px;
  }

  .bb-ob-screen[data-ob-screen="2"] .bb-ob-toggles {
    margin-top: 14px;
  }

  .bb-ob-screen[data-ob-screen="2"] .bb-ob-toggle {
    min-height: 44px;
  }
}

@media (max-width: 720px) {
  .bb-ob-swatches {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2px;
  }

  .bb-ob-swatch-dot {
    width: 30px;
    height: 30px;
  }
}

:root:root .bb-ob input.bb-switch:not(:checked),
:root:root .bb-switch:not(:checked) {
  background: color-mix(in srgb, var(--ink) 22%, var(--surface));
}

/* ==========================================================================
   4. Thema's en logo (versie 3)
   Elk kleurthema bepaalt: accent, merkverloop en de kleuren van het logo.
   Het logo op de site volgt het thema; de PWA-iconen blijven vast.
   ========================================================================== */

:root:root:root[data-color-theme] {
  --logo-face-1: #e9d5ff;
  --logo-face-2: #a78bfa;
  --logo-face-3: #60a5fa;
  --logo-face-4: #22d3ee;
  --logo-ext-1: #4c1d95;
  --logo-ext-2: #1e3a8a;
  --logo-card-1: #8b5cf6;
  --logo-card-2: #3b82f6;
  --logo-card-3: #ec4899;
  --logo-glow: #7c3aed;
  --logo-shadow: #1e1b4b;
}

:root:root:root[data-color-theme="classic"] {
  --accent: #3d5a80;
  --accent-hover: #2c4566;
  --accent-soft: #edf2f8;
  --accent-ink: #ffffff;
  --gold: #5f86b3;
  --gold-soft: #eef3f9;
  --brand-1: #5a79ae;
  --brand-2: #6f93c4;
  --brand-3: #8fc3db;
  --brand-grad: linear-gradient(135deg, #34507a, #4f74a8);
  --brand-ink: #ffffff;
  --focus-ring: 0 0 0 3px rgba(61, 90, 128, 0.2);
  --logo-face-1: #e6eef9;
  --logo-face-2: #adc2e0;
  --logo-face-3: #7f9fcb;
  --logo-face-4: #79b9d3;
  --logo-ext-1: #263a57;
  --logo-ext-2: #1b2b42;
  --logo-card-1: #86a0c9;
  --logo-card-2: #5c7db3;
  --logo-card-3: #a9bad6;
  --logo-glow: #5c7db3;
  --logo-shadow: #1b2438;
}

:root:root:root[data-color-theme="classic"]:not([data-resolved-theme="dark"]) {
  --page: #f4f6f9;
  --page-top: #f4f6f9;
  --surface-soft: #f7f9fb;
  --surface-tint: #eef2f7;
  --line: #e2e7ee;
  --line-strong: #cdd5e0;
  --ink: #111827;
  --muted: #566173;
  --faint: #6b7587;
}

:root:root:root[data-color-theme="classic"][data-resolved-theme="dark"] {
  --page: #0c0e13;
  --page-top: #0c0e13;
  --surface: #14171e;
  --surface-raised: #1a1e27;
  --surface-soft: #171a22;
  --surface-tint: #1e232d;
  --line: #252a35;
  --line-strong: #354050;
  --accent: #a9bfdc;
  --accent-hover: #c9d8ec;
  --accent-soft: #1c2330;
  --accent-ink: #0c0e13;
  --gold: #8fb4d6;
  --brand-grad: linear-gradient(135deg, #dbe6f4, #a9bfdc);
  --brand-ink: #0c0e13;
  --focus-ring: 0 0 0 3px rgba(169, 191, 220, 0.25);
}

:root:root[data-color-theme="classic"] .bb-hero-art,
:root:root[data-color-theme="classic"] .bb-ob-visual {
  background: radial-gradient(22rem 16rem at 88% 8%, rgba(111, 147, 196, 0.28), transparent 70%),
    radial-gradient(20rem 14rem at 8% 100%, rgba(143, 195, 219, 0.16), transparent 70%),
    linear-gradient(160deg, #18202d, #0d1118);
}

:root[data-color-theme="classic"] .bb-hero-run--a {
  stroke: #9cc3e0;
  filter: drop-shadow(0 0 5px rgba(156, 195, 224, 0.55));
}

:root:root[data-color-theme="classic"] .bb-set-icon {
  color: var(--accent);
}

:root:root:root[data-color-theme="blue"] {
  --logo-face-1: #dbeafe;
  --logo-face-2: #93c5fd;
  --logo-face-3: #3b82f6;
  --logo-face-4: #22d3ee;
  --logo-ext-1: #1e3a8a;
  --logo-ext-2: #172554;
  --logo-card-1: #60a5fa;
  --logo-card-2: #2563eb;
  --logo-card-3: #22d3ee;
  --logo-glow: #2563eb;
  --logo-shadow: #172554;
}

:root:root:root[data-color-theme="green"] {
  --logo-face-1: #dcfce7;
  --logo-face-2: #86efac;
  --logo-face-3: #22c55e;
  --logo-face-4: #2dd4bf;
  --logo-ext-1: #14532d;
  --logo-ext-2: #134e4a;
  --logo-card-1: #4ade80;
  --logo-card-2: #16a34a;
  --logo-card-3: #a3e635;
  --logo-glow: #16a34a;
  --logo-shadow: #052e16;
}

:root:root:root[data-color-theme="yellow"] {
  --logo-face-1: #fef9c3;
  --logo-face-2: #fde68a;
  --logo-face-3: #facc15;
  --logo-face-4: #f59e0b;
  --logo-ext-1: #713f12;
  --logo-ext-2: #422006;
  --logo-card-1: #fde047;
  --logo-card-2: #eab308;
  --logo-card-3: #fb923c;
  --logo-glow: #eab308;
  --logo-shadow: #422006;
}

:root:root:root[data-color-theme="orange"] {
  --logo-face-1: #ffedd5;
  --logo-face-2: #fdba74;
  --logo-face-3: #fb923c;
  --logo-face-4: #f97316;
  --logo-ext-1: #7c2d12;
  --logo-ext-2: #431407;
  --logo-card-1: #fb923c;
  --logo-card-2: #ea580c;
  --logo-card-3: #fbbf24;
  --logo-glow: #ea580c;
  --logo-shadow: #431407;
}

:root:root:root[data-color-theme="red"] {
  --logo-face-1: #fee2e2;
  --logo-face-2: #fca5a5;
  --logo-face-3: #f87171;
  --logo-face-4: #fb7185;
  --logo-ext-1: #7f1d1d;
  --logo-ext-2: #4c0519;
  --logo-card-1: #f87171;
  --logo-card-2: #dc2626;
  --logo-card-3: #fb7185;
  --logo-glow: #dc2626;
  --logo-shadow: #450a0a;
}

.bb-mark {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bb-mark-vice {
  display: none;
  width: 100%;
  height: auto;
}

:root[data-color-theme="gta6"] .bb-mark {
  display: none;
}

:root[data-color-theme="gta6"] .bb-mark-vice {
  display: block;
}

.bb-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bb-logo .bb-mark,
.bb-logo .bb-mark-vice {
  flex: 0 0 auto;
  width: 40px;
}

.bb-logo-word {
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

:root:root .bb-hero .title-home-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.bb-splash-mark .bb-mark,
.bb-splash-mark .bb-mark-vice {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 28px color-mix(in srgb, var(--logo-glow) 35%, transparent));
}

.bb-ob-mark {
  display: block;
}

.bb-ob-mark .bb-mark,
.bb-ob-mark .bb-mark-vice {
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.5));
}

:root[data-color-theme="gta6"] .bb-splash-shine {
  display: none;
}

/* ==========================================================================
   5. Scrollen, aanraken en muis
   ========================================================================== */

html {
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(body.overlay-open),
html:has(body.pdf-modal-open) {
  overflow: hidden;
}

body {
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

:where(button, a, [role="button"], label, select, summary) {
  touch-action: manipulation;
}

img {
  -webkit-user-drag: none;
}

@media (hover: none) {
  .card:hover,
  .home-gtfs-map-panel:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--line);
  }

  .bb-ob-chip:hover,
  .bb-hero .header-bar:hover,
  .btn:hover,
  .photo-nav-btn:hover,
  .bb-ob-swatch:hover .bb-ob-swatch-dot {
    transform: none;
  }
}

@media (pointer: coarse) {
  :root:root {
    --control-height: 48px;
  }

  .bb-footer-nav button,
  .bb-footer-social {
    min-height: 44px;
  }
}

/* ==========================================================================
   6. Navigatie: tabbladen op pc, vaste balk onderaan op gsm
   ========================================================================== */

@media (max-width: 680px) {
  :root:root .container > .primary-nav {
    position: fixed;
    z-index: 900;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    backdrop-filter: saturate(1.4) blur(16px);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
    animation: none;
  }

  :root:root .container > .primary-nav .primary-nav__link {
    flex-direction: column;
    gap: 3px;
    min-height: 52px;
    padding: 6px 2px;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
  }

  :root:root .container > .primary-nav .primary-nav__link svg {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  :root:root .container > .primary-nav .primary-nav__link[aria-current="page"] {
    background: var(--accent-soft);
    box-shadow: none;
    color: var(--accent);
  }

  body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  :root:root .bb-hero #favoritesToggleBtn,
  :root:root .bb-hero .header-side:not(:has(.bb-hero-art)) {
    display: none;
  }

  body.map-fullscreen-open .container > .primary-nav,
  body.overlay-open .container > .primary-nav {
    display: none;
  }
}

/* ==========================================================================
   7. Voettekst
   ========================================================================== */

:root:root .bb-footer {
  display: grid;
  gap: 0;
  margin-top: 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.bb-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  padding: 28px 30px 24px;
}

.bb-footer-brand {
  display: grid;
  align-content: start;
  gap: 12px;
}

.bb-footer-logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 800 1.15rem/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.bb-footer-logo .bb-mark,
.bb-footer-logo .bb-mark-vice {
  width: 34px;
}

.bb-footer-slogan {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bb-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.bb-footer-social {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.bb-footer-social svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-footer-social svg.is-fill {
  fill: currentColor;
  stroke: none;
}

.bb-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.bb-footer-col {
  display: grid;
  align-content: start;
  gap: 2px;
}

:root:root .bb-footer-heading {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-footer-col button {
  justify-self: start;
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 0.92rem/1.3 "Inter", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color 140ms ease;
}

.bb-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 30px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.bb-footer-copy {
  margin: 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.bb-footer-support {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease;
}

.bb-footer-support svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .bb-footer-social:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
  }

  .bb-footer-col button:hover,
  .bb-footer-logo:hover {
    color: var(--accent);
  }

  .bb-footer-support:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

@media (max-width: 680px) {
  .bb-footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 22px 18px 18px;
  }

  .bb-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 18px;
  }

  .bb-footer-bottom .bb-footer-support {
    order: -1;
  }
}

/* ==========================================================================
   8. Homepagina
   ========================================================================== */

@media (min-width: 981px) {
  :root:root .header-bar.bb-hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  }

  :root:root .bb-hero .header-intro {
    padding: 22px 26px;
  }
}

.bb-hero .header-copy {
  margin-top: 14px;
}

:root:root .bb-hero .header-copy .bb-hero-slogan {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

:root:root[data-color-theme] .bb-hero-art {
  padding: 16px 18px;
  gap: 8px;
}

:root:root .bb-hero-art .header-visual-copy strong {
  display: none;
}

:root:root[data-color-theme] .bb-hero-art .header-visual-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.bb-hero-run--b {
  display: none;
}

.bb-hero-run--a {
  animation-duration: 9s;
}

.bb-quick {
  display: grid;
  gap: 12px;
}

body.route-page-open .bb-quick,
body.bb-vehicle-open .bb-quick {
  display: none;
}

:root:root .bb-quick-title {
  margin: 4px 2px 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bb-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bb-quick-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bb-quick-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.bb-quick-icon svg,
.bb-quick-arrow svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-quick-text {
  display: grid;
  gap: 3px;
}

.bb-quick-text strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.bb-quick-text span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.bb-quick-arrow {
  color: var(--faint);
  transition: transform 160ms ease, color 160ms ease;
}

.bb-quick-arrow svg {
  width: 18px;
  height: 18px;
}

@media (hover: hover) {
  .bb-quick-card:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }

  .bb-quick-card:hover .bb-quick-arrow {
    color: var(--accent);
    transform: translateX(2px);
  }
}

.bb-quick-card:active {
  transform: scale(0.99);
}

@media (max-width: 900px) {
  .bb-quick-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .bb-quick-card {
    min-height: 72px;
  }
}

:root:root .home-gtfs-map-panel {
  border-radius: 18px;
}

:root:root .home-gtfs-map-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-left: 0;
  padding-left: 0;
}

:root:root .home-gtfs-map-head h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px color-mix(in srgb, #22c55e 20%, transparent);
}

:root:root .home-gtfs-map {
  border-radius: 14px;
}

:root:root .home-gtfs-map-panel.is-unavailable > .home-gtfs-map-head {
  display: flex;
}

:root:root .home-gtfs-map-panel.is-unavailable > .home-gtfs-map-head .home-gtfs-map-status,
:root:root .home-gtfs-map-panel.is-unavailable > .bb-map-toolbar,
:root:root .home-gtfs-map-panel.is-unavailable > .bb-map-find-message,
:root:root .home-gtfs-map-panel.is-unavailable > .bb-map-follow {
  display: none;
}

/* ==========================================================================
   9. Paginaopruiming
   Navigatie zit altijd in beeld (tabbladen of balk onderaan), dus geen dubbele
   sluitknoppen of "extra functies" op de pagina's Lijn, Halte en Menu.
   ========================================================================== */

:root:root #halteSearchCloseBtn,
:root:root #lineSearchCloseBtn,
:root:root #favoritesPanelCloseBtn,
:root:root #lineSearchToggleBtn,
:root:root #halteSearchToggleBtn {
  display: none;
}

:root:root body .more-extra-functions {
  display: block;
}

.more-extra-functions .more-action-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 681px) {
  :root:root #mobileVehicleCloseBtn {
    display: none;
  }
}

:root:root #closeBtn.close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
  :root:root #closeBtn.close-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.bb-logo .bb-mark {
  transform: translateY(3px);
}


/* ==========================================================================
   10. Voertuigfoto: foto links, info en acties rechts (pc) – eigen stijl op gsm
   ========================================================================== */
.bb-photo-side-title {
  margin: 0;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bb-photo-side-title[hidden],
.bb-photo-tools[hidden],
.bb-photo-tool[hidden] { display: none; }
:root:root .vehicle-photo-info:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  height: 100%;
}
:root:root .vehicle-photo-meta { flex: 0 0 auto; }
:root:root .vehicle-photo-meta-card { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
:root:root .vehicle-photo-meta-item {
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}
:root:root .vehicle-photo-meta-item + .vehicle-photo-meta-item { border-top: 1px solid var(--line); }
.bb-photo-tools { display: grid; gap: 0; }
.bb-photo-tools .bb-photo-side-title { margin-bottom: 8px; }
.bb-photo-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-top-width: 0;
  background: var(--surface);
  color: var(--ink);
  font: 600 0.9rem/1.2 "Inter", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.bb-photo-tools .bb-photo-side-title + .bb-photo-tool { border-top-width: 1px; border-radius: 14px 14px 0 0; }
.bb-photo-tool:last-child { border-radius: 0 0 14px 14px; }
.bb-photo-tool svg {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) { .bb-photo-tool:hover { background: var(--surface-soft); color: var(--accent); } }
:root:root #vehiclePhotoAddBtn.bb-photo-upload { width: 100%; min-height: 46px; margin-top: auto; }

@media (min-width: 900px) {
  :root:root .vehicle-photo-layout {
    grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
    align-items: stretch;
    gap: 20px;
  }
  :root:root .vehicle-photo-side-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
  }
}

/* Gsm: compacte rijen en een raster met vier actieknoppen */
@media (max-width: 899px) {
  :root:root .vehicle-photo-meta-card { display: flex; flex-wrap: wrap; gap: 8px; border: 0; border-radius: 0; overflow: visible; }
  :root:root .vehicle-photo-meta-item { flex: 1 1 calc(50% - 8px); min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px 9px 9px; background: var(--surface-soft); }
  :root:root .vehicle-photo-meta-item + .vehicle-photo-meta-item { border-top: 1px solid var(--line); }
  #photoInfoTitle { display: none; }
  .bb-photo-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .bb-photo-tools .bb-photo-side-title { display: none; }
  .bb-photo-tool,
  .bb-photo-tools .bb-photo-side-title + .bb-photo-tool,
  .bb-photo-tool:last-child {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 74px;
    padding: 10px 4px;
    border-width: 1px;
    border-radius: 14px;
    font-size: 0.72rem;
    text-align: center;
  }
  .bb-photo-tool span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}
/* Acties staan naast/onder de foto: geen knoppen meer óp de foto */
:root:root .vehicle-photo-frame .vehicle-photo-actions--frame,
:root:root #vehiclePhotoFullscreenBtn { display: none; }
:root:root .vehicle-photo-frame .vehicle-photo-image { cursor: zoom-in; }

/* ==========================================================================
   11. Zoekpagina's: Lijn zoeken en Halte zoeken
   ========================================================================== */
:root:root #routePageOutlet .bb-search-page { padding: 0; overflow: hidden; }
:root:root .bb-search-page .bb-page-head {
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface));
}
.bb-page-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-grad);
  color: var(--brand-ink, #fff);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-2) 25%, transparent);
}
.bb-page-icon svg,
.bb-field-icon svg,
.bb-section-icon svg,
.home-favorite-empty svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root:root .bb-search-page .bb-page-head h3 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
:root:root .bb-search-page .bb-page-head .pdf-modal-summary { margin: 3px 0 0; color: var(--muted); font-size: 0.92rem; }
:root:root .bb-search-page > .pdf-modal-body { display: grid; gap: 22px; padding: 22px 28px 26px; }

/* Zoekveld met icoon en vastgezette knop */
.bb-field { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.bb-field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  display: grid;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.bb-field-icon svg { width: 20px; height: 20px; }
:root:root .bb-search-page .halte-module-form,
:root:root .bb-search-page .line-search-controls { display: flex; gap: 8px; align-items: stretch; }
:root:root .bb-search-page .bb-field input,
:root:root .bb-search-page #haltecodeInput,
:root:root .bb-search-page #lineSearchInput {
  width: 100%;
  min-height: 52px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 1rem;
}
:root:root .bb-search-page .bb-field input:focus { border-color: var(--accent); background: var(--surface); box-shadow: var(--focus-ring); }
:root:root .bb-search-page #haltecodeSearchBtn,
:root:root .bb-search-page #lineSearchSubmitBtn {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-grad);
  color: var(--brand-ink, #fff);
  font-weight: 700;
}
:root:root .bb-search-page .halte-module-help { margin: -12px 2px 0; color: var(--faint); font-size: 0.84rem; }

/* Secties */
.bb-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--ink); font-size: 1rem; font-weight: 700; }
.bb-section-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.bb-section-icon svg { width: 17px; height: 17px; }
.bb-section-icon--lg { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
.bb-section-icon--lg svg { width: 22px; height: 22px; }
:root:root .bb-search-page .transit-favorites-section,
:root:root .bb-search-page .halte-nearby { margin: 0; padding: 0; border: 0; }
:root:root .bb-search-page .transit-favorites-section h4,
:root:root .bb-search-page .halte-nearby h4 { margin: 0; }

/* Lege favorieten */
:root:root .home-favorite-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
}
.home-favorite-empty svg { flex: 0 0 22px; color: var(--faint); }
.home-favorite-empty span { display: grid; gap: 2px; }
.home-favorite-empty strong { color: var(--ink); font-size: 0.92rem; font-weight: 600; }
.home-favorite-empty small { color: var(--muted); font-size: 0.84rem; }

/* Haltes in de buurt */
:root:root .bb-search-page .halte-nearby-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
:root:root .bb-search-page .halte-nearby-heading > div { flex: 1 1 auto; min-width: 0; }
:root:root .bb-search-page .halte-nearby-heading h4 { font-size: 1rem; font-weight: 700; }
:root:root .bb-search-page .halte-nearby-heading p { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
:root:root .bb-search-page #halteNearbyBtn { flex: 0 0 auto; min-height: 44px; border-radius: 12px; }

@media (max-width: 680px) {
  :root:root .bb-search-page .bb-page-head { padding: 18px 16px 16px; }
  .bb-page-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; }
  :root:root .bb-search-page > .pdf-modal-body { gap: 18px; padding: 18px 16px 20px; }
  :root:root .bb-search-page .halte-module-form,
  :root:root .bb-search-page .line-search-controls { flex-direction: column; }
  :root:root .bb-search-page .halte-module-help { margin-top: -8px; }
  :root:root .bb-search-page .halte-nearby-heading { flex-wrap: wrap; }
  :root:root .bb-search-page #halteNearbyBtn { width: 100%; }
}
#routePageOutlet .pdf-modal.app-route-page .pdf-modal-card.bb-search-page { padding: 0; overflow: hidden; }
#routePageOutlet .bb-search-page .pdf-modal-header.bb-page-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}
#routePageOutlet .bb-search-page .bb-page-head > div { flex: 1 1 auto; min-width: 0; }
#routePageOutlet .bb-search-page > .pdf-modal-body { display: grid; gap: 22px; margin: 0; padding: 22px 28px 26px; }
.line-search-status:empty,
#lineSearchResults:empty,
#halteNearbyStatus:empty,
#halteNearbyResults:empty { display: none; }
@media (max-width: 680px) {
  #routePageOutlet .bb-search-page .pdf-modal-header.bb-page-head { padding: 18px 16px 16px; }
  #routePageOutlet .bb-search-page > .pdf-modal-body { gap: 18px; padding: 18px 16px 20px; }
  :root:root .bb-search-page .halte-nearby-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr); }
  :root:root .bb-search-page #halteNearbyBtn { grid-column: 1 / -1; }
}

/* ==========================================================================
   12. Live kaart op volledig scherm: meer rand, compacte kop en filters
   ========================================================================== */
:root:root .home-gtfs-map-panel:fullscreen,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback {
  gap: 14px;
  padding:
    max(20px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left)) !important;
  background: var(--page) !important;
}
:root:root .home-gtfs-map-panel:fullscreen > .home-gtfs-map-head,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback > .home-gtfs-map-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
}
:root:root .home-gtfs-map-panel:fullscreen .home-gtfs-map-head h2,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback .home-gtfs-map-head h2 { font-size: 1.15rem; }
:root:root .home-gtfs-map-panel:fullscreen .home-gtfs-map-status,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback .home-gtfs-map-status { margin-top: 2px; font-size: 0.85rem; }
:root:root .home-gtfs-map-panel:fullscreen > .bb-map-toolbar,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback > .bb-map-toolbar {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
:root:root .home-gtfs-map-panel:fullscreen > .home-gtfs-map,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback > .home-gtfs-map {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}
:root:root .home-gtfs-map-panel:fullscreen > .bb-map-find-message,
:root:root .home-gtfs-map-panel:fullscreen > .bb-map-follow,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback > .bb-map-find-message,
:root:root .home-gtfs-map-panel.map-fullscreen-fallback > .bb-map-follow { margin: 0; }
@media (max-width: 680px) {
  :root:root .home-gtfs-map-panel:fullscreen,
  :root:root .home-gtfs-map-panel.map-fullscreen-fallback {
    gap: 10px;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left)) !important;
  }
  :root:root .home-gtfs-map-panel:fullscreen > .home-gtfs-map,
  :root:root .home-gtfs-map-panel.map-fullscreen-fallback > .home-gtfs-map { border-radius: 14px; }
}

/* ==========================================================================
   13. Menu en Instellingen als aparte pagina's, met dezelfde kop als Lijn/Halte
   ========================================================================== */
body[data-page-view="menu"] .bb-settings { display: none; }
body[data-page-view="settings"] #favoritesPanel > :not(.bb-settings) { display: none; }
body[data-page-view="settings"] #favoritesPanel > .bb-settings { margin: 0; padding: 0; border: 0; }

#routePageOutlet #favoritesPanel .more-panel-header.bb-page-head,
#routePageOutlet #favoritesPanel .bb-settings-intro.bb-page-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  min-height: 0;
  margin: 0 0 6px;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
#routePageOutlet #favoritesPanel .bb-page-head > div { flex: 1 1 auto; min-width: 0; }
#routePageOutlet #favoritesPanel .bb-page-head h3,
#routePageOutlet #favoritesPanel .bb-page-head h4 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
#routePageOutlet #favoritesPanel .bb-page-head p { margin: 3px 0 0; color: var(--muted); font-size: 0.92rem; }
.bb-settings-intro.bb-page-head::after { display: none; }
.bb-menu-settings-link .bb-quick-card { width: 100%; }
@media (max-width: 680px) {
  #routePageOutlet #favoritesPanel .bb-page-head h3,
  #routePageOutlet #favoritesPanel .bb-page-head h4 { font-size: 1.2rem; }
}

/* Vensters (foto insturen, voorwaarden, feedback …) dezelfde koptypografie */
:root:root .pdf-modal:not(.app-route-page) .pdf-modal-header h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
:root:root .pdf-modal:not(.app-route-page) .pdf-modal-header .pdf-modal-summary { color: var(--muted); font-size: 0.92rem; }
:root:root .pdf-modal-card { border-radius: 20px; }
body[data-page-view="settings"] #routePageOutlet #favoritesPanel > :not(.bb-settings) { display: none; }
body[data-page-view="menu"] #routePageOutlet #favoritesPanel > .bb-settings { display: none; }
#routePageOutlet #favoritesPanel .more-panel-section-head h4 { font-size: 1rem; font-weight: 700; }

/* ==========================================================================
   14. Alle toestellen: iPhone, Android, Windows, tablet, muis en toetsenbord
   ========================================================================== */
/* iOS zoomt in op velden kleiner dan 16 px: op touchscreens altijd 16 px */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea { font-size: 16px !important; }
}
/* Rustige, dunne schuifbalken (Windows/Linux) in de themakleuren */
html { scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) transparent; scrollbar-width: thin; }
/* Toetsenbord: duidelijke focusring overal in dezelfde stijl */
:root:root :where(button, a, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Sneller tekenen: onderdelen buiten beeld pas renderen als ze nodig zijn */
.bb-footer,
.bb-quick { content-visibility: auto; contain-intrinsic-size: auto 320px; }
/* Tablet: iets ruimer, tabbladen bovenaan blijven */
@media (min-width: 681px) and (max-width: 1024px) {
  :root:root .container { padding-inline: 20px; }
  .bb-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bb-quick-text span { display: none; }
}
/* Landschap op gsm: navigatiebalk compacter */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  :root:root .container > .primary-nav .primary-nav__link { min-height: 40px; flex-direction: row; font-size: 0.75rem; }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
}
/* Eén rustig animatieritme voor pagina's, kaarten en vensters */
#routePageOutlet > :not([hidden]),
.bb-quick-card,
.bb-photo-tool,
.home-favorite-empty { animation: bb-enter 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* ==========================================================================
   15. Vensters: kop met icoon (zelfde stijl als de pagina's) en Site-info
   ========================================================================== */
:root:root .pdf-modal-header.bb-modal-head { justify-content: flex-start; align-items: center; gap: 14px; }
:root:root .pdf-modal-header.bb-modal-head > div { flex: 1 1 auto; min-width: 0; }
.bb-modal-head .bb-page-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 13px; }
:root:root .bb-info-card { width: min(560px, 100%); }
:root:root .bb-info-card .info-modal-body { display: grid; gap: 18px; }
.bb-info-group { display: grid; gap: 8px; }
.bb-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 140ms ease;
}
.bb-info-row + .bb-info-row { border-top: 1px solid var(--line); }
.bb-info-text { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.bb-info-label { color: var(--muted); font-size: 0.8rem; }
.bb-info-value { color: var(--ink); font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.bb-info-arrow { display: grid; color: var(--faint); }
.bb-info-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .bb-info-row.is-link:hover { background: var(--surface-soft); }
  .bb-info-row.is-link:hover .bb-info-arrow { color: var(--accent); }
}
:root:root #resetSiteDataBtn.bb-set-btn--danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); background: transparent; }
:root:root:root[data-color-theme] { --danger: #dc2626; }
:root:root:root[data-color-theme][data-resolved-theme="dark"] { --danger: #f87171; }

/* Kop is op elke pagina even groot. Onder 980 px valt het grafische paneel weg,
   zodat de kop op tablet en gsm compact en rustig blijft. */
@media (max-width: 980px) {
  :root:root .bb-hero .header-side .bb-hero-art { display: none; }
  :root:root .bb-hero .header-side:not(:has(.header-actions *)) { display: none; }
  :root:root .header-bar.bb-hero { grid-template-columns: minmax(0, 1fr); }
}
#routePageOutlet .bb-search-page .pdf-modal-header.bb-page-head { background: none; padding-inline: 0; }
#routePageOutlet .bb-search-page > .pdf-modal-body { padding-inline: 0; }
