:root {
  --blue: #0754d8;
  --blue-dark: #002d82;
  --blue-soft: #d9e8ff;
  --yellow: #ffd43b;
  --ink: #07142f;
  --white: #ffffff;
  --paper: #f6f8fc;
  --muted: #667085;
  --line: #0b1833;
  --shadow: 5px 5px 0 var(--line);
  --shadow-small: 3px 3px 0 var(--line);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--blue-dark);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #e6efff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 212, 59, 0.75) 0 5px, transparent 6px),
    radial-gradient(circle at 86% 78%, rgba(7, 84, 216, 0.3) 0 5px, transparent 6px);
  background-size: 34px 34px, 42px 42px;
  opacity: 0.45;
}

.app-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 44px rgba(0, 45, 130, 0.18);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: max(12px, env(safe-area-inset-top)) 20px 10px;
  border-bottom: 3px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  line-height: 0.85;
}

.brand strong {
  display: block;
  color: var(--blue);
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.brand small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--blue);
  transform: rotate(-3deg);
}

.brand-mark span {
  position: absolute;
  width: 21px;
  height: 7px;
  border: 2px solid var(--line);
  background: var(--white);
}

.brand-mark span + span {
  transform: rotate(90deg);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-small);
  cursor: pointer;
}

.icon-button:active {
  box-shadow: none;
  transform: translate(3px, 3px);
}

.icon-button svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

main {
  padding-bottom: 30px;
}

.intro {
  position: relative;
  padding: 17px 20px 35px;
  border-bottom: 3px solid var(--line);
  color: var(--white);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    var(--blue);
  background-size: 28px 28px;
}

.intro::after {
  display: none;
}

.scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  padding: 8px 11px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--line);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #1cc45c;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 5px rgba(28, 196, 92, 0.24); }
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.intro .eyebrow {
  color: var(--yellow);
}

.intro h1 {
  max-width: 360px;
  margin: 0;
  font-size: clamp(31px, 9vw, 42px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 1;
  text-transform: uppercase;
}

.intro-copy {
  max-width: 300px;
  margin: 17px 0 0;
  color: #d9e8ff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.route-card {
  position: relative;
  z-index: 2;
  margin: -16px 20px 0;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.route-fields {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 11px;
}

.location-field {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 10px 50px 10px 12px;
  border: 0;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.field-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.field-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}

.field-icon--start {
  color: var(--white);
  background: var(--blue);
}

.field-icon--start svg circle {
  fill: var(--white);
}

.field-icon--destination {
  background: var(--yellow);
}

.field-copy {
  min-width: 0;
  flex: 1;
}

.field-copy > span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.field-copy strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-copy .placeholder {
  color: #8c95a7;
  font-weight: 700;
}

.chevron {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.route-divider {
  position: relative;
  height: 2px;
  margin-left: 60px;
  background: var(--line);
}

.route-divider span {
  position: absolute;
  left: -44px;
  top: -8px;
  width: 2px;
  height: 18px;
  background: var(--line);
}

.swap-button {
  position: absolute;
  z-index: 2;
  right: 21px;
  top: 58px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--white);
  background: var(--blue-dark);
  cursor: pointer;
  transform: rotate(90deg);
}

.swap-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding: 13px 16px;
  border: 3px solid var(--line);
  border-radius: 9px;
  color: var(--white);
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--line);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.primary-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.primary-button:active:not(:disabled) {
  box-shadow: none;
  transform: translate(3px, 3px);
}

.primary-button:disabled {
  color: #858d9c;
  background: #d9dde5;
  box-shadow: none;
  cursor: not-allowed;
}

.quick-section,
.map-section {
  padding: 27px 20px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.section-kicker {
  color: var(--blue);
}

.section-heading h2,
.journey-card h2,
.dialog-heading h2,
.help-dialog h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1;
}

.text-button {
  padding: 7px 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

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

.quick-item {
  min-width: 0;
  min-height: 108px;
  padding: 11px 9px;
  border: 2px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-small);
  text-align: left;
  cursor: pointer;
}

.quick-item:nth-child(2) {
  background: var(--yellow);
}

.quick-item:nth-child(3) {
  color: var(--white);
  background: var(--blue);
}

.quick-item:active {
  box-shadow: none;
  transform: translate(3px, 3px);
}

.quick-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 8px;
  font-size: 19px;
  font-weight: 900;
}

