:root {
  --ink: #102f3c;
  --muted: #5c7480;
  --blue-950: #083344;
  --blue-900: #075985;
  --blue-800: #036b92;
  --blue-700: #087ca4;
  --blue-100: #dff4fb;
  --blue-50: #f0fafe;
  --sand: #fff8e8;
  --sun: #f6c453;
  --coral: #ef7d62;
  --white: #ffffff;
  --line: #d8e7ec;
  --success: #1f7a65;
  --warning: #a65f13;
  --danger: #b44343;
  --shadow: 0 16px 45px rgba(7, 89, 133, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 2%, rgba(77, 189, 215, 0.16), transparent 23rem),
    linear-gradient(180deg, #fafdff 0%, #f3f9fb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input, select { font: inherit; }

button, select, input[type="range"] { cursor: pointer; }

button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(8, 124, 164, 0.35);
  outline-offset: 2px;
}

.app-shell { width: min(1500px, 100%); margin: 0 auto; padding: 0 28px 40px; }

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup { display: flex; align-items: center; gap: 14px; }

.brand-mark {
  position: relative;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 17px;
  background: var(--blue-900);
  box-shadow: 0 10px 25px rgba(7, 89, 133, 0.22);
}

.brand-mark .sun {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sun);
}

.brand-mark .wave {
  position: absolute;
  left: -8px;
  width: 72px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.95);
  border-color: rgba(255,255,255,.95) transparent transparent transparent;
  border-radius: 50%;
}

.wave-one { top: 31px; transform: rotate(-4deg); }
.wave-two { top: 40px; transform: rotate(5deg); opacity: .72; }

.eyebrow, .section-kicker {
  margin: 0 0 2px;
  color: var(--blue-700);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.topbar h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.5vw, 2rem); letter-spacing: -.025em; }

