/* My trip plan. Layout: светлая travel-страница; герой с формой, карточки направлений, конструктор "список + карта" рядом на широком экране и друг под другом на телефоне. */
:root {
  --bg: #f5f6f0;
  --surface: #ffffff;
  --surface-2: #eef1e8;
  --ink: #15233f;
  --muted: #5d6779;
  --line: #dfe3d7;
  --accent: #2f7d5b;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe6;
  --btn-dark: #15233f;
  --btn-dark-ink: #ffffff;
  --warn: #a8501c;
  --warn-soft: #fbeee4;
  --sky-top: #cfe0ee;
  --sky-bottom: #f6e7d6;
  --hill-far: #b9d0bf;
  --hill-near: #8fb59d;
  --map-bg: #e8ece3;
  --shadow: 0 10px 30px rgba(21, 35, 63, .10);

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1520; --surface: #171f2d; --surface-2: #1d2738; --ink: #e8edf5; --muted: #9aa6b9; --line: #2a3549;
    --accent: #5fbf8f; --accent-ink: #0d1a14; --accent-soft: #1b3428; --btn-dark: #e3e9f3; --btn-dark-ink: #111a29;
    --warn: #f0a070; --warn-soft: #3a2518; --sky-top: #1a2a44; --sky-bottom: #3a2f3a; --hill-far: #1f3a32; --hill-near: #1a3029;
    --map-bg: #1b2433; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1520; --surface: #171f2d; --surface-2: #1d2738; --ink: #e8edf5; --muted: #9aa6b9; --line: #2a3549;
  --accent: #5fbf8f; --accent-ink: #0d1a14; --accent-soft: #1b3428; --btn-dark: #e3e9f3; --btn-dark-ink: #111a29;
  --warn: #f0a070; --warn-soft: #3a2518; --sky-top: #1a2a44; --sky-bottom: #3a2f3a; --hill-far: #1f3a32; --hill-near: #1a3029;
  --map-bg: #1b2433; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: .95rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-dark { background: var(--btn-dark); color: var(--btn-dark-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-ghost.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-wide { width: 100%; padding-block: 14px; font-size: 1rem; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--muted);
}
.icon-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }

/* Шапка */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 900; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; font-size: .78rem; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .nav { display: none; } .topbar-in { justify-content: space-between; gap: 12px; } }
.logo span { white-space: nowrap; }
@media (max-width: 420px) { .logo { font-size: 1rem; gap: 8px; } .logo svg { width: 30px; } }

/* Герой */
.hero { position: relative; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); overflow: hidden; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 56px 120px; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 700; margin-block: 12px 18px; }
.lead { font-size: 1.12rem; max-width: 34em; color: var(--ink); opacity: .86; }
.hand { font-family: var(--font-hand); font-size: 2.1rem; color: var(--accent); margin-top: 22px; transform: rotate(-4deg); transform-origin: left; display: inline-block; }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; gap: 28px; padding-block: 36px 110px; } .hand { display: none; } }

.planner { background: var(--surface); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 16px; min-width: 0; }
.planner-title { font-size: 1.1rem; font-weight: 500; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: .85rem; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.field > span { margin-bottom: 0; }
.field small { font-weight: 400; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-sm);
  padding: 11px 12px; font-size: 1rem; min-width: 0;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg label { position: relative; text-align: center; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 4px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--btn-dark); color: var(--btn-dark-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: .87rem; font-weight: 500; cursor: pointer; }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); }
.form-error { background: var(--warn-soft); color: var(--warn); border-radius: var(--r-sm); padding: 10px 12px; font-size: .92rem; }

/* Секции */
.section { padding-block: 56px; }
.section-head { display: grid; gap: 6px; margin-bottom: 24px; max-width: 46em; }
.section-head p { color: var(--muted); }

/* Направления */
.dest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dest {
  position: relative; text-align: left; border: 0; cursor: pointer; padding: 0; border-radius: var(--r-md); overflow: hidden;
  aspect-ratio: 4 / 5; max-width: 100%; color: #fff; background: var(--card-bg); box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.dest:hover { transform: translateY(-3px); }
.dest canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dest-body { position: absolute; inset: auto 0 0 0; padding: 16px; display: grid; gap: 4px; background: linear-gradient(180deg, transparent, rgba(8, 14, 28, .72)); }
.dest-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; hyphens: auto; }
.dest-meta { font-size: .82rem; opacity: .9; }
.dest-tag { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, .9); color: #15233f; font-size: .74rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .dest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .dest { aspect-ratio: 3 / 4; } .dest-name { font-size: .9rem; } .dest-body { padding: 12px; } }