.quick-item strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.quick-item small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  font-weight: 800;
  opacity: 0.7;
}

.map-controls {
  display: flex;
  gap: 6px;
}

.map-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--line);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.map-frame {
  position: relative;
  height: min(70vh, 530px);
  min-height: 410px;
  overflow: auto;
  border: 3px solid var(--line);
  border-radius: 13px;
  background: #b9d5a2;
  box-shadow: var(--shadow);
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  transition: box-shadow 180ms ease;
}

.map-frame.route-focused {
  box-shadow: 7px 7px 0 var(--yellow), 10px 10px 0 var(--line);
}

.map-frame::-webkit-scrollbar {
  display: none;
}

.map-canvas {
  position: relative;
  width: 100%;
  transform-origin: 50% 50%;
  transition: width 180ms ease;
}

.map-canvas.is-pinching {
  transition: none;
}

.map-canvas img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.route-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.route-shadow,
.route-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.route-shadow {
  stroke: var(--white);
  stroke-width: 7;
}

.route-path {
  stroke: var(--blue);
  stroke-width: 4;
  stroke-dasharray: 7 6;
  filter: drop-shadow(1px 1px 0 var(--line));
  animation: route-flow 900ms linear infinite;
}

@keyframes route-flow {
  to { stroke-dashoffset: -13; }
}

.route-marker circle:first-child {
  fill: var(--white);
  stroke: var(--line);
  stroke-width: 0.45;
}

.route-marker circle:last-child {
  stroke: var(--line);
  stroke-width: 0.28;
}

.route-marker--start circle:last-child { fill: var(--blue); }
.route-marker--destination circle:last-child { fill: var(--yellow); }

.map-placeholder {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: flex;
  width: 215px;
  align-items: center;
  flex-direction: column;
  padding: 15px;
  border: 3px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%) rotate(-2deg);
}

.map-placeholder[hidden] { display: none; }

.placeholder-arrow {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 9px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.map-placeholder strong { font-size: 14px; }
.map-placeholder span:last-child { margin-top: 3px; color: var(--muted); font-size: 11px; }

.map-legend {
  position: sticky;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  display: flex;
  width: max-content;
  gap: 12px;
  margin: -42px 0 10px 10px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 8px;
  font-weight: 900;
}

.map-legend span { display: flex; align-items: center; gap: 5px; }
.map-legend i { width: 10px; height: 10px; border: 1px solid var(--line); border-radius: 50%; }
.map-legend .pinch-hint { color: var(--blue-dark); }
.legend-start { background: var(--blue); }
.legend-destination { background: var(--yellow); }

.journey-card {
  margin: 28px 20px 0;
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.journey-card[hidden] { display: none; }

.journey-topline {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.journey-topline span {
  padding: 6px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--blue-soft);
  font-size: 9px;
  font-weight: 900;
}

.journey-topline span:last-child { background: var(--yellow); }

.directions {
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.directions li {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: flex-start;
  gap: 11px;
  padding-bottom: 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.directions li:not(:last-child)::after {
  position: absolute;
  left: 15px;
  top: 31px;
  width: 2px;
  height: calc(100% - 28px);
  background: var(--line);
  content: "";
}

.directions b {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--yellow);
}

.directions span { padding-top: 6px; }

.primary-button--yellow {
  color: var(--ink);
  background: var(--yellow);
}

.info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 20px 12px;
  padding: 14px;
  border: 2px dashed var(--blue);
  border-radius: 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.info-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-weight: 950;
}

.info-banner p { margin: 0; font-size: 11px; line-height: 1.4; }

.bottom-nav {
  position: fixed;
  z-index: 25;
  right: max(0px, calc((100vw - 520px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 520px) / 2));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 72px;
  padding: 7px 12px max(7px, env(safe-area-inset-bottom));
  border-top: 3px solid var(--line);
  background: var(--white);
}

.bottom-nav a,
.bottom-nav button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  color: #697386;
  background: transparent;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.bottom-nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.bottom-nav .active { color: var(--blue); }

dialog {
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(0, 20, 55, 0.7);
  backdrop-filter: blur(3px);
}

.picker-dialog {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 520px);
  max-width: none;
  max-height: min(88dvh, 760px);
  margin: 0 auto;
  padding: 10px 18px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  border: 3px solid var(--line);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--paper);
}