.private-badge {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 21px;
  border: 1px solid #cbe7f1;
  border-radius: 999px;
  color: var(--blue-900);
  background: #eaf7fb;
  box-shadow: 0 4px 12px rgba(7,89,133,.05);
  font-size: .94rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.private-badge:hover { background: #dff4fb; transform: translateY(-1px); box-shadow: 0 6px 15px rgba(7,89,133,.1); }

.private-badge svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.header-actions { display: flex; flex: none; align-items: center; gap: 12px; }
.install-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(7,89,133,.08);
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  box-shadow: 0 8px 18px rgba(7,89,133,.17);
  font-size: .94rem;
  font-weight: 750;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.install-button:hover { background: linear-gradient(135deg, var(--blue-800), var(--blue-900)); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(7,89,133,.22); }
.install-button svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.app-installed .install-button { display: none; }

.intro-strip {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  border-radius: 28px;
  background: var(--blue-950);
  color: white;
  box-shadow: var(--shadow);
}

.intro-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 760px;
  padding: 40px 48px;
}

.intro-copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -120px;
  width: 340px;
  height: 220px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.intro-copy .section-kicker { color: #7dd3ef; }
.intro-copy h2 { max-width: 700px; margin: 5px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
.intro-copy p:last-child { max-width: 650px; margin: 0; color: #d9edf4; font-size: 1.03rem; }

.aegean-photo { position: relative; min-height: 220px; margin: 0; overflow: hidden; }
.aegean-photo::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, var(--blue-950) 0%, rgba(8,51,68,.35) 38%, transparent 75%); }
.aegean-photo img { width: 100%; height: 100%; min-height: 220px; display: block; object-fit: cover; }
.aegean-photo figcaption { position: absolute; z-index: 2; right: 12px; bottom: 10px; padding: 4px 7px; border-radius: 6px; color: rgba(255,255,255,.92); background: rgba(4,29,39,.52); font-size: .72rem; }

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.planner-panel, .results-panel {
  border: 1px solid rgba(173,207,219,.78);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(16,47,60,.07);
}

.planner-panel { position: sticky; top: var(--planner-sticky-top, 18px); padding: 26px; }
.results-panel { min-height: 720px; padding: 30px; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.control-group { margin: 0 0 25px; }
.control-group.compact { margin-bottom: 21px; }
.control-group legend, .field-label { display: block; margin: 0 0 9px; color: var(--ink); font-size: .94rem; font-weight: 800; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef7fa;
}

.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 10px 8px; border-radius: 10px; color: var(--muted); text-align: center; font-size: .92rem; font-weight: 750; transition: .18s ease; }
.segmented input:checked + span { color: white; background: var(--blue-900); box-shadow: 0 5px 13px rgba(7,89,133,.2); }
.segmented input:focus-visible + span { outline: 3px solid rgba(8,124,164,.32); }

.island-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.autocomplete-wrap { position: relative; }
input[type="text"], .trip-length-number, select {
  width: 100%;
  height: 46px;
  border: 1px solid #bcd5de;
  border-radius: 12px;
  color: var(--ink);
  background: white;
}
input[type="text"], .trip-length-number { padding: 0 13px; }
select { padding: 0 38px 0 12px; }
input[type="text"]::placeholder { color: #8299a3; }
.trip-length-number::placeholder { color: #8299a3; }
input[type="text"]:hover, .trip-length-number:hover, select:hover { border-color: #8db9c8; }
.trip-length-input-wrap { position: relative; }
.trip-length-number { padding-right: 38px; appearance: textfield; -moz-appearance: textfield; }
.trip-length-number::-webkit-inner-spin-button,
.trip-length-number::-webkit-outer-spin-button { margin: 0; appearance: none; }
.trip-length-steppers {
  position: absolute;
  top: 13px;
  right: 37px;
  bottom: 13px;
  width: 14px;
  display: grid;
  grid-template-rows: 1fr 1fr;
}
.trip-length-step {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  color: #10191d;
  background: transparent;
  line-height: 1;
  cursor: pointer;
}
.trip-length-step svg { width: 11px; height: 7px; overflow: visible; }
.trip-length-step path { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.trip-length-step:hover { color: var(--blue-900); }
.trip-length-step:focus-visible { position: relative; outline: 2px solid var(--blue-700); outline-offset: -2px; }
.add-button { min-width: 72px; padding: 0 16px; border: 0; border-radius: 12px; color: white; background: var(--blue-800); font-weight: 800; }
.add-button:hover { background: var(--blue-900); }

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #bcd5de;
  border-radius: 13px;
  background: white;
  box-shadow: 0 16px 40px rgba(16,47,60,.18);
}

.suggestion { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; }
.suggestion:hover, .suggestion.active { background: var(--blue-50); }
.suggestion small { color: var(--muted); font-size: .76rem; }
.suggestion-heading { padding: 5px 10px 7px; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }

.field-help, .field-error { margin: 7px 0 0; font-size: .8rem; }
.field-help { color: var(--muted); }
.field-error { min-height: 1.1em; color: var(--danger); font-weight: 700; }

.island-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.island-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 7px 5px 12px; border: 1px solid #b7dce7; border-radius: 999px; color: var(--blue-950); background: var(--blue-50); font-size: .86rem; font-weight: 750; }
.island-chip.custom { border-style: dashed; border-color: #d2ad77; color: #79511b; background: #fff9ed; }
.island-chip button { display: grid; width: 22px; height: 22px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: inherit; background: rgba(7,89,133,.08); line-height: 1; }
.island-chip button:hover { background: rgba(7,89,133,.16); }

.chip-actions { display: flex; gap: 16px; margin-top: 10px; }
.text-button { padding: 0; border: 0; color: var(--blue-800); background: transparent; font-size: .8rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label-row output { color: var(--blue-900); font-size: .88rem; font-weight: 800; }
input[type="range"] { width: 100%; accent-color: var(--blue-800); }
.range-labels { display: flex; justify-content: space-between; color: #718791; font-size: .73rem; }

.primary-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
  box-shadow: 0 10px 22px rgba(7,89,133,.2);
  font-weight: 850;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 13px 26px rgba(7,89,133,.25); }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.planner-note { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 18px; padding: 13px; border-radius: 12px; color: #6f4c16; background: var(--sand); font-size: .82rem; }
.planner-note svg { width: 18px; fill: none; stroke: var(--warning); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.planner-note p { margin: 0; }

.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.results-heading h2 { margin: 3px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 2.7vw, 2.25rem); letter-spacing: -.03em; }
.coverage-pill { flex: none; padding: 7px 11px; border-radius: 999px; color: var(--success); background: #e7f6f1; font-size: .78rem; font-weight: 800; }
.print-route-button { position: relative; width: 48px; height: 48px; display: grid; place-items: center; margin: 18px 0 0 auto; padding: 0; border: 1px solid rgba(255,255,255,.78); border-radius: 50%; color: white; background: var(--blue-900); box-shadow: 0 12px 28px rgba(7,51,68,.24); transition: transform .18s ease, background .18s ease; }
.print-route-button:hover { background: var(--blue-950); transform: translateY(-2px) scale(1.03); }
.print-route-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.print-route-button::after { position: absolute; right: calc(100% + 10px); top: 50%; padding: 6px 9px; border-radius: 8px; color: white; background: var(--blue-950); box-shadow: 0 7px 18px rgba(7,51,68,.2); content: attr(data-tooltip); font-size: .72rem; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(4px, -50%); transition: opacity .15s ease, transform .15s ease; white-space: nowrap; }
.print-route-button:hover::after, .print-route-button:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

.print-brand, .print-map-image { display: none; }

.route-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.route-tab { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fbfdfe; text-align: left; transition: .16s ease; }
.route-tab:hover { border-color: #8ec5d6; transform: translateY(-1px); }
.route-tab[aria-selected="true"] { border-color: var(--blue-800); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue-800); }
.tab-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tab-name { font-weight: 850; }
.tab-score { color: var(--blue-900); font-size: .78rem; font-weight: 850; }
.route-tab small { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; line-height: 1.35; }

.recommended-label {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #0f6857;
  background: #dff4ed;
  font-size: .6rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.route-map-card { position: relative; isolation: isolate; overflow: hidden; margin-top: 16px; border: 1px solid #c6e7f2; border-radius: 24px; background: white; box-shadow: 0 12px 28px rgba(7,89,133,.08); }
.map-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 88px; padding: 17px 112px 17px 20px; color: white; background: linear-gradient(125deg, #083344 0%, #075985 58%, #087CA4 100%); }
.map-heading h3 { margin: 0; color: white; font-family: inherit; font-size: 1.45rem; line-height: 1.25; font-weight: 800; letter-spacing: -.025em; }
.map-subtitle { margin: 5px 0 0; color: #dff4fb; font-size: .875rem; line-height: 1.4; font-weight: 600; }
.map-brand-wave { position: absolute; right: 0; bottom: 6px; width: 110px; height: 79px; pointer-events: none; }
@media screen and (max-width: 580px) { .map-brand-wave { width: 90px; height: 64px; } }
.map-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 14px 0; color: #075985; background: white; font-size: .875rem; font-weight: 750; }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 10px; background: #f0f8fc; }
.legend-line { flex: none; width: 22px; height: 0; border-top: 3px solid #087CA4; }
.legend-line.flight { border-top-color: #C98612; border-top-style: dashed; }
.legend-line.transfer { border-top-color: #D6654C; border-top-style: dotted; }
.route-map-viewport { position: relative; aspect-ratio: auto; min-height: 0; overflow: hidden; background: linear-gradient(135deg, #f0fbff 0%, #d8f1fc 50%, #bce4f3 100%); }
.route-map-viewport svg { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }
.map-grid { stroke: #fff; stroke-width: .8; opacity: .5; }
.map-water-wave { fill: none; stroke: #fff; stroke-width: 1.5; opacity: .38; }
.map-sea-label { fill: #78b2cc; opacity: .65; font-size: 10px; font-weight: 600; letter-spacing: 2.2px; }
.map-route-shadow { fill: none; stroke: #fff; stroke-opacity: .8; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.map-route { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.map-route.ferry { stroke: #087CA4; }
.map-route.flight { stroke: #C98612; stroke-dasharray: 10 7; }
.map-route.transfer { stroke: #D6654C; stroke-dasharray: 2 7; }
.map-node { fill: #087CA4; stroke: #fff; stroke-width: 3; filter: drop-shadow(0 2px 3px rgba(7,89,133,.18)); }
.map-node.mainland { fill: #075985; }
.map-node.round-trip { stroke: #f6c453; }
.map-node-number { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map-node-number.round-trip { font-size: 9px; }
.map-label-line { fill: none; stroke: #7dafc5; stroke-width: 1.1; stroke-opacity: .7; }
.map-label-box { fill: rgba(255,255,255,.96); }
.map-label-text { fill: #102f3c; font-size: 14px; font-weight: 750; text-anchor: middle; dominant-baseline: central; }
.map-compass text { fill: #075985; font-size: 9px; font-weight: 800; text-anchor: middle; }
.map-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 12px 18px; color: #5c7480; background: white; font-size: .75rem; line-height: 1.5; }
.map-place-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 16px; background: white; }
.map-place-list span { padding: 6px 9px; color: #075985; background: #eaf7fb; border-radius: 9px; font-size: .875rem; line-height: 1.35; font-weight: 750; }

.selected-plan { margin-top: 16px; }
.plan-overview { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.plan-banner { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 20px 22px; color: white; background: linear-gradient(125deg, var(--blue-950), var(--blue-800)); }
.plan-banner h3 { margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; }
.plan-banner p { margin: 0; color: #d9edf4; font-size: .88rem; }
.score-ring { width: 70px; height: 70px; display: grid; place-items: center; border: 5px solid rgba(255,255,255,.24); border-top-color: var(--sun); border-radius: 50%; font-size: 1.22rem; font-weight: 900; }

.route-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: #f8fcfd; }
.route-place { padding: 5px 9px; border-radius: 8px; color: var(--blue-950); background: white; border: 1px solid #d3e6ec; font-size: .81rem; font-weight: 800; }
.route-arrow { color: #7ba0ad; font-size: .85rem; }

.plan-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.plan-stat { padding: 15px 14px; text-align: center; }
.plan-stat + .plan-stat { border-left: 1px solid var(--line); }
.plan-stat strong { display: block; color: var(--blue-950); font-size: 1.05rem; }
.plan-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }

.pacing-note { display: flex; align-items: start; gap: 9px; margin: 16px 22px 0; padding: 12px 13px; border-radius: 11px; color: #31515d; background: #eef7fa; font-size: .84rem; }
.pacing-note.warning { color: #78511d; background: var(--sand); }
.pacing-note svg { flex: none; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.legs { padding: 6px 22px 18px; }
.legs h4 { margin: 17px 0 10px; font-size: .9rem; }
.leg { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 13px 0; border-top: 1px solid #e7eff2; }
.leg:first-of-type { border-top: 0; }
.mode-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--blue-900); background: var(--blue-100); font-size: 1rem; }
.mode-icon.tricky { color: var(--warning); background: var(--sand); }
.leg-title { margin: 0; color: var(--ink); font-size: .9rem; font-weight: 600; }
.leg-detail { margin: 3px 0 0; color: var(--muted); font-size: .79rem; }
.leg-time { padding-top: 2px; color: var(--blue-950); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.leg-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.leg-badge { padding: 3px 6px; border-radius: 6px; color: var(--success); background: #e7f6f1; font-size: .66rem; font-weight: 850; text-transform: uppercase; letter-spacing: .03em; }
.leg-badge.limited, .leg-badge.check { color: var(--warning); background: var(--sand); }
.leg-badge.tricky { color: var(--danger); background: #fff0ef; }
.leg-modes { margin: 2px 0 0; color: var(--muted); font-size: .79rem; }
.leg-steps { list-style: none; margin: 10px 0 2px 10px; padding: 0; border-left: 2px solid var(--blue-100); }
.leg-step { position: relative; padding: 0 0 10px 20px; }
.leg-step:last-child { padding-bottom: 2px; }
.leg-step-icon { position: absolute; left: -12px; top: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--blue-900); font-size: .85rem; line-height: 1; }
.leg-step-icon svg { width: 16px; height: 16px; }
.leg-step-route { display: block; color: var(--ink); font-size: .84rem; font-weight: 500; line-height: 1.35; }
.leg-step-info { display: block; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.leg-reminder { margin-top: 6px; white-space: pre-line; }

.flight-snapshot { margin-top: 17px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdfe; }
.flight-snapshot h3 { margin: 0 0 5px; font-size: 1rem; }
.flight-snapshot > p { margin: 0 0 12px; color: var(--muted); font-size: .82rem; }
.flight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.flight-item { padding: 10px 11px; border-radius: 10px; background: white; border: 1px solid #e0ebef; }
.flight-item strong { display: block; font-size: .82rem; }
.flight-item span { color: var(--muted); font-size: .72rem; }

.empty-state { min-height: 600px; display: grid; place-content: center; justify-items: center; text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.empty-state::before { content: ""; position: absolute; inset: 36px; background: url("https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a0/Greece_map_blank.svg/960px-Greece_map_blank.svg.png") center / contain no-repeat; opacity: .16; filter: sepia(1) saturate(2) hue-rotate(165deg); pointer-events: none; }
.empty-state > * { position: relative; z-index: 1; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--blue-900); background: var(--blue-100); font-size: 2rem; }
.empty-state h2 { margin: 14px 0 3px; font-family: Georgia, "Times New Roman", serif; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-cta { min-height: 43px; margin-top: 18px; padding: 9px 17px; border: 0; border-radius: 12px; color: white; background: var(--blue-900); font-weight: 800; }
.empty-cta:hover { background: var(--blue-950); }

.booking-checks { display: grid; grid-template-columns: 1.05fr 1.4fr auto; gap: 30px; align-items: center; margin-top: 24px; padding: 26px 30px; border: 1px solid #ead8ad; border-radius: var(--radius-lg); background: #fffaf0; }
.booking-checks h2 { margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.booking-checks > p { margin: 0; color: #6f6045; font-size: .9rem; }
.check-links { display: flex; flex-direction: column; gap: 6px; }
.check-links a { color: var(--blue-900); font-size: .84rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.check-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

footer { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr); gap: 14px 32px; padding: 24px 4px 0; color: #718791; font-size: .76rem; line-height: 1.55; }
footer p { margin: 0; }
.footer-legal { display: grid; gap: 4px; }
.footer-copyright { color: #506873; font-weight: 750; }
.footer-disclaimer { max-width: 820px; }

.site-footer { display: block; overflow: hidden; margin-top: 28px; padding: 0; color: #bfd6df; border-radius: 22px 22px 0 0; background: linear-gradient(125deg, var(--blue-950), var(--blue-800)); box-shadow: 0 -8px 28px rgba(7,51,68,.08); font-size: .76rem; line-height: 1.55; }
.site-footer p { margin: 0; }
.site-footer .footer-primary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 28px; padding: 27px 30px 23px; }
.site-footer .footer-brand-lockup { display: flex; min-width: 0; align-items: center; gap: 13px; }
.site-footer .footer-brand-mark { position: relative; flex: 0 0 45px; width: 45px; height: 45px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: var(--blue-900); }
.site-footer .footer-sun { position: absolute; top: 8px; right: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--sun); }
.site-footer .footer-wave { position: absolute; left: -6px; width: 58px; height: 18px; border: 3px solid rgba(255,255,255,.94); border-color: rgba(255,255,255,.94) transparent transparent transparent; border-radius: 50%; }
.site-footer .footer-wave-one { top: 27px; transform: rotate(-4deg); }
.site-footer .footer-wave-two { top: 34px; opacity: .62; transform: rotate(5deg); }
.site-footer .footer-brand-name { display: block; color: white; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; line-height: 1.15; }
.site-footer .footer-tagline { display: block; margin: 0 0 3px; color: #9fc5d4; font-size: .65rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.site-footer .footer-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; }
.site-footer .footer-nav span { color: #d8eaf0; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.site-footer .footer-nav span:last-child { color: var(--sun); }
.site-footer .footer-social { display: flex; align-items: center; gap: 12px; }
.site-footer .footer-social-label { color: #d8eaf0; font-size: .78rem; font-weight: 750; }
.site-footer .social-buttons { display: flex; gap: 8px; }
.site-footer .social-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; color: white; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.1); text-decoration: none; transition: .16s ease; }
.site-footer .social-button:hover { border-color: rgba(255,255,255,.48); background: rgba(255,255,255,.18); transform: translateY(-1px); }
.site-footer .social-button:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.site-footer .social-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.site-footer .social-button .social-dot, .site-footer .facebook-button svg { fill: currentColor; stroke: none; }
.site-footer .footer-bottom { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr); gap: 14px 32px; padding: 18px 30px 24px; border-top: 1px solid rgba(255,255,255,.12); }
.site-footer .footer-legal { display: grid; gap: 4px; }
.site-footer .footer-copyright { color: white; font-weight: 750; }
.site-footer .footer-disclaimer { max-width: 820px; color: #a9c6d1; }

.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 340px; padding: 12px 15px; border-radius: 11px; color: white; background: var(--blue-950); box-shadow: 0 12px 32px rgba(8,51,68,.25); font-size: .86rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.install-dialog {
  width: min(500px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 80px rgba(8,51,68,.28);
}
.install-dialog::backdrop { background: rgba(8,51,68,.58); backdrop-filter: blur(4px); }
.install-dialog form { position: relative; padding: 28px; text-align: center; }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: #eef6f8; font-size: 1.4rem; line-height: 1; }
.dialog-app-icon { margin: 0 auto 14px; }
.dialog-app-icon img { display: block; width: 78px; height: 78px; margin: auto; border-radius: 24px; box-shadow: 0 10px 24px rgba(7,89,133,.2); }
.install-dialog .section-kicker { margin: 0 0 12px; }
.install-dialog h2 { margin: 0 0 14px; font-family: inherit; font-size: 2rem; font-weight: 800; line-height: 1.12; letter-spacing: -.025em; }
.install-dialog .dialog-message { margin: 0 0 20px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.install-instructions { padding: 18px; border-radius: 16px; background: #eaf6fa; color: var(--muted); text-align: left; }
.install-instructions h3 { margin: 0 0 16px; color: var(--ink); font-size: 1.1rem; }
.bookmark-devices { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.bookmark-device { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 12px; }
.bookmark-device svg { display: block; width: 32px; height: 32px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bookmark-device .device-laptop { color: #087ca4; }
.device-laptop .device-fill { fill: #b1d6e4; }
.bookmark-device .device-iphone { color: #d6654c; }
.device-iphone .device-fill { fill: #fbe9e4; }
.bookmark-device .device-android { color: #ba810f; }
.device-android .device-fill { fill: #f7c64c; }
.bookmark-device .device-detail { fill: #083344; stroke: none; }
.bookmark-device strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: .96rem; }
.bookmark-device p { margin: 0; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.dialog-done { width: 100%; min-height: 46px; margin-top: 14px; border: 0; border-radius: 12px; color: white; background: var(--blue-900); font-weight: 850; }
@media (max-width: 480px) {
  .install-dialog form { padding: 24px 20px 20px; }
  .dialog-app-icon img { width: 64px; height: 64px; border-radius: 20px; }
  .install-dialog h2 { font-size: 1.75rem; }
  .install-instructions { padding: 15px; }
  .bookmark-device { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .bookmark-device svg { width: 28px; height: 28px; }
}

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 350px minmax(0,1fr); }
  .planner-panel { padding: 21px; }
  .results-panel { padding: 23px; }
  .plan-stats { grid-template-columns: repeat(2,1fr); }
  .plan-stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .plan-stat:nth-child(4) { border-top: 1px solid var(--line); }
  .route-map-header { align-items: start; flex-direction: column; gap: 8px; }
  .map-legend { justify-content: start; }
  .booking-checks { grid-template-columns: 1fr 1fr; }
  .check-links { grid-column: 1 / -1; flex-direction: row; gap: 18px; }
}

@media (max-width: 820px) {
  .app-shell { padding: 0 16px 28px; }
  .topbar { min-height: 80px; }
  .intro-strip { grid-template-columns: 1fr; }
  .intro-copy { padding: 34px 30px; }
  .aegean-photo { position: absolute; inset: 0; opacity: .28; }
  .aegean-photo::before { background: linear-gradient(90deg, var(--blue-950) 0%, rgba(8,51,68,.72) 65%, rgba(8,51,68,.42)); }
  .aegean-photo figcaption { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .planner-panel { position: static; }
  .results-panel { min-height: 0; }
  .booking-checks { grid-template-columns: 1fr; gap: 12px; }
  .check-links { grid-column: auto; }
}

@media (max-width: 580px) {
  html, body { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
  .app-shell, main, .workspace { width: 100%; max-width: 100%; min-width: 0; }
  .intro-strip, .workspace, .booking-checks { grid-template-columns: minmax(0, 1fr); }
  .workspace > *,
  .results-panel > *,
  #results-content,
  #results-content > *,
  .plan-banner > *,
  .map-heading > *,
  .leg > * {
    min-width: 0;
  }
  .topbar .eyebrow { font-size: .52rem; line-height: 1.2; letter-spacing: .03em; white-space: nowrap; transform: translateY(2px); }
  .topbar h1 { font-size: 1.18rem; }
  .brand-mark { width: 45px; height: 45px; border-radius: 14px; }
  .private-badge { min-height: 44px; padding: 10px; font-size: 0; }
  .private-badge span { display: none; }
  .private-badge svg { width: 21px; height: 21px; }
  .install-button { min-height: 44px; padding: 10px; }
  .install-button span { display: none; }
  .install-button svg { width: 21px; height: 21px; }
  .header-actions { gap: 8px; }
  .intro-strip,
  .planner-panel,
  .results-panel,
  .booking-checks,
  .site-footer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .intro-copy { padding: 30px 22px; }
  .planner-panel, .results-panel { border-radius: 18px; }
  .planner-panel, .results-panel { padding: 19px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .route-tabs { display: flex; overflow-x: auto; padding-bottom: 5px; scroll-snap-type: x mandatory; }
  .route-tab { flex: 0 0 74%; scroll-snap-align: start; }
  .flight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-map-canvas { margin: 0 9px; }
  .route-map-canvas svg { min-height: 250px; }
  .route-map-header { padding: 16px 15px 12px; }
  .map-key { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 10px 9px 13px; }
  .map-footnote { flex-direction: column; gap: 3px; padding: 0 11px 13px; }
  .results-heading { align-items: start; flex-direction: column; gap: 8px; }
  .map-heading { align-items: start; flex-direction: column; gap: 8px; }
  .map-legend { justify-content: start; }
  .route-map-viewport { min-height: 310px; aspect-ratio: auto; }
  .map-foot { flex-direction: column; gap: 3px; }
  .plan-banner { padding: 17px; }
  .score-ring { width: 58px; height: 58px; font-size: 1rem; }
  .route-line, .legs { padding-left: 16px; padding-right: 16px; }
  .pacing-note { margin-left: 16px; margin-right: 16px; }
  .leg { grid-template-columns: 32px minmax(0,1fr); }
  .leg-time { grid-column: 2; }
  .booking-checks { padding: 22px; }
  footer { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .site-footer .footer-primary { align-items: flex-start; flex-direction: column; padding: 24px 22px 20px; }
  .site-footer .footer-nav { justify-content: flex-start; }
  .site-footer .footer-social { width: 100%; justify-content: space-between; }
  .site-footer .footer-bottom { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 17px 22px 22px; }
  .print-route-button { width: 46px; height: 46px; }
}

@media screen and (max-width: 580px) {
  .map-legend { flex-wrap: nowrap; gap: 4px; padding: 12px 10px 0; font-size: clamp(.6875rem, 3vw, .8125rem); }
  .map-legend span { gap: 3px; padding: 7px 5px; white-space: nowrap; }
  .map-legend .legend-line { width: 16px; }
}

@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  @page { margin: 12mm; }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body { min-width: 0; background: white !important; }
  body { font-size: 11pt; }
  .app-shell { width: 100%; margin: 0; padding: 0; }
  .topbar, .intro-strip, .planner-panel, .booking-checks, .site-footer, .install-dialog, .toast { display: none !important; }
  main, .workspace { display: block; margin: 0; padding: 0; }
  .results-panel { width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: white; box-shadow: none; }
  .print-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0 0 10px;
    border-bottom: 2px solid #0b789e;
  }
  .print-brand-icon { flex: none; width: 32px; height: 32px; overflow: hidden; }
  .print-brand-icon .brand-mark {
    width: 54px !important;
    height: 54px !important;
    border-radius: 17px !important;
    box-shadow: none;
    transform: scale(.5926);
    transform-origin: top left;
  }
  .print-brand-copy { display: grid; gap: 2px; min-width: 0; }
  .print-brand-tagline {
    color: var(--blue-700);
    font-size: 7pt;
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: .105em;
    text-transform: uppercase;
  }
  .print-brand-name {
    color: var(--blue-900);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: .015em;
  }
  .print-route-button { display: none !important; }
  .results-heading { align-items: flex-end; margin-bottom: 14px; }
  .route-tabs { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .route-tab { break-inside: avoid; transform: none !important; }
  .route-map-card, .plan-banner, .route-line, .plan-stats, .pacing-note, .leg, .flight-snapshot, .flight-item { break-inside: avoid; }
  .route-map-card, .plan-overview, .flight-snapshot { box-shadow: none; }
  .plan-overview { overflow: visible; }
  .route-map-card { isolation: auto; }
  .route-map-viewport {
    min-height: 0;
    height: auto !important;
    aspect-ratio: 900 / 440;
    background: #e8f7fb !important;
  }
  .route-map-viewport::before {
    display: none !important;
    content: none !important;
    background: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .route-map-viewport svg {
    display: none !important;
  }
  .print-map-image {
    display: block !important;
    width: 100%;
    height: auto;
  }
  .legend-line { filter: none !important; }
  .plan-stats { grid-template-columns: repeat(4, 1fr); }
  .plan-stat:nth-child(3), .plan-stat:nth-child(4) { border-top: 0; }
  .plan-stat:nth-child(3) { border-left: 1px solid var(--line); }
}
