:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --blue: #0071e3;
  --gold: #d4af37;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(29, 29, 31, 0.1);
  --shadow: 0 20px 70px rgba(29, 29, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}

html {
  min-height: 100dvh;
}

body {
  min-height: 100dvh;
  min-height: 100svh;
}

body.sheet-open {
  overflow: hidden;
}

body.dialog-open {
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

button,
input {
  font: inherit;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 16%, rgba(0, 113, 227, 0.16), transparent 30%),
    radial-gradient(circle at 82% 82%, rgba(212, 175, 55, 0.16), transparent 28%),
    var(--bg);
}

.public-join-screen,
.public-qr-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 16%, rgba(0, 113, 227, 0.16), transparent 30%),
    radial-gradient(circle at 82% 82%, rgba(212, 175, 55, 0.16), transparent 28%),
    var(--bg);
}

.auth-card,
.public-join-card,
.public-qr-card {
  width: min(430px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.public-join-card h1,
.public-qr-card h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 9vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.public-join-card p,
.public-qr-card p {
  color: var(--muted);
}

.public-qr-card {
  display: grid;
  gap: 12px;
}

.public-qr-plate {
  min-height: 96px;
}

.privacy-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 113, 227, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.public-qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.public-qr-actions button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 900;
}

.public-qr-actions button:disabled {
  opacity: 0.46;
}

.join-limits {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
  font-weight: 900;
  font-size: 13px;
}

.auth-logo {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 20px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: clamp(31px, 8.5vw, 44px);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 18px 0 12px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.auth-tabs button,
.auth-form button,
.logout-button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tabs button {
  color: var(--muted);
  background: transparent;
}

.auth-tabs button.active,
.auth-form button {
  color: #fff;
  background: var(--blue);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.auth-message {
  min-height: 16px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.demo-account-button {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
}

.auth-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  --nav-clearance: 88px;
}

.app-shell[data-active-tab="garage"] .map-stage,
.app-shell[data-active-tab="garage"] .top-bar,
.app-shell[data-active-tab="garage"] .result-panel,
.app-shell[data-active-tab="garage"] .proposal-panel,
.app-shell[data-active-tab="garage"] .group-panel,
.app-shell[data-active-tab="garage"] .action-dock,
.app-shell[data-active-tab="groups"] .map-stage,
.app-shell[data-active-tab="groups"] .top-bar,
.app-shell[data-active-tab="groups"] .result-panel,
.app-shell[data-active-tab="groups"] .proposal-panel,
.app-shell[data-active-tab="groups"] .group-panel,
.app-shell[data-active-tab="groups"] .action-dock,
.app-shell[data-active-tab="messages"] .map-stage,
.app-shell[data-active-tab="messages"] .top-bar,
.app-shell[data-active-tab="messages"] .result-panel,
.app-shell[data-active-tab="messages"] .proposal-panel,
.app-shell[data-active-tab="messages"] .group-panel,
.app-shell[data-active-tab="messages"] .action-dock,
.app-shell[data-active-tab="me"] .map-stage,
.app-shell[data-active-tab="me"] .top-bar,
.app-shell[data-active-tab="me"] .result-panel,
.app-shell[data-active-tab="me"] .proposal-panel,
.app-shell[data-active-tab="me"] .group-panel,
.app-shell[data-active-tab="me"] .action-dock {
  display: none;
}

.map-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(0, 113, 227, 0.18), transparent 28%),
    radial-gradient(circle at 78% 78%, rgba(212, 175, 55, 0.18), transparent 28%),
    linear-gradient(135deg, #f5f5f7 0%, #ffffff 48%, #eaf3ff 100%);
}

.leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #eef4f8;
}

.map-stage.leaflet-ready .map-grid,
.map-stage.leaflet-ready > .route,
.map-stage.leaflet-ready > .leader-line,
.map-stage.leaflet-ready > .map-marker {
  display: none;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
  background: #edf4f8;
}

.leaflet-control-container {
  display: none;
}

.leaflet-tile-pane {
  filter: saturate(0.82) contrast(0.94) brightness(1.05);
}

.leaflet-overlay-pane svg path {
  filter: drop-shadow(0 8px 12px rgba(29, 29, 31, 0.12));
}

.leaflet-fp-icon {
  border: 0;
  background: transparent;
}

.leaflet-fp-marker {
  display: grid;
  grid-template-columns: auto auto;
  gap: 7px;
  align-items: center;
  min-width: 52px;
  min-height: 40px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 32px rgba(29, 29, 31, 0.16);
  backdrop-filter: blur(18px);
}

.leaflet-fp-marker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.leaflet-fp-marker b {
  max-width: 126px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-marker-ink span {
  background: var(--ink);
}

.fp-marker-green span {
  background: #2fd158;
}

.fp-marker-gold span {
  background: var(--gold);
}

.map-grid {
  position: absolute;
  inset: -40px;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(29, 29, 31, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, 0.075) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: rotate(-8deg) scale(1.1);
}

.route {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.32);
  box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.07);
}

