/* Beauty Календарь. Палитра по логотипу: бордо, пудровый розовый, золото.
   Раскладка: на компьютере — боковое меню слева, на телефоне — нижнее меню и кнопка «⋯» для проекта и выхода. */
:root {
  color-scheme: light;
  --plum: #3f0820;
  --wine: #7b1238;
  --wine-dark: #5a0b29;
  --berry: #a3245a;
  --rose: #f6dbe3;
  --blush: #fbf2f5;
  --paper: #fffcfd;
  --gold: #b9864b;
  --gold-light: #e7c48f;
  --ink: #2a1520;
  --muted: #7d6670;
  --line: #eedde3;
  --green: #28735a;
  --amber: #9a5d12;
  --radius: 1.1rem;
  --shadow: 0 1px 2px rgba(63,8,32,.05), 0 10px 30px rgba(63,8,32,.07);
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--blush); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 .2rem; color: var(--berry); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 700; line-height: 1.05; color: var(--plum); }
h2 { margin-bottom: 0; font-family: var(--serif); font-size: 1.45rem; color: var(--plum); }
h3 { color: var(--plum); }
[data-icon] { display: inline-grid; place-items: center; }
[data-icon] svg { width: 1.3rem; height: 1.3rem; }

/* ---------- Оболочка: меню и рабочая область ---------- */
.app-shell { min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: .75rem; padding: 1.4rem 1.25rem 1.6rem; color: white; }
.brand img { width: 2.75rem; height: 2.75rem; border-radius: .8rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.brand span { font-family: var(--serif); font-size: 1.2rem; line-height: 1.05; }
.brand b { display: block; color: var(--gold-light); font-size: 1.35rem; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: .2rem; padding: 0 .75rem; }
.nav-item { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 2.9rem; padding: .55rem .85rem; border: 0; border-radius: .9rem; color: rgba(255,255,255,.78); background: transparent; font-weight: 650; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.nav-item:hover { color: white; background: rgba(255,255,255,.08); }
.nav-item[aria-selected="true"] { color: white; background: linear-gradient(90deg, rgba(231,196,143,.22), rgba(255,255,255,.06)); box-shadow: inset 3px 0 0 var(--gold-light); }
.nav-item[aria-selected="true"] [data-icon] { color: var(--gold-light); }
.account { display: grid; gap: .25rem; margin-top: auto; padding: 1rem .75rem 1.25rem; border-top: 1px solid rgba(255,255,255,.1); }
.account-name { margin: 0 .85rem .35rem; color: rgba(255,255,255,.6); font-size: .78rem; font-weight: 700; }
.account-action { display: flex; align-items: center; gap: .7rem; min-height: 2.6rem; padding: .45rem .85rem; border: 0; border-radius: .8rem; color: rgba(255,255,255,.82); background: transparent; font-size: .9rem; font-weight: 650; text-align: left; cursor: pointer; }
.account-action:hover { color: white; background: rgba(255,255,255,.08); }
.account-action [data-icon] svg { width: 1.15rem; height: 1.15rem; }
.workspace { min-width: 0; }
.page-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.25rem; }
.page-title-block { flex: 1; min-width: 0; }
.head-logo { width: 2.4rem; height: 2.4rem; border-radius: .7rem; }
.account-toggle [data-icon] svg { width: 1.25rem; height: 1.25rem; }
.view { display: grid; gap: 1rem; align-content: start; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.toolbar .field-hint { flex: 1 1 18rem; margin: 0; }

@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: radial-gradient(120% 60% at 0% 0%, #8c1a45 0%, transparent 60%), linear-gradient(180deg, var(--wine-dark), var(--plum)); }
  .workspace { width: 100%; max-width: 68rem; padding: 2rem 2.5rem 6rem; }
  .page-head .head-logo, .page-head .account-toggle { display: none; }
}
@media (max-width: 899px) {
  .workspace { padding: calc(.9rem + env(safe-area-inset-top)) 1rem calc(6.5rem + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(63,8,32,.08); padding-bottom: env(safe-area-inset-bottom); }
  .brand { display: none; }
  .nav { flex-direction: row; gap: 0; padding: .3rem .25rem; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 1 0 4.4rem; flex-direction: column; justify-content: center; gap: .15rem; min-height: 3.5rem; padding: .35rem .2rem; border-radius: .8rem; color: var(--muted); font-size: .66rem; font-weight: 700; text-align: center; }
  .nav-item:hover { color: var(--wine); background: transparent; }
  .nav-item [data-icon] svg { width: 1.45rem; height: 1.45rem; }
  .nav-item[aria-selected="true"] { color: var(--wine); background: var(--rose); box-shadow: none; }
  .nav-item[aria-selected="true"] [data-icon] { color: var(--wine); }
  .account { position: fixed; top: calc(3.7rem + env(safe-area-inset-top)); right: .75rem; z-index: 40; display: none; min-width: 15rem; padding: .5rem; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: 0 18px 50px rgba(63,8,32,.2); }
  .account-open .account { display: grid; }
  .account-name { margin: .4rem .7rem .3rem; color: var(--muted); }
  .account-action { color: var(--ink); }
  .account-action:hover { color: var(--wine); background: var(--blush); }
  .page-head { position: sticky; top: 0; z-index: 20; margin: calc(-.9rem - env(safe-area-inset-top)) -1rem 1rem; padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; background: rgba(251,242,245,.94); backdrop-filter: blur(10px); }
  .page-head h1 { font-size: 1.55rem; }
  .page-head .eyebrow { font-size: .64rem; }
}

/* ---------- Карточки, календарь, списки ---------- */
.card, .calendar-card, .day-panel { background: var(--paper); border: 1px solid rgba(123,18,56,.07); border-radius: 1.4rem; box-shadow: var(--shadow); }
.card { padding: 1.15rem; }
.calendar-card { padding: .85rem; }
.day-panel { padding: 1rem; }
.topbar, .day-heading, .month-nav, .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.month-nav { padding: .2rem .2rem .8rem; }
.month-title { border: 0; background: transparent; color: var(--plum); font-family: var(--serif); font-size: 1.4rem; font-weight: 700; text-transform: capitalize; cursor: pointer; }
.icon-button { display: grid; min-width: 2.6rem; height: 2.6rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--wine); background: white; font-size: 1.4rem; cursor: pointer; }
.icon-button:hover { border-color: var(--rose); background: var(--blush); }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.weekdays { margin-bottom: .25rem; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 3.2rem; padding: .4rem .2rem; border: 1px solid transparent; border-radius: .85rem; color: var(--ink); background: transparent; text-align: center; cursor: pointer; transition: background .12s; }
.calendar-day:hover { background: var(--blush); }
.calendar-day.other { color: #c4b2ba; }
.calendar-day.today { border-color: var(--gold-light); font-weight: 800; }
.calendar-day.selected { color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); box-shadow: 0 8px 20px rgba(123,18,56,.28); }
.dots { display: flex; justify-content: center; gap: 3px; min-height: 5px; margin-top: .35rem; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--berry); }
.selected .dot { background: white; }
.primary { min-height: 2.75rem; padding: .6rem 1.1rem; border: 0; border-radius: .9rem; color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); font-weight: 750; cursor: pointer; box-shadow: 0 6px 16px rgba(123,18,56,.22); }
.primary:hover { filter: brightness(1.06); }
.primary:disabled, .secondary:disabled { opacity: .45; cursor: default; box-shadow: none; filter: none; }
.secondary { min-height: 2.75rem; padding: .6rem 1rem; border: 1px solid #e3c6d1; border-radius: .9rem; color: var(--wine); background: white; font-weight: 750; cursor: pointer; }
.secondary:hover { background: var(--blush); }
.danger { min-height: 2.75rem; padding: .6rem; border: 1px solid #e4a8b4; border-radius: .9rem; color: #9d1932; background: #fff2f5; font-weight: 750; cursor: pointer; }
.text-button { justify-self: start; padding: 0; border: 0; color: var(--wine); background: transparent; font-weight: 750; cursor: pointer; }
.wide { width: 100%; }
.sync-button { min-height: 2.6rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); background: white; font-size: .8rem; font-weight: 750; cursor: pointer; }
.appointments { display: grid; gap: .6rem; margin-top: 1rem; }
.view > .appointments { margin-top: 0; }
.appointment { display: grid; width: 100%; grid-template-columns: 3.5rem 1fr auto; gap: .8rem; align-items: center; padding: .85rem; border: 1px solid var(--line); border-left: 4px solid var(--wine); border-radius: 1rem; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.appointment:hover { box-shadow: var(--shadow); }
.appointment time { font-size: 1.05rem; font-weight: 850; color: var(--plum); }
.appointment strong { display: block; font-size: 1rem; }
.appointment small { color: var(--muted); font-size: .82rem; }
.status { padding: .3rem .55rem; border-radius: 999px; color: var(--amber); background: #fff0d8; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status.confirmed { color: var(--green); background: #dff3eb; }
.status.requested { color: #1966b3; background: #e7f2ff; }
.status.blocked { color: var(--muted); background: #f3eff1; }
.status.unpaid { color: #9a5d12; background: #fff0d8; }
.empty { padding: 2rem 1rem; color: var(--muted); text-align: center; }
.notice { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 1rem; color: var(--amber); background: #fff3df; font-size: .88rem; }
.error { min-height: 1.25rem; margin: 0; color: #a51d35; font-size: .85rem; }
.error-box { color: #a51d35; background: #fff2f5; }
.field-hint { margin: -.4rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.field-hint a, .memo a { color: var(--wine); font-weight: 700; }
.muted-text { margin: 1rem 0 1.5rem; color: var(--muted); }
.block-muted { display: block; margin-top: .2rem; color: var(--muted); font-size: .78rem; }

/* ---------- Формы ---------- */
label { display: grid; gap: .4rem; color: var(--muted); font-size: .84rem; font-weight: 700; }
.field { display: grid; gap: .4rem; }
input, select, textarea { width: 100%; min-height: 2.9rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .8rem; color: var(--ink); background: white; font-size: 1rem; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea { line-height: 1.4; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--berry); box-shadow: 0 0 0 3px var(--rose); }
.toggle { display: flex; align-items: center; gap: .55rem; min-height: 2.8rem; color: var(--ink); font-weight: 650; }
.toggle input, .reminders input { width: 1.2rem; min-height: 1.2rem; accent-color: var(--wine); }
.compact-toggle { min-height: 2rem; font-size: .85rem; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.inline-fields.compact { align-items: end; }
.subform { display: grid; gap: .8rem; padding: .9rem; border-radius: 1rem; background: var(--blush); }
.settings-section { display: grid; gap: .9rem; }
.settings-section > div > h3, .card > div > h3 { margin: 0 0 .25rem; font-family: var(--serif); font-size: 1.3rem; }
.settings-section > div > p, .card > div > p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.settings-form, .settings-list, .add-setting-form, .setting-card { display: grid; gap: .75rem; }
.settings-form { margin: 0; }
.settings-list { gap: .6rem; }
.setting-group, .archive-list { display: grid; gap: .6rem; }
.setting-group h4 { margin: 0; color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.setting-card, .add-setting-form { margin: 0; padding: .9rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.add-setting-form { background: var(--blush); }
.setting-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.row-actions { display: flex; justify-content: flex-end; }
.row-actions .archive-button { min-height: 2.3rem; padding: .35rem .8rem; font-size: .82rem; }
.archive-button { min-height: 2.75rem; padding: .6rem; border: 1px solid #ddbdc9; border-radius: .9rem; color: var(--wine); background: #fff8fa; font-weight: 750; cursor: pointer; }
.archive-group { padding: .75rem; border: 1px dashed #d9c4cc; border-radius: 1rem; background: #fbf8f9; }
.archive-group summary { color: var(--wine); font-size: .85rem; font-weight: 800; cursor: pointer; }
.archive-list { margin-top: .7rem; }
.archived-card { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem; border: 1px solid var(--line); border-radius: .9rem; background: white; }
.archived-card strong, .archived-card small { display: block; }
.archived-card small { margin-top: .15rem; color: var(--muted); font-size: .76rem; }
.archived-card .secondary { flex: 0 0 auto; min-height: 2.4rem; padding: .45rem .75rem; }
.settings-empty { margin: 0; padding: .8rem; border-radius: .8rem; color: var(--muted); background: #fbf8f9; font-size: .84rem; text-align: center; }
.reminders { display: flex; gap: 1rem; padding: .4rem 0; }
.reminders label { display: flex; align-items: center; gap: .45rem; color: var(--ink); }
.reminder-block { display: grid; gap: .35rem; color: var(--muted); font-size: .84rem; font-weight: 700; }
.reminder-block > .reminders { flex-wrap: wrap; gap: .65rem 1rem; }
.reminder-block .reminders .reminders { display: contents; }
.service-row { gap: .55rem; padding: .75rem .85rem; }
.service-main { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 6.5rem; gap: .5rem; }
.service-main input { min-height: 2.6rem; }
.service-name input { font-weight: 700; }
.service-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.service-foot .archive-button { min-height: 2.2rem; padding: .3rem .8rem; font-size: .8rem; }
@media (max-width: 520px) { .service-main { grid-template-columns: 1fr 1fr; } .service-name { grid-column: 1 / -1; } }

/* Общая кнопка «Сохранить» разделов настроек: прилипает к низу экрана над нижним меню. */
.savebar { position: sticky; bottom: 1rem; z-index: 15; display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .6rem .6rem .6rem 1rem; border: 1px solid rgba(123,18,56,.12); border-radius: 1.1rem; background: rgba(255,252,253,.96); box-shadow: 0 14px 40px rgba(63,8,32,.16); backdrop-filter: blur(10px); }
.savebar > span { flex: 1; color: var(--muted); font-size: .85rem; font-weight: 700; }
.savebar .primary { min-width: 8rem; }
@media (max-width: 899px) { .savebar { bottom: calc(4.9rem + env(safe-area-inset-bottom)); } .savebar > span { font-size: .78rem; } .savebar .secondary { padding-inline: .7rem; } }

/* ---------- Диалоги и уведомления ---------- */
dialog { width: min(calc(100% - 1.5rem), 31rem); max-height: calc(100dvh - 1.5rem); padding: 1.1rem; border: 0; border-radius: 1.5rem; color: var(--ink); background: var(--paper); box-shadow: 0 30px 80px rgba(50,10,28,.3); overflow: auto; }
dialog::backdrop { background: rgba(40,8,24,.55); backdrop-filter: blur(4px); }
.settings-dialog { width: min(calc(100% - 1rem), 40rem); }
.dialog-head { position: sticky; top: -1.1rem; z-index: 2; margin: -1.1rem -1.1rem 0; padding: 1.1rem; background: rgba(255,252,253,.97); border-bottom: 1px solid var(--line); }
.login-card form, dialog form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.toast { position: fixed; right: 1rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); left: 1rem; z-index: 50; max-width: 28rem; margin: auto; padding: .85rem 1rem; border-radius: 1rem; color: white; background: var(--plum); box-shadow: 0 12px 35px rgba(0,0,0,.25); opacity: 0; transform: translateY(1rem); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }
@media (min-width: 900px) { .toast { bottom: 1.5rem; left: 16.5rem; } }

/* ---------- Вход ---------- */
.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 1.25rem; background: radial-gradient(90% 70% at 50% 0%, #a3245a 0%, transparent 70%), linear-gradient(180deg, #6d0f33, var(--plum)); }
.login-card { width: min(100%, 25rem); padding: 2rem 1.75rem; border-radius: 1.75rem; background: var(--paper); box-shadow: 0 30px 80px rgba(20,0,10,.45); text-align: center; }
.login-card form, .login-card .settings-list { text-align: left; }
.login-logo { width: 6rem; height: 6rem; margin: 0 auto 1rem; display: block; border-radius: 1.4rem; box-shadow: 0 14px 30px rgba(63,8,32,.3); }
.login-logo.small { width: 4rem; height: 4rem; border-radius: 1rem; }
.login-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; padding: .3rem; border-radius: 1rem; background: var(--blush); }
.login-mode label { display: block; }
.login-mode input { position: absolute; width: 1px; min-height: 0; height: 1px; opacity: 0; }
.login-mode span { display: grid; min-height: 2.5rem; place-items: center; border-radius: .8rem; color: var(--wine); font-size: .9rem; font-weight: 750; cursor: pointer; }
.login-mode input:checked + span { color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); box-shadow: 0 5px 14px rgba(123,18,56,.25); }
.login-mode input:focus-visible + span { box-shadow: 0 0 0 3px var(--rose); }
.vk-button { min-height: 3rem; border: 0; border-radius: .9rem; color: white; background: #0077ff; font-weight: 750; cursor: pointer; box-shadow: 0 6px 16px rgba(0,119,255,.25); }
.password-login { display: grid; gap: .8rem; }
.password-login summary { color: var(--muted); font-size: .85rem; font-weight: 700; text-align: center; cursor: pointer; }
.password-login[open] { gap: .8rem; }
.password-login[open] summary { margin-bottom: .2rem; }
.chooser-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .6rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: white; text-align: left; font-weight: 750; cursor: pointer; }
.chooser-item:hover { border-color: var(--rose); background: var(--blush); }
.chooser-item small { display: block; color: var(--muted); font-weight: 600; }
.chooser-item:disabled { opacity: .55; cursor: not-allowed; }
#chooser-list { margin-bottom: 1rem; }

/* ---------- Поиск клиента ---------- */
.client-picker { position: relative; }
.client-results { position: absolute; top: calc(100% + .35rem); right: 0; left: 0; z-index: 8; max-height: 16rem; padding: .35rem; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: 0 16px 35px rgba(56,16,34,.18); overflow-y: auto; }
.client-result { display: flex; width: 100%; min-height: 3.1rem; align-items: center; justify-content: space-between; gap: .6rem; padding: .65rem .7rem; border: 0; border-radius: .75rem; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.client-result:hover, .client-result:focus, .client-result.active { background: var(--blush); outline: none; }
.client-result strong { font-size: .95rem; }
.client-result small { display: block; color: var(--muted); font-size: .76rem; }
.vk-badge { flex: 0 0 auto; padding: .23rem .45rem; border-radius: 999px; color: #1966b3; background: #e7f2ff; font-size: .7rem; font-weight: 850; }
.search-empty { padding: 1rem; color: var(--muted); font-size: .85rem; text-align: center; }

/* ---------- Админка ---------- */
.user-card { display: grid; width: 100%; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--wine); border-radius: 1rem; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.user-card:hover { box-shadow: var(--shadow); }
.user-card.blocked { border-left-color: #baaab1; opacity: .75; }
.user-card strong { display: block; font-size: 1rem; }
.user-card small { display: block; color: var(--muted); font-size: .82rem; }
.section-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.section-chips i { padding: .2rem .5rem; border-radius: 999px; color: var(--wine); background: var(--blush); font-size: .72rem; font-style: normal; font-weight: 800; }
.section-chips i.none { color: var(--muted); background: #f3eff1; }
.section-chips i.sphere { color: #7a5420; background: #f8ecd9; }
.section-chips i.warn { color: var(--amber); background: #fff0d8; }
#user-sections, #user-spheres { flex-wrap: wrap; gap: .65rem 1rem; }
#admin-new-user, #admin-sphere-add { white-space: nowrap; }
.sphere-filter { display: flex; align-items: center; gap: .6rem; }
.sphere-filter select { width: auto; min-width: 12rem; }
#admin-password-dialog h3 { margin: 1rem 0 0; font-family: var(--serif); font-size: 1.2rem; }
#admin-vk-form { margin-top: 1.25rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.vk-id-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.vk-id-row .secondary { white-space: nowrap; }
.vk-login-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem .7rem; border-radius: .8rem; background: white; }
.user-block { display: grid; gap: .8rem; padding: .85rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.user-block > summary { color: var(--wine); font-weight: 800; cursor: pointer; }
.user-block[open] > summary { margin-bottom: .2rem; }
.user-block label { margin-top: .2rem; }
.memo { padding: .75rem; border-radius: .8rem; background: var(--blush); font-size: .84rem; }
.memo summary { color: var(--wine); font-weight: 800; cursor: pointer; }
.memo ol { margin: .6rem 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.memo code { word-break: break-all; }
.card-actions { display: flex; gap: .4rem; flex: 0 0 auto; }
.feature-setting .toggle { min-height: 2.8rem; }
.sphere-service { display: grid; grid-template-columns: 1fr 5rem 5.5rem auto; gap: .4rem; align-items: center; }
.sphere-service input { padding-inline: .55rem; }
.sphere-service .icon-button { min-width: 2.4rem; height: 2.4rem; }
@media (max-width: 470px) { .archived-card { flex-wrap: wrap; } .card-actions { width: 100%; } .card-actions button { flex: 1; } .sphere-service { grid-template-columns: 1fr 4.2rem 4.6rem auto; } }

/* ---------- Онлайн-запись (мини-приложение VK) ---------- */
.booking-shell { width: min(100%, 36rem); margin: 0 auto; padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(2rem + env(safe-area-inset-bottom)); }
.booking-card { margin-top: 1rem; padding: 1rem; border: 1px solid rgba(123,18,56,.08); border-radius: 1.5rem; background: var(--paper); box-shadow: var(--shadow); }
.booking-card h2 { margin-bottom: .8rem; font-size: 1.3rem; }
.choice-list { display: grid; gap: .5rem; }
.choice { display: flex; width: 100%; min-height: 3.2rem; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: white; text-align: left; font-weight: 700; cursor: pointer; }
.choice small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.choice .choice-note { display: block; margin-top: .2rem; white-space: normal; font-size: .78rem; }
.choice[aria-pressed="true"] { border-color: var(--wine); box-shadow: 0 0 0 2px var(--rose); }
.day-strip { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .3rem; scroll-snap-type: x mandatory; }
.day-chip { flex: 0 0 3.6rem; min-height: 4rem; display: grid; place-items: center; padding: .4rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: white; font-weight: 800; cursor: pointer; scroll-snap-align: start; }
.day-chip small { color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.day-chip[aria-pressed="true"] { color: white; background: var(--wine); border-color: var(--wine); }
.day-chip[aria-pressed="true"] small { color: white; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: .45rem; }
.slot { min-height: 2.8rem; border: 1px solid var(--line); border-radius: .9rem; color: var(--ink); background: white; font-weight: 800; cursor: pointer; }
.slot[aria-pressed="true"] { color: white; background: var(--wine); border-color: var(--wine); }
.booking-form { display: grid; gap: .9rem; }
.booking-done { text-align: center; }
.my-booking { display: flex; justify-content: space-between; gap: .6rem; padding: .7rem .9rem; border-radius: 1rem; background: var(--blush); }

/* ---------- Аренда ---------- */
.room-bar { display: flex; gap: .6rem; align-items: end; margin: 0 0 1rem; }
.room-bar label { flex: 1; }
.rental-month-actions { margin: .5rem 0 1rem; }
.rental-count { display: inline-block; min-width: 1.3rem; padding: 0 .3rem; border-radius: 999px; color: white; background: var(--berry); font-size: .7rem; font-weight: 800; }
.selected .rental-count { color: var(--wine); background: white; }
.rental-free { border-left-color: #3d9a6f; border-style: dashed; background: #f6fbf8; }
.weekday-heading { margin: 1rem 0 0; color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.price-band { display: grid; grid-template-columns: minmax(6.6rem, 1.3fr) 1fr 1fr auto; gap: .35rem; align-items: center; }
.price-band select, .price-band input { padding-inline: .45rem; font-size: .9rem; }
.price-band .icon-button { min-width: 2.4rem; height: 2.4rem; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.price-grid label { font-size: .75rem; }
#rental-price-form h3 { margin: .5rem 0 0; font-family: var(--serif); font-size: 1.25rem; }
.rental-day-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.staff-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: .8rem; background: white; }
.staff-row small { display: block; color: var(--muted); }
.unpaid-dot { background: #d08a1e !important; }
.receipts { display: grid; gap: 10px; margin-top: 12px; }
.receipts a { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.receipts img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: #f3eff1; }
.booking-rules { display: grid; gap: 14px; }
.booking-rules h4 { margin: 8px 0 0; color: var(--plum); }
.rule-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.rule-field legend { padding: 0; margin-bottom: 6px; font-weight: 650; }
.rental-entry.unpaid { border-left-color: #d08a1e; background: #fff7e8; }
.rental-entry.paid { border-left-color: #2f8a5f; background: #eaf6ef; }
.rental-entry.closed, .appointment.reserve { border-left-color: #6f3c78; background: repeating-linear-gradient(135deg, #f7f1fb 0 10px, #efe4f6 10px 20px); }
.rental-entry.cleaning { border-left-color: #9a9aa6; background: #f4f4f6; }
.status.reserve { color: #6f3c78; background: #efe4f6; }
.reserve-dot { background: #6f3c78; }
.selected .reserve-dot { background: #e9d8f3; }
.color-legend { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin: .2rem 0 .7rem; color: var(--muted); font-size: .78rem; }
.color-legend .legend { display: inline-block; width: .8rem; height: .8rem; margin-right: -.45rem; border-radius: .25rem; vertical-align: middle; }
.legend.unpaid { background: #fff7e8; border: 2px solid #d08a1e; }
.legend.paid { background: #eaf6ef; border: 2px solid #2f8a5f; }
.legend.reserve { background: repeating-linear-gradient(135deg, #f7f1fb 0 3px, #d9c3e6 3px 6px); border: 2px solid #6f3c78; }
.legend.cleaning { background: #f4f4f6; border: 2px solid #9a9aa6; }
.check-row { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.tier-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.tier-row input { width: 4.5rem; }
.client-pick { gap: .45rem; }
.client-chosen { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .8rem; border-radius: .8rem; background: #f6fbf8; }
.client-options { display: grid; gap: .3rem; }
.client-new { display: grid; gap: .45rem; }
.format-rules { margin-top: .6rem; }
.format-rules summary { cursor: pointer; color: var(--wine); font-weight: 800; }
.format-rules[open] { display: grid; gap: .5rem; }

/* ---------- Бот для клиентов: ссылки, приветствие с фото ---------- */
.welcome-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.welcome-photos figure { position: relative; margin: 0; }
.welcome-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .8rem; }
.welcome-photos .icon-button { position: absolute; top: .3rem; right: .3rem; min-width: 2rem; height: 2rem; background: rgba(255,255,255,.92); }
.file-button { display: inline-flex; justify-content: center; padding: .7rem 1rem; border: 1px dashed #d9b6c3; border-radius: .9rem; color: var(--wine); background: var(--blush); font-weight: 750; cursor: pointer; }
.link-text { word-break: break-all; }
.bot-staff-block { display: grid; gap: .5rem; }

@media (min-width: 700px) {
  .calendar-card { padding: 1.25rem; }
  .calendar-day { min-height: 5.2rem; text-align: left; padding: .65rem; }
  .dots { justify-content: flex-start; }
  .day-panel { padding: 1.3rem; }
}
@media (min-width: 1200px) {
  /* Широкий экран: календарь и список дня рядом. */
  .calendar-view, #rental-schedule-panel { grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 1fr); align-items: start; }
  #rental-schedule-panel { display: grid; gap: 1rem; }
  .calendar-view .day-panel, #rental-schedule-panel .day-panel { position: sticky; top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (max-width: 520px) {
  .month-title { font-size: 1.2rem; white-space: nowrap; }
  .day-heading { flex-wrap: wrap; align-items: flex-end; }
  .day-heading h2 { font-size: 1.35rem; white-space: nowrap; }
  .rental-day-actions { flex-wrap: nowrap; }
  .rental-day-actions button { min-height: 2.5rem; padding-inline: .8rem; }
}

/* ---------- Сайт студии для клиентов (поддомен) ---------- */
.site-page { background: var(--blush); }
.site-head { display: grid; gap: 1rem; padding: calc(1rem + env(safe-area-inset-top)) 1rem 1rem; background: radial-gradient(120% 90% at 0% 0%, #8c1a45 0%, transparent 60%), linear-gradient(180deg, var(--wine-dark), var(--plum)); color: white; }
.site-head h1 { color: white; font-size: clamp(1.6rem, 6vw, 2.3rem); }
.site-head .eyebrow { color: var(--gold-light); }
.site-brand { display: flex; align-items: center; gap: .9rem; width: min(100%, 60rem); margin: 0 auto; }
.site-brand img { width: 3.2rem; height: 3.2rem; border-radius: .9rem; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.site-address { margin: .25rem 0 0; color: rgba(255,255,255,.75); font-size: .85rem; }
.auth-bar, .client-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; width: min(100%, 60rem); margin: 0 auto; }
.client-bar { justify-content: space-between; padding: .7rem .9rem; border-radius: 1rem; background: rgba(255,255,255,.1); }
.client-who small { color: rgba(255,255,255,.7); }
.client-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.client-bar .text-button { color: var(--gold-light); }
.tg-button, .max-button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem; padding: .6rem 1.1rem; border-radius: .9rem; font-weight: 750; cursor: pointer; }
.tg-button { border: 0; color: white; background: #2aabee; box-shadow: 0 8px 22px rgba(42,171,238,.45); }
.tg-button:hover { background: #1f9bdc; }
.tg-button.soft { box-shadow: none; }
.max-button { border: 1px solid rgba(255,255,255,.45); color: white; background: rgba(255,255,255,.06); }
.max-button:hover { background: rgba(255,255,255,.14); }
dialog .max-button { border-color: #d6c7f5; color: #4b2e9a; background: #f6f2ff; }
.messenger-icon { display: inline-block; width: 1.35rem; height: 1.35rem; flex: 0 0 auto; background: center / contain no-repeat; }
.tg-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23fff'/%3E%3Cpath fill='%232aabee' d='M5.4 11.7l11.1-4.3c.5-.2 1 .1.8.9l-1.9 8.9c-.1.6-.5.8-1 .5l-2.9-2.1-1.4 1.3c-.2.2-.3.3-.6.3l.2-2.9 5.3-4.8c.2-.2-.1-.3-.4-.1l-6.6 4.1-2.8-.9c-.6-.2-.6-.6.2-.9z'/%3E%3C/svg%3E"); }
.max-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2344ccff'/%3E%3Cstop offset='.5' stop-color='%235b5bff'/%3E%3Cstop offset='1' stop-color='%23a33dff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='24' height='24' rx='7' fill='url(%23g)'/%3E%3Cpath fill='%23fff' d='M12 5.5a6.5 6.5 0 0 0-5.6 9.8l-.8 2.9 3-.8A6.5 6.5 0 1 0 12 5.5zm0 2.2a4.3 4.3 0 1 1 0 8.6 4.3 4.3 0 0 1 0-8.6z'/%3E%3C/svg%3E"); }
.site-main { display: grid; gap: 1rem; width: min(100%, 60rem); margin: 0 auto; padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom)); }
.site-section { display: grid; gap: .8rem; }
.site-section > h2, .site-section-head h2 { font-size: 1.45rem; }
.site-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .8rem; }
.site-section-head label { min-width: 12rem; }
.site-calendar .calendar-day:disabled { color: #cdbec5; cursor: default; background: transparent; }
.site-calendar .calendar-day.free { background: #f2fbf6; border-color: #cfe9da; }
.site-calendar .calendar-day.free .dot { background: #2f8a5f; }
.site-calendar .calendar-day.mine { border-color: var(--gold-light); box-shadow: inset 0 0 0 2px var(--gold-light); }
.site-calendar .calendar-day.selected { color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); }
.site-calendar .calendar-day.selected .dot { background: white; }
.legend.free { background: #f2fbf6; border: 2px solid #2f8a5f; }
.legend.mine { background: white; border: 2px solid var(--gold-light); }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { min-height: 2.6rem; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: white; font-weight: 750; cursor: pointer; }
.chip[aria-pressed="true"] { color: white; background: var(--wine); border-color: var(--wine); }
.booking-total { display: grid; gap: .2rem; padding: .85rem 1rem; border-radius: 1rem; background: var(--blush); color: var(--muted); font-size: .9rem; }
.booking-total strong { color: var(--plum); font-size: 1.15rem; }
.price-card summary { color: var(--wine); font-family: var(--serif); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.price-text, .pre-line { margin: 0; white-space: pre-wrap; font: inherit; font-size: .9rem; line-height: 1.5; color: var(--ink); }
.link-button { display: grid; place-items: center; text-decoration: none; }
.receipt-preview { width: 100%; max-height: 18rem; object-fit: contain; border-radius: .8rem; background: #f3eff1; }
@media (min-width: 700px) { .site-head { padding-inline: 2rem; } .site-main { padding-inline: 2rem; } }
.move-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: 0; color: #4b2e9a; background: #f1ecff; }
#pay-dialog .dialog-actions { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.room-windows { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .35rem 0; }
.room-windows + .room-windows { border-top: 1px dashed var(--line); padding-top: .6rem; }
.room-name { min-width: 7rem; color: var(--plum); font-weight: 800; }
.price-tables { display: grid; gap: 1.2rem; margin-top: .8rem; }
.price-room h3 { margin: 0 0 .5rem; font-family: var(--serif); font-size: 1.2rem; }
.price-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.price-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.price-table caption { padding: .55rem .8rem; color: var(--muted); font-size: .78rem; text-align: left; caption-side: top; }
.price-table th, .price-table td { padding: .5rem .65rem; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.price-table th:first-child, .price-table td:first-child { position: sticky; left: 0; text-align: left; background: white; }
.price-table thead th { color: var(--plum); background: var(--blush); font-weight: 800; }
.price-table thead th:first-child { background: var(--blush); }
.price-table .price-group th { color: var(--berry); background: #fdf7f9; font-size: .78rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.price-notes { display: grid; gap: .35rem; margin: .7rem 0 0; padding-left: 1.1rem; font-size: .85rem; }
.price-notes small { color: var(--muted); }
.price-extra { margin: .6rem 0 0; color: var(--muted); font-size: .85rem; }
/* Сайт на телефоне: блоки сетки не растягиваются по ширине таблицы прайса (иначе страница шире экрана). */
.site-main > *, .site-section, .price-tables, .price-room { min-width: 0; }
.site-page { overflow-x: hidden; }
@media (max-width: 560px) {
  .site-main { padding-inline: .75rem; }
  .card.site-section { padding: .9rem; }
  .room-name { min-width: 0; width: 100%; }
}
/* Столбцы прайса: полные названия на широком экране, короткие (как в боте) — на телефоне; расшифровка — под таблицей. */
.price-table .col-short, .price-notes .col-short { display: none; }
@media (max-width: 560px) {
  .price-table { font-size: .8rem; }
  .price-table th, .price-table td { padding: .45rem .35rem; }
  .price-table thead th { white-space: nowrap; }
  .price-table .col-full { display: none; }
  .price-table .col-short, .price-notes .col-short { display: inline; }
}

/* ---------- Главная страница для гостей (продающий лендинг). Вход — в меню, окно #login-dialog. ---------- */
.landing { min-height: 100dvh; color: var(--ink); background: var(--blush); }
html:has(.landing:not(.hidden)) { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
.landing a { color: inherit; }
.landing-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: calc(.7rem + env(safe-area-inset-top)) clamp(1rem, 4vw, 3rem) .7rem; background: rgba(63,8,32,.94); color: white; }
.landing-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.landing-brand img { width: 2.5rem; height: 2.5rem; border-radius: .7rem; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.landing-brand span { font-family: var(--serif); font-size: 1.15rem; line-height: 1; }
.landing-brand b { color: var(--gold-light); }
.landing-nav { display: flex; align-items: center; gap: 1.4rem; }
.landing-nav a { color: rgba(255,255,255,.82); font-size: .92rem; font-weight: 650; text-decoration: none; }
.landing-nav a:hover { color: white; }
.landing-login { min-height: 2.5rem; padding: .45rem 1.1rem; border: 1px solid rgba(231,196,143,.6); border-radius: 999px; color: var(--gold-light); background: transparent; font-weight: 750; cursor: pointer; }
.landing-login:hover { background: rgba(231,196,143,.12); }
.landing-burger { display: none; width: 2.75rem; height: 2.75rem; padding: .7rem .6rem; border: 0; border-radius: .8rem; background: rgba(255,255,255,.08); cursor: pointer; }
.landing-burger span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: white; }

.landing-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem);
  color: white; background: radial-gradient(90% 80% at 15% 0%, #a3245a 0%, transparent 60%), radial-gradient(70% 70% at 100% 100%, #7b1238 0%, transparent 70%), linear-gradient(160deg, #5a0b29, var(--plum)); }
.hero-badge { display: inline-block; margin: 0 0 1rem; padding: .35rem .8rem; border: 1px solid rgba(231,196,143,.5); border-radius: 999px; color: var(--gold-light); font-size: .8rem; font-weight: 750; letter-spacing: .04em; }
.landing-hero h1 { max-width: 34rem; color: white; font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.05; }
.hero-lead { max-width: 33rem; margin: 1.1rem 0 1.6rem; color: rgba(255,255,255,.85); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-primary, .hero-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 800; text-decoration: none; }
.landing .hero-primary { color: var(--plum); background: linear-gradient(135deg, #f3d39f, var(--gold-light) 45%, #c8955a); box-shadow: 0 10px 28px rgba(201,149,90,.35); }
.landing .hero-secondary { color: white; border: 1px solid rgba(255,255,255,.4); }
.landing .plan .hero-secondary { color: var(--wine); border-color: #e3c6d1; }
.hero-points { display: grid; gap: .4rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: rgba(255,255,255,.78); font-size: .9rem; }
.hero-points li::before { content: "✓"; margin-right: .5rem; color: var(--gold-light); font-weight: 800; }
.hero-visual { position: relative; justify-self: center; width: min(100%, 22rem); }
.mock-phone { display: grid; gap: .55rem; padding: 1rem; border: 1px solid rgba(255,255,255,.15); border-radius: 2rem; color: var(--ink); background: var(--paper); box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.mock-top { display: flex; align-items: center; gap: .6rem; padding-bottom: .4rem; color: var(--plum); font-family: var(--serif); font-weight: 700; }
.mock-top img { width: 2rem; height: 2rem; border-radius: .55rem; }
.mock-item { display: grid; grid-template-columns: 3rem 1fr; gap: .1rem .6rem; padding: .65rem .75rem; border-left: 3px solid var(--wine); border-radius: .8rem; background: white; font-size: .82rem; box-shadow: 0 1px 3px rgba(63,8,32,.08); }
.mock-item b { color: var(--plum); }
.mock-item i { grid-column: 2; justify-self: start; padding: .1rem .45rem; border-radius: 999px; font-size: .68rem; font-style: normal; font-weight: 800; }
.mock-item .ok { color: var(--green); background: #dff3eb; }
.mock-item .paid { color: #7a5420; background: #f8ecd9; }
.mock-item .new { color: #1966b3; background: #e7f2ff; }
.mock-item.free { border-left-color: #3d9a6f; border-left-style: dashed; color: var(--muted); background: #f6fbf8; }
.mock-bubble { position: absolute; max-width: 14rem; padding: .6rem .85rem; border-radius: 1rem 1rem 1rem .3rem; color: var(--ink); background: white; font-size: .78rem; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.mock-bubble.b1 { top: -1.2rem; right: -1.5rem; }
.mock-bubble.b2 { bottom: -1.4rem; left: -1.6rem; border-radius: 1rem 1rem .3rem 1rem; background: #e9f7ff; }

.landing-section { width: min(100%, 70rem); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 2rem) 0; }
.section-kicker { margin: 0 0 .5rem; color: var(--berry); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.landing-section h2 { max-width: 40rem; margin-bottom: 1.6rem; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.1; }
.feature-grid, .channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature, .channel, .plan { padding: 1.4rem; border: 1px solid rgba(123,18,56,.08); border-radius: 1.4rem; background: var(--paper); box-shadow: var(--shadow); }
.feature h3, .channel h3, .plan h3 { margin: .7rem 0 .4rem; font-family: var(--serif); font-size: 1.3rem; }
.feature p, .channel p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.feature-icon { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 1rem; background: var(--blush); font-size: 1.5rem; }
.channel .messenger-icon { width: 2.6rem; height: 2.6rem; }
.vk-mark { display: inline-grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: .8rem; color: white; background: #0077ff; font-weight: 900; font-size: .9rem; }
.channel.tg { border-top: 4px solid #2aabee; }
.channel.max { border-top: 4px solid #6b4dff; }
.channel.vk { border-top: 4px solid #0077ff; }
.channels-note { margin: 1.2rem 0 0; color: var(--muted); }
.price-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 52rem; }
.plan { display: grid; align-content: start; gap: .6rem; }
.plan.main { border: 2px solid var(--gold-light); }
.plan-price { margin: 0; color: var(--plum); font-family: var(--serif); font-size: 2.2rem; font-weight: 700; }
.plan ul { display: grid; gap: .45rem; margin: 0 0 .6rem; padding: 0; list-style: none; }
.plan li::before { content: "✓"; margin-right: .5rem; color: var(--green); font-weight: 800; }
.step-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step-list li { position: relative; display: grid; gap: .3rem; padding: 1.3rem 1.3rem 1.3rem 4rem; border-radius: 1.2rem; background: var(--paper); box-shadow: var(--shadow); counter-increment: step; }
.step-list li::before { content: counter(step); position: absolute; top: 1.2rem; left: 1.2rem; display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); font-weight: 800; }
.step-list span { color: var(--muted); font-size: .92rem; }
.landing-section.contacts { margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem); border-radius: 2rem; color: white; text-align: center; background: radial-gradient(80% 90% at 50% 0%, #a3245a 0%, transparent 70%), linear-gradient(160deg, #5a0b29, var(--plum)); }
.contacts h2 { margin: 0 auto .6rem; color: white; }
.contacts p { margin: 0 0 1.4rem; color: rgba(255,255,255,.8); }
.contact-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.contact-buttons a { text-decoration: none; }
.vk-link-button { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.9rem; padding: .5rem 1.1rem .5rem .5rem; border-radius: .9rem; color: white; background: #0077ff; font-weight: 750; }
.vk-link-button .vk-mark { width: 2rem; height: 2rem; border-radius: .6rem; background: rgba(255,255,255,.18); font-size: .75rem; }
.landing-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; width: min(100%, 70rem); margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2rem) calc(2rem + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; }
.login-dialog { width: min(calc(100% - 1.5rem), 25rem); }

@media (max-width: 860px) {
  .landing-burger { display: block; }
  .landing-nav { position: absolute; top: 100%; right: .75rem; left: .75rem; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem; border-radius: 1.1rem; background: var(--paper); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
  .landing-nav.open { display: flex; }
  .landing-nav a { padding: .85rem 1rem; border-radius: .8rem; color: var(--ink); font-size: 1rem; }
  .landing-nav a:hover { background: var(--blush); color: var(--wine); }
  .landing-login { margin-top: .35rem; min-height: 3rem; border-color: var(--wine); color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); }
  .landing-hero { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 1.5rem; }
  .feature-grid, .channel-grid, .step-list, .price-plans { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1100px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .hero-actions a { flex: 1 1 100%; }
  .mock-bubble.b1 { right: -.3rem; }
  .mock-bubble.b2 { left: -.3rem; }
  .contact-buttons a { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Профиль, база клиентов, аналитика, новости (public/growth.js). Черновик для ChatGPT: на существующих токенах. ---------- */
.growth-panel { display: grid; gap: 1rem; min-width: 0; }
.growth-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.growth-toolbar input[type="search"] { flex: 1 1 14rem; min-width: 0; }
.growth-toolbar select { flex: 0 1 12rem; min-width: 0; }
.profile-form .question { display: grid; gap: .35rem; }
.question-text { color: var(--plum); font-weight: 750; }
.invite-source { display: grid; gap: .5rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.invite-source h3 { margin: 0; font-size: 1rem; }
.invite-link { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; }
.invite-link code { overflow: hidden; padding: .5rem .7rem; border-radius: .7rem; background: var(--blush); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.invite-platform { color: var(--muted); font-size: .85rem; font-weight: 750; }
.rating-average { margin: .3rem 0; font-size: 1.05rem; }
.rating-average b { color: var(--wine); font-family: var(--serif); font-size: 2rem; }
.rating-bars, .series { display: grid; gap: .35rem; }
.rating-bar, .series-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 6rem; gap: .6rem; align-items: center; font-size: .88rem; }
.rating-bar span { color: var(--gold); letter-spacing: .05em; }
.rating-bar i, .series-row i { height: .7rem; border-radius: 999px; background: linear-gradient(90deg, var(--berry), var(--wine)) 0 0 / var(--share) 100% no-repeat, var(--rose); }
.rating-bar b, .series-row b { text-align: right; }
.client-stats, .stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 .8rem; }
.client-stats div, .stat-tile { display: grid; gap: .15rem; padding: .7rem .8rem; border-radius: 1rem; background: white; box-shadow: var(--shadow); }
.client-stats b, .stat-tile b { color: var(--plum); font-size: 1.15rem; }
.client-stats span, .stat-tile span, .stat-tile small { color: var(--muted); font-size: .8rem; }
.stat-tile.main { color: white; background: linear-gradient(160deg, var(--berry), var(--wine)); }
.stat-tile.main b, .stat-tile.main span, .stat-tile.main small { color: white; }
.client-note { color: var(--amber); }
.analytics-filters { display: grid; gap: .8rem; }
.period-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.analytics-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; }
.analytics-fields label { display: grid; gap: .25rem; min-width: 0; }
.analytics-fields input, .analytics-fields select { min-width: 0; width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -.2rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th, .data-table td { padding: .5rem .55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.data-table th { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.data-table td:nth-child(4), .data-table td:nth-child(3) { white-space: normal; min-width: 8rem; }
.data-table .num { text-align: right; }
.source-row { padding: 1rem; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.source-row.blocked { opacity: .65; }
#price-error, [data-client-error] { white-space: pre-line; }
@media (max-width: 640px) {
  .client-stats, .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-link { grid-template-columns: minmax(0, 1fr) auto; }
  .invite-platform { grid-column: 1 / -1; }
  .rating-bar, .series-row { grid-template-columns: 4.6rem minmax(0, 1fr) 5.2rem; }
}
