/* GENERATED by scripts/build_dark_css.py from app.css. Do not edit by hand. */
:root {
  color-scheme: dark;
  --ink: #dbf4ff;
  --muted: #839aa5;
  --line: #2c3435;
  --paper: #262626;
  --wash: #1c201f;
  --sea: #c3f1ff;
  --sea-light: #2e7180;
  --teal: #0a8a84;
  --teal-deep: #06706b;
  --gold: #e7ae54;
  --rose: #d56c66;
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(36, 51, 47, 0.72), transparent 30rem),
    linear-gradient(180deg, #202222 0%, #191e1d 100%);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.site-frame { min-height: 100vh; }
.topbar {
  height: 72px;
  padding: 0 clamp(18px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(47, 69, 68, 0.45);
  background: rgba(38, 38, 38, 0.74);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 720; letter-spacing: -.035em; font-size: 17px; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #233431; position: relative; }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; display: block; position: absolute; border: 1.4px solid #12827d; border-radius: 50%; }
.brand-mark::before { width: 15px; height: 20px; }
.brand-mark::after { width: 21px; height: 9px; }
.brand-mark span { width: 1px; height: 20px; border-width: 0 0 0 1.4px; }
.topbar-right { display: flex; align-items: center; gap: 17px; }
.collab-note { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #35aa82; box-shadow: 0 0 0 3px rgba(53, 170, 130, .12); }
.pseudonym-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px 5px 5px; background: #262626; font-size: 12px; text-decoration: none; font-weight: 650; color: #b2d1de; transition: border-color .15s, transform .15s; }
.pseudonym-chip:hover { border-color: #215b53; transform: translateY(-1px); }
.avatar-dot { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: #262626; background: #267e7a; font-size: 11px; font-weight: 750; }
.quiet-button { border: 0; background: transparent; color: #798d96; padding: 8px 0 8px 5px; font-size: 12px; }
.quiet-button:hover { color: var(--ink); }
.logout-form { margin: 0; }
.main-content { width: min(1480px, 100%); margin: 0 auto; padding: 36px clamp(16px, 4vw, 56px) 42px; }
.footer-note { text-align: center; padding: 0 16px 20px; color: #5d6e72; font-size: 11px; letter-spacing: .02em; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.eyebrow, .section-kicker { color: var(--teal-deep); font-size: 10px; font-weight: 780; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 9px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(27px, 4vw, 36px); line-height: 1.08; letter-spacing: -.055em; margin-bottom: 10px; font-weight: 760; }
h2 { font-size: 18px; letter-spacing: -.035em; margin: 0; }
h3 { font-size: 14px; letter-spacing: -.02em; }
.subtle-copy { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; max-width: 620px; }
.intro-actions { display: flex; gap: 9px; flex-shrink: 0; }
.primary-button, .secondary-button, .text-button, .danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 10px 14px; font-weight: 690; font-size: 12px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.primary-button { color: #262626; border: 1px solid #087e79; background: linear-gradient(135deg, #148c85, #087b77); box-shadow: 0 7px 14px rgba(9, 126, 119, .15); }
.primary-button:hover { background: linear-gradient(135deg, #0c7e79, #056a68); box-shadow: 0 9px 18px rgba(9, 126, 119, .2); transform: translateY(-1px); }
.secondary-button { color: #a1bbc8; border: 1px solid #2e3838; background: rgba(38, 38, 38, 0.72); }
.secondary-button:hover { border-color: #435e5c; background: #262626; }
.danger-button { color: #a44f4b; border: 1px solid #45312f; background: #262120; }
.danger-button:hover { background: #251b19; border-color: #5c3432; }
.text-button { color: var(--teal-deep); border: 0; padding: 3px 0; background: transparent; font-size: 12px; }
.text-button:hover { color: #a8e7e2; }
.button-plus { font-size: 17px; line-height: .7; font-weight: 400; }
.planner-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .82fr); gap: 20px; align-items: stretch; }
.globe-card, .plan-panel { background: rgba(38, 38, 38, 0.92); border: 1px solid #2a3432; border-radius: 19px; box-shadow: var(--shadow); min-width: 0; }
.globe-card { overflow: hidden; }
.globe-card-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 19px 23px 4px; }
.section-kicker { display: block; font-size: 9px; margin: 0 0 5px; color: #718b8f; }
.globe-title { font-size: 16px; letter-spacing: -.035em; font-weight: 720; }
.globe-hint { color: #6a7e81; font-size: 11px; #262626-space: nowrap; }
.globe-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sync-indicator { color: #657a7d; font-size: 9px; display: inline-flex; align-items: center; gap: 6px; }
.sync-indicator i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #55aa83; box-shadow: 0 0 0 3px rgba(85,170,131,.11); }
.sync-indicator.sync-error { color: #b44d4b; }
.sync-indicator.sync-error i { background: #d56c66; box-shadow: 0 0 0 3px rgba(213,108,102,.12); }
.hint-drag { color: #38877f; font-size: 14px; vertical-align: -1px; margin-right: 4px; }
.hint-divider { color: #404d4d; padding: 0 5px; }
.globe-stage { min-height: 540px; position: relative; display: block; overflow: hidden; background:
  radial-gradient(ellipse at 50% 55%, rgba(218, 239, 234, .70), rgba(241, 248, 247, .20) 43%, transparent 69%);
}
#globe-map { position: absolute; inset: 0; width: 100%; height: 100%; background: #b8d7df; }
#globe-map .maplibregl-canvas { outline: none; }
#globe-map .maplibregl-canvas-container { cursor: grab; }
#globe-map .maplibregl-canvas-container:active { cursor: grabbing; }
#globe-map .maplibregl-ctrl-top-right { top: 12px; right: 12px; }
#globe-map .maplibregl-ctrl-bottom-right { right: 12px; bottom: 8px; }
#globe-map .maplibregl-ctrl-group { overflow: hidden; border: 1px solid rgba(29, 66, 79, .12); border-radius: 9px; box-shadow: 0 5px 16px rgba(21, 59, 70, .13); }
#globe-map .maplibregl-ctrl button { width: 31px; height: 31px; }
#globe-map .maplibregl-ctrl-attrib { max-width: min(76vw, 510px); border-radius: 8px; color: #425d66; background: rgba(255, 255, 255, .87); font-size: 9px; }
#globe-map .maplibregl-ctrl-attrib a { color: #385d69; }
#globe-map .maplibregl-ctrl-logo { margin-left: 11px; }
.globe-shadow { fill: rgba(0, 0, 0, 0.288); filter: blur(8px); }
.globe-outline { pointer-events: none; }
.graticule-line { fill: none; stroke: rgba(30, 60, 56, 0.24); stroke-width: 1; vector-effect: non-scaling-stroke; }
.land-shape { fill: #30402a; fill-opacity: .91; stroke: #2c3827; stroke-width: .8; vector-effect: non-scaling-stroke; }
.route-line { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; opacity: .92; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.route-line.is-selected { stroke-width: 5; opacity: 1; }
.route-direction { fill: #262626; stroke: rgba(0, 0, 0, 0.6); stroke-width: 1; vector-effect: non-scaling-stroke; }
.point-marker { cursor: pointer; outline: none; }
.point-marker circle.point-halo { fill: #583100; opacity: .27; }
.point-marker circle.point-core { fill: #262626; stroke: #087e79; stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.552)); }
.point-marker:hover circle.point-core, .point-marker:focus circle.point-core { stroke-width: 4; fill: #182620; }
.point-marker.is-selected circle.point-core { stroke: #df9a37; fill: #261f0d; }
.point-label { fill: #cff4ff; font-size: 13px; font-weight: 700; paint-order: stroke; stroke: rgba(35, 38, 38, 0.96); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.globe-empty-hint { z-index: 2; pointer-events: none; position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: #93b5c1; font-size: 11px; font-weight: 620; transition: opacity .2s; #262626-space: nowrap; border: 1px solid rgba(38, 38, 38, 0.78); border-radius: 999px; padding: 5px 10px 5px 5px; background: rgba(38, 38, 38, 0.88); box-shadow: 0 3px 14px rgba(0, 0, 0, 0.336); }
.globe-empty-hint.is-hidden { opacity: 0; }
.empty-pin { display: grid; place-items: center; height: 20px; width: 20px; border-radius: 50%; background: #262626; color: var(--teal-deep); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.312); font-size: 16px; }
.map-status { z-index: 2; pointer-events: none; position: absolute; bottom: 12px; left: 16px; color: #95b0ba; font-size: 10px; text-shadow: 0 1px 1px rgba(38, 38, 38, 0.75); }
.map-status.error { color: #b44d4b; }
.globe-card-bottom { border-top: 1px solid #191c1b; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.route-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.legend-item { color: #9ab2be; font-size: 10px; display: inline-flex; align-items: center; gap: 5px; }
.legend-swatch { width: 13px; height: 3px; display: inline-block; border-radius: 9px; }
.route-legend-note { color: #627073; font-size: 10px; text-align: right; }
.plan-panel { padding: 20px 18px 16px; display: flex; flex-direction: column; min-height: 590px; max-height: 740px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 2px 14px; border-bottom: 1px solid #191c1b; }
.count-pill { color: #839da5; background: #1b1f1e; border: 1px solid #293330; border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 700; #262626-space: nowrap; }
.panel-summary { margin: 13px 0 12px; color: #6a7e81; font-size: 10px; line-height: 1.45; display: flex; gap: 7px; align-items: flex-start; }
.summary-icon { color: #d39c41; }
.point-list { margin: 0; padding: 0; list-style: none; overflow-y: auto; min-height: 0; max-height: 390px; flex: 1; display: flex; flex-direction: column; gap: 6px; scrollbar-color: #2e3e3b transparent; scrollbar-width: thin; }
.point-list:empty { display: none; }
.plan-panel.has-selected .point-list { flex: 0 0 auto; max-height: 190px; }
.point-list-item { margin: 0; }
.point-list-button { width: 100%; border: 1px solid transparent; border-radius: 11px; background: transparent; text-align: left; padding: 10px 10px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; color: inherit; transition: background .13s, border-color .13s; }
.point-list-button:hover { background: #1f2221; }
.point-list-button.is-selected { background: #1b211f; border-color: #243b36; }
.point-index { display: grid; place-items: center; height: 24px; width: 24px; border-radius: 50%; background: #27302e; color: #23756f; font-size: 10px; font-weight: 750; }
.point-list-title { display: block; font-size: 12px; font-weight: 700; color: #c1e2ef; overflow: hidden; text-overflow: ellipsis; #262626-space: nowrap; }
.point-list-dates { display: block; font-size: 10px; margin-top: 3px; color: #65777b; }
.point-list-author { display: block; font-size: 9px; margin-top: 3px; color: #629188; }
.point-list-arrow { color: #506161; font-size: 14px; }
.selected-detail { margin: 4px 0 12px; border: 1px solid #293532; border-radius: 13px; padding: 13px; background: linear-gradient(135deg, #1f2322, #1a201e); }
.plan-panel.has-selected .selected-detail { flex: 1 1 auto; min-height: 220px; overflow-y: auto; scrollbar-color: #2e3e3b transparent; scrollbar-width: thin; }
.selected-detail.hidden { display: none; }
.selected-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.selected-name { font-size: 15px; font-weight: 760; margin: 0; letter-spacing: -.025em; }
.selected-dates { color: #788f94; font-size: 10px; margin: 4px 0 10px; }
.selected-actions { display: flex; gap: 5px; flex-shrink: 0; }
.mini-button { border: 1px solid #2c3937; border-radius: 7px; background: #262626; color: #98b5bd; font-size: 10px; padding: 5px 7px; }
.mini-button:hover { border-color: #3d6561; }
.mini-button.delete { color: #a75a57; border-color: #42322f; }
.coord-line { color: #6c8084; font-size: 9px; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.detail-label { color: #607477; text-transform: uppercase; letter-spacing: .1em; font-size: 8px; font-weight: 750; margin: 9px 0 5px; }
.activity-pills { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.activity-pills li { background: #262626; border: 1px solid #2a3230; color: #93afb5; border-radius: 999px; padding: 4px 8px; font-size: 9px; }
.detail-note { #262626-space: pre-wrap; color: #849ba1; font-size: 10px; line-height: 1.45; margin: 0; }
.attribution { color: #6a8b86; margin-top: 5px; }
.photos-section { border-top: 1px solid #283431; margin-top: 12px; padding-top: 10px; }
.photos-heading { display: flex; justify-content: space-between; align-items: center; }
.photos-heading .detail-label { margin: 0 0 7px; }
.google-maps-label { display: inline-flex; align-items: center; color: #81999d; background: #191e1c; border-radius: 999px; padding: 3px 7px; font-size: 8px; font-weight: 720; margin-bottom: 5px; }
.photo-search-controls { display: flex; gap: 6px; }
.photo-search-controls input { flex: 1; min-width: 0; border: 1px solid #2b3533; border-radius: 7px; background: #262626; color: #a4c1c9; padding: 7px 8px; font-size: 9px; outline: none; }
.photo-search-controls input:focus { border-color: #33746b; box-shadow: 0 0 0 2px rgba(14,137,129,.1); }
.photo-search-button { flex: 0 0 auto; border: 1px solid #293936; background: #1c2220; color: #147a73; border-radius: 7px; padding: 6px 8px; font-size: 9px; font-weight: 700; }
.photo-search-button:hover { background: #121e1a; border-color: #2a564e; }
.photo-search-button:disabled { opacity: .6; cursor: wait; }
.photo-message { color: #6e8385; font-size: 9px; line-height: 1.4; margin: 7px 0 0; }
.photo-unavailable { color: #8c7040; }
.photo-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.photo-card { margin: 0; min-width: 0; overflow: hidden; border-radius: 7px; border: 1px solid #2b3433; background: #262626; }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #29312f; }
.photo-attribution { padding: 4px 5px 5px; color: #7c9095; font-size: 7px; line-height: 1.3; overflow-wrap: anywhere; }
.photo-attribution a { color: #66a9a2; }
.tasks-section { border-top: 1px solid #283431; margin-top: 13px; padding-top: 10px; }
.tasks-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tasks-section-heading .detail-label { margin: 0; }
.add-task-button { border: 0; background: transparent; color: #087e79; font-size: 10px; font-weight: 720; padding: 4px 0; }
.add-task-button:hover { color: #92d9d4; text-decoration: underline; }
.task-groups { display: flex; flex-direction: column; gap: 8px; }
.task-group { background: rgba(38, 38, 38, 0.57); border: 1px solid #29312f; border-radius: 9px; overflow: hidden; }
.task-group-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px; border-bottom: 1px solid #191d1b; }
.task-group-title { display: flex; align-items: center; gap: 6px; color: #96b1b6; font-size: 9px; font-weight: 760; }
.task-status-count { display: grid; place-items: center; min-width: 17px; height: 17px; border-radius: 99px; background: #191e1c; color: #6f8786; font-size: 8px; }
.task-group-body { display: flex; flex-direction: column; }
.task-row { padding: 8px; border-bottom: 1px solid #191d1b; }
.task-row:last-child { border-bottom: 0; }
.task-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.task-title { color: #b6d4df; font-size: 10px; line-height: 1.35; font-weight: 700; margin: 0; }
.task-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.task-row-meta { color: #687c7e; font-size: 8px; line-height: 1.4; margin-top: 4px; }
.task-row-details { color: #7c9499; font-size: 9px; line-height: 1.4; #262626-space: pre-wrap; margin: 5px 0 0; }
.task-booking-link { display: inline-flex; color: #14857f; font-size: 9px; margin-top: 5px; text-decoration: none; }
.task-booking-link:hover { text-decoration: underline; }
.task-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #59696a; display: inline-block; }
.task-status-dot.booked { background: #168c6a; }
.task-status-dot.to-do { background: #d99d39; }
.task-status-dot.in-progress { background: #287cc0; }
.task-status-dot.done { background: #77917e; }
.task-status-dot.cancelled { background: #bc6b66; }
.next-route-chip { display: flex; align-items: center; gap: 7px; margin: 7px 0 2px; font-size: 10px; color: #95afb6; }
.route-color-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.empty-list { margin: auto 0; padding: 27px 15px 34px; text-align: center; color: #697d80; }
.empty-list.hidden { display: none; }
.empty-list-icon { color: #417972; font-size: 29px; margin-bottom: 8px; }
.empty-list h3 { color: #9cbcc5; font-size: 13px; margin: 0 0 6px; }
.empty-list p { font-size: 10px; line-height: 1.5; margin: 0 auto 12px; max-width: 205px; }
.point-dialog { width: min(620px, calc(100vw - 24px)); max-width: 620px; border: 1px solid #2b3734; border-radius: 18px; padding: 0; color: var(--ink); box-shadow: 0 28px 88px rgba(0, 0, 0, 0.6); }
.point-dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.point-form { padding: 22px 24px 20px; max-height: min(88vh, 850px); overflow: auto; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-heading h2 { font-size: 21px; letter-spacing: -.045em; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: #262626; font-size: 20px; line-height: 1; color: #6d868d; }
.icon-button:hover { color: var(--ink); background: #1e2120; }
.coordinate-label { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; margin-bottom: 14px; background: #19201e; color: #69a8a1; font-size: 10px; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .login-form label { font-size: 10px; font-weight: 700; color: #98b1b8; }
.field input, .field select, .field textarea, .login-form input {
  width: 100%; border: 1px solid #2d3635; border-radius: 8px; background: #262626; color: #cce8f5; outline: none; padding: 9px 10px; min-height: 38px; font-size: 11px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .login-form input:focus { border-color: #56aaa1; box-shadow: 0 0 0 3px rgba(14, 137, 129, .12); }
.full-field { grid-column: 1 / -1; }
.label-hint { font-weight: 400; color: #5b6c6e; margin-left: 4px; }
.next-stop-block { margin-top: 18px; padding: 13px 13px 11px; border-radius: 12px; border: 1px solid #2a3230; background: #212322; }
.next-stop-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.next-stop-heading .section-kicker { margin-bottom: 3px; }
.next-stop-heading h3 { margin: 0; font-size: 13px; }
.next-step-number { color: #4b9c94; background: #131d1a; height: 27px; width: 27px; border-radius: 50%; display: grid; place-items: center; }
.field-caption { color: #647679; font-size: 9px; line-height: 1.45; margin: 8px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast-region { position: fixed; z-index: 20; right: 19px; bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.toast { background: #c8ebf8; color: #262626; padding: 11px 14px; border-radius: 9px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.432); font-size: 11px; max-width: min(360px, calc(100vw - 38px)); animation: toast-in .2s ease-out; }
.toast.error { background: #8b3936; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.flash-stack { width: min(900px, calc(100% - 32px)); margin: 14px auto 0; }
.flash { border-radius: 9px; padding: 10px 13px; font-size: 12px; border: 1px solid; }
.flash-success { background: #19211d; color: #276b54; border-color: #203b30; }
.flash-error { background: #251c1b; color: #994842; border-color: #4a302d; }
.login-layout, .profile-layout { width: min(840px, 100%); min-height: 510px; margin: 34px auto 45px; border: 1px solid #2b3533; border-radius: 22px; display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; background: #262626; box-shadow: var(--shadow); }
.login-art { min-height: 510px; overflow: hidden; position: relative; display: grid; place-items: center; background: radial-gradient(circle at 53% 43%, #327f83 0 1%, #92d1dd 37%, #c5f2ff 76%); }
.login-art::before, .login-art::after { content: ""; position: absolute; border: 1px solid rgba(28, 56, 47, 0.18); border-radius: 50%; width: 460px; height: 460px; }
.login-art::after { width: 580px; height: 580px; opacity: .65; }
.login-globe { position: relative; width: 190px; height: 190px; border-radius: 50%; border: 1px solid rgba(32, 51, 45, 0.66); background: radial-gradient(circle at 35% 31%, rgba(119,202,186,.75), rgba(24,107,113,.23) 62%, rgba(0, 0, 0, 0.192)); box-shadow: inset -22px -8px 38px rgba(0, 0, 0, 0.6), 0 0 65px rgba(135,220,199,.12); z-index: 1; }
.login-globe::before, .login-globe::after, .login-globe span { content: ""; position: absolute; border: 1px solid rgba(29, 54, 45, 0.54); border-radius: 50%; inset: 18px 52px; }
.login-globe::after { inset: 2px 78px; }
.login-globe span:first-child { inset: 47px 2px; }
.login-globe span:last-child { inset: 88px 2px; border-top: 0; border-left: 0; border-right: 0; }
.login-orbit { width: 270px; height: 92px; border: 1px solid rgba(84, 52, 0, 0.8); border-radius: 50%; position: absolute; transform: rotate(-24deg); z-index: 2; }
.orbit-two { width: 240px; height: 74px; transform: rotate(36deg); border-color: rgba(156,223,206,.44); }
.login-caption { position: absolute; left: 32px; bottom: 27px; color: rgba(25, 33, 28, 0.78); font-size: 12px; letter-spacing: .03em; }
.login-panel, .profile-panel { display: flex; flex-direction: column; justify-content: center; padding: 45px clamp(25px, 5vw, 55px); }
.login-panel h1, .profile-panel h1 { font-size: 27px; }
.login-panel .subtle-copy, .profile-panel .subtle-copy { font-size: 12px; margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-form input { min-height: 42px; margin-bottom: 10px; }
.full-button { width: 100%; min-height: 42px; }
.privacy-note { color: #637173; font-size: 9px; line-height: 1.5; margin: 18px 0 0; }
.privacy-note span { color: #2d9687; font-size: 8px; margin-right: 4px; }
.profile-layout { min-height: 430px; }
.profile-mark { background: radial-gradient(circle at 50% 49%, #24322e, #1c211f 53%, #262626 100%); display: grid; place-items: center; position: relative; overflow: hidden; }
.profile-orbit { height: 190px; width: 190px; border: 1px solid #285d52; border-radius: 50%; box-shadow: 0 0 0 29px rgba(37, 88, 79, 0.12), 0 0 0 59px rgba(37, 88, 79, 0.08); }
.profile-star { position: absolute; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #262626; color: #c38c37; font-size: 22px; box-shadow: 0 8px 28px rgba(124, 177, 164, 0.17); }

@media (max-width: 1040px) {
  .planner-layout { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr); gap: 14px; }
  .globe-stage { min-height: 500px; }
  .plan-panel { min-height: 525px; }
  .globe-card-bottom { align-items: flex-start; flex-direction: column; }
  .route-legend-note { text-align: left; }
}
@media (max-width: 780px) {
  .main-content { padding-top: 25px; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 15px; }
  .intro-actions { width: 100%; }
  .intro-actions > * { flex: 1; }
  .planner-layout { grid-template-columns: 1fr; }
  .globe-stage { min-height: 460px; aspect-ratio: 1000 / 700; }
  .plan-panel { min-height: 300px; max-height: none; }
  .point-list { max-height: 340px; }
  .plan-panel.has-selected .point-list { max-height: 210px; }
  .plan-panel.has-selected .selected-detail { max-height: none; overflow: visible; }
  .login-layout, .profile-layout { grid-template-columns: 1fr; margin: 18px auto 30px; }
  .login-art { min-height: 240px; }
  .login-globe { width: 125px; height: 125px; }
  .login-globe::before { inset: 12px 35px; }
  .login-globe::after { inset: 2px 52px; }
  .login-globe span:first-child { inset: 31px 2px; }
  .login-globe span:last-child { inset: 59px 2px; }
  .login-orbit { width: 190px; height: 65px; }
  .orbit-two { width: 180px; height: 54px; }
  .login-caption { left: 20px; bottom: 14px; font-size: 10px; }
  .profile-mark { min-height: 210px; }
  .profile-orbit { height: 125px; width: 125px; }
  .login-panel, .profile-panel { padding: 30px 24px; }
}
@media (max-width: 520px) {
  .topbar { height: 62px; padding: 0 15px; }
  .collab-note { display: none; }
  .brand { font-size: 15px; }
  .pseudonym-chip { font-size: 10px; }
  .main-content { padding-left: 12px; padding-right: 12px; }
  .globe-card-top { padding: 15px 14px 3px; }
  .globe-top-right { align-items: flex-end; gap: 5px; }
  .sync-indicator { font-size: 8px; }
  .globe-hint { font-size: 9px; }
  .globe-stage { min-height: 410px; }
  .globe-empty-hint { font-size: 9px; bottom: 27px; }
  .globe-card-bottom { padding: 10px 13px; }
  .route-legend { gap: 6px 9px; }
  .legend-item { font-size: 9px; }
  .plan-panel { padding: 17px 13px 13px; }
  .point-form { padding: 18px 15px 15px; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .full-field { grid-column: auto; }
  .next-grid { grid-template-columns: 1fr 1fr; }
  .dialog-heading h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Shared-project controls and the trip ledger use a quieter, paper-and-ink treatment. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); #262626-space: nowrap; border: 0; }
.projects-bar { margin: -2px 0 22px; padding: 15px 0 13px; border-top: 1px solid #2d3634; border-bottom: 1px solid #2d3634; }
.projects-bar-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.projects-bar-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; letter-spacing: -.025em; }
.project-create-form { display: flex; gap: 7px; }
.project-create-form input, .traveler-form input { min-width: 180px; border: 1px solid #2e3a36; border-radius: 5px; background: rgba(38, 38, 38, 0.8); color: #ceeaf3; padding: 9px 11px; font-size: 11px; outline: none; }
.project-create-form input:focus, .traveler-form input:focus { border-color: #4d9189; box-shadow: 0 0 0 2px rgba(14,137,129,.1); }
.project-create-form .primary-button { border-radius: 5px; padding: 9px 12px; font-size: 11px; }
.project-list { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: thin; }
.project-card { flex: 0 0 225px; display: flex; align-items: center; gap: 5px; border: 1px solid #2e3532; background: rgba(38, 38, 38, 0.58); border-radius: 5px; padding: 5px 6px 5px 10px; }
.project-card.is-active { border-color: #398a80; background: #262626; box-shadow: inset 3px 0 #398a80; }
.project-select { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 4px 2px; border: 0; background: transparent; text-align: left; }
.project-card-name { overflow: hidden; max-width: 100%; color: #cfe9ee; font-family: Georgia, "Times New Roman", serif; font-size: 14px; text-overflow: ellipsis; #262626-space: nowrap; }
.project-card-meta, .projects-note, .quiet-label { color: #74827e; font-size: 9px; }
.project-card-actions { display: flex; gap: 3px; }
.project-card-actions .mini-button { padding: 5px 6px; font-size: 8px; }
.project-empty { flex: 1; color: #798b88; font-size: 11px; padding: 7px 2px; }
.projects-note { margin: 6px 0 0; }
.globe-mode-button { padding: 6px 9px; font-size: 9px; }
.address-search-form { display: flex; align-items: center; gap: 9px; margin: 11px 21px 0; padding: 0 10px; min-height: 43px; border: 1px solid #2e3734; border-radius: 5px; background: #232421; }
.address-search-icon { color: #7ca49d; font-size: 23px; line-height: 1; transform: rotate(-20deg); }
.address-search-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #c3e5ec; font-size: 11px; }
.address-search-form .secondary-button { flex: 0 0 auto; padding: 7px 12px; border-radius: 4px; font-size: 10px; }
.address-search-form button:disabled { opacity: .55; cursor: wait; }
.address-search-results { display: flex; flex-direction: column; gap: 3px; margin: 0 21px; padding: 0; max-height: 215px; overflow-y: auto; }
.address-search-results:not(:empty) { padding: 9px 10px; border: 1px solid #2e3734; border-top: 0; background: #262626; }
.address-search-message { margin: 4px 0; color: #859d9e; font-size: 10px; }
.address-search-message.error { color: #a44f4b; }
.address-results-heading { padding: 1px 0 5px; color: #71807c; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.address-result-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #191b19; }
.address-result-label { color: #bbd7db; font-size: 10px; line-height: 1.35; }
.address-result-add { flex: 0 0 auto; border: 0; border-bottom: 1px solid #39877e; color: #26766d; background: transparent; padding: 3px 0; font-size: 9px; font-weight: 720; }
.address-result-add:hover { color: #a8e3dc; }
.geocoder-attribution { margin: 4px 22px 0; color: #5e6a66; text-align: right; font-size: 8px; }
.geocoder-attribution a { color: #758f87; }
.costs-card { margin-top: 22px; border-top: 1px solid #2e3735; padding: 19px 2px 0; }
.costs-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; padding-bottom: 14px; }
.costs-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; letter-spacing: -.035em; }
.costs-heading .section-kicker { margin-bottom: 5px; }
.costs-layout { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.7fr); gap: 28px; }
.traveler-column, .ledger-column { min-width: 0; }
.traveler-column { padding-right: 22px; border-right: 1px solid #2e3532; }
.subsection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; margin-bottom: 10px; }
.subsection-heading h3 { margin: 0; color: #bbd7db; font-family: Georgia, "Times New Roman", serif; font-size: 16px; font-weight: 500; }
.traveler-form { display: flex; gap: 6px; }
.traveler-form input { min-width: 0; flex: 1; }
.traveler-form .secondary-button { padding: 8px 10px; border-radius: 4px; font-size: 9px; #262626-space: nowrap; }
.traveler-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.traveler-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px 4px 4px; border: 1px solid #2e3531; border-radius: 3px; background: rgba(38, 38, 38, 0.68); color: #b1cdce; font-size: 10px; }
.traveler-avatar { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #2a312d; color: #398078; font-size: 9px; font-weight: 700; }
.traveler-remove, .expense-remove { border: 0; background: transparent; color: #5e6b66; padding: 2px 3px; font-size: 10px; }
.traveler-remove:hover, .expense-remove:hover { color: #a04f49; }
.traveler-empty, .ledger-hint, .ledger-empty { color: #74827e; font-size: 10px; line-height: 1.5; }
.ledger-hint { margin: 11px 0 0; }
.expense-form { padding: 13px; border: 1px solid #2e3531; background: rgba(38, 38, 38, 0.62); }
.expense-input-grid { display: grid; grid-template-columns: minmax(150px, 1.8fr) minmax(85px, .75fr) minmax(68px, .5fr) minmax(105px, .8fr) minmax(110px, .85fr); gap: 9px; align-items: end; }
.expense-input-grid .field { gap: 4px; }
.expense-input-grid .field label { color: #7d8f8a; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.expense-input-grid .field input, .expense-input-grid .field select { min-height: 34px; padding: 7px 8px; border-radius: 3px; font-size: 10px; }
.split-fieldset { margin: 11px 0 0; padding: 8px 9px 7px; border: 1px solid #2c322f; }
.split-fieldset legend { padding: 0 5px; color: #7e908a; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.split-members { display: flex; flex-wrap: wrap; gap: 6px 13px; }
.split-member { display: inline-flex; align-items: center; gap: 5px; color: #9fb6b0; font-size: 9px; }
.split-member input { accent-color: #39877e; }
.split-empty { color: #6e7c77; font-size: 9px; }
.expense-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.expense-submit-row .primary-button { padding: 8px 11px; border-radius: 4px; font-size: 10px; }
.expense-submit-row button:disabled { opacity: .6; cursor: wait; }
.expense-balances { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin-top: 13px; }
.currency-balance-group { padding: 10px 0; border-top: 1px solid #2e3531; }
.currency-balance-title { margin: 0 0 7px; color: #9cb9b3; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.balance-row { display: grid; grid-template-columns: minmax(75px, .7fr) minmax(120px, 1.4fr) auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #2b2f2c; }
.balance-person { color: #bcd8d7; font-size: 10px; font-weight: 680; }
.balance-detail { color: #6d7b75; font-size: 8px; }
.balance-net { color: #8b9e98; font-size: 10px; font-variant-numeric: tabular-nums; }
.balance-net.positive { color: #26766b; }
.balance-net.negative { color: #a34d48; }
.expense-list { margin-top: 6px; }
.expense-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 2px; border-top: 1px solid #2d332f; }
.expense-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.expense-name { color: #bbd7db; font-size: 11px; font-weight: 670; }
.expense-meta { color: #707c77; font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.expense-amount-block { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.expense-amount-value { color: #a8c7c1; font-size: 11px; font-variant-numeric: tabular-nums; }
.expense-remove { font-size: 8px; }

body.globe-mode { overflow: hidden; }
body.globe-mode .globe-card { position: fixed; z-index: 80; inset: 0; width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; display: flex; flex-direction: column; background: #20201c; box-shadow: none; }
body.globe-mode .globe-card-top { flex: 0 0 auto; padding: 13px 22px 3px; }
body.globe-mode .address-search-form { flex: 0 0 auto; }
body.globe-mode .address-search-results:not(:empty) { max-height: 25vh; }
body.globe-mode .globe-stage { flex: 1 1 auto; min-height: 0; height: auto; }
body.globe-mode .globe-card-bottom { flex: 0 0 auto; padding-top: 8px; padding-bottom: 8px; }

@media (max-width: 900px) {
  .costs-layout { grid-template-columns: 1fr; gap: 19px; }
  .traveler-column { padding: 0 0 17px; border-right: 0; border-bottom: 1px solid #2e3532; }
  .expense-input-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .expense-description-field { grid-column: span 2; }
}
@media (max-width: 600px) {
  .projects-bar-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .project-create-form { width: 100%; }
  .project-create-form input { flex: 1; min-width: 0; }
  .project-card { flex-basis: 205px; }
  .address-search-form { margin-right: 12px; margin-left: 12px; }
  .address-search-results { margin-right: 12px; margin-left: 12px; }
  .geocoder-attribution { margin-right: 13px; }
  .costs-heading h2 { font-size: 21px; }
  .expense-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-description-field { grid-column: 1 / -1; }
  .expense-row { align-items: flex-start; }
  .balance-row { grid-template-columns: minmax(65px, .7fr) minmax(100px, 1.1fr) auto; gap: 5px; }
}

/* Final visual pass: paper and ink, with the map as the main event. */
:root {
  --ink: #def5fc;
  --muted: #879797;
  --line: #323833;
  --paper: #232320;
  --wash: #1d1e19;
  --shadow: 0 7px 20px rgba(0, 0, 0, 0.132);
}
body { background: #1e1e1a; }
.topbar { background: #22221f; backdrop-filter: none; border-bottom-color: #323833; }
.page-intro h1 { color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; }
.page-intro { margin-bottom: 20px; }
.eyebrow, .section-kicker { color: #84aba2; letter-spacing: .12em; }
.primary-button, .secondary-button, .text-button, .danger-button { border-radius: 5px; box-shadow: none; }
.primary-button { background: #276f68; border-color: #276f68; }
.primary-button:hover { background: #93d2ca; border-color: #93d2ca; box-shadow: none; transform: none; }
.secondary-button { background: #232320; }
.secondary-button:hover { background: #1b1d18; border-color: #576e66; }
.pseudonym-chip { border-radius: 5px; transition: border-color .15s, background .15s; }
.pseudonym-chip:hover { background: #1e1f1b; transform: none; }
.online-dot { box-shadow: none; }
.planner-layout { gap: 16px; }
.globe-card, .plan-panel { background: #232321; border: 1px solid #323833; border-radius: 6px; box-shadow: 0 5px 18px rgba(0, 0, 0, 0.108); }
.globe-card-top { padding-top: 15px; }
.globe-stage { background: #e8efeb; }
.plan-panel { padding: 18px 16px 14px; }
.panel-heading { border-bottom-color: #31342f; }
.count-pill { background: #1b1c18; border-color: #313630; border-radius: 4px; }
.point-list-button { border-radius: 4px; }
.point-list-button:hover { background: #1c1e19; }
.point-list-button.is-selected { background: #161c18; border-color: #31443b; }
.point-index { border-radius: 4px; background: #2a312d; }
.selected-detail { border-radius: 5px; background: #1c1e1a; }
.activity-pills li { border-radius: 3px; background: #232321; }
.google-maps-label { border-radius: 3px; }
.task-group { border-radius: 4px; }
.globe-empty-hint { border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.192); }
.empty-pin { border-radius: 4px; box-shadow: none; }
.route-legend-note { color: #7e8d89; }
.projects-bar { border-color: #323833; }
.project-card { border-radius: 3px; background: #22221f; }
.project-card.is-active { background: #262626; box-shadow: inset 3px 0 #398a80; }
.project-create-form .primary-button { background: #276f68; }
.address-search-form { border-radius: 4px; background: #232321; }
.address-search-results:not(:empty) { background: #232321; }
.costs-card { border-color: #323833; }
.expense-form { background: #222320; }
.traveler-chip { border-radius: 3px; background: #232321; }
.traveler-avatar { border-radius: 3px; }
.point-dialog { border-radius: 8px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.48); }
.next-stop-block { border-radius: 5px; background: #1f201c; }
.next-step-number { border-radius: 4px; }
.toast { border-radius: 4px; box-shadow: 0 5px 16px rgba(0, 0, 0, 0.288); }
.flash { border-radius: 4px; }
.login-layout, .profile-layout { border-radius: 8px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.168); }
.profile-mark { background: #1c1e1a; }
.geocoder-attribution { margin-top: 6px; margin-bottom: 2px; color: #90a29d; font-size: 10px; line-height: 1.4; }
.geocoder-attribution a { color: #9fcdc4; text-decoration: underline; text-underline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #176f68;
  outline-offset: 2px;
}
body.globe-mode .globe-card { border-radius: 0; box-shadow: none; }

/* Identity-first access and the responsive editorial layout. */
:root {
  --ink: #def5fc;
  --muted: #8e9f9c;
  --line: #323933;
  --paper: #232320;
  --wash: #191b16;
  --teal-deep: #276f68;
}
body { background: #1e1e19; }
.topbar { min-height: 64px; height: auto; padding: 9px clamp(14px, 4vw, 54px); background: #232320; border-bottom-color: #323933; backdrop-filter: none; }
.brand { gap: 9px; color: #def5fc; letter-spacing: -.02em; }
.brand-mark { background: #2c302b; }
.topbar-right { gap: clamp(7px, 1.5vw, 16px); }
.pseudonym-chip { max-width: min(260px, 34vw); gap: 7px; border-radius: 4px; background: transparent; }
.pseudonym-chip-name { overflow: hidden; text-overflow: ellipsis; #262626-space: nowrap; }
.pseudonym-chip:hover { background: #1b1c18; transform: none; }
.quiet-button { min-height: 40px; padding: 8px 10px; }
.footer-note { color: #7e8c87; letter-spacing: 0; }

.auth-page {
  width: min(1000px, 100%);
  min-height: 480px;
  margin: clamp(24px, 6vh, 64px) auto 50px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  border: 1px solid #323933;
  background: #232320;
}
.auth-aside { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 5vw, 64px); background: #2c302b; }
.auth-aside .eyebrow { color: #86aa9e; }
.auth-aside h1 { max-width: 480px; margin: 2px 0 14px; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 5.8vw, 58px); font-weight: 500; letter-spacing: -.045em; line-height: .99; }
.auth-aside-copy { max-width: 410px; color: #8fa19c; font-size: 14px; line-height: 1.6; }
.route-sketch { width: 100%; max-width: 440px; margin-top: 20px; color: #3b8075; }
.route-sketch svg { display: block; width: 100%; height: auto; }
.route-sketch span { display: block; margin-top: 5px; color: #84968e; font-size: 11px; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(26px, 4vw, 54px); }
.auth-step, .identity-step { margin: 0 0 12px; color: #83958d; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.auth-step span, .identity-step span { margin-left: 8px; color: #8d9a94; letter-spacing: .04em; }
.auth-panel h2 { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; letter-spacing: -.03em; }
.auth-copy { margin: 0 0 25px; color: #889892; font-size: 13px; line-height: 1.55; }
.auth-form, .identity-form { display: flex; flex-direction: column; gap: 9px; }
.auth-form label, .identity-form label { color: #99b1a9; font-size: 11px; font-weight: 700; }
.auth-form input, .identity-form input, .identity-form select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #333b36; border-radius: 3px; color: #daf2f5; background: #262626; font-size: 15px; }
.auth-form input:focus, .identity-form input:focus, .identity-form select:focus { border-color: #397f73; outline: 2px solid #397f73; outline-offset: 2px; box-shadow: none; }
.auth-submit { min-height: 48px; margin-top: 8px; font-size: 14px; }
.auth-page .privacy-note { margin-top: 21px; color: #7e8e87; font-size: 11px; line-height: 1.5; }

.identity-page { width: min(1100px, 100%); margin: 22px auto 50px; }
.identity-intro { max-width: 700px; margin: 0 0 22px; }
.identity-intro .eyebrow { color: #86aa9e; }
.identity-intro h1 { margin-bottom: 9px; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 5vw, 48px); font-weight: 500; letter-spacing: -.04em; }
.identity-lede { max-width: 650px; margin-bottom: 15px; color: #8fa19c; font-size: 14px; line-height: 1.6; }
.current-identity { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 0; border-bottom: 1px solid #333b36; color: #8fa19c; font-size: 12px; }
.current-identity strong { color: #def5fc; font-weight: 700; }
.current-identity-dot { width: 7px; height: 7px; border-radius: 50%; background: #397f73; }
.identity-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #323933; background: #232320; }
.identity-option { min-width: 0; padding: clamp(19px, 3vw, 31px); }
.identity-option + .identity-option { border-left: 1px solid #323933; }
.identity-option h2, .identity-management h2 { margin: 0 0 8px; color: #d3ecec; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; letter-spacing: -.025em; }
.identity-option-copy { min-height: 42px; margin: 0 0 18px; color: #86938d; font-size: 12px; line-height: 1.5; }
.identity-form .primary-button, .identity-form .secondary-button { min-height: 46px; margin-top: 7px; font-size: 13px; }
.identity-form .secondary-button { justify-content: space-between; padding-inline: 13px; color: #96cfc6; border-color: #4a6257; }
.identity-empty { margin: 13px 0 0; color: #828f89; font-size: 12px; }
.identity-management { margin-top: 24px; padding: 19px 0 0; border-top: 1px solid #323933; }
.identity-management-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.identity-management-heading .identity-step { margin-bottom: 4px; }
.identity-count { color: #85938b; font-size: 11px; font-variant-numeric: tabular-nums; }
.identity-management-copy { max-width: 760px; margin: 4px 0 13px; color: #87968e; font-size: 11px; line-height: 1.55; }
.identity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 0; border-top: 1px solid #30352f; list-style: none; }
.identity-row { min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 54px; border-bottom: 1px solid #30352f; }
.identity-row-mark { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; background: #2c302b; color: #90c3b7; font-size: 12px; font-weight: 700; }
.identity-row-name { display: flex; flex-direction: column; min-width: 0; flex: 1; color: #d4efec; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.identity-row-name small { color: #85938c; font-size: 10px; font-weight: 400; }
.identity-delete-form { flex: 0 0 auto; margin: 0; }
.identity-delete-button { min-width: 66px; min-height: 40px; padding: 7px 10px; border: 1px solid #4c3c36; border-radius: 3px; background: transparent; color: #8a4d40; font-size: 11px; font-weight: 650; }
.identity-delete-button:hover { background: #342d29; border-color: #b97d6a; }

.mobile-section-nav { display: none; }
.project-list { scroll-snap-type: x proximity; }
.project-card { scroll-snap-align: start; }
.address-search-form input { min-height: 42px; font-size: 14px; }
.globe-mode-button { min-height: 38px; font-size: 11px; }
.globe-card-top .section-kicker { color: #86aa9e; }
.globe-title { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; letter-spacing: -.025em; }
.globe-stage { background: #e8efeb; }
.plan-panel h2, .costs-heading h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.plan-panel, .globe-card { scroll-margin-top: 80px; }
.costs-card { scroll-margin-top: 80px; }
.expense-input-grid .field input, .expense-input-grid .field select { min-height: 42px; font-size: 13px; }
.traveler-form input { min-height: 42px; font-size: 14px; }
.traveler-form .secondary-button, .expense-submit-row .primary-button { min-height: 42px; font-size: 12px; }
.split-member { min-height: 38px; font-size: 12px; }
.split-member input { width: 18px; height: 18px; }
.maplibregl-ctrl button { min-width: 38px; min-height: 38px; }

@media (max-width: 760px) {
  .topbar { position: sticky; top: 0; z-index: 30; }
  .main-content { padding: 20px 14px 30px; }
  .auth-page { width: min(560px, 100%); min-height: 0; margin: 14px auto 28px; grid-template-columns: 1fr; }
  .auth-aside { padding: 22px 22px 16px; }
  .auth-aside h1 { max-width: 480px; font-size: clamp(34px, 9vw, 46px); }
  .auth-aside-copy { font-size: 13px; margin-bottom: 2px; }
  .route-sketch { margin-top: 7px; max-width: 400px; }
  .route-sketch span { font-size: 10px; }
  .auth-panel { padding: 24px 22px 25px; }
  .auth-copy { margin-bottom: 17px; }
  .identity-page { margin-top: 12px; }
  .identity-intro { margin-bottom: 17px; }
  .identity-intro h1 { font-size: clamp(31px, 8vw, 42px); }
  .identity-lede { font-size: 13px; }
  .identity-options { grid-template-columns: 1fr; }
  .identity-option { padding: 20px 18px; }
  .identity-option + .identity-option { border-left: 0; border-top: 1px solid #323933; }
  .identity-option-copy { min-height: 0; margin-bottom: 13px; }
  .identity-list { grid-template-columns: 1fr; }
  .identity-management { margin-top: 19px; }
  .mobile-section-nav { position: sticky; top: 64px; z-index: 15; display: flex; gap: 3px; width: calc(100% + 28px); margin: 0 -14px 12px; padding: 6px 14px; overflow-x: auto; border-top: 1px solid #323933; border-bottom: 1px solid #323933; background: rgba(33, 34, 29, 0.97); }
  .mobile-section-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; color: #99b3aa; font-size: 12px; font-weight: 650; text-decoration: none; }
  .mobile-section-nav a:focus-visible { outline: 2px solid #276f68; outline-offset: -2px; }
  .projects-bar { margin: -2px 0 12px; }
  .projects-bar-heading { flex-direction: row; align-items: center; }
  .project-create-form { gap: 6px; }
  .project-create-form input { min-width: 0; width: min(40vw, 190px); }
  .project-create-form .primary-button { min-height: 42px; padding-inline: 10px; #262626-space: nowrap; }
  .planner-layout { grid-template-columns: 1fr; gap: 12px; }
  .globe-card, .plan-panel { border-radius: 3px; }
  .globe-card-top { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .globe-top-right { margin-left: auto; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px 12px; }
  .globe-hint { display: none; }
  .globe-stage { min-height: min(58dvh, 540px); height: min(58dvh, 540px); max-height: none; }
  .plan-panel { min-height: 0; max-height: none; }
  .point-list { max-height: min(38dvh, 330px); }
  .plan-panel.has-selected .point-list { max-height: min(25dvh, 225px); }
  .costs-card { margin-top: 18px; }
  .costs-layout { grid-template-columns: 1fr; }
  .traveler-column { padding: 0 0 15px; border: 0; border-bottom: 1px solid #2e3532; }
  .expense-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-description-field { grid-column: 1 / -1; }
  #globe-map .maplibregl-ctrl button { width: 42px; height: 42px; }
  body.globe-mode .globe-card-top { flex: 0 0 auto; padding: 11px 13px 4px; }
  body.globe-mode .globe-top-right { max-width: 60%; }
  body.globe-mode .address-search-form { margin-inline: 12px; }
  body.globe-mode .address-search-results { margin-inline: 12px; }
  body.globe-mode .geocoder-attribution { margin-right: 13px; }
}

@media (max-width: 520px) {
  .mobile-section-nav { top: 60px; }
  .topbar { min-height: 60px; padding: 7px 12px; gap: 7px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand-mark { width: 24px; height: 24px; }
  .topbar-right { gap: 5px; }
  .pseudonym-chip { max-width: 38vw; gap: 5px; padding: 3px 6px 3px 3px; font-size: 11px; }
  .avatar-dot { width: 23px; height: 23px; }
  .quiet-button { min-width: 42px; padding-inline: 7px; font-size: 11px; }
  .page-intro { margin-bottom: 15px; }
  .page-intro h1 { font-size: clamp(28px, 8vw, 34px); }
  .intro-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .intro-actions > * { min-width: 0; min-height: 43px; padding: 8px 7px; font-size: 11px; }
  .intro-actions .change-pseudonym-link { grid-column: 1 / -1; }
  .projects-bar-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .project-create-form { width: 100%; }
  .project-create-form input { flex: 1; width: 100%; }
  .project-create-form button { flex: 0 0 auto; }
  .project-card { flex-basis: min(78vw, 270px); }
  .globe-card-top { padding: 12px 11px 3px; }
  .globe-title { font-size: 18px; }
  .sync-indicator { font-size: 9px; }
  .globe-mode-button { min-height: 40px; padding: 7px 8px; font-size: 10px; }
  .globe-stage { min-height: 52dvh; height: 52dvh; }
  .globe-card-bottom { align-items: flex-start; padding: 9px 11px; }
  .route-legend { gap: 7px 10px; }
  .legend-item { font-size: 10px; }
  .plan-panel { padding: 15px 11px 12px; }
  .expense-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .expense-input-grid .field input, .expense-input-grid .field select { padding: 8px 7px; }
  .expense-form { padding: 10px; }
  .expense-row { gap: 8px; }
  .expense-meta { font-size: 10px; }
  .balance-row { grid-template-columns: minmax(62px, .75fr) minmax(80px, 1.2fr) auto; gap: 5px; }
  .balance-detail { font-size: 9px; }
  .identity-options { margin-inline: -2px; }
  .identity-option { padding: 18px 14px; }
  .identity-management { padding-top: 15px; }
  .identity-management-copy { font-size: 11px; }
  .identity-row { min-height: 52px; }
  .auth-page { margin-top: 8px; }
  .auth-aside { padding: 18px 17px 11px; }
  .auth-aside h1 { margin-bottom: 9px; font-size: 35px; }
  .auth-panel { padding: 20px 17px; }
  .auth-panel h2 { font-size: 24px; }
  .point-form { padding: 18px 14px 15px; }
  .dialog-actions > button { min-height: 43px; }
  body.globe-mode .globe-stage { min-height: 0; height: auto; }
  body.globe-mode .globe-top-right { max-width: 66%; }
  body.globe-mode .globe-mode-button { #262626-space: nowrap; }
}

@media (max-width: 360px) {
  .topbar { padding-inline: 8px; }
  .pseudonym-chip { max-width: 34vw; }
  .main-content { padding-inline: 9px; }
  .mobile-section-nav { width: calc(100% + 18px); margin-inline: -9px; padding-inline: 9px; }
  .mobile-section-nav a { padding-inline: 10px; }
  .projects-bar-heading h2 { font-size: 17px; }
  .project-create-form .primary-button { font-size: 10px; }
  .expense-input-grid .field label { font-size: 8px; }
}

/* Planning assistant, day planner and trip story (planner.js). */
.hidden { display: none !important; }
.planner-card { margin-top: 22px; padding: 18px 18px 16px; border: 1px solid #323833; border-radius: 6px; background: #232321; box-shadow: 0 5px 18px rgba(0, 0, 0, 0.108); scroll-margin-top: 80px; min-width: 0; }
.assistant-card { margin: -6px 0 20px; }
.planner-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid #31342f; margin-bottom: 12px; }
.planner-card-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; letter-spacing: -.03em; }
.planner-card-subtitle { margin: 5px 0 0; max-width: 680px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.planner-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.planner-select { min-height: 36px; max-width: 260px; border: 1px solid #2e3a36; border-radius: 4px; background: #262626; color: #ceeaf3; padding: 6px 8px; font-size: 12px; }
.planner-note { margin: 6px 0; color: #879797; font-size: 12px; line-height: 1.5; }
.planner-note.error-note, .assistant-error { color: #9c4741; }
.pending-note::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #e7ae54; animation: planner-pulse 1.2s ease-in-out infinite; vertical-align: 1px; }
.planner-empty { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border: 1px dashed #323b36; border-radius: 5px; background: #1f201c; color: #95a8a4; font-size: 13px; line-height: 1.5; }
.planner-empty p { margin: 0; max-width: 640px; }
.planner-empty-icon { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 4px; background: #2a312d; color: #6eafa4; font-size: 18px; }
.small-button { padding: 7px 10px; font-size: 11px; min-height: 34px; }
.primary-button:disabled, .secondary-button:disabled, .mini-button:disabled, .text-button:disabled { opacity: .55; cursor: not-allowed; }
.added-label { color: #26766b; font-size: 11px; font-weight: 720; }
.count-pill.is-off { color: #9c4741; background: #221b19; border-color: #45312f; }
@keyframes planner-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Pin status (globe.js) */
.point-status-badge { display: inline-flex; align-items: center; margin-top: 4px; padding: 2px 6px; border-radius: 3px; font-size: 9px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.point-status-badge.confirmed { color: #26766b; background: #28312c; }
.point-status-badge.idea { color: #94600f; background: #221909; border: 1px dashed #e2b462; }
.selected-topline .point-status-badge { margin: 4px 0 0; }
.point-list-button.is-idea .point-index { background: #221909; color: #94600f; border: 1px dashed #e2b462; }
.point-list-button.is-idea .point-list-title { color: #c8b390; }
.mini-button.status-toggle { color: #26766b; border-color: #2a4339; }
.mini-button.status-toggle.is-idea { color: #262626; background: #276f68; border-color: #276f68; }
.selected-actions { flex-wrap: wrap; justify-content: flex-end; }

/* Assistant */
.assistant-banner { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #433415; border-radius: 4px; background: #241f15; color: #7a5a22; font-size: 12px; line-height: 1.5; }
.assistant-thread { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding: 4px 4px 8px 0; scrollbar-width: thin; scrollbar-color: #2e3e3b transparent; }
.assistant-thread:empty { display: none; }
.assistant-empty { margin: 0; padding: 12px 14px; border-radius: 4px; background: #1c1e19; color: #95a8a4; font-size: 12px; line-height: 1.5; }
.chat-message { max-width: min(860px, 100%); padding: 10px 13px; border-radius: 6px; border: 1px solid #2f342f; background: #262626; }
.chat-message.from-user { align-self: flex-end; max-width: min(620px, 92%); background: #161c18; border-color: #2d3b32; }
.chat-message.from-assistant { align-self: stretch; }
.chat-message.is-pending { opacity: .7; }
.chat-meta { color: #798a85; font-size: 10px; font-weight: 650; margin-bottom: 4px; }
.chat-anchor { display: inline-block; margin-bottom: 5px; padding: 2px 6px; border-radius: 3px; background: #262626; color: #84aba2; font-size: 10px; }
.chat-content { margin: 0; color: #d4efec; font-size: 13px; line-height: 1.55; #262626-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.typing { display: flex; align-items: center; gap: 10px; color: #879797; font-size: 12px; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: #3b8075; animation: planner-pulse 1.1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .18s; }
.typing-dots i:nth-child(3) { animation-delay: .36s; }
.suggestion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 11px; }
.suggestion-card { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; border: 1px solid #2f342f; border-radius: 5px; background: #232320; transition: border-color .2s, box-shadow .2s; }
.suggestion-grid.is-latest .suggestion-card:not(.is-added) { border-left: 3px solid #e7ae54; }
.suggestion-card.is-added { background: #1c1f1c; border-color: #2e3d33; }
.suggestion-card.is-highlighted { border-color: #d99a33; box-shadow: 0 0 0 3px rgba(231,174,84,.35); }
.suggestion-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.suggestion-titles { min-width: 0; }
.suggestion-name { margin: 0; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.suggestion-place { display: block; margin-top: 2px; color: #798a85; font-size: 11px; }
.suggestion-nights { flex: 0 0 auto; padding: 3px 7px; border-radius: 3px; background: #2a312d; color: #90c3b7; font-size: 10px; font-weight: 720; }
.travel-chip { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; max-width: 100%; padding: 4px 8px; border: 1px solid #2f342f; border-radius: 3px; background: #262626; color: #a0bab4; font-size: 11px; overflow-wrap: anywhere; }
.suggestion-why { margin: 0; color: #b7d0cc; font-size: 12px; line-height: 1.5; }
.suggestion-highlights { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.suggestion-highlights li { padding: 3px 7px; border: 1px solid #2a3230; border-radius: 3px; background: #262626; color: #93afb5; font-size: 10px; }
.suggestion-best { margin: 0; color: #879797; font-size: 11px; }
.suggestion-best strong { color: #b7d0cc; font-weight: 650; }
.suggestion-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: auto; padding-top: 4px; }
.assistant-next-stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid #2e3d33; border-radius: 5px; background: #191e1a; }
.next-stage-copy { color: #90c3b7; font-size: 12px; font-weight: 650; }
.next-stage-button { #262626-space: normal; text-align: left; }
.assistant-composer { margin-top: 12px; padding-top: 12px; border-top: 1px solid #31342f; }
.assistant-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 9px; }
.assistant-examples-label { color: #798a85; font-size: 11px; font-weight: 650; }
.prompt-chip { padding: 6px 10px; border: 1px solid #303b35; border-radius: 999px; background: #262626; color: #90c3b7; font-size: 11px; text-align: left; }
.prompt-chip:hover { background: #191e1a; border-color: #576e66; }
.assistant-composer textarea { width: 100%; min-height: 76px; resize: vertical; padding: 10px 12px; border: 1px solid #2e3a36; border-radius: 4px; background: #262626; color: #ceeaf3; font-size: 14px; line-height: 1.5; outline: none; }
.assistant-composer textarea:focus { border-color: #4d9189; box-shadow: 0 0 0 2px rgba(14,137,129,.1); }
.assistant-composer textarea:disabled { background: #1e1f1c; }
.assistant-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 9px; }
.compact-field { gap: 4px; }
.compact-field label { color: #7d8f8a; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.compact-field select { min-height: 38px; padding: 7px 8px; border-radius: 4px; font-size: 12px; }
.anchor-field { flex: 1 1 240px; }
.count-field { flex: 0 0 120px; }
.assistant-controls .primary-button { min-height: 38px; padding-inline: 16px; }
.assistant-hint { margin: 7px 0 0; color: #6d7a76; font-size: 10px; }

/* Day planner */
.dayplan-layout { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.6fr); gap: 20px; }
.activity-column, .timeline-column { min-width: 0; }
.activity-form { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-form input { flex: 1 1 180px; min-width: 0; min-height: 38px; padding: 7px 10px; border: 1px solid #2e3a36; border-radius: 4px; background: #262626; color: #ceeaf3; font-size: 13px; outline: none; }
.activity-form input:focus { border-color: #4d9189; box-shadow: 0 0 0 2px rgba(14,137,129,.1); }
.activity-form .secondary-button { min-height: 38px; padding: 7px 11px; font-size: 11px; }
.activity-day-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.activity-tips { margin: 6px 0; padding: 7px 9px; border-left: 3px solid #e7ae54; background: #24211a; color: #c8b390; font-size: 11px; line-height: 1.45; }
.activity-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 640px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.activity-card { padding: 10px 11px; border: 1px solid #2f342f; border-radius: 5px; background: #262626; }
.activity-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.activity-title { margin: 0; color: #d4efec; font-size: 13px; font-weight: 700; line-height: 1.35; }
.activity-category { flex: 0 0 auto; padding: 2px 6px; border-radius: 3px; background: #2a312d; color: #90c3b7; font-size: 10px; font-weight: 700; }
.activity-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; color: #879797; font-size: 11px; }
.best-time { padding: 0 6px; border-radius: 3px; background: #1c1e19; color: #a0bab4; font-weight: 650; text-transform: capitalize; }
.best-time.best-morning { background: #241d0e; color: #8a5f12; }
.best-time.best-afternoon { background: #151b1f; color: #2f5f80; }
.best-time.best-evening { background: #342b33; color: #7a3f73; }
.best-time.best-night { background: #2f2f38; color: #bdc9ff; }
.activity-description { margin: 6px 0 0; color: #a0bab4; font-size: 12px; line-height: 1.45; }
.activity-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.timeline-column .subsection-heading { align-items: center; }
.timeline-summary { margin: -4px 0 8px; }
.timeline-scroller { max-height: 600px; overflow: auto; border: 1px solid #2f342f; border-radius: 5px; background: #262626; scrollbar-width: thin; }
.timeline-grid { --day-count: 1; display: grid; grid-template-columns: 52px repeat(var(--day-count), minmax(150px, 1fr)); min-width: calc(52px + var(--day-count) * 150px); position: relative; }
.timeline-corner, .timeline-day-head { position: sticky; top: 0; z-index: 3; background: #1f201c; border-bottom: 1px solid #2f342f; }
.timeline-corner { left: 0; z-index: 4; }
.timeline-day-head { display: flex; flex-direction: column; gap: 1px; padding: 7px 8px; border-left: 1px solid #2e312d; }
.timeline-day-head strong { color: #d3ecec; font-size: 12px; }
.timeline-day-head span { color: #6d7a76; font-size: 10px; }
.timeline-day-head.is-unscheduled strong { color: #8a5f12; }
.timeline-gutter { position: sticky; left: 0; z-index: 2; background: #232321; border-right: 1px solid #2e312d; }
.timeline-hour { position: absolute; right: 6px; transform: translateY(-1px); color: #6d7a76; font-size: 10px; font-variant-numeric: tabular-nums; }
.timeline-column-body { position: relative; border-left: 1px solid #191b18; cursor: copy; background-image: repeating-linear-gradient(to bottom, #181b16 0, #181b16 1px, transparent 1px, transparent 23px, #1f201d 23px, #1f201d 24px, transparent 24px, transparent 46px); }
.timeline-column-body.is-unscheduled { background-color: #25221d; }
.timeline-column-body:hover { background-color: rgba(22, 28, 24, 0.35); }
.timeline-block { position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden; padding: 4px 6px; border: 1px solid #375a4f; border-left: 3px solid #276f68; border-radius: 4px; background: #151d19; color: #def5fc; text-align: left; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.192); }
.timeline-block:hover, .timeline-block:focus-visible { z-index: 5; background: #25342e; min-height: fit-content; }
.timeline-block.is-overlapping { background: #191e22; border-color: #3a4f65; border-left-color: #2f5f80; }
.timeline-block-time { color: #a0bab4; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-block-title { max-width: 100%; color: #def5fc; font-size: 11px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.timeline-block-meta { max-width: 100%; color: #879797; font-size: 10px; #262626-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport-panel { margin-top: 18px; padding-top: 14px; border-top: 1px solid #31342f; }
.transport-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.leg-chip { font-size: 12px; }
.transport-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.transport-summary { margin: 12px 0 8px; color: #b7d0cc; font-size: 13px; line-height: 1.5; }
.transport-results { display: flex; flex-direction: column; gap: 7px; }
.transport-option { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 10px 11px; border: 1px solid #2f342f; border-radius: 5px; background: #262626; }
.transport-dot { width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; }
.transport-option-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.transport-option-title strong { color: #d4efec; font-size: 13px; }
.transport-mode { color: #798a85; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.transport-facts { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 3px; color: #a0bab4; font-size: 12px; }
.transport-cost { font-weight: 700; font-variant-numeric: tabular-nums; }
.transport-notes, .transport-booking { margin: 4px 0 0; color: #879797; font-size: 11px; line-height: 1.45; }
.transport-footnote { margin: 4px 0 0; }

/* Trip story */
.story-card { background: #1e2c2f; border-color: #1e2c2f; color: #eef2ec; }
.story-card .planner-card-heading { border-bottom-color: rgba(255,255,255,.12); }
.story-card .section-kicker { color: #9cc8bd; }
.story-card .planner-card-heading h2 { color: #fbfbf7; font-size: 26px; }
.story-card .planner-card-subtitle { color: #b9c7c2; }
.story-card .planner-empty { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.18); color: #cdd8d3; }
.story-card .planner-empty-icon { background: rgba(156,200,189,.16); color: #f0c47a; }
.story-card .planner-note.error-note { color: #f2b3ad; }
.story-stale { margin: 0 0 12px; padding: 8px 11px; border-left: 3px solid #e7ae54; background: rgba(231,174,84,.13); color: #f6dcae; font-size: 12px; }
.story-viewer { outline: none; border-radius: 5px; }
.story-viewer:focus-visible { outline: 2px solid #9cc8bd; outline-offset: 4px; }
.story-slide { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); gap: 24px; animation: story-in .35s ease-out; }
@keyframes story-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.story-media { min-width: 0; }
.story-hero { position: relative; margin: 0; overflow: hidden; border-radius: 5px; background: #142023; }
.story-hero img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #142023; }
.story-hero-placeholder { display: grid; place-items: center; aspect-ratio: 16 / 10; background: radial-gradient(circle at 30% 30%, #31494d, #142023 70%); color: #9fb2ad; font-size: 13px; }
.story-hero-number { position: absolute; top: 10px; left: 14px; color: rgba(255,255,255,.92); font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 6vw, 58px); line-height: 1; text-shadow: 0 2px 14px rgba(0,0,0,.45); pointer-events: none; }
.story-attribution { padding: 6px 2px 0; color: #9fb2ad; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.story-attribution a { color: #cfe5de; }
.story-attribution.compact { padding: 3px 1px 0; font-size: 9px; }
.story-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.story-thumb { margin: 0; min-width: 0; }
.story-thumb-button { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #142023; }
.story-thumb.is-active .story-thumb-button { border-color: #e7ae54; }
.story-thumb-button img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.story-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.story-chapter-number { color: #9cc8bd; font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.story-place { margin: 0; color: #fbfbf7; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 4vw, 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.story-dates { margin: 0; color: #b9c7c2; font-size: 12px; }
.story-caption { margin: 4px 0 0; color: #f6dcae; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-style: italic; line-height: 1.35; }
.story-narrative { margin: 0; color: #dbe4df; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.story-mood { display: inline-flex; gap: 6px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #eef2ec; font-size: 11px; }
.story-mood span { color: #9cc8bd; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; align-self: center; }
.story-activities { width: 100%; margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); }
.story-activities .detail-label { color: #9cc8bd; margin-top: 0; }
.story-activities ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.story-activities li { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 10px; color: #dbe4df; font-size: 12px; }
.story-activity-time { color: #9fb2ad; font-variant-numeric: tabular-nums; }
.story-activity-more { color: #9fb2ad; }
.story-card .text-button { color: #9cc8bd; }
.story-card .text-button:hover { color: #fbfbf7; }
.story-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.story-nav-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: transparent; color: #fbfbf7; font-size: 24px; line-height: 1; }
.story-nav-button:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.story-nav-button:disabled { opacity: .3; cursor: default; }
.story-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.story-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.28); }
.story-dot.is-active { width: 26px; border-radius: 999px; background: #e7ae54; }
.story-card .primary-button { background: #e7ae54; border-color: #e7ae54; color: #1e2c2f; }
.story-card .primary-button:hover { background: #f0bf6b; border-color: #f0bf6b; }

/* Schedule dialog */
.schedule-dialog { width: min(520px, calc(100vw - 24px)); }
.schedule-dialog-actions { align-items: center; }
.dialog-actions-spacer { flex: 1; }

@media (max-width: 860px) {
  .dayplan-layout { grid-template-columns: 1fr; }
  .activity-list { max-height: none; }
  .story-slide { grid-template-columns: 1fr; gap: 16px; }
  .planner-card-heading { flex-direction: column; align-items: stretch; }
  .planner-card-actions { justify-content: flex-start; flex-wrap: wrap; }
  .planner-select { max-width: 100%; }
  .timeline-scroller { max-height: 70dvh; }
}
@media (max-width: 520px) {
  .planner-card { padding: 14px 11px 12px; border-radius: 3px; }
  .planner-card-heading h2 { font-size: 20px; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .assistant-thread { max-height: 70dvh; }
  .assistant-controls .primary-button { width: 100%; min-height: 44px; }
  .count-field { flex: 1 1 100px; }
  .transport-option { grid-template-columns: 12px minmax(0, 1fr); }
  .transport-option > button { grid-column: 2; justify-self: start; }
  .timeline-grid { grid-template-columns: 46px repeat(var(--day-count), minmax(132px, 1fr)); min-width: calc(46px + var(--day-count) * 132px); }
  .story-caption { font-size: 16px; }
  .story-narrative { font-size: 13px; }
  .schedule-dialog-actions { flex-wrap: wrap; }
}

/* Assistant: collapse + build-mode switch */
.assistant-card.is-collapsed { padding-bottom: 14px; }
.assistant-card.is-collapsed .planner-card-subtitle { display: none; }
.assistant-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 2px; }
.mode-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink); }
.mode-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-switch-track { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #333b36; transition: background .15s; flex: none; }
.mode-switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #262626; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); transition: transform .15s; }
.mode-switch input:checked + .mode-switch-track { background: var(--teal); }
.mode-switch input:checked + .mode-switch-track .mode-switch-thumb { transform: translateX(16px); }
.mode-switch input:focus-visible + .mode-switch-track { outline: 2px solid var(--gold); outline-offset: 2px; }
#assistant-mode-hint { flex: 1 1 260px; }
.assistant-card.is-build-mode .assistant-composer { border-color: var(--teal); }
/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }

/* ================================================================
   Pages: sticky menu, compact projects bar, collapsible cards,
   assistant modes and drawer, Tasks and Overview pages.
   ================================================================ */
.topbar { position: sticky; top: 0; z-index: 30; gap: 14px; }
.site-menu { display: flex; align-items: center; gap: 2px; margin: 0 auto 0 clamp(10px, 3vw, 34px); min-width: 0; }
.site-menu-link, .site-menu-assistant { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: 4px; color: #99b3aa; background: transparent; font-size: 13px; font-weight: 650; text-decoration: none; #262626-space: nowrap; }
.site-menu-link:hover, .site-menu-assistant:hover { color: #def5fc; background: #1b1c18; }
.site-menu-link[aria-current="page"] { color: #def5fc; background: #2c302b; box-shadow: inset 0 -2px 0 #276f68; }
.site-menu-assistant { margin-left: 8px; border-color: #333b36; }
.site-menu-assistant[aria-expanded="true"] { color: #262626; background: #276f68; border-color: #276f68; }
.menu-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #2a312d; color: #90c3b7; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; }
.site-menu-assistant[aria-expanded="true"] .menu-count { background: rgba(38, 38, 38, 0.22); color: #262626; }

.main-content { padding-top: 18px; }
.projects-bar { margin: 0 0 16px; padding: 8px 0 6px; }
.projects-bar-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.projects-bar-label { flex: 0 0 auto; color: #86aa9e; font-size: 10px; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.projects-bar .project-list { flex: 1 1 auto; min-width: 0; padding: 2px 1px 4px; }
.projects-bar .project-card { flex: 0 0 auto; max-width: 260px; padding: 2px 4px 2px 8px; }
.projects-bar .project-select { flex-direction: row; align-items: baseline; gap: 8px; padding: 5px 2px; }
.projects-bar .project-card-name { display: block; font-size: 13px; max-width: 170px; #262626-space: nowrap; text-wrap-mode: nowrap; }
.projects-bar .project-card-meta { #262626-space: nowrap; }
.brand { flex: 0 0 auto; #262626-space: nowrap; }
.topbar-right { flex: 0 0 auto; }
@media (max-width: 1180px) { .collab-note { display: none; } }
.projects-bar .project-create-form { flex: 0 0 auto; }
.projects-bar .project-create-form input { min-width: 150px; width: 170px; padding: 7px 9px; }
.projects-bar .project-create-form .secondary-button { padding: 7px 10px; font-size: 11px; #262626-space: nowrap; }
.projects-bar .projects-note { margin: 2px 0 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 4px 0 14px; }
.page-head h1 { margin: 0 0 6px; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3.4vw, 34px); font-weight: 500; letter-spacing: -.035em; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.page > .planner-card:first-of-type, .page > .page-head + .planner-card { margin-top: 0; }
.page .planner-card + .planner-card { margin-top: 16px; }
.assistant-home .assistant-card { margin: 0 0 16px; }

/* Plan page: map + stops side by side */
.globe-card-top { align-items: flex-start; }
.globe-top-right { gap: 8px; }
.globe-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.globe-actions .small-button { min-height: 34px; }
.globe-card-top .sync-indicator { margin-top: 4px; }
.globe-card.is-collapsed .globe-hint { display: none; }
.globe-card.is-collapsed .globe-card-top { padding-bottom: 15px; }
body.globe-mode .globe-card-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
body.globe-mode #globe-body[hidden] { display: flex !important; }
body.globe-mode .collapse-toggle { display: none; }
.panel-heading-actions { display: flex; align-items: center; gap: 6px; }
.plan-panel-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.plan-panel.is-collapsed { min-height: 0; align-self: start; }
.plan-panel.is-collapsed .panel-heading { border-bottom: 0; padding-bottom: 0; }
.planner-layout:has(.globe-card.is-collapsed) { align-items: start; }
.planner-card.is-collapsed .planner-card-heading { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.collapse-toggle { min-width: 58px; }
.tasks-stop-link { color: #276f68; font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.tasks-stop-link:hover { color: #93d2ca; }

/* Assistant modes */
.assistant-mode { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; }
.mode-segment { display: inline-flex; flex-wrap: wrap; border: 1px solid #333b36; border-radius: 5px; overflow: hidden; background: #232321; }
.mode-option { position: relative; display: inline-flex; cursor: pointer; }
.mode-option input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.mode-option span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-left: 1px solid #333b36; color: #99b3aa; font-size: 12px; font-weight: 650; #262626-space: nowrap; }
.mode-option:first-child span { border-left: 0; }
.mode-option:hover span { background: #1b1c18; color: #def5fc; }
.mode-option input:checked + span { background: #276f68; color: #262626; }
.mode-option input:focus-visible + span { outline: 2px solid #176f68; outline-offset: -4px; }
.assistant-mode-hint { margin: 6px 0 0; font-size: 11px; line-height: 1.45; }
.assistant-card.is-edit-mode .assistant-composer { border-color: #d99a33; }
.chat-actions { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding: 8px 10px; border: 1px solid #2f342f; border-radius: 4px; background: #1f201c; list-style: none; }
.chat-action { display: flex; gap: 8px; color: #b7d0cc; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-action-mark { flex: 0 0 14px; color: #26766b; font-weight: 800; }
.chat-action.is-failed .chat-action-mark, .chat-action.is-failed .chat-action-text { color: #a34d48; }
.build-job.edit-job { border-left: 3px solid #d99a33; }

/* Assistant drawer (non-Plan pages) */
.assistant-drawer-close { display: none; }
.assistant-drawer-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.6); }
.assistant-drawer { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); overflow-y: auto; padding: 12px; background: #1e1e19; border-left: 1px solid #323933; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.432); overscroll-behavior: contain; }
.assistant-drawer .assistant-card { margin: 0; }
.assistant-drawer .assistant-collapse { display: none; }
.assistant-drawer .assistant-drawer-close { display: inline-flex; }
.assistant-drawer .assistant-body[hidden] { display: block !important; }
.assistant-drawer .assistant-thread { max-height: max(260px, calc(100dvh - 470px)); }
body.assistant-drawer-open { overflow: hidden; }
.toast-region { z-index: 90; }

/* Tasks page */
.tasks-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.tasks-filters .compact-field { flex: 0 1 200px; }
.tasks-filters .compact-field select { width: 100%; border: 1px solid #2d3635; background: #262626; color: #cce8f5; }
.tasks-filters .text-button { min-height: 38px; }
.tasks-estimate-status { margin: 0 0 10px; padding: 8px 11px; border-left: 3px solid #276f68; background: #191e1a; color: #90c3b7; font-size: 12px; }
.tasks-estimate-status.is-error { border-left-color: #a34d48; background: #221b19; color: #9c4741; }
.tasks-estimate-status.is-pending::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #e7ae54; animation: planner-pulse 1.2s ease-in-out infinite; }
.tasks-table { display: flex; flex-direction: column; border-top: 1px solid #31342f; }
.tasks-table > .planner-empty { margin-top: 12px; }
.tasks-row { display: grid; grid-template-columns: 34px minmax(150px, 2fr) minmax(100px, 1.1fr) minmax(80px, .8fr) minmax(80px, .7fr) minmax(86px, .7fr) minmax(90px, 1fr) auto; align-items: center; gap: 10px; padding: 9px 4px; }
.tasks-head { padding-block: 7px; color: #7d8f8a; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid #31342f; }
.tasks-item { border-bottom: 1px solid #2e312d; }
.tasks-item:hover { background: #1f201c; }
.tasks-item.status-done .tasks-title, .tasks-item.status-cancelled .tasks-title { color: #798a85; text-decoration: line-through; text-decoration-color: rgba(121, 138, 133, 0.6); }
.tasks-check { display: grid; place-items: center; min-height: 34px; cursor: pointer; }
.tasks-check input { width: 18px; height: 18px; accent-color: #276f68; cursor: pointer; }
.tasks-title-cell { min-width: 0; }
.tasks-title { display: block; color: #d4efec; font-size: 13px; font-weight: 680; line-height: 1.35; overflow-wrap: anywhere; }
.tasks-cell { min-width: 0; color: #a0bab4; font-size: 12px; overflow-wrap: anywhere; }
.tasks-cost { font-variant-numeric: tabular-nums; }
.task-status-pill { display: inline-flex; padding: 2px 7px; border-radius: 3px; background: #191b18; color: #a0bab4; font-size: 11px; font-weight: 700; #262626-space: nowrap; }
.task-status-pill.to-do { background: #241d0e; color: #8a5f12; }
.task-status-pill.in-progress { background: #151b1f; color: #2f5f80; }
.task-status-pill.booked { background: #28312c; color: #26766b; }
.task-status-pill.done { background: #2a312d; color: #99b7a5; }
.task-status-pill.cancelled { background: #221b19; color: #9c4741; }
.tasks-actions { display: flex; gap: 4px; justify-content: flex-end; }
.tasks-actions .mini-button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.tasks-details { margin: 0 4px 10px 48px; padding: 9px 11px; border: 1px solid #2f342f; border-radius: 4px; background: #232321; }
.tasks-details-text { margin: 0 0 6px; color: #b7d0cc; font-size: 12px; line-height: 1.5; #262626-space: pre-wrap; overflow-wrap: anywhere; }
.tasks-details .task-booking-link { font-size: 12px; }
.tasks-details-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.tasks-details-footer .mini-button { min-height: 30px; font-size: 11px; }

/* Overview page */
.overview-project { margin: 0 0 10px; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.overview-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0; }
.overview-fact { padding: 10px 12px; border: 1px solid #2f342f; border-radius: 4px; background: #262626; }
.overview-fact dt { margin: 0 0 4px; color: #7d8f8a; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.overview-fact dd { margin: 0; color: #d4efec; font-size: 14px; font-weight: 650; line-height: 1.4; }
.overview-legs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; font-weight: 600; }
.overview-leg { display: inline-flex; align-items: center; gap: 5px; }
.overview-tasks-link { color: #276f68; text-underline-offset: 2px; }
.overview-day-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #2e312d; }
.overview-day { display: grid; grid-template-columns: 120px minmax(120px, .8fr) minmax(0, 2fr); gap: 12px; align-items: baseline; padding: 7px 4px; border-bottom: 1px solid #2e312d; font-size: 12px; }
.overview-day.is-gap { background: #1f201c; }
.overview-day-date { color: #a0bab4; font-weight: 700; font-variant-numeric: tabular-nums; }
.overview-day-stop { color: #def5fc; font-weight: 650; overflow-wrap: anywhere; }
.overview-day-stop .is-idea { color: #94600f; font-style: italic; }
.overview-day.is-gap .overview-day-stop { color: #6d7a76; font-weight: 400; }
.overview-day-blocks { color: #a0bab4; line-height: 1.5; overflow-wrap: anywhere; }
.overview-block-time { color: #798a85; font-variant-numeric: tabular-nums; }
.overview-undated { margin-top: 8px; }
.story-card .secondary-button { color: #dbe4df; background: transparent; border-color: rgba(255,255,255,.24); }
.story-card .secondary-button:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.story-card.is-collapsed .planner-card-heading { border-bottom: 0; }

@media (max-width: 1120px) {
  .tasks-head { display: none; }
  .tasks-row { grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) auto; grid-template-areas: none; gap: 3px 12px; padding: 10px 2px; }
  .tasks-row > .tasks-check { grid-row: span 4; align-self: start; }
  .tasks-row > .tasks-title-cell { grid-column: 2 / 4; }
  .tasks-row > .tasks-cell { display: flex; gap: 6px; font-size: 12px; }
  .tasks-row > .tasks-cell::before { content: attr(data-label) ":"; color: #7d8f8a; font-weight: 600; flex: 0 0 auto; }
  .tasks-actions { grid-column: 4; grid-row: 1 / span 4; align-self: start; flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; }
  .site-menu { order: 3; width: calc(100% + 28px); margin: 0 -14px; padding: 4px 14px 2px; overflow-x: auto; border-top: 1px solid #31342f; scrollbar-width: none; }
  .site-menu-assistant { margin-left: auto; }
  .planner-layout { grid-template-columns: 1fr; }
  .plan-panel { min-height: 0; max-height: none; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head-actions { justify-content: flex-start; }
  .projects-bar-row { flex-wrap: wrap; }
  .projects-bar .project-list { order: 3; flex-basis: 100%; }
  .projects-bar .project-create-form { margin-left: auto; }
  .projects-bar .projects-note { display: none; }
  .tasks-row { grid-template-columns: 34px minmax(0, 1fr); }
  .tasks-row > .tasks-cell, .tasks-row > .tasks-title-cell { grid-column: 2; }
  .tasks-row > .tasks-check { grid-row: span 6; }
  .tasks-actions { grid-column: 2; grid-row: auto; justify-content: flex-start; margin-top: 4px; }
  .tasks-details { margin-left: 44px; }
  .overview-day { grid-template-columns: 96px minmax(0, 1fr); }
  .overview-day-blocks { grid-column: 2; }
}
@media (max-width: 520px) {
  .site-menu { width: calc(100% + 24px); margin: 0 -12px; padding-inline: 12px; }
  .site-menu-link, .site-menu-assistant { padding: 0 9px; font-size: 12px; }
  .mode-segment { display: flex; width: 100%; }
  .mode-option { flex: 1 1 0; }
  .mode-option span { justify-content: center; width: 100%; padding: 4px 6px; #262626-space: normal; text-align: center; line-height: 1.2; }
  .projects-bar .project-create-form { width: 100%; margin-left: 0; }
  .projects-bar .project-create-form input { flex: 1; width: auto; }
  .tasks-filters .compact-field { flex: 1 1 140px; }
  .assistant-drawer { padding: 6px; }
}

/* ================================================================
   v3: stop activities editor, stop tasks, tasks by day,
   plans panel under the full-screen map.
   ================================================================ */
.stop-activities { margin-top: 2px; }
.stop-activity-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.stop-activity-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 6px 5px 9px; border: 1px solid #2f342f; border-radius: 4px; background: #232321; }
.stop-activity-text { min-width: 0; color: #b8d6d0; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.stop-activity-actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.stop-activity-actions .mini-button { min-height: 28px; font-size: 11px; }
.stop-activity-remove { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #be9591; font-size: 17px; line-height: 1; }
.stop-activity-remove:hover:not(:disabled), .stop-activity-remove:focus-visible { border-color: #42322f; background: #221b19; color: #a34d48; }
.stop-activity-remove:disabled { opacity: .45; }
.stop-activity-add { display: flex; gap: 6px; margin-top: 7px; }
.stop-activity-add input { flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 6px 9px; border: 1px solid #2e3a36; border-radius: 4px; background: #262626; color: #ceeaf3; font-size: 12px; outline: none; }
.stop-activity-add input:focus { border-color: #4d9189; box-shadow: 0 0 0 2px rgba(14,137,129,.1); }
.stop-activity-add .mini-button { min-height: 34px; padding-inline: 12px; font-size: 11px; }
.stop-task-list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; }
.stop-task-item { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; padding: 4px 2px; border-bottom: 1px solid #2e312d; }
.stop-task-item:last-child { border-bottom: 0; }
.stop-task-label { display: inline-flex; align-items: flex-start; gap: 8px; min-width: 0; cursor: pointer; }
.stop-task-label input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: #276f68; cursor: pointer; }
.stop-task-title { color: #b8d6d0; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.stop-task-meta { margin-left: 24px; color: #798a85; font-size: 11px; }

/* Tasks page: view switch and by-day groups */
.tasks-view-field { flex: 0 0 auto !important; }
.tasks-view-label { color: #7d8f8a; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.view-switch { display: inline-flex; border: 1px solid #333b36; border-radius: 5px; overflow: hidden; background: #232321; }
.view-switch-button { min-height: 38px; padding: 0 14px; border: 0; border-left: 1px solid #333b36; background: transparent; color: #99b3aa; font-size: 12px; font-weight: 650; #262626-space: nowrap; }
.view-switch-button:first-child { border-left: 0; }
.view-switch-button:hover { background: #1b1c18; color: #def5fc; }
.view-switch-button[aria-pressed="true"] { background: #276f68; color: #262626; }
.view-switch-button:focus-visible { outline: 2px solid #176f68; outline-offset: -4px; }
.tasks-empty-days { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; color: #a0bab4; font-size: 12px; font-weight: 600; cursor: pointer; }
.tasks-empty-days input { width: 16px; height: 16px; accent-color: #276f68; }
.tasks-table.is-by-day { border-top: 0; }
.tasks-day { border-top: 1px solid #31342f; }
.tasks-day + .tasks-day { margin-top: 10px; }
.tasks-day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 9px 4px 6px; background: #1f201c; border-bottom: 1px solid #2e312d; }
.tasks-day-title { margin: 0; color: #def5fc; font-size: 14px; font-weight: 720; font-variant-numeric: tabular-nums; }
.tasks-day-stops { flex: 1 1 auto; min-width: 0; color: #a0bab4; font-size: 12px; overflow-wrap: anywhere; }
.tasks-day-count { color: #798a85; font-size: 11px; font-weight: 650; }
.tasks-day.is-empty .tasks-day-head { background: transparent; border-bottom: 0; }
.tasks-day.is-empty .tasks-day-title { color: #798a85; font-weight: 600; }
.tasks-day.is-empty + .tasks-day.is-empty { margin-top: 0; }

/* Plans panel under the full-screen map */
.map-plans { display: none; }
body.globe-mode .map-plans:not([hidden]) { position: relative; z-index: 6; display: flex; flex-direction: column; flex: 0 0 auto; height: var(--map-plans-size, 42vh); min-height: 0; border-top: 1px solid #323933; background: #1e1e19; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.192); }
body.globe-mode .map-plans.is-collapsed { height: auto; }
.map-plans-resize { position: relative; flex: 0 0 auto; height: 14px; cursor: ns-resize; touch-action: none; outline: none; }
.map-plans-resize span { position: absolute; left: 50%; top: 5px; width: 44px; height: 4px; margin-left: -22px; border-radius: 999px; background: #414c47; }
.map-plans-resize:hover span, .map-plans.is-resizing .map-plans-resize span { background: #276f68; }
.map-plans-resize:focus-visible { box-shadow: inset 0 0 0 2px #176f68; }
.map-plans-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 8px; }
.map-plans-titles { min-width: 0; }
.map-plans-titles .section-kicker { margin-bottom: 2px; }
.map-plans-head h2 { margin: 0; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; #262626-space: nowrap; }
.map-plans-body { display: grid; flex: 1 1 auto; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; gap: 16px; min-height: 0; overflow-y: auto; padding: 0 22px 18px; overscroll-behavior: contain; scrollbar-width: thin; }
.map-plans:not(.has-selected) .map-plans-body { grid-template-columns: minmax(0, 1fr); }
.map-plans-stop:empty { display: none; }
.map-plans-stop .selected-detail { margin: 0; }
.map-plans #dayplan-content[hidden] { display: block !important; }
.map-plans .dayplan-layout { grid-template-columns: minmax(0, 1fr); }
.map-plans .timeline-column { order: -1; }
.map-plans .timeline-scroller { max-height: 460px; }
.map-plans .activity-list { max-height: none; }
.map-plans .planner-empty { margin: 0; }
body.globe-mode .globe-card:has(.map-plans:not([hidden]):not(.is-collapsed)) .globe-card-bottom { display: none; }

@media (max-width: 860px) {
  .map-plans-body { grid-template-columns: minmax(0, 1fr); padding: 0 13px 14px; }
  .map-plans-head { padding: 0 13px 6px; }
  .tasks-view-field { flex-basis: 100% !important; }
}
/* Phones: the plans panel is a bottom sheet over the map. */
@media (max-width: 600px) {
  body.globe-mode .map-plans:not([hidden]) { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; border: 1px solid #323933; border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.48); max-height: calc(100dvh - 120px); }
  .map-plans-resize { height: 22px; }
  .map-plans-resize span { top: 9px; }
  .map-plans-head h2 { font-size: 17px; }
  .stop-activity-item { flex-wrap: wrap; }
}

/* ================================================================
   v4: edit conflicts, expense edit + settle-up, unread badge,
   stop chooser on the map, Today page.
   ================================================================ */
.conflict-dialog { width: min(440px, calc(100vw - 24px)); }
.conflict-message { margin: 4px 0 8px; color: #def5fc; font-size: 15px; line-height: 1.45; }
.conflict-help { margin: 0 0 4px; font-size: 12px; line-height: 1.45; }

.menu-count.menu-unread { margin-left: 3px; background: #276f68; color: #262626; }

.expense-row-actions { display: inline-flex; gap: 5px; }
.expense-edit { font-size: 8px; }
.expense-row.is-editing { outline: 2px solid #215b53; outline-offset: 2px; border-radius: 4px; }
.expense-edit-note { flex: 1 1 auto; min-width: 0; color: #276f68; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.expense-submit-row { flex-wrap: wrap; gap: 8px; }
.settlement-list { margin-top: 8px; padding: 8px 10px; border: 1px solid #2e3531; border-radius: 5px; background: #1f201c; }
.settlement-label { display: block; margin-bottom: 4px; color: #9cb9b3; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.settlement-line { margin: 2px 0; color: #def5fc; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.settlement-line.is-even { color: #8fa5a0; font-weight: 500; }

/* Chooser for several stops at one map marker (stays light with the globe) */
.maplibregl-popup.stop-chooser-popup .maplibregl-popup-content { padding: 10px 10px 8px; border-radius: 8px; box-shadow: 0 10px 28px rgba(12,43,53,.22); }
.maplibregl-popup.stop-chooser-popup .stop-chooser-title { margin: 0 22px 6px 2px; color: #203238; font-size: 12px; font-weight: 700; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-option { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid #d8e2dd; border-radius: 5px; background: #fff; color: #203238; text-align: left; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-option:hover, .maplibregl-popup.stop-chooser-popup .stop-chooser-option:focus-visible { border-color: #276f68; background: #eef6f3; outline: none; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-option.is-preferred { border-color: #8fc9bf; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-number { grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #276f68; color: #fff; font-size: 11px; font-weight: 750; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-name { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.maplibregl-popup.stop-chooser-popup .stop-chooser-dates { color: #5f7570; font-size: 11px; }
.maplibregl-popup.stop-chooser-popup .maplibregl-popup-close-button { width: 26px; height: 26px; font-size: 18px; }

/* Today page: phone-first single column, two columns on wide screens */
.today-datebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0 0 10px; }
.today-step { min-height: 44px; padding: 0 14px; #262626-space: nowrap; }
.today-date-field { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; min-width: 0; }
.today-date-field input { min-height: 44px; min-width: 0; max-width: 100%; padding: 6px 10px; border: 1px solid #333b36; border-radius: 5px; background: #262626; color: #def5fc; font-size: 15px; }
.today-note { margin: 0 0 8px; padding: 9px 12px; border: 1px solid #42371a; border-radius: 5px; background: #231f15; color: #dcc89b; font-size: 14px; font-weight: 600; }
.today-day-title { margin: 6px 0 12px; color: #def5fc; font-family: Georgia, "Times New Roman", serif; font-size: clamp(19px, 2.6vw, 24px); font-weight: 500; line-height: 1.25; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.today-card { min-width: 0; padding: 14px 14px 12px; border: 1px solid #323833; border-radius: 6px; background: #232321; box-shadow: 0 5px 18px rgba(0, 0, 0, 0.108); }
.today-card-title { margin: 0 0 8px; color: #9cb9b3; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.today-empty { margin: 0; color: #829590; font-size: 14px; }
.today-label { display: block; margin: 8px 0 2px; color: #829590; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.today-stop-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.today-stop { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; }
.today-stop-name { color: #def5fc; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.today-stop-meta { grid-column: 1; color: #8ea6a0; font-size: 13px; }
.today-stop .mini-button { grid-column: 2; grid-row: 1 / span 2; min-height: 36px; padding: 0 10px; font-size: 12px; }
.today-tonight { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid #2e312d; color: #def5fc; font-size: 15px; font-weight: 650; }
.today-tonight .today-label { margin-top: 0; }
.today-timeline { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.today-block { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border: 1px solid #2f342f; border-left: 4px solid #333e39; border-radius: 5px; background: #262626; }
.today-block.is-now { border-color: #215b53; border-left-color: #276f68; background: #191f1d; }
.today-block.is-next { border-left-color: #e7ae54; }
.today-block-time { color: #b8d6d0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.today-block-body { min-width: 0; }
.today-block-title { display: block; color: #def5fc; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.today-block-flag { display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 999px; background: #276f68; color: #262626; font-size: 11px; font-weight: 750; vertical-align: 1px; }
.today-block.is-next .today-block-flag { background: #8a6420; }
.today-block-meta { display: block; margin-top: 2px; color: #8ea6a0; font-size: 13px; }
.today-block-notes { margin: 4px 0 0; color: #a2bcb9; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.today-leg-route { margin: 0 0 2px; color: #def5fc; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.today-leg-meta { margin: 0 0 6px; color: #8ea6a0; font-size: 14px; }
.today-leg-notes { margin: 0 0 6px; color: #b8d6d0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.today-links { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.today-links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.today-card .task-booking-link { margin-top: 2px; font-size: 14px; }
.today-link-status { color: #8ea6a0; font-size: 12px; }
.today-task-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.today-task { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #2e312d; }
.today-task:last-child { border-bottom: 0; }
.today-task-label { display: flex; align-items: flex-start; gap: 10px; min-height: 28px; cursor: pointer; }
.today-task-label input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: #276f68; cursor: pointer; }
.today-task-title { color: #def5fc; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.today-task.is-done .today-task-title { color: #798a85; text-decoration: line-through; }
.today-task-meta { margin-left: 32px; color: #8ea6a0; font-size: 13px; }
.today-task-meta.is-overdue { color: #a34d48; font-weight: 600; }
.today-task .task-booking-link { margin-left: 32px; }
.today-subhead { margin: 8px 0 4px; color: #def5fc; font-size: 14px; }
.today-activity-list { margin: 0; padding-left: 20px; color: #b8d6d0; font-size: 14px; line-height: 1.5; }
.today-activity-list.is-alt { color: #8ea6a0; }

@media (min-width: 900px) {
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .today-schedule { grid-row: span 2; }
}
@media (max-width: 520px) {
  .today-step-label { display: none; }
  .today-step { padding: 0 12px; font-size: 18px; }
  .today-block { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; }
  .today-block-time { font-size: 13px; }
}

/* Estimated trip budget (Costs page) */
.budget-card { margin-bottom: 18px; }
.budget-summary { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin: 8px 0 10px; }
.budget-total { font-size: 22px; font-weight: 700; margin: 0; color: var(--ink); }
.budget-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #2f342f; margin: 6px 0; }
.budget-seg { display: block; height: 100%; }
.budget-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.seg-0 { background: #2563EB; } .seg-1 { background: #0a8a84; } .seg-2 { background: #D97706; } .seg-3 { background: #7C3AED; }
.seg-4 { background: #DC2626; } .seg-5 { background: #16A34A; } .seg-6 { background: #8c9db6; }
.budget-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; padding: 0; margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.budget-rows { display: grid; gap: 6px; }
.budget-row { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.budget-row[aria-expanded="true"] { border-color: var(--teal); }
.budget-row-amount { font-weight: 700; #262626-space: nowrap; }
.budget-detail { padding: 4px 14px 10px; }
.budget-cat { margin: 8px 0 2px; font-weight: 600; color: var(--ink); }
.budget-items { margin: 0 0 4px 18px; padding: 0; font-size: 13px; color: var(--muted); }
.budget-credit { margin-top: 10px; }

/* Plan workspace: one page scroll, with the selected stop opened in focused views. */
#page-plan { display: flex; flex-direction: column; }
#page-plan[hidden] { display: none; }
#page-plan > .page-head { order: 0; }
#page-plan > .planner-layout { order: 1; }
#page-plan > .assistant-home { order: 2; margin-top: 16px; }
#page-plan > #dayplan-portal { order: 3; }
.planner-layout { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr); align-items: start; }
.plan-panel { min-height: 0; max-height: none; height: auto; align-self: start; }
.plan-panel-body { display: block; overflow: visible; }
.point-list, .plan-panel.has-selected .point-list { max-height: none; overflow: visible; flex: none; }
.plan-panel.has-selected .selected-detail, .selected-detail { max-height: none; min-height: 0; overflow: visible; }
.selected-detail { display: block; }
.selected-actions { align-items: center; }
.selected-more-actions { position: relative; }
.selected-more-actions summary { list-style: none; cursor: pointer; }
.selected-more-actions summary::-webkit-details-marker { display: none; }
.selected-more-actions[open] { display: grid; gap: 6px; position: absolute; right: 0; z-index: 5; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.selected-more-actions[open] summary { justify-self: end; }
.selected-topline { align-items: center; }
.selected-name { font-size: 19px; }
.selected-dates, .coord-line, .detail-note, .point-list-dates, .point-list-author { font-size: 13px; }
.detail-label { font-size: 11px; }
.point-list-title { font-size: 15px; }
.point-list-button { padding: 12px; }
.stop-detail-tabs { display: flex; gap: 6px; margin: 14px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.stop-detail-tab { flex: 0 0 auto; border: 1px solid transparent; border-radius: 7px; padding: 8px 12px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.stop-detail-tab:hover, .stop-detail-tab.is-active { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 9%, var(--paper)); color: var(--ink); }
.stop-detail-pane[hidden] { display: none; }
.stop-detail-pane { min-width: 0; }
.stop-activity-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 5px 0 9px; }
.stop-activity-heading .detail-label { margin: 0; }
.stop-activity-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stop-activity-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.stop-activity-image { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--teal) 13%, var(--paper)), var(--paper)); color: var(--muted); }
.stop-activity-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.activity-photo-placeholder { padding: 12px; text-align: center; font-size: 13px; }
.activity-photo-source { position: absolute; left: 8px; bottom: 8px; padding: 5px 7px; border-radius: 5px; background: rgba(0, 0, 0, 0.6); color: #262626; font-size: 12px; text-decoration: none; }
.activity-photo-credit { position: absolute; right: 6px; bottom: 6px; max-width: 64%; padding: 4px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #262626; font-size: 10px; line-height: 1.3; text-align: right; overflow-wrap: anywhere; }
.activity-photo-credit a { color: #262626; }
.stop-activity-title { margin: 0; padding: 10px 11px 12px; font-size: 15px; line-height: 1.35; }
.stop-activity-price { margin: 0; padding: 0 11px 11px; color: var(--muted); font-size: 13px; }
.activity-price { font-weight: 650; }
.route-stops-disclosure { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.route-stops-disclosure > summary { color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 700; }
.route-stops-disclosure[open] > summary { margin-bottom: 8px; }
.stop-activity-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }
.stop-activity-empty p { margin: 0; }
.stop-secondary-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.stop-secondary-details > summary { color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 650; }
.stop-more-photos .photos-section { border: 0; margin: 0; padding: 8px 0 0; }
.stop-detail-pane-schedule > .dayplan-card { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.stop-detail-pane-schedule > .dayplan-card > .planner-card-heading { padding: 0 0 12px; }
.stop-detail-pane-schedule > .dayplan-card > .planner-card-heading .section-kicker { display: none; }
.stop-detail-pane-schedule .dayplan-layout { grid-template-columns: minmax(0, 1fr); }
.stop-detail-pane-schedule .timeline-scroller { max-height: none; overflow-x: auto; overflow-y: hidden; }
.stop-detail-pane-tasks .tasks-section { margin-top: 0; }
.stop-detail-pane-tasks .tasks-section-heading { flex-wrap: wrap; justify-content: flex-start; }
.stop-detail-pane-tasks .tasks-section-heading .tasks-stop-link { margin-right: auto; }
.stop-task-item > .mini-button { margin-left: auto; }
.project-card { position: relative; overflow: visible; flex: 0 0 240px; padding: 7px 9px; }
.project-card-actions.project-menu { position: relative; margin-left: auto; }
.project-menu-toggle { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--paper); cursor: pointer; font-size: 17px; }
.project-card-actions.project-menu:not([open]) > .mini-button { display: none; }
.project-card-actions.project-menu[open] { position: absolute; right: 4px; top: 44px; z-index: 12; display: grid; min-width: 150px; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.project-card-actions.project-menu[open] .project-menu-toggle { justify-self: end; }
.projects-note, .project-card-meta { font-size: 12px; }
.project-card-name { font-size: 15px; }
.globe-actions { flex-wrap: wrap; }
.assistant-guide { margin: 4px 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--teal) 5%, var(--paper)); }
.assistant-guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.assistant-guide-heading h3 { margin: 2px 0 0; font-size: 17px; }
.assistant-guide-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.assistant-guide-choice { display: grid; justify-items: start; gap: 4px; min-height: 104px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; }
.assistant-guide-choice > span { color: var(--teal); font-size: 20px; }
.assistant-guide-choice strong { font-size: 14px; }
.assistant-guide-choice small { color: var(--muted); font-size: 12px; }
.assistant-guide-choice:hover, .assistant-guide-choice.is-selected { border-color: var(--teal); box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 15%, transparent); }
.assistant-guide-review { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px; border: 1px solid var(--teal); border-radius: 8px; background: var(--paper); }
.assistant-guide-review p { margin: 3px 0 0; color: var(--muted); }
.assistant-guide-review-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.suggestion-review { width: 100%; padding: 10px; border: 1px solid var(--teal); border-radius: 7px; background: var(--paper); }
.suggestion-review p { #262626-space: pre-line; margin: 6px 0 10px; color: var(--muted); line-height: 1.45; }
.suggestion-review-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.activity-preview-image { width: 100%; margin: -10px -11px 10px; width: calc(100% + 22px); aspect-ratio: 16 / 9; }
.activity-preview-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.assistant-custom-request { margin-top: 10px; }
.assistant-custom-request > summary { color: var(--muted); cursor: pointer; font-size: 13px; }
.assistant-custom-request .assistant-composer { margin-top: 10px; }
@media (max-width: 860px) {
  .planner-layout { grid-template-columns: 1fr; }
  .assistant-guide-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .stop-activity-gallery { grid-template-columns: 1fr; }
  .assistant-guide-heading, .assistant-guide-review { align-items: stretch; flex-direction: column; }
  .assistant-guide-choices { grid-template-columns: 1fr 1fr; }
  .assistant-guide-choice { min-height: 94px; padding: 10px; }
  .globe-actions > button { flex: 1 1 auto; }
  .selected-topline { align-items: flex-start; }
  .selected-actions { flex-wrap: wrap; justify-content: flex-end; }
}
.story-project-picker { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.story-project-picker select { min-width: 150px; min-height: 38px; padding: 6px 30px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.route-timeline-card { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.route-timeline-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.route-timeline-heading h2 { margin: 2px 0 0; font-size: 17px; }
.route-timeline { display: flex; align-items: stretch; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.route-timeline-stop { flex: 0 0 150px; display: grid; justify-items: start; gap: 5px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.route-timeline-stop:hover, .route-timeline-stop:focus-visible { background: color-mix(in srgb, var(--teal) 10%, var(--paper)); outline: 2px solid color-mix(in srgb, var(--teal) 50%, transparent); }
.route-timeline-date { color: var(--muted); font-size: 11px; #262626-space: nowrap; }
.route-timeline-dot { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--teal); border-radius: 50%; background: var(--paper); font-size: 12px; font-weight: 750; }
.route-timeline-name { max-width: 138px; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; #262626-space: nowrap; }
.route-timeline-stop.is-active .route-timeline-dot { background: var(--teal); color: #262626; }
.route-timeline-stop.is-idea .route-timeline-dot { border-style: dashed; }
.route-timeline-connector { flex: 0 0 28px; align-self: center; height: 2px; margin: 14px -4px 0; background: var(--line-strong, var(--line)); }
.route-timeline-empty { margin: 8px; color: var(--muted); font-size: 13px; }
@media (max-width: 620px) { .route-timeline-card { padding: 12px; } .route-timeline-heading { align-items: flex-start; flex-direction: column; } .route-timeline-stop { flex-basis: 126px; } .route-timeline-connector { flex-basis: 20px; } }
.activity-title-button { padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.activity-title-button:hover { color: var(--teal); text-decoration: underline; }
.activity-card { cursor: default; }
.activity-detail-dialog { width: min(840px, calc(100vw - 24px)); max-height: min(90dvh, 900px); overflow: auto; }
.activity-detail-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(230px, .8fr); gap: 18px; }
.activity-detail-image { min-height: 280px; aspect-ratio: 4 / 3; border-radius: 10px; }
.activity-detail-image img { object-fit: cover; }
.activity-detail-copy h2 { margin: 4px 0 10px; font-size: clamp(22px, 3vw, 32px); }
.activity-detail-description { color: var(--ink); font-size: 15px; line-height: 1.6; }
.activity-detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; }
.activity-detail-facts > div { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.activity-detail-facts dt { color: var(--muted); font-size: 11px; }
.activity-detail-facts dd { margin: 3px 0 0; font-weight: 700; }
.activity-detail-dialog .dialog-actions { justify-content: flex-end; margin-top: 18px; }
@media (max-width: 640px) { .activity-detail-body { grid-template-columns: 1fr; } .activity-detail-image { min-height: 210px; } }
.stop-activity-open { display: block; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 750; text-align: left; cursor: pointer; }
.stop-activity-open:hover { color: var(--teal); text-decoration: underline; }
.stop-activity-image { cursor: pointer; }
.stop-activity-description { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

/* ================================================================
   v6: one visual system for every page.
   Same card, radius, spacing, type scale and controls on Overview,
   Itinerary, Tasks, Today and Costs. The Plan page keeps its own layout. Nothing below 11px.
   ================================================================ */
:root {
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --card-bg: #262626;
  --card-line: #2e3432;
  --soft-bg: #1f211f;
  --good: #1f8a5b;
  --good-bg: #131d18;
  --warn: #a8660b;
  --warn-bg: #241d0f;
  --info: #2a6fb0;
  --info-bg: #151b21;
}

/* ---- page frame */
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .page-head { align-items: flex-end; margin: 6px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--card-line); }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .page-head h1 { font-size: clamp(28px, 3.4vw, 36px); }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .page-head .subtle-copy { font-size: 14px; }

/* ---- cards */
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-card { margin-top: 20px; padding: 22px 24px 20px; border: 1px solid var(--card-line); border-radius: var(--radius-lg); background: var(--card-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.096), 0 8px 24px rgba(0, 0, 0, 0.12); }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-card-heading { align-items: center; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--card-line); }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-card-heading h2 { font-size: 22px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-card-subtitle { font-size: 13px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-card.is-collapsed .planner-card-heading { margin-bottom: 0; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .costs-card { padding: 22px 24px 20px; border-radius: var(--radius-lg); border: 1px solid var(--card-line); }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-empty { border-radius: var(--radius-md); }

/* ---- controls: one radius and height everywhere */
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .primary-button, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .secondary-button, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .danger-button { border-radius: var(--radius-md); min-height: 38px; font-size: 13px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .small-button { min-height: 34px; font-size: 12px; border-radius: var(--radius-sm); }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .mini-button { border-radius: var(--radius-sm); font-size: 12px; padding: 5px 10px; min-height: 30px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .text-button { font-size: 13px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .count-pill { border-radius: 999px; font-size: 12px; padding: 5px 10px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .field label { font-size: 12px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .field input, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .field select, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .field textarea, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-select, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .traveler-form input, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .expense-input-grid .field input, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .expense-input-grid .field select, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .tasks-filters .compact-field select { border-radius: var(--radius-sm); min-height: 40px; font-size: 14px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .quiet-label { font-size: 12px; }
:where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .section-kicker { font-size: 11px; }

/* ---- stat tiles (Overview, Tasks, Costs) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 18px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: var(--radius-md); background: var(--soft-bg); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.stat-tile:hover { border-color: #345952; transform: translateY(-1px); }
.stat-label { color: #839aa5; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { color: #dbf4ff; font-size: 20px; font-weight: 720; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-note { color: #839aa5; font-size: 12px; line-height: 1.4; }
.stat-tile.is-good { background: var(--good-bg); border-color: #234030; }
.stat-tile.is-good .stat-value { color: #16653f; }
.stat-tile.is-warn { background: var(--warn-bg); border-color: #463307; }
.stat-tile.is-warn .stat-value { color: #7f4c06; }

/* ---- status pills and badges */
.task-status-pill { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.task-status-pill.to-do { background: var(--warn-bg); color: #8a5408; }
.task-status-pill.in-progress { background: var(--info-bg); color: #1f5a92; }
.task-status-pill.booked { background: var(--good-bg); color: #16653f; }
.task-status-pill.done { background: #2c302e; color: #a5bcb7; }
.task-status-pill.cancelled { background: #362b2a; color: #9c4741; }
.booked-badge { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--good-bg); color: #16653f; font-size: 11px; font-weight: 750; letter-spacing: .02em; #262626-space: nowrap; }
.booked-badge::before { content: "✓"; }
.booked-badge.is-partial { background: var(--info-bg); color: #1f5a92; }
.booked-badge.is-partial::before { content: "◐"; }

/* ---- Overview */
.overview-headline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.overview-project { margin: 0; font-size: 22px; }
.overview-travelers { margin: 0; color: #839aa5; font-size: 13px; }
.overview-stats { margin-bottom: 0; }
.overview-legs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; font-weight: 650; }
.overview-leg { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Itinerary (Overview › Day by day) */
.itinerary { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.itinerary-stop { border: 1px solid var(--card-line); border-radius: var(--radius-md); background: var(--card-bg); overflow: hidden; }
.itinerary-stop.is-idea { border-style: dashed; }
.itinerary-stop-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--soft-bg); border-bottom: 1px solid var(--card-line); }
.itinerary-stop-index { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: #0a8a84; color: #262626; font-size: 13px; font-weight: 750; }
.itinerary-stop-titles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.itinerary-stop-name { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.itinerary-stop-dates { color: #839aa5; font-size: 13px; }
.itinerary-days { margin: 0; padding: 4px 16px; list-style: none; }
.itinerary-day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid #191c1a; }
.itinerary-day:last-child { border-bottom: 0; }
.itinerary-day-date { color: #b3d2dc; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 2px; }
.itinerary-blocks { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.itinerary-block { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.45; color: #d4efec; }
.itinerary-time { color: #839aa5; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.itinerary-title { overflow-wrap: anywhere; }
.itinerary-block.cat-travel .itinerary-title { color: #1f5a92; }
.itinerary-block.cat-food .itinerary-title, .itinerary-block.cat-rest .itinerary-title { color: #a5bcb7; }
.itinerary-free { color: #6d7a76; font-size: 13px; font-style: italic; }
.itinerary-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px dashed var(--card-line); background: #222423; color: #b3d2dc; font-size: 13px; font-weight: 650; }
.itinerary-leg-cost { margin-left: auto; color: #839aa5; font-weight: 500; font-variant-numeric: tabular-nums; }
.itinerary-gap { padding: 10px 16px; border: 1px dashed var(--card-line); border-radius: var(--radius-md); color: #6d7a76; font-size: 13px; text-align: center; }

/* ---- Slideshow photos: label each photo with the activity it shows */
.story-hero-activity { position: absolute; left: 14px; bottom: 40px; max-width: calc(100% - 28px); padding: 5px 11px; border-radius: 999px; background: rgba(20,32,35,.78); color: #fbfbf7; font-size: 13px; font-weight: 650; backdrop-filter: blur(4px); pointer-events: none; }
.story-thumb-button { position: relative; }
.story-thumb-activity { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: 11px; font-weight: 650; line-height: 1.2; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-card { border-radius: var(--radius-lg); }
.story-hero, .story-thumb-button { border-radius: var(--radius-md); }

/* ---- Tasks */
.tasks-stats { margin-bottom: 16px; }
.tasks-filters { padding: 12px; border: 1px solid var(--card-line); border-radius: var(--radius-md); background: var(--soft-bg); }
.tasks-table { border-top: 0; }
.tasks-head { border-bottom: 1px solid var(--card-line); font-size: 11px; }
.tasks-group-head { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 6px; border-bottom: 1px solid var(--card-line); }
.tasks-group-head:first-of-type { margin-top: 6px; }
.tasks-group-index { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #0a8a84; color: #262626; font-size: 12px; font-weight: 750; }
.tasks-group-name { color: #dbf4ff; font-size: 15px; font-weight: 720; }
.tasks-group-dates { color: #839aa5; font-size: 12px; }
.tasks-row { padding: 10px 6px; }
.tasks-item { border-bottom: 1px solid #191c1a; border-radius: var(--radius-sm); }
.tasks-item:hover { background: var(--soft-bg); }
.tasks-item.status-booked .tasks-title::after { content: " ✓"; color: var(--good); }
.tasks-title { font-size: 14px; }
.tasks-cell { font-size: 13px; }
.tasks-cost.is-booked { color: var(--good); font-weight: 650; }
.tasks-details { border-radius: var(--radius-md); }
.tasks-estimate-status { border-radius: var(--radius-sm); }

/* ---- Costs: budget card */
.budget-card { margin-bottom: 0; }
.budget-stats { margin-bottom: 12px; }
.budget-progress-row { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.budget-progress { position: relative; flex: 1; height: 10px; border-radius: 999px; background: #2c312f; overflow: hidden; }
.budget-progress-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #1f8a5b, #2fa874); }
.budget-block { margin-top: 18px; }
.budget-block-title { margin: 0 0 10px; color: #b3d2dc; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.budget-bar { height: 12px; margin: 0 0 12px; border-radius: 999px; }
.budget-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; margin: 0; font-size: 13px; }
.budget-legend-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; color: #b3d2dc; }
.budget-legend-share { color: #839aa5; font-variant-numeric: tabular-nums; }
.budget-legend-amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.budget-rows { gap: 8px; }
.budget-row { align-items: center; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--radius-md); background: var(--card-bg); font-size: 14px; transition: border-color .15s, background .15s; }
.budget-row:hover { border-color: #345952; background: var(--soft-bg); }
.budget-row[aria-expanded="true"] { border-color: #0a8a84; background: var(--soft-bg); }
.budget-row.is-booked { border-left: 4px solid var(--good); }
.budget-row-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.budget-row-chevron { color: #839aa5; width: 12px; }
.budget-row-name { font-weight: 680; }
.budget-row-dates { color: #839aa5; font-size: 12px; }
.budget-row-amount { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.budget-detail { margin: -2px 0 4px; padding: 8px 16px 12px 36px; border: 1px solid var(--card-line); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); background: #222423; }
.budget-cat { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 4px; font-size: 13px; font-weight: 700; }
.budget-cat-amount { color: #839aa5; font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-items { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.budget-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 5px 0; border-bottom: 1px solid #191c1a; font-size: 13px; color: #b3d2dc; }
.budget-item:last-child { border-bottom: 0; }
.budget-item.is-booked .budget-item-label { color: #16653f; font-weight: 650; }
.budget-item-amount { font-variant-numeric: tabular-nums; #262626-space: nowrap; }
.budget-item-note { grid-column: 1 / -1; color: #6d7a76; font-size: 12px; }
.budget-credit { margin-top: 16px; }

/* ---- Costs: travellers and ledger (were 8–10px) */
.costs-layout { gap: 28px; }
.traveler-column { padding-right: 24px; border-right: 1px solid var(--card-line); }
.traveler-chip { padding: 5px 10px 5px 5px; border-radius: 999px; font-size: 13px; }
.traveler-avatar { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; }
.traveler-remove, .expense-remove { font-size: 12px; }
.traveler-empty, .ledger-hint, .ledger-empty { font-size: 13px; }
.traveler-form .secondary-button, .expense-submit-row .primary-button { border-radius: var(--radius-sm); font-size: 13px; min-height: 40px; padding: 8px 14px; }
.expense-form { padding: 16px; border: 1px solid var(--card-line); border-radius: var(--radius-md); background: var(--soft-bg); }
.expense-input-grid .field label { font-size: 11px; }
.split-fieldset legend { font-size: 12px; }
.expense-row { padding: 12px 4px; border-top: 1px solid #191c1a; }
.expense-name { font-size: 14px; }
.expense-meta { font-size: 12px; }
.expense-amount-value { font-size: 14px; font-weight: 650; }
.balance-person, .balance-net { font-size: 13px; }
.balance-detail { font-size: 12px; }
.settlement-list { border-radius: var(--radius-md); }
.settlement-label { font-size: 11px; }

@media (max-width: 900px) {
  .traveler-column { padding-right: 0; border-right: 0; padding-bottom: 18px; border-bottom: 1px solid var(--card-line); }
}
@media (max-width: 860px) {
  :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .planner-card, :where(#page-tasks, #page-overview, #page-costs, #page-today, #page-build) .costs-card { padding: 18px 16px; }
  .itinerary-day { grid-template-columns: 1fr; gap: 6px; }
  .tasks-group-head { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-value { font-size: 17px; }
  .stat-tile { padding: 12px; }
  .itinerary-stop-head, .itinerary-days, .itinerary-leg { padding-left: 12px; padding-right: 12px; }
  .budget-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .budget-detail { padding-left: 14px; }
  .budget-legend-item { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .budget-legend-share { display: none; }
}

/* The slideshow card stays dark in both themes (the shared card background must not win over it). */
.planner-card.story-card { background: #1e2c2f; border-color: #1e2c2f; color: #eef2ec; }

/* ================================================================
   v7: Plan page. Journey ribbon ("Stops by date"), slim activity
   cards with tags and filters, activity detail modal.
   ================================================================ */
:root {
  --tag-nature: #2f8f5b; --tag-water: #1d86b8; --tag-adventure: #d2691e; --tag-culture: #8a5fbf;
  --tag-food: #c9861a; --tag-night: #b0408f; --tag-relax: #3d9c97; --tag-wildlife: #6f8f1f;
  --tag-view: #d0554a; --tag-shopping: #5b74c9; --tag-daytrip: #8898a4; --tag-other: #8898a4;
}
.tag-nature { --tag: var(--tag-nature); } .tag-water { --tag: var(--tag-water); } .tag-adventure { --tag: var(--tag-adventure); }
.tag-culture { --tag: var(--tag-culture); } .tag-food { --tag: var(--tag-food); } .tag-night { --tag: var(--tag-night); }
.tag-relax { --tag: var(--tag-relax); } .tag-wildlife { --tag: var(--tag-wildlife); } .tag-view { --tag: var(--tag-view); }
.tag-shopping { --tag: var(--tag-shopping); } .tag-daytrip { --tag: var(--tag-daytrip); } .tag-other { --tag: var(--tag-other); }

/* ---- journey ribbon */
.route-timeline-card { padding: 16px 18px 14px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 7%, var(--paper)), var(--paper) 55%); }
.route-timeline-heading { align-items: baseline; margin-bottom: 14px; }
.route-timeline-heading .quiet-label { font-size: 13px; font-variant-numeric: tabular-nums; }
.route-timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px 0; overflow: visible; padding: 0; }
.route-timeline-item { position: relative; display: flex; align-items: stretch; min-width: 0; }
.route-timeline-stop { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.route-timeline-stop:hover, .route-timeline-stop:focus-visible { background: var(--paper); border-color: var(--teal); outline: none; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.288); }
.route-timeline-stop:focus-visible { outline: 2px solid color-mix(in srgb, var(--teal) 60%, transparent); outline-offset: 2px; }
.route-timeline-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.route-timeline-dot { flex: 0 0 26px; width: 26px; height: 26px; border: 2px solid var(--teal); font-size: 12px; }
.route-timeline-date { color: var(--muted); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; #262626-space: nowrap; }
.route-timeline-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-width: 100%; min-height: 2.5em; overflow: hidden; font-size: 14px; font-weight: 720; line-height: 1.25; #262626-space: normal; text-overflow: clip; }
.route-timeline-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.route-timeline-stay { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 12%, var(--paper)); color: var(--teal-deep); font-size: 11px; font-weight: 700; }
.route-timeline-stay.is-daytrip { background: color-mix(in srgb, var(--gold) 22%, var(--paper)); color: #8a5f12; }
.route-timeline-stay.is-idea { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.route-timeline-stay.is-today { background: var(--teal); color: #262626; }
.route-timeline-stop.is-active { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal), 0 8px 18px rgba(0, 0, 0, 0.288); background: color-mix(in srgb, var(--teal) 8%, var(--paper)); }
.route-timeline-stop.is-idea { border-style: dashed; }
.route-timeline-connector { flex: 0 0 30px; align-self: center; position: relative; display: grid; place-items: center; height: 26px; margin: 0; background: none; }
.route-timeline-connector::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line); }
.route-timeline-mode { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--leg-color, var(--line)); border-radius: 50%; background: var(--paper); font-size: 11px; line-height: 1; }
.route-timeline-connector.is-missing .route-timeline-mode { border-style: dashed; color: var(--muted); }
@media (max-width: 620px) {
  .route-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-timeline-stop { flex-basis: auto; padding: 9px 10px; }
  .route-timeline-connector { flex-basis: 22px; }
  .route-timeline-heading { flex-direction: row; align-items: baseline; flex-wrap: wrap; }
}

/* ---- activity tags and filters */
.activity-tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.activity-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tag, var(--tag-other)) 14%, var(--paper)); color: color-mix(in srgb, var(--tag, var(--tag-other)) 78%, var(--ink)); font-size: 11px; font-weight: 700; #262626-space: nowrap; }
.activity-tag-icon { font-size: 12px; line-height: 1; }
.activity-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.activity-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 650; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.activity-filter:hover { border-color: var(--tag, var(--teal)); }
.activity-filter.is-on { border-color: var(--tag, var(--teal)); background: var(--tag, var(--teal)); color: #262626; }
.activity-filter-count { min-width: 16px; padding: 0 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); font-size: 10px; font-weight: 750; text-align: center; }
.activity-filter.is-on .activity-filter-count { background: rgba(38, 38, 38, 0.26); }

/* ---- slim activity cards */
.stop-activity-gallery.is-slim { grid-template-columns: 1fr; gap: 8px; }
.stop-activity-card.is-slim { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 14px; border-left: 3px solid var(--tag, var(--line)); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stop-activity-card.is-slim:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.288); border-color: var(--tag, var(--teal)); }
.stop-activity-card.is-slim .stop-activity-image { width: 76px; height: 76px; aspect-ratio: 1; border-radius: 10px; }
.stop-activity-image { background: linear-gradient(140deg, color-mix(in srgb, var(--tag, var(--teal)) 30%, var(--paper)), color-mix(in srgb, var(--tag, var(--teal)) 8%, var(--paper))); }
.stop-activity-card.is-slim .activity-photo-credit, .stop-activity-card.is-slim .activity-photo-source { display: none; }
.activity-photo-placeholder { display: grid; place-items: center; padding: 0; }
.activity-photo-icon { font-size: 28px; line-height: 1; filter: saturate(.9); }
.activity-photo-placeholder.is-loading .activity-photo-icon { animation: planner-pulse 1.4s ease-in-out infinite; }
.stop-activity-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stop-activity-card.is-slim .stop-activity-open { font-size: 14px; line-height: 1.25; }
.stop-activity-card.is-slim .stop-activity-description { -webkit-line-clamp: 1; font-size: 12px; }
.stop-activity-card.is-slim .stop-activity-price { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.stop-activity-planned { padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 14%, var(--paper)); color: var(--teal-deep); font-size: 11px; font-weight: 700; }
.stop-activity-chevron { color: var(--muted); font-size: 20px; line-height: 1; }

/* ---- activity detail modal */
.activity-detail-dialog { width: min(720px, calc(100vw - 24px)); padding: 0; border-radius: 18px; overflow: hidden auto; }
.activity-detail-dialog > .point-form { padding: 0; }
.activity-detail-dialog .dialog-heading { position: absolute; z-index: 2; top: 10px; right: 10px; left: auto; margin: 0; padding: 0; border: 0; }
.activity-detail-dialog .dialog-heading .eyebrow { display: none; }
.activity-detail-dialog .dialog-heading .icon-button { background: rgba(0, 0, 0, 0.6); color: #262626; border-color: transparent; }
.activity-detail-body { display: block; }
.activity-detail-hero { position: relative; }
.activity-detail-hero .activity-detail-image { display: grid; width: 100%; min-height: 0; aspect-ratio: 16 / 8; border-radius: 0; cursor: default; }
.activity-detail-hero .activity-photo-icon { font-size: 64px; }
.activity-detail-hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 22px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); color: #262626; pointer-events: none; }
.activity-detail-place { margin: 0 0 2px; font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; opacity: .86; }
.activity-detail-hero-text h2 { margin: 0; color: #262626; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 3.4vw, 30px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.activity-detail-hero .activity-photo-credit { top: 10px; bottom: auto; left: 10px; right: auto; max-width: 60%; text-align: left; }
.activity-detail-copy { display: flex; flex-direction: column; gap: 12px; padding: 16px 22px 4px; }
.activity-detail-copy .activity-tag { padding: 4px 10px; font-size: 12px; }
.activity-detail-description { margin: 0; font-size: 15px; line-height: 1.6; }
.activity-detail-planned { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--teal) 12%, var(--paper)); color: var(--teal-deep); font-size: 13px; font-weight: 650; }
.activity-detail-facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 0; }
.activity-detail-facts > div { padding: 10px 12px; border-radius: 12px; background: var(--wash); }
.activity-detail-facts dt { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.activity-detail-facts dd { font-size: 14px; }
.activity-detail-tip { margin: 0; padding: 10px 12px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--gold) 12%, var(--paper)); font-size: 13px; line-height: 1.5; }
.activity-detail-links { margin: 0; font-size: 13px; }
.activity-detail-links a { color: var(--teal-deep); font-weight: 650; }
.activity-detail-dialog .dialog-actions { margin: 8px 0 0; padding: 12px 22px 18px; }
@media (max-width: 640px) {
  .activity-detail-hero .activity-detail-image { aspect-ratio: 4 / 3; min-height: 0; }
  .activity-detail-copy { padding: 14px 16px 4px; }
  .activity-detail-dialog .dialog-actions { padding: 12px 16px 16px; }
}

/* ---- v8: Plan page layout. The map runs full width; the itinerary sits below it and uses the width. */
#page-plan > .planner-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
#page-plan .globe-stage { min-height: 380px; height: clamp(380px, 52vh, 520px); }
#page-plan .plan-panel .point-list, #page-plan .plan-panel.has-selected .point-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
#page-plan .plan-panel .stop-activity-gallery.is-slim { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
#page-plan .plan-panel .stop-activity-card.is-slim { align-items: start; height: 100%; }
#page-plan .plan-panel .stop-activity-card.is-slim .stop-activity-description { -webkit-line-clamp: 2; }
#page-plan .plan-panel .stop-activity-chevron { align-self: center; }
#page-plan .plan-panel .activity-filters { margin-bottom: 14px; }
#page-plan .plan-panel .selected-detail { padding: 18px 20px; }
@media (max-width: 720px) {
  #page-plan .globe-stage { min-height: 320px; height: 46vh; }
  #page-plan .plan-panel .stop-activity-gallery.is-slim, #page-plan .plan-panel .point-list { grid-template-columns: minmax(0, 1fr); }
  #page-plan .plan-panel .selected-detail { padding: 13px; }
}

/* ---- v8.1: "Stops by date" stays on one row. Stops share the width; it scrolls sideways only when they can't fit. */
.route-timeline { display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.route-timeline-item { flex: 1 1 0; min-width: 112px; scroll-snap-align: start; }
.route-timeline-item:last-child { flex-grow: 1; }
.route-timeline-stop { padding: 8px 9px; gap: 5px; border-radius: 10px; }
.route-timeline-top { gap: 6px; }
.route-timeline-dot { flex: 0 0 22px; width: 22px; height: 22px; font-size: 11px; }
.route-timeline-date { font-size: 11px; }
.route-timeline-name { font-size: 13px; min-height: 2.5em; }
.route-timeline-stay { padding: 1px 7px; font-size: 10px; }
.route-timeline-connector { flex: 0 0 20px; }
.route-timeline-mode { width: 20px; height: 20px; font-size: 10px; border-width: 1.5px; }
@media (max-width: 620px) {
  .route-timeline { display: flex; grid-template-columns: none; }
  .route-timeline-item { flex: 0 0 136px; }
  .route-timeline-connector { flex-basis: 20px; }
}


/* ================================================================
   v9: Build your own.
   ================================================================ */
.build-frame { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.build-frame-end { padding: 6px 12px; border-radius: 999px; background: var(--teal); color: #262626; font-size: 13px; font-weight: 700; #262626-space: nowrap; }
.build-frame-mid { color: var(--muted); font-size: 13px; font-weight: 650; #262626-space: nowrap; }
.build-frame-line { flex: 1 1 20px; min-width: 12px; border-top: 2px dashed var(--line); }
.build-frame-note { margin: 6px 0 14px; }
.build-stats { margin-bottom: 12px; }
.build-meter { display: flex; gap: 3px; height: 30px; margin: 0 0 12px; border-radius: 10px; overflow: hidden; }
.build-meter-seg { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 0 6px; background: color-mix(in srgb, var(--teal) 22%, var(--paper)); color: var(--teal-deep); font-size: 11px; font-weight: 700; #262626-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-meter-seg:nth-child(even) { background: color-mix(in srgb, var(--teal) 34%, var(--paper)); }
.build-meter-seg.is-end { background: color-mix(in srgb, var(--gold) 34%, var(--paper)); color: #7f4c06; }
.build-meter-seg.is-over { background: color-mix(in srgb, var(--rose) 30%, var(--paper)); color: #ffa398; }
.build-warnings { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.build-warnings li { padding: 8px 12px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--gold) 12%, var(--paper)); font-size: 13px; line-height: 1.45; }
.build-warnings li.is-blocking { border-left-color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, var(--paper)); font-weight: 650; }
.build-ok { margin: 0 0 14px; padding: 8px 12px; border-left: 3px solid #1f8a5b; border-radius: 0 10px 10px 0; background: #131d18; color: #16653f; font-size: 13px; font-weight: 650; }
.build-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.build-name { flex: 1 1 280px; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 14px; }

.build-route { display: flex; flex-direction: column; }
.build-leg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 10px; align-items: center; margin: 0 0 0 26px; padding: 10px 12px 10px 14px; border-left: 2px dashed var(--line); color: var(--muted); font-size: 13px; }
.build-leg-icon { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 13px; }
.build-leg-main { color: var(--ink); font-weight: 650; }
.build-leg-note { font-size: 12px; line-height: 1.4; }
.build-leg.is-long .build-leg-main { color: #a8660b; }
.build-leg.is-missing .build-leg-main { color: #a34d48; }
.build-stop { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.build-stop.is-fixed { background: color-mix(in srgb, var(--teal) 5%, var(--paper)); }
.build-stop.is-open { border-color: var(--teal); }
.build-stop-head { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; }
.build-stop-photo, .build-option-photo, .build-activity-photo { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--tag, var(--teal)) 30%, var(--paper)), color-mix(in srgb, var(--tag, var(--teal)) 8%, var(--paper))); }
.build-stop-photo img, .build-option-photo img, .build-activity-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.build-stop-photo { width: 72px; height: 72px; border-radius: 12px; }
.build-stop-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.build-stop-index { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #262626; font-size: 12px; font-weight: 750; }
.build-stop-name { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.build-fixed-badge { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.build-stop-dates { margin: 3px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.build-stop-picked { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.build-stop-picked.is-over { color: #a8660b; font-weight: 650; }
.build-stop-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.build-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.build-step { width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.build-step:hover { background: color-mix(in srgb, var(--teal) 12%, var(--paper)); }
.build-step-value { min-width: 78px; padding: 0 8px; font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.build-step-value.is-auto { color: var(--muted); font-weight: 650; }
.build-activities { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.build-activities .activity-filters { margin: 12px 0; }
.build-activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.build-activity { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-left: 3px solid var(--tag, var(--line)); border-radius: 12px; background: var(--paper); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.build-activity:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24); }
.build-activity.is-on { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--paper)); box-shadow: inset 0 0 0 1px var(--teal); }
.build-activity input { position: absolute; opacity: 0; pointer-events: none; }
.build-activity:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.build-activity-photo { width: 64px; height: 64px; border-radius: 10px; }
.build-activity-photo .activity-photo-icon, .build-stop-photo .activity-photo-icon { font-size: 24px; }
.build-activity-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 58px; }
.build-activity-title { font-size: 14px; line-height: 1.25; }
.build-activity-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.build-activity-meta { margin: 0; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.build-activity-tip { margin: 0; color: var(--muted); font-size: 11px; font-style: italic; line-height: 1.4; }
.build-activity-check { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 700; }
.build-activity.is-on .build-activity-check { border-color: var(--teal); background: var(--teal); color: #262626; }

.build-stop-filters { margin-bottom: 4px; }
.build-region { margin: 18px 0 10px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.build-stop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.build-option { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.build-option:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.288); }
.build-option-photo { aspect-ratio: 16 / 8; }
.build-option-photo .activity-photo-icon { font-size: 40px; }
.build-option-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 12px 14px 14px; }
.build-option-name { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.build-option-text { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.build-option-facts { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink); }
.build-option-facts li.is-long { color: #a8660b; font-weight: 650; }
.build-option-body .secondary-button { margin-top: auto; align-self: flex-start; }
@media (max-width: 720px) {
  .build-frame { flex-wrap: wrap; }
  .build-frame-line { display: none; }
  .build-stop-head { grid-template-columns: 56px minmax(0, 1fr); }
  .build-stop-photo { width: 56px; height: 56px; }
  .build-stop-controls { grid-column: 1 / -1; justify-content: flex-start; }
  .build-activity-grid, .build-stop-grid { grid-template-columns: minmax(0, 1fr); }
  .build-leg { margin-left: 12px; }
}

/* ---- v10: option switcher. One button with the current option's full name; the list of all options opens below it. */
.projects-bar .project-list { overflow: visible; padding: 0; }
.project-switcher { position: relative; min-width: 0; max-width: 640px; }
.project-switcher-button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 12px 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer; list-style: none; box-shadow: inset 3px 0 var(--teal); }
.project-switcher-button::-webkit-details-marker { display: none; }
.project-switcher-button:hover, .project-switcher[open] .project-switcher-button { border-color: var(--teal); }
.project-switcher-name { flex: 1 1 auto; min-width: 0; overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 16px; text-overflow: ellipsis; #262626-space: nowrap; }
.project-switcher-count { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 12%, var(--paper)); color: var(--teal-deep); font-size: 11px; font-weight: 700; #262626-space: nowrap; }
.project-switcher-caret { flex: 0 0 auto; color: var(--muted); font-size: 12px; transition: transform .15s ease; }
.project-switcher[open] .project-switcher-caret { transform: rotate(180deg); }
.project-switcher-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; display: flex; flex-direction: column; gap: 6px; width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.528); }
.projects-bar .project-switcher-panel .project-card { flex: 0 0 auto; max-width: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 10px; }
.projects-bar .project-switcher-panel .project-select { flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px 0; cursor: pointer; }
.projects-bar .project-switcher-panel .project-card-name { display: block; max-width: 100%; font-size: 15px; line-height: 1.3; #262626-space: normal; text-wrap-mode: wrap; overflow: visible; }
.projects-bar .project-switcher-panel .project-card-meta { font-size: 12px; }
.projects-bar .project-switcher-panel .project-card-actions { position: static; display: flex; flex: 0 0 auto; gap: 4px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; min-width: 0; }
.projects-bar .project-switcher-panel .project-card-actions .mini-button { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.projects-bar .project-switcher-panel .project-card:hover { border-color: var(--teal); }
#selected-detail { scroll-margin-top: 84px; }
@media (max-width: 720px) {
  .project-switcher { max-width: none; width: 100%; }
  .projects-bar .project-switcher-panel .project-card { flex-wrap: wrap; }
  .projects-bar .project-switcher-panel .project-card-actions { width: 100%; }
}

/* v10.1: the map keeps the width of its card on phones (a fixed height must not drive the width), and the
   option switcher shows the whole name on narrow screens. */
#page-plan .globe-stage { aspect-ratio: auto; width: auto; max-width: 100%; }
@media (max-width: 720px) {
  .project-switcher-name { #262626-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 15px; line-height: 1.25; }
}

/* ---- Hand-tuned dark overrides (kept in scripts/build_dark_css.py) ---- */
/* The globe itself (basemap, backdrop and MapLibre controls) keeps its light look in both themes. */
html { background: #0f1517; }
input, select, textarea { color-scheme: dark; }
/* v6 status colours: the light theme's deep greens/ambers/blues are kept as accents by the remap,
   which leaves them too dark on dark tiles. */
.stat-tile.is-good { background: #12271c; border-color: #24503a; }
.stat-tile.is-good .stat-value, .budget-item.is-booked .budget-item-label, .tasks-cost.is-booked,
.tasks-item.status-booked .tasks-title::after { color: #7fd8a6; }
.stat-tile.is-warn { background: #2a2010; border-color: #5a4318; }
.stat-tile.is-warn .stat-value { color: #f3c77a; }
.booked-badge, .task-status-pill.booked { background: #163626; color: #8ee2b2; }
.booked-badge.is-partial, .task-status-pill.in-progress { background: #15283b; color: #9cc8f0; }
.task-status-pill.to-do { background: #33260f; color: #f3c77a; }
.task-status-pill.done { background: #26302d; color: #b9c9c4; }
.task-status-pill.cancelled { background: #3a1f1c; color: #f0aaa3; }
.itinerary-block.cat-travel .itinerary-title { color: #9cc8f0; }
.itinerary-stop-index, .tasks-group-index { background: #11a39b; color: #0f1517; }
.budget-row.is-booked { border-left-color: #3fbf7f; }
.budget-progress-fill { background: linear-gradient(90deg, #2fa874, #4fd08f); }
/* v7: tag colours stay vivid; chips need lighter text on dark surfaces. */
.activity-tag { background: color-mix(in srgb, var(--tag, #6b7b86) 24%, transparent); color: color-mix(in srgb, var(--tag, #6b7b86) 45%, #ffffff); }
.activity-filter.is-on, .route-timeline-stay.is-today { color: #0f1517; }
.route-timeline-stay.is-daytrip { color: #f3c77a; }
.route-timeline-stay { background: color-mix(in srgb, var(--teal) 26%, transparent); color: #9fe0d8; }
.route-timeline-stay.is-idea { background: transparent; color: #a9b8b8; }
.stop-activity-planned, .activity-detail-planned { background: color-mix(in srgb, var(--teal) 24%, transparent); color: #9fe0d8; }
.activity-detail-hero-text { background: linear-gradient(transparent, rgba(8, 16, 18, .86)); color: #ffffff; }
.activity-detail-hero-text h2 { color: #ffffff; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.activity-detail-dialog .dialog-heading .icon-button { background: rgba(16, 24, 24, .7); color: #ffffff; }
.activity-photo-credit, .activity-photo-credit a { background-color: rgba(16, 24, 24, .78); color: #ffffff; }
.activity-detail-tip { background: color-mix(in srgb, var(--gold) 16%, transparent); }
.project-switcher-panel { box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.project-switcher-count { background: color-mix(in srgb, var(--teal) 26%, transparent); color: #9fe0d8; }
/* v9: build page */
.build-frame-end, .build-stop-index, .build-activity.is-on .build-activity-check { color: #0f1517; }
.build-meter-seg { background: color-mix(in srgb, var(--teal) 30%, transparent); color: #9fe0d8; }
.build-meter-seg:nth-child(even) { background: color-mix(in srgb, var(--teal) 44%, transparent); }
.build-meter-seg.is-end { background: color-mix(in srgb, var(--gold) 34%, transparent); color: #f3c77a; }
.build-meter-seg.is-over { background: color-mix(in srgb, var(--rose) 40%, transparent); color: #f6c1bc; }
.build-warnings li { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.build-warnings li.is-blocking { background: color-mix(in srgb, var(--rose) 18%, transparent); }
.build-ok { background: #12271c; color: #7fd8a6; border-left-color: #3fbf7f; }
.build-leg.is-long .build-leg-main, .build-stop-picked.is-over, .build-option-facts li.is-long { color: #f3c77a; }
.build-leg.is-missing .build-leg-main { color: #f0aaa3; }
.route-timeline-stop:hover, .route-timeline-stop:focus-visible, .stop-activity-card.is-slim:hover { box-shadow: 0 8px 18px rgba(0, 0, 0, .4); }