/* Маршрут */
.route { background: var(--surface-2); border-block: 1px solid var(--line); }
.route-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.route-titles { min-width: 0; flex: 1 1 320px; display: grid; gap: 4px; }
.trip-title {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem);
  border: 0; border-bottom: 2px dashed transparent; background: transparent; padding: 2px 0; width: 100%; min-width: 0;
}
.trip-title:hover, .trip-title:focus { border-bottom-color: var(--line); outline: none; }
.route-dates { color: var(--muted); }
.route-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span { font-size: .84rem; color: var(--muted); }
.stat.good { background: var(--accent-soft); border-color: transparent; }
.stat.good b { color: var(--accent); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .9rem;
}
.tab small { font-weight: 400; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--btn-dark); color: var(--btn-dark-ink); border-color: var(--btn-dark); }
.tab[aria-selected="true"] small { color: inherit; opacity: .75; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }

.route-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.route-list { display: grid; gap: 24px; min-width: 0; }
.route-map { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); display: grid; gap: 10px; min-width: 0; }
.map {
  height: min(70vh, 620px); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background-color: var(--map-bg);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.map-note { font-size: .82rem; color: var(--muted); }
.map.picking { cursor: crosshair; }
.map.picking .leaflet-container { cursor: crosshair; }
@media (max-width: 960px) {
  .route-body { grid-template-columns: 1fr; }
  .route-map { position: static; order: -1; }
  .map { height: 380px; }
}

/* День */
.day-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; }
.day-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.day-head h3 { display: flex; align-items: center; gap: 10px; }
.day-sum { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.warn-line { background: var(--warn-soft); color: var(--warn); font-size: .88rem; border-radius: var(--r-sm); padding: 8px 12px; }
.optimize-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--accent-soft); border-radius: var(--r-sm); padding: 8px 12px; font-size: .9rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-point { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.tl-num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: .9rem; background: var(--c); font-variant-numeric: tabular-nums; margin-top: 2px;
}
.tl-num.home { background: var(--btn-dark); color: var(--btn-dark-ink); }
.tl-num.home svg { width: 16px; height: 16px; }
.tl-leg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.tl-leg::before { content: ""; justify-self: center; width: 2px; min-height: 30px; background: repeating-linear-gradient(var(--line) 0 5px, transparent 5px 9px); }
.tl-leg span { align-self: center; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.place { display: grid; gap: 4px; min-width: 0; padding-bottom: 2px; }
.place-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.place-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .88rem; color: var(--accent); }
.place-name { font-weight: 600; font-size: 1.02rem; }
.place-desc { font-size: .9rem; color: var(--muted); }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.place-ctrl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.place-ctrl select { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 5px 10px; font-size: .84rem; max-width: 100%; }
.tl-lunch .place-name { font-weight: 500; }
.tl-lunch .tl-num { background: var(--surface-2); color: var(--muted); }

.all-days { display: grid; gap: 12px; }
.all-day { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; display: grid; gap: 6px; }
.all-day:hover { border-color: var(--accent); }
.all-day-head { display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; }
.all-day-head .day-sum { margin-left: auto; }
.all-day ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: .9rem; columns: 2 220px; }
.empty-day { color: var(--muted); font-size: .92rem; padding: 6px 0; }

