/* Ruzona · веб-версия. Те же цвета, шрифт и элементы, что в приложении (Design/*.swift).
   Телефон: нижнее меню, шторки снизу. Ноутбук (≥ 900px): меню слева, содержимое по центру, шторки — окном. */

:root {
  --canvas: #F7F5F0; --card: #fff; --ink: #16130F; --body: #3A342C; --secondary: #5B544B; --tertiary: #8A8278;
  --faint: #B3ACA2; --line: #ECE9E2; --border: #DCD8D0; --muted: #EFECE6;
  --brick: #C2452A; --brick-dark: #9A3520; --brick-wash: #F6E1DA; --brick-deep: #6B2A1A;
  --green: #2F6B3A; --green-wash: #E4EFE3; --green-ink: #1F4A27;
  --gold: #E0A106; --gold-wash: #FBF3E4; --gold-ink: #8A5B00; --gold-text: #6B4F00; --gold-deep: #5A4520;
  --tab-h: 64px; --side-w: 248px; --gutter: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--canvas); }
body { font-family: 'Golos Text', system-ui, -apple-system, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; font-size: 16px; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Раскладка ---------- */
.app { min-height: 100dvh; }
.screen { width: 100%; max-width: 720px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.screen.wide { max-width: 1120px; }
.screen.full { max-width: none; }
.screen.tabs { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.body { flex: 1; padding: 4px var(--gutter) 24px; display: flex; flex-direction: column; gap: 12px; }
.body.flush { padding: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--secondary); }
.tert { color: var(--tertiary); }
.brick { color: var(--brick); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 4px; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* ---------- Текст ---------- */
.t28 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.t26 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.t24 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.t19 { font-size: 19px; font-weight: 700; }
.t18 { font-size: 18px; font-weight: 700; }
.t17 { font-size: 17px; font-weight: 700; }
.t16 { font-size: 16px; font-weight: 700; }
.s15 { font-size: 15px; } .s14 { font-size: 14px; } .s13 { font-size: 13px; } .s12 { font-size: 12px; }
.lh { line-height: 1.5; }
.heavy { font-weight: 800; }
.section { font-size: 16px; font-weight: 700; margin-top: 6px; }
.section.big { font-size: 19px; margin-top: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--tertiary); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- Шапки ---------- */
.top-title { padding: 14px var(--gutter) 12px; }
.top-title h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.top-title p { margin: 4px 0 0; font-size: 15px; color: var(--secondary); }
.back-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px; position: sticky; top: 0; z-index: 20; background: var(--canvas); }
.back-bar .title { font-size: 19px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Карточки и плашки ---------- */
.card { background: var(--card); border-radius: 18px; padding: 16px; }
.card.p0 { padding: 0 16px; } .card.p4 { padding: 4px 16px; } .card.p12 { padding: 12px; }
.pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; background: var(--muted); color: var(--secondary); }
.pill.green { background: var(--green-wash); color: var(--green); }
.pill.gold { background: var(--gold-wash); color: var(--gold-ink); }
.pill.brick { background: var(--brick-wash); color: var(--brick-dark); }
.pill.white { background: #fff; color: var(--ink); }
.pill.solid { background: var(--brick); color: #fff; }
.info { border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.5; background: #fff; color: var(--body); display: flex; gap: 10px; align-items: flex-start; }
.info.gold { background: var(--gold-wash); color: var(--gold-deep); }
.info.brick { background: var(--brick-wash); color: var(--brick-deep); }
.info.green { background: var(--green-wash); color: var(--green-ink); }
.info.neutral { background: #fff; color: var(--secondary); }
.info .i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.dot-ok { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; font-size: 16px; border-top: 1px solid var(--line); }
.kv:first-child, .kv.first { border-top: 0; }
.kv > span:first-child { color: var(--secondary); }
.kv > span:last-child { font-weight: 600; text-align: right; }
.link-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; font-size: 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.link-row:first-child, .link-row.first { border-top: 0; }
.link-row .v { color: var(--tertiary); }
.link-row.danger { color: var(--brick); font-weight: 600; }
.link-row.soft { color: var(--secondary); font-weight: 600; }
.hair { height: 1px; background: var(--line); }

/* ---------- Кнопки ---------- */
.btn { height: 54px; border-radius: 14px; background: var(--brick); color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 0 16px; white-space: nowrap; transition: opacity .15s, transform .1s; }
.btn:active { transform: scale(.985); }
.btn.dark { background: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn.glass { background: rgba(255,255,255,.1); }
.btn.sm { height: 48px; font-size: 16px; }
.btn.xs { height: 46px; font-size: 15px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.ghost .spin { border-color: var(--border); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.round { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.round.shadow { box-shadow: 0 2px 10px rgba(22,19,15,.15); }
.round.border { border: 1px solid var(--border); }
.link { color: var(--brick); font-weight: 600; font-size: 15px; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.lg { height: 40px; font-size: 15px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.bad.on { background: var(--brick-wash); color: var(--brick-dark); border-color: var(--brick-wash); }
.dashed { border: 1.5px dashed var(--brick); border-radius: 16px; height: 60px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--brick); font-weight: 700; font-size: 16px; width: 100%; }

/* ---------- Поля ---------- */
.field { height: 54px; border-radius: 14px; border: 1px solid var(--border); background: #fff; padding: 0 16px; width: 100%; font-size: 16px; outline: none; display: flex; align-items: center; }
.field:focus, .field:focus-within { border-color: var(--ink); }
.field input { border: 0; outline: none; background: none; width: 100%; height: 100%; font-size: 16px; }
textarea.field { height: auto; min-height: 88px; padding: 14px 16px; resize: vertical; line-height: 1.4; }
.field::placeholder, .field input::placeholder, textarea::placeholder { color: var(--tertiary); }
.amount { height: 72px; border-radius: 16px; border: 2px solid var(--brick); background: #fff; display: flex; align-items: center; padding: 0 18px; gap: 10px; }
.amount input { border: 0; outline: none; width: 100%; font-size: 32px; font-weight: 800; background: none; }
.amount span { font-size: 16px; color: var(--secondary); }
.code-boxes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.code-boxes input { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
.code-boxes div { height: 68px; border-radius: 14px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.code-boxes div.on { border: 2px solid var(--brick); }

/* ---------- Тумблер, счётчик, плитки, радио ---------- */
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--border); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on { background: var(--ink); } .switch.on::after { left: 23px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 52px; }
.switch-card { background: #fff; border-radius: 14px; padding: 0 16px; }
.switch-card > .switch-row + .switch-row { border-top: 1px solid var(--line); }
.stepper { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 14px; padding: 10px 12px 10px 16px; }
.stepper .ctrl { display: flex; align-items: center; gap: 14px; }
.stepper .ctrl button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.stepper .ctrl button[disabled] { opacity: .35; }
.stepper .ctrl b { font-size: 18px; min-width: 18px; text-align: center; }
.stepper.big { border-radius: 16px; padding: 10px 12px 10px 18px; }
.stepper.big .ctrl b { font-size: 20px; min-width: 40px; }
.tile { height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; background: #fff; border: 1px solid var(--border); padding: 0 6px; text-align: center; width: 100%; }
.tile.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tile.h48 { height: 48px; font-size: 15px; border-radius: 12px; }
.radio { background: #fff; border-radius: 14px; min-height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 600; border: 1px solid var(--border); width: 100%; text-align: left; }
.radio.on { border: 2px solid var(--ink); }
.radio .o { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; }
.radio.on .o { border-color: var(--ink); }
.radio.on .o::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.radio.rich { border-radius: 16px; padding: 14px 16px; align-items: flex-start; }
.radio.rich .o { margin-top: 2px; order: -1; }
.bars { display: flex; gap: 6px; }
.bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.bars i.on { background: var(--brick); }

/* ---------- Аватар, звёзды ---------- */
.avatar { border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; text-transform: uppercase; }
.avatar.light { background: var(--muted); color: var(--tertiary); }
.stars { display: flex; gap: 6px; }
.stars span { line-height: 1; color: var(--border); cursor: pointer; user-select: none; }
.stars span.on { color: var(--gold); }
.rating-tag { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; flex: none; }
.rating-tag .s { color: var(--gold); }
.rating-tag .n { color: var(--tertiary); font-weight: 500; }
.new-tag { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--brick-wash); color: var(--brick-dark); flex: none; }

/* ---------- Фото ---------- */
.photo { position: relative; background: #E9E6DF; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.thumb { border-radius: 12px; flex: none; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--brick); color: #fff; display: flex; align-items: center; justify-content: center; }
.done-mark.green { background: var(--green); }

/* ---------- Низ экрана и меню ---------- */
.footer { position: sticky; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 12px var(--gutter) calc(12px + var(--safe-b)); display: flex; gap: 10px; }
.screen.tabs .footer { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 12px; }
.footer.col { flex-direction: column; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: var(--safe-b); }
.tabbar a { flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--tertiary); position: relative; }
.tabbar a.on { color: var(--brick); }
.badge { position: absolute; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brick); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tabbar .badge { top: 6px; left: calc(50% + 4px); }
.sidebar { display: none; }

/* ---------- Шторка / окно ---------- */
.dim { position: fixed; inset: 0; z-index: 90; background: rgba(22,19,15,.4); animation: fade .2s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; background: var(--canvas); border-radius: 26px 26px 0 0; max-height: 88dvh; display: flex; flex-direction: column; box-shadow: 0 -6px 30px rgba(22,19,15,.12); animation: up .28s cubic-bezier(.2,.8,.2,1); }
.sheet.tall { height: 88dvh; }
.sheet .s-body { flex: 1; overflow-y: auto; padding: 0 var(--gutter) 18px; }
.sheet .footer { position: static; border-radius: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter) 8px; }
.sheet-head .t { font-size: 18px; font-weight: 700; }
.sheet-head .act { width: 52px; text-align: right; color: var(--brick); font-weight: 600; font-size: 15px; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 10px auto 4px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Календарь ---------- */
.cal-month { font-size: 17px; font-weight: 700; margin: 16px 0 8px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.cal span { height: 42px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; position: relative; z-index: 0; }
.cal .wd { height: 26px; font-size: 12px; color: var(--tertiary); }
.cal .d { cursor: pointer; }
.cal .past { color: #C5BFB5; cursor: default; }
.cal .busy { color: var(--faint); text-decoration: line-through; cursor: default; }
.cal .mid { background: var(--brick-wash); }
.cal .end { color: #fff; font-weight: 700; }
.cal .end::before { content: ''; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--brick); z-index: -1; }
.cal .end.s { background: linear-gradient(90deg, transparent 50%, var(--brick-wash) 50%); }
.cal .end.e { background: linear-gradient(90deg, var(--brick-wash) 50%, transparent 50%); }

/* ---------- Сегменты, шахматка ---------- */
.seg { display: flex; background: var(--line); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; height: 44px; border-radius: 11px; font-size: 16px; font-weight: 700; color: var(--secondary); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22,19,15,.12); }
.chess { background: #fff; border-radius: 18px; overflow: hidden; display: flex; }
.chess .left { flex: none; width: 106px; background: #fff; box-shadow: 4px 0 10px -6px rgba(22,19,15,.25); position: relative; z-index: 2; }
.chess .left .h { height: 50px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--tertiary); text-transform: uppercase; }
.chess .left .r { height: 64px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 7px; padding: 0 8px; font-size: 12px; font-weight: 700; line-height: 1.2; }
.chess .days { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.chess .days::-webkit-scrollbar { display: none; }
.chess .head { display: flex; height: 50px; }
.chess .head > div { flex: none; width: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.chess .head .w { font-size: 11px; color: var(--tertiary); }
.chess .head .w.we { color: var(--brick-dark); }
.chess .head .n { font-size: 14px; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.chess .head .today .w { color: var(--brick); }
.chess .head .today .n { background: var(--brick); color: #fff; }
.chess .line { position: relative; height: 64px; border-top: 1px solid var(--line); display: flex; }
.chess .line .c { flex: none; width: 40px; height: 64px; border-right: 1px solid #F0EDE7; position: relative; cursor: pointer; }
.chess .line .c .dr { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 600; color: var(--brick); }
.chess .bar { position: absolute; top: 12px; height: 40px; border-radius: 12px; font-size: 13px; font-weight: 700; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; cursor: pointer; }
.chess .bar.cut { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.chess .bar.paid { background: var(--green); color: #fff; }
.chess .bar.unpaid { background: var(--gold); color: var(--ink); }
.chess .bar.req { background: #fff; color: var(--brick-dark); border: 2px dashed var(--brick); }
.chess .bar.closed { background: repeating-linear-gradient(45deg, var(--border) 0 6px, var(--line) 6px 12px); color: var(--secondary); cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--body); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 12px; border-radius: 4px; }

/* ---------- Карта ---------- */
.map-screen { position: fixed; inset: 0; z-index: 1; }
.map-screen .leaflet-container { width: 100%; height: 100%; background: #E9E6DF; font-family: inherit; }
.pin { background: #fff; border-radius: 999px; padding: 6px 11px; font: 700 13px 'Golos Text', sans-serif; white-space: nowrap; box-shadow: 0 2px 8px rgba(22,19,15,.25); transform: translate(-50%, -50%); display: inline-block; transition: transform .15s; cursor: pointer; }
.pin.on { background: var(--ink); color: #fff; transform: translate(-50%, -50%) scale(1.12); }
.pin .h { color: var(--brick); }
.leaflet-div-icon { background: none; border: 0; }
/* Слои карты (z-index 400+) не должны перекрывать шапку и шторки. */
.leaflet-container { isolation: isolate; }
/* Подложка OpenStreetMap спокойнее — ближе к карте в приложении. */
.leaflet-tile-pane { filter: saturate(.55) brightness(1.04); }
.leaflet-control-attribution { font-size: 9px !important; }

/* ---------- Ноутбук ---------- */
@media (min-width: 900px) {
  :root { --gutter: 24px; }
  .app.side { padding-left: var(--side-w); }
  .tabbar { display: none; }
  .screen.tabs { padding-bottom: 0; }
  .screen.tabs .footer { bottom: 0; }
  .footer { border-radius: 18px 18px 0 0; }
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); background: #fff; border-right: 1px solid var(--line); padding: 22px 14px; gap: 4px; z-index: 50; }
  .sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font-size: 18px; font-weight: 800; letter-spacing: .05em; }
  .sidebar a.item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--secondary); position: relative; }
  .sidebar a.item:hover { background: var(--canvas); }
  .sidebar a.item.on { background: var(--brick-wash); color: var(--brick-dark); }
  .sidebar .badge { position: static; margin-left: auto; }
  .sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; }
  .sidebar .me:hover { background: var(--canvas); }
  .dim { animation: fade .15s ease; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 48px)); border-radius: 26px; max-height: 86vh; animation: pop .2s ease; }
  .sheet.tall { height: 86vh; }
  .sheet .footer { border-radius: 0 0 26px 26px; }
  .results-grid { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 24px !important; }
  .map-screen { left: var(--side-w); }
  .map-top, .map-bottom { left: var(--side-w) !important; }
  .map-bottom { bottom: 24px !important; }
  .map-fab { left: calc(50% + var(--side-w) / 2) !important; bottom: 28px !important; }
  .toast { left: calc(50% + var(--side-w) / 2); bottom: 32px; }
  .hero-wrap { padding: 16px 24px 0; }
  .hero-wrap .hero { border-radius: 26px; }
  .search-card { margin: -32px 48px 0; }
}
@media (min-width: 1300px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ---------- Мелочи ---------- */
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 120; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px -10px rgba(22,19,15,.5); animation: fade .2s; }
.loading { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 50vh; }
.loading::after { content: ''; width: 28px; height: 28px; border: 3px solid var(--brick-wash); border-top-color: var(--brick); border-radius: 50%; animation: spin .8s linear infinite; }
.empty { font-size: 15px; color: var(--secondary); line-height: 1.5; }
.hero { position: relative; overflow: hidden; }
.search-card { margin: -32px 16px 0; position: relative; background: #fff; border-radius: 22px; box-shadow: 0 12px 30px -14px rgba(22,19,15,.35); overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 100%; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: none; width: 100%; height: 100%; scroll-snap-align: start; }
.panel { background: var(--canvas); border-radius: 24px 24px 0 0; margin-top: -20px; position: relative; }
.timeline { display: flex; flex-direction: column; }
.timeline .st { display: flex; gap: 14px; }
.timeline .rail { display: flex; flex-direction: column; align-items: center; flex: none; }
.timeline .rail i { width: 2px; flex: 1; background: var(--line); margin: 4px 0; min-height: 14px; }
