@font-face { font-family: 'Fraunces'; font-weight: 400 800; font-display: swap; src: url(fonts/fraunces.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url(fonts/inter.woff2) format('woff2'); }

:root {
  --ink: #1d1b2b; --ink-2: #4b4860; --muted: #7c788f; --line: rgba(29, 27, 43, .09);
  --paper: #f7f4ef; --card: #ffffff; --night: #14122b; --night-2: #241d45;
  --sun: #ffb36b; --coral: #ff6b6b; --gold: #ffd27a; --sky: #9fb8ff;
  --a-drinks: #f2a23a; --a-parks: #38a169; --a-camping: #1e9e9a; --a-walks: #4a8fe7; --a-sights: #8b5cf6;
  --ok: #2e9e6b; --warn: #d98a13;
  --radius: 18px; --shadow: 0 1px 2px rgba(20, 18, 43, .05), 0 12px 30px -12px rgba(20, 18, 43, .22);
  --ease: cubic-bezier(0.23, 1, 0.32, 1); --ease-io: cubic-bezier(0.77, 0, 0.175, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); overflow-x: clip; }
body { font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--paper); min-height: 100vh; overflow-x: clip; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }

/* ---------------------------------------------------------------- top bar */
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 4vw, 40px); color: #fff; }
.topbar.solid { position: sticky; background: rgba(247, 244, 239, .86); color: var(--ink); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px var(--serif); letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
.b-ring { fill: none; stroke: currentColor; stroke-opacity: .25; stroke-width: 1.5; }
.b-sun { fill: var(--sun); }
.b-wave { fill: none; stroke: var(--sky); stroke-width: 2.4; stroke-linecap: round; }
.ghost { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: inherit; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; transition: background-color .2s ease; }
.solid .ghost { background: var(--card); border-color: var(--line); }
.ghost b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 12px; }
.ghost b:empty { display: none; }
@media (hover: hover) and (pointer: fine) { .ghost:hover { background: rgba(255, 255, 255, .2); } .solid .ghost:hover { background: #fff; } }

/* ---------------------------------------------------------------- hero / planner */
.hero { position: relative; min-height: 100vh; padding: 110px clamp(16px, 4vw, 40px) 60px; color: #fff; overflow: hidden;
  background: radial-gradient(1100px 600px at 80% 0%, rgba(255, 140, 90, .28), transparent 60%), radial-gradient(900px 700px at 0% 100%, rgba(120, 140, 255, .22), transparent 60%), linear-gradient(160deg, var(--night) 0%, var(--night-2) 60%, #3a1f45 100%); }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; max-width: 1040px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.hero-title { margin: 14px 0 14px; font: 600 clamp(40px, 7vw, 82px)/1.02 var(--serif); letter-spacing: -.025em; }
.hero-title em { font-style: italic; font-weight: 500; background: linear-gradient(100deg, var(--gold), var(--sun) 40%, var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 640px; font-size: 18px; color: rgba(255, 255, 255, .78); }

.glass { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 26px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); }
.finder { margin-top: 34px; padding: clamp(18px, 3vw, 30px); display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px 28px; }
.field { min-width: 0; position: relative; }
.field > label, .lbl { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .62); margin-bottom: 10px; }
.field-day, .field-acts, .cta, .finder .form-msg { grid-column: 1 / -1; }
.from-row { display: flex; gap: 8px; }
.from-row input { flex: 1; min-width: 0; height: 54px; padding: 0 18px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(10, 8, 30, .35); color: #fff; font-size: 17px; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.from-row input::placeholder { color: rgba(255, 255, 255, .45); }
.from-row input:focus { border-color: var(--sun); box-shadow: 0 0 0 4px rgba(255, 179, 107, .18); }
.locate { width: 54px; flex: none; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(10, 8, 30, .35); display: grid; place-items: center; transition: border-color .2s ease, transform .12s var(--ease); }
.locate svg { width: 22px; height: 22px; fill: var(--sun); stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.locate.busy svg { animation: spin 1s linear infinite; }
.locate:active { transform: scale(.94); }
@keyframes spin { to { transform: rotate(360deg); } }
.suggest { position: absolute; z-index: 20; left: 0; right: 62px; top: calc(100% + 6px); list-style: none; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); overflow: hidden; transform-origin: top; animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.suggest li { padding: 11px 16px; cursor: pointer; border-top: 1px solid var(--line); }
.suggest li:first-child { border-top: 0; }
.suggest li b { display: block; font-weight: 600; }
.suggest li small { color: var(--muted); }
.suggest li[aria-selected="true"], .suggest li:hover { background: #fff6ec; }

.drive-val { display: flex; align-items: baseline; gap: 8px; margin: -4px 0 10px; }
.drive-val b { font: 600 46px/1 var(--serif); font-variant-numeric: tabular-nums; }
.drive-val span { color: rgba(255, 255, 255, .7); }
.range-wrap { position: relative; height: 34px; }
.range-wrap input { position: absolute; inset: 0; width: 100%; -webkit-appearance: none; appearance: none; background: transparent; z-index: 2; }
.range-wrap::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.range-wrap::after { content: ""; position: absolute; left: 0; top: 15px; height: 4px; border-radius: 4px; width: var(--fill, 50%); background: linear-gradient(90deg, var(--gold), var(--coral)); }
.range-wrap input::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: transparent; cursor: grab; }
.range-wrap input::-moz-range-thumb { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; cursor: grab; }
.range-car { position: absolute; top: 4px; left: var(--fill, 50%); width: 34px; height: 24px; transform: translateX(-50%); display: grid; place-items: center; background: #fff; border-radius: 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); pointer-events: none; z-index: 1; }
.range-car svg { width: 24px; height: 15px; fill: var(--coral); }
.range-wrap input:focus-visible + .range-car { outline: 3px solid var(--sun); outline-offset: 2px; }

.days { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.day { flex: none; scroll-snap-align: start; width: 86px; padding: 10px 8px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(10, 8, 30, .3); color: #fff; text-align: center; transition: border-color .2s ease, background-color .2s ease, transform .15s var(--ease); }
.day small { display: block; font-size: 12px; color: rgba(255, 255, 255, .62); font-weight: 600; letter-spacing: .04em; }
.day b { display: block; font-size: 15px; margin-top: 2px; }
.day .wx { width: 34px; height: 34px; margin: 6px auto 2px; }
.day .t { font-size: 13px; color: rgba(255, 255, 255, .8); }
.day[aria-checked="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.day[aria-checked="true"] small, .day[aria-checked="true"] .t { color: var(--ink-2); }
.day:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .day:not([aria-checked="true"]):hover { border-color: rgba(255, 255, 255, .4); } }

.acts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.act { --c: #fff; position: relative; display: grid; justify-items: center; gap: 8px; padding: 16px 8px 14px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(10, 8, 30, .3); color: #fff;
  transition: border-color .2s ease, background-color .25s ease, transform .15s var(--ease); }
.act .ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 22%, transparent); transition: transform .35s var(--ease), background-color .25s ease; }
.act .ico svg { width: 26px; height: 26px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act span { font-weight: 600; font-size: 14px; }
.act .tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--c); display: grid; place-items: center; transform: scale(0); transition: transform .3s var(--ease); }
.act .tick svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.act[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, rgba(10, 8, 30, .3)); }
.act[aria-pressed="true"] .tick { transform: scale(1); }
.act[aria-pressed="true"] .ico { transform: translateY(-2px) rotate(-6deg); background: var(--c); }
.act[aria-pressed="true"] .ico svg { stroke: #fff; }
.act:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .act:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); } }

.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 58px; padding: 0 28px; border: 0; border-radius: 16px; color: #1c0e00; font-weight: 700; font-size: 17px;
  background: linear-gradient(100deg, var(--gold), var(--sun) 45%, var(--coral)); background-size: 160% 100%; background-position: 0 0; box-shadow: 0 14px 30px -10px rgba(255, 107, 107, .6);
  transition: background-position .5s var(--ease), transform .12s var(--ease), box-shadow .2s ease; }
.cta svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .6; cursor: default; }
@media (hover: hover) and (pointer: fine) { .cta:hover { background-position: 100% 0; } .cta:hover svg { transform: translateX(4px); } }
.form-msg { min-height: 1.4em; color: #ffb4b4; font-weight: 500; }
.form-msg:empty { min-height: 0; }

/* ---------------------------------------------------------------- loading */
.loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 90px 20px 40px; text-align: center; background: linear-gradient(160deg, var(--night), var(--night-2)); color: #fff; }
.road-wrap { position: relative; width: min(600px, 90vw); aspect-ratio: 600 / 220; }
.road { width: 100%; height: 100%; overflow: visible; }
.road path { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 18; stroke-linecap: round; }
.road .road-dash { stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-dasharray: 10 12; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.pin circle { fill: var(--sun); stroke: var(--night); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: pinpop 2.4s var(--ease) infinite; }
.p2 circle { animation-delay: .5s; fill: var(--a-walks); } .p3 circle { animation-delay: 1s; fill: var(--a-parks); }
@keyframes pinpop { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.45); } 30% { transform: scale(1); } }
.car { position: absolute; left: 0; top: 0; width: 44px; height: 28px; offset-path: path('M10 170 C 120 170, 120 60, 230 60 S 360 170, 470 120 S 560 40, 590 50'); offset-rotate: auto; animation: drive 3.4s var(--ease-io) infinite; }
.car svg { width: 100%; height: 100%; fill: #fff; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
@keyframes drive { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.load-title { font: 600 34px var(--serif); margin-top: 10px; }
.load-msg { color: rgba(255, 255, 255, .75); min-height: 1.5em; }
.load-msg.swap { animation: msgin .35s var(--ease); }
@keyframes msgin { from { opacity: 0; transform: translateY(6px); } }
.load-bar { width: min(420px, 80vw); height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(.04); background: linear-gradient(90deg, var(--gold), var(--coral)); transition: transform .6s var(--ease); }

/* ---------------------------------------------------------------- results */
.results { padding: 0 clamp(16px, 3vw, 32px) 120px; }
.res-head { max-width: 1500px; margin: 0 auto; padding: 24px 0 18px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 4px 0; margin-bottom: 6px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .back:hover svg { transform: translateX(-3px); } }
.res-head h2 { font: 600 clamp(28px, 4vw, 42px)/1.1 var(--serif); letter-spacing: -.02em; }
.res-sub { color: var(--ink-2); margin-top: 6px; }
.res-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --c: var(--ink); display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip small { color: var(--muted); font-weight: 600; }
.chip[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-selected="true"] small { color: rgba(255, 255, 255, .7); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.seg button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: background-color .2s ease, color .2s ease; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.res-body { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 40%); gap: 24px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.map-col { position: sticky; top: 78px; }
.map { height: calc(100vh - 110px); min-height: 380px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e8e4dc; }
.map.tall { height: 460px; }

.card { --c: var(--ink); position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .2s ease; }
.card.in { animation: cardin .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes cardin { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.card.hl { border-color: var(--c); }
@media (hover: hover) and (pointer: fine) { .card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(20, 18, 43, .05), 0 24px 44px -16px rgba(20, 18, 43, .32); } .card:hover .ph img { transform: scale(1.06); } }
.ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 60%, #fff), color-mix(in srgb, var(--c) 85%, #000)); }
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity .6s ease, transform 1.2s var(--ease); }
.ph img.ok { opacity: 1; }
.ph .noimg { position: absolute; inset: 0; display: grid; place-items: center; }
.ph .noimg svg { width: 56px; height: 56px; fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ph .kind { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.ph .kind i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ph .star { position: absolute; right: 12px; top: 12px; padding: 5px 9px; border-radius: 999px; background: rgba(20, 18, 43, .72); color: var(--gold); font-size: 12px; font-weight: 700; }
.ph .wxpill { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 999px; background: rgba(20, 18, 43, .72); color: #fff; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.ph .wxpill .wx { width: 24px; height: 24px; }
.ph .wxpill small { color: #b8c8ff; font-weight: 600; }
.cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cbody h3 { font: 600 19px/1.2 var(--serif); letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cfoot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; }
.add { flex: 1; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #faf8f4; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .12s var(--ease); }
.add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.add[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.add:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .add:not([aria-pressed="true"]):hover { border-color: var(--ink); } }
.lnk { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: color .2s ease, border-color .2s ease; }
.lnk svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .lnk:hover { color: var(--ink); border-color: var(--ink); } }
.empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; color: var(--ink-2); background: var(--card); border-radius: var(--radius); }
.empty b { display: block; font: 600 24px var(--serif); color: var(--ink); margin-bottom: 6px; }

/* map pins */
.pinicon { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); transition: transform .2s var(--ease); }
.pinicon.hl { transform: rotate(-45deg) scale(1.3); }
.pinicon.num { display: grid; place-items: center; }
.pinicon.num b { transform: rotate(45deg); color: #fff; font: 700 13px var(--sans); }
.homeicon { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); display: grid; place-items: center; }
.homeicon svg { width: 16px; height: 16px; fill: #fff; }
.leaflet-container { font-family: var(--sans); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.route-line { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: routedraw 2.2s var(--ease) forwards; }
@keyframes routedraw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- tray + drawers */
.tray { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%); animation: trayin .45s var(--ease); }
@keyframes trayin { from { opacity: 0; transform: translate(-50%, 24px); } }
.tray-btn { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border: 0; border-radius: 22px; background: var(--night); color: #fff; box-shadow: 0 20px 50px -12px rgba(20, 18, 43, .6); text-align: left; transition: transform .15s var(--ease); }
.tray-btn:active { transform: scale(.98); }
.tray-btn small { display: block; color: rgba(255, 255, 255, .6); font-size: 12px; }
.tray-thumbs { display: flex; }
.tray-thumbs i { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--night); background: var(--c, #555) center/cover; margin-left: -14px; animation: thumbin .35s var(--ease); }
.tray-thumbs i:first-child { margin-left: 0; }
@keyframes thumbin { from { transform: scale(.6); opacity: 0; } }
.tray-go { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 9px 14px; border-radius: 14px; background: linear-gradient(100deg, var(--gold), var(--coral)); color: #1c0e00; font-weight: 700; font-size: 14px; }
.tray-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.tray.bump .tray-btn { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.05); } }

.drawer-wrap { position: fixed; inset: 0; z-index: 60; }
.drawer-shade { position: absolute; inset: 0; background: rgba(20, 18, 43, .45); opacity: 0; transition: opacity .3s ease; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: -30px 0 70px rgba(20, 18, 43, .3); transform: translateX(100%); transition: transform .38s var(--ease-drawer); }
.drawer.narrow { width: min(420px, 100vw); }
.drawer-wrap.open .drawer-shade { opacity: 1; }
.drawer-wrap.open .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 600 26px var(--serif); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 16px; align-content: start; }
.drawer .lbl { color: var(--muted); margin-bottom: 0; display: grid; gap: 8px; text-transform: uppercase; }
.drawer .lbl small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.drawer input, .drawer textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; letter-spacing: normal; text-transform: none; color: var(--ink); font-weight: 500; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.drawer input:focus, .drawer textarea:focus { border-color: var(--sun); box-shadow: 0 0 0 4px rgba(255, 179, 107, .2); }
.drawer-meta { color: var(--ink-2); font-size: 14px; margin-top: -6px; }
.stops { list-style: none; display: grid; gap: 10px; }
.stop { --c: var(--ink); display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); animation: cardin .35s var(--ease); }
.stop .th { width: 64px; height: 64px; border-radius: 12px; background: var(--c) center/cover; }
.stop b { display: block; font-weight: 600; line-height: 1.25; }
.stop small { color: var(--muted); font-size: 13px; }
.stop .time { width: 96px; margin-top: 6px; padding: 6px 8px; font-size: 14px; }
.stop-ctl { display: grid; gap: 4px; }
.stop-ctl button { width: 30px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #faf8f4; display: grid; place-items: center; }
.stop-ctl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stop-ctl button:disabled { opacity: .35; cursor: default; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--paper); }
.drawer-foot .form-msg { color: #c0392b; }
.cta.wide { width: 100%; }
.share-done { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: #fff7ea; border: 1px solid #ffdfb0; animation: cardin .4s var(--ease); }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; transition: transform .12s var(--ease), background-color .2s ease; }
.btn:active { transform: scale(.97); }
.ghost-btn { background: var(--card); color: var(--ink); border: 1px solid var(--line); flex: 1; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.route-sum { color: var(--ink-2); font-size: 14px; }
.route-sum b { color: var(--ink); }
.mine-list { list-style: none; display: grid; gap: 10px; }
.mine-list a { display: block; padding: 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; }
.mine-list b { display: block; font: 600 17px var(--serif); }
.mine-list small { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- shared plan view */
.planview { padding-bottom: 80px; }
.plan-hero { position: relative; min-height: 420px; display: flex; align-items: flex-end; padding: 110px clamp(16px, 4vw, 48px) 40px; color: #fff; overflow: hidden; background: var(--night); }
.plan-hero .bg { position: absolute; inset: 0; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.plan-hero .bg div { background: var(--c, #333) center/cover; animation: kb 18s ease-out both; }
.plan-hero .bg div:first-child { grid-row: 1 / 3; }
.plan-hero .bg div:nth-child(2):last-child { grid-row: 1 / 3; }   /* two photos: side by side, full height */
.plan-hero .bg.one { grid-template-columns: 1fr; } .plan-hero .bg.one div { grid-row: auto; }
@keyframes kb { from { transform: scale(1.12); } to { transform: scale(1); } }
.plan-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 18, 43, .25) 0%, rgba(20, 18, 43, .2) 40%, rgba(20, 18, 43, .92) 100%); }
.plan-hero .ph-inner { position: relative; z-index: 1; max-width: 1200px; width: 100%; margin: 0 auto; }
.plan-hero h1 { font: 600 clamp(34px, 6vw, 66px)/1.05 var(--serif); letter-spacing: -.02em; margin: 10px 0 12px; }
.plan-hero .facts { display: flex; flex-wrap: wrap; gap: 10px; }
.plan-hero .facts span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); font-weight: 600; font-size: 14px; }
.plan-hero .facts .wx { width: 24px; height: 24px; }
.plan-wrap { max-width: 1200px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 42%); gap: 32px; align-items: start; }
.plan-side { position: sticky; top: 80px; display: grid; gap: 10px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.plan-actions .btn { flex: none; }
.timeline { list-style: none; position: relative; display: grid; gap: 0; }
.tl-item { --c: var(--ink); position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding-bottom: 26px; }
.tl-item.in { animation: cardin .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.tl-item::before { content: ""; position: absolute; left: 26px; top: 46px; bottom: -6px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: #fff; font: 700 18px var(--serif); box-shadow: 0 10px 20px -8px var(--c); }
.tl-dot.home { background: var(--ink); }
.tl-dot svg { width: 22px; height: 22px; fill: #fff; }
.tl-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tl-card .ph { aspect-ratio: 16 / 8; }
.tl-card .cbody h3 { font-size: 22px; }
.tl-leg { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tl-leg svg { width: 16px; height: 14px; fill: currentColor; }
.tl-time { display: inline-block; padding: 3px 9px; border-radius: 8px; background: #fff3e0; color: #9a4b00; font-weight: 700; font-size: 13px; }
.tl-notes { margin-top: 4px; color: var(--ink-2); white-space: pre-wrap; }
.plan-notes { margin: 0 0 22px; padding: 16px 18px; border-radius: 16px; background: #fff7ea; border: 1px solid #ffdfb0; white-space: pre-wrap; }
.credits { color: var(--muted); font-size: 12px; margin-top: 20px; }
.credits a { color: inherit; }

/* weather icons (inline svg) */
.wx .sun-c { fill: #ffc24b; } .wx .rays { stroke: #ffc24b; stroke-width: 2; stroke-linecap: round; transform-origin: 16px 16px; animation: spin 18s linear infinite; }
.wx .cloud { fill: #dfe6f5; } .wx .cloud.dark { fill: #9aa7c0; }
.wx .drop { stroke: #6fb1ff; stroke-width: 2; stroke-linecap: round; animation: rain 1.1s linear infinite; }
.wx .drop:nth-of-type(2) { animation-delay: -.4s; } .wx .drop:nth-of-type(3) { animation-delay: -.75s; }
@keyframes rain { from { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(5px); opacity: 0; } }
.wx .flake { fill: #fff; } .wx .bolt { fill: #ffd34d; } .wx .fogl { stroke: #c8d0e0; stroke-width: 2.2; stroke-linecap: round; }
.wx .drift { animation: drift 6s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(2px); } }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80; transform: translateX(-50%); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 16px 40px rgba(20, 18, 43, .4); animation: toast .3s var(--ease); max-width: 90vw; text-align: center; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* entrance */
.intro .rise { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .res-body { grid-template-columns: 1fr; }
  .map-col { position: relative; top: 0; order: -1; }
  .map { height: 340px; }
  .plan-wrap { grid-template-columns: 1fr; }
  .plan-side { position: relative; top: 0; }
}
@media (max-width: 760px) {
  .finder { grid-template-columns: 1fr; }
  .acts { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-top: 90px; }
  .hero-sub { font-size: 16px; }
  .tray-go { display: none; }
}
@media (max-width: 420px) { .acts { grid-template-columns: repeat(2, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .intro .rise, .card.in, .tl-item.in, .stop, .share-done, .suggest, .tray, .toast { animation: fade .25s ease both !important; animation-delay: 0s !important; }
  @keyframes fade { from { opacity: 0; } }
  .car, .road .road-dash, .pin circle, .wx .rays, .wx .drop, .wx .drift, .plan-hero .bg div, .tray-thumbs i, .tray.bump .tray-btn { animation: none !important; }
  .car { offset-distance: 50%; }
  .route-line { animation: none; stroke-dashoffset: 0; }
  .drawer { transition: none; } .drawer-shade { transition: none; }
  .ph img, .card { transition: opacity .3s ease; }
  .card:hover { transform: none; }
}

/* OSM tiles are busier than the old basemap: soften them to sit with the paper palette */
.leaflet-tile-pane .tiles { filter: saturate(.7) contrast(.95) brightness(1.03); }
/* Leaflet panes use z-index 400+; keep them inside the map so drawers and the tray sit above */
.map { isolation: isolate; }