.route-primary {
  width: 52vw;
  left: 22vw;
  top: 45vh;
  transform: rotate(-18deg);
}

.route-secondary {
  width: 32vw;
  right: 9vw;
  top: 31vh;
  transform: rotate(34deg);
  background: rgba(212, 175, 55, 0.38);
}

.map-marker {
  position: absolute;
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
  min-width: 54px;
  min-height: 44px;
  padding: 6px 10px 6px 6px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(0, 113, 227, 0.28);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.map-marker span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.map-marker b {
  font-size: 12px;
  white-space: nowrap;
}

.marker-me {
  left: 38vw;
  top: 53vh;
}

.marker-leader {
  left: 57vw;
  top: 43vh;
}

.marker-leader span {
  background: #1d1d1f;
}

.marker-found {
  left: 23vw;
  top: 38vh;
}

.marker-found span {
  background: #2fd158;
}

.marker-spot {
  left: 67vw;
  top: 25vh;
}

.marker-spot span {
  background: var(--gold);
}

.marker-trip {
  left: 34vw;
  top: 60vh;
}

.marker-trip span {
  background: #1d1d1f;
}

.leader-line {
  position: absolute;
  left: 43vw;
  top: 51vh;
  width: 20vw;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(0, 113, 227, 0.9), rgba(0, 113, 227, 0.9) 10px, transparent 10px, transparent 18px);
  transform: rotate(-24deg);
  box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.08);
}

.distance-badge {
  position: absolute;
  left: 50vw;
  top: 47vh;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(29, 29, 31, 0.12);
  backdrop-filter: blur(18px);
}

.top-bar {
  position: fixed;
  left: 24px;
  right: 24px;
  top: calc(18px + env(safe-area-inset-top));
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(280px, 620px);
  gap: 14px 18px;
  align-items: center;
}

