/* ---------- tokens ---------- */
:root {
  --bg: #f6f3ee; --card: #ffffff; --ink: #1d1b19; --muted: #6d675f; --line: #e7e1d8; --soft: #f1ece4;
  --accent: #33415c; --accent-2: #e0a94a; --on-accent: #ffffff; --link: var(--accent);
  --ok: #2c6e49; --ok-bg: #e2f1e6; --warn: #8a5a0b; --warn-bg: #fbeed1; --err: #b3261e; --err-bg: #fbe5e2;
  --display: Georgia, 'Times New Roman', serif; --hello: var(--display);
  --title-case: none; --title-style: normal; --title-track: 0;
  --shadow: 0 1px 2px rgba(30, 20, 10, .06), 0 8px 24px rgba(30, 20, 10, .07);
  --r: 20px;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14'%3E%3Cpath d='M2 7h8M14 7h8' stroke='%23e0a94a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.theme-georgia {
  --bg: #f7f1e8; --soft: #f1e8da; --line: #e8dccb; --accent: #8c2f2a; --accent-2: #d49a2e;
  --display: Georgia, 'Times New Roman', serif; --hello: 'Sylfaen', 'Noto Serif Georgian', Georgia, serif;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M0 7l7-6 7 6-7 6zM14 7l7-6 7 6-7 6z' fill='none' stroke='%23d49a2e' stroke-width='1.4'/%3E%3Ccircle cx='7' cy='7' r='1.7' fill='%23d49a2e'/%3E%3Ccircle cx='21' cy='7' r='1.7' fill='%23d49a2e'/%3E%3C/svg%3E");
}
.theme-uzbekistan {
  --bg: #f2f6f7; --soft: #e4eef0; --line: #d6e3e6; --accent: #0e6f80; --accent-2: #d3a23a;
  --display: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; --title-track: .01em;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14'%3E%3Cg fill='none' stroke='%23d3a23a' stroke-width='1.3'%3E%3Cpath d='M10 1l6 6-6 6-6-6z'/%3E%3Crect x='5.800' y='2.800' width='8.400' height='8.400'/%3E%3C/g%3E%3C/svg%3E");
}
.theme-kyrgyzstan {
  --bg: #f3f6f2; --soft: #e6ede4; --line: #d9e3d6; --accent: #c0182b; --accent-2: #f4b400;
  --display: 'Bahnschrift', 'DIN Alternate', 'Arial Narrow', 'Roboto Condensed', sans-serif; --title-case: uppercase; --title-track: .03em;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14'%3E%3Cg fill='none' stroke='%23f4b400' stroke-width='1.3'%3E%3Ccircle cx='11' cy='7' r='5'/%3E%3Cpath d='M7 4q4 3 8 0M7 10q4-3 8 0M8 3q3 4 0 8M14 3q-3 4 0 8'/%3E%3C/g%3E%3C/svg%3E");
}
.theme-armenia {
  --bg: #fbf3ea; --soft: #f5e6d6; --line: #ecd9c4; --accent: #b8501a; --accent-2: #7a2e3b;
  --display: Cambria, 'Hoefler Text', Georgia, serif; --title-style: italic;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='14'%3E%3Cpath d='M0 13a8 8 0 0116 0M4 13a4 4 0 018 0' fill='none' stroke='%23fbe3c4' stroke-width='1.3'/%3E%3C/svg%3E");
}
.theme-turkey {
  --bg: #f1f7f8; --soft: #e1eef0; --line: #d2e4e7; --accent: #0c7a86; --accent-2: #e0344b;
  --display: 'Century Gothic', 'Avenir Next', 'Trebuchet MS', sans-serif; --title-track: -.01em;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14'%3E%3Cpath d='M0 7q5-9 10 0t10 0' fill='none' stroke='%23ffffff' stroke-width='1.500'/%3E%3Ccircle cx='10' cy='7' r='1.300' fill='%23e0344b'/%3E%3C/svg%3E");
}
[class*="theme-"] { --link: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root, [class*="theme-"] {
    --bg: #171513; --card: #211e1b; --ink: #efe9df; --muted: #a79f93; --line: #37322c; --soft: #2a2622;
    --ok: #8fd3a5; --ok-bg: #1f3526; --warn: #ecc679; --warn-bg: #3b3018; --err: #f2a29b; --err-bg: #44211e;
    --link: color-mix(in srgb, var(--accent) 45%, white);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2 { font-family: var(--display); font-weight: 600; font-style: var(--title-style); text-transform: var(--title-case); letter-spacing: var(--title-track); line-height: 1.15; margin: 0 0 .4rem; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.35rem; }
p { margin: 0 0 .6rem; }
code { background: var(--soft); padding: 0 .3em; border-radius: 4px; font-size: .9em; }
img { max-width: 100%; }
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { margin-bottom: 18px; }
.up { color: var(--err); }
.down { color: var(--ok); }
.num { text-align: right; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 54px; padding: 0 max(16px, calc((100vw - 1040px) / 2 + 16px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font: 600 1.25rem Georgia, serif; color: var(--ink); text-decoration: none; }
.brand .ic { color: var(--accent); width: 1.4em; height: 1.4em; }
.topnav { display: flex; align-items: center; gap: 16px; font-size: .92rem; }
.topnav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.topnav a:hover { color: var(--link); }
.topnav form { margin: 0; }

/* ---------- hero ---------- */
.hero { position: relative; height: 210px; overflow: hidden; background: #222; color: #fff; }
.hero.tall { height: min(62vh, 520px); min-height: 360px; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 8, 5, .82) 0%, rgba(12, 8, 5, .35) 45%, rgba(12, 8, 5, .1) 100%); }
.hero-in { position: absolute; z-index: 1; left: 0; right: 0; bottom: 14px; max-width: 1040px; margin: 0 auto; padding: 0 16px 22px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 4.4rem); margin: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.hero:not(.tall) h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.hello { font-family: var(--hello); font-size: clamp(1.2rem, 3vw, 1.7rem); color: var(--accent-2); margin: 0 0 2px; letter-spacing: .02em; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.crumb { margin: 0 0 2px; font-size: .9rem; }
.crumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.crumb a::before { content: '← '; }
.lede { max-width: 58ch; margin: 10px 0 14px; font-size: 1.05rem; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .85rem; background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .25); white-space: nowrap; }
.chip.strong { background: var(--accent-2); border-color: transparent; color: #1d1509; font-weight: 600; }
.ornament { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 14px; background: var(--accent) var(--orn) repeat-x center; }

/* ---------- trip tabs ---------- */
.tabs { position: sticky; top: 54px; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 6px 14px -12px rgba(0, 0, 0, .35); }
.tabs-in { display: flex; gap: 2px; overflow-x: auto; max-width: 1040px; margin: 0 auto; padding: 0 10px; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 13px 10px 11px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: .95rem; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--link); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- cards and layout ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; margin: 0 0 18px; }
.card.accent { outline: 2px solid var(--accent); }
.card.slim { padding: 14px 20px; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid .card { margin: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sec-head h2 { margin: 0; }
.sec-head a { font-size: .9rem; white-space: nowrap; }
.intro { padding: 18px 0 10px; }
.intro.second { padding-top: 26px; }
.big { font: 600 2.6rem/1 var(--display); margin: 4px 0 10px; }
.big span { font-size: 1.1rem; color: var(--muted); font-weight: 400; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.tag { display: inline-block; font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.flash { padding: 12px 16px; border-radius: 14px; margin: 0 0 18px; background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.foot { max-width: 1040px; margin: 0 auto; padding: 18px 16px 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

.bar { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; margin: 0 0 12px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; border-radius: 999px; }
.bar .w5 { width: 5%; } .bar .w10 { width: 10%; } .bar .w15 { width: 15%; } .bar .w20 { width: 20%; } .bar .w25 { width: 25%; }
.bar .w30 { width: 30%; } .bar .w35 { width: 35%; } .bar .w40 { width: 40%; } .bar .w45 { width: 45%; } .bar .w50 { width: 50%; }
.bar .w55 { width: 55%; } .bar .w60 { width: 60%; } .bar .w65 { width: 65%; } .bar .w70 { width: 70%; } .bar .w75 { width: 75%; }
.bar .w80 { width: 80%; } .bar .w85 { width: 85%; } .bar .w90 { width: 90%; } .bar .w95 { width: 95%; } .bar .w100 { width: 100%; }

ul.todo, ul.rows, ul.tasks, ul.points, ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
ul.todo li { padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line); position: relative; }
ul.todo li::before { content: ''; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
ul.todo li:last-child, ul.rows li:last-child, ul.plain li:last-child { border: 0; }
ul.todo span { display: block; font-size: .85rem; }
ul.rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.rows li > div { display: flex; flex-direction: column; min-width: 0; }
ul.rows .num { align-items: flex-end; flex: none; }
ul.rows .num.wrap { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; align-items: center; flex: 0 1 auto; font-size: .88rem; }
ul.rows span.muted { font-size: .85rem; overflow-wrap: anywhere; }
.codes { font: 600 1.1rem var(--display); letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.codes i { width: 26px; border-top: 2px dashed var(--accent-2); }

/* ---------- buttons and forms ---------- */
label { display: block; font-size: .85rem; color: var(--muted); flex: 1 1 150px; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack { display: grid; gap: 12px; max-width: 680px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row.add { margin-top: 12px; }
.btn { display: inline-block; padding: 10px 18px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 .95rem system-ui, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -6px var(--accent); }
.btn.ghost { background: transparent; color: var(--link); }
.btn.small { padding: 6px 13px; font-size: .85rem; }
.stack .btn { justify-self: start; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link.muted { color: var(--muted); }
.inline { display: inline; margin: 0; }
.inline select { display: inline-block; width: auto; padding: 4px 8px; margin: 0 0 0 4px; border-radius: 8px; }
.inline label { display: inline; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--link); font-size: .92rem; }
details[open] > summary { margin-bottom: 10px; }
.copy { display: flex; gap: 8px; }
.copy input { margin: 0; font-size: .85rem; }
.scroll { overflow-x: auto; }
table.mini { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.mini td, table.mini th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.mini th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
table.mini tr:last-child td { border: 0; }
table.mini .num { text-align: right; white-space: nowrap; }

/* ---------- home: trips and destinations ---------- */
.tripgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.tripcard, .dest { position: relative; display: block; overflow: hidden; border-radius: 24px; color: #fff; text-decoration: none; background: #222; box-shadow: var(--shadow); }
.tripcard { aspect-ratio: 16 / 10; }
.tripcard img, .dest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.tripcard:hover img, a.dest:hover img { transform: scale(1.05); }
.tripcard::after, .dest::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 6, 3, .85), rgba(10, 6, 3, .05) 65%); }
.tripcard-in, .dest > div { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tripcard b { font: 600 1.9rem/1.1 var(--display); font-style: var(--title-style); text-transform: var(--title-case); }
.tripcard .chip { margin-top: 6px; }
.destgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.dest { aspect-ratio: 4 / 5; border-radius: 20px; border-bottom: 6px solid var(--accent); }
.dest > div { left: 14px; right: 14px; bottom: 14px; font-size: .85rem; }
.dest b { font: 600 1.35rem/1.1 var(--display); font-style: var(--title-style); text-transform: var(--title-case); }
.dest .hello, .tripcard .hello { font-size: 1rem; color: #ffdf9e; }
.pick { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.pick legend { font-size: .85rem; color: var(--muted); padding: 0 0 6px; }
.pickitem { position: relative; cursor: pointer; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; color: #fff; }
.pickitem input { position: absolute; opacity: 0; }
.pickitem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); }
.pickitem span { position: absolute; left: 10px; bottom: 8px; right: 10px; font-size: .78rem; display: flex; flex-direction: column; }
.pickitem b { font: 600 1rem var(--display); }
.pickitem:has(input:checked) { outline: 3px solid var(--accent); outline-offset: 2px; }
.pickitem:has(input:checked) img { filter: none; }
.pickitem:has(input:focus-visible) { outline: 3px solid var(--ink); }

/* ---------- day strip ---------- */
.strip-wrap { margin-bottom: 18px; }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 14px; margin: 0 -16px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.daycard { position: relative; flex: 0 0 200px; height: 250px; border-radius: 18px; overflow: hidden; color: #fff; text-decoration: none; scroll-snap-align: start; background: #222; box-shadow: var(--shadow); }
.daycard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.daycard:hover img { transform: scale(1.06); }
.daycard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 6, 3, .88), rgba(10, 6, 3, 0) 70%); }
.daycard > div { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.daycard .n { font: 600 2.2rem/1 var(--display); color: var(--accent-2); }
.daycard .when { font-size: .78rem; opacity: .85; }
.daycard b { font: 600 1rem/1.2 var(--display); }

/* ---------- day / stop blocks with photo header ---------- */
.day { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin: 0 0 18px; scroll-margin-top: 120px; }
.day-head { position: relative; min-height: 150px; display: flex; align-items: flex-end; color: #fff; background: #222; }
.day-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.day-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 6, 3, .85), rgba(10, 6, 3, .1) 75%); }
.day-head > div { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 14px; padding: 14px 20px; width: 100%; }
.day-head h2 { margin: 0; color: #fff; font-size: 1.5rem; }
.day-head .n { font: 600 3.4rem/.85 var(--display); color: var(--accent-2); }
.day-head .date { font-size: .82rem; opacity: .9; text-transform: uppercase; letter-spacing: .08em; }
.day-head.plain { min-height: 0; background: var(--accent); }
.day-head.plain::after { display: none; }
.pad { padding: 0 20px 14px; margin: 12px 0 0; }
details.pad { padding-bottom: 16px; }
ul.points { padding: 4px 20px; }
.point { display: grid; grid-template-columns: 104px 1fr; gap: 6px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.point:last-child { border: 0; }
.point.noimg { grid-template-columns: 1fr; }
.point > img { width: 104px; height: 78px; object-fit: cover; border-radius: 12px; grid-row: span 2; background: var(--soft); }
.point-text { min-width: 0; }
.point-text > b { font-size: 1.02rem; }
.point p { margin: 3px 0; font-size: .92rem; overflow-wrap: anywhere; }
.point.chosen, .point.booked { background: var(--soft); margin: 0 -12px; padding: 14px 12px; border-radius: 14px; border-bottom-color: transparent; }
.price { color: var(--link); }
.tools { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: baseline; font-size: .85rem; margin-top: 4px; }
.tools details { margin: 0; flex-basis: auto; }
.tools details[open] { flex-basis: 100%; }
.tools summary { font-size: .85rem; }
.tools .link[name="dir"] { text-decoration: none; padding: 0 4px; font-size: 1rem; }
.go { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 4px; }
.meta { font-size: .85rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.votes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.point .votes { grid-column: 2; }
.point.noimg .votes { grid-column: 1; }
.vote { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 5px 13px; font: inherit; cursor: pointer; min-width: 64px; transition: transform .1s; }
.vote:hover { transform: scale(1.06); }
.vote.yes.on { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.vote.no.on { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.voters { font-size: .78rem; color: var(--muted); }

/* ---------- food ---------- */
.dishes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); margin-bottom: 18px; }
.dish { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 130px; }
.dish > img { width: 100%; height: 190px; object-fit: cover; }
.dish.noimg { border-top: 8px solid var(--accent-2); }
.dish-in { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dish-in p { font-size: .93rem; margin: 0; flex: 1; }
.dish-in .votes { margin-top: 8px; }

/* ---------- flights as boarding passes ---------- */
.pass { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); margin: 0 0 18px; display: grid; grid-template-columns: 1fr; overflow: hidden; scroll-margin-top: 130px; }
.pass-main { padding: 20px; }
.pass-route { display: flex; align-items: center; gap: 12px; }
.pass-route > div:not(.pass-line) { display: flex; flex-direction: column; }
.pass-route .end { text-align: right; align-items: flex-end; }
.pass-route b { font: 600 clamp(2.2rem, 8vw, 3.2rem)/1 var(--display); letter-spacing: .03em; color: var(--link); }
.pass-route span { font-size: .85rem; color: var(--muted); }
.pass-line { flex: 1; height: 0; border-top: 2px dashed var(--line); position: relative; min-width: 40px; }
.pass-line .ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(45deg); width: 30px; height: 30px; padding: 3px; background: var(--card); color: var(--accent-2); }
.pass-facts { display: flex; gap: 8px 28px; flex-wrap: wrap; margin: 16px 0 8px; }
.pass-facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pass-facts dd { margin: 0; font-weight: 600; }
.pass-stub { padding: 18px 20px; background: var(--soft); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border-top: 2px dashed var(--line); position: relative; }
.pass-stub::before, .pass-stub::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.pass-stub::before { left: -10px; }
.pass-stub::after { right: -10px; }
.pass-stub .big { margin: 0; font-size: 2rem; }
.pass-stub .btn { margin-top: 8px; }
.pass.bought .pass-stub { background: var(--ok-bg); }
.pass-more { padding: 14px 20px 18px; border-top: 1px solid var(--line); grid-column: 1 / -1; }
.chart { width: 100%; height: auto; display: block; margin: 4px 0 6px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.500; stroke-linejoin: round; }
.chart .area { fill: var(--accent); opacity: .08; }
.chart .dot { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .lbl { fill: var(--muted); font-size: 11px; }
.chart .lbl.end { text-anchor: end; }

/* ---------- discussion ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-day { align-self: center; font-size: .75rem; color: var(--muted); background: var(--soft); padding: 2px 12px; border-radius: 999px; margin: 6px 0 0; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78ch; scroll-margin-top: 130px; }
.msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.ava { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-2); color: #1d1509; display: grid; place-items: center; font: 600 .95rem var(--display); }
.bubble { background: var(--soft); border-radius: 18px 18px 18px 4px; padding: 9px 14px; min-width: 0; }
.msg.mine .bubble { background: var(--accent); color: var(--on-accent); border-radius: 18px 18px 4px 18px; }
.msg.mine .bubble .link { color: rgba(255, 255, 255, .75); }
.bubble header { display: flex; gap: 10px; align-items: baseline; font-size: .82rem; }
.bubble time { opacity: .7; font-size: .75rem; }
.bubble p { margin: 2px 0 0; overflow-wrap: anywhere; }
.say { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 200px; }
textarea { flex: 1; width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
ul.talk { list-style: none; margin: 0; padding: 0; }
ul.talk li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.talk li:last-child { border: 0; }
ul.talk p { margin: 2px 0 0; font-size: .93rem; overflow-wrap: anywhere; }

/* ---------- budget ---------- */
.totals { display: flex; gap: 10px 28px; flex-wrap: wrap; margin-bottom: 12px; }
.totals > div { display: flex; flex-direction: column; }
.totals .big { font-size: 1.9rem; margin: 0; }
.totals .big.alt { color: var(--muted); font-size: 1.4rem; margin-top: auto; }
ul.cats { list-style: none; margin: 0; padding: 0; }
ul.cats li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 6px 0; font-size: .93rem; }
ul.cats .bar { grid-column: 1 / -1; height: 6px; margin: 0; }
.lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 2px; }
.topnav .plus { color: var(--link); font-weight: 600; }

/* ---------- route legs, map switch, facts ---------- */
.mapbar { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.mapbar p { margin: 0; max-width: 62ch; }
.seg { display: inline-flex; align-items: center; gap: 0; margin: 0; }
.seg span { margin-right: 8px; }
.seg button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); padding: 6px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.seg button:first-of-type { border-radius: 999px 0 0 999px; }
.seg button:last-of-type { border-radius: 0 999px 999px 0; border-left: 0; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
ul.legend { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0 0 16px; }
ul.legend .leg { margin: 0; padding: 3px 12px 3px 10px; border-radius: 999px; background: var(--card); border-left-width: 5px; }
.leg { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; margin: 0 0 0 14px; padding: 7px 0 7px 14px; font-size: .86rem; color: var(--muted); border-left: 4px dotted var(--line); }
.leg .how { font-weight: 600; color: var(--ink); }
.leg.walk { border-left: 4px dotted #2f8f4e; }
.leg.car { border-left: 4px solid #c2571a; }
.leg.bus { border-left: 4px dashed #1f6fbf; }
.leg.train { border-left: 4px double #7a3fb0; }
.leg.none .how { font-weight: 400; color: var(--muted); }
.daymap { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.free { font-size: 1.02rem; padding-top: 6px; }
.facts, .origins { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip2 { background: var(--soft); border-radius: 999px; padding: 4px 12px; font-size: .88rem; }
.chip2 b { font-weight: 600; margin-right: 4px; }
.origins .lbl { margin: 0 4px 0 0; }
form.from { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
form.from input { margin: 0; padding: 5px 10px; max-width: 220px; font-size: .9rem; }
.stack.wide { max-width: 860px; }
fieldset.checks { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; display: flex; gap: 6px 18px; flex-wrap: wrap; }
fieldset.checks legend { font-size: .85rem; color: var(--muted); padding: 0 6px; }
fieldset.checks label { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; font-size: .95rem; color: var(--ink); }
fieldset.checks input { width: auto; margin: 0; }
.pass-main > .tag { margin-bottom: 8px; }
.pass-route.names b { font-size: clamp(1.4rem, 5vw, 2rem); letter-spacing: 0; }
.ic.emoji { font-size: 1.3rem; line-height: 1; display: grid; place-items: center; transform: translate(-50%, -50%) !important; }

/* ---------- map ---------- */
.mapwrap { scroll-margin-top: 120px; }
#map { height: min(62vh, 480px); min-height: 300px; background: var(--soft); z-index: 0; }
.mapdays { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 20px 0; }
.mapdays button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 4px 13px; font: inherit; font-size: .88rem; cursor: pointer; }
.mapdays button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.mapnote { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.mapnote p { margin: 0; max-width: 70ch; }
.pin { border-radius: 50%; display: grid; place-items: center; font: 700 13px system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .45); }
.pin.place { background: var(--accent); color: #fff; }
.pin.edge { background: #fff; color: #333; border-color: var(--accent); }
.leaflet-container { font: inherit; }
.leg .dist { color: var(--ink); }
.dayadd > summary { font-weight: 600; }
.findmore { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.findmore .lbl { margin: 0 4px 0 0; flex-basis: 100%; }
.stopedit { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
input[type="file"] { padding: 7px 10px; font-size: .9rem; }
input[type="file"]::file-selector-button { font: inherit; font-size: .85rem; margin-right: 10px; padding: 5px 12px; border: 1.5px solid var(--accent); border-radius: 999px; background: transparent; color: var(--link); cursor: pointer; }
fieldset.checks input { width: 18px; height: 18px; padding: 0; flex: none; }

/* ---------- documents ---------- */
.risk { border-left: 5px solid var(--warn); background: var(--warn-bg); color: var(--ink); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; }
.risk h3 { margin: 0 0 6px; font-size: 1rem; }
.risk ul { margin: 0; padding-left: 20px; font-size: .93rem; }
.risk li { margin-bottom: 3px; }
label.agree { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink); flex: none; }
label.agree input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; padding: 0; }

/* ---------- tasks ---------- */
ul.tasks li { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
ul.tasks li:last-child { border: 0; }
ul.tasks li > div { flex: 1; min-width: 0; }
ul.tasks p { margin: 2px 0; font-size: .92rem; }
ul.tasks li.done b { text-decoration: line-through; color: var(--muted); }
.tick { margin: 0; }
.check { width: 30px; height: 30px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; transition: transform .1s; }
.check:hover { transform: scale(1.1); border-color: var(--accent); }
.check.on { background: var(--ok); border-color: var(--ok); }

/* ---------- sign-in ---------- */
body.bare { min-height: 100vh; background: #1a1512; }
.bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); }
.bare-main { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth { width: min(100%, 400px); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-radius: 26px; padding: 30px 28px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.auth h1 { font-size: 2.8rem; margin-bottom: .3rem; }
.auth .hello { color: var(--accent); text-shadow: none; font-size: 1.3rem; }
.auth .btn { width: 100%; text-align: center; }

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .grid.two { grid-template-columns: 1.25fr 1fr; }
  .point { grid-template-columns: 132px 1fr auto; align-items: start; }
  .point.noimg { grid-template-columns: 1fr auto; }
  .point > img { width: 132px; height: 96px; grid-row: auto; }
  .point .votes, .point.noimg .votes { grid-column: auto; width: 190px; justify-content: flex-end; }
  .point .voters { flex-basis: 100%; text-align: right; }
  .pass { grid-template-columns: 1fr 250px; }
  .pass-stub { border-top: 0; border-left: 2px dashed var(--line); justify-content: center; }
  .pass-stub::before, .pass-stub::after { left: -11px; right: auto; }
  .pass-stub::before { top: -10px; }
  .pass-stub::after { top: auto; bottom: -10px; }
  .day-head { min-height: 170px; }
}
@media (max-width: 520px) {
  .topnav { gap: 12px; font-size: .85rem; }
  .tabs a span { font-size: .88rem; }
  .card, .pass-main { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Shared pages show several countries side by side, so cards there use one typeface;
   a country's own typeface applies only inside its trip. */
.tripcard b, .dest b, .pickitem b, .tripcard .hello, .dest .hello {
  font-family: Georgia, 'Times New Roman', serif; font-style: normal; text-transform: none; letter-spacing: 0;
}

/* Trip tabs: every section stays reachable. Wide screens wrap them onto a second row;
   narrow ones scroll sideways, with a fading edge that shows there is more. */
@media (min-width: 900px) {
  .tabs-in { flex-wrap: wrap; overflow: visible; justify-content: center; max-width: 1320px; }
  .tabs a { padding-top: 11px; padding-bottom: 9px; }
}
@media (max-width: 899px) {
  .tabs { position: sticky; }
  .tabs::after { content: ''; position: absolute; top: 0; right: 0; bottom: 1px; width: 34px; pointer-events: none; background: linear-gradient(to right, transparent, var(--card)); }
  .tabs-in { padding-right: 30px; scroll-padding: 0 40px; }
}

/* Language switch: a quiet select in the top bar, and in the corner of the sign-in pages. */
.langpick { margin: 0; }
.langpick select { width: auto; margin: 0; padding: 4px 8px; font-size: .85rem; border-radius: 999px; background: transparent; cursor: pointer; }
body.bare .langpick { position: fixed; top: 14px; right: 16px; z-index: 5; }
body.bare .langpick select { background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink); border-color: transparent; }
@media (max-width: 520px) { .topnav .langpick select { max-width: 92px; } }

/* Drawn icons inside text, vote buttons and tags */
.how .ic, .tag .ic, .free .ic, .mapnote .ic, p .ic { vertical-align: -.22em; }
.vote { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.vote .ic { width: 1.15em; height: 1.15em; }
.leg.walk .how .ic { color: #2f8f4e; } .leg.car .how .ic { color: #c2571a; } .leg.bus .how .ic { color: #1f6fbf; } .leg.train .how .ic { color: #7a3fb0; }
.free .ic { color: var(--ok); width: 1.3em; height: 1.3em; }
.pass-line .ic { transform: translate(-50%, -50%); }
.pass.mode-plane .pass-line .ic { transform: translate(-50%, -50%) rotate(45deg); }
.rows .muted .ic { width: 1.1em; height: 1.1em; vertical-align: -.18em; color: var(--accent-2); }

/* Car page: where to look */
.carfind { margin-top: 14px; }
.fuel-sum { margin: 8px 0; font-size: 1.05rem; }
.pickups { margin: 6px 0 0; }
.carfind .lbl { display: block; margin-top: 10px; }
ul.sites, ul.chips { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
ul.sites li { display: flex; align-items: center; gap: 8px; }
ul.chips li a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: .88rem; }
ul.chips li a:hover { background: var(--accent); color: var(--on-accent); }

.topnav .link { white-space: nowrap; }
@media (max-width: 620px) { .topnav { gap: 10px; } .topnav a[href$="/profile"] { max-width: 70px; overflow: hidden; text-overflow: ellipsis; } }

/* Continue with Google */
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #fff; color: #1f1f1f; border-color: #dadce0; font-weight: 600; }
.btn.google:hover { box-shadow: 0 2px 8px rgba(60, 64, 67, .25); }
.under { text-align: center; margin: 14px 0 0; }
form.from { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
form.from input[name="city"] { width: auto; max-width: 260px; margin: 0; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
