/* Светлый интерфейс, рассчитанный в первую очередь на телефон */
/* Шрифт Manrope (SIL Open Font License), файлы лежат на сайте */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/static/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/static/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B8, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f3ece4; --card: #fbf8f4; --ink: #2f221c; --muted: #8b7b6f; --line: #e6dbce;
  --coral: #a9512f; --coral-2: #8e4126; --coral-soft: #f1e1d5;
  --teal: #6b4a36; --teal-soft: #ede3d8; --sun: #c99a6b; --sun-soft: #f1e6d8; --violet: #7a5c4a; --violet-soft: #ebe2d9;
  --ok: #4f6b3f; --ok-soft: #e7ecdd; --warn: #9a5a1c; --warn-soft: #f4e5d1; --err: #a33a2b; --err-soft: #f6dfd9;
  --radius: 22px; --shadow: 0 8px 28px rgba(80, 50, 30, .08); --grad: #a9512f;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url("/static/fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url("/static/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B8, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body.has-tabbar { padding-bottom: 72px; }
body.has-bar { padding-bottom: 92px; }
body.has-tabbar.has-bar { padding-bottom: 160px; }
a { color: var(--coral); }
h1 { font-size: 1.55rem; margin: .2em 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.2em 0 .5em; }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
main { max-width: 880px; margin: 0 auto; padding: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* шапка */
.demo-ribbon { background: #2f221c; color: #f1e1d5; text-align: center; font-size: 12px; padding: 5px 12px; letter-spacing: .02em; }
.top { background: rgba(251, 248, 244, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-row { max-width: 880px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.05; }
.brand small { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); }
.logo b { color: var(--coral); margin-left: 4px; font-weight: 600; letter-spacing: .02em; }
.logout { display: flex; align-items: center; gap: 8px; margin: 0; }
.who { font-size: .8rem; color: var(--muted); max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { max-width: 880px; margin: 0 auto; padding: 0 10px 8px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); padding: 7px 13px; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.nav a.active { background: var(--coral); color: #fff; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px 32px; }

/* нижняя панель риелтора */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--card); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 600; padding: 6px; border-radius: 14px; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--coral); }

/* карточки, кнопки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.pad-xl { padding: 28px 22px; }
.narrow { max-width: 440px; margin: 20px auto 14px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.warn { color: var(--warn); }
.pre { white-space: pre-line; }
.back { margin: 2px 0 10px; } .back a { text-decoration: none; font-weight: 600; }
.page-head { margin: 6px 2px 12px; } .page-head h1 { margin-bottom: 2px; } .page-head p { margin: 0; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hello { font-size: 2.6rem; line-height: 1; margin-bottom: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 18px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { border-color: #d6c3b0; }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(140, 65, 35, .28); }
.btn-primary:hover { border-color: transparent; filter: brightness(1.04); }
.btn-warn { background: #c99a6b; border-color: #c99a6b; color: #2f221c; }
.btn-dark { background: #2f221c; border-color: #2f221c; color: #fff; }
.btn-danger { color: var(--err); border-color: #f5c7c0; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 38px; padding: 7px 12px; font-size: .88rem; border-radius: 12px; }
.btn-lg { min-height: 56px; font-size: 1.08rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.btn-row .btn { flex: 1 1 200px; }
.btn-link { background: none; border: 0; padding: 4px; color: var(--coral); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; }
.btn-link.danger { color: var(--err); }
.btn:active, .act:active, .slot:active { transform: translateY(1px); }
form.inline { display: inline; margin: 0; }

/* формы */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: .9rem; font-weight: 700; }
.form small { font-weight: 400; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.form label.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--coral); }
input, select, textarea { font: inherit; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #fffdfa; color: var(--ink); width: 100%; min-height: 48px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--coral-soft); border-color: var(--coral); }
textarea { resize: vertical; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid2 .span2 { grid-column: 1 / -1; }
@media (max-width: 540px) { .grid2 { grid-template-columns: 1fr; } }
fieldset.wd { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
fieldset.wd legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
fieldset.wd label { display: block; }
fieldset.wd input { position: absolute; opacity: 0; width: 1px; height: 1px; }
fieldset.wd span { display: inline-flex; min-width: 46px; min-height: 42px; align-items: center; justify-content: center; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; cursor: pointer; }
fieldset.wd input:checked + span { background: var(--coral); border-color: var(--coral); color: #fff; }
fieldset.wd input:focus-visible + span { outline: 3px solid var(--teal-soft); }

/* сообщения */
.flash { padding: 13px 15px; border-radius: 14px; margin: 0 0 14px; background: var(--violet-soft); }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-info { background: var(--violet-soft); color: #5a4033; }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
.flash-error { background: var(--err-soft); color: var(--err); }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #ece2d6; color: var(--ink); white-space: nowrap; vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.muted { color: var(--muted); }
.badge.dark { background: #2f221c; color: #fff; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); opacity: 0; background: #2f221c; color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 100; transition: .2s; max-width: 90vw; text-align: center; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.note-box { background: var(--sun-soft); border-color: #e6d2b8; }
.note-box p { margin: 6px 0; }

/* каталог */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chip { flex: none; text-decoration: none; padding: 10px 18px; border-radius: 999px; background: transparent; border: 1.5px solid var(--line); color: var(--ink); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.chip.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.apt-card { display: block; background: var(--card); border-radius: 24px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .15s; }
.apt-card:hover { transform: translateY(-2px); }
.apt-card.closed { filter: saturate(.55); opacity: .82; }
.apt-cover, .hero { position: relative; }
.apt-cover img, .apt-cover .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--coral-soft); }
.noimg { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--coral-soft); aspect-ratio: 4 / 3; text-decoration: none; font-weight: 700; }
.apt-district, .apt-status, .apt-video { position: absolute; display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; }
.apt-district { left: 12px; bottom: 12px; background: rgba(251, 248, 244, .94); color: var(--ink); }
.apt-district svg { width: 15px; height: 15px; color: var(--coral); }
.apt-status { left: 12px; top: 12px; background: #2f221c; color: #f1e1d5; font-size: .9rem; }
.apt-video { right: 12px; bottom: 12px; background: rgba(47, 34, 28, .78); color: #fff; }
.apt-video svg { width: 14px; height: 14px; fill: #fff; stroke: none; }
.apt-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.apt-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.apt-price.big { font-size: 2.5rem; line-height: 1.1; color: var(--ink); }
.apt-facts { display: flex; gap: 16px; color: var(--ink); font-size: 1.05rem; align-items: baseline; }
.apt-facts b { font-size: 1.35rem; }
.apt-name { color: var(--muted); font-size: .92rem; }
.next { color: var(--coral); }

/* карточка квартиры */
.hero img, .hero .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); }
@media (min-width: 700px) { .hero img, .hero .noimg { aspect-ratio: 16 / 9; } }
.hero { margin-bottom: -26px; }
.hero .apt-district { bottom: 40px; }
.detail-card { position: relative; margin: 0 10px 14px; padding-top: 18px; }
.detail-card h1 { font-size: 1.3rem; margin: 8px 0 10px; }
.addr { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 14px; padding: 12px; margin: 10px 0; }
.addr svg { color: var(--coral); margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.facts > div { background: #efe5da; border-radius: 16px; padding: 12px 8px; text-align: center; display: grid; }
.facts > div:nth-child(2) { background: #efe5da; }
.facts > div:nth-child(3) { background: #efe5da; }
.facts b { font-size: 1.8rem; } .facts b small { font-size: .85rem; color: var(--muted); }
.facts span { color: var(--muted); font-size: .82rem; }
.furn { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.furn li { padding: 9px 12px 9px 36px; background: var(--bg); border-radius: 12px; position: relative; }
.furn li::before { content: "✓"; position: absolute; left: 13px; color: var(--coral); font-weight: 800; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery.plans { grid-template-columns: 1fr; }
.tile { margin: 0; background: var(--bg); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.tile img, .tile video, .tile .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #2f221c; }
.gallery.plans .tile img { object-fit: contain; background: #fff; aspect-ratio: auto; }
.tile-video { grid-column: 1 / -1; }
.tile-video video { aspect-ratio: 16 / 9; object-fit: contain; }
.tile figcaption { font-size: .85rem; font-weight: 600; padding: 8px 10px 2px; }
.tile-actions { display: flex; gap: 4px; padding: 4px 6px 8px; }
.gallery:not(.plans) .tile:not(.tile-video) .tile-actions a { font-size: .74rem; gap: 3px; padding: 8px 2px; }
.gallery:not(.plans) .tile:not(.tile-video) .tile-actions svg { width: 14px; height: 14px; }
.tile-actions a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--ink); background: var(--card); border-radius: 10px; padding: 8px 4px; min-height: 38px; }
.tile-actions svg { width: 16px; height: 16px; }
.share-row { display: flex; gap: 8px; }
.share-row input { font-size: .85rem; color: var(--muted); }
.hidden-copy { position: absolute; left: -9999px; width: 1px; height: 1px; }
.hidden-copy.show { position: static; width: 100%; height: auto; margin-top: 8px; }

/* нижняя панель действий на карточке */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: rgba(251, 248, 244, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.has-tabbar .actionbar { bottom: 66px; border-bottom: 1px solid var(--line); }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: .78rem; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.15; padding: 6px; }
.act svg { width: 22px; height: 22px; }
.act-main { background: var(--grad); color: #fff; border-color: transparent; font-size: .95rem; box-shadow: 0 6px 16px rgba(140, 65, 35, .3); }
@media (min-width: 880px) { .actionbar { left: 50%; transform: translateX(-50%); max-width: 880px; border-radius: 20px 20px 0 0; } }

/* окно записи */
dialog.sheet { background: var(--card); border: 0; padding: 0; width: 100%; max-width: 560px; max-height: 92vh; border-radius: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.sheet::backdrop { background: rgba(47, 34, 28, .5); }
@media (max-width: 600px) { dialog.sheet { margin: auto 0 0; max-width: 100%; border-radius: 24px 24px 0 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; position: sticky; top: 0; background: var(--card); }
.sheet-head h2 { margin: 0; }
.sheet-close { border: 0; background: var(--bg); width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.sheet-sub { color: var(--muted); font-size: .88rem; padding: 4px 18px 0; }
.sheet .picker { padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); }
.picker { display: grid; gap: 10px; margin-top: 8px; }
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.day-tab { flex: none; display: grid; justify-items: center; min-width: 66px; padding: 9px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); font: inherit; cursor: pointer; position: relative; }
.day-tab b { font-size: 1.3rem; } .day-tab span { font-size: .78rem; color: var(--muted); }
.day-tab i { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: .68rem; font-weight: 800; background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 6px; }
.day-tab.on { background: var(--coral); border-color: var(--coral); color: #fff; } .day-tab.on span { color: #f6e6da; }
.day-tab.on i { background: #2f221c; }
.day-title { font-weight: 800; margin: 4px 0 8px; }
.js .day-panel { display: none; } .js .day-panel.on { display: block; }
.day-panel { margin-bottom: 6px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.slot { position: relative; cursor: pointer; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: flex; align-items: center; justify-content: center; min-height: 58px; border-radius: 14px; background: #efe5da; color: var(--ink); font-weight: 800; font-size: 1.35rem; border: 2px solid transparent; }
.slot input:checked + span { background: var(--coral); color: #fff; box-shadow: 0 6px 14px rgba(140, 65, 35, .3); }
.slot input:focus-visible + span { border-color: var(--ink); }

/* мои показы */
.booking-item { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.when-box { display: grid; justify-items: center; background: var(--coral-soft); color: var(--coral); border-radius: 16px; padding: 10px 12px; min-width: 84px; }
.when-box b { font-size: 1.6rem; } .when-box span { font-size: .78rem; font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.b-title { font-weight: 800; }
.chev { font-size: 1.8rem; color: var(--muted); }
h2.sub { margin: 22px 4px 10px; color: var(--muted); }
.ticket { border-top: 6px solid var(--coral); }
.ticket-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 700; }
.ticket-when { display: grid; margin: 10px 0; } .ticket-when b { font-size: 2.5rem; letter-spacing: -.02em; } .ticket-when span { font-weight: 700; color: var(--muted); }
.access { border-radius: 18px; padding: 16px; margin: 12px 0; }
.access.on { background: #2f221c; color: #f6ece3; }
.access.on .code { color: #f3d2bd; }
.access.on svg { width: 16px; height: 16px; vertical-align: -3px; }
.access.off { background: var(--bg); color: var(--muted); }
.code { font: 800 3rem/1.15 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .18em; margin: 6px 0; }
.big-code { color: var(--coral); text-align: center; background: #efe5da; border-radius: 16px; padding: 12px; }
.code-sm { font: 700 1.05rem ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.kv { border-collapse: collapse; width: 100%; margin: 8px 0; }
.kv th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 12px 8px 0; width: 40%; vertical-align: top; }
.kv td { padding: 8px 0; }
.kv tr + tr th, .kv tr + tr td { border-top: 1px solid var(--line); }

/* вход */
.pin-form { display: grid; gap: 16px; max-width: 340px; margin: 14px auto 6px; }
.pin-input { text-align: center; font: 800 2.8rem ui-monospace, Consolas, monospace; letter-spacing: .5em; padding-left: .5em; min-height: 80px; border-radius: 20px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.pin-pad[hidden] { display: none; }
.pin-pad button { border-radius: 50%; aspect-ratio: 1; justify-self: center; width: 88px; max-width: 100%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-family: inherit; font-size: 2.3rem; font-weight: 800; cursor: pointer; }
.pin-pad button[data-key="back"] { background: transparent; font-size: 1.9rem; }
.pin-pad button:active { background: var(--coral); color: #fff; }
.demo-box { max-width: 440px; margin: 0 auto 14px; border: 2px dashed #d6b896; }
.demo-note { background: var(--sun-soft); padding: 8px 12px; border-radius: 12px; }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; }

/* админка */
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.card > .row:first-child, .card > h2 + .row { border-top: 0; }
.row > div:first-child { flex: 1 1 260px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick-btn { display: grid; gap: 6px; padding: 16px; border-radius: 20px; text-decoration: none; color: var(--ink); font-weight: 800; min-height: 96px; align-content: center; }
.quick-btn b { font-size: 1.6rem; line-height: 1; }
.q1 { background: var(--coral); color: #fff; } .q2 { background: #e9dccd; } .q3 { background: #efe5da; } .q4 { background: #e3d5c6; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); display: grid; }
.stat b { font-size: 1.7rem; } .stat span { color: var(--muted); font-size: .85rem; }
.alert-card { display: grid; gap: 4px; text-decoration: none; background: var(--err-soft); color: var(--err); border-color: #ecc4ba; }
.admin-list { display: grid; gap: 10px; }
.admin-apt { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); padding: 12px; margin: 0; }
.admin-apt img, .admin-apt .noimg { width: 108px; height: 84px; object-fit: cover; border-radius: 14px; flex: none; aspect-ratio: auto; }
.price-sm { font-weight: 800; }
.jump { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; scrollbar-width: none; }
.jump a { flex: none; text-decoration: none; font-weight: 700; font-size: .88rem; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.status-opts { display: grid; gap: 10px; }
.status-opt { display: grid; grid-template-columns: minmax(170px, auto) 1fr; gap: 12px; align-items: center; }
.status-opt .btn { width: 100%; }
@media (max-width: 540px) { .status-opt { grid-template-columns: 1fr; gap: 4px; } }
.open-time { background: var(--bg); padding: 14px; border-radius: 16px; }
.days-admin { display: grid; gap: 12px; margin-top: 14px; }
.day-admin { border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
summary.day-admin-head { color: var(--ink); list-style: none; }
summary.day-admin-head::-webkit-details-marker { display: none; }
summary.day-admin-head b::after { content: " ▾"; color: var(--coral); }
.day-admin-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.slot-row { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 8px; align-items: center; padding: 4px 0; }
.slot-row .t { font-weight: 800; }
.slot-row input { min-height: 40px; padding: 7px 10px; font-family: ui-monospace, Consolas, monospace; }
.slot-row.booked { background: var(--ok-soft); border-radius: 10px; padding: 6px 8px; grid-template-columns: 56px 1fr auto; }
.slot-row.nocode input { border-color: #d9b48b; background: var(--warn-soft); }
.slot-row .who { font-weight: 700; color: var(--ok); }
.day-code { display: flex; gap: 8px; margin-top: 8px; }
.day-code input { min-height: 40px; padding: 7px 10px; }
.media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.media-item img, .media-item video, .media-item .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--line); display: flex; }
.media-actions { display: flex; gap: 6px; }
.upload { background: var(--bg); padding: 14px; border-radius: 16px; }
.copy-block { display: grid; gap: 8px; margin: 8px 0; }
.copy-block textarea { font-size: .9rem; background: var(--bg); }
.preview { white-space: pre-wrap; background: var(--bg); padding: 12px; border-radius: 12px; font: inherit; font-size: .9rem; margin: 6px 0; }
.log-item + .log-item { border-top: 1px solid var(--line); padding-top: 8px; }
.steps { padding-left: 20px; } .steps li { margin: 6px 0; }
details summary { cursor: pointer; color: var(--coral); padding: 6px 0; font-weight: 700; }

/* страница покупателя */
.share-body { background: var(--bg); }
.share-top { text-align: center; padding: 16px 12px 8px; display: grid; }
.share-top .logo { font-size: 1.5rem; } .share-top small { color: var(--muted); }
.share { max-width: 820px; }
.hero-lg img { aspect-ratio: 4 / 3; }

/* референс: спокойные плоские кнопки, тёплые тени */
.btn-primary { background: var(--coral); }
.btn-primary:hover { background: var(--coral-2); filter: none; }
.act-main { background: var(--coral); }
.slot input:checked + span { background: var(--coral); color: #fff; }
.apt-card, .card { border-color: #eadfd3; }
.hero img, .hero .noimg { border-radius: 26px; }
.when-box { background: #efe5da; color: var(--coral); }

/* Типографика по референсу: Manrope, полужирные заголовки, спокойные веса */
body { font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-feature-settings: "tnum" 0; }
h1, h2, .logo, .apt-price, .ticket-when b, .facts b { letter-spacing: -.025em; }
h1 { font-weight: 700; font-size: 1.7rem; line-height: 1.15; }
h2 { font-weight: 700; }
.logo { font-weight: 800; font-size: 1.35rem; }
.btn, .act, .chip, .nav a, .tabbar a { font-weight: 600; }
.apt-price, .facts b, .apt-facts b, .slot span, .day-tab b, .when-box b, .ticket-when b, .price-sm, .stat b, .slot-row .t { font-variant-numeric: tabular-nums; font-weight: 700; }
.code, .pin-input, .code-sm, .slot-row input { font-family: "Manrope", sans-serif; font-variant-numeric: tabular-nums; }
.code { font-weight: 800; letter-spacing: .14em; }
.pin-input { font-weight: 700; }
.pin-pad button { font-weight: 600; }
.quick-btn, .b-title, .day-title { font-weight: 700; }

/* Линейные значки вместо эмодзи */
.hello { width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 50%; background: var(--coral-soft); color: var(--coral); display: flex; align-items: center; justify-content: center; }
.hello svg { width: 32px; height: 32px; stroke-width: 1.8; }
.quick-btn svg { width: 28px; height: 28px; stroke-width: 1.8; }
.note-line { padding-left: 16px; position: relative; }
.note-line::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
/* Белый основной фон */
:root { --bg: #ffffff; --card: #ffffff; }
.top, .actionbar { background: rgba(255, 255, 255, .96); }
.tabbar, .sheet-head, dialog.sheet { background: #ffffff; }
.share-body { background: #ffffff; }
input, select, textarea { background: #ffffff; }
.card, .apt-card, .stat { box-shadow: 0 4px 20px rgba(0, 0, 0, .05); }
.addr, .furn li, .copy-block textarea, .preview, .open-time, .upload, .tile, .access.off { background: #f7f5f2; }
/* ===== Брендбук: белый фон, глубокий красный, графит, песочный, тауп, айвори ===== */
:root {
  --bg: #ffffff; --card: #ffffff; --ink: #2b2a29; --muted: #7d726a; --line: #ebe5dd;
  --coral: #7b1e23; --coral-2: #62161a; --coral-soft: #f6ecec;
  --sand: #cbbba8; --taupe: #7d726a; --ivory: #f5f1eb;
  --ok: #4d6a45; --ok-soft: #edf2ea; --warn: #8a5a22; --warn-soft: #f7efe4; --err: #9b2a2a; --err-soft: #f8ebea;
  --radius: 14px; --shadow: 0 2px 14px rgba(43, 42, 41, .06);
}
body { color: var(--ink); }
.serif, h1, h2, .logo, .detail-card h1, .ticket-when b { font-family: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif; }
h1 { font-weight: 600; font-size: 1.95rem; letter-spacing: 0; line-height: 1.1; }
h2 { font-weight: 600; font-size: 1.4rem; letter-spacing: 0; }
.demo-ribbon { background: var(--ink); color: #e9e2d8; letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; }
.top, .actionbar { background: rgba(255, 255, 255, .97); border-color: var(--line); }
.logo { font-weight: 500; font-size: 1.45rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.logo b { color: var(--coral); font-weight: 500; letter-spacing: .08em; margin-left: 6px; }
.brand small, .share-top small { text-transform: uppercase; letter-spacing: .2em; font-size: .62rem; color: var(--taupe); margin-top: 4px; }
.nav a { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; border-radius: 8px; }
.nav a.active { background: var(--coral); color: #fff; }
.tabbar a { text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; }
.tabbar a.active { color: var(--coral); background: transparent; }
.card, .apt-card, .stat { border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
.apt-card { border-radius: 16px; }
.btn { border-radius: 10px; border: 1px solid #d9d0c5; background: #fff; color: var(--ink); font-weight: 600; letter-spacing: .02em; }
.btn:hover { border-color: var(--taupe); }
.btn-primary, .act-main { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--coral-2); border-color: var(--coral-2); }
.btn-lg { border-radius: 12px; text-transform: uppercase; letter-spacing: .1em; font-size: .92rem; }
.btn-warn { background: var(--sand); border-color: var(--sand); color: var(--ink); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-danger { color: var(--err); border-color: #e7c9c7; }
.act { border-radius: 12px; border-color: #ddd4c9; background: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: .64rem; }
.act-main { font-size: .74rem; }
.chip { border-radius: 999px; border: 1px solid #d9d0c5; background: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; }
.chip.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.page-head p, .apt-name { color: var(--taupe); }
.apt-cover img, .hero img, .hero .noimg { border-radius: 0; }
.hero img, .hero .noimg { border-radius: 16px; box-shadow: none; }
.apt-district { background: rgba(255, 255, 255, .95); color: var(--ink); text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; border-radius: 6px; }
.apt-district svg { color: var(--coral); }
.apt-status { background: var(--coral); color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; border-radius: 6px; }
.apt-video { background: rgba(43, 42, 41, .8); border-radius: 6px; text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; }
.apt-price, .apt-price.big { color: var(--ink); font-weight: 700; }
.next { color: var(--coral); }
.facts > div, .facts > div:nth-child(2), .facts > div:nth-child(3) { background: var(--ivory); border-radius: 10px; }
.facts span { text-transform: uppercase; letter-spacing: .1em; font-size: .64rem; }
.addr, .furn li, .copy-block textarea, .preview, .open-time, .upload, .tile, .access.off { background: var(--ivory); }
.addr { border-radius: 10px; } .addr svg { color: var(--coral); }
.furn li { border-radius: 8px; } .furn li::before { color: var(--coral); }
.tile { border-radius: 10px; } .tile-actions a { background: #fff; border-radius: 8px; }
.day-tab { border-radius: 10px; border-color: #ddd4c9; background: #fff; }
.day-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; } .day-tab.on span { color: #ddd5cb; }
.day-tab i { background: var(--coral); } .day-tab.on i { background: var(--coral); }
.slot span { background: var(--ivory); color: var(--ink); border-radius: 10px; border: 1px solid #e6ded3; }
.slot input:checked + span { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: none; }
dialog.sheet { border-radius: 18px; } dialog.sheet::backdrop { background: rgba(43, 42, 41, .55); }
@media (max-width: 600px) { dialog.sheet { border-radius: 18px 18px 0 0; } }
.when-box { background: var(--ivory); color: var(--coral); border-radius: 10px; }
.ticket { border-top: 4px solid var(--coral); }
.access.on { background: var(--ink); color: #f5f1eb; border-radius: 12px; }
.access.on .code { color: #fff; }
.big-code { background: var(--ivory); color: var(--coral); border-radius: 12px; }
.note-box { background: var(--ivory); border-color: var(--line); }
.note-line::before { background: var(--coral); }
.badge { border-radius: 6px; letter-spacing: .04em; background: var(--ivory); }
.badge.dark { background: var(--ink); color: #fff; }
.flash { border-radius: 10px; }
.flash-info { background: var(--ivory); color: var(--ink); }
.hello { background: var(--ivory); color: var(--coral); }
.pin-input { border-radius: 12px; }
.pin-pad button { background: #fff; border: 1px solid #ddd4c9; color: var(--ink); }
.pin-pad button:active { background: var(--coral); border-color: var(--coral); color: #fff; }
.pin-pad button[data-key="back"] { border-color: transparent; }
.quick-btn { border-radius: 12px; font-weight: 600; }
.q1 { background: var(--coral); color: #fff; } .q2 { background: var(--ink); color: #fff; } .q3 { background: var(--ivory); color: var(--ink); } .q4 { background: #e9e1d6; color: var(--ink); }
.stat b { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; font-weight: 600; }
.stat span { text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; }
.alert-card { background: var(--coral-soft); color: var(--coral); border-color: #ead3d2; }
.jump a { border-radius: 8px; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
fieldset.wd span { border-radius: 8px; border-color: #ddd4c9; }
fieldset.wd input:checked + span { background: var(--ink); border-color: var(--ink); }
.slot-row.booked { background: var(--ok-soft); }
input, select, textarea { border: 1px solid #ddd4c9; border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--coral-soft); border-color: var(--coral); }
.share-top .logo { font-size: 1.7rem; }
.share-body, body { background: #ffffff; }
.sec-head h2 { font-size: 1.4rem; }
/* Логотип */
.logo { display: inline-flex; align-items: center; gap: 9px; text-transform: none; letter-spacing: 0; }
.logo .mark { width: 30px; height: 30px; flex: none; stroke: none; }
.logo .word { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 1.45rem; letter-spacing: .1em; color: var(--ink); line-height: 1; }
.logo b { color: var(--ink); margin-left: 0; font-weight: 600; letter-spacing: .1em; }
.brand small { margin-left: 39px; }
.share-top .logo { justify-content: center; } .share-top .logo .mark { width: 38px; height: 38px; } .share-top .logo .word { font-size: 1.8rem; }
.share-top small { margin-top: 6px; }
/* Шапка: логотип в одну строку */
.logo .word { white-space: nowrap; font-size: 1.3rem; }
.brand small { white-space: nowrap; margin-left: 39px; }
@media (max-width: 480px) { .who { display: none; } }
/* Всё на белом: плашки — белые с тонкой рамкой */
:root { --ivory: #ffffff; }
html, body, main, .share-body, .top, .tabbar, .actionbar, .card, .apt-card, .stat, dialog.sheet, .sheet-head { background-color: #ffffff; }
.addr, .furn li, .facts > div, .facts > div:nth-child(2), .facts > div:nth-child(3), .copy-block textarea, .preview, .open-time, .upload,
.tile, .access.off, .slot span, .when-box, .big-code, .note-box, .flash-info, .hello, .q3, .badge, .day-admin, .tile-actions a {
  background: #ffffff; border: 1px solid var(--line); }
.q4 { background: #ffffff; border: 1px solid var(--line); }
.apt-cover img, .hero img, .noimg { background: #ffffff; }
/* Страница покупателя — нейтральная шапка */
.share-top .share-title { text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; color: var(--taupe); font-weight: 600; }

/* Галерея: крупные фото, маленький значок «скачать» */
.gallery { grid-template-columns: 1fr 1fr; gap: 6px; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; border: 0; border-radius: 10px; background: #f3f0ec; }
.tile-photo img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: #f3f0ec; }
.tile-video { grid-column: 1 / -1; background: #000; }
.tile-video video { aspect-ratio: auto; max-height: 70vh; background: #000; }
.tile-dl { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.88); color: #2b2a29; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.tile-dl svg { width: 16px; height: 16px; }
.tile-video .tile-dl { top: 8px; right: 8px; }
.gallery.plans .tile-photo img { aspect-ratio: auto; object-fit: contain; background: #fff; }
/* Полноэкранный просмотр */
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; background: #111; display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px) 16px; color: #fff; padding-top: calc(10px + env(safe-area-inset-top)); }
.lb-count { flex: 1; font-weight: 600; letter-spacing: .05em; }
.lb-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; cursor: pointer; }
.lb-prev { left: 6px; border-radius: 10px; } .lb-next { right: 6px; border-radius: 10px; }
@media (pointer: coarse) { .lb-nav { display: none; } }
/* Главная кнопка нижней панели — всегда красная */
.act.act-main { background: var(--coral); border-color: var(--coral); color: #fff; }

/* PIN-клавиатура компактнее — весь экран входа помещается на телефоне */
.pin-form { gap: 10px; max-width: 300px; margin-top: 8px; }
.pin-input { font-size: 2rem; min-height: 58px; }
.pin-pad { gap: 8px 18px; }
.pin-pad button { width: min(66px, 8.5vh); font-size: 1.7rem; }
.pin-pad button[data-key="back"] { font-size: 1.4rem; }
.pin-form .btn-lg { min-height: 50px; }
.narrow.pad-xl { padding: 18px 18px 14px; margin-top: 10px; }
.narrow .hello { width: 52px; height: 52px; margin-bottom: 6px; }
.narrow .hello svg { width: 24px; height: 24px; }
.narrow h1 { font-size: 1.5rem; margin-bottom: 4px; }
.narrow p { margin: 6px 0; }
/* Кнопки WhatsApp */
.btn-wa { background: #fff; border-color: #25d366; color: #1d7d43; margin-top: 8px; }
.btn-wa svg { color: #25d366; }
.copy-block + .btn-wa { width: 100%; }
.log-item .btn-wa { margin: 0 0 8px; }

/* Итог показа и закрепление покупателя */
.outcome { border-top: 1px solid var(--line, #e6e1da); margin-top: 16px; padding-top: 14px; }
.outcome h2 { margin: 0 0 10px; }
.outcome .form { margin-bottom: 8px; }
.outcome .btn-ghost { margin-top: 10px; }
.last4-input { font-size: 32px; letter-spacing: .4em; text-align: center; padding: 10px 12px; max-width: 220px; display: block; margin: 6px auto 0; font-variant-numeric: tabular-nums; }
.attach { border-radius: 12px; padding: 14px 16px; margin: 12px 0; line-height: 1.45; }
.attach.on { background: #edf5ee; color: #234a2b; border: 1px solid #cfe3d2; }
.attach.review { background: #fbf3e4; color: #6b4a12; border: 1px solid #ecd9b3; }
.attach.off { background: var(--ivory, #f7f5f2); color: var(--muted, #777); }
.att-review { border-left: 3px solid var(--coral, #7b1e23); }

/* Правка имени и телефона риелтора */
.row:has(> .edit-realtor) { flex-wrap: wrap; }
.edit-realtor { flex-basis: 100%; margin-top: 6px; }
.edit-realtor summary { cursor: pointer; color: var(--muted); }
.edit-realtor .form { margin-top: 8px; }
