/* Drifter — airy, calm, quietly ornamental. Parchment, ink, and a thread of gold. */

:root {
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --surface-2: #f1e9da;
  --ink: #1e2638;
  --ink-soft: #3b4357;
  --muted: #7a7366;
  --line: #e6dcc8;
  --gold: #a9824a;
  --gold-soft: #ecdfc4;
  --teal: #1f5c58;
  --teal-soft: #dce9e5;
  --rose: #a8553a;
  --shadow: 0 1px 2px rgba(30, 38, 56, .04), 0 12px 32px -12px rgba(30, 38, 56, .14);
  --radius: 18px;
  --arch: 999px 999px 18px 18px;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: 64px;
  --pattern-opacity: .07;
  --tiles: sepia(.14) saturate(.9);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161f;
    --surface: #1a2030;
    --surface-2: #20283a;
    --ink: #efe7d6;
    --ink-soft: #d6cdbb;
    --muted: #a39c8c;
    --line: #2c3446;
    --gold: #d2b07a;
    --gold-soft: #3a3324;
    --teal: #6fb1a9;
    --teal-soft: #1d3634;
    --rose: #e08b6f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 16px 40px -16px rgba(0, 0, 0, .6);
    --pattern-opacity: .05;
    --tiles: sepia(.1) brightness(.95);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161f; --surface: #1a2030; --surface-2: #20283a; --ink: #efe7d6; --ink-soft: #d6cdbb; --muted: #a39c8c;
  --line: #2c3446; --gold: #d2b07a; --gold-soft: #3a3324; --teal: #6fb1a9; --teal-soft: #1d3634; --rose: #e08b6f;
  --pattern-opacity: .05; --tiles: sepia(.1) brightness(.95);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.6 var(--sans);
  letter-spacing: .01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Girih-like lattice, barely there. */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: var(--pattern-opacity);
  color: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23a9824a' stroke-width='1'%3E%3Cpath d='M60 18l12 30 30 12-30 12-12 30-12-30-30-12 30-12z'/%3E%3Cpath d='M30.3 30.3h59.4v59.4H30.3z'/%3E%3Cpath d='M60 0v18M60 102v18M0 60h18M102 60h18M0 0l30.3 30.3M120 0L89.7 30.3M0 120l30.3-30.3M120 120L89.7 89.7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  z-index: 0;
}
main, .topbar { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: .005em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 500; }
h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .45em; }
p { margin: 0 0 .8em; }
a { color: inherit; }
strong { font-weight: 500; }
em { font-style: italic; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; justify-content: center; }
.eyebrow { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: .6em; font-weight: 400; }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; margin: 0 auto 2em; }

.icon { width: 20px; height: 20px; flex: none; }
.khatam { width: 100%; height: 100%; color: var(--gold); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 900;
  height: var(--top);
  display: flex; align-items: center; gap: 24px;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-left));
  padding-top: env(safe-area-inset-top);
  height: calc(var(--top) + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; color: var(--gold); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-mark { transform: rotate(45deg); }
.brand-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; letter-spacing: .04em; }
.brand-ar { font-family: 'Amiri', serif; color: var(--gold); font-size: 1.05rem; margin-top: 4px; }
.offline-pill {
  display: none; margin-left: auto;
  font-size: .75rem; padding: 4px 12px; border-radius: 99px;
  background: var(--gold-soft); color: var(--ink-soft);
}
body.is-offline .offline-pill { display: inline-block; }
.nav { margin-left: auto; display: flex; gap: 4px; }
body.is-offline .nav { margin-left: 16px; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px;
  text-decoration: none; color: var(--muted); font-size: .92rem;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 99px;
  font: 400 .95rem var(--sans); letter-spacing: .02em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn.primary:disabled { opacity: .35; cursor: default; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); }
.btn.ghost:disabled { opacity: .5; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn.danger { background: var(--rose); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--rose); border-color: color-mix(in srgb, var(--rose) 40%, transparent); }
.btn.wide { width: 100%; margin-top: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
  transition: background .2s, color .2s; font-size: 1.3rem;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); cursor: pointer; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); }

