/* ============================================================
   Europe 2027 — family trip planner
   ============================================================ */
:root {
  --bg: #f8f5ef;
  --bg-2: #f1ece3;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #17222e;
  --ink-2: #3c4a58;
  --muted: #6c7884;
  --line: #e4ddd1;
  --line-2: #efe9df;
  --navy: #16324f;
  --sea: #1f6fa8;
  --sea-soft: #e3f0f9;
  --alp: #2e7a57;
  --alp-soft: #e2f2ea;
  --sun: #e2703a;
  --sun-soft: #fdebe1;
  --gold: #c8942b;
  --gold-soft: #fbf1db;
  --lake: #3a8c9c;
  --lake-soft: #e0f1f3;
  --city: #7a5aa6;
  --city-soft: #efe8f7;
  --danger: #c0392b;
  --ok: #2e7d32;
  --p-a: #2f6fdb;      /* person A (Dad) */
  --p-a-soft: #e5eefc;
  --p-b: #d6457a;      /* person B (Mom) */
  --p-b-soft: #fbe6ee;
  --shadow: 0 1px 2px rgba(23,34,46,.06), 0 4px 16px rgba(23,34,46,.06);
  --shadow-lg: 0 10px 40px rgba(23,34,46,.18);
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --maxw: 1240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161c; --bg-2: #161d25; --surface: #1a222c; --surface-2: #1f2833;
    --ink: #eef2f6; --ink-2: #c7d0da; --muted: #8e9aa6; --line: #2c3743; --line-2: #25303b;
    --navy: #cfe1f5; --sea: #6db3e6; --sea-soft: #16293a; --alp: #6cc49a; --alp-soft: #15291f;
    --sun: #f39a6b; --sun-soft: #33231a; --gold: #e5b95a; --gold-soft: #302814; --lake: #6cc3d2; --lake-soft: #14292d;
    --city: #b39ae0; --city-soft: #251d33; --p-a: #79a7f5; --p-a-soft: #1a2640; --p-b: #f07fa7; --p-b-soft: #3a1b28;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161c; --bg-2: #161d25; --surface: #1a222c; --surface-2: #1f2833;
  --ink: #eef2f6; --ink-2: #c7d0da; --muted: #8e9aa6; --line: #2c3743; --line-2: #25303b;
  --navy: #cfe1f5; --sea: #6db3e6; --sea-soft: #16293a; --alp: #6cc49a; --alp-soft: #15291f;
  --sun: #f39a6b; --sun-soft: #33231a; --gold: #e5b95a; --gold-soft: #302814; --lake: #6cc3d2; --lake-soft: #14292d;
  --city: #b39ae0; --city-soft: #251d33; --p-a: #79a7f5; --p-a-soft: #1a2640; --p-b: #f07fa7; --p-b-soft: #3a1b28;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; line-height: 1.15; margin: 0 0 .4em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 2.8vw, 30px); }
h3 { font-size: 19px; }
h4 { font-size: 16px; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 .8em; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sea); outline-offset: 0; border-color: transparent; }
textarea { width: 100%; min-height: 70px; resize: vertical; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; background: var(--surface); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); min-height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none !important; flex-shrink: 0; }
.brand-mark { font-size: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--display); font-size: 18px; }
.brand-text small { color: var(--muted); font-size: 11px; }
.mainnav { display: flex; gap: 2px; flex: 1; justify-content: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { color: var(--ink-2); padding: 7px 10px; border-radius: 8px; font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none; }
.mainnav a:hover { background: var(--bg-2); }
.mainnav a.active { background: var(--navy); color: var(--surface); }
.topbar-tools { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.icon-btn { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; cursor: pointer; color: var(--ink); text-decoration: none !important; font-size: 14px; line-height: 1.2; display: inline-flex; gap: 5px; align-items: center; }
.icon-btn:hover { background: var(--bg-2); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.sync-dot.ok { background: var(--ok); } .sync-dot.err { background: var(--danger); } .sync-dot.busy { background: var(--gold); }
.who-pill { border: 0; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: #fff; }
.who-pill.a { background: var(--p-a); } .who-pill.b { background: var(--p-b); }
.menu-btn { display: none; }
@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 8px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 11px 14px; font-size: 15px; }
}
@media (max-width: 520px) { .hide-sm { display: none; } .brand-text small { display: none; } .topbar-inner { gap: 8px; padding: 8px 12px; } }

/* ---------- layout ---------- */
main { min-height: 70vh; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 40px; }
.section { margin: 30px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head p { margin: 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cards.sm { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0,1fr); } .cards, .cards.sm { grid-template-columns: minmax(0,1fr); } .wrap { padding: 16px 16px 32px; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel.flat { box-shadow: none; }
.panel h3:first-child, .panel h4:first-child { margin-top: 0; }
.callout { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--sea-soft); border-left: 4px solid var(--sea); }
.callout.warn { background: var(--sun-soft); border-color: var(--sun); }
.callout.good { background: var(--alp-soft); border-color: var(--alp); }
.callout.gold { background: var(--gold-soft); border-color: var(--gold); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; background: var(--navy); color: var(--surface); border: 1px solid var(--navy); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none !important; line-height: 1.2; }
.btn:hover { filter: brightness(1.12); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--bg-2); filter: none; }
.btn.ghost { background: transparent; color: var(--sea); border-color: transparent; padding: 6px 8px; }
.btn.ghost:hover { background: var(--sea-soft); filter: none; }
.btn.sun { background: var(--sun); border-color: var(--sun); color: #fff; }
.btn.alp { background: var(--alp); border-color: var(--alp); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 11px; font-size: 13px; cursor: pointer; color: var(--ink-2); white-space: nowrap; user-select: none; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.tag.beach { background: var(--sea-soft); color: var(--sea); }
.tag.mountain { background: var(--alp-soft); color: var(--alp); }
.tag.lake { background: var(--lake-soft); color: var(--lake); }
.tag.city { background: var(--city-soft); color: var(--city); }
.tag.ac { background: var(--sea-soft); color: var(--sea); }
.tag.ac-none { background: var(--sun-soft); color: var(--sun); }
.tag.gold { background: var(--gold-soft); color: var(--gold); }
.tag.good { background: var(--alp-soft); color: var(--alp); }
.tag.warn { background: var(--sun-soft); color: var(--sun); }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; border-radius: 0 0 26px 26px; overflow: hidden; min-height: 430px; display: flex; align-items: flex-end; background: #16324f; }
.hero-bg { position: absolute; inset: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 3px; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,22,36,.05) 20%, rgba(10,22,36,.78) 100%); }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 40px 18px 34px; }
.hero h1 { color: #fff; font-size: clamp(32px, 5.5vw, 60px); margin-bottom: 6px; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero p.lead { font-size: clamp(15px, 1.8vw, 19px); max-width: 760px; opacity: .95; }
.hero .facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero .fact { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.hero .fact b { display: block; font-size: 17px; }
@media (max-width: 640px) { .hero-bg { grid-template-columns: 1fr; } .hero-bg img:nth-child(n+2) { display: none; } .hero { min-height: 380px; border-radius: 0 0 18px 18px; } }

.page-hero { position: relative; height: 360px; overflow: hidden; background: var(--navy); color: #fff; }
.page-hero img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,22,36,0) 30%, rgba(10,22,36,.8) 100%); }
.page-hero .inner { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 18px 22px; }
.page-hero h1 { color: #fff; margin-bottom: 4px; }
.page-hero .credit { position: absolute; right: 10px; top: 10px; z-index: 3; font-size: 11px; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 6px; color: #fff; }
.page-hero .credit a { color: #fff; }
@media (max-width: 640px) { .page-hero { height: 280px; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.card .media { position: relative; aspect-ratio: 16/10; background: var(--bg-2); overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .media img { transform: scale(1.03); }
.card .media .overlay-tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.card .media .overlay-tags .tag { background: rgba(255,255,255,.92); }
.card .media .overlay-right { position: absolute; right: 10px; top: 10px; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .body h3 { margin: 0; font-size: 19px; }
.card .body h3 a { color: var(--ink); }
.card .body .sub { color: var(--muted); font-size: 13.5px; margin: 0; }
.card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.media-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 150px; gap: 2px; background: var(--bg-2); }
.media-strip img { width: 100%; height: 100%; object-fit: cover; }
.route-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13.5px; }
.route-line .stop { background: var(--bg-2); border-radius: 7px; padding: 2px 8px; font-weight: 600; }
.route-line .stop small { font-weight: 500; color: var(--muted); }
.route-line .arrow { color: var(--muted); }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.stat-row b { color: var(--ink); }
.scorebar { display: grid; grid-template-columns: 92px 1fr 22px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.scorebar .bar { height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.scorebar .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sea), var(--alp)); }
.dots { letter-spacing: 1px; color: var(--gold); font-size: 12px; }
.dots .off { color: var(--line); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- reactions (Dad / Mom) ---------- */
.react { display: inline-flex; gap: 4px; align-items: center; }
.react .rbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 3px 9px 3px 7px; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; color: var(--ink-2); }
.react .rbtn .who { font-weight: 700; font-size: 11px; }
.react .rbtn.a .who { color: var(--p-a); } .react .rbtn.b .who { color: var(--p-b); }
.react .rbtn.mine { border-width: 2px; }
.react .rbtn.a.mine { border-color: var(--p-a); } .react .rbtn.b.mine { border-color: var(--p-b); }
.react .rbtn.theirs { cursor: default; opacity: .9; }
.react .rbtn.love.a { background: var(--p-a-soft); } .react .rbtn.love.b { background: var(--p-b-soft); }
.react-menu { position: absolute; z-index: 3000; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; display: flex; gap: 2px; }
.react-menu button { border: 0; background: transparent; border-radius: 8px; padding: 6px 9px; cursor: pointer; font-size: 13px; }
.react-menu button:hover { background: var(--bg-2); }

/* ---------- comments ---------- */
.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; font-size: 14px; }
.comment .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.comment .meta b.a { color: var(--p-a); } .comment .meta b.b { color: var(--p-b); }
.comment .meta button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 11.5px; }
.comment-form { display: flex; gap: 6px; }
.comment-form input { flex: 1; min-width: 0; }

/* ---------- page header / tabs ---------- */
.page-head { margin-bottom: 18px; }
.page-head .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--sun); font-weight: 700; }
.subnav { position: sticky; top: 57px; z-index: 900; background: var(--bg); background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.subnav .in { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav .in::-webkit-scrollbar { display: none; }
.subnav a { padding: 5px 11px; border-radius: 99px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.subnav a:hover { background: var(--bg-2); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0 16px; }
.toolbar label { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

/* ---------- gallery & lightbox ---------- */
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gallery figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; aspect-ratio: 4/3; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 11px 9px; color: #fff; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); font-size: 13px; line-height: 1.3; }
.gallery figcaption b { display: block; font-size: 14.5px; }
.gallery.feature { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 170px; }
.gallery.feature figure { aspect-ratio: auto; }
.gallery.feature figure:first-child { grid-row: span 2; }
@media (max-width: 800px) { .gallery.feature { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; } }
.lightbox { position: fixed; inset: 0; z-index: 5000; background: rgba(8,12,18,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-width: 96vw; max-height: 78vh; max-height: 78dvh; object-fit: contain; border-radius: 8px; }
.lightbox .cap { color: #e8edf2; margin-top: 12px; text-align: center; max-width: 900px; font-size: 14px; }
.lightbox .cap a { color: #9cc8ef; }
.lightbox .lb-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: 0; font-size: 30px; width: 48px; height: 64px; border-radius: 10px; cursor: pointer; }
.lightbox .lb-prev { left: 12px; } .lightbox .lb-next { right: 12px; }
.lightbox .lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; background: rgba(255,255,255,.14); color: #fff; border: 0; font-size: 22px; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; }

/* ---------- stays ---------- */
.stay-card .media { aspect-ratio: 3/2; }
.stay-card .photo-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.88); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 15px; opacity: 0; transition: opacity .2s; color: #17222e; }
.stay-card:hover .photo-nav { opacity: 1; }
@media (hover: none) { .stay-card .photo-nav { opacity: 1; } }
.stay-card .photo-nav.prev { left: 8px; } .stay-card .photo-nav.next { right: 8px; }
.stay-card .photo-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; border-radius: 99px; padding: 1px 8px; }
.stay-card .price { font-size: 18px; font-weight: 700; }
.stay-card .price small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.amen { display: flex; gap: 5px; flex-wrap: wrap; }
.amen span { font-size: 11.5px; border-radius: 6px; padding: 2px 6px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.amen span.yes { background: var(--alp-soft); color: var(--alp); font-weight: 600; }
.amen span.no { text-decoration: line-through; opacity: .6; }
.dist { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; }
.dist b { color: var(--ink); }
.rating { font-weight: 600; font-size: 13px; }
.rating .star { color: var(--gold); }
.selected-ring { outline: 3px solid var(--alp); outline-offset: -3px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }

/* ---------- maps ---------- */
.map { height: 380px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 1; background: var(--bg-2); }
.map.tall { height: 520px; }
.map.short { height: 260px; }
.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 2px solid #fff; }
.pin span { transform: rotate(45deg); }
.pin.beach { background: var(--sea); } .pin.mountain { background: var(--alp); } .pin.lake { background: var(--lake); } .pin.city { background: var(--city); } .pin.home { background: var(--sun); }
.mini-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.price-pin { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 99px; padding: 1px 7px; font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.25); transform: translate(-50%, -50%); display: inline-block; }
.price-pin.sel { background: var(--alp); color: #fff; border-color: var(--alp); }
.club-pin { background: #f5b301; color: #222; border-radius: 6px; padding: 0 4px; font-size: 11px; font-weight: 700; border: 1px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); white-space: nowrap; }
.leaflet-popup-content { font: 13px/1.4 var(--font); margin: 10px 12px; }
.leaflet-popup-content img { border-radius: 8px; margin-bottom: 6px; }
.map-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* ---------- timeline ---------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 16px 30px; }
.timeline li::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; left: 1px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--sea); }
.timeline li.travel .dot { border-color: var(--sun); }
.timeline li.flight .dot { border-color: var(--city); }
.timeline .date { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.timeline .what { font-weight: 600; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.day { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--surface); font-size: 12.5px; }
.day .d { font-weight: 700; font-size: 12px; color: var(--muted); }
.day.move { background: var(--sun-soft); border-color: transparent; }
.day.fly { background: var(--city-soft); border-color: transparent; }

/* ---------- builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .builder { grid-template-columns: minmax(0,1fr); } }
.builder .sticky { position: sticky; top: 72px; }
@media (max-width: 980px) { .builder .sticky { position: static; } }
.stop-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stop-card .stop-head { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; padding: 10px; }
.stop-card .stop-head img { width: 96px; height: 72px; object-fit: cover; border-radius: 9px; }
.stop-card .stop-title { font-weight: 700; font-size: 16px; }
.stop-card .stop-dates { font-size: 12.5px; color: var(--muted); }
.stop-card .stop-body { border-top: 1px solid var(--line-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.nights { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.nights button { border: 0; background: var(--surface-2); width: 30px; height: 30px; cursor: pointer; font-size: 16px; }
.nights span { min-width: 64px; text-align: center; font-weight: 700; font-size: 13.5px; }
.reorder { display: flex; flex-direction: column; gap: 2px; }
.reorder button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 26px; height: 22px; cursor: pointer; font-size: 11px; line-height: 1; }
.transfer { display: flex; gap: 10px; align-items: center; padding: 8px 12px; margin: 6px 0 6px 30px; border-left: 3px dashed var(--sun); font-size: 13px; color: var(--ink-2); }
.transfer .ico { font-size: 18px; }
.transfer b { color: var(--ink); }
.ease { display: inline-flex; gap: 2px; }
.ease i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); display: inline-block; }
.ease i.on { background: var(--alp); }
.chosen-stay { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 7px; }
.chosen-stay img { width: 70px; height: 52px; border-radius: 7px; object-fit: cover; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.sum-line:last-child { border-bottom: 0; }
.sum-total { font-size: 22px; font-weight: 750; font-family: var(--display); }
.flight-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.flight-box .fl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .flight-box .fl-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.field input, .field select { font-size: 14px; }
.warn-list { margin: 0; padding-left: 18px; color: var(--sun); font-size: 13.5px; }

/* ---------- drawer / modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,16,24,.55); z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 18px; max-width: 640px; width: 100%; max-height: 90vh; max-height: 90dvh; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow-lg); padding: 22px; }
.modal.wide { max-width: 1100px; }
.modal .modal-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 10px; }
.modal .x { border: 0; background: var(--bg-2); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 18px; flex-shrink: 0; }
#toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(120px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 6000; transition: transform .25s; max-width: 90vw; box-shadow: var(--shadow-lg); }
#toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- misc ---------- */
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--line); border-top-color: var(--sea); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 40px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.list-plain li:last-child { border-bottom: 0; }
ul.tight { margin: 0; padding-left: 18px; } ul.tight li { margin: 3px 0; }
.pros li::marker { content: "✓  "; color: var(--alp); } .cons li::marker { content: "✗  "; color: var(--sun); }
.big-num { font-family: var(--display); font-size: 28px; font-weight: 750; line-height: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.activity { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.activity:last-child { border-bottom: 0; }
.activity .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); font-size: 17px; }
.activity h4 { margin: 0 0 2px; }
.check-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.check-item input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--alp); }
.check-item.done .t { text-decoration: line-through; color: var(--muted); }
.pill-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pill-toggle button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; font-size: 13px; }
.pill-toggle button.on { background: var(--navy); color: var(--surface); }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.anchor { scroll-margin-top: 120px; }
details.more summary { cursor: pointer; color: var(--sea); font-weight: 600; font-size: 14px; margin: 6px 0; }
.score-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.score-pill { font-size: 12px; background: var(--bg-2); border-radius: 8px; padding: 3px 8px; }
.score-pill b { font-size: 12.5px; }
.cmp-table td:first-child { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.date-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.date-grid .dh { font-size: 11px; text-align: center; color: var(--muted); font-weight: 700; }
.date-grid a, .date-grid span.blank { display: block; text-align: center; padding: 7px 2px; border-radius: 8px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.date-grid a:hover { background: var(--sea-soft); border-color: var(--sea); }
.date-grid a.sel { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.date-grid span.blank { visibility: hidden; }

/* ---------- iPhone / touch ---------- */
button, .btn, .chip, a, [data-lb], [data-react-btn] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.map-activate { position: absolute; inset: 0; z-index: 800; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.25)); cursor: pointer; }
.map-activate span { background: rgba(23,34,46,.85); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 99px; }
@media (max-width: 820px) {
  input, select, textarea, .field input, .field select, .comment-form input { font-size: 16px !important; } /* stop iOS zoom-on-focus */
}
@media (max-width: 640px) {
  .map { height: 300px; } .map.tall { height: 380px; } .map.short { height: 230px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .modal { padding: 16px; border-radius: 16px; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .page-head h1 { font-size: 30px; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stop-card .stop-head { grid-template-columns: 72px 1fr auto; }
  .stop-card .stop-head img { width: 72px; height: 58px; }
  .transfer { margin-left: 12px; }
  .toolbar { gap: 8px; }
  table { font-size: 13px; }
}
@media (pointer: coarse) {
  .react .rbtn { padding: 7px 12px 7px 10px; font-size: 13.5px; }
  .react-menu button { padding: 10px 12px; font-size: 15px; }
  .chip { padding: 7px 13px; font-size: 14px; }
  .btn.sm { padding: 8px 12px; }
  .btn.ghost.sm { padding: 8px 10px; }
  .nights button { width: 42px; height: 40px; font-size: 18px; }
  .reorder button { width: 36px; height: 32px; font-size: 13px; }
  .stay-card .photo-nav { opacity: 1; width: 36px; height: 36px; font-size: 18px; }
  .comment .meta button { padding: 6px 4px; }
  .check-item input[type=checkbox] { width: 24px; height: 24px; }
  .date-grid a { padding: 10px 2px; }
  .mainnav a { padding: 13px 14px; }
}

@media (max-width: 460px) {
  .topbar-inner { gap: 6px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .brand { gap: 6px; min-width: 0; flex-shrink: 1; }
  .brand-mark { font-size: 20px; }
  .brand-text strong { font-size: 16px; white-space: nowrap; }
  .topbar-tools { gap: 5px; margin-left: auto; }
  .icon-btn { padding: 7px 9px; }
  .who-pill { padding: 7px 11px; font-size: 13px; }
  .hide-xs { display: none; }
}

.split { grid-template-columns: minmax(0, var(--split, 1.4fr)) minmax(0, 1fr); }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

.stay-card .media { touch-action: pan-y; }
.stay-card .media img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.dist { flex-direction: column; gap: 3px; }
@media (max-width: 640px) {
  .toolbar > .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; width: calc(100% + 32px); }
  .toolbar > .chips::-webkit-scrollbar { display: none; }
}
