/* ===== Гъз път да види! — стилове ===== */
:root {
  --bg: #eef1f0; --card: #ffffff; --card-a: rgba(255, 255, 255, 0.9); --ink: #17202a; --muted: #5b6672; --line: #dfe3e6; --soft: #f4f6f7;
  --accent: #0b6e69; --accent-2: #0e8a83; --accent-ink: #ffffff; --peach: #f0612e; --peach-2: #ff8a3d;
  --warn: #92560a; --warn-bg: #fff5e3; --err: #b42318; --ok-bg: #e7f6ec; --ok: #157a3a; --bad-bg: #fdecea; --chip: #e4f1f0;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 28px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .22); --focus: 0 0 0 3px rgba(14, 138, 131, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418; --card: #182027; --card-a: rgba(24, 32, 39, 0.9); --ink: #e9edf0; --muted: #a3adb6; --line: #2b353e; --soft: #1e2830;
    --accent: #3cc0b6; --accent-2: #5dd3c9; --accent-ink: #061513; --warn: #f3b860; --warn-bg: #33281a; --err: #ff8a80;
    --ok-bg: #15301f; --ok: #6fd391; --bad-bg: #3a1d1b; --chip: #1d3532; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); background: var(--bg); color: var(--ink); min-height: 100vh; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
/* iOS Safari: полетата за дата не трябва да излизат извън колоната и да са със същата височина като останалите */
input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---- анимиран фон: снимки от забележителности (Ken Burns + плавно преливане) ---- */
.bg-stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #0d1b1f; }
.bg-layer { position: absolute; inset: -6%; background: center / cover no-repeat; opacity: 0; will-change: opacity, transform;
  transition: opacity 2.6s ease-in-out, transform 18s linear; }
.bg-layer.on { opacity: 1; }
.bg-shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 20, 24, .55) 0%, rgba(6, 20, 24, .25) 30%, rgba(6, 20, 24, .45) 70%, rgba(6, 20, 24, .75) 100%); }
@media (prefers-reduced-motion: reduce) { .bg-layer { transition: opacity 1s; transform: none !important; } }

/* ---- горна лента ---- */
.topbar { padding-top: env(safe-area-inset-top); position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  background: rgba(8, 26, 30, .55); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; min-width: 0; }
.brand:hover { color: #fff; }
.brand img { flex: none; width: 40px; height: 40px; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.brand-name { font-size: 1.05rem; line-height: 1.2; }
.lang { flex: none; display: flex; gap: 2px; background: rgba(255, 255, 255, .12); padding: 3px; border-radius: 999px; }
.lang button { min-height: 34px; border: 0; background: transparent; color: rgba(255, 255, 255, .85); font: 600 .8rem var(--font); padding: 6px 11px; border-radius: 999px; cursor: pointer; letter-spacing: .03em; }
.lang button:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.lang button[aria-current="true"] { background: #fff; color: #0b3d3a; }

/* ---- заглавна част ---- */
.hero { color: #fff; padding: 56px 0 28px; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.hero-in { display: flex; align-items: center; gap: 28px; }
.hero-in > div { min-width: 0; overflow-wrap: break-word; }
/* Рамка около логото и заглавието — същата „стъклена“ карта като формата, но в тъмен морскозелен нюанс (за бял текст) */
.hero-card { background: linear-gradient(135deg, rgba(8, 62, 60, .78), rgba(11, 110, 105, .62));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .hero-card { background: linear-gradient(135deg, rgba(6, 40, 42, .82), rgba(12, 84, 80, .66)); border-color: rgba(255, 255, 255, .10); } }
.hero-logo { width: 132px; height: 132px; border-radius: 32px; object-fit: cover; flex: none; box-shadow: var(--shadow-lg); border: 3px solid rgba(255,255,255,.85); }
.hero h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; }
.tagline { margin: 6px 0 0; font-size: clamp(1.1rem, 2.2vw, 1.45rem); font-weight: 600; color: #ffd8c2; }
.hero-sub { margin: 10px 0 0; max-width: 640px; color: rgba(255, 255, 255, .88); }

/* ---- карти ---- */
.card { overflow-wrap: break-word; background: var(--card-a); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius); padding: 28px; margin: 20px 0; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .card { border-color: rgba(255, 255, 255, .06); } }
#results .card { background: var(--card); }
.card-sm { padding: 18px 22px; margin: 0; }
details.card-sm { padding: 8px 22px; }
details.card-sm[open] { padding-bottom: 18px; }
.card-title { margin: 0 0 6px; font-size: 1.6rem; }
.card h2 { margin-top: 0; }

/* ---- форма ---- */
.step { padding: 18px 0 6px; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.08rem; flex-wrap: wrap; }
.step-title small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .85rem; font-weight: 700; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; color: var(--ink); }
label small, legend small { font-weight: 400; color: var(--muted); }
input, select, button, textarea { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); transition: border-color .15s, box-shadow .15s; min-height: 44px; font-weight: 400;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 18px; }
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 8px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; margin: 4px 16px 12px 0; cursor: pointer; }
.hint { color: var(--muted); font-size: .88rem; margin: 4px 0 12px; }
.note { color: var(--muted); font-size: .88rem; }