.row { display: flex; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.gap { gap: 10px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font: 400 .86rem var(--sans); cursor: pointer;
  transition: all .2s;
}
.chip .icon { width: 15px; height: 15px; }
.chip:hover { border-color: var(--gold); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.search {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 48px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; border: 0; background: transparent; font: 300 1rem var(--sans); color: var(--ink); outline: none; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field > span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field em { text-transform: none; letter-spacing: 0; }
input, select, textarea {
  font: 300 1rem var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); height: 50px; }
.stepper button { width: 50px; height: 100%; border: 0; background: none; font-size: 1.3rem; color: var(--ink); cursor: pointer; }
.stepper output { flex: 1; text-align: center; font-family: var(--serif); font-size: 1.5rem; }
.segmented { display: flex; padding: 4px; background: var(--surface-2); border-radius: 99px; }
.segmented button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 99px; font: 400 .92rem var(--sans); color: var(--muted); cursor: pointer; transition: all .2s; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- home ---------- */
#view { padding-bottom: 120px; }
.hero { text-align: center; padding: 72px 16px 72px; max-width: 760px; margin: 0 auto; }
/* Room to breathe: the question stands alone, the buttons rest well below it. */
.hero h1 { margin-bottom: 56px; }
.hero + .section { margin-top: 24px; }
.section + .section { margin-top: 32px; }
.hero-arch {
  width: 112px; height: 150px; margin: 0 auto 28px;
  border-radius: var(--arch); border: 1px solid var(--gold);
  display: grid; place-items: center; padding: 22px;
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  position: relative;
}
.hero-arch::after { content: ''; position: absolute; inset: 7px; border-radius: inherit; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.hero-star { animation: turn 60s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

.section { max-width: 1120px; margin: 0 auto; padding: 24px 16px; }
.section-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .5; }

.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.arch-card {
  text-decoration: none; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--arch); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.arch-card:hover { transform: translateY(-4px); }
.arch-top {
  height: 150px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 120%, var(--gold-soft), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.flag { font-size: 3rem; filter: saturate(.85); }
.flag.many { font-size: 1.9rem; letter-spacing: .08em; }
.arch-body { padding: 20px 22px 24px; text-align: center; }
.arch-body h3 { margin-bottom: .2em; }
.arch-body p { margin: 0; }
.tag { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 10px !important; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty-star { width: 56px; height: 56px; margin-bottom: 12px; opacity: .7; }

/* ---------- page layouts ---------- */
.narrow { max-width: 620px; margin: 0 auto; padding: 48px 16px; }
.page-head { margin: 8px 0 22px; }
.page-head h1 { margin-bottom: .15em; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .88rem; margin-bottom: 18px; }
.back .icon { width: 16px; height: 16px; }
.form { background: var(--surface); padding: 32px; border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel { background: var(--surface); padding: 26px 28px; border-radius: 22px; border: 1px solid var(--line); margin-bottom: 20px; }
.panel h3 { display: flex; align-items: center; gap: 10px; }
.panel h3 .icon { color: var(--gold); }

.split { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: calc(100vh - var(--top)); }
.split-list { padding: 24px clamp(16px, 3vw, 40px) 140px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.split-list > * { margin-top: 0; }
.split-map { position: sticky; top: calc(var(--top) + env(safe-area-inset-top)); height: calc(100vh - var(--top) - env(safe-area-inset-top)); padding: 16px 16px 16px 0; }
.map { width: 100%; height: 100%; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.leaflet-tile-pane { filter: var(--tiles); }
.leaflet-container { font-family: var(--sans); }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }
.leaflet-tooltip { font-family: var(--sans); background: var(--ink); color: var(--bg); border: 0; border-radius: 99px; padding: 4px 12px; box-shadow: none; }
.leaflet-tooltip-top::before { border-top-color: var(--ink); }
.leaflet-popup-content-wrapper { border-radius: 16px; background: var(--surface); color: var(--ink); }
.leaflet-popup-tip { background: var(--surface); }
.map.picking { cursor: crosshair; outline: 2px solid var(--gold); }

/* markers */
.pin svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); transition: transform .2s; }
.pin svg path { stroke: var(--surface); stroke-width: 1.2; }
.pin-bookmark svg { fill: var(--gold); }
.pin-must svg { fill: var(--teal); }
.pin-gem svg { fill: var(--muted); }
.pin.is-selected svg { transform: scale(1.25); }
.curate .pin:not(.is-selected) svg { fill: var(--surface); }
.curate .pin-bookmark:not(.is-selected) svg path { stroke: var(--gold); stroke-width: 2; }
.curate .pin-must:not(.is-selected) svg path { stroke: var(--teal); stroke-width: 2; }
.curate .pin-gem:not(.is-selected) svg path { stroke: var(--muted); stroke-width: 2; }
.stop-pin span {
  display: grid; place-items: center; width: 30px; height: 36px;
  background: var(--ink); color: var(--bg); font: 500 .85rem var(--sans);
  border-radius: 99px 99px 6px 6px; border: 2px solid var(--surface);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.stop-pin.visited span { background: var(--gold); }
.stop-pin.next span { background: var(--teal); transform: scale(1.15); }
.you-pin span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #3b82c4; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59,130,196,.2); }
.route-line { stroke: var(--gold); }

/* bookmark list */
.place-list, .results { list-style: none; margin: 0; padding: 0; }
.place { display: flex; align-items: flex-start; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.place:hover strong { color: var(--gold); }
.place-star { width: 18px; height: 18px; margin-top: 4px; flex: none; }
.place-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.place-text strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; transition: color .2s; }
.note { font-size: .9rem; color: var(--ink-soft); font-style: italic; }
.results li button { width: 100%; text-align: left; display: flex; flex-direction: column; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.results li button:hover strong { color: var(--gold); }

/* curate cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  cursor: pointer; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card.chosen { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.card-media { height: 132px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.pattern .khatam, .sheet-media.pattern .khatam { width: 56px; height: 56px; opacity: .55; }
.card-media.pattern, .sheet-media.pattern { background: radial-gradient(circle at 50% 50%, var(--gold-soft), var(--surface-2) 70%); }
.card-body { padding: 14px 18px 18px; }
.card-body h3 { font-size: 1.2rem; margin: 6px 0 2px; }
.card-body p { margin: 0; }
.why { font-size: .92rem; color: var(--ink-soft); margin-top: 8px !important; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; min-height: 20px; }
.badge { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--teal-soft); color: var(--teal); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.choose {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: color-mix(in srgb, var(--muted) 60%, transparent);
  border: 1.5px solid var(--line); backdrop-filter: blur(6px); transition: all .2s;
}
.choose:hover { border-color: var(--gold); color: var(--gold); }
.card.chosen .choose { background: var(--gold); border-color: var(--gold); color: #fff; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; }
.dock-inner {
  pointer-events: auto; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 12px 12px 26px; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.dock-inner > div { min-width: 0; }

.progress { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--gold-soft); color: var(--ink-soft); font-size: .92rem; }
.progress[hidden] { display: none; }
.spinner { width: 26px; height: 26px; flex: none; animation: turn 3s linear infinite; }

/* itinerary */
.actions .btn.primary { min-height: 40px; }
.before { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 4px 22px; }
.before[open] { padding-bottom: 20px; }
.before summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; gap: 12px; }
.before summary::-webkit-details-marker { display: none; }
.before summary > span:first-child { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.before summary .icon { color: var(--gold); }
.overview { font-family: var(--serif); font-size: 1.2rem; font-style: italic; color: var(--ink-soft); }

.ticks { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.ticks li { position: relative; padding: 5px 0 5px 20px; color: var(--ink-soft); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.ticks.warn li::before { background: transparent; border: 1px solid var(--rose); }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day-tab {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 18px 10px; border: 1px solid var(--line); border-radius: 99px 99px 14px 14px;
  background: var(--surface); color: var(--muted); cursor: pointer; font-family: var(--sans); transition: all .2s; min-width: 92px;
}
.day-tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day-n { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.day-d { font-size: .75rem; letter-spacing: .04em; }
.day-head { margin: 8px 0 4px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 1px; background: linear-gradient(var(--gold), var(--line)); }
.stop { display: flex; gap: 18px; padding: 10px 0; position: relative; }
.stop-num { flex: none; width: 44px; display: flex; justify-content: center; }
.stop-num span {
  display: grid; place-items: center; width: 38px; height: 48px; border-radius: 99px 99px 8px 8px;
  background: var(--surface); border: 1px solid var(--gold); color: var(--gold); font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
}
.stop.visited .stop-num span { background: var(--gold); color: var(--surface); }
.stop.visited h3 { color: var(--muted); }
.stop-body { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 20px 10px; min-width: 0; }
.stop-time { font-size: .8rem; letter-spacing: .08em; color: var(--gold); text-transform: uppercase; }
.stop-time em { text-transform: none; letter-spacing: 0; color: var(--muted); }
.stop-body h3 { margin: 4px 0 2px; }
.mini-advice { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 6px; font-size: .84rem; color: var(--muted); }
.mini-advice span { display: flex; gap: 8px; align-items: flex-start; }
.mini-advice .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--gold); }
.stop-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; font-size: .9rem; }
.stop-actions .icon-btn { width: 34px; height: 34px; }
.stop-actions .icon-btn .icon { width: 17px; height: 17px; }
.stop-actions .icon-btn[data-act="visited"] { color: var(--gold); }
.leg { display: flex; align-items: center; gap: 14px; padding: 4px 0 4px 12px; color: var(--muted); font-size: .84rem; position: relative; }
.leg .icon { width: 18px; height: 18px; background: var(--bg); padding: 1px; border-radius: 50%; color: var(--muted); }
.leg span { padding-left: 18px; }
.leg.lunch .icon { color: var(--gold); }
.overflow { margin-top: 20px; padding: 18px 20px; border: 1px dashed var(--line); border-radius: 18px; }
.overflow .chip { margin: 0 6px 6px 0; }

/* sheet */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(18, 22, 31, 0); transition: background .3s; padding: 16px;
}
.sheet-wrap.open { background: rgba(18, 22, 31, .35); }
.sheet {
  position: relative; width: min(560px, 100%); max-height: 86vh; overflow: auto;
  background: var(--surface); border-radius: 28px; padding: 30px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4);
  transform: translateY(16px) scale(.98); opacity: 0; transition: all .3s cubic-bezier(.2, .8, .2, 1);
}
.sheet-wrap.open .sheet { transform: none; opacity: 1; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.sheet-title { margin: 0 40px 18px 0; }
.sheet .results { margin-top: 10px; max-height: 50vh; overflow: auto; }
.stop-sheet h2 { margin-bottom: .2em; }
.sheet-media { margin: -30px -30px 22px; height: 220px; display: grid; place-items: center; background: var(--surface-2); overflow: hidden; border-radius: 28px 28px 0 0; }
.sheet-media img { width: 100%; height: 100%; object-fit: cover; }
.stop-sheet .grid-2 { margin: 18px 0 22px; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--gold-soft); border-radius: 14px; font-size: .92rem; color: var(--ink-soft); }
.tip .icon { color: var(--gold); width: 18px; height: 18px; margin-top: 2px; }
.day-pick { display: flex; flex-direction: column; gap: 8px; }
.day-pick .btn { justify-content: flex-start; }

/* guide */
.guide { position: relative; height: calc(100vh - var(--top) - env(safe-area-inset-top)); }
.guide-map { position: absolute; inset: 0; border-radius: 0; border: 0; }
.guide-card {
  position: absolute; z-index: 500; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto; max-height: 72%; overflow: auto;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 28px; padding: 18px 24px 22px; box-shadow: var(--shadow);
}
.guide-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.guide-day { display: flex; align-items: center; gap: 2px; font-size: .88rem; color: var(--muted); }
.dots { margin-left: auto; display: flex; gap: 6px; }
.dot { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); }
.dot.done { background: var(--gold); }
.dot.now { background: var(--teal); border-color: var(--teal); transform: rotate(45deg) scale(1.3); }
.guide-next { display: flex; gap: 18px; align-items: center; }
.guide-next h2 { margin: 0 0 4px; font-size: 1.9rem; }
.guide-next p { margin: 0; }
.compass { flex: none; width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.compass[hidden] { display: none; }
.needle { transition: transform .4s ease-out; color: var(--teal); }
.needle .icon { width: 32px; height: 32px; fill: currentColor; }
.guide .grid-2.tight { gap: 12px; margin: 14px 0; }
.guide .ticks li { font-size: .86rem; padding: 3px 0 3px 18px; }
.guide .tip { margin-bottom: 14px; }
.guide-done { text-align: center; padding: 20px 0 10px; }
.done-star { width: 54px; height: 54px; animation: turn 30s linear infinite; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 2000;
  transform: translate(-50%, 20px); opacity: 0; transition: all .35s cubic-bezier(.2, .8, .2, 1);
  background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 99px; font-size: .92rem;
  max-width: calc(100vw - 32px); box-shadow: var(--shadow);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--rose); color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  :root { --top: 56px; }
  .brand-ar { display: none; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 950;
    justify-content: space-around; gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  body.is-offline .nav { margin-left: 0; }
  .nav a { flex-direction: column; gap: 2px; font-size: .7rem; padding: 6px 10px; letter-spacing: .04em; }
  .nav a.active { background: none; box-shadow: none; color: var(--gold); }
  .offline-pill { font-size: .68rem; }
  #view { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .hero { padding-top: 48px; padding-bottom: 48px; }
  .hero h1 { margin-bottom: 40px; }
  .split { display: flex; flex-direction: column-reverse; min-height: 0; }
  .split-map { position: relative; top: 0; height: 42vh; padding: 12px 16px 0; }
  .split-list { padding-bottom: 40px; }
  .curate .split-list, .itinerary .split-list { padding-bottom: 120px; }
  .dock { bottom: calc(62px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .dock-inner { padding: 10px 10px 10px 20px; }
  .dock-inner .muted { display: none; }
  .form { padding: 22px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-media { height: 100px; }
  .card-body { padding: 10px 14px 14px; }
  .card-body h3 { font-size: 1.08rem; }
  .why { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .stop-body .why { -webkit-line-clamp: 4; }
  .grid-2 { grid-template-columns: 1fr; gap: 10px; }
  .guide .grid-2.tight { grid-template-columns: 1fr 1fr; }
  .guide { height: calc(100vh - var(--top) - 62px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .guide-card { left: 10px; right: 10px; bottom: 10px; padding: 16px 18px 18px; }
  .guide-next h2 { font-size: 1.5rem; }
  .compass { width: 60px; height: 60px; }
  .sheet-wrap { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 28px 28px 0 0; padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); max-height: 90vh; transform: translateY(100%); }
  .sheet-media { margin: -26px -20px 20px; }
  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .stop { gap: 10px; }
  .stop-num { width: 36px; }
  .stop-num span { width: 32px; height: 42px; font-size: 1.1rem; }
  .timeline::before { left: 17px; }
  .stop-body { padding: 14px 16px 8px; }
}

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

/* Serif numerals as lining figures, so "1" never reads as "I". */
.stop-num span, .day-n, .stepper output, .stop-pin span { font-variant-numeric: lining-nums tabular-nums; }
.guide .leaflet-control-zoom { display: none; }

/* import */
.steps { margin: 0 0 20px; padding-left: 1.3em; color: var(--ink-soft); font-size: .95rem; }
.steps li { padding: 4px 0 4px 4px; }
.steps li::marker { font-family: var(--serif); font-weight: 600; color: var(--gold); }
.steps a { color: var(--teal); }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 30px 20px; border: 1.5px dashed var(--gold); border-radius: 22px 22px 22px 22px;
  background: radial-gradient(circle at 50% 0%, var(--gold-soft), transparent 70%); transition: background .2s, transform .2s;
}
.drop .icon { width: 28px; height: 28px; color: var(--gold); }
.drop.over { transform: scale(1.01); background: var(--gold-soft); }
.chips-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); align-self: center; margin-right: 4px; }
.chip.warn { border-color: color-mix(in srgb, var(--rose) 45%, transparent); color: var(--rose); }
.chip.warn.on { background: var(--rose); border-color: var(--rose); color: #fff; }
.flag-warn { color: var(--rose); font-style: normal; text-transform: none; letter-spacing: 0; }
.progress .bar { flex: 1; min-width: 60px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--gold) 25%, transparent); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--gold); transition: width .4s; }
#locating { flex-wrap: wrap; }

/* hidden places, notes, switches */
.place.is-hidden .place-text, .place.is-hidden .place-star { opacity: .5; }
.place .badge { vertical-align: middle; margin-left: 6px; font-family: var(--sans); }
.add-note { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 4px; font-size: .85rem; border-bottom: 0; color: var(--muted); }
.add-note:hover { color: var(--teal); }
.add-note .icon { width: 15px; height: 15px; }
.hidden-note { display: flex; align-items: center; gap: 8px; padding: 18px 4px; list-style: none; }
.hidden-note .icon { width: 17px; height: 17px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
.switch-row strong { font-weight: 400; }
.sheet .switch-row { margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; cursor: pointer;
  width: 48px; height: 28px; padding: 0; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface-2); transition: background .25s, border-color .25s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.switch:checked { background: var(--gold); border-color: var(--gold); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.danger-zone { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { display: flex; align-items: center; gap: 16px; }
.toast-action { background: none; border: 0; padding: 0; font: 500 .9rem var(--sans); color: var(--gold); cursor: pointer; letter-spacing: .04em; }

/* import pickers & duplicates */
.pick-row { margin-top: 14px; }
.tidy { margin-top: 14px; }
.dup-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.dup-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  padding: 18px 18px 16px; border-radius: 99px 99px 18px 18px; padding-top: 34px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.dup-card strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.dup-card .small { display: flex; align-items: center; gap: 6px; }
.dup-card .small .icon { width: 14px; height: 14px; color: var(--gold); }
.dup-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.dup-check {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--line); color: transparent; background: var(--surface);
}
.dup-check .icon { width: 15px; height: 15px; }
.dup-card.on .dup-check { background: var(--gold); border-color: var(--gold); color: #fff; }
.dup-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dup-all { display: block; margin: 16px auto 0; }
.dup-done { text-align: center; padding: 10px 0; }
.dup-done .done-star { width: 48px; height: 48px; margin-bottom: 8px; }

/* rating */
.rating { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.rating em { font-family: var(--serif); font-size: .98rem; color: var(--ink-soft); }
.rating-gem {
  display: inline-grid; place-items: center; width: 26px; height: 26px; transform: rotate(45deg);
  border: 1px solid var(--gold); border-radius: 5px; background: var(--surface);
}
.rating-gem b { transform: rotate(-45deg); font: 600 .95rem var(--serif); font-variant-numeric: lining-nums; color: var(--gold); }
.rating-great .rating-gem { background: var(--gold); }
.rating-great .rating-gem b { color: var(--surface); }
.rating-good .rating-gem { border-color: var(--teal); }
.rating-good .rating-gem b { color: var(--teal); }
.rating-mid .rating-gem { border-color: var(--line); }
.rating-mid .rating-gem b { color: var(--muted); }
.rating-avoid .rating-gem { border-color: color-mix(in srgb, var(--rose) 60%, transparent); border-style: dashed; }
.rating-avoid .rating-gem b { color: var(--rose); }
.place .rating { align-self: center; margin-right: 4px; }
.card .rating { position: absolute; top: 14px; left: 16px; }
.card .rating-gem { box-shadow: 0 2px 8px rgba(0,0,0,.2); }

.rate { padding: 4px 0 2px; }
.rate-gems { display: flex; justify-content: space-between; gap: 2px; }
.rate-gem {
  position: relative; flex: 1; max-width: 36px; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
}
.rate-gem::before {
  content: ''; position: absolute; width: 58%; aspect-ratio: 1; transform: rotate(45deg); border-radius: 3px;
  border: 1px solid var(--line); background: var(--surface); transition: all .18s ease;
}
.rate-gem span { position: relative; font: 500 .72rem var(--sans); font-variant-numeric: lining-nums; opacity: 0; transition: opacity .18s; }
.rate-gem:hover span, .rate-gem.chosen span, .rate-gem:focus-visible span { opacity: 1; }
.rate-gem.lit::before { border-color: var(--gold); background: var(--gold-soft); }
.rate-gem.chosen::before { width: 74%; background: var(--gold); border-color: var(--gold); box-shadow: 0 4px 12px -4px var(--gold); }
.rate-gem.chosen span { color: var(--surface); font-weight: 600; font-size: .8rem; }
.rate[data-tier="avoid"] .rate-gem.lit::before { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 14%, transparent); }
.rate[data-tier="avoid"] .rate-gem.chosen::before { background: var(--rose); border-color: var(--rose); box-shadow: 0 4px 12px -4px var(--rose); }
.rate-gem:focus-visible { outline: none; }
.rate-gem:focus-visible::before { outline: 2px solid var(--gold); outline-offset: 3px; }
.rate-scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rate-scale span:nth-child(2) { text-align: center; }
.rate-word { text-align: center; margin: 12px 0 0; min-height: 1.6em; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink); }
.rate-word b { font-style: normal; font-weight: 600; color: var(--gold); margin-right: 6px; font-variant-numeric: lining-nums; }
.rate[data-tier="avoid"] .rate-word b { color: var(--rose); }
.rate-mini { background: none; border: 0; padding: 4px; cursor: pointer; display: grid; place-items: center; }
.rating-none .rating-gem { border: 1px dashed var(--line); background: transparent; width: 20px; height: 20px; }
.rate-mini:hover .rating-none .rating-gem { border-color: var(--gold); }
.search-row { align-items: stretch; }
.search-row .search { flex: 1; min-width: 0; }
.segmented.sort { flex: none; align-self: center; }
.segmented.sort button { padding: 8px 14px; font-size: .84rem; }
.stop-name { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stop-name .rating-gem { width: 22px; height: 22px; }
.stop-name .rating-gem b { font-size: .82rem; }
.popup-rating { color: var(--gold); font-size: .85rem; }
.dup-card .rating { margin: 2px 0; }

/* ---------- finder ---------- */
.finder { position: relative; }
.finder-search .icon-btn { width: 30px; height: 30px; margin-right: -8px; }
.finder-search .icon-btn .icon { width: 16px; height: 16px; }
.suggest {
  position: absolute; z-index: 700; left: 0; right: 0; top: calc(100% + 8px);
  max-height: min(62vh, 520px); overflow: auto; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.suggest[hidden] { display: none; }
.suggest-group + .suggest-group { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.suggest-title { margin: 6px 12px 4px; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.suggest-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 14px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.suggest-item:hover, .suggest-item.on { background: var(--surface-2); }
.suggest-mark { width: 22px; height: 22px; display: grid; place-items: center; flex: none; font-size: 1.05rem; color: var(--gold); }
.suggest-mark .khatam { width: 16px; height: 16px; }
.suggest-mark .icon { width: 18px; height: 18px; }
.suggest-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-count, .browse-count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
mark { background: none; color: var(--gold); font-weight: 500; box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--gold) 55%, transparent); }

.facets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.facet {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-soft);
  font: 400 .9rem var(--sans); cursor: pointer; transition: border-color .2s, background .2s;
}
.facet:hover { border-color: var(--gold); }
.facet .icon { width: 17px; height: 17px; color: var(--gold); }
.facet-n { font-size: .78rem; color: var(--muted); }
.facet.on { padding: 0; gap: 0; border-color: var(--gold); background: var(--gold-soft); color: var(--ink); }
.facet.on button { display: inline-flex; align-items: center; gap: 8px; height: 38px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.facet.on button:first-child { padding: 0 6px 0 16px; }
.facet-x { padding: 0 12px 0 4px; }
.facet-x .icon { width: 14px; height: 14px; color: var(--ink-soft); }
.facet-flag { font-size: 1.05rem; }
.clear-all { margin-left: 4px; }
.notices { display: flex; flex-wrap: wrap; gap: 8px; }
.notices:empty { display: none; }
.notice {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--rose) 10%, transparent); color: var(--rose); font: 400 .84rem var(--sans);
}
.notice .icon { width: 15px; height: 15px; }
.notice.on { background: var(--rose); color: #fff; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: -8px; }
.more-note { padding: 18px 0; list-style: none; }

/* browse panel */
.browse { display: flex; flex-direction: column; gap: 14px; max-height: calc(86vh - 60px); }
.browse .sheet-title { display: flex; align-items: center; gap: 10px; margin-bottom: 0; }
.browse .sheet-title .icon { color: var(--gold); }
.browse .sheet-title .muted { font-size: 1rem; }
.browse-order { align-self: flex-start; }
.browse-order button { padding: 8px 16px; font-size: .86rem; }
.browse-body { position: relative; display: flex; gap: 6px; min-height: 0; flex: 1; }
.browse-list { flex: 1; overflow: auto; min-height: 120px; max-height: 52vh; padding-right: 4px; scroll-behavior: smooth; }
.browse-head {
  position: sticky; top: 0; z-index: 1; margin: 0; padding: 12px 6px 6px;
  background: var(--surface); font-family: var(--serif); font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--gold);
}
.browse-row {
  display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto 3px; column-gap: 12px; row-gap: 6px; align-items: center;
  width: 100%; padding: 10px 8px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.browse-row:hover .browse-label { color: var(--gold); }
.browse-row.on { background: var(--gold-soft); border-radius: 12px; }
.browse-mark { font-size: 1.2rem; display: grid; place-items: center; color: var(--gold); }
.browse-mark .icon { width: 18px; height: 18px; }
.browse-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browse-bar { grid-column: 2 / 4; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--gold) 12%, transparent); overflow: hidden; }
.browse-bar i { display: block; height: 100%; background: color-mix(in srgb, var(--gold) 70%, transparent); border-radius: 3px; }
.browse-row.clear { grid-template-columns: 28px 1fr; grid-template-rows: auto; color: var(--teal); }
.browse-row.clear .icon { width: 16px; height: 16px; justify-self: center; }
.az { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.az[hidden] { display: none; }
.az button { border: 0; background: none; color: var(--gold); font: 500 .7rem var(--sans); padding: 1px 6px; cursor: pointer; border-radius: 6px; }
.az button:hover { background: var(--gold-soft); }

/* import format menu */
.formats { display: flex; flex-direction: column; gap: 8px; }
.format {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 14px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.format:hover { border-color: var(--gold); transform: translateX(2px); }
.format-tile {
  flex: none; display: grid; place-items: center; width: 46px; height: 54px; border-radius: 99px 99px 8px 8px;
  border: 1px solid var(--gold); color: var(--gold); background: radial-gradient(circle at 50% 0%, var(--gold-soft), transparent 80%);
  font: 600 .78rem var(--sans); letter-spacing: .06em;
}
.format-tile.small { display: inline-grid; width: 34px; height: 40px; font-size: .66rem; vertical-align: middle; margin-right: 6px; }
.format-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.format-text strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.format-go { color: var(--muted); transform: rotate(180deg); display: grid; }
.steps.plain { list-style: none; padding-left: 0; }
.steps.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
#imp .back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; border: 0; }
#imp .back .icon { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .browse-list { max-height: 56vh; }
  .facet { min-height: 38px; padding: 0 14px; font-size: .86rem; }
}
.browse-order button, .segmented.sort button { white-space: nowrap; }

/* lists & selection */
.list-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 12px 16px; border-radius: 16px;
  background: var(--gold-soft); color: var(--ink);
}
.list-bar-name { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.list-bar-name .icon { color: var(--gold); width: 18px; height: 18px; }
.list-bar-name strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.danger-link { color: var(--rose); border-bottom-color: color-mix(in srgb, var(--rose) 35%, transparent); }
.list-head .spacer { flex: 1; }
.list-head { gap: 14px; }
.pick-box {
  flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: transparent; transition: all .15s;
}
.pick-box .icon { width: 14px; height: 14px; }
.place.picked .pick-box { background: var(--gold); border-color: var(--gold); color: #fff; }
.place.selecting { cursor: pointer; }
.place.selecting .rate-mini, .place.selecting .icon-btn, .place.selecting .add-note { pointer-events: none; opacity: .35; }
.place.picked { background: color-mix(in srgb, var(--gold-soft) 55%, transparent); }
.sel-dock { flex-wrap: wrap; border-radius: 26px; padding: 12px 14px 12px 22px; }
.sel-count { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.sel-count .link { align-self: flex-start; }
.sel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sel-actions .btn .icon { width: 16px; height: 16px; }
.list-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.list-editor:focus-within { border-color: var(--gold); }
.list-editor input { flex: 1; min-width: 140px; border: 0; padding: 6px 4px; background: transparent; }
.list-chips { display: contents; }
.list-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 99px; background: var(--gold-soft); font-size: .88rem; }
.list-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer; }
.list-chip button .icon { width: 12px; height: 12px; }
.manage { display: flex; flex-direction: column; margin: 12px 0; max-height: 52vh; overflow: auto; }
.manage-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.manage-row.pick { width: 100%; border-left: 0; border-right: 0; border-top: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 12px 6px; }
.manage-row.pick:hover .manage-name { color: var(--gold); }
.manage-row.new { color: var(--teal); }
.manage-row.new .icon { width: 16px; height: 16px; }
.manage-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.choice { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.choice:hover { border-color: var(--gold); }
.choice.danger strong { color: var(--rose); }
.choice.danger:hover { border-color: var(--rose); }
.browse-footer { align-self: center; display: inline-flex; align-items: center; gap: 6px; border-bottom: 0; }
.browse-footer .icon { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .sel-dock { border-radius: 22px; }
  .sel-actions .btn { padding: 0 12px; }
}
.abbr { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 3px; border: 1px solid var(--gold); border-radius: 5px; font: 600 .62rem var(--sans); letter-spacing: .06em; color: var(--gold); }
.facet-flag .abbr { height: 18px; min-width: 24px; }

/* checking locations */
.chk-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.chk-stats span { padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-size: .9rem; color: var(--ink-soft); }
.chk-stats b { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--gold); margin-right: 4px; font-variant-numeric: lining-nums; }
.chk-actions { margin-top: 16px; }
.rev-map { height: 220px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); margin: 12px 0 6px; }
.rev-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 8px; }
.lg.cur { background: var(--gold); }
.lg.hint { border: 1.5px dashed var(--teal); }
.lg.cand { background: var(--ink); border: 1px solid var(--gold); border-radius: 3px; }
.hint-area { stroke: var(--teal); stroke-dasharray: 4 6; fill: var(--teal); fill-opacity: .08; }
.stop-pin.cand span { background: var(--surface); color: var(--ink); border-color: var(--gold); width: 24px; height: 30px; font-size: .78rem; }
.cand-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--gold); color: var(--gold); font-size: .75rem; flex: none; }

/* ---------- destination picker ---------- */
.dest-yours { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dest-yours .chip .muted, .chips.quiet .chip .muted { font-size: .78rem; }
.dest-browse { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 12px; font-size: .9rem; }
.dest-browse .icon { width: 15px; height: 15px; }
.dest-card {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); border-radius: 20px; background: var(--gold-soft);
}
.dest-flag { font-size: 2.1rem; line-height: 1; }
.dest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dest-text strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.chips.quiet { margin-top: 10px; }
.chips.quiet .chip { padding: 5px 12px; font-size: .82rem; }
.dest-yours .chips-label { align-self: flex-start; margin: 0; }
.dest-cards { display: flex; flex-direction: column; gap: 10px; }
.dest-cards + .finder, .dest-cards + .dest-browse { margin-top: 14px; }
.dest-card.compact { padding: 10px 14px; gap: 12px; }
.dest-card.compact .dest-flag { font-size: 1.6rem; }
.dest-card.compact .dest-text strong { font-size: 1.2rem; }
.dest-card .icon-btn { flex: none; }

/* ---------- AI provider ---------- */
.ai-pick { margin: 6px 0 14px; }
.ai-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; margin-left: 4px; }
.ai-note { margin: 0 0 12px; font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--ink-soft); }
.ai-how { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.ai-how summary { cursor: pointer; color: var(--teal); font-size: .92rem; }
.ai-how ol { margin: 12px 0 2px; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.ai-how a { color: var(--teal); }
.ai-how code { font-size: .85em; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); }

/* ---------- lock ---------- */
.lock {
  position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 24px 16px;
  background: var(--bg); overflow: auto; animation: lockIn .3s ease;
}
.lock::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(60% 45% at 50% 30%, var(--gold-soft), transparent 70%);
}
.lock.leaving { animation: lockOut .38s ease forwards; }
@keyframes lockIn { from { opacity: 0; } }
@keyframes lockOut { to { opacity: 0; transform: scale(1.02); } }
.lock-card { position: relative; width: min(380px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lock-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock-mark { width: 64px; height: 64px; color: var(--gold); display: grid; place-items: center; }
.lock-mark .khatam, .lock-mark .icon { width: 56px; height: 56px; }
.lock-ar { margin: -4px 0 0; font-family: 'Amiri', serif; font-size: 1.5rem; color: var(--gold); }
.lock-title { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1.1; }
.lock-card > .muted { margin: 0 0 14px; }
.lock-bio { margin-top: 6px; }
.lock-or { width: 100%; display: flex; align-items: center; gap: 12px; margin: 6px 0; color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.lock-or::before, .lock-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.lock-pin { display: flex; gap: 8px; width: 100%; }
.lock-pin input { flex: 1; min-width: 0; text-align: center; letter-spacing: .3em; }
.lock-setup { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.lock-setup input { text-align: center; letter-spacing: .2em; }
.lock-msg { min-height: 1.4em; margin: 4px 0 0; color: var(--rose); font-size: .9rem; }
body.locked { overflow: hidden; }
body.locked > :not(.lock):not(.toast) { visibility: hidden; }
.lock-away { margin: 14px 0 16px; }
.lock-fine { margin: 18px 0 0; }
.lock-pin input::placeholder, .lock-setup input::placeholder { letter-spacing: normal; }

/* ---------- journeys: cards, menus, days ---------- */
.section-head .btn { flex: none; }
.arch-top { position: relative; }
.arch-top.has-sketch .flag { position: absolute; left: 16px; bottom: 10px; font-size: 1.6rem; }
.sketch { width: 86%; height: 82%; }
.sketch polyline { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.sketch circle { fill: var(--surface); stroke: var(--gold); stroke-width: 1.2; }
.arch-card { position: relative; }
.card-menu { position: absolute; bottom: 10px; right: 10px; }
.card-menu .icon { width: 18px; height: 18px; }
.menu-list { display: flex; flex-direction: column; margin-top: 6px; }
.menu-list button {
  display: flex; align-items: center; gap: 14px; padding: 13px 8px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.menu-list button:last-child { border-bottom: 0; }
.menu-list button:hover span { color: var(--gold); }
.menu-list .icon { width: 19px; height: 19px; color: var(--gold); flex: none; }
.menu-list span { display: flex; flex-direction: column; gap: 2px; }
.menu-list small { color: var(--muted); font-size: .8rem; }
.menu-list .danger, .menu-list .danger .icon { color: var(--rose); }
.pick-btn { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pick-btn .muted { margin-left: auto; }
.day-tab.add { border-style: dashed; color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.day-tab.add .icon { width: 16px; height: 16px; }
.day-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.day-title h2 { margin: 0; flex: 1; min-width: 0; }
.results-head { list-style: none; margin: 12px 4px 4px; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.results button .rating-gem { width: 20px; height: 20px; }
.track-line { stroke: var(--teal); }
.track-line.faint { stroke-opacity: .28; }
.results-empty { list-style: none; padding: 10px 4px; }

/* ---------- stays & templates ---------- */
.stays { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: none; }
.stay {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.stay-n { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: .78rem; }
.stay-name { flex: 1; min-width: 0; font-family: var(--serif); font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper.small { height: 36px; border-radius: 99px; flex: none; }
.stepper.small button { width: 32px; font-size: 1.1rem; }
.stepper.small output { min-width: 26px; font-size: 1.15rem; }
.stay-unit { width: 30px; }
.stay .icon-btn { width: 32px; height: 32px; }
.stay .icon-btn .icon { width: 16px; height: 16px; }
.stay-add .search .icon { color: var(--gold); }
.days-sum { margin: 0; height: 50px; display: flex; align-items: baseline; gap: 6px; padding-top: 10px; }
.days-sum strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.stay-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; color: var(--ink-soft); }
.stay-line span { display: inline-flex; align-items: center; gap: 5px; }
.stay-line .icon { width: 14px; height: 14px; color: var(--gold); }
.stay-line b { font-weight: 400; color: var(--gold); font-variant-numeric: tabular-nums; }
.day-stay { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrival { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--teal); font-size: .92rem; }
.arrival .icon { width: 16px; height: 16px; }
.tpl-strip { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; }
.tpl-strip .chips-label { align-self: flex-start; margin: 0; }
.tpl-banner {
  display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; padding: 12px 14px 12px 16px;
  border: 1px dashed color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: 18px; background: var(--gold-soft);
}
.tpl-banner > .icon { width: 22px; height: 22px; color: var(--gold); flex: none; }
.tpl-banner > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tpl-banner strong { font-weight: 500; }
.templates .arch-card { border-style: dashed; }
.card-stays { margin: 6px 0 0 !important; }
@media (max-width: 520px) { .stay-unit { display: none; } .tpl-banner { flex-wrap: wrap; } }

/* ---------- legs, travel modes, route check ---------- */
.leg-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 0; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: .84rem; text-align: left; cursor: pointer; border-radius: 12px;
}
.leg-btn > span:first-of-type { flex: 1; padding-left: 4px; }
.leg-btn strong { font-weight: 500; color: var(--ink-soft); }
.leg-btn:hover strong { color: var(--gold); }
.leg-btn .icon { width: 20px; height: 20px; color: var(--teal); background: var(--bg); padding: 1px; border-radius: 50%; }
.leg-btn .leg-edit { width: 14px; height: 14px; color: var(--muted); opacity: .5; background: none; }
.leg-btn:hover .leg-edit { opacity: 1; }
.leg.transfer .leg-btn > span:first-of-type { color: var(--ink-soft); }
.sugg { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-style: normal; padding: 0 !important; }
.menu-list.modes button.on { background: var(--gold-soft); border-radius: 12px; }
.menu-list.modes button > .icon:last-child { margin-left: auto; color: var(--teal); }
.modes-sum { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.modes-sum li { display: grid; grid-template-columns: 24px auto 1fr; align-items: center; gap: 10px; }
.modes-sum .icon { width: 20px; height: 20px; color: var(--teal); }
.modes-sum strong { font-weight: 500; }
.route-check { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.route-check.bad { padding: 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--rose) 45%, var(--line)); background: color-mix(in srgb, var(--rose) 8%, var(--surface)); }
.route-check.bad > .icon { width: 22px; height: 22px; color: var(--rose); flex: none; }
.route-check.bad > span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.route-check.good { color: var(--teal); font-size: .88rem; }
.route-check.good .icon { width: 16px; height: 16px; }
.route-flag { display: inline-flex; align-items: center; gap: 5px; color: var(--rose); font-size: .8rem; margin: 8px 0 0 !important; }
.route-flag .icon { width: 14px; height: 14px; }
.issues { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow: auto; }
.issue { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 14px; }
.issue.sev3 { border-left-color: var(--rose); }
.issue.sev2 { border-left-color: var(--gold); }
.issue.sev1 { border-left-color: var(--teal); }
.issue strong { font-weight: 500; }
.issue .row { margin-top: 4px; }
.from-dot { fill: var(--surface); stroke: var(--teal); stroke-width: 2.5; }
.lock-touch { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 6px 12px; border: 0; background: none; color: var(--ink-soft); font: inherit; cursor: pointer; }
.lock-ring { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--gold); transition: border-color .3s, box-shadow .3s; }
.lock-ring .icon { width: 38px; height: 38px; }
.lock-touch.armed .lock-ring { border-color: var(--gold); animation: listen 2.2s ease-in-out infinite; }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 35%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--gold) 0%, transparent); } }
.lock-hint { font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .lock-touch.armed .lock-ring { animation: none; } }

/* ---------- bookings: reading, editing, quiet lines ---------- */
.ing-text { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; padding: 14px 16px; resize: vertical; margin: 6px 0 12px; }
.drop.small-drop { flex-direction: row; justify-content: center; gap: 12px; padding: 16px; }
.ing-files, .ing-found, .bk-mini, .booked, .tours { list-style: none; margin: 0; padding: 0; }
.ing-files li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .9rem; color: var(--ink-soft); }
.ing-files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ing-files .icon { color: var(--gold); width: 16px; height: 16px; }
.by-hand { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.by-hand .chip .icon { width: 15px; height: 15px; }
.ing-found { margin: 4px 0 22px; }
.ing-found li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ing-found li > .icon { color: var(--gold); }
.ing-item { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
.ing-item strong { font-weight: 400; }
.spinner.inline { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.booking-form .kinds { margin-bottom: 18px; flex-wrap: wrap; border-radius: 18px; }
.bf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.bf-grid .field { margin-bottom: 14px; }
.bf-grid .field.wide { grid-column: 1 / -1; }
.bf-grid textarea { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; padding: 10px 14px; resize: vertical; }
.btn.danger { color: var(--rose); }

/* In a day: one quiet line per booking. */
.booked { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 2px; }
.booked-row { display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; padding: 2px 0; font: inherit; font-size: .86rem; color: var(--ink-soft); cursor: pointer; text-align: left; }
.booked-row .icon { width: 15px; height: 15px; color: var(--gold); }
.booked-row b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.booked-row em { font-style: normal; color: var(--muted); }
.booked-row:hover span { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.booked-sum { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .88rem; color: var(--muted); }
.booked-sum > .icon { width: 16px; height: 16px; color: var(--gold); }
.booked-sum .link { display: inline-flex; align-items: center; gap: 6px; }
.booked-sum .link .icon { width: 15px; height: 15px; }
.booked-sum .icon-btn { width: 28px; height: 28px; }
.booked-leg .sugg { background: var(--teal-soft); color: var(--teal); }
.bk-mini li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .9rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.bk-mini li span { flex: 1; min-width: 0; }
.bk-mini .icon { color: var(--gold); width: 16px; height: 16px; }
.bk-mini + .add-note { margin-top: 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 20px; margin: 16px 0 20px; }
.facts dt { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: .92rem; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- the travel details page ---------- */
.dossier { max-width: 960px; margin: 0 auto; padding: 40px 16px 60px; }
.dossier .page-head { margin-bottom: 40px; }
.dossier .page-head .row { margin-top: 18px; }
.dd-section { margin-top: 56px; }
.glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.glance-card { display: flex; flex-direction: column; gap: 2px; padding: 22px 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; position: relative; }
.glance-card > .icon { position: absolute; top: 20px; right: 20px; color: var(--gold); opacity: .8; }
.glance-card .eyebrow { margin-bottom: 4px; }
.glance-card strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1.2; padding-right: 24px; }
.glance-card.stay { border-radius: 90px 90px 22px 22px; padding-top: 34px; text-align: center; align-items: center; }
.glance-card.stay > .icon { position: static; margin-bottom: 4px; }
.glance-card.stay strong { padding: 0; }

.dd-day { display: flex; gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.dd-day.quiet { padding: 14px 0; }
.dd-date { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.dd-date b { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1; color: var(--ink); }
.dd-date span { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.dd-date em { font-style: normal; font-size: .72rem; color: var(--muted); }
.dd-body { flex: 1; min-width: 0; }
.dd-body h3 { font-size: 1.35rem; margin-bottom: 12px; }
.dd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dd-entry { display: grid; grid-template-columns: 52px 18px 1fr; gap: 12px; align-items: start; }
.dd-entry[data-booking] { cursor: pointer; }
.dd-entry .icon { width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }
.dd-entry.stop .icon { color: var(--muted); width: 15px; height: 15px; margin-top: 4px; }
.dd-entry.stop strong { font-weight: 300; }
.dd-time { font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--ink-soft); padding-top: 1px; }
.dd-text { display: flex; flex-direction: column; min-width: 0; }
.dd-text strong { font-weight: 400; }
.dd-tip { margin-top: 6px; padding: 8px 12px; background: var(--gold-soft); border-radius: 10px; font-size: .86rem; color: var(--ink-soft); }
.dd-note { display: flex; align-items: center; gap: 10px; padding-left: 64px; font-size: .86rem; color: var(--teal); }
.dd-note .icon { width: 15px; height: 15px; }

.leg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.leg-card, .stay-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px 24px 18px; }
.seg + .seg, .leg-gap + .seg { margin-top: 4px; }
.seg-head { display: flex; align-items: center; gap: 10px; }
.seg-head .icon { color: var(--gold); }
.seg-head strong { font-weight: 500; letter-spacing: .04em; }
.seg-head .muted { flex: 1; min-width: 0; }
.seg-head .icon-btn { width: 30px; height: 30px; }
.seg-ends { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 14px 0 8px; }
.seg-ends > div { display: flex; flex-direction: column; }
.seg-ends .end { text-align: right; }
.seg-ends b { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; line-height: 1; letter-spacing: .04em; }
.seg-ends span { font-size: .78rem; color: var(--muted); }
.seg-ends em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.seg-ends sup { color: var(--rose); font-size: .65rem; margin-left: 2px; }
.seg-line { position: relative; height: 1px; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 30%, transparent), var(--gold)); }
.seg-line::before, .seg-line::after { content: ''; position: absolute; top: -3px; width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); background: var(--surface); }
.seg-line::before { left: -4px; } .seg-line::after { right: -4px; }
.seg-line span { position: absolute; left: 50%; top: -1.5em; transform: translateX(-50%); font-size: .74rem; color: var(--muted); white-space: nowrap; }
.leg-gap { margin: 12px 0; padding: 6px 12px; border-left: 2px dotted var(--gold); font-size: .84rem; color: var(--teal); }
.refs { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.refs .icon { width: 15px; height: 15px; vertical-align: -3px; color: var(--gold); }
.stay-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.stay-card { border-radius: 120px 120px 24px 24px; padding-top: 40px; }
.stay-card .eyebrow { text-align: center; }
.stay-head { display: flex; align-items: flex-start; justify-content: center; gap: 6px; text-align: center; }
.stay-head h3 { font-size: 1.5rem; margin: 0; }
.stay-head .icon-btn { width: 30px; height: 30px; flex: none; }
.stay-card > .muted { text-align: center; margin: 4px 0 0; }
.tour-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tour-row > .icon { color: var(--gold); }
.tour-row > span { flex: 1; display: flex; flex-direction: column; }
.tour-row strong { font-weight: 400; }

@media (max-width: 640px) {
  .bf-grid { grid-template-columns: 1fr; }
  .bf-grid .field { grid-column: auto !important; }
  .dd-day { gap: 14px; }
  .dd-date { width: 44px; }
  .dd-entry { grid-template-columns: 44px 16px 1fr; gap: 8px; }
  .dd-note { padding-left: 0; }
  .leg-cards, .stay-cards { grid-template-columns: 1fr; }
}

@media print {
  body::before, .topbar, .nav, .no-print, .icon-btn, .toast, .back { display: none !important; }
  body { background: #fff; color: #111; }
  .dossier { padding: 0; max-width: none; }
  .dd-section { margin-top: 28px; break-inside: auto; }
  .dd-day, .leg-card, .stay-card, .glance-card { break-inside: avoid; }
  .leg-card, .stay-card, .glance-card { box-shadow: none; }
}

/* ---------- your hours ---------- */
.hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hours-time { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: .9rem; color: var(--ink-soft); }
.hours-time .icon { width: 16px; height: 16px; color: var(--gold); }
.hours-time input { border: 0; background: none; color: var(--ink); font: inherit; padding: 4px; }
.busy-list { list-style: none; margin: 14px 0 0; padding: 0; }
.busy-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink-soft); }
.busy-list li > span { flex: 1; min-width: 0; }
.busy-list .icon { width: 16px; height: 16px; color: var(--gold); }
.busy-list strong { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.busy-add { margin-top: 12px; }
.busy-add summary { list-style: none; cursor: pointer; display: inline-flex; }
.busy-add summary::-webkit-details-marker { display: none; }
.busy-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.busy-form select, .busy-form input:not([type="checkbox"]) { height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; padding: 0 10px; }
.busy-form input[data-b="label"], .busy-form #dhn { flex: 1; min-width: 140px; }
#dh .busy-form { margin-bottom: 22px; }
#dh .link.small { display: inline-block; margin-top: 10px; }
.hours-line { margin: 4px 0 0; }
.hours-line .booked-row { color: var(--muted); }
.hours-line .booked-row b { font-weight: 400; color: var(--ink-soft); }
.late-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); font-size: .88rem; }
.late-warn .icon { width: 16px; height: 16px; }
.late-warn span { flex: 1; }
.late-note { color: var(--rose); text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; }
.late-note .icon { width: 13px; height: 13px; }
.leg.busy { color: var(--ink-soft); }
.leg.busy .icon { color: var(--gold); width: 16px; height: 16px; }
.leg.busy b { font-weight: 500; font-variant-numeric: tabular-nums; }
.hours-time span { white-space: nowrap; }
.hours-time input { width: auto; height: auto; border: 0; padding: 4px 6px; background: none; }
.busy-form input[type="time"] { width: 128px; flex: none; }
.busy-form select { width: auto; flex: none; }
.busy-form label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.busy-form input[type="checkbox"] { width: auto; height: auto; }
.busy-head { font-size: .78rem; margin: 24px 0 0; }

/* ---------- the whole journey at once ---------- */
:root { --d0: #b8893f; --d1: #2f8a83; --d2: #b5603f; --d3: #5b6fb3; --d4: #7d8a3a; --d5: #8e5a9a; --d6: #c07a2c; --d7: #3f86b0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --d0: #d9b06c; --d1: #6fc0b7; --d2: #e08b6f; --d3: #8fa0e0; --d4: #b4c26a; --d5: #c08ccc; --d6: #e6a35a; --d7: #74b6dc; }
}
:root[data-theme="dark"] { --d0: #d9b06c; --d1: #6fc0b7; --d2: #e08b6f; --d3: #8fa0e0; --d4: #b4c26a; --d5: #c08ccc; --d6: #e6a35a; --d7: #74b6dc; }
.day-c0 { --dc: var(--d0); } .day-c1 { --dc: var(--d1); } .day-c2 { --dc: var(--d2); } .day-c3 { --dc: var(--d3); }
.day-c4 { --dc: var(--d4); } .day-c5 { --dc: var(--d5); } .day-c6 { --dc: var(--d6); } .day-c7 { --dc: var(--d7); }
.track-line[class*="day-c"], .route-line[class*="day-c"] { stroke: var(--dc); }
.ov-dot { fill: var(--surface); stroke: var(--dc); stroke-width: 2.5; }
.day-tab.all .day-n { font-style: italic; }
.ov-days { list-style: none; margin: 6px 0 0; padding: 0; }
.ov-day { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 6px; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ov-day:hover { background: color-mix(in srgb, var(--gold-soft) 45%, transparent); }
.ov-swatch { flex: none; width: 10px; height: 10px; transform: rotate(45deg); background: var(--dc); border-radius: 2px; }
.ov-n { flex: none; width: 52px; font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.ov-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ov-go { transform: rotate(180deg); width: 16px; height: 16px; color: var(--muted); }

/* ---------- bookmark audit ---------- */
.audit-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; vertical-align: 1px; margin: 0 4px; }
.audit-dot.ok { background: #3e9b5f; box-shadow: 0 0 0 3px color-mix(in srgb, #3e9b5f 22%, transparent); }
.audit-dot.bad { background: #c9483b; box-shadow: 0 0 0 3px color-mix(in srgb, #c9483b 22%, transparent); }
.place-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.place-foot .audit-dot { margin: 0 2px 0 1px; }
.kind-chips .chip { padding: 6px 12px; font-size: .84rem; }
.kind-chips .chip .icon { width: 13px; height: 13px; }
.audit.narrow { max-width: 820px; }
.audit-tabs { margin: 6px 0 20px; flex-wrap: wrap; border-radius: 18px; }
.audit-tabs .muted { font-size: .8rem; margin-left: 4px; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-row { display: flex; gap: 18px; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--line); }
.audit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.audit-main strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.audit-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.audit-reasons { margin: 6px 0 0; padding-left: 18px; color: var(--rose); font-size: .88rem; }
.audit-how { font-size: .86rem; color: var(--teal); }
.audit-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: .78rem; color: var(--muted); }
.audit-foot .audit-dot { margin-left: 0; }
.audit-acts { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 170px; }
.audit-acts .link { align-self: center; margin-top: 2px; }
@media (max-width: 640px) {
  .audit-row { flex-direction: column; }
  .audit-acts { width: auto; flex-direction: row; flex-wrap: wrap; }
}
.gather-error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--ink-soft); font-size: .9rem; }
.gather-error .icon { color: var(--rose); width: 18px; height: 18px; margin-top: 2px; }
.gather-error span { flex: 1; }
.toast { cursor: default; }

/* Rename list: lists to merge into */
.merge-into { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 10px; }
.merge-into:empty { display: none; }

/* Start and end of a journey */
.origin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; }
.origin-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.origin-ret { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; color: var(--muted); }
.origin-ret input { accent-color: var(--gold, currentColor); width: 16px; height: 16px; }
.route-ends { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.route-ends .eyebrow { margin: 0; }
.route-ends #rrplan { justify-self: start; }

/* Choosing places in bulk */
.pick-bar { display: grid; gap: 12px; margin: 4px 0 18px; }
.pick-bar .segmented { max-width: 440px; }
.pick-bar .segmented button { padding: 8px 10px; font-size: .86rem; }
.pick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .9rem; }
.pick-actions .link { display: inline-flex; align-items: center; gap: 6px; }
.pick-actions .icon { width: 15px; height: 15px; }

/* Lighten a day */
.lighten { display: grid; gap: 2px; margin: 14px 0 8px; }
.lighten-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lighten-row input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--gold); }
.lighten-row > span { display: flex; flex-direction: column; gap: 2px; }
.lighten-row strong { font-weight: 400; }
.late-warn .link { color: inherit; }
.ov-heavy { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--rose); font-size: .8rem; }
.ov-heavy .icon { width: 13px; height: 13px; }

/* Places that didn't fit */
.of-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.of-row:first-of-type { border-top: 0; }
.of-name { font-family: var(--serif); font-size: 1.05rem; }
.of-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.of-acts .link { display: inline-flex; align-items: center; gap: 5px; }
.of-acts .icon { width: 14px; height: 14px; }
.day-pick .new-day { border-style: dashed; gap: 8px; }
.day-pick .new-day .icon { width: 16px; height: 16px; }
.replan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.replan-row #rrplan { margin-left: 6px; }

/* Checking a place with Google Maps */
.google-check { padding: 10px 4px; }
.google-check.differs { display: grid; gap: 8px; }
.google-check.differs p { margin: 0 0 2px; }
.google-check.differs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: none; color: inherit; cursor: pointer; font: inherit; }
.google-check.differs button:hover { border-color: var(--gold); }

/* A new journey from an established one */
.variation .vary-modes { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.variation .vary-modes button { padding-inline: 14px; }
.variation .vary-modes button.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--gold); }
.variation .vary-modes button.on > svg { color: var(--gold); }
.variation .vary-modes button:disabled { opacity: .45; cursor: not-allowed; }
.variation .row.gap { align-items: center; }