.picker-dialog[open] { animation: sheet-in 220ms ease-out; }

@keyframes sheet-in {
  from { transform: translateY(100%); }
}

.dialog-handle {
  width: 50px;
  height: 5px;
  margin: 0 auto 15px;
  border-radius: 99px;
  background: var(--ink);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dialog-heading .icon-button,
.help-dialog > .icon-button {
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}

.search-box {
  display: flex;
  height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow-small);
}

.search-box svg {
  width: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-width: 2.5;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.category-chips {
  display: flex;
  gap: 7px;
  margin: 17px -18px 12px;
  padding: 0 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.category-chip.active {
  color: var(--white);
  background: var(--blue);
}

.location-list {
  max-height: calc(88dvh - 235px);
  padding: 2px 3px 12px;
  overflow-y: auto;
}

.location-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.location-option:hover,
.location-option.selected { background: var(--blue-soft); }

.location-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.location-option strong { display: block; font-size: 13px; }
.location-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; }
.location-option > span:nth-child(2) { min-width: 0; flex: 1; }
.location-arrow { color: var(--blue); font-size: 19px; font-weight: 900; }

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.help-dialog {
  width: min(calc(100% - 34px), 430px);
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--yellow);
}

.help-dialog > .icon-button {
  position: absolute;
  right: 14px;
  top: 14px;
}

.help-illustration {
  position: relative;
  height: 120px;
  margin: -2px 0 20px;
}

.phone-shape {
  position: absolute;
  left: 50%;
  top: 3px;
  display: block;
  width: 67px;
  height: 111px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--blue);
  box-shadow: 5px 5px 0 var(--line);
  transform: translateX(-65%) rotate(-6deg);
}

.phone-shape i {
  position: absolute;
  inset: 13px 7px 9px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--white);
}

.qr-shape {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 35px;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border: 3px solid var(--line);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--line);
  font-size: 39px;
  font-weight: 950;
  transform: translateX(2%) rotate(5deg);
}

.help-dialog h2 { margin-bottom: 18px; font-size: 30px; }

.help-dialog ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-dialog li {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 9px 0;
  font-size: 12px;
  font-weight: 700;
}

.help-dialog li b {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--blue-soft);
}

.qr-dialog {
  width: min(calc(100% - 26px), 500px);
  max-height: 90dvh;
  padding: 20px;
  overflow: auto;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--yellow);
}

.qr-dialog .dialog-heading {
  margin-bottom: 12px;
}

.qr-dialog-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.qr-url-field {
  display: block;
}

.qr-url-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.qr-url-field input {
  width: 100%;
  height: 48px;
  padding: 0 11px;
  border: 3px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-small);
  font-size: 12px;
  font-weight: 750;
}

.qr-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 16px;
}

.qr-config-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}

.qr-config-row small.error {
  color: #bd1e1e;
}

.secondary-button {
  flex: 0 0 auto;
  padding: 9px 11px;
  border: 2px solid var(--line);
  border-radius: 7px;
  color: var(--white);
  background: var(--blue-dark);
  box-shadow: 2px 2px 0 var(--line);
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
}