.brand,
.search,
.story-strip,
.result-panel,
.proposal-panel,
.group-panel,
.garage-panel,
.app-view,
.interaction-sheet,
.app-nav,
.action-dock {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.brand {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.brand strong {
  font-size: 17px;
}

.brand span,
.eyebrow,
dt,
article span,
.garage-item small {
  color: var(--muted);
  font-size: 12px;
}

.inbox-alert {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto auto;
  padding: 8px;
  border-radius: 22px;
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 17px;
}

.search button,
.action-dock button {
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.search button {
  padding: 0 18px;
}

.search .ai-mic {
  width: 42px;
  padding: 0;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
  font-size: 12px;
}

.story-strip {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 8px;
  border-radius: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.story-strip::before {
  content: "Pojazdy / grupy / wyjazdy";
  flex: 0 0 auto;
  align-self: center;
  max-width: 80px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.story-strip::-webkit-scrollbar {
  display: none;
}

.story {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 76px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.story-photo {
  display: block;
  width: 46px;
  height: 46px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.15);
}

.story.active .story-photo {
  outline: 3px solid var(--blue);
}

.story b {
  max-width: 78px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-bmw {
  background: linear-gradient(135deg, #dbe7f5, #39424e 50%, #f7f9fb);
}

.story-yamaha {
  background: linear-gradient(135deg, #1d1d1f, #0071e3 54%, #d9ecff);
}

.story-team {
  background: linear-gradient(135deg, #0071e3, #93c8ff 48%, #1d1d1f);
}

.story-spot {
  background: linear-gradient(135deg, #d4af37, #fff5c2 48%, #1d1d1f);
}

.story-trip {
  background: linear-gradient(135deg, #e8f2ff, #0071e3 50%, #ffffff);
}

.story-van {
  background: linear-gradient(135deg, #eef4f8, #6e6e73 50%, #ffffff);
}

.story-camper {
  background: linear-gradient(135deg, #d4af37, #ffffff 48%, #0071e3);
}

.story-other {
  background: linear-gradient(135deg, #ffffff, #1d1d1f 55%, #dbe7f5);
}

.result-panel {
  position: fixed;
  left: 24px;
  top: 178px;
  z-index: 2;
  width: min(340px, calc(100vw - 48px));
  padding: 16px;
  border-radius: 22px;
  transition: max-height 180ms ease, transform 180ms ease;
}

.result-toggle {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.result-panel h1,
.group-panel h2 {
  margin: 0;
}

.result-panel h1 {
  font-size: 34px;
  letter-spacing: 0;
}

.result-panel p {
  margin: 8px 0 18px;
  color: var(--muted);
}

.status-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
}

.plate-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.plate-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.result-panel.expanded {
  width: min(390px, calc(100vw - 48px));
}

.plate-actions button:nth-child(2) {
  color: #8a5f00;
  background: rgba(212, 175, 55, 0.16);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.22);
}

.mock-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2fd158;
  box-shadow: 0 0 0 6px rgba(47, 209, 88, 0.12);
}

.proposal-panel,
.group-panel,
.garage-panel {
  position: fixed;
  right: 24px;
  z-index: 2;
  width: min(380px, calc(100vw - 48px));
  padding: 18px;
  border-radius: 24px;
}

.proposal-panel {
  top: 178px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

article {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

article b,
article span {
  display: block;
}

article b {
  margin-bottom: 4px;
}

.group-panel {
  bottom: 112px;
  padding: 16px;
}

.active-trip-card {
  position: fixed;
  left: 24px;
  bottom: 244px;
  z-index: 3;
  display: grid;
  gap: 5px;
  width: min(300px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.active-trip-card span:last-of-type {
  color: var(--muted);
  font-size: 12px;
}

.active-trip-card button {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.group-panel h2 {
  font-size: 22px;
}

.follow-badge {
  display: none;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.group-panel.follow-active .follow-badge {
  display: inline-flex;
}

.group-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

dl {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.garage-panel {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 10;
  width: min(520px, calc(100vw - 24px));
  max-height: min(56vh, 430px);
  padding: 10px 18px 20px;
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  transform: translate(-50%, calc(100% - 26px));
  transition: transform 180ms ease;
}

.garage-panel.open {
  transform: translate(-50%, 0);
}

.app-view {
  position: fixed;
  inset: 14px auto 88px 50%;
  z-index: 3;
  width: min(1040px, calc(100vw - 28px));
  overflow-y: auto;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px;
  transform: translateX(-50%);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.garage-view {
  --garage-accent: var(--blue);
  --garage-cover-a: rgba(0, 113, 227, 0.24);
  --garage-cover-b: rgba(212, 175, 55, 0.2);
  background:
    radial-gradient(circle at 18% 12%, var(--garage-cover-a), transparent 34%),
    radial-gradient(circle at 88% 28%, var(--garage-cover-b), transparent 32%),
    var(--panel);
}

.garage-hero {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 210px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    radial-gradient(circle at 18% 18%, var(--garage-cover-a), transparent 42%),
    radial-gradient(circle at 78% 62%, var(--garage-cover-b), transparent 40%);
}

.garage-cover-art {
  position: absolute;
  inset: auto -40px -68px auto;
  width: 240px;
  height: 150px;
  border-radius: 50% 50% 16px 16px;
  background: linear-gradient(135deg, rgba(29, 29, 31, 0.88), var(--garage-accent));
  opacity: 0.18;
  transform: rotate(-8deg);
}

.garage-cover-art span {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: -18px;
  height: 42px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.8);
}

.owner-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.owner-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--garage-accent));
  font-weight: 900;
}

.owner-row h1 {
  margin: 0;
  font-size: clamp(36px, 11vw, 62px);
  line-height: 0.95;
  letter-spacing: 0;
}

.owner-row p,
.hero-active span {
  margin: 4px 0 0;
  color: var(--muted);
}

.hero-active {
  position: relative;
  display: grid;
  gap: 3px;
}

.hero-active strong {
  font-size: 18px;
}

.garage-badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.garage-badges b {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.garage-customizer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.garage-customizer > div {
  min-width: 0;
}

.skin-picker,
.style-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.skin-picker::-webkit-scrollbar,
.style-picker::-webkit-scrollbar {
  display: none;
}

.skin-picker button,
.style-picker button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.skin-picker button.active,
.style-picker button.active {
  color: #fff;
  background: var(--garage-accent);
}

.garage-view[data-garage-skin="night-drive"] {
  --garage-accent: #1d1d1f;
  --garage-cover-a: rgba(29, 29, 31, 0.24);
  --garage-cover-b: rgba(0, 113, 227, 0.18);
}

.garage-view[data-garage-skin="moto-road"] {
  --garage-accent: #0071e3;
  --garage-cover-a: rgba(0, 113, 227, 0.32);
  --garage-cover-b: rgba(29, 29, 31, 0.18);
}

.garage-view[data-garage-skin="roadtalk-truck"] {
  --garage-accent: #d4af37;
  --garage-cover-a: rgba(212, 175, 55, 0.3);
  --garage-cover-b: rgba(29, 29, 31, 0.22);
}

.garage-view[data-garage-skin="social-color"] {
  --garage-accent: #8b5cf6;
  --garage-cover-a: rgba(139, 92, 246, 0.26);
  --garage-cover-b: rgba(0, 113, 227, 0.22);
}

.garage-view[data-profile-style="feminine"] .owner-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #8b5cf6);
}

.garage-view[data-profile-style="masculine"] .owner-avatar {
  border-radius: 14px;
  background: linear-gradient(135deg, #1d1d1f, #0071e3);
}

.garage-view[data-profile-style="custom"] .owner-avatar {
  background: linear-gradient(135deg, #0071e3, #d4af37 48%, #1d1d1f);
}

.view-header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.view-header h1,
.placeholder-view h1,
.vehicle-profile-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.view-header h1,
.placeholder-view h1 {
  font-size: clamp(30px, 9vw, 46px);
}

.garage-view-section,
.vehicle-profile-card,
.garage-tabs-preview,
.reels-section,
.garage-social-grid {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.garage-view-list {
  display: grid;
  gap: 10px;
}

.garage-vehicle-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.garage-vehicle-card.featured {
  background: rgba(0, 113, 227, 0.08);
}

.garage-vehicle-card b,
.garage-vehicle-card small {
  display: block;
}

.garage-vehicle-card small {
  color: var(--muted);
  font-size: 12px;
}

.vehicle-card-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.vehicle-card-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.vehicle-card-actions button:disabled {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
}

.vehicle-profile-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.profile-plate {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.profile-specs {
  margin-top: 12px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(29, 29, 31, 0.18) 50%, transparent 50%),
    linear-gradient(rgba(29, 29, 31, 0.18) 50%, transparent 50%),
    #fff;
  background-size: 18px 18px;
  color: var(--ink);
  font-weight: 900;
}

.vehicle-qr-box {
  display: grid;
  gap: 10px;
  align-content: start;
}

.vehicle-qr-box span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qr-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-qr-box button,
.privacy-toggle-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 900;
}

.qr-code-box svg,
.sticker-qr svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.privacy-controls {
  display: grid;
  gap: 10px;
}

.privacy-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-toggle-row button.active {
  border-color: rgba(0, 113, 227, 0.28);
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
}

.garage-tabs-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.garage-tabs-preview article,
.reel-grid article,
.garage-social-grid article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.reel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: 10px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 10px, transparent 11px),
    linear-gradient(135deg, rgba(0, 113, 227, 0.35), rgba(212, 175, 55, 0.32));
}

.video-thumb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid rgba(29, 29, 31, 0.82);
  transform: translate(-38%, -50%);
}

.garage-social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.garage-social-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.placeholder-view {
  display: grid;
  align-content: start;
  gap: 10px;
}

.placeholder-view p {
  max-width: 520px;
  color: var(--muted);
}

.messages-view {
  display: grid;
  gap: 14px;
  align-content: start;
}

.me-view {
  display: grid;
  gap: 14px;
  align-content: start;
}

.me-view .view-header p {
  margin: 0;
  color: var(--muted);
}

.me-profile-card,
.me-settings-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
}

.me-profile-card {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.me-profile-card h2 {
  margin: 2px 0;
  font-size: 28px;
  letter-spacing: 0;
}

.me-profile-card p,
.me-settings-card p {
  margin: 0;
  color: var(--muted);
}

.me-settings-card strong {
  display: block;
  margin: 4px 0;
  font-size: 19px;
}

.me-settings-card button,
.me-logout {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.messages-view .view-header p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
}

.message-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.message-list {
  display: grid;
  gap: 10px;
}

.message-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.message-card.new {
  border-color: rgba(0, 113, 227, 0.24);
  box-shadow: 0 18px 46px rgba(0, 113, 227, 0.1);
}

.message-card h2 {
  margin: 4px 0;
  font-size: 20px;
  letter-spacing: 0;
}

.message-card p {
  margin: 0;
  color: var(--muted);
}

.message-meta,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.message-meta b {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.08);
  font-size: 12px;
}

.message-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 900;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.trips-view {
  display: grid;
  gap: 14px;
  align-content: start;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 113, 227, 0.16), transparent 34%),
    radial-gradient(circle at 90% 28%, rgba(212, 175, 55, 0.16), transparent 32%),
    var(--panel);
}

.trips-view .view-header p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
}

.family-trip-hero {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 18%, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(0, 113, 227, 0.08));
}

.group-social-hero,
.group-panel-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 18px 46px rgba(29, 29, 31, 0.08);
}

.group-social-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(0, 113, 227, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.68);
}

.group-social-hero h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.group-social-hero p {
  margin: 0;
  color: var(--muted);
}

.group-social-hero button,
.group-card,
.group-trip-form button {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
}

.group-social-hero button {
  width: fit-content;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
}

.group-list,
.group-detail-grid {
  display: grid;
  gap: 10px;
}

.group-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.group-card.active {
  color: #fff;
  background: var(--ink);
}

.group-card small,
.group-card em {
  display: block;
  color: inherit;
  opacity: .72;
  font-size: 12px;
  font-style: normal;
}

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

.group-detail-grid section {
  min-width: 0;
}

.ride-action-row {
  display: flex;
  justify-content: flex-start;
}

.ride-action-row button {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.home-proposal-list {
  display: grid;
  gap: 8px;
}

.home-proposal-card {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.home-proposal-card b {
  font-size: 13px;
  line-height: 1.2;
}

.home-proposal-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.location-cta {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.ride-filter-stack {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.ride-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ride-filter-row::-webkit-scrollbar {
  display: none;
}

.ride-filter-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.ride-filter-row button.active {
  color: #fff;
  border-color: transparent;
  background: var(--blue);
}

.ride-proposal-list {
  display: grid;
  gap: 10px;
}

.ride-proposal-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.ride-proposal-card span,
.ride-proposal-card small {
  color: var(--muted);
  font-size: 12px;
}

.ride-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ride-card-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 900;
}

.ride-card-actions button:first-child {
  color: #fff;
  background: var(--ink);
}

.family-trip-hero h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.family-trip-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.family-trip-hero button,
.trip-card-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.trip-create-panel,
.invite-card,
.guest-pass-panel,
.trip-list-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
}

.trip-form {
  display: grid;
  gap: 10px;
}

.trip-form label {
  display: grid;
  gap: 5px;
}

.trip-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trip-form input,
.invite-link-row input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.trip-form button,
.invite-link-row button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.trip-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trip-toggle {
  align-content: end;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 42px;
}

.trip-toggle input {
  min-height: auto;
}

.trip-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.invite-card h2 {
  margin: 0;
}

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

.invite-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.trip-qr {
  margin: 10px 0;
}

.trip-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.premium-upsell {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(212, 175, 55, 0.16);
}

.premium-upsell span {
  color: var(--muted);
  font-size: 13px;
}

.trip-list {
  display: grid;
  gap: 8px;
}

.trip-list article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.interaction-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 13;
  width: min(520px, calc(100vw - 24px));
  max-height: min(560px, calc(100dvh - 128px));
  overflow-y: auto;
  padding: 10px 18px 22px;
  border-radius: 28px;
  transform: translate(-50%, 105%);
  transition: transform 180ms ease;
}

.interaction-sheet.open {
  transform: translate(-50%, 0);
}

.interaction-sheet h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.interaction-sheet p {
  margin: -4px 0 16px;
  color: var(--muted);
}

.sticker-sheet {
  width: min(560px, calc(100vw - 24px));
}

.sticker-preview {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 6px auto 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.sticker-brand {
  justify-self: start;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.sticker-preview h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.sticker-preview p {
  max-width: 360px;
  margin: 0;
}

.sticker-qr {
  display: grid;
  place-items: center;
  width: 188px;
  height: 188px;
  margin: 6px 0;
}

.sticker-preview strong {
  font-size: 22px;
}

.sticker-preview small {
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.media-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.media-tabs article {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.media-tabs b {
  margin-top: 8px;
}

.category-grid {
  display: grid;
  gap: 8px;
}

.category-grid button,
.call-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  font-weight: 800;
  cursor: pointer;
}

.call-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.call-actions button:last-child {
  color: #fff;
  background: var(--blue);
}

.sheet-handle {
  display: block;
  width: 48px;
  height: 5px;
  margin: 0 auto 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.22);
  cursor: pointer;
}

.garage-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.garage-item b,
.garage-item small {
  grid-column: 2;
}

.garage-item button {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.garage-item button:disabled {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
  cursor: default;
}

.garage-dot {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.garage-item.active b {
  color: var(--blue);
}

.logout-button {
  width: 100%;
  margin-top: 12px;
  color: var(--ink);
  background: rgba(29, 29, 31, 0.08);
}

.add-vehicle-toggle {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
  font-weight: 900;
  cursor: pointer;
}

.vehicle-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.vehicle-form label {
  display: grid;
  gap: 5px;
}

.vehicle-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-form input,
.vehicle-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.vehicle-form button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.garage-bmw {
  background: #9fb4c9;
}

.garage-yamaha {
  background: var(--blue);
}

.garage-scania {
  background: var(--gold);
}

.garage-van {
  background: #6e6e73;
}

.garage-camper {
  background: linear-gradient(135deg, var(--gold), var(--blue));
}

.garage-other {
  background: #1d1d1f;
}

.action-dock {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  width: min(920px, calc(100vw - 48px));
  padding: 10px;
  border-radius: 24px;
  transform: translateX(-50%);
}

.app-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(620px, calc(100vw - 28px));
  padding: 8px;
  border-radius: 24px;
  transform: translateX(-50%);
}

.app-nav button {
  position: relative;
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.app-nav button.active {
  color: #fff;
  background: var(--ink);
}

.nav-badge {
  position: absolute;
  top: 3px;
  right: 6px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.action-dock button {
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.action-dock button:first-child {
  color: #fff;
  background: var(--blue);
}

.action-dock button.active {
  color: #fff;
  background: #1d1d1f;
}

@media (max-width: 860px) {
  .top-bar {
    grid-template-columns: 1fr;
    left: 14px;
    right: 14px;
  }

  .brand {
    display: grid;
    order: 1;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .search {
    order: 2;
  }

  .story-strip {
    order: 4;
  }

  .inbox-alert {
    order: 3;
  }

  .result-panel {
    left: 14px;
    top: 210px;
    width: min(315px, calc(100vw - 28px));
    padding: 15px;
  }

  .result-panel h1 {
    font-size: 28px;
  }

  .result-panel p {
    margin-bottom: 12px;
  }

  .plate-actions button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
  }

  .proposal-panel {
    display: none;
  }

  .group-panel {
    left: 14px;
    right: auto;
    bottom: 126px;
    width: min(330px, calc(100vw - 28px));
  }

  .active-trip-card {
    left: 14px;
    bottom: 344px;
    width: min(330px, calc(100vw - 28px));
  }

  .garage-panel {
    width: calc(100vw - 18px);
  }

  .interaction-sheet {
    width: calc(100vw - 18px);
  }

  .action-dock {
    grid-template-columns: 1fr 1fr;
    width: calc(100vw - 28px);
    bottom: 78px;
  }

  .app-view {
    inset: 10px 10px 78px;
    width: auto;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
    transform: none;
  }

  .garage-hero {
    min-height: 172px;
    padding: 14px;
  }

  .owner-row h1 {
    font-size: 36px;
  }

  .garage-cover-art {
    width: 180px;
    height: 118px;
  }

  .vehicle-card-actions {
    grid-template-columns: 1fr 1fr;
  }

  .reel-grid {
    grid-template-columns: 1fr;
  }

  .garage-social-grid {
    grid-template-columns: 1fr;
  }

  .trip-form-grid,
  .invite-link-row,
  .trip-card-actions {
    grid-template-columns: 1fr;
  }

  .garage-tabs-preview {
    grid-template-columns: repeat(5, minmax(128px, 1fr));
  }

  .map-marker b {
    display: none;
  }

  .map-marker {
    min-width: 44px;
    padding: 6px;
  }

  .marker-found {
    left: 9vw;
    top: 48vh;
  }

  .marker-me {
    left: 39vw;
    top: 58vh;
  }

  .marker-leader {
    left: 62vw;
    top: 50vh;
  }

  .marker-spot {
    left: 74vw;
    top: 35vh;
  }

  .marker-trip {
    left: 28vw;
    top: 69vh;
  }

  .leader-line {
    left: 47vw;
    top: 56vh;
    width: 24vw;
  }

  .distance-badge {
    left: 54vw;
    top: 53vh;
  }
}

@media (max-width: 430px) {
  .top-bar {
    top: 10px;
    gap: 9px;
  }

  .brand {
    padding: 10px 12px;
  }

  .search {
    padding: 6px;
  }

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

  .search button {
    padding: 0 12px;
  }

  .search .ai-mic {
    width: 38px;
  }

  .story-strip {
    padding: 7px;
  }

  .story {
    min-width: 68px;
  }

  .story-photo {
    width: 40px;
    height: 40px;
  }

  .story b {
    max-width: 68px;
    font-size: 11px;
  }

  .result-panel {
    top: 214px;
  }

  .result-panel.expanded {
    width: calc(100vw - 28px);
  }

  .status-row {
    font-size: 12px;
  }

  .group-panel {
    bottom: 134px;
  }

  .group-panel h2 {
    font-size: 20px;
  }

  .action-dock button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .app-nav button {
    min-height: 38px;
    font-size: 11px;
  }

  .profile-plate {
    min-height: 70px;
    font-size: 30px;
  }
}

@media (max-width: 430px) {
  html,
  body,
  .app-shell {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
  }

  .map-stage {
    position: fixed;
    inset: 0;
    min-height: 100svh;
  }

  .top-bar {
    left: 10px;
    right: 10px;
    top: 0;
    z-index: 6;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr);
    padding-top: calc(env(safe-area-inset-top) + 12px);
  }

  .brand {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand span {
    font-size: 11px;
  }

  .search {
    grid-template-columns: minmax(0, 1fr) 34px minmax(58px, auto);
    min-height: 42px;
    padding: 5px;
    border-radius: 17px;
  }

  .search input {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 15px;
  }

  .search button {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
  }

  .search .ai-mic {
    width: 34px;
  }

  .inbox-alert {
    display: none;
  }

  .story-strip {
    max-height: 86px;
    padding: 6px;
    gap: 6px;
    border-radius: 18px;
  }

  .story-strip::before {
    max-width: 58px;
    font-size: 9px;
    line-height: 1;
  }

  .story {
    min-width: 58px;
    gap: 3px;
  }

  .story-photo {
    width: 34px;
    height: 34px;
    border-width: 2px;
  }

  .story.active .story-photo {
    outline-width: 2px;
  }

  .story b {
    max-width: 58px;
    font-size: 10px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .result-panel {
    left: 10px;
    top: calc(174px + env(safe-area-inset-top));
    z-index: 4;
    width: min(270px, calc(100vw - 20px));
    max-height: 132px;
    overflow: hidden;
    padding: 10px;
    border-radius: 18px;
  }

  .result-panel.expanded {
    width: calc(100vw - 20px);
    max-height: min(330px, calc(100dvh - 230px));
    overflow-y: auto;
  }

  .result-toggle {
    margin-bottom: 3px;
    font-size: 9px;
    letter-spacing: .06em;
  }

  .result-panel h1 {
    overflow: visible;
    font-size: 24px;
    line-height: 1;
    white-space: nowrap;
  }

  .result-panel p {
    margin: 4px 0 8px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-panel:not(.expanded) .status-row,
  .result-panel:not(.expanded) .mock-message {
    display: none;
  }

  .plate-actions {
    gap: 5px;
    margin-top: 8px;
  }

  .plate-actions button {
    min-height: 30px;
    border-radius: 11px;
    padding: 0 4px;
    font-size: 11px;
  }

  .proposal-panel {
    display: block;
    left: 10px;
    right: 10px;
    top: calc(312px + env(safe-area-inset-top));
    z-index: 3;
    width: auto;
    min-width: 0;
    padding: 9px;
    border-radius: 17px;
  }

  .proposal-panel .panel-heading {
    display: grid;
    gap: 2px;
    margin-bottom: 6px;
  }

  .proposal-panel .eyebrow {
    margin-bottom: 0;
    font-size: 8px;
    letter-spacing: .04em;
  }

  .proposal-panel .panel-heading strong {
    font-size: 10px;
  }

  .home-proposal-list {
    gap: 5px;
  }

  .home-proposal-card {
    padding: 7px;
    border-radius: 12px;
  }

  .home-proposal-card:nth-child(n+3) {
    display: none;
  }

  .home-proposal-card b {
    font-size: 10px;
  }

  .home-proposal-card span {
    font-size: 9px;
  }

  .location-cta {
    min-height: 30px;
    margin-top: 4px;
    font-size: 10px;
  }

  .group-panel {
    left: 10px;
    right: 10px;
    bottom: calc(176px + env(safe-area-inset-bottom));
    z-index: 3;
    width: auto;
    padding: 10px;
    border-radius: 18px;
  }

  .group-panel .eyebrow,
  .group-panel p,
  .group-panel dl div:nth-child(n+3),
  .group-panel dt {
    display: none;
  }

  .group-panel h2 {
    font-size: 16px;
    line-height: 1.1;
  }

  .group-panel dl {
    gap: 4px;
    margin-top: 6px;
  }

  .group-panel dl div {
    display: inline-flex;
    justify-content: flex-start;
    gap: 4px;
    padding-top: 0;
    border-top: 0;
    color: var(--muted);
    font-size: 12px;
  }

  .group-panel dl div:nth-child(2)::after {
    content: " · Cel: Wisła";
  }

  .group-panel dd {
    text-align: left;
  }

  .follow-badge {
    margin-top: 7px;
    padding: 5px 8px;
    font-size: 10px;
  }

  .active-trip-card {
    display: none;
  }

  .action-dock {
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 86px);
    z-index: 5;
    grid-template-columns: 1fr 1fr;
    width: auto;
    gap: 6px;
    padding: 7px;
    border-radius: 18px;
    transform: none;
  }

  .action-dock button {
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.05;
  }

  .app-nav {
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 8px);
    width: auto;
    gap: 3px;
    padding: 6px 5px;
    border-radius: 18px;
    transform: none;
  }

  .app-nav button {
    min-height: 34px;
    border-radius: 11px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .nav-badge {
    top: 1px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    font-size: 9px;
  }

  .garage-panel {
    bottom: calc(70px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    max-height: min(62dvh, 460px);
    border-radius: 24px;
    transform: translate(-50%, calc(100% + 96px));
  }

  .garage-panel.open {
    transform: translate(-50%, 0);
  }

  .interaction-sheet {
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    max-height: min(58dvh, 430px);
    padding: 8px 14px 16px;
    border-radius: 24px;
    transform: translate(-50%, calc(100% + 96px));
  }

  .interaction-sheet.open {
    transform: translate(-50%, 0);
  }

  .sticker-sheet {
    max-height: min(70dvh, 560px);
  }

  .sticker-preview {
    padding: 16px;
    border-radius: 22px;
  }

  .media-tabs {
    grid-template-columns: 1fr;
  }

  .group-detail-grid {
    grid-template-columns: 1fr;
  }

  .group-social-hero h2 {
    font-size: 24px;
  }
}

@media (max-width: 430px) and (max-height: 780px) {
  .top-bar {
    gap: 5px;
  }

  .brand {
    min-height: 38px;
    padding: 7px 10px;
  }

  .search {
    min-height: 38px;
  }

  .story-strip {
    max-height: 74px;
  }

  .story-strip::before {
    display: none;
  }

  .story {
    min-width: 52px;
  }

  .story-photo {
    width: 30px;
    height: 30px;
  }

  .story b {
    max-width: 52px;
    font-size: 9px;
  }

  .result-panel {
    top: calc(152px + env(safe-area-inset-top));
    max-height: 118px;
  }

  .result-panel h1 {
    font-size: 22px;
  }

  .result-panel p {
    font-size: 11px;
  }

  .plate-actions button {
    min-height: 28px;
    font-size: 10px;
  }

  .group-panel {
    bottom: calc(152px + env(safe-area-inset-bottom));
  }

  .proposal-panel {
    top: calc(276px + env(safe-area-inset-top));
    max-height: 110px;
    overflow: hidden;
  }

  .action-dock {
    bottom: calc(env(safe-area-inset-bottom) + 82px);
  }

  .action-dock button {
    min-height: 32px;
    font-size: 10px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  #sticker-preview,
  #sticker-preview * {
    visibility: visible;
  }

  #sticker-preview {
    position: fixed;
    inset: 20px auto auto 50%;
    width: 520px;
    transform: translateX(-50%);
    box-shadow: none;
  }
}
