/* =========================================================
   Den ♡ Doris — «Белые ночи» (светлая) и «Ночь над Невой» (тёмная)
   ========================================================= */
:root {
  --bg: #fbf5f0;
  --bg-2: #f4e9e2;
  --surface: rgba(255, 255, 255, .78);
  --surface-strong: rgba(255, 255, 255, .92);
  --surface-solid: #ffffff;
  --glass-border: rgba(255, 255, 255, .7);
  --ink: #2b2231;
  --ink-soft: #5f5566;
  --muted: #948a99;
  --line: rgba(80, 50, 70, .10);
  --rose: #e0607e;
  --rose-ink: #b93d5c;
  --rose-soft: rgba(224, 96, 126, .13);
  --lav: #8b78e6;
  --lav-ink: #5a47b8;
  --lav-soft: rgba(139, 120, 230, .14);
  --peach: #ff9f7a;
  --mint: #2fa07f;
  --mint-ink: #1d7159;
  --mint-soft: rgba(47, 160, 127, .14);
  --gold: #e3a83a;
  --gold-ink: #8a6112;
  --gold-soft: rgba(227, 168, 58, .16);
  --den: #8b78e6;
  --doris: #e0607e;
  --grad: linear-gradient(115deg, #e0607e 0%, #c76bc8 45%, #8b78e6 100%);
  --grad-warm: linear-gradient(120deg, #ff9f7a, #e0607e 55%, #c76bc8);
  --grad-soft: linear-gradient(135deg, rgba(224, 96, 126, .14), rgba(139, 120, 230, .14));
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(70, 30, 60, .05), 0 4px 14px rgba(70, 30, 60, .06);
  --shadow: 0 2px 6px rgba(70, 30, 60, .05), 0 18px 40px rgba(70, 30, 60, .12);
  --shadow-glow: 0 10px 30px rgba(224, 96, 126, .35);
  --font: "Nunito", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --hand: "Caveat", "Nunito", cursive;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --map-filter: saturate(.55) sepia(.12) brightness(1.04) contrast(.95);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #100d1a;
  --bg-2: #181327;
  --surface: rgba(32, 26, 48, .72);
  --surface-strong: rgba(36, 29, 54, .9);
  --surface-solid: #1f1930;
  --glass-border: rgba(255, 255, 255, .08);
  --ink: #f4edf8;
  --ink-soft: #cbc1d6;
  --muted: #8e85a0;
  --line: rgba(255, 255, 255, .08);
  --rose: #ff7d9c;
  --rose-ink: #ff9bb4;
  --rose-soft: rgba(255, 125, 156, .16);
  --lav: #a996ff;
  --lav-ink: #c4b6ff;
  --lav-soft: rgba(169, 150, 255, .16);
  --mint: #4fd1a8;
  --mint-ink: #7fe3c3;
  --mint-soft: rgba(79, 209, 168, .14);
  --gold: #f5c15a;
  --gold-ink: #f7d488;
  --gold-soft: rgba(245, 193, 90, .15);
  --den: #a996ff;
  --doris: #ff7d9c;
  --grad: linear-gradient(115deg, #ff7d9c 0%, #d58cf0 45%, #a996ff 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-glow: 0 10px 34px rgba(255, 125, 156, .35);
  --map-filter: invert(.92) hue-rotate(185deg) saturate(.55) brightness(.92) contrast(.88);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  transition: background-color .6s ease, color .4s ease;
}
html:lang(zh-Hant) body { font-family: "Nunito", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
::selection { background: var(--rose); color: #fff; }

#ambient { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.topbar, .toolbar, main { position: relative; z-index: 1; }

/* Картинки проявляются мягко */
img { transition: opacity .6s ease, filter .8s ease, transform .9s var(--ease-out); }
.fade-img { opacity: 0; filter: blur(12px); }
.fade-img.loaded { opacity: 1; filter: none; }
.shimmer {
  background: linear-gradient(100deg, var(--bg-2) 30%, color-mix(in srgb, var(--bg-2) 60%, #fff) 50%, var(--bg-2) 70%) var(--bg-2);
  background-size: 250% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

/* Волна от нажатия */
.btn, .vbtn, .chip, .seg button, .icon-btn, .hotel-card, .swipe-btn { position: relative; overflow: hidden; isolation: isolate; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 70%);
  transform: scale(0); animation: ripple .65s var(--ease-out) forwards;
}
:root[data-theme="dark"] .ripple { background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 70%); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 8000; }
.burst { position: fixed; transform: translate(-50%, -50%); will-change: transform, opacity; line-height: 1; }

/* ---------- Шапка ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  padding: 8px 10px 8px 18px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: var(--shadow-sm);
  animation: dropIn .9s var(--ease-out) both;
}
@keyframes dropIn { from { transform: translateY(-24px); opacity: 0; } }
.brand { min-width: 0; }
.brand-names {
  font-family: var(--hand);
  font-size: 34px;
  line-height: .95;
  font-weight: 700;
  white-space: nowrap;
}
.brand-names .nm {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: gradShift 6s ease-in-out infinite alternate;
}
@keyframes gradShift { to { background-position: 100% 0; } }
.brand-heart { color: var(--rose); display: inline-block; animation: beat 1.8s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(224, 96, 126, .5)); }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.28); } 80% { transform: scale(.95); } 90% { transform: scale(1.14); } }
.brand-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* Отсчёт с перелистыванием */
.countdown {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cd-label { color: var(--muted); font-size: 13px; white-space: nowrap; font-style: italic; font-family: var(--serif); font-size: 17px; }
.cd-cells { display: flex; gap: 8px; align-items: flex-end; }
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.cd-unit small { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cd-digits { display: flex; gap: 2px; }
.flip {
  position: relative; display: inline-block; width: 22px; height: 32px;
  perspective: 300px; font: 800 20px/32px var(--font); font-variant-numeric: tabular-nums; text-align: center;
}
.flip-cur, .flip-next {
  position: absolute; inset: 0; border-radius: 7px;
  background: linear-gradient(180deg, var(--surface-solid) 50%, color-mix(in srgb, var(--surface-solid) 92%, #000) 50%);
  box-shadow: 0 1px 0 var(--line), 0 3px 8px rgba(70, 30, 60, .10);
  color: var(--ink);
  backface-visibility: hidden;
}
.cd-unit.days .flip-cur, .cd-unit.days .flip-next { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.flip-next { transform: rotateX(90deg); opacity: 0; }
.flip.go .flip-cur { animation: flipOut .24s ease-in forwards; }
.flip.go .flip-next { animation: flipIn .24s .24s ease-out forwards; }
@keyframes flipOut { to { transform: rotateX(-90deg); } }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 1; } to { transform: rotateX(0); opacity: 1; } }
.cd-sep { font-weight: 800; color: var(--muted); padding-bottom: 20px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.cd-done { padding: 4px 14px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 18px; }

.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-strong); display: grid; place-items: center; font-size: 18px;
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.icon-btn:hover { transform: rotate(-12deg) scale(1.08); box-shadow: var(--shadow-sm); }
.icon-btn[aria-pressed="false"] { filter: grayscale(1); opacity: .55; }
#themeToggle span { grid-area: 1 / 1; transition: transform .6s var(--ease-spring), opacity .4s; }
#themeToggle .moon { transform: translateY(26px) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] #themeToggle .sun { transform: translateY(-26px) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] #themeToggle .moon { transform: none; opacity: 1; }

.seg {
  position: relative;
  display: inline-flex;
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg-ind {
  position: absolute; left: 3px; top: 3px; bottom: 3px; width: 0; border-radius: 999px; opacity: 0;
  background: var(--surface-solid); box-shadow: var(--shadow-sm);
  transition: transform .55s var(--ease-spring), width .55s var(--ease-spring), opacity .3s;
}
.seg button {
  position: relative; z-index: 1;
  border: 0; background: transparent;
  padding: 7px 15px; border-radius: 999px;
  font-weight: 800; color: var(--ink-soft); white-space: nowrap;
  transition: color .3s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button.active { color: var(--ink); }
.mode-tabs button[aria-selected="true"] { color: var(--rose-ink); }
.me-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px 8px 8px; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap;
  background: var(--surface-strong); border: 1px solid var(--line);
}
.me-badge .avatar { width: 24px; height: 24px; }

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%;
  width: 22px; height: 22px; font-size: 11px; font-weight: 900; color: #fff; flex: none;
  box-shadow: 0 0 0 2px var(--surface-solid);
}
.avatar.den { background: linear-gradient(135deg, #b3a4ff, #7a64e0); }
.avatar.doris { background: linear-gradient(135deg, #ff9fb5, #e0607e); }

/* ---------- Панель инструментов ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  overflow-x: auto;
  scrollbar-width: none;
  animation: dropIn .9s .08s var(--ease-out) both;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar > * { flex-shrink: 0; }
.toolbar .seg { background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.mode-tabs .count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; margin-left: 2px;
  animation: popIn .5s var(--ease-spring);
}
@keyframes popIn { from { transform: scale(0); } }
.filters { display: flex; gap: 8px; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: 14px; white-space: nowrap;
  color: var(--ink-soft);
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-spring);
}
.chip:hover { transform: translateY(-1px); }
.chip.toggle[aria-pressed="true"] { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 35%, transparent); color: var(--mint-ink); }
#placesToggle[aria-pressed="true"] { background: var(--lav-soft); border-color: color-mix(in srgb, var(--lav) 35%, transparent); color: var(--lav-ink); }
.price-chip output { min-width: 86px; font-variant-numeric: tabular-nums; }
.price-chip input {
  -webkit-appearance: none; appearance: none; width: 120px; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--rose) 0 var(--p, 50%), var(--line) var(--p, 50%) 100%);
  outline: none;
}
.price-chip input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 3px solid var(--rose); box-shadow: 0 2px 8px rgba(224, 96, 126, .5); cursor: grab;
  transition: transform .2s var(--ease-spring);
}
.price-chip input::-webkit-slider-thumb:active { transform: scale(1.3); }
.price-chip input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); }

/* ---------- Основная область ---------- */
main { flex: 1; min-height: 0; }
.view { height: 100%; }
.view-map {
  display: grid;
  grid-template-columns: minmax(330px, 410px) 1fr;
  position: relative;
  padding: 0 0 max(0px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.map-wrap { position: relative; padding: 0 max(14px, env(safe-area-inset-right)) 14px 14px; min-height: 0; }
#map {
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
}
.map-wrap::after {
  content: ""; position: absolute; inset: 0 max(14px, env(safe-area-inset-right)) 14px 14px; border-radius: 28px;
  pointer-events: none; z-index: 500;
  box-shadow: inset 0 0 80px color-mix(in srgb, var(--bg) 65%, transparent);
}
#map .leaflet-tile-pane { filter: var(--map-filter); transition: filter .8s ease; }
.leaflet-container { font-family: var(--font); background: var(--bg-2); }

/* ---------- Список отелей ---------- */
.hotel-list {
  overflow-y: auto;
  padding: 2px 8px 18px 2px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  perspective: 1200px;
}
.list-head { color: var(--muted); font-size: 13px; padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.list-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.list-empty { color: var(--muted); padding: 28px; text-align: center; background: var(--surface); border-radius: var(--radius); }
.hotel-card {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
  flex-shrink: 0;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-out), box-shadow .4s, border-color .3s;
}
.hotel-card.tilting { transition: transform .08s linear, box-shadow .3s; }
.hotel-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .45), transparent 45%);
  opacity: 0; transition: opacity .3s; mix-blend-mode: soft-light;
}
.hotel-card.tilting::after { opacity: 1; }
.hotel-card:hover, .hotel-card.hover { box-shadow: var(--shadow); }
.hotel-card.hover:not(.tilting) { transform: translateY(-3px); }
.hotel-card.active { border-color: transparent; box-shadow: 0 0 0 2px var(--rose), var(--shadow-glow); }
.hc-photo { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.hc-photo img { width: 100%; height: 100%; object-fit: cover; }
.hotel-card:hover .hc-photo img { transform: scale(1.07); }
.hc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20, 10, 25, .35)); pointer-events: none; }
.hc-price {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  background: rgba(255, 255, 255, .92); color: #2b2231; backdrop-filter: blur(8px);
  border-radius: 999px; padding: 4px 12px; font-weight: 900; font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  transform: translateZ(30px);
}
.hc-price small { font-weight: 700; color: #8b8190; }
.hc-badges { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 2; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .92); color: #2b2231; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 800;
  backdrop-filter: blur(8px); box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}
.badge.cook { background: rgba(223, 245, 237, .95); color: #1d7159; }
.badge.winner { background: linear-gradient(135deg, #f7d27a, #e3a83a); color: #fff; animation: glowGold 2s ease-in-out infinite; }
.badge.match { background: linear-gradient(135deg, #ff9fb5, #c76bc8); color: #fff; }
@keyframes glowGold { 50% { box-shadow: 0 0 18px rgba(227, 168, 58, .8); } }
.hc-body { padding: 13px 16px 15px; }
.hc-name { font-weight: 900; font-size: 16.5px; line-height: 1.25; margin: 0 0 5px; }
.hc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-soft); font-size: 13px; }
.rating { font-weight: 900; color: var(--ink); white-space: nowrap; }
.rating::before { content: "★ "; color: var(--gold); }
.hc-icons { margin-top: 9px; display: flex; gap: 4px; flex-wrap: wrap; font-size: 15px; }
.hc-icons span, .room-icons span {
  background: color-mix(in srgb, var(--bg-2) 70%, transparent); border-radius: 9px; padding: 2px 6px;
  transition: transform .3s var(--ease-spring);
}
.hc-icons span:hover, .room-icons span:hover { transform: translateY(-3px) scale(1.2); }

/* ---------- Метки на карте ---------- */
.pin-icon { background: none; border: 0; }
.pin {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -100%);
  background: var(--surface-solid); color: var(--ink);
  border-radius: 999px; padding: 5px 11px;
  font: 900 13px/1.2 var(--font);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(60, 20, 50, .25);
  border: 2px solid var(--surface-solid);
  transition: transform .35s var(--ease-spring), background .25s, color .25s, box-shadow .3s;
  cursor: pointer;
}
.pin.drop { animation: pinDrop .8s var(--ease-spring) both; animation-delay: var(--d, 0s); }
@keyframes pinDrop {
  0% { transform: translate(-50%, -260%) scale(.6); opacity: 0; }
  60% { transform: translate(-50%, -92%) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -100%) scale(1); }
}
.pin::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--surface-solid); border-bottom: 0;
  transition: border-color .25s;
}
.pin .cook { margin-right: 3px; }
.pin.hover, .pin.active { background: var(--rose); color: #fff; border-color: var(--rose); transform: translate(-50%, -100%) scale(1.14); z-index: 5; box-shadow: var(--shadow-glow); }
.pin.hover::after, .pin.active::after { border-top-color: var(--rose); }
.pin.active::before {
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 16px; height: 8px; margin-left: -8px;
  border-radius: 50%; background: var(--rose); opacity: .5; animation: ping 1.6s ease-out infinite;
}
@keyframes ping { from { transform: scale(1); opacity: .6; } to { transform: scale(4.5); opacity: 0; } }
.pin.winner { background: linear-gradient(135deg, #f7d27a, #e3a83a); color: #fff; border-color: #f0bd55; }
.pin.winner::after { border-top-color: #e3a83a; }
.pin.match { background: linear-gradient(135deg, #ff9fb5, #c76bc8); color: #fff; border-color: #f39bb0; }
.pin.match::after { border-top-color: #d77ac2; }
.poi {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px;
  background: var(--surface-solid); border: 2px solid color-mix(in srgb, var(--lav) 40%, #fff);
  box-shadow: 0 4px 14px rgba(60, 20, 80, .25);
  transition: transform .35s var(--ease-spring);
  animation: bob 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.poi:hover { transform: translate(-50%, -50%) scale(1.25) rotate(-8deg); }
@keyframes bob { 50% { translate: 0 -5px; } }
.leaflet-popup-content-wrapper { border-radius: 20px; padding: 0; overflow: hidden; box-shadow: var(--shadow); background: var(--surface-solid); color: var(--ink); }
.leaflet-popup-tip { background: var(--surface-solid); }
.leaflet-popup { animation: popupIn .45s var(--ease-spring); }
@keyframes popupIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.leaflet-popup-content { margin: 0; width: 270px !important; font: 14px/1.45 var(--font); color: var(--ink); }
.leaflet-container a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); top: 8px; right: 8px; font-size: 22px; }
.place-pop .pp-img { overflow: hidden; aspect-ratio: 16 / 10; }
.place-pop img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1.18); } }
.place-pop .pp-body { padding: 12px 16px 14px; }
.place-pop h4 { margin: 0 0 4px; font: 700 21px/1.1 var(--serif); }
.place-pop p { margin: 0; color: var(--ink-soft); }
.place-pop .credit { margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.leaflet-control-attribution { font-size: 10px; border-radius: 10px 0 0 0; background: var(--surface) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--lav-ink); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-sm) !important; border-radius: 14px !important; overflow: hidden; margin: 0 16px 22px 0 !important; }
.leaflet-control-zoom a { background: var(--surface-strong) !important; color: var(--ink) !important; border-color: var(--line) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }

/* ---------- Выезжающая карточка отеля ---------- */
.drawer {
  position: absolute;
  top: 0; right: max(14px, env(safe-area-inset-right)); bottom: 14px;
  width: min(580px, calc(100% - 28px));
  background: var(--surface-strong);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(60, 20, 50, .3);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.drawer.opening { animation: drawerIn .6s var(--ease-out) both; }
@keyframes drawerIn { from { transform: translateX(40px) scale(.98); opacity: 0; } }
.drawer-close {
  position: sticky; top: 14px; float: right; margin: 14px 14px -54px 0; z-index: 6;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: #2b2231; box-shadow: var(--shadow-sm); font-size: 18px;
  transition: transform .4s var(--ease-spring);
}
.drawer-close:hover { transform: rotate(90deg) scale(1.1); }
.hero { position: relative; overflow: hidden; }
.gallery { position: relative; background: var(--bg-2); }
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 4 / 3;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.hero .gallery-track { will-change: transform; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(20, 8, 25, .35) 0%, transparent 22%, transparent 45%, rgba(20, 8, 25, .78) 100%); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 24px 22px; color: #fff; pointer-events: none; }
.hero-text .d-title { color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.hero-text .d-kicker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-text .badge { pointer-events: auto; }
.gallery-dots { position: absolute; top: 18px; left: 22px; right: 70px; display: flex; gap: 4px; }
.gallery-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .4); overflow: hidden; }
.gallery-dots i.on { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .8); }
.gallery-nav {
  position: absolute; top: 45%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: #2b2231; box-shadow: var(--shadow-sm); font-size: 24px; line-height: 1;
  opacity: 0; transition: opacity .3s, transform .3s var(--ease-spring);
}
.gallery:hover .gallery-nav, .gallery:focus-within .gallery-nav { opacity: 1; }
.gallery-nav:hover { transform: translateY(-50%) scale(1.12); }
@media (hover: none) { .gallery-nav { display: none; } }
.gallery-prev { left: 14px; } .gallery-next { right: 14px; }
.drawer-body { padding: 20px 24px 34px; }
.d-title { font: 700 34px/1.05 var(--serif); margin: 0; letter-spacing: -.01em; }
html:lang(zh-Hant) .d-title { font-family: "Noto Serif TC", var(--serif); font-size: 28px; }
.d-sub { color: var(--ink-soft); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; }
.d-sub > * { min-width: 0; overflow-wrap: anywhere; }
.d-sub a { color: var(--lav-ink); font-weight: 800; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s var(--ease-out); }
.d-sub a:hover { background-size: 100% 1.5px; }
.price-box {
  position: relative; overflow: hidden;
  margin: 18px 0; padding: 16px 18px; border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.price-box::before {
  content: ""; position: absolute; inset: -50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, .35) 80%, transparent 90%);
  animation: spin 7s linear infinite;
}
:root[data-theme="dark"] .price-box::before { background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, .06) 80%, transparent 90%); }
@keyframes spin { to { transform: rotate(1turn); } }
.price-box > div { position: relative; min-width: 0; }
.price-box b { display: block; font-size: 22px; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-box .total b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-box span { color: var(--ink-soft); font-size: 12px; }
.price-box .mop { display: block; color: var(--ink-soft); font-size: 12px; }
.price-note { grid-column: 1 / -1; color: var(--ink-soft); font-size: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font: italic 600 24px/1.1 var(--serif); color: var(--ink); margin: 28px 0 12px;
}
html:lang(zh-Hant) .section-title { font: 700 18px/1.2 "Noto Serif TC", var(--serif); }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.amenities { display: flex; flex-wrap: wrap; gap: 7px; }
.amenity {
  background: color-mix(in srgb, var(--bg-2) 75%, transparent); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700;
  transition: transform .3s var(--ease-spring), background .3s;
}
.amenity:hover { transform: translateY(-2px); background: var(--surface-solid); }
.amenity.hl { background: var(--mint-soft); color: var(--mint-ink); border-color: transparent; }
.note {
  position: relative;
  margin-top: 20px; background: var(--gold-soft); border-radius: 6px 20px 20px 20px;
  padding: 14px 18px 14px 20px; font-family: var(--hand); font-size: 24px; line-height: 1.2; color: var(--gold-ink);
  transform: rotate(-.6deg);
  box-shadow: 0 8px 20px rgba(227, 168, 58, .12);
}
.note::before { content: ""; position: absolute; top: -8px; left: 22px; width: 56px; height: 16px; background: color-mix(in srgb, var(--rose) 35%, transparent); transform: rotate(-4deg); border-radius: 2px; }
html:lang(zh-Hant) .note { font-family: var(--font); font-size: 15px; line-height: 1.6; }
.desc p { margin: 0 0 10px; color: var(--ink-soft); }
.desc.clamped p:not(:first-child) { display: none; }
.link-btn { border: 0; background: none; color: var(--lav-ink); font-weight: 800; padding: 0; }
.nearby { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.near { background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; font-size: 13px; transition: transform .4s var(--ease-spring), box-shadow .3s; }
.near:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow); }
.near .ni { aspect-ratio: 4 / 3; overflow: hidden; }
.near img { width: 100%; height: 100%; object-fit: cover; }
.near:hover img { transform: scale(1.1); }
.near div.nt { padding: 7px 10px 9px; }
.near b { display: block; line-height: 1.2; }
.near span { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.fx-off .reveal { opacity: 1; transform: none; }

/* ---------- Номер ---------- */
.room {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 14px;
  transition: border-color .3s, box-shadow .4s, transform .4s var(--ease-out);
}
.room:hover { box-shadow: var(--shadow); }
.room.both-like { border-color: transparent; box-shadow: 0 0 0 2px var(--rose), 0 10px 30px rgba(224, 96, 126, .2); }
.room.both-like::before {
  content: "💞"; position: absolute; top: -12px; right: 16px; font-size: 22px;
  animation: floaty 2.6s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-5px) rotate(8deg); } }
.room-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; scroll-snap-type: x proximity; }
.room-thumbs::-webkit-scrollbar { display: none; }
.room-thumbs .rt { flex: 0 0 auto; width: 128px; height: 92px; border-radius: 12px; overflow: hidden; scroll-snap-align: start; }
.room-thumbs img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.room-thumbs .rt:hover img { transform: scale(1.12); }
.room-name { font-weight: 900; margin: 0; font-size: 15.5px; }
.room-meta { color: var(--ink-soft); font-size: 13px; }
.room-icons { font-size: 15px; margin: 7px 0 0; display: flex; gap: 4px; flex-wrap: wrap; }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.room-price b { font-size: 20px; font-weight: 900; }
.room-price small { color: var(--muted); }

.vote-box { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vbtn {
  border: 1.5px solid var(--line); background: var(--surface-solid); border-radius: 999px;
  padding: 7px 13px; font-weight: 900; font-size: 14px;
  transition: transform .35s var(--ease-spring), background .25s, border-color .25s, color .25s, box-shadow .3s;
}
.vbtn:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--rose); box-shadow: var(--shadow-sm); }
.vbtn:active:not(:disabled) { transform: scale(.94); }
.vbtn.like.on { background: var(--grad-warm); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }
.vbtn.nope.on { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--bg); }
.vbtn.cmp.on { background: var(--lav-soft); border-color: color-mix(in srgb, var(--lav) 40%, transparent); color: var(--lav-ink); }
.vbtn:disabled { opacity: .5; }
.who {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800;
  padding: 3px 10px 3px 3px; border-radius: 999px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); white-space: nowrap;
}
.who.none { color: var(--muted); }
.who.none .avatar { filter: grayscale(.8); opacity: .6; }
.who .mark { display: inline-block; }
.who .mark.pop { animation: popIn .5s var(--ease-spring); }

/* ---------- Страницы ---------- */
.view-page { overflow-y: auto; padding: 0 max(14px, env(safe-area-inset-right)) calc(50px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); scrollbar-width: thin; }
.page { max-width: 1200px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 6px 0 20px; }
.page-title {
  font: 700 54px/1 var(--serif); margin: 0; letter-spacing: -.02em;
}
.page-title em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
html:lang(zh-Hant) .page-title { font: 700 36px/1.15 "Noto Serif TC", var(--serif); }
.page-hint { color: var(--ink-soft); margin: 8px 0 0; max-width: 660px; }
.stepper { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.step { padding: 7px 16px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); transition: all .4s; }
.step.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
.step-line { width: 34px; height: 2px; background: linear-gradient(90deg, var(--rose), var(--lav)); border-radius: 2px; opacity: .5; }
.progress-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; align-items: stretch; }
.progress {
  flex: 1 1 230px; background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 11px 16px; box-shadow: var(--shadow-sm);
}
.progress-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }
.bar { height: 9px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 999px; transition: width .9s var(--ease-out); position: relative; overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: sheen 2.2s ease-in-out infinite; }
@keyframes sheen { to { transform: translateX(100%); } }
.bar i.den { background: linear-gradient(90deg, #b3a4ff, #7a64e0); }
.bar i.doris { background: linear-gradient(90deg, #ff9fb5, #e0607e); }
.btn {
  border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 900; background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-spring), opacity .2s, box-shadow .3s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .4; }
.btn.ghost { background: var(--surface-strong); color: var(--ink); border: 1px solid var(--line); }
.btn.rose, .btn.glow { background: var(--grad); background-size: 180% 100%; color: #fff; box-shadow: var(--shadow-glow); animation: gradShift 4s ease-in-out infinite alternate; }
.btn.gold { background: linear-gradient(135deg, #f7d27a, #e3a83a); color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; perspective: 1400px; }
.vcard {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative;
  background: var(--surface-strong); border: 1px solid var(--glass-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity .4s, box-shadow .4s, transform .5s var(--ease-out), filter .4s;
}
.vcard.tilting { transition: transform .08s linear, box-shadow .3s; }
.vcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.4), transparent 45%);
  opacity: 0; transition: opacity .3s; mix-blend-mode: soft-light;
}
.vcard.tilting::after { opacity: 1; }
.vcard:hover { box-shadow: var(--shadow); }
.vcard.voted-nope { opacity: .5; filter: grayscale(.6); }
.vcard.both-like { box-shadow: 0 0 0 2px var(--rose), var(--shadow-glow); }
.vcard.picked-me { box-shadow: 0 0 0 3px var(--gold), 0 14px 40px rgba(227, 168, 58, .35); }
.vcard .cover { position: relative; aspect-ratio: 4 / 3; cursor: zoom-in; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.vcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.vcard:hover .cover img { transform: scale(1.08); }
.vcard .cover .badge { position: absolute; left: 10px; top: 10px; z-index: 2; }
.vcard .cover .photos-count { left: auto; top: auto; right: 10px; bottom: 10px; background: rgba(30, 15, 35, .65); color: #fff; }
.vbody { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.vhotel { color: var(--muted); font-size: 13px; font-weight: 800; }
.vroom { font-weight: 900; line-height: 1.25; font-size: 15.5px; }
.vfoot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.vfoot .vote-box { justify-content: space-between; }
.big-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.big-votes .vbtn { padding: 10px; font-size: 15px; }
.others { display: flex; gap: 6px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.empty-state .big-emoji { font-size: 56px; display: block; margin-bottom: 8px; animation: floaty 3s ease-in-out infinite; }
.layout-toggle { margin-left: auto; }

/* ---------- Свайпы ---------- */
.swipe-wrap { display: grid; justify-items: center; gap: 18px; padding-bottom: 20px; }
.swipe-hint { color: var(--muted); font-size: 13.5px; text-align: center; max-width: 520px; }
.deck { position: relative; width: min(440px, 100%); aspect-ratio: 3 / 4.25; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.swipe-card {
  position: absolute; inset: 0; border-radius: 30px; overflow: hidden;
  background: #1c1422; box-shadow: 0 30px 60px rgba(40, 10, 40, .35);
  transform-origin: 50% 90%;
  will-change: transform;
  touch-action: none;
}
.swipe-card[data-depth="1"] { transform: translateY(18px) scale(.95); filter: brightness(.9); }
.swipe-card[data-depth="2"] { transform: translateY(36px) scale(.9); filter: brightness(.8); }
.swipe-card .sc-photo { position: absolute; inset: 0; }
.swipe-card .sc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; pointer-events: none; }
.swipe-card .sc-photo img.on { opacity: 1; }
.swipe-card .sc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 18%, transparent 45%, rgba(15, 5, 20, .88) 100%); pointer-events: none; }
.swipe-card .sc-bars { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; gap: 4px; z-index: 2; }
.swipe-card .sc-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.swipe-card .sc-bars i.on { background: #fff; }
.swipe-card .sc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px 22px; color: #fff; z-index: 2; pointer-events: none; }
.swipe-card .sc-hotel { font-weight: 800; opacity: .85; font-size: 14px; }
.swipe-card .sc-room { font: 700 30px/1.05 var(--serif); margin: 4px 0 8px; }
html:lang(zh-Hant) .swipe-card .sc-room { font: 700 24px/1.2 "Noto Serif TC", var(--serif); }
.swipe-card .sc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.swipe-card .sc-meta .pill { background: rgba(255,255,255,.18); backdrop-filter: blur(8px); border-radius: 999px; padding: 3px 10px; font-weight: 800; }
.swipe-card .sc-price { font-size: 26px; font-weight: 900; margin-top: 10px; }
.swipe-card .sc-price small { font-size: 13px; opacity: .8; font-weight: 700; }
.swipe-card .sc-icons { margin-top: 8px; font-size: 17px; display: flex; gap: 4px; flex-wrap: wrap; }
.stamp {
  position: absolute; top: 46px; z-index: 3; padding: 6px 18px; border: 5px solid; border-radius: 14px;
  font: 900 40px/1 var(--font); letter-spacing: .05em; opacity: 0; pointer-events: none; text-transform: uppercase;
}
.stamp.like { left: 26px; color: #ff6f94; border-color: #ff6f94; transform: rotate(-16deg); text-shadow: 0 0 20px rgba(255, 111, 148, .6); }
.stamp.nope { right: 26px; color: #c9c1d6; border-color: #c9c1d6; transform: rotate(16deg); }
.swipe-actions { display: flex; align-items: center; gap: 18px; }
.swipe-btn {
  width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 28px;
  background: var(--surface-solid); box-shadow: var(--shadow); display: grid; place-items: center;
  transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.swipe-btn:hover:not(:disabled) { transform: scale(1.12); }
.swipe-btn:active:not(:disabled) { transform: scale(.92); }
.swipe-btn.small { width: 48px; height: 48px; font-size: 20px; }
.swipe-btn.like { background: var(--grad-warm); color: #fff; box-shadow: var(--shadow-glow); width: 76px; height: 76px; font-size: 34px; }
.swipe-btn:disabled { opacity: .4; }
.swipe-left { font-weight: 800; color: var(--muted); font-size: 13px; }

/* ---------- Финал и победитель ---------- */
.winner-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) 1fr; overflow: hidden;
  background: var(--surface-strong); border-radius: 30px; box-shadow: 0 20px 60px rgba(227, 168, 58, .3); margin-bottom: 24px;
  isolation: isolate;
}
.winner-hero::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; padding: 3px;
  background: conic-gradient(from var(--ang, 0deg), #f7d27a, #e0607e, #8b78e6, #f7d27a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAng 4s linear infinite;
}
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spinAng { to { --ang: 360deg; } }
.winner-hero .wh-photo { position: relative; overflow: hidden; min-height: 280px; }
.winner-hero .wh-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 12s ease-out both; }
.winner-hero .rays { position: absolute; inset: -60%; background: repeating-conic-gradient(rgba(255, 230, 160, .22) 0 8deg, transparent 8deg 22deg); animation: spin 30s linear infinite; mix-blend-mode: screen; pointer-events: none; }
.winner-hero .wh-body { padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.winner-hero .crown { font-size: 58px; line-height: 1; animation: crownDrop 1.1s var(--ease-spring) both, floaty 3s 1.1s ease-in-out infinite; transform-origin: bottom; }
@keyframes crownDrop { from { transform: translateY(-80px) rotate(-30deg) scale(.4); opacity: 0; } }
.winner-hero h3 { margin: 0; font: 700 36px/1.05 var(--serif); }
html:lang(zh-Hant) .winner-hero h3 { font: 700 28px/1.2 "Noto Serif TC", var(--serif); }
.banner { background: var(--lav-soft); color: var(--lav-ink); border-radius: var(--radius-sm); padding: 13px 18px; margin-bottom: 18px; font-weight: 800; border: 1px solid var(--line); }
.banner.warn { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- Сравнение ---------- */
.cmp-scroll { overflow-x: auto; background: var(--surface-strong); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.cmp-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 11px 15px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-size: 14px; }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr { transition: background .25s; }
.cmp-table tbody tr:hover { background: color-mix(in srgb, var(--rose) 5%, transparent); }
.cmp-table th[scope="row"] { position: sticky; left: 0; background: var(--surface-solid); color: var(--muted); font-weight: 800; width: 180px; white-space: nowrap; z-index: 1; }
.cmp-table td { min-width: 210px; }
.cmp-table .cmp-photo .cover { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.cmp-table .cmp-photo img { width: 100%; height: 100%; object-fit: cover; }
.cmp-table .cmp-photo .cover:hover img { transform: scale(1.08); }
.cmp-table .best { background: var(--mint-soft); position: relative; }
.cmp-table .best::after { content: "✦ " attr(data-best); display: block; font-size: 11px; color: var(--mint-ink); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.cmp-table b { font-weight: 900; }
.cmp-col-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Поездка ---------- */
.trip-hero {
  position: relative; text-align: center; padding: 34px 20px 30px; margin: 4px 0 26px;
  border-radius: 34px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.trip-hero .kicker { font: italic 600 22px/1.2 var(--serif); color: var(--ink-soft); }
.trip-hero .names { font: 700 clamp(56px, 9vw, 110px)/1 var(--hand); margin: 6px 0 10px; }
.trip-hero .names .nm { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 5s ease-in-out infinite alternate; }
.trip-hero .names .h { color: var(--rose); display: inline-block; animation: beat 1.6s ease-in-out infinite; }
.big-count { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 6px; }
.big-count .cd-unit small { font-size: 12px; margin-top: 6px; }
.big-count .flip { width: 44px; height: 64px; font-size: 40px; line-height: 64px; }
.big-count .flip-cur, .big-count .flip-next { border-radius: 12px; }
.trip-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.trip-map-card { position: sticky; top: 0; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--glass-border); height: min(620px, 70vh); }
#tripMap { width: 100%; height: 100%; background: var(--bg-2); }
#tripMap .leaflet-tile-pane { filter: var(--map-filter); }
.route-line { stroke-dasharray: 10 12; animation: dash 1.2s linear infinite; filter: drop-shadow(0 0 6px rgba(224, 96, 126, .6)); }
@keyframes dash { to { stroke-dashoffset: -22; } }
.city-label { background: none; border: 0; }
.city-label div {
  transform: translate(-50%, -50%); white-space: nowrap; font: 700 22px/1 var(--serif);
  background: var(--surface-strong); color: var(--ink); padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow);
  position: absolute; left: 0; top: 0; border: 1px solid var(--glass-border);
}
.city-label div::before { content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px; margin: 6px 0 0 -6px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft), 0 0 20px var(--rose); }
.train-icon { background: none; border: 0; }
.train-icon div { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font-size: 30px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--rose), var(--lav)); opacity: .5; }
.chapter { position: relative; margin-bottom: 22px; }
.chapter::before {
  content: ""; position: absolute; left: -31px; top: 22px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--surface-solid); border: 4px solid var(--rose); box-shadow: 0 0 0 5px var(--rose-soft);
}
.chapter-card { background: var(--surface-strong); border: 1px solid var(--glass-border); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .5s var(--ease-out), box-shadow .4s; }
.chapter-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.chapter-photo { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.chapter-photo img { width: 100%; height: 100%; object-fit: cover; }
.chapter-card:hover .chapter-photo img { transform: scale(1.06); }
.chapter-photo .cp-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(15, 5, 20, .75)); }
.chapter-photo .cp-text { position: absolute; left: 20px; right: 20px; bottom: 14px; color: #fff; }
.chapter-photo .cp-kicker { font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.chapter-photo h3 { margin: 2px 0 0; font: 700 40px/1 var(--serif); }
html:lang(zh-Hant) .chapter-photo h3 { font: 700 30px/1.2 "Noto Serif TC", var(--serif); }
.chapter-body { padding: 16px 20px 20px; display: grid; gap: 12px; }
.chapter-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chapter-status { display: flex; gap: 12px; align-items: center; background: var(--grad-soft); border-radius: 18px; padding: 10px; }
.chapter-status img { width: 84px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.chapter-status .cs-t { min-width: 0; }
.chapter-status .cs-t b { display: block; }
.place-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.place-chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--lav-soft); color: var(--lav-ink); font-weight: 800; font-size: 13px; border: 0; transition: transform .3s var(--ease-spring); }
.place-chip:hover { transform: translateY(-2px) scale(1.04); }
.travel-seg { margin: -6px 0 18px; display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-weight: 800; font-size: 14px; }
.travel-seg .train { font-size: 24px; display: inline-block; animation: chug 1.2s ease-in-out infinite; }
@keyframes chug { 50% { transform: translateX(6px); } }
.budget-card { background: var(--grad); color: #fff; border-radius: 26px; padding: 20px 24px; box-shadow: var(--shadow-glow); position: relative; overflow: hidden; }
.budget-card::after { content: "♡"; position: absolute; right: -10px; bottom: -50px; font-size: 180px; opacity: .15; line-height: 1; }
.budget-card .bc-label { font-weight: 800; opacity: .9; }
.budget-card .bc-sum { font-size: 44px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.budget-card .bc-note { font-size: 12.5px; opacity: .85; }

/* ---------- Совпадение! ---------- */
.match-modal {
  position: fixed; inset: 0; z-index: 7000; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(224, 96, 126, .55), rgba(40, 12, 45, .92));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.match-inner { text-align: center; color: #fff; max-width: 480px; width: 100%; }
.match-title { font: 700 clamp(60px, 13vw, 96px)/1 var(--hand); text-shadow: 0 6px 40px rgba(255, 120, 160, .8); margin: 0; }
.match-sub { font-weight: 700; opacity: .9; margin: 6px 0 18px; }
.match-avatars { display: flex; justify-content: center; align-items: center; gap: 0; margin: 10px 0 20px; }
.match-avatars .avatar { width: 92px; height: 92px; font-size: 36px; box-shadow: 0 0 0 5px rgba(255,255,255,.9), 0 10px 40px rgba(0,0,0,.35); }
.match-avatars .mh { font-size: 46px; margin: 0 -12px; z-index: 2; filter: drop-shadow(0 4px 16px rgba(255, 90, 140, .9)); }
.match-photo { width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); border: 4px solid #fff; transform: rotate(-2deg); }
.match-photo img { width: 100%; height: 100%; object-fit: cover; }
.match-room { font: 700 26px/1.15 var(--serif); margin: 16px 0 4px; }
.match-modal .actions { justify-content: center; margin-top: 18px; }
.match-modal .btn.ghost { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- Заставка ---------- */
.intro {
  position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--bg) 40%, transparent), var(--bg) 75%);
  overflow: hidden;
}
.intro-inner { text-align: center; width: min(760px, 100%); }
.intro-kicker { font: italic 600 clamp(18px, 2.4vw, 26px)/1.2 var(--serif); color: var(--ink-soft); }
.intro-names { font: 700 clamp(72px, 14vw, 170px)/.95 var(--hand); margin: 8px 0 0; }
.intro-names .ch { display: inline-block; background: var(--grad); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-names .heart { color: var(--rose); display: inline-block; margin: 0 .12em; filter: drop-shadow(0 0 24px rgba(224, 96, 126, .7)); }
.intro-route { width: min(620px, 100%); height: auto; overflow: visible; margin: 0 auto; display: block; }
.intro-route path { fill: none; stroke-width: 4; stroke-linecap: round; }
#introPathBg { stroke: var(--line); stroke-dasharray: 4 10; }
#introPath { stroke: url(#routeGrad); }
.intro-route .city-dot { fill: var(--surface-solid); stroke: var(--rose); stroke-width: 4; }
.intro-route text { font: 700 22px var(--serif); fill: var(--ink); }
.intro-days { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 4px 0 26px; }
.intro-days b { font: 900 clamp(48px, 8vw, 84px)/1 var(--font); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.intro-days span { font: italic 600 clamp(20px, 2.6vw, 28px)/1 var(--serif); color: var(--ink-soft); }
.intro-go { font-size: 18px; padding: 15px 30px; }
.intro-skip { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 20px; background: none; border: 0; color: var(--muted); font-weight: 800; }
.intro-skip:hover { color: var(--ink); }

/* ---------- Лайтбокс ---------- */
.lightbox { position: fixed; inset: 0; z-index: 6000; background: rgba(16, 8, 20, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: flex; flex-direction: column; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; } }
.lb-track { flex: 1; min-height: 0; display: flex; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track figure { flex: 0 0 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; padding: 60px 16px 10px; }
.lb-track img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: zoomIn .5s var(--ease-out); }
@keyframes zoomIn { from { transform: scale(.9); opacity: 0; } }
.lb-thumbs { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); scrollbar-width: none; }
.lb-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; opacity: .45; cursor: pointer; flex: none; transition: opacity .3s, transform .3s var(--ease-spring); }
.lb-thumbs img.on { opacity: 1; transform: scale(1.1); box-shadow: 0 0 0 2px #fff; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; border-radius: 50%; width: 48px; height: 48px; font-size: 22px; z-index: 2; transition: background .3s, transform .3s var(--ease-spring); }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.28); transform: scale(1.1); }
.lb-close { top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-nav { top: 45%; font-size: 32px; }
.lb-nav:hover { transform: scale(1.1); }
@media (hover: none) { .lb-nav { display: none; } }
.lb-counter { position: absolute; top: calc(24px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 800; opacity: .8; }

.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px) scale(.9);
  background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 800;
  opacity: 0; pointer-events: none; transition: all .45s var(--ease-spring); z-index: 9800; max-width: calc(100% - 32px); text-align: center;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- View Transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
.vt-mode::view-transition-old(root) { animation: vtOut .35s ease both; }
.vt-mode::view-transition-new(root) { animation: vtIn .55s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: blur(4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
::view-transition-group(hero) { animation-duration: .6s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(hero), ::view-transition-new(hero) { height: 100%; object-fit: cover; }

/* ---------- Эффекты выключены ---------- */
.fx-off *, .fx-off *::before, .fx-off *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
.fx-off .hotel-card, .fx-off .vcard { transform: none !important; }

/* ---------- Планшет / телефон ---------- */
@media (max-width: 1180px) {
  .brand-sub { display: none; }
  .cd-label { display: none; }
  .price-chip input { width: 90px; }
  .trip-grid { grid-template-columns: 1fr; }
  .trip-map-card { position: relative; height: 380px; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; border-radius: 28px; padding: 10px 12px 10px 16px; }
  .brand-names { font-size: 30px; }
  .countdown { order: 3; margin: 0; width: 100%; justify-content: center; }
  .top-right { margin-left: auto; }
  .toolbar { flex-wrap: wrap; overflow: visible; }
  .filters { margin-left: 0; flex-wrap: wrap; }
  .view-map { grid-template-columns: 1fr; grid-template-rows: 1fr auto; padding: 0; }
  .map-wrap { padding: 0 12px; grid-row: 1; }
  .map-wrap::after { inset: 0 12px; }
  #map { border-radius: 24px; }
  .hotel-list {
    grid-row: 2; flex-direction: row; overflow-x: auto; overflow-y: hidden;
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 12px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .hotel-list::-webkit-scrollbar { display: none; }
  .list-head { display: none; }
  .hotel-card { width: 280px; scroll-snap-align: start; }
  .hc-photo { aspect-ratio: 16 / 8.5; }
  .hc-icons { display: none; }
  .drawer {
    position: fixed; inset: 0; width: 100%; border-radius: 0; bottom: 0; right: 0; border: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--bg);
  }
  .drawer.opening { animation: sheetUp .55s var(--ease-out) both; }
  @keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } }
  .drawer-close { top: calc(14px + env(safe-area-inset-top, 0px)); }
  .winner-hero { grid-template-columns: 1fr; }
  .page-title { font-size: 44px; }
}
@media (max-width: 520px) {
  .toolbar { flex-wrap: nowrap; overflow-x: auto; }
  .filters { flex-wrap: nowrap; }
  .top-right .icon-btn { width: 36px; height: 36px; font-size: 16px; }
  .flip { width: 19px; height: 28px; font-size: 17px; line-height: 28px; }
  .cd-cells { gap: 5px; }
  .nearby { grid-template-columns: repeat(2, 1fr); }
  .price-box { grid-template-columns: 1fr 1fr; }
  .price-box b { font-size: 18px; }
  .drawer-body { padding: 16px 16px 30px; }
  .d-title { font-size: 28px; }
  .page-title { font-size: 38px; }
  .big-count .flip { width: 32px; height: 48px; font-size: 30px; line-height: 48px; }
  .swipe-actions { gap: 12px; }
}

/* ---------- Дополнения ---------- */
.toolbar.no-city .city-tabs, .toolbar.no-city .filters { display: none; }
.shimmer:has(img.loaded) { animation: none; background: transparent; }
.chapter-status small { display: block; color: var(--ink-soft); }
.chapter-status .badge { margin-bottom: 4px; }
.vt-theme::view-transition-old(root) { animation: none; }
.vt-theme::view-transition-new(root) { animation: themeReveal .9s cubic-bezier(.7, 0, .3, 1) both; }
@keyframes themeReveal {
  from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 0)); }
  to { clip-path: circle(150vmax at var(--vx, 50%) var(--vy, 0)); }
}
@media (max-width: 520px) {
  .me-badge .me-name { display: none; }
  .me-badge { padding: 6px; }
}
.intro { background: var(--bg); }
.intro::before, .intro::after {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none;
}
.intro::before { background: radial-gradient(circle, #f59ab4, transparent 65%); left: -20vmax; top: -25vmax; animation: orbitA 14s ease-in-out infinite alternate; }
.intro::after { background: radial-gradient(circle, #a693ff, transparent 65%); right: -25vmax; bottom: -30vmax; animation: orbitB 16s ease-in-out infinite alternate; }
:root[data-theme="dark"] .intro::before, :root[data-theme="dark"] .intro::after { opacity: .35; }
@keyframes orbitA { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes orbitB { to { transform: translate(-16vmax, -10vmax) scale(1.1); } }
.intro-inner { position: relative; z-index: 1; }
.intro-skip { z-index: 2; }
.deck { width: min(440px, 100%, calc((100dvh - 360px) * .72)); min-width: 260px; }
.badge .rating { color: #2b2231; }
.deck { width: clamp(270px, calc((100dvh - 470px) * .72), 440px); }
.swipe-actions { margin-top: -58px; position: relative; z-index: 5; }
.swipe-card .sc-info { padding-bottom: 64px; }
@media (max-width: 520px) { .deck { width: min(400px, 100%); } }


/* =========================================================
   Кнопка и панель фильтров
   ========================================================= */
.filter-btn { gap: 8px; padding: 8px 14px; color: var(--ink); }
.filter-btn .fb-summary { color: var(--muted); font-weight: 700; padding-left: 8px; border-left: 1px solid var(--line); }
.filter-btn .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; }
.filter-btn .fb-caret { font-size: 11px; color: var(--muted); transition: transform .35s var(--ease-spring); }
.filter-btn[aria-expanded="true"] { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.filter-btn[aria-expanded="true"] .fb-caret { transform: rotate(180deg); }
.filter-btn.has-active { border-color: color-mix(in srgb, var(--rose) 45%, transparent); }

.filter-backdrop { position: fixed; inset: 0; z-index: 1900; background: transparent; }
.filter-panel {
  position: fixed; z-index: 2000; top: 120px; right: 14px; width: min(400px, calc(100vw - 28px));
  max-height: calc(100dvh - 140px); display: flex; flex-direction: column;
  background: var(--surface-strong); border: 1px solid var(--glass-border); border-radius: 24px;
  backdrop-filter: blur(26px) saturate(1.3); -webkit-backdrop-filter: blur(26px) saturate(1.3);
  box-shadow: 0 24px 60px rgba(60, 20, 50, .25);
  transform-origin: top right;
}
.fp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.fp-head h3 { margin: 0; font: 700 26px/1 var(--serif); }
html:lang(zh-Hant) .fp-head h3 { font: 700 20px/1.2 "Noto Serif TC", var(--serif); }
.fp-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-2); font-size: 15px; transition: transform .35s var(--ease-spring); }
.fp-close:hover { transform: rotate(90deg); }
.fp-body { overflow-y: auto; padding: 4px 18px 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.fp-sec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fp-sec:last-child { border-bottom: 0; }
.fp-title { font-weight: 900; font-size: 14px; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fp-title small { color: var(--muted); font-weight: 700; font-size: 12px; }
.fp-price { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.fp-price output { min-width: 96px; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.fp-price input {
  flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; outline: none;
  background: linear-gradient(90deg, var(--rose) 0 var(--p, 50%), var(--line) var(--p, 50%) 100%);
}
.fp-price input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); box-shadow: 0 2px 10px rgba(224, 96, 126, .5); cursor: grab; transition: transform .2s var(--ease-spring); }
.fp-price input::-webkit-slider-thumb:active { transform: scale(1.25); }
.fp-price input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-chip {
  border: 1px solid var(--line); background: var(--surface-solid); border-radius: 999px; padding: 6px 12px;
  font-weight: 800; font-size: 13px; color: var(--ink-soft); transition: all .25s var(--ease-out);
}
.fp-chip:hover { border-color: var(--rose); color: var(--ink); }
.fp-chip.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }
.fp-switch {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 0; background: none; padding: 8px 2px; text-align: left; font-weight: 700; color: var(--ink);
}
.fp-switch .sw { flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .3s; }
.fp-switch .sw i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .35s var(--ease-spring); }
.fp-switch[aria-checked="true"] .sw { background: var(--mint); }
.fp-switch[aria-checked="true"] .sw i { transform: translateX(20px); }
.fp-foot { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.fp-foot .btn { flex: 1; }
.fp-foot .btn:disabled { opacity: .45; }

@media (max-width: 900px) {
  .filter-backdrop { background: rgba(20, 10, 25, .35); }
  .filter-panel {
    top: auto !important; right: 0 !important; left: 0; bottom: 0; width: 100%;
    max-height: 86dvh; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px);
    transform-origin: bottom center;
  }
  .fp-head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: var(--line); }
  .fp-head { position: relative; padding-top: 22px; }
}
@media (max-width: 520px) {
  /* Телефон: города и компактная кнопка фильтров в первой строке, режимы — во второй */
  .toolbar { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
  .toolbar .city-tabs { order: 1; }
  .toolbar .filters { order: 2; margin-left: auto; }
  .toolbar .mode-tabs { order: 3; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar .mode-tabs::-webkit-scrollbar { display: none; }
  .toolbar .mode-tabs button { flex-shrink: 0; }
  .filter-btn { padding: 8px 12px; }
  .filter-btn [data-i18n], .filter-btn .fb-summary, .filter-btn .fb-caret { display: none; }
  .filter-btn .fb-icon { font-size: 18px; }
}