.qr-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 330px;
  padding: 3px;
  overflow-y: auto;
}

.qr-card,
.print-qr-card {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}

.qr-card {
  padding: 9px;
}

.qr-card svg {
  display: block;
  width: min(100%, 130px);
  height: auto;
  margin: 0 auto 8px;
}

.qr-card-copy strong,
.print-qr-card strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-card-copy span,
.print-qr-card .qr-point-number {
  display: block;
  margin-bottom: 2px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.qr-card-copy small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-card-print {
  width: 100%;
  margin-top: 8px;
  padding: 8px 6px;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--line);
  font-size: 8px;
  font-weight: 950;
  cursor: pointer;
}

.qr-card-print:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.print-sheet {
  display: none;
}

.navigation-toast {
  position: fixed;
  z-index: 50;
  right: max(16px, calc((100vw - 488px) / 2));
  bottom: 18px;
  left: max(16px, calc((100vw - 488px) / 2));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 12px;
  color: var(--white);
  background: var(--blue-dark);
  box-shadow: 5px 5px 0 var(--yellow);
}

.navigation-toast[hidden] { display: none; }
.navigation-toast > span { display: grid; width: 39px; height: 39px; place-items: center; border: 2px solid var(--white); border-radius: 8px; background: var(--blue); font-size: 23px; }
.navigation-toast div { min-width: 0; flex: 1; }
.navigation-toast small { display: block; color: var(--yellow); font-size: 8px; font-weight: 900; letter-spacing: 0.1em; }
.navigation-toast strong { display: block; overflow: hidden; margin-top: 2px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.navigation-toast button { border: 0; color: var(--white); background: transparent; font-size: 23px; cursor: pointer; }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); border: 3px solid var(--line); border-radius: 24px; }
  .bottom-nav { bottom: 24px; border-right: 3px solid var(--line); border-bottom: 3px solid var(--line); border-left: 3px solid var(--line); border-radius: 0 0 21px 21px; }
  .picker-dialog { bottom: 24px; border-bottom: 3px solid var(--line); border-radius: 20px; }
}

@media (max-width: 360px) {
  .intro, .quick-section, .map-section { padding-right: 15px; padding-left: 15px; }
  .route-card, .journey-card, .info-banner { margin-right: 15px; margin-left: 15px; }
  .intro h1 { font-size: 42px; }
  .quick-grid { gap: 7px; }
  .quick-item { padding: 9px 7px; }
}

@page {
  size: A4 portrait;
  margin: 8mm;
}

@media print {
  html,
  body {
    background: #fff !important;
  }

  .site-backdrop,
  .app-shell,
  dialog,
  .navigation-toast {
    display: none !important;
  }

  .print-sheet {
    display: block;
    color: #07142f;
    font-family: Arial, sans-serif;
  }

  .print-sheet-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 4mm;
    padding-bottom: 3mm;
    border-bottom: 1mm solid #07142f;
  }

  .print-sheet-header strong,
  .print-sheet-header span {
    display: block;
  }

  .print-sheet-header strong {
    color: #0754d8;
    font-size: 15pt;
  }

  .print-sheet-header span,
  .print-sheet-header small {
    font-size: 7pt;
    font-weight: 700;
  }

  .print-qr-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  .print-qr-card {
    display: flex;
    width: 150mm;
    min-height: 210mm;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 12mm;
    break-inside: avoid;
    border: 1mm solid #07142f;
    border-radius: 4mm;
    text-align: center;
  }

  .print-qr-card svg {
    width: 105mm;
    height: 105mm;
    margin-bottom: 7mm;
  }

  .print-qr-card .qr-point-number {
    margin-bottom: 2mm;
    font-size: 13pt;
  }

  .print-qr-card strong {
    max-width: 100%;
    font-size: 22pt;
    white-space: normal;
  }

  .print-qr-card small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    margin-top: 4mm;
    color: #4b5565;
    font-size: 7pt;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

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