/* чипове за избор (чекбоксове/радио) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; }
.chips label, .tag-check { position: relative; margin: 0; font-weight: 500; cursor: pointer; }
.chips label input, .tag-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label span, .tag-check span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: .88rem; transition: background .15s, border-color .15s, color .15s; user-select: none; }
.chips label:hover span, .tag-check:hover span { border-color: var(--accent); }
.chips input:checked + span, .tag-check input:checked + span { background: var(--chip); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chips input:checked + span::before, .tag-check input:checked + span::before { content: "✓"; font-weight: 700; }
.chips input:focus-visible + span, .tag-check input:focus-visible + span { box-shadow: var(--focus); }

details.filters { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 16px; background: color-mix(in srgb, var(--soft) 60%, transparent); }
details.filters[open] { padding-bottom: 12px; }
details summary { cursor: pointer; font-weight: 600; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "›"; display: inline-block; transition: transform .2s; font-size: 1.3em; line-height: 1; color: var(--accent); }
details[open] > summary::before { transform: rotate(90deg); }
details summary small { font-weight: 400; color: var(--muted); }

.dest-picker { display: flex; gap: 8px; margin-top: 6px; }
.dest-picker .btn { flex: none; }
.dest-picker input { margin-top: 0 !important; }
.dest-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.dest-list li { display: grid; grid-template-columns: minmax(130px, auto) 1fr auto; gap: 10px; align-items: center; background: var(--chip); border-radius: var(--radius-sm); padding: 8px 12px; }
.dest-list input { margin: 0 !important; }

.travellers { display: grid; gap: 10px; margin-bottom: 10px; }
.traveller { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.traveller .t-label { font-weight: 600; min-width: 74px; }
.traveller input.t-age { width: 110px !important; margin: 0 !important; display: inline-block !important; }
.traveller .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.traveller .rm { margin-left: auto; }

.fuel-calc { margin-top: 6px; padding: 16px 18px 4px; border-radius: var(--radius-sm); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--card); }
.fuel-title { margin: 0 0 2px; font-size: 1.05rem; }

/* ---- бутони ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 10px 18px; min-height: 44px; cursor: pointer;
  border: 1px solid transparent; font-weight: 600; transition: transform .08s, box-shadow .15s, background .15s, filter .15s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; min-height: 52px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(11, 110, 105, .30); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-accent { background: linear-gradient(135deg, var(--peach), var(--peach-2)); color: #fff; box-shadow: 0 6px 18px rgba(240, 97, 46, .32); }
.btn-accent:hover { filter: brightness(1.06); color: #fff; }
.btn-secondary { background: var(--card); color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--chip); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px dashed var(--accent); }
.btn-ghost:hover { background: var(--chip); }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.btn-icon { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.btn-icon:hover { color: var(--err); background: var(--bad-bg); }
button:disabled { opacity: .55; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.cta-hint { flex-basis: 100%; margin: 4px 0 0; }

.progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--chip); color: var(--ink); font-size: .92rem; }
.spinner { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: var(--err); min-height: 1.2em; margin: 8px 0 0; font-weight: 500; }
.notice { background: var(--warn-bg); border-left: 4px solid var(--warn); padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; color: var(--ink); text-shadow: none; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; align-items: start; margin: 20px 0; }

/* ---- резултати ---- */
.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; margin: 10px 0; }
.overview > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--soft); }
.overview strong { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.res-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.res-head h2 { margin: 0; font-size: 1.5rem; }
.badge-src { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--accent); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding: 4px; background: var(--soft); border-radius: 12px; }
.tabs button { flex: none; border: 0; background: none; padding: 9px 14px; cursor: pointer; color: var(--muted); border-radius: 9px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--card) 70%, transparent); }
.tabs button[aria-selected=true] { color: var(--accent); background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tab-panel { padding-top: 18px; }

.map { height: 460px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 10px 0; z-index: 0; }
.pin span { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; color: #fff; font: 700 12px var(--font); border: 3px solid; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.popup { font: 13px/1.45 var(--font); }

.day { position: relative; border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin: 22px 0; }
.day h4 { margin: 0 0 6px; font-size: 1.1rem; }
.day h4 small { color: var(--muted); font-weight: 500; }
.slot { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line); }
/* minmax(0, …) + min-width: 0 — колоната с описанието не се разширява по съдържанието (дълги адреси, снимки, линкове) извън екрана */
.slot > *, .day > * { min-width: 0; }
.slot time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; font-size: .92rem; }
.seq-box { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-bottom: 4px; }
.seq { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 700; }
.seq-all { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.slot .tag { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--accent); margin-right: 6px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.slot .tag.ai { background: linear-gradient(135deg, var(--peach), var(--peach-2)); color: #fff; }
.slot-pics { float: right; margin: 0 0 6px 12px; max-width: 260px; }
.pics-wrap { margin: 6px 0; }
.pics { display: flex; gap: 6px; flex-wrap: wrap; min-height: 20px; }
.pics img { width: 124px; height: 86px; object-fit: cover; border-radius: 8px; display: block; background: var(--chip); transition: transform .2s; }
.pics a:hover img { transform: scale(1.03); }
.sight .pics img, .stay .pics img { width: calc((100% - 12px) / 3); min-width: 70px; }
.sight .pics a, .stay .pics a { flex: 1 1 30%; }
.sight .pics a img, .stay .pics a img { width: 100%; }
.pics-more { font-size: .8rem; }
.pics a.official img { outline: 2px solid var(--accent); outline-offset: 1px; }
.old-price { color: var(--warn); font-size: .85rem; }
.notice.alt ol { margin: 6px 0 0; padding-left: 20px; }
.contacts { padding-left: 4px; list-style: none; }
.contacts li { margin: 4px 0; }
.move { font-size: .8rem; color: var(--muted); margin-bottom: 3px; }
.price { margin-top: 3px; }
.discount { color: var(--ok); font-size: .88rem; }
.desc { font-size: .92rem; margin: 4px 0; }
.mini-links { font-size: .85rem; margin-top: 6px; clear: both; }

.links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.links a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; font-size: .9rem; background: var(--card); transition: border-color .15s, background .15s; }
.links a:hover { border-color: var(--accent); background: var(--chip); }
.leg { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.tbl { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.tbl th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.visa { border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0; border-left: 5px solid var(--warn); background: var(--warn-bg); }
.visa-ok { border-color: var(--ok); background: var(--ok-bg); }
.visa-bad { border-color: var(--err); background: var(--bad-bg); }
.visa h3 { margin: 0 0 4px; }
.visa-status { font-weight: 700; font-size: 1.05rem; margin: 4px 0; }
.car { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 16px; margin-top: 12px; }
.fuel-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0; background: var(--soft); }
.fuel-box h3 { margin: 0 0 8px; font-size: 1.05rem; }

.stays, .sights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 14px; }
.stay, .sight { border: 1px solid var(--line); border-radius: 14px; padding: 14px; position: relative; background: var(--card); transition: box-shadow .2s, border-color .2s; }
.stay:hover, .sight:hover { box-shadow: var(--shadow); }
.stay.main { border-color: var(--accent); }
.stay h4, .sight h4 { margin: 0 0 4px; padding-right: 70px; }
.badge { position: absolute; top: 10px; right: 10px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.amen { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; list-style: none; }
.amen li { background: var(--chip); border-radius: 999px; padding: 2px 8px; font-size: .78rem; }

.modal { max-width: 760px; width: calc(100% - 32px); border: 0; border-radius: var(--radius); background: var(--card); color: var(--ink); padding: 0; box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(6, 14, 18, .6); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-head .close { border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); border-radius: 8px; padding: 0 8px; }
.modal-body { padding: 14px 18px; max-height: 75vh; overflow-y: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.gallery img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.gallery .note { grid-column: 1 / -1; }
.modal video { width: 100%; border-radius: 8px; }
.raw { white-space: pre-wrap; font-size: .8rem; max-height: 60vh; overflow: auto; }

.conn { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; }
.conn.main { border-color: var(--accent); }
.tier { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8em; background: #eee; color: #333; }
.tier-budget { background: #dff3e6; color: #145a32; } .tier-mid { background: #e3ecfa; color: #1b3d75; } .tier-lux { background: #f6e7c9; color: #6b4a0c; }
.slot time sup, .tbl sup { font-size: .7em; color: #b4541a; }

/* проверка на данните */
.vf { font-size: .86rem; border-radius: 8px; padding: 7px 12px; margin: 6px 0; border-left: 4px solid var(--line); }
.vf ul { margin: 4px 0; padding-left: 18px; }
.vf-ok { border-color: var(--ok); color: var(--muted); padding: 2px 12px; }
.vf-fixed { border-color: var(--accent); background: var(--chip); }
.vf-miss { border-color: var(--warn); background: var(--warn-bg); }
.vf-closed { border-color: var(--err); background: var(--bad-bg); }
.vf-help { margin-top: 4px; }
.vf-help > div { margin-top: 2px; }
.vf-tag { color: var(--warn); font-weight: 600; font-size: .85rem; }
.vf-sum { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0; background: var(--soft); }
.vf-sum h3 { margin: 0 0 4px; }
.vf-count { display: inline-block; border-radius: 999px; padding: 2px 10px; margin: 2px 4px 2px 0; font-size: .85rem; border-left: 0; }
.vf-count.vf-ok { background: var(--ok-bg); color: var(--ok); }
.vf-count.vf-miss { background: var(--warn-bg); color: var(--warn); }
.vf-count.vf-closed { background: var(--bad-bg); color: var(--err); }

/* ---- долен колонтитул ---- */
.site-footer { color: rgba(255, 255, 255, .82); font-size: .86rem; padding: 28px 0 36px; margin-top: 30px; background: linear-gradient(180deg, transparent, rgba(4, 14, 17, .6)); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.site-footer a { color: #9ff0e8; }
.site-footer details summary { padding: 4px 0; color: #fff; }
.site-footer details summary::before { color: #9ff0e8; }
.credit { font-weight: 700; color: #fff; text-align: center; margin-top: 22px; font-size: 1rem; letter-spacing: .02em; }

@media (max-width: 720px) {
  .wrap { padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
  /* горна лента: името остава видимо, при нужда на 2 реда; езиците са компактни, но с достатъчна зона за докосване */
  .topbar-in { min-height: 56px; gap: 10px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .brand-name { font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lang button { padding: 6px 9px; font-size: .78rem; min-width: 36px; min-height: 36px; }
  /* заглавна карта: логото над текста, центрирано */
  .hero { padding: 20px 0 6px; }
  .hero-in { flex-direction: column; text-align: center; gap: 14px; }
  .hero-card { padding: 22px 18px; border-radius: 14px; }
  .hero-logo { width: 88px; height: 88px; border-radius: 24px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .hero-sub { margin-left: auto; margin-right: auto; font-size: .95rem; }
  .card { padding: 20px 16px; border-radius: 14px; margin: 14px 0; }
  .card-title { font-size: 1.35rem; }
  .card-sm { margin: 0; }
  details.card-sm { padding: 6px 16px; }
  details.card-sm[open] { padding-bottom: 16px; }
  .settings { grid-template-columns: 1fr; margin: 14px 0; gap: 14px; }
  .dest-list li { grid-template-columns: 1fr auto; }
  .dest-list li input { grid-column: 1 / -1; grid-row: 2; }
  /* пътник: име и „×“ на първия ред, възрастта под тях, отстъпките — най-отдолу */
  .traveller { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label rm" "age age" "tags tags"; gap: 8px 10px; align-items: center; }
  .traveller .t-label { grid-area: label; }
  .traveller input.t-age { grid-area: age; width: 100% !important; }
  .traveller .tags { grid-area: tags; }
  .traveller .rm { grid-area: rm; margin-left: 0; }
  .fuel-calc { padding: 14px 14px 2px; }
  .slot { grid-template-columns: 54px minmax(0, 1fr); }
  .slot-pics { float: none; margin: 6px 0; max-width: none; }
  .pics img { width: 96px; height: 68px; }
  .map { height: 340px; }
  .cta .btn-lg, .actions .btn { flex: 1 1 100%; }
  .tabs { margin: 0 -4px; }
  .tabs button { padding: 9px 12px; }
  .res-head h2 { font-size: 1.3rem; }
  .stay h4, .sight h4 { padding-right: 0; }
  .stay:has(> .badge) h4, .sight:has(> .badge) h4 { margin-top: 22px; }
  .modal { width: calc(100% - 16px); }
  .modal-body { max-height: 80vh; }
}
@media (max-width: 720px) {
  /* таблици → карти: всеки ред е карта, всяка клетка — „етикет: стойност“ */
  .tbl.stack { display: block; overflow: visible; }
  .tbl.stack thead { display: none; }
  .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 10px; padding: 8px 12px; background: var(--card); }
  .tbl.stack td { border: 0; padding: 5px 0; display: grid; grid-template-columns: minmax(84px, 36%) 1fr; gap: 10px; align-items: baseline; overflow-wrap: anywhere; }
  .tbl.stack td::before { content: attr(data-label); font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .tbl.stack td:not([data-label])::before { content: none; }
  .tbl.stack td:not([data-label]) { display: block; }
  .tbl.stack td:first-child { font-size: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 2px; }
}
@media (max-width: 480px) {
  .dest-picker { flex-direction: column; }
  .dest-picker .btn { width: 100%; }
}
@media (max-width: 380px) {
  .lang button { padding: 6px 7px; min-width: 32px; }
  .brand-name { font-size: .85rem; }
  .chips label span, .tag-check span { padding: 7px 11px; }
}
@media print {
  .bg-stage, .topbar, .hero, form, .settings, .tabs, .site-footer details, .site-footer p:not(.credit), .map, .mini-links, .vf-help, .pics-wrap { display: none !important; }
  .tab-panel[hidden] { display: block !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 0; backdrop-filter: none; background: #fff; }
  .credit { color: #000; text-shadow: none; }
}