.extras { display: grid; gap: 12px; }
.extras-head { display: grid; gap: 2px; }
.extras-head p { font-size: .88rem; }
.extras-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.extra { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.extra-name { font-weight: 600; font-size: .95rem; }
.extra-meta { font-size: .8rem; color: var(--muted); }

.notes textarea { resize: vertical; background: var(--surface); }

/* Мои путешествия */
.trips-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.json-fallback { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 10px; margin-bottom: 16px; }
.trips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.trip-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: grid; gap: 8px; align-content: start; }
.trip-card h3 { font-size: 1rem; }
.trip-card .meta { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.trip-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.trip-card.current { border-color: var(--accent); }
.trips-empty { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 24px; color: var(--muted); }

/* Подвал */
.footer { padding-block: 32px; border-top: 1px solid var(--line); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-in > div { max-width: 40em; display: grid; gap: 6px; }
.footer-logo { font-family: var(--font-display); }
.footer p { font-size: .9rem; color: var(--muted); }

/* Тост */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%);
  background: var(--btn-dark); color: var(--btn-dark-ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  transition: transform .25s ease, visibility .25s; z-index: 1000; max-width: calc(100% - 32px); text-align: center; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* Карта: маркеры */
.pin {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #fff; font: 700 13px/1 var(--font-body); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.pin-home { background: #15233f; }
.pin-home svg { width: 15px; height: 15px; }
.leaflet-container { font-family: var(--font-body); background: var(--map-bg); }
.leaflet-popup-content { margin: 12px 14px; }
.popup-name { font-weight: 700; font-size: .95rem; margin-bottom: 2px; }
.popup-meta { font-size: .8rem; color: #5d6779; margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: brightness(.75) contrast(1.1) saturate(.8); } }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.75) contrast(1.1) saturate(.8); }

/* Печать */
@media print {
  .topbar, .hero, #destinations, #trips, .footer, .route-map, .route-actions, .tabs, .extras, .place-ctrl, .optimize-line, .toast, body::before { display: none !important; }
  .route { background: #fff; border: 0; }
  .route-body { display: block; }
  .day-card { break-inside: avoid; border-color: #ccc; margin-bottom: 12px; }
  body { background: #fff; color: #000; }
}

/* AI-гид */
.ai-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; margin-bottom: 20px; display: grid; gap: 14px;
  background-image: radial-gradient(120% 80% at 100% 0%, var(--accent-soft), transparent 60%);
}
.ai-head { display: flex; align-items: center; gap: 14px; }
.ai-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--btn-dark); color: var(--btn-dark-ink); flex: none; }
.ai-titles { display: grid; gap: 2px; min-width: 0; }
.ai-status { font-size: .88rem; color: var(--muted); max-width: 70ch; }
.ai-status.off { background: var(--warn-soft); color: var(--warn); border-radius: var(--r-sm); padding: 10px 12px; }
.ai-status code { font-size: .85em; }
.ai-form { display: grid; gap: 10px; }
.ai-form textarea { background: var(--bg); resize: vertical; }
.ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-progress { font-size: .9rem; color: var(--muted); }
.ai-progress.err { color: var(--warn); }
.ai-progress.busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; vertical-align: -1px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-summary { font-size: .95rem; max-width: 75ch; }
.ai-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ai-results:empty { display: none; }
.ai-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: grid; gap: 6px; align-content: start; background: var(--surface); min-width: 0; }
.ai-card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-card h4 { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.ai-meta { font-size: .85rem; color: var(--muted); }
.ai-why { font-size: .9rem; }
.ai-card a { color: var(--accent); font-weight: 600; font-size: .88rem; }
.ai-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.ai-add select { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 6px 10px; font-size: .84rem; max-width: 100%; }
.ai-add .muted { font-size: .82rem; }
.tag-ok { background: var(--accent-soft); color: var(--accent); }
.tag-check { background: var(--warn-soft); color: var(--warn); }
.tag-ai { background: var(--btn-dark); color: var(--btn-dark-ink); }
.ai-sources summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.ai-sources ul { margin: 8px 0 0; padding-left: 20px; font-size: .85rem; display: grid; gap: 4px; }
.ai-sources a { color: var(--accent); overflow-wrap: anywhere; }
.ai-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .88rem; align-items: center; }
.ai-links a { color: var(--accent); font-weight: 600; }

/* Вечер в дне */
.evening { border: 1px dashed var(--accent); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 4px; background: var(--accent-soft); }
.evening-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.evening a { color: var(--accent); font-weight: 600; font-size: .88rem; }
.evening .warn-line { margin-top: 4px; }
.place-desc a { color: var(--accent); font-weight: 600; }
.pin-star { background: var(--c); }
.pin-star svg { width: 15px; height: 15px; }
@media print { .ai-panel { display: none !important; } }
.chip-btn { border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: .82rem; padding: 5px 10px; background: var(--bg); color: var(--ink); }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.ai-web { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.ai-web input { margin-top: 3px; accent-color: var(--accent); }
.ai-status.web { background: var(--accent-soft); color: var(--ink); border-radius: var(--r-sm); padding: 10px 12px; }
