    :root {
      --ink: #e8f5f5;
      --muted: #8ca7b0;
      --paper: #07131f;
      --card: #0d202e;
      --card-2: #102a3b;
      --line: rgba(157, 202, 211, 0.18);
      --deep: #09202f;
      --deep-2: #123e52;
      --mint: #9bf0e5;
      --cyan: #48e2e0;
      --orange: #ff8068;
      --orange-dark: #ffad74;
      --yellow: #f6d276;
      --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      position: relative;
      margin: 0;
      min-width: 320px;
      color: var(--ink);
      background: var(--paper);
      font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
    }
    body::before {
      position: fixed;
      z-index: -2;
      inset: 0;
      background-image: linear-gradient(rgba(89, 153, 171, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(89, 153, 171, 0.045) 1px, transparent 1px);
      background-size: 42px 42px;
      content: "";
      mask-image: linear-gradient(to bottom, black, transparent 74%);
    }
    body::after {
      position: fixed;
      z-index: -1;
      top: -240px;
      right: -120px;
      width: 720px;
      height: 720px;
      background: radial-gradient(circle, rgba(72, 226, 224, 0.12), transparent 66%);
      content: "";
      pointer-events: none;
    }
    ::selection { color: var(--deep); background: var(--cyan); }
    button, input, select { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

    .app-shell { max-width: 1280px; margin: 0 auto; padding: 20px 28px 56px; }
    .topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
    .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 900; letter-spacing: -0.055em; }
    .brand-mark { display: grid; place-items: center; width: 46px; height: 40px; color: var(--deep); background: var(--cyan); border-radius: 5px 15px 5px 15px; box-shadow: 0 0 26px rgba(72, 226, 224, 0.2); }
    .brand-mark svg { width: 35px; height: 29px; overflow: visible; }
    .brand-name { font-size: 1.18rem; }
    .live-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; color: var(--cyan); border: 1px solid rgba(72, 226, 224, 0.25); border-radius: 999px; font-size: 0.67rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
    .live-dot { width: 7px; height: 7px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 0 4px rgba(72, 226, 224, 0.12), 0 0 12px var(--cyan); }

    .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: end; gap: 32px; margin-bottom: 20px; }
    .eyebrow { color: var(--cyan); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
    h1, h2, p { margin-top: 0; }
    h1 { max-width: 760px; margin-bottom: 14px; color: #f5ffff; font-size: clamp(3.2rem, 6.5vw, 6rem); font-weight: 800; line-height: 0.94; letter-spacing: -0.05em; }
    .headline-subline { display: block; margin-top: 0.24em; color: var(--orange); font-size: 0.32em; font-weight: 800; letter-spacing: 0.03em; line-height: 1; }
    .hero-copy { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
    .hero-note { position: relative; overflow: hidden; padding: 22px; color: var(--ink); background-color: #103948; background-image: linear-gradient(rgba(89, 153, 171, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(89, 153, 171, 0.05) 1px, transparent 1px), linear-gradient(145deg, rgba(17, 57, 72, 0.95), rgba(10, 34, 48, 0.95)); background-size: 24px 24px, 24px 24px, 100% 100%; border: 1px solid rgba(72, 226, 224, 0.34); border-radius: 4px 22px 4px 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); font-size: 0.84rem; line-height: 1.6; }
    .hero-note .chart-watermark { opacity: 0.34; }
    .hero-note strong, .hero-note-copy { position: relative; z-index: 1; }
    .hero-note::before { position: absolute; top: 0; right: 0; width: 72px; height: 72px; border-left: 1px solid rgba(72, 226, 224, 0.25); border-bottom: 1px solid rgba(72, 226, 224, 0.25); content: ""; transform: translate(25px, -25px) rotate(45deg); }
    .hero-note strong { display: block; margin-bottom: 9px; color: var(--cyan); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; }

    .search-card { position: relative; padding: 22px; background: rgba(13, 32, 46, 0.96); border: 1px solid rgba(157, 202, 211, 0.2); border-radius: 16px; box-shadow: var(--shadow); }
    .search-card::before { position: absolute; top: 0; left: 30px; width: 116px; height: 3px; background: var(--orange); box-shadow: 0 0 20px rgba(255, 128, 104, 0.55); content: ""; }
    .search-card::after { position: absolute; right: 30px; bottom: 0; width: 44px; height: 3px; background: var(--cyan); content: ""; }
    .search-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
    .search-heading h2 { margin-bottom: 0; color: #f5ffff; font-size: 1.35rem; letter-spacing: -0.04em; }
    .search-heading span { color: var(--muted); font-size: 0.75rem; }
    .route-grid { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); align-items: end; gap: 14px; }
    .field { min-width: 0; }
    .field label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.66rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
    .field input { width: 100%; height: 52px; padding: 0 16px; color: var(--ink); background: #091a27; border: 1px solid var(--line); border-radius: 10px; outline: none; transition: border 160ms ease, background 160ms ease, box-shadow 160ms ease; }
    .field input::placeholder { color: #58727d; }
    .field input:focus { background: #0b2232; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(72, 226, 224, 0.11); }
    .field select { width: 100%; height: 52px; min-width: 0; padding: 0 26px 0 16px; color: var(--ink); background-color: #091a27; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.82rem; font-weight: 650; appearance: none; }
    .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(72, 226, 224, 0.11); }
    .swap-button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; align-self: end; width: 52px; height: 52px; gap: 2px; padding: 0; color: var(--cyan); background: rgba(72, 226, 224, 0.06); border: 1px solid rgba(72, 226, 224, 0.35); border-radius: 10px; line-height: 1; transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
    .swap-button:hover { color: var(--deep); background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 22px rgba(72, 226, 224, 0.22); }
    .swap-icon { width: 20px; height: 20px; fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
    .swap-button:hover .swap-icon { stroke: var(--deep); }
      .options-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.9fr) minmax(210px, 1.1fr); align-items: end; gap: 10px; margin-top: 14px; }
      .options-row.round-trip { grid-template-columns: minmax(130px, 0.9fr) minmax(155px, 1fr) minmax(155px, 1fr) minmax(195px, 1fr); }
      .search-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
     .search-detail-panel { min-width: 0; background: rgba(9, 26, 39, 0.72); border: 1px solid var(--line); border-radius: 3px; }
      .search-detail-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; color: var(--muted); cursor: pointer; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; list-style: none; text-transform: uppercase; }
     .search-detail-panel summary::-webkit-details-marker { display: none; }
     .search-detail-panel summary::after { color: var(--cyan); content: "+"; font-size: 1rem; }
     .search-detail-panel[open] summary::after { content: "−"; }
     .vehicle-summary, .passenger-summary { margin-left: auto; color: var(--muted); font-size: 0.68rem; font-weight: 650; letter-spacing: 0; text-align: right; text-transform: none; }
      .search-detail-content { padding: 11px 13px 12px; border-top: 1px solid var(--line); }
     .passenger-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
     .passenger-control-grid .field input { height: 44px; }
      .vehicle-content { padding: 11px 13px 12px; border-top: 1px solid var(--line); }
     .vehicle-intro { margin-bottom: 14px; color: var(--muted); font-size: 0.75rem; line-height: 1.55; }
     .vehicle-grid { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(2, minmax(140px, 1fr)); align-items: end; gap: 12px; }
     .vehicle-grid .field { position: relative; }
     .vehicle-grid .field input, .vehicle-grid .field select { height: 44px; }
     .vehicle-grid .field input { padding-right: 38px; }
     .vehicle-grid .field label { margin-bottom: 6px; font-size: 0.6rem; }
     .field-unit { position: absolute; right: 11px; bottom: 13px; color: var(--muted); font-size: 0.7rem; font-weight: 750; pointer-events: none; }
     .children-age-panel { grid-column: 2; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
     .children-age-heading { margin-bottom: 10px; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
      .children-age-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      .children-age-grid .field label { margin-bottom: 6px; font-size: 0.6rem; }
      .children-age-grid .field input { height: 44px; }
       .search-actions { display: flex; justify-content: flex-end; margin-top: 11px; }
      .search-actions .search-button { min-width: 220px; }
     .provider-choice { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: var(--muted); background: #0a1c29; border: 1px solid var(--line); border-radius: 3px; font-size: 0.72rem; font-weight: 750; transition: color 160ms ease, background 160ms ease, border 160ms ease; }
    .provider-choice:hover { border-color: rgba(72, 226, 224, 0.35); }
    .provider-choice:has(input:checked) { color: var(--deep); background: var(--cyan); border-color: var(--cyan); }
    .provider-choice input { width: 13px; height: 13px; margin: 0; accent-color: var(--deep-2); }
    .port-filter { margin-top: 12px; border-top: 1px solid var(--line); }
    .port-filter summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 3px; color: var(--muted); cursor: pointer; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; list-style: none; text-transform: uppercase; }
    .port-filter summary::-webkit-details-marker { display: none; }
    .port-filter summary::after { color: var(--cyan); content: "+"; font-size: 1rem; }
    .port-filter[open] summary::after { content: "−"; }
    .port-filter-summary { margin-left: auto; font-size: 0.68rem; font-weight: 650; letter-spacing: 0; text-transform: none; }
    .port-filter-content { display: flex; flex-wrap: wrap; gap: 8px 10px; padding-top: 10px; }
    .port-filter-content-grouped { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
    .port-filter-content-grouped #portChoices { display: contents; }
    .port-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
    .port-group-label { width: 100%; color: var(--cyan); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
    .trip-toggle { display: grid; grid-template-columns: 1fr 1fr; height: 52px; padding: 3px; background: #091a27; border: 1px solid var(--line); border-radius: 10px; }
    .trip-type-btn { padding: 11px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 2px; font-size: 0.8rem; font-weight: 800; }
    .trip-type-btn.active { color: var(--deep); background: var(--cyan); box-shadow: 0 0 18px rgba(72, 226, 224, 0.18); }
    .hidden { display: none !important; }
    .search-button { height: 52px; min-height: 52px; padding: 0 24px; color: var(--deep); background: var(--cyan); border: 0; border-radius: 10px; font-weight: 900; white-space: nowrap; transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
    .search-button:hover { background: #b2fff6; box-shadow: 0 0 28px rgba(72, 226, 224, 0.26); transform: translateY(-2px); }
    .search-button:disabled { cursor: wait; opacity: 0.58; transform: none; }

    .results-section { margin-top: 42px; }
    .results-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
    .results-header h2 { margin: 8px 0 0; color: #f5ffff; font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 850; letter-spacing: -0.045em; }
    .result-count { color: var(--muted); font-size: 0.78rem; }
    .preference-panel { margin-bottom: 14px; background: rgba(13, 32, 46, 0.78); border: 1px solid var(--line); border-radius: 3px; }
    .preference-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; color: var(--ink); cursor: pointer; font-size: 0.79rem; font-weight: 850; list-style: none; }
    .preference-panel summary::-webkit-details-marker { display: none; }
    .preference-panel summary::after { color: var(--cyan); content: "+"; font-size: 1.15rem; }
    .preference-panel[open] summary::after { content: "−"; }
    .preference-summary { margin-left: auto; color: var(--muted); font-size: 0.71rem; font-weight: 600; }
    .preference-content { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 0 18px 18px; border-top: 1px solid var(--line); }
    .preference-select { padding-top: 17px; }
    .preference-select label, .filter-control label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 0.64rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
    .preference-select select { width: 100%; padding: 11px 12px; color: var(--ink); background: #091a27; border: 1px solid var(--line); border-radius: 3px; }
    .weight-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; padding-top: 17px; }
    .weight-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 0.74rem; font-weight: 750; }
    .weight-control output { color: var(--cyan); font-variant-numeric: tabular-nums; }
    .weight-control input { grid-column: 1 / -1; width: 100%; accent-color: var(--cyan); }
    .weight-control.disabled { opacity: 0.4; }
    .preset-row { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
    .preset-button { padding: 7px 9px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 3px; font-size: 0.68rem; font-weight: 750; }
    .preset-button:hover, .preset-button.active { color: var(--deep); background: var(--cyan); border-color: transparent; }
    .filter-content { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 14px; padding: 17px 18px 18px; border-top: 1px solid var(--line); }
    .filter-input { display: flex; align-items: center; overflow: hidden; background: #091a27; border: 1px solid var(--line); border-radius: 3px; }
    .filter-input:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(72, 226, 224, 0.11); }
    .filter-input input { min-width: 0; width: 100%; padding: 11px 4px 11px 12px; color: var(--ink); background: transparent; border: 0; outline: 0; }
    .filter-input span { padding: 0 11px 0 5px; color: var(--muted); font-size: 0.72rem; font-weight: 750; white-space: nowrap; }
    .filter-reset { min-height: 42px; padding: 0 12px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 3px; font-size: 0.7rem; font-weight: 800; }
    .filter-reset:hover { color: var(--deep); background: var(--cyan); border-color: transparent; }
    .notice { margin-bottom: 14px; padding: 14px 16px; color: var(--yellow); background: rgba(100, 75, 28, 0.22); border: 1px solid rgba(246, 210, 118, 0.32); border-radius: 3px; font-size: 0.8rem; line-height: 1.5; }
    .search-progress { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding: 11px 14px; color: var(--cyan); background: rgba(16, 60, 75, 0.48); border: 1px solid rgba(72, 226, 224, 0.26); border-radius: 3px; font-size: 0.77rem; font-weight: 750; }
    .search-progress-providers { margin-left: auto; color: var(--muted); font-size: 0.68rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .search-progress.complete { color: #9bd4c8; background: rgba(29, 77, 74, 0.36); border-color: rgba(155, 212, 200, 0.24); }
    .search-progress.error { color: #ffad9e; background: rgba(98, 41, 38, 0.34); border-color: rgba(255, 128, 104, 0.3); }
    .status-led { flex: 0 0 auto; width: 10px; height: 10px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 0 4px rgba(72, 226, 224, 0.12), 0 0 10px var(--cyan); }
    .status-led.pending { background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 128, 104, 0.14), 0 0 10px var(--orange); animation: led-pulse 1.25s ease-in-out infinite; }
    .status-led.error { background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 128, 104, 0.14); }
    @keyframes led-pulse { 0%, 100% { opacity: 0.55; transform: scale(0.88); } 50% { opacity: 1; transform: scale(1); } }
    .results-grid { display: grid; gap: 14px; }
    .journey-card { position: relative; isolation: isolate; overflow: hidden; background-color: #0d202e; background-image: linear-gradient(rgba(89, 153, 171, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(89, 153, 171, 0.035) 1px, transparent 1px), linear-gradient(135deg, rgba(16, 65, 76, 0.2), transparent 42%); background-size: 28px 28px, 28px 28px, 100% 100%; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18); }
    .chart-watermark { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; opacity: 0.52; pointer-events: none; }
    .chart-watermark path { fill: none; stroke: rgba(72, 226, 224, 0.16); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1; vector-effect: non-scaling-stroke; }
    .chart-watermark .fine { stroke: rgba(157, 202, 211, 0.11); stroke-width: 0.65; }
    .chart-watermark text { fill: rgba(155, 240, 229, 0.2); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; }
    .journey-card::before { position: absolute; top: 17px; right: 17px; width: 68px; height: 68px; border: 1px solid rgba(72, 226, 224, 0.16); border-radius: 50%; background: linear-gradient(90deg, transparent 49%, rgba(72, 226, 224, 0.13) 49% 51%, transparent 51%), linear-gradient(0deg, transparent 49%, rgba(72, 226, 224, 0.13) 49% 51%, transparent 51%); box-shadow: 0 0 0 10px rgba(72, 226, 224, 0.025), 0 0 0 20px rgba(72, 226, 224, 0.02); content: ""; opacity: 0.8; pointer-events: none; transform: rotate(22deg); }
    .journey-card::after { position: absolute; right: 42px; bottom: 18px; width: 25px; height: 25px; border-top: 1px solid rgba(255, 128, 104, 0.32); border-right: 1px solid rgba(255, 128, 104, 0.32); content: "N"; color: rgba(255, 128, 104, 0.55); font-size: 0.48rem; font-weight: 900; line-height: 18px; text-align: right; transform: rotate(45deg); pointer-events: none; }
    .journey-card.pending { border-color: rgba(72, 226, 224, 0.42); box-shadow: 0 0 30px rgba(72, 226, 224, 0.08); }
    .pending-status { color: var(--cyan); font-weight: 800; }
    .journey-card-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 205px; gap: 18px; padding: 16px 18px; }
    .journey-card-main { min-width: 0; padding: 0; container-type: inline-size; }
    .journey-lower { display: grid; grid-template-columns: minmax(0, 1fr) 245px; align-items: center; gap: 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
    .journey-card-map { align-self: center; padding: 0; }
    .map-frame { display: flex; flex-direction: column; overflow: hidden; background: #091a27; border: 1px solid rgba(72, 226, 224, 0.18); border-radius: 4px; }
    .mini-map { position: relative; overflow: hidden; height: 180px; }
    .mini-map svg { display: block; width: 100%; height: 100%; }
    .map-land { stroke: rgba(157, 202, 211, 0.25); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
    .map-land.germany { fill: #173c45; }
    .map-land.denmark { fill: #214d51; }
    .map-land.sweden { fill: #28554f; }
    .map-land.neighbor { fill: #102d3b; }
    .map-land.finland { fill: #2e5268; }
    .map-land.poland { fill: #244b57; }
    .map-land.norway { fill: #315b55; }
    .map-road { fill: none; stroke: #6eabb0; stroke-dasharray: 3 4; stroke-linecap: round; stroke-width: 2.5; }
    .map-ferry { fill: none; stroke: var(--orange); stroke-dasharray: 6 4; stroke-linecap: round; stroke-width: 4; }
    .map-dot { stroke: var(--card); stroke-width: 3; }
    .map-dot.start, .map-dot.end { fill: var(--cyan); }
    .map-dot.port { fill: var(--orange); }
    .map-compass { fill: var(--cyan); font-size: 7px; font-weight: 900; }
    .map-caption { padding: 6px 9px; color: var(--ink); border-top: 1px solid var(--line); font-size: 0.6rem; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
    .map-legend { display: flex; gap: 8px; padding: 6px 9px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 0.57rem; font-weight: 800; }
    .map-legend span::before { display: inline-block; width: 12px; margin-right: 4px; vertical-align: 2px; content: ""; }
    .map-legend .road-key::before { border-top: 2px dashed #6eabb0; }
    .map-legend .ferry-key::before { border-top: 2px dashed var(--orange); }
    .journey-direction { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 10px 22px; color: var(--deep); background: var(--cyan); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
    .journey-return .journey-direction { background: var(--orange); }
    .journey-direction svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .journey-return .journey-direction svg { transform: scaleX(-1); }
    .card-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
    .rank { color: var(--muted); font-size: 0.68rem; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: 0.12em; }
    .provider { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 0.8rem; font-weight: 850; }
    .provider-logo { display: block; flex: 0 0 32px; width: 32px; height: 28px; padding: 3px; object-fit: contain; background: #dfe9ea; border-radius: 4px; opacity: 0.9; }
    .source-link { color: var(--cyan); font-size: 0.7rem; font-weight: 750; text-decoration: none; }
    .source-link:hover { color: #b2fff6; text-decoration: underline; }
    .journey-route { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 0.7fr) minmax(0, 1.4fr) minmax(60px, 0.7fr) minmax(0, 1.4fr) minmax(60px, 0.7fr) minmax(0, 1fr); align-items: center; gap: 10px; }
    .place { min-width: 0; }
    .place strong { display: block; color: #f5ffff; font-size: 0.98rem; overflow-wrap: anywhere; }
    .port-stop { display: flex; flex-direction: column; gap: 10px; }
    .port-time { display: flex; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .port-clock { color: var(--orange); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.04em; }
    .port-date { color: var(--muted); font-size: 0.72rem; }
    .place small, .road-leg small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
    .road-leg { position: relative; padding-top: 16px; color: var(--muted); font-size: 0.72rem; text-align: center; }
    .road-leg .leg-duration, .ferry-leg .leg-duration { display: block; margin-top: 4px; }
    .road-leg::before { position: absolute; top: 7px; left: 0; right: 0; height: 1px; background: rgba(110, 171, 176, 0.56); content: ""; }
    .road-leg::after { position: absolute; top: 3px; right: 0; width: 8px; height: 8px; background: #6eabb0; border-radius: 50%; content: ""; }
    .ferry-leg { position: relative; padding-top: 16px; color: var(--orange); font-size: 0.72rem; font-weight: 800; text-align: center; }
    .ferry-leg::before { position: absolute; top: 5px; left: 0; right: 0; height: 4px; background: var(--orange); border-radius: 1px; box-shadow: 0 0 10px rgba(255, 128, 104, 0.22); content: ""; }
    .ferry-bubble { position: absolute; top: 1px; right: 0; width: 12px; height: 12px; background: var(--orange); border: 3px solid var(--card); border-radius: 50%; box-shadow: 0 0 0 1px var(--orange); }
    .journey-meta { display: flex; flex-wrap: wrap; gap: 5px; }
    .meta-chip { padding: 5px 7px; color: var(--muted); background: #0a1c29; border: 1px solid rgba(157, 202, 211, 0.12); border-radius: 3px; font-size: 0.68rem; }
    .meta-chip strong { color: var(--ink); }
    .card-side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding-left: 22px; border-left: 1px solid var(--line); text-align: right; }
    .price-label { color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
    .price { margin: 7px 0 16px; color: var(--cyan); font-size: 2.45rem; font-weight: 850; letter-spacing: -0.08em; }
    .price-conversion { display: block; margin-top: 4px; color: var(--muted); font-family: Arial, sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
    .leave-by { color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
    .leave-by-time { white-space: nowrap; }
    .leave-by strong { display: block; color: var(--orange); }
    .check-in { margin-bottom: 14px; }
    .card-footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; color: var(--muted); background: rgba(7, 19, 31, 0.5); border-top: 1px solid rgba(157, 202, 211, 0.1); font-size: 0.66rem; }
    .card-footer > span { flex: 1 1 280px; padding: 12px 18px; }
    .copy-journey-button { display: flex; flex: 1 1 205px; align-items: center; justify-content: center; align-self: stretch; gap: 8px; min-height: 44px; padding: 12px 18px; color: var(--cyan); background: rgba(72, 226, 224, 0.04); border: 0; border-radius: 0; font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
    .copy-journey-button:hover, .copy-journey-button.copied { color: var(--deep); background: var(--cyan); border-color: var(--cyan); }
    .copy-journey-button:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; }
    .copy-journey-button svg { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
    .unrouted { color: var(--yellow); }
    .empty-state { padding: 38px; color: var(--muted); background: rgba(13, 32, 46, 0.94); border: 1px dashed rgba(157, 202, 211, 0.3); border-radius: 4px; text-align: center; }
    .spinner { display: inline-block; width: 15px; height: 15px; margin-right: 8px; vertical-align: -3px; border: 2px solid rgba(9, 32, 47, 0.3); border-top-color: var(--deep); border-radius: 50%; animation: spin 700ms linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    @container (max-width: 740px) {
      .journey-route { grid-template-columns: 1fr; gap: 12px; }
      .port-stop { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 18px; }
      .port-stop > div { flex: 1 1 140px; }
      .port-time { align-items: flex-end; margin-left: auto; }
      .road-leg, .ferry-leg { padding: 0 0 0 22px; text-align: left; }
      .road-leg::before, .ferry-leg::before { top: 0; bottom: 0; left: 6px; right: auto; width: 3px; height: auto; }
      .road-leg::after { top: 50%; right: auto; left: -1px; width: 17px; height: 17px; transform: translateY(-50%); }
      .ferry-leg::before { width: 4px; }
      .ferry-bubble { top: 50%; right: auto; left: -1px; width: 18px; height: 18px; transform: translateY(-50%); }
    }

    @media (max-width: 980px) {
      .hero { grid-template-columns: 1fr; gap: 24px; }
      .hero-note { max-width: 430px; }
      .options-row, .options-row.round-trip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .options-row .field:last-of-type { grid-column: 2; }
      .search-actions { justify-content: stretch; }
      .search-actions .search-button { width: 100%; }
      .journey-card-layout { grid-template-columns: 1fr; }
      .card-side { align-items: flex-start; padding: 17px 0 0; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
      .price { display: inline-block; margin-right: 10px; }
      .price-conversion { display: inline; margin: 0 0 0 8px; }
       .filter-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
       .filter-reset { grid-column: 1 / -1; }
       .vehicle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
       .vehicle-grid .field:first-child { grid-column: 1 / -1; }
    }

    @media (max-width: 560px) {
      .app-shell { padding: 16px 14px 52px; }
      .topbar { margin-bottom: 38px; }
      .brand-mark { width: 40px; height: 36px; }
      .brand-mark svg { width: 31px; }
      .brand-name { font-size: 1.05rem; }
      .live-pill { padding: 7px 8px; font-size: 0.56rem; letter-spacing: 0.08em; }
      h1 { max-width: 340px; font-size: 3.35rem; line-height: 0.95; }
      .hero-copy { font-size: 0.92rem; }
      .hero-note { padding: 18px; font-size: 0.78rem; }
      .search-card { padding: 22px 16px; border-radius: 14px; }
      .search-heading { display: block; }
      .search-heading span { display: block; margin-top: 7px; }
      .route-grid { grid-template-columns: 1fr; }
      .swap-button { flex-direction: row; width: 96px; height: 32px; margin: -1px auto; gap: 7px; }
      .swap-button-label { font-size: 0.56rem; }
      .options-row, .options-row.round-trip { grid-template-columns: 1fr; }
      .options-row .field:last-of-type { grid-column: auto; }
       .search-detail-grid { grid-template-columns: 1fr; }
      .results-section { margin-top: 58px; }
      .results-header { display: block; }
      .result-count { display: block; margin-top: 10px; }
      .preference-content { grid-template-columns: 1fr; gap: 0; }
       .weight-controls { grid-template-columns: 1fr; }
       .filter-content { grid-template-columns: 1fr; }
       .filter-reset { grid-column: auto; }
       .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
       .vehicle-grid .field:first-child { grid-column: 1 / -1; }
      .preference-summary { font-size: 0.64rem; }
      .journey-card-layout { display: block; position: relative; padding: 13px 14px; }
      .journey-lower { display: block; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); }
      .journey-card-map { position: static; width: 100%; margin-top: 13px; }
       .journey-card-main { width: 100%; }
       .journey-card-main .journey-route { width: 100%; }
       .children-age-panel { grid-column: 1 / -1; }
       .card-side { margin-top: 18px; }
      .mini-map { height: 148px; }
      .card-footer > span { flex-basis: 100%; padding: 12px 14px; }
      .copy-journey-button { flex-basis: 100%; }
      .card-topline { align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
      .source-link { order: 3; width: 100%; margin-top: 2px; }
      .journey-meta { gap: 6px; }
      .meta-chip { padding: 6px 8px; font-size: 0.68rem; }
    }

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