/* ============ Fareway design tokens ============ */
:root {
  --bg: #f4f6fb; --card: #ffffff; --card-2: #f8fafc; --text: #0f172a; --muted: #64748b; --line: #e6eaf2;
  --accent: #4f46e5; --accent-2: #0ea5e9; --accent-soft: #eef0ff; --on-accent: #ffffff;
  --good: #16a34a; --good-soft: #e8f8ee; --warn: #b45309; --warn-soft: #fff5e0; --bad: #dc2626; --bad-soft: #fdecec;
  --flight: #4f46e5; --train: #0d9488; --bus: #ea580c; --walk: #94a3b8; --activity: #16a34a;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .12);
  --r: 16px; --r-sm: 10px;
  --hero: linear-gradient(120deg, #4338ca 0%, #4f46e5 35%, #0ea5e9 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020; --card: #121a2e; --card-2: #0f1628; --text: #e8ecf6; --muted: #93a0b8; --line: #23304a;
    --accent: #818cf8; --accent-2: #38bdf8; --accent-soft: #1e2550; --on-accent: #0b1020;
    --good: #4ade80; --good-soft: #10321f; --warn: #fbbf24; --warn-soft: #33270b; --bad: #f87171; --bad-soft: #3a1717;
    --flight: #818cf8; --train: #2dd4bf; --bus: #fb923c; --walk: #64748b; --activity: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    --hero: linear-gradient(120deg, #1e1b4b 0%, #312e81 45%, #0c4a6e 100%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; padding-bottom: 96px; }
.hero-bg { position: absolute; inset: 0 0 auto 0; height: 330px; background: var(--hero); z-index: 0; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(1200px 300px at 80% 0%, rgba(255,255,255,.18), transparent 60%); }
main { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; }
h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 28px 0 10px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 10px; font-weight: 700; }
a { color: var(--accent); }
.hidden { display: none !important; }
.note { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.fine { color: var(--muted); font-size: 12px; margin: 8px 2px 0; }
.muted { color: var(--muted); }

/* ============ header ============ */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: #fff; margin-bottom: 18px; }
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 22px; backdrop-filter: blur(6px); }
.sub { margin: 2px 0 0; color: rgba(255,255,255,.82); font-size: 14px; }
.pages { display: flex; gap: 4px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px; backdrop-filter: blur(6px); }
.pages button { background: transparent; color: rgba(255,255,255,.85); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.pages button.on { background: #fff; color: #312e81; }

/* ============ controls ============ */
button { font: inherit; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; transition: transform .12s ease, background .2s, box-shadow .2s, opacity .2s; }
button:hover { box-shadow: 0 4px 14px rgba(79, 70, 229, .25); }
button:active { transform: scale(.97); }
button:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn { background: var(--accent); color: #fff; padding: 8px 14px; font-size: 13px; }
.btn-light { background: rgba(255,255,255,.95); color: #312e81; padding: 8px 14px; font-size: 13px; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); padding: 7px 13px; font-size: 13px; text-decoration: none; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-soft { background: var(--good-soft); color: var(--good); padding: 8px 14px; font-size: 13px; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.more { background: transparent; color: var(--accent); padding: 4px 0; font-weight: 700; box-shadow: none !important; }
.x { background: transparent; color: var(--muted); padding: 0 6px; font-weight: 400; box-shadow: none !important; }
label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 5px; position: relative; font-weight: 600; }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); font-weight: 500; }
input, select { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); color: var(--text); width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
label.inline select, .mini-select { width: auto; padding: 7px 10px; border-radius: 999px; font-size: 13px; }

/* ============ search card ============ */
.panel { background: var(--card); padding: 18px; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.search-card { box-shadow: var(--shadow-lg); border: 0; padding: 20px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); padding: 7px 16px; font-weight: 600; box-shadow: none; }
.tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr auto 1fr 150px 150px 100px; gap: 10px; align-items: end; }
.row.oneway { grid-template-columns: 1fr auto 1fr 150px 100px; }
.row.oneway .ret { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.stack { display: grid; gap: 8px; margin-bottom: 8px; }
.swap { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); padding: 11px 12px; border-radius: 12px; box-shadow: none; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 16px; font-size: 13px; }
.opts label { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); font-weight: 500; }
.opts label.off { color: var(--muted); }
.opts select { width: auto; padding: 7px 10px; border-radius: 999px; }
.opts .go { margin-left: auto; padding: 13px 26px; font-size: 15px; background: var(--hero); box-shadow: 0 6px 20px rgba(79, 70, 229, .35); }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-top: 6px; box-shadow: var(--shadow-lg); max-height: 340px; overflow: auto; display: none; min-width: 280px; padding: 6px; }
.suggest div { padding: 9px 10px; cursor: pointer; color: var(--text); font-size: 14px; border-radius: 10px; font-weight: 500; }
.suggest div small { color: var(--muted); display: block; font-weight: 400; }
.suggest div.active, .suggest div:hover { background: var(--accent-soft); }
.suggest .indent { padding-left: 28px; }
.code { font-weight: 800; color: var(--accent); }
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--muted); align-items: center; }
.src { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
.src.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-soft); }
.banner { margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.verdict { margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.verdict b.low { color: var(--good); } .verdict b.high { color: var(--bad); } .verdict b.normal { color: var(--accent); }
#progress { margin-top: 18px; display: none; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar div { height: 100%; width: 0; background: var(--hero); transition: width .3s; }
#status { margin: 10px 2px; color: var(--muted); font-size: 13px; min-height: 1.2em; }
#status.error { color: var(--bad); }

/* ============ results toolbar & views ============ */
.viewbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
.views { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.views button { background: transparent; color: var(--muted); padding: 8px 16px; font-weight: 600; box-shadow: none; }
.views button.on { background: var(--accent); color: #fff; }
#count { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; margin: 6px 0 8px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { background: transparent; color: var(--muted); border-radius: 0; padding: 7px 13px; font-weight: 600; font-size: 13px; box-shadow: none; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.est { font-size: 10px; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 1px 5px; border-radius: 6px; margin-left: 4px; vertical-align: 1px; letter-spacing: .02em; }

/* ============ map ============ */
.mapwrap { display: grid; grid-template-columns: 1fr 300px; gap: 12px; }
#map { height: 540px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); z-index: 0; box-shadow: var(--shadow); }
.routes { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; max-height: 540px; overflow: auto; box-shadow: var(--shadow); }
.routes-head { font-size: 11px; color: var(--muted); padding: 6px 8px 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.route { display: flex; gap: 10px; width: 100%; text-align: left; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 12px; padding: 10px; font-weight: 400; margin-bottom: 4px; box-shadow: none; }
.route:hover { background: var(--card-2); box-shadow: none; }
.route.on { border-color: var(--accent); background: var(--accent-soft); }
.route .rk { color: var(--muted); font-size: 12px; min-width: 22px; font-weight: 700; }
.route .rc { display: flex; flex-direction: column; gap: 2px; }
.route .rc b { font-size: 17px; font-weight: 800; }
.route .rc small { color: var(--muted); font-size: 12px; }
.legend { font-size: 12px; color: var(--muted); margin: 8px 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lg { display: inline-block; width: 26px; height: 0; border-top: 3px solid; vertical-align: middle; margin-left: 6px; }
.lg.flight { border-color: var(--flight); } .lg.train { border-color: var(--train); border-top-style: dashed; } .lg.bus { border-color: var(--bus); border-top-style: dotted; } .lg.transfer { border-color: var(--walk); border-top-style: dashed; border-top-width: 2px; }
.mpill { background: #fff; color: #0f172a; border: 1px solid #dfe4ee; border-radius: 999px; padding: 3px 9px; font: 600 11px 'Plus Jakarta Sans', system-ui, sans-serif; white-space: nowrap; box-shadow: 0 2px 8px rgba(15,23,42,.18); transform: translate(-50%, -140%); width: max-content; }
.mpill.mprice.flight { border-color: #4f46e5; color: #4338ca; } .mpill.mprice.bus { border-color: #ea580c; color: #c2410c; } .mpill.mprice.train { border-color: #0d9488; color: #0f766e; }
@media (prefers-color-scheme: dark) { .leaflet-tile-pane { filter: brightness(.78) contrast(1.08) saturate(.85); } }
.mpill.node { background: #0f172a; color: #fff; border-color: #0f172a; transform: translate(-50%, 35%); font-weight: 500; text-align: center; line-height: 1.35; }
.mpill.node.self { background: #b45309; border-color: #b45309; } .mpill.node.end { background: #16a34a; border-color: #16a34a; }
.mpill.activity { background: #e8f8ee; color: #15803d; border-color: #16a34a; }
.marrow div { font-size: 16px; line-height: 18px; text-align: center; text-shadow: 0 0 3px #fff; }
.leaflet-container { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* ============ list cards ============ */
.offer { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.offer:hover { box-shadow: var(--shadow-lg); }
.offer.top { border: 2px solid var(--good); }
.offer-main { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.tag.Cheapest { background: var(--good-soft); color: var(--good); }
.tag.Self-transfer, .tag.Nearby { background: var(--warn-soft); color: var(--warn); }
.tag.Split { background: color-mix(in srgb, #8b5cf6 14%, transparent); color: #7c3aed; }
.tag.Bus { background: color-mix(in srgb, var(--bus) 14%, transparent); color: var(--bus); }
.tag.Train { background: color-mix(in srgb, var(--train) 14%, transparent); color: var(--train); }
.tag.Positioning, .tag.Alternative { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: var(--accent-2); }
.tag.risk-low { background: var(--good-soft); color: var(--good); } .tag.risk-medium { background: var(--warn-soft); color: var(--warn); } .tag.risk-high { background: var(--bad-soft); color: var(--bad); }
.tag.src { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.leg { margin-top: 5px; }
.leg .who { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.leg .who img { width: 18px; height: 18px; border-radius: 4px; }
.slice { color: var(--muted); font-size: 13px; margin-top: 2px; }
.slice b { color: var(--text); font-weight: 600; }
.price { font-size: 22px; font-weight: 800; white-space: nowrap; text-align: right; letter-spacing: -.01em; }
.price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.price .acts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-end; }
.price .acts button { font-size: 12px; padding: 7px 12px; }
.warnline { font-size: 12px; color: var(--warn); margin-top: 5px; }
.warnline.bad { color: var(--bad); }
details.bd { margin-top: 8px; font-size: 13px; }
details.bd summary { cursor: pointer; color: var(--accent); font-weight: 700; }
table.bd { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
table.bd td { padding: 6px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.bd td.amt { text-align: right; white-space: nowrap; }
table.bd tr.total td { font-weight: 800; border-top: 2px solid var(--line); font-size: 15px; }
table.bd tr.journey td { color: var(--muted); font-weight: 700; padding-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
table.bd tr.off td { text-decoration: line-through; color: var(--muted); }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; box-shadow: var(--shadow); }
.mini b.p { white-space: nowrap; }

/* ============ calendar grid ============ */
.grid { overflow-x: auto; }
.grid table { border-collapse: separate; border-spacing: 5px; font-size: 13px; }
.grid th { color: var(--muted); font-weight: 600; padding: 4px 6px; white-space: nowrap; }
.grid td { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: center; cursor: pointer; white-space: nowrap; min-width: 82px; font-weight: 600; transition: transform .12s; }
.grid td:hover { border-color: var(--accent); transform: translateY(-1px); }
.grid td.sel { outline: 2px solid var(--accent); }
.grid td.low { background: var(--good-soft); border-color: var(--good); color: var(--good); font-weight: 800; }
.grid td.na { color: var(--muted); cursor: default; font-weight: 400; }

/* ============ trip panel ============ */
.trip { background: var(--card); border: 1px solid var(--line); border-radius: 22px; margin-top: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.trip-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 22px 22px 20px; background: var(--hero); background-size: cover; background-position: center; color: #fff; min-height: 170px; }
.trip-hero .tag { background: rgba(255,255,255,.18); color: #fff; }
.hero-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero-sub { color: rgba(255,255,255,.88); font-size: 13px; margin-top: 6px; }
.hero-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hero-price > span { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.hero-price small { color: rgba(255,255,255,.85); font-size: 12px; }
.trip-warn { padding: 10px 22px; background: var(--warn-soft); color: var(--warn); font-size: 12px; display: grid; gap: 4px; }
.trip-cols { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 0; }
.trip-col { padding: 18px 22px; min-width: 0; }
.journey-col { border-right: 1px solid var(--line); background: var(--card-2); }

/* metro line */
.m-head { font-weight: 800; margin: 12px 0 6px; font-size: 14px; }
.m-row { display: grid; grid-template-columns: 44px 30px 1fr auto; gap: 8px; align-items: start; position: relative; padding: 5px 0; }
.m-row::before { content: ''; position: absolute; left: 66px; top: 0; bottom: 0; border-left: 3px solid var(--line); }
.m-leg.m-flight::before { border-color: var(--flight); } .m-leg.m-bus::before { border-color: var(--bus); border-left-style: dotted; } .m-leg.m-train::before { border-color: var(--train); border-left-style: dashed; }
.m-time { font-size: 13px; font-weight: 800; text-align: right; } .m-time small { display: block; color: var(--muted); font-weight: 500; }
.m-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; z-index: 1; }
.m-leg .m-dot { border-color: var(--flight); } .m-leg.m-bus .m-dot { border-color: var(--bus); } .m-leg.m-train .m-dot { border-color: var(--train); }
.m-activity .m-dot { border-color: var(--activity); color: var(--activity); background: var(--good-soft); } .m-warn .m-dot { border-color: var(--warn); }
.m-body small { display: block; color: var(--muted); font-size: 12px; } .m-body b { font-size: 14px; font-weight: 700; }
.m-price { font-size: 13px; font-weight: 700; white-space: nowrap; }
.m-wait .m-body b, .m-transfer .m-body b { font-weight: 500; color: var(--muted); }
.m-activity .m-body b { color: var(--activity); }

/* tabs inside the trip */
.tabs2 { display: flex; gap: 4px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; }
.tabs2 button { background: transparent; color: var(--muted); padding: 8px 16px; font-size: 13px; box-shadow: none; white-space: nowrap; }
.tabs2 button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.explore-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; box-shadow: none; }
.chip:hover { border-color: var(--accent); box-shadow: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty { padding: 14px 16px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--line); color: var(--muted); font-size: 13px; margin: 8px 0; }
.empty.warn { background: var(--warn-soft); color: var(--warn); border-style: solid; border-color: transparent; }

/* stop / destination cards */
.stop { border: 1px solid var(--line); border-radius: 18px; margin-bottom: 16px; overflow: hidden; background: var(--card); }
.stop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 16px; min-height: 92px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 85%, #000), var(--accent-2)); background-size: cover; background-position: center; color: #fff; }
.stop-head.photo { min-height: 130px; }
.stop-title { font-size: 21px; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.stop-sub { font-size: 12px; color: rgba(255,255,255,.9); margin-top: 2px; }
.city-intro { margin: 12px 16px 0; color: var(--muted); font-size: 13px; }
.planned { margin: 12px 16px 0; padding: 10px 12px; border-radius: 12px; background: var(--good-soft); color: var(--good); font-size: 13px; }
.stop > .empty { margin: 12px 16px; }
.stop > .fine, .stop > .legend2 { margin: 0 16px 14px; }
.ideas { display: flex; gap: 12px; overflow-x: auto; padding: 14px 16px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.idea { flex: 0 0 236px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s; }
.idea:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.idea.added { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 35%, transparent); }
.idea.dim { opacity: .62; }
.idea-img { height: 120px; background: var(--card-2) center/cover no-repeat; position: relative; display: flex; align-items: center; justify-content: center; }
.idea-img.noimg { background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 18%, var(--card))); }
.idea-img.i-food { background: linear-gradient(135deg, #fff1e6, #ffe0cc); } .idea-img.i-viewpoints { background: linear-gradient(135deg, #e0f2fe, #ede9fe); } .idea-img.i-history { background: linear-gradient(135deg, #fef3c7, #fde68a); } .idea-img.i-nature { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
@media (prefers-color-scheme: dark) { .idea-img.i-food, .idea-img.i-viewpoints, .idea-img.i-history, .idea-img.i-nature { background: linear-gradient(135deg, #1e2550, #10321f); } }
.idea-icon { font-size: 40px; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.95); color: #0f172a; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.badge.ok { background: #16a34a; color: #fff; } .badge.warn { background: #f59e0b; color: #1f1300; } .badge.off { background: #64748b; color: #fff; }
.badge.slot { left: auto; right: 8px; background: rgba(15,23,42,.78); color: #fff; }
.idea-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.idea-body b { font-size: 14px; line-height: 1.25; }
.idea-body p { margin: 0; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.idea-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.idea-time { font-size: 11px; color: var(--muted); }
.idea-time.bad { color: var(--bad); }
.idea-acts { display: flex; gap: 6px; align-items: center; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.idea-acts a { font-size: 12px; font-weight: 700; text-decoration: none; margin-left: auto; }
.idea.away { flex-basis: 150px; padding: 14px; justify-content: center; gap: 4px; background: var(--card-2); box-shadow: none; border-style: dashed; color: var(--muted); font-size: 13px; }
.idea.away:hover { transform: none; box-shadow: none; }
.idea.skel .idea-img { background: linear-gradient(90deg, var(--card-2), var(--line), var(--card-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.idea.skel i { display: block; height: 10px; border-radius: 6px; background: var(--line); margin: 6px 0; animation: shimmer 1.2s infinite; background: linear-gradient(90deg, var(--card-2), var(--line), var(--card-2)); background-size: 200% 100%; }
.idea.skel i:nth-child(2) { width: 70%; } .idea.skel i:nth-child(3) { width: 45%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.tbar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--line); }
.tbar span { display: block; height: 100%; }
.tbar .go { background: var(--walk); } .tbar .visit { background: var(--activity); } .tbar .buf { background: #f59e0b; } .tbar .spare { background: color-mix(in srgb, var(--good) 22%, transparent); }
.tbar.over { box-shadow: inset 0 0 0 2px var(--bad); }
.legend2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend2 .k { width: 14px; height: 7px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.legend2 .k.go { background: var(--walk); } .legend2 .k.visit { background: var(--activity); } .legend2 .k.buf { background: #f59e0b; } .legend2 .k.spare { background: color-mix(in srgb, var(--good) 22%, transparent); }
.day { border-top: 1px solid var(--line); }
.day-head { display: flex; justify-content: space-between; padding: 12px 16px 0; font-size: 14px; }
.day-head span { color: var(--muted); font-size: 12px; }
.day .ideas { padding-top: 10px; }
.daymap { height: 200px; margin: 0 16px 14px; border-radius: 14px; border: 1px solid var(--line); z-index: 0; }
.offer-stop { padding: 0 0 8px; }
.offer-head { padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 2px; }
.offer-head span { color: var(--muted); font-size: 13px; }
.stopover { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; width: calc(100% - 32px); margin: 6px 16px; text-align: left; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 8px; font-weight: 500; box-shadow: none; }
.stopover:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.so-img { width: 56px; height: 56px; border-radius: 10px; background: var(--hero) center/cover; }
.so-text { display: flex; flex-direction: column; } .so-text b { font-size: 15px; } .so-text small { color: var(--muted); font-size: 12px; }
.so-price { font-weight: 800; font-size: 14px; color: var(--warn); white-space: nowrap; } .so-price.good { color: var(--good); }

/* stays */
.stay { border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; background: var(--card); }
.stay-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.stay-head span { color: var(--muted); font-size: 13px; }
.stay-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stay-opt { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-weight: 500; font-size: 12px; box-shadow: none; }
.stay-opt:hover { border-color: var(--accent); box-shadow: none; }
.stay-opt.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.stay-opt b { font-size: 14px; } .stay-opt small { color: var(--muted); }
.so-icon { font-size: 20px; } .so-total { font-weight: 800; font-size: 13px; margin-top: 4px; }
.stay-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* sticky total bar */
.totalbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(760px, calc(100% - 24px)); z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 10px 12px; animation: rise .25s ease; }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.tb-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tb-toggle { background: transparent; color: var(--text); padding: 2px 6px; text-align: left; display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; box-shadow: none !important; font-weight: 500; min-width: 0; }
.tb-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.tb-total { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.tb-toggle small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-acts { display: flex; gap: 6px; }
.tb-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px 14px; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; }
.tb-detail div { display: flex; justify-content: space-between; gap: 8px; } .tb-detail span { color: var(--muted); }

/* booking modal */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 60; overflow: auto; }
.modal-box { background: var(--card); border-radius: 22px; padding: 20px; width: 100%; max-width: 640px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.bookitem { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.bookitem input { width: auto; margin-top: 4px; }
.bookitem.done .what { text-decoration: line-through; color: var(--muted); }
.bookitem .links a { font-size: 13px; color: var(--accent); margin-right: 12px; text-decoration: none; font-weight: 700; }

/* other pages */
.result { margin-top: 16px; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.page > form.panel { box-shadow: var(--shadow-lg); border: 0; }
.links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ============ phone ============ */
@media (max-width: 860px) {
  .hero-bg { height: 300px; }
  .row, .row.oneway { grid-template-columns: 1fr 1fr; }
  .swap { display: none; }
  .opts .go { width: 100%; margin-left: 0; }
  .mapwrap { grid-template-columns: 1fr; }
  #map { height: 360px; }
  .routes { max-height: none; display: flex; overflow-x: auto; gap: 8px; scroll-snap-type: x mandatory; }
  .routes-head { display: none; }
  .route { min-width: 220px; border-color: var(--line); scroll-snap-align: start; }
  .trip-cols { grid-template-columns: 1fr; }
  .journey-col { border-right: 0; border-top: 1px solid var(--line); order: 2; }  /* phone: Explore first, timeline below */
  .trip-hero { flex-direction: column; align-items: flex-start; }
  .hero-price { align-items: flex-start; text-align: left; }
  .hero-title { font-size: 25px; }
  .offer-main { flex-direction: column; }
  .price { text-align: left; }
  .price .acts { align-items: flex-start; flex-direction: row; }
  .row2 { grid-template-columns: 1fr; }
  .stay-opts { grid-template-columns: 1fr 1fr; }
  .idea { flex-basis: 78%; }
  .trip-col { padding: 16px; }
  .top { color: #fff; }
  .pages button { padding: 7px 12px; font-size: 13px; }
  .tb-toggle small { display: none; }
}

.stop-head .btn-light, .hero-price .btn-light { white-space: nowrap; flex-shrink: 0; }

/* ============ itinerary ============ */
.itin { position: relative; }
.it-head { font-weight: 800; font-size: 15px; margin: 14px 0 6px; }
.it-day { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; margin: 10px 0 4px 52px; padding: 6px 10px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line); }
.it-day span { color: var(--muted); font-weight: 500; font-size: 11px; }
.it-row { display: grid; grid-template-columns: 44px 34px minmax(0, 1fr) auto; gap: 8px; align-items: start; position: relative; padding: 6px 4px; border-radius: 12px; transition: background .15s; }
.it-row::before { content: ''; position: absolute; left: 68px; top: 0; bottom: 0; border-left: 3px solid var(--line); }
.it-row.m-flight::before { border-color: var(--flight); } .it-row.m-bus::before { border-color: var(--bus); border-left-style: dotted; } .it-row.m-train::before { border-color: var(--train); border-left-style: dashed; }
.it-row.k-activity::before, .it-row.k-act-travel::before { border-color: var(--activity); border-left-style: dotted; }
.it-row.hl { background: var(--accent-soft); }
.it-time { font-size: 13px; font-weight: 800; text-align: right; padding-top: 5px; } .it-time small { display: block; color: var(--muted); font-weight: 500; }
.it-rail { display: flex; justify-content: center; z-index: 1; }
.it-dot { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; }
.it-dot i { position: absolute; top: -6px; left: -8px; font-style: normal; font-size: 10px; font-weight: 800; background: var(--text); color: var(--card); border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.m-flight .it-dot { border-color: var(--flight); } .m-bus .it-dot { border-color: var(--bus); } .m-train .it-dot { border-color: var(--train); }
.k-activity .it-dot { border-color: var(--activity); background: var(--good-soft); color: var(--activity); }
.k-gap .it-dot { border-color: var(--accent-2); } .k-buffer .it-dot { border-color: #f59e0b; } .k-stay .it-dot { border-color: var(--accent); }
.it-body { min-width: 0; } .it-body small { display: block; color: var(--muted); font-size: 12px; }
.it-title { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .it-title b { font-size: 14px; }
.k-transfer .it-title b, .k-act-out .it-title b, .k-act-back .it-title b, .k-act-travel .it-title b, .k-wait .it-title b { font-weight: 600; color: var(--muted); }
.k-activity .it-title b { color: var(--activity); }
.k-gap { background: color-mix(in srgb, var(--accent-2) 7%, transparent); }
.k-buffer { background: repeating-linear-gradient(135deg, color-mix(in srgb, #f59e0b 9%, transparent) 0 8px, transparent 8px 16px); }
.k-buffer .it-title b { color: var(--warn); font-weight: 600; }
.k-free .it-title b { color: var(--good); font-weight: 600; } .warnrow .it-title b { color: var(--warn); }
.it-cost { font-size: 13px; font-weight: 700; white-space: nowrap; text-align: right; padding-top: 5px; }
.it-buy { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; } .it-buy a { font-size: 11px; font-weight: 700; text-decoration: none; }
.it-link { font-size: 11px; font-weight: 600; text-decoration: none; }
.it-row.conflict { background: var(--bad-soft); }
.it-row.conflict .it-dot { border-color: var(--bad); }
.it-conflict { margin-top: 6px; font-size: 12px; color: var(--bad); font-weight: 600; }
.fixes, .it-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.mini-btn { font-size: 11px; padding: 4px 9px; background: var(--card); color: var(--text); border: 1px solid var(--line); font-weight: 600; box-shadow: none; }
.mini-btn:hover { border-color: var(--accent); box-shadow: none; }
.it-total { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.it-total b { font-size: 20px; color: var(--text); }
.gapbar-wrap { margin-top: 6px; }
.gapbar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--line); }
.gapbar span { height: 100%; display: block; }
.gapbar .used { background: var(--activity); } .gapbar .spare { background: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.gapbar .buf { background: repeating-linear-gradient(135deg, #f59e0b 0 4px, #fcd34d 4px 8px); }
.gapbar.over { box-shadow: inset 0 0 0 2px var(--bad); }
.dropzone { outline: 2px dashed transparent; outline-offset: -2px; }
body.dragging .dropzone { outline-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.dropzone.over { outline-color: var(--accent) !important; background: var(--accent-soft) !important; }
.idea[draggable=true] { cursor: grab; }
.wx { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.wx.forecast { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.rain { font-size: 11px; color: var(--accent-2); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.jstrip { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; font-size: 11px; font-weight: 600; }
.jstrip span { padding: 2px 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); white-space: nowrap; }
.js-leg.m-flight { color: var(--flight); } .js-leg.m-bus { color: var(--bus); } .js-leg.m-train { color: var(--train); }
.js-gap.long { background: color-mix(in srgb, var(--accent-2) 12%, transparent); color: var(--accent-2); border-color: transparent; }
.js-stay { color: var(--accent); }
.mnum { background: #0f172a; color: #fff; border-radius: 999px; padding: 3px 9px; font: 700 11px 'Plus Jakarta Sans', system-ui, sans-serif; white-space: nowrap; box-shadow: 0 2px 8px rgba(15,23,42,.25); border: 2px solid #fff; width: max-content; transition: transform .15s; }
.mnum.small { padding: 2px 6px; }
.mnum.flight { background: #4f46e5; } .mnum.bus { background: #ea580c; } .mnum.train { background: #0d9488; }
.mnum.act { background: #16a34a; } .mnum.gap { background: #0284c7; } .mnum.stay { background: #7c3aed; } .mnum.bad { background: #dc2626; }
.mnum.hl { transform: scale(1.25); z-index: 1000 !important; }

.map-btn { position: absolute; top: 10px; right: 10px; z-index: 500; background: #fff; color: #0f172a; font-size: 12px; padding: 7px 12px; box-shadow: 0 2px 10px rgba(15,23,42,.2); }
.it-row.clickable { cursor: pointer; }
#map { position: relative; }
.stop-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px 0; }
.stop-choice button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 500; box-shadow: none; }
.stop-choice button.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.stop-choice small { color: var(--muted); font-size: 11px; }
.fine.pad { margin: 10px 16px 0; }
.modes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mode-btn { font-size: 11px; padding: 3px 9px; background: var(--card); color: var(--muted); border: 1px solid var(--line); font-weight: 600; box-shadow: none; }
.mode-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.it-row.k-process { padding-top: 2px; padding-bottom: 2px; }
.it-row.k-process .it-dot { width: 24px; height: 24px; font-size: 11px; border-style: dashed; }
.it-row.k-process .it-title b { font-size: 12px; font-weight: 600; color: var(--muted); }
.it-row.k-process small { font-size: 11px; }
.it-row.milestone .it-title b { color: var(--text); font-weight: 800; font-size: 13px; }
.it-row.milestone .it-dot { border-style: solid; border-color: var(--accent); }
.it-row.gate .it-title b { color: var(--warn); }
.it-row.badrow { background: var(--bad-soft); } .it-row.badrow .it-title b { color: var(--bad); }
.m-walk.k-act-travel::before { border-left-style: dotted; border-color: #16a34a; } .m-bike.k-act-travel::before { border-color: #65a30d; border-left-style: dashed; }
.m-taxi::before { border-color: #d97706 !important; border-left-style: solid !important; } .m-transit.k-act-out::before, .m-transit.k-act-back::before { border-color: var(--train); }
@media (max-width: 860px) { .stop-choice { grid-template-columns: 1fr; } }

.malt { background: rgba(255,255,255,.92); color: #334155; border: 1px solid #cbd5e1; border-radius: 999px; padding: 2px 8px; font: 700 11px 'Plus Jakarta Sans', system-ui, sans-serif; white-space: nowrap; width: max-content; cursor: pointer; box-shadow: 0 1px 6px rgba(15,23,42,.15); transform: translate(-50%, -50%); }
.malt:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* when to book */
.book-card, .dt-intro { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.bk-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .bk-head span { color: var(--muted); font-size: 13px; }
.bk-verdict { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; }
.bk-verdict b { font-size: 18px; } .bk-verdict span { font-size: 13px; }
.bk-verdict.ok { background: var(--good-soft); color: var(--good); } .bk-verdict.mid { background: var(--accent-soft); color: var(--accent); } .bk-verdict.bad { background: var(--bad-soft); color: var(--bad); }
.gauge { margin: 6px 0 12px; } .g-track { position: relative; display: flex; height: 10px; border-radius: 6px; overflow: visible; }
.g-track span { height: 100%; } .g-low { background: #22c55e; border-radius: 6px 0 0 6px; } .g-typ { background: #93c5fd; } .g-high { background: #f87171; border-radius: 0 6px 6px 0; }
.g-mark { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--text); border-radius: 2px; transform: translateX(-50%); }
.g-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.bk-sub { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.pchart { width: 100%; height: auto; max-height: 180px; }
.pc-line { fill: none; stroke: var(--accent); stroke-width: 2.5; } .pc-band { fill: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.pc-now { fill: var(--good); stroke: #fff; stroke-width: 2; } .pc-lbl { font: 600 11px 'Plus Jakarta Sans', sans-serif; fill: var(--muted); } .pc-lbl.strong { fill: var(--text); }
.leadline { position: relative; height: 12px; background: var(--line); border-radius: 6px; margin: 8px 0 4px; }
.lead-sweet { position: absolute; top: 0; height: 100%; background: #22c55e; border-radius: 6px; opacity: .8; }
.lead-now { position: absolute; top: -6px; width: 3px; height: 24px; background: var(--text); transform: translateX(-50%); }
.lead-now span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; font-style: normal; }
.lead-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.bk-note { font-size: 13px; margin-top: 6px; }
.dows { display: flex; flex-wrap: wrap; gap: 6px; } .dows span { padding: 4px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.dows span.best { background: var(--good-soft); color: var(--good); border-color: transparent; }
.bk-list { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
/* detours */
#detourSec { margin-top: 18px; }
.dt-intro { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 10%, var(--card))); }
.dt-intro > div { display: flex; flex-direction: column; gap: 2px; max-width: 680px; } .dt-intro span { font-size: 13px; color: var(--muted); }
.dt-list { display: grid; gap: 8px; margin-top: 10px; }
.dt-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-weight: 400; box-shadow: var(--shadow); }
.dt-row.good { border-color: var(--good); }
.dt-rank { font-weight: 800; color: var(--muted); } .dt-main { display: flex; flex-direction: column; gap: 3px; } .dt-main small { font-size: 12px; color: var(--muted); }
.dt-main small.risk-high { color: var(--bad); } .dt-main small.risk-medium { color: var(--warn); } .dt-main small.risk-low { color: var(--good); }
.dt-price { text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 18px; font-weight: 800; white-space: nowrap; }
.dt-price small { font-size: 11px; font-weight: 500; color: var(--muted); } .dt-price small.save { color: var(--good); font-weight: 700; } .dt-price small.nosave { color: var(--warn); }
@media (max-width: 860px) { .dt-row { grid-template-columns: 1fr; } .dt-price { text-align: left; } }

/* account & cost */
.acct { margin-left: auto; }
.acct-chip { background: rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; backdrop-filter: blur(6px); box-shadow: none; }
.acct-chip:hover { background: rgba(255,255,255,.26); box-shadow: none; }
.estimate { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.estimate:empty { display: none; }
.estimate b { font-size: 14px; } .estimate .free { color: var(--good); } .estimate .cost { color: var(--accent); }
.estimate .why { color: var(--muted); font-size: 12px; flex-basis: 100%; }
.modal-box.small { max-width: 440px; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.pack { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: none; font-weight: 500; }
.pack:hover { border-color: var(--accent); box-shadow: none; } .pack b { font-size: 20px; } .pack small { color: var(--muted); }
.ledger { font-size: 12px; color: var(--muted); display: grid; gap: 4px; margin-top: 10px; max-height: 180px; overflow: auto; }
.ledger div { display: flex; justify-content: space-between; gap: 10px; }
.bill { color: var(--muted); }

.tag.Cached { background: var(--warn-soft); color: var(--warn); }

.est-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.est-opt { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 500; box-shadow: none; }
.est-opt b { font-size: 14px; } .est-opt small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.est-opt.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.est-opt.disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) { .est-opts { grid-template-columns: 1fr; } }

.extras { margin: 0 22px; padding: 14px 0 4px; border-bottom: 1px solid var(--line); }
.x-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.xrow { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.x-ic { font-size: 20px; text-align: center; } .x-main b { font-size: 14px; display: block; } .x-main small { color: var(--muted); font-size: 12px; }
.x-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; } .x-links a { font-size: 12px; font-weight: 700; text-decoration: none; }
.foot { margin: 40px 0 0; font-size: 12px; color: var(--muted); text-align: center; } .foot a { color: var(--muted); }
@media (max-width: 860px) { .xrow { grid-template-columns: 30px 1fr; } .x-links { grid-column: 1 / -1; justify-content: flex-start; } .extras { margin: 0 16px; } }

/* 3D roadmap */
.trip3d-sec { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.t3-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.t3-head b { font-size: 17px; display: block; } .t3-head span { color: var(--muted); font-size: 12px; }
.t3-acts { display: flex; gap: 8px; }
#trip3d { height: 440px; }
.collage { display: flex; gap: 10px; overflow-x: auto; padding: 12px 14px 16px; scroll-snap-type: x mandatory; }
.cl-card { position: relative; flex: 0 0 170px; height: 112px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)) center/cover; color: #fff; text-align: left; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; font-weight: 500; scroll-snap-align: start; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.cl-card:hover { transform: translateY(-3px); }
.cl-card.on { outline: 3px solid var(--accent); transform: translateY(-3px) scale(1.02); }
.cl-card b { font-size: 13px; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.5); } .cl-card small { font-size: 11px; opacity: .9; }
.cl-n { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.92); color: #0f172a; font-size: 11px; font-weight: 800; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; }
.cl-card.k-activity { background-color: #16a34a; } .cl-card.k-stay { background-color: #7c3aed; }
.cl-drop { flex: 0 0 170px; height: 112px; border: 2px dashed var(--line); border-radius: 14px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; padding: 10px; }
body.dragging .trip3d-sec { outline: 3px dashed var(--accent); }
.maplibregl-ctrl-attrib { font-size: 10px; }
@media (max-width: 860px) { #trip3d { height: 320px; } .cl-card, .cl-drop { flex-basis: 140px; height: 96px; } }
.lg.bus { border-top-style: solid !important; } .lg.train { border-top: 4px solid var(--train) !important; } .lg.walk { border-color: var(--activity); border-top-style: dotted; border-top-width: 4px; } .lg.taxi { border-color: #d97706; }
