/* m.css — мобильный «Журнал записи». С 3.1.5 — фирменный стиль Body Beauty (как на печати, сайте и в программе на ПК):
   кнопки малиновые, ссылки и значки синие, выбранное — индиго, заголовки Philosopher, текст Montserrat, мазки по краям экранов входа.
   Тёмная тема — по настройке телефона. Зоны нажатия не меньше 44 px. Шрифты и мазки — в brand/ (их же берёт программа на ПК). */
@font-face { font-family: 'BB Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(brand/Montserrat-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'BB Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(brand/Montserrat-latin.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'BB Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(brand/Montserrat-latin-ext.woff2) format('woff2'); unicode-range: U+20A0-20AB, U+20AD-20C4; }
@font-face { font-family: 'BB Philosopher'; font-style: normal; font-weight: 700; font-display: swap; src: url(brand/Philosopher-700-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'BB Philosopher'; font-style: normal; font-weight: 700; font-display: swap; src: url(brand/Philosopher-700-latin.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f2f3f9; --surface: #ffffff; --surface-2: #f6f6fc;
  --ink: #1e1f37; --ink-2: #434560; --muted: #64657c;
  --accent: #2e629f; --accent-fill: #c80862; --accent-d: #36307c; --accent-soft: #ecedfd; --accent-line: #c5c7eb;
  --head: #36307c; --berry: #c80862;
  --danger: #d70015; --danger-soft: #ffeceb; --ok: #1f7f38; --warn: #a64b00; --warn-soft: #fff2dc;
  --line: rgba(54, 48, 124, .12); --line-2: rgba(54, 48, 124, .26);
  --st-wait: #ff9500; --st-confirmed: #007aff; --st-arrived: #34c759; --st-noshow: #ff3b30; --st-canceled: #8e8e93;
  --shadow: 0 8px 30px rgba(40, 34, 104, .18);
  --shadow-fill: 0 2px 4px rgba(200, 8, 98, .22), 0 8px 20px rgba(200, 8, 98, .2);
  --font: "BB Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "BB Philosopher", "BB Montserrat", Georgia, serif;
  --r: 12px; --r-l: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13141d; --surface: #1e1e28; --surface-2: #181822;
    --ink: #eaebf0; --ink-2: #c9cacf; --muted: #aaaaaf;
    --accent: #7dc9ed; --accent-fill: #c80862; --accent-d: #cacdf8; --accent-soft: #2c2c4e; --accent-line: #515284;
    --head: #e4e6fc; --berry: #f8719a;
    --danger: #ff7a73; --danger-soft: #3a1c1c; --ok: #55d98a; --warn: #ffb54d; --warn-soft: #3a2a10;
    --line: rgba(235, 235, 245, .14); --line-2: rgba(235, 235, 245, .3);
    --st-wait: #ff9f0a; --st-confirmed: #0a84ff; --st-arrived: #30d158; --st-noshow: #ff453a; --st-canceled: #98989d;
    --shadow: 0 8px 30px rgba(0, 0, 0, .55);
    --shadow-fill: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 20px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink); overscroll-behavior: none;
  font: 16px/1.4 var(--font); letter-spacing: -.01em;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
.muted { color: var(--muted); }
.noscript { padding: 24px; }

/* ---------- каркас ---------- */
.app { position: fixed; inset: var(--net-h, 0px) 0 0 0; display: flex; flex-direction: column; overflow-y: auto; padding-top: env(safe-area-inset-top); background: var(--bg); }
html.has-net .app { padding-top: 0; }
.shell { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tab-host { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.boot { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); }
.boot-dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.net { position: fixed; top: 0; left: 0; right: 0; z-index: 130; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--warn-soft); color: var(--warn); font-size: 14px; text-align: center; border-bottom: 1px solid var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }

.ic { display: inline-flex; flex: none; line-height: 0; }
.ic svg { display: block; }

/* ---------- кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 16px; text-align: center;
}
.btn:active { filter: brightness(.94); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--accent-fill); border-color: transparent; color: #fff; box-shadow: var(--shadow-fill); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger-o { color: var(--danger); border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.lg { min-height: 52px; font-size: 17px; }
.btn.block { display: flex; width: 100%; }
.btn.grow { flex: 1; }
.ib { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); padding: 0; }
.ib:active { background: var(--surface-2); }
.ib.sq { border: 1px solid var(--line-2); border-radius: var(--r); font-size: 24px; background: var(--surface); }
.ib.in-field { position: absolute; right: 2px; top: 1px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row-btns .btn { flex: 1; min-width: 0; gap: 6px; padding: 0 4px; font-size: 14px; white-space: nowrap; }
.row-btns .btn svg { width: 16px; height: 16px; flex: none; }

.inp {
  display: block; width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 16px; outline: none; appearance: none; -webkit-appearance: none;
}
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp::placeholder { color: var(--muted); opacity: .8; }
textarea.inp.area { padding: 10px 14px; min-height: 84px; resize: vertical; line-height: 1.4; }
input[type="date"].inp, input[type="time"].inp { min-width: 0; }
.field { position: relative; display: block; }
.field > .ic:first-child:not(.ib) { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field .inp.search { padding-left: 42px; }
.field .inp[type="password"], .field .inp[type="text"] { padding-right: 48px; }
.field .inp.search { padding-right: 14px; }
.lbl { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form-msg { min-height: 20px; font-size: 14px; color: var(--danger); }
.hint { font-size: 13px; color: var(--muted); }
.hint.err { color: var(--danger); }
.hint.warn { color: var(--warn); }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- экраны входа ---------- */
.center-screen { margin: auto; width: 100%; max-width: 420px; padding: 28px 22px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.center-screen h1 { text-align: center; font: 700 26px/1.2 var(--font-head); letter-spacing: 0; color: var(--head); margin-top: 4px; }
.center-screen > p { text-align: center; }
.brand-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px; background: var(--accent-soft); color: var(--accent); }
.brand-mark.warn { background: var(--warn-soft); color: var(--warn); }
/* знак студии (кольцо) вместо значка на экранах входа, подключения и «нет связи» */
.brand-mark.logo { width: 96px; height: 96px; background: none; }
.brand-mark.logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (prefers-color-scheme: dark) { .brand-mark.logo { background: #fff; padding: 5px; } }
/* мазки с печати над и под содержимым экранов входа: у них своё место в колонке, поэтому на текст они не ложатся;
   уходят только за правый и левый край экрана; на низких экранах их нет */
.center-screen::before, .center-screen::after { content: ""; display: block; flex: none; height: 76px; margin: 0 -22px; background-repeat: no-repeat; pointer-events: none; }
.center-screen::before { margin-bottom: 2px; background-image: url(brand/wave-1.webp); background-size: auto 100%; background-position: right -46px top; }
.center-screen::after { margin-top: 10px; background-image: url(brand/wave-3.webp); background-size: auto 100%; background-position: left -40px bottom; }
@media (max-height: 700px) { .center-screen::before, .center-screen::after { display: none; } }
.pass-form { display: flex; flex-direction: column; gap: 8px; }
.pass-form .btn { margin-top: 6px; }
.login .btn[type="submit"] { margin-top: 6px; }
.login .chips { flex-wrap: wrap; padding: 2px 0 6px; }
/* 3.1.4: подключение из браузера (айфон) и подсказка «На экран Домой» */
.code-in { font-size: 26px; font-weight: 600; letter-spacing: .14em; text-align: center; font-variant-numeric: tabular-nums; min-height: 56px; }
.inst { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inst-i { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.inst-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: #fff; font-size: 15px; font-weight: 700; }
.inst-t { flex: 1; min-width: 0; padding-top: 2px; }
.inst-ic { display: inline-grid; place-items: center; vertical-align: -5px; margin-left: 6px; color: var(--accent); }
.inst-code { align-self: center; padding: 10px 22px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); font-size: 30px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.install .hint { text-align: center; }

/* ---------- чипы, статусы ---------- */
.chips { display: flex; gap: 8px; padding: 2px 12px 6px; }
.chips.wrap { flex-wrap: wrap; padding: 0; }
.chips.scroll-x { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 44px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip.static { background: var(--surface-2); border-style: dashed; }
.chip.rm .ic { opacity: .7; }
.chip:disabled { opacity: .55; }
.chip i, .chip-st i { width: 9px; height: 9px; border-radius: 50%; background: var(--st, var(--muted)); flex: none; }
.chip i.dot { background: var(--c, var(--accent)); }
.chip.st.on { background: color-mix(in srgb, var(--st) 16%, var(--surface)); border-color: var(--st); color: var(--ink); }
.st-wait { --st: var(--st-wait); } .st-confirmed { --st: var(--st-confirmed); } .st-arrived { --st: var(--st-arrived); }
.st-noshow { --st: var(--st-noshow); } .st-canceled { --st: var(--st-canceled); }
.chip-st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--surface-2); white-space: nowrap; }
@supports (background: color-mix(in srgb, red 10%, blue)) { .chip-st { background: color-mix(in srgb, var(--st) 16%, transparent); } }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.ava { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--c, var(--accent)); }
@supports (background: color-mix(in srgb, red 10%, blue)) { .ava { background: color-mix(in srgb, var(--c) 20%, var(--surface)); } }

/* ---------- нижнее меню ---------- */
.nav { display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); flex: none; }
.nav-i { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 2px; }
.nav-i.on { color: var(--accent-d); }
.nav-i span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- журнал: день ---------- */
.dv-head, .sv-head, .cv-head { flex: none; background: var(--surface); border-bottom: 1px solid var(--line); }
.dv-top { display: flex; align-items: center; padding: 4px 6px 0; }
.dv-title { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; font-size: 18px; font-weight: 700; color: var(--ink); padding: 0 6px; }
.dv-title.static { cursor: default; }
.today-btn { display: block; margin: 0 auto 2px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 99px; background: var(--accent-soft); color: var(--accent-d); font-weight: 700; font-size: 15px; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 4px 8px 8px; }
.dy { min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 14px; background: none; color: var(--ink); padding: 2px 0; }
.dy-w { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.dy-d { font-size: 18px; font-weight: 700; }
.dy-n { min-height: 14px; font-size: 11px; font-weight: 700; color: var(--accent); }
.dy-n.on { }
.dy.today .dy-d { color: var(--accent); }
.dy.sel { background: var(--accent-fill); color: #fff; box-shadow: var(--shadow-fill); }
.dy.sel .dy-w, .dy.sel .dy-n, .dy.sel .dy-d { color: #fff; }
.dv-list { touch-action: pan-y; padding-bottom: 8px; }
.grp { margin: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.grp-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.grp-n { flex: 1; min-width: 0; }
.grp-n b { display: block; }
.grp-n span { display: block; font-size: 13px; color: var(--muted); }
.grp-c { font-size: 12px; color: var(--muted); text-align: right; flex: none; }
.rr, .hist {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px 14px 10px 10px;
  text-align: left; border: 0; border-top: 1px solid var(--line); border-left: 4px solid var(--st, var(--muted)); background: var(--surface); color: var(--ink);
}
.rr:active, .hist:active { background: var(--surface-2); }
.rr.st-canceled .rr-c, .hist.st-canceled .rr-c { text-decoration: line-through; }
.rr.st-canceled, .hist.st-canceled, .rr.st-noshow { opacity: .75; }
.rr-t b, .hist-d b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.rr-t span, .hist-d span { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rr-room { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.rr-c { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-m { min-width: 0; }
.rr-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rr-sum { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hist { grid-template-columns: 60px minmax(0, 1fr) auto; border-radius: 0; }
.list-end { padding: 70px 16px 12px; text-align: center; font-size: 13px; color: var(--muted); }
.fab {
  position: absolute; right: 16px; bottom: 16px; width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--accent-fill); color: #fff; box-shadow: var(--shadow-fill), var(--shadow); z-index: 5;
}
.fab:active { transform: scale(.95); }

/* ---------- пустые и ошибочные состояния ---------- */
.spin-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; color: var(--muted); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 44px 28px; color: var(--muted); }
.empty b { font-size: 17px; color: var(--ink); }
.empty.err { color: var(--ink-2); }
.empty.err > .ic { color: var(--danger); }
.empty .btn { margin-top: 8px; }

/* ---------- листы ---------- */
.sh-wrap { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sh-wrap.in { pointer-events: auto; }
.sh-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s ease; }
.sh-wrap.in .sh-back { opacity: 1; }
.sh {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 36px - env(safe-area-inset-top)); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sh.full { height: calc(100% - 36px - env(safe-area-inset-top)); }
.sh-wrap.in .sh { transform: translateY(0); }
.sh-head { flex: none; touch-action: none; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: 22px 22px 0 0; }
.sh-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; }
.sh-bar { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 18px; }
.sh-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 0 18px; }
.sh-foot { flex: none; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.foot-row { display: flex; gap: 10px; }

/* ---------- диалоги и уведомления ---------- */
.dlg-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: none; }
.dlg-wrap.in { pointer-events: auto; }
.dlg-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s; }
.dlg-wrap.in .dlg-back { opacity: 1; }
.dlg { position: relative; width: 100%; max-width: 360px; max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: var(--r-l); padding: 20px 18px 16px; box-shadow: var(--shadow); opacity: 0; transform: scale(.95); transition: opacity .2s, transform .2s; }
.dlg-wrap.in .dlg { opacity: 1; transform: none; }
.dlg h3 { font-size: 18px; margin-bottom: 6px; }
.dlg p { color: var(--ink-2); }
.dlg ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.dlg li { margin-bottom: 4px; }
.dlg-btns { display: flex; gap: 10px; margin-top: 18px; }
.dlg-btns .btn { flex: 1; padding: 0 8px; }
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 420px; padding: 12px 16px; border-radius: var(--r); background: #1c2b2e; color: #fff; font-size: 15px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.err { background: var(--danger); }
.toast.in { opacity: 1; transform: none; }

/* ---------- карточка записи, блоки ---------- */
.blk { margin: 10px 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.blk h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.blk.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.blk.two h3 { margin-bottom: 6px; }
.blk-in { display: flex; flex-direction: column; gap: 10px; }
.rc-top { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 16px 2px; }
.rc-when b { display: block; font-size: 20px; }
.rc-when span { color: var(--muted); }
.banner { display: flex; align-items: flex-start; gap: 10px; margin: 10px 12px; padding: 12px 14px; border-radius: var(--r); font-size: 14px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.err { background: var(--danger-soft); color: var(--danger); }
.person { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 2px 0; text-align: left; background: none; border: 0; color: var(--ink); }
.person:disabled { opacity: 1; }
.person.plain { cursor: default; }
.person-n { flex: 1; min-width: 0; }
.person-n b { display: block; overflow: hidden; text-overflow: ellipsis; }
.person-n span { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin-bottom: 6px; padding: 6px 10px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--ink); }
.pick:active { background: var(--accent-soft); }
.pick.big { background: var(--surface); margin: 8px 12px 0; width: calc(100% - 24px); min-height: 64px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv:first-child { border-top: 0; }
.kv span { color: var(--muted); flex: none; }
.kv b { font-weight: 600; text-align: right; min-width: 0; word-break: break-word; }
.kv.warn b { color: var(--warn); }
.svc { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.svc:first-of-type { border-top: 0; }
.svc b { display: block; font-weight: 600; }
.svc span { font-size: 13px; color: var(--muted); }
.svc em { font-style: normal; font-weight: 700; white-space: nowrap; }
.sum { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--line); }
.sum > div { display: flex; justify-content: space-between; padding: 3px 0; }
.sum span { color: var(--muted); }
.sum .due b { color: var(--danger); }
.dur { display: flex; align-items: center; gap: 8px; }
.dur-i { width: 96px; text-align: center; font-weight: 700; }
.dur-u { color: var(--muted); flex: 1; }
.dur .ib.sq:last-child { margin-left: auto; }

/* ---------- услуги в форме ---------- */
.sticky-q { position: sticky; top: 0; z-index: 2; padding: 10px 12px; background: var(--bg); }
.cat-h { margin: 14px 16px 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.svc-pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 16px; text-align: left; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.svc-pick:last-child { border-bottom: 1px solid var(--line); }
.tick { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-2); color: #fff; }
.svc-pick.on { background: var(--accent-soft); }
.svc-pick.on .tick { background: var(--accent-fill); border-color: var(--accent-fill); }
.svc-pick-n { flex: 1; min-width: 0; }
.svc-pick-n b { display: block; font-weight: 600; }
.svc-pick-n span { font-size: 13px; color: var(--muted); }

/* ---------- клиенты ---------- */
.cv-head { padding: 12px 14px 12px; }
.ttl { font: 700 29px/1.15 var(--font-head); letter-spacing: 0; color: var(--head); margin: 8px 16px 10px; }
.cv-head .ttl { margin: 4px 2px 10px; }
.cv-list { padding-bottom: 14px; }
.cc-top { display: flex; align-items: center; gap: 14px; padding: 12px 16px 4px; }
.cc-top .ava { width: 52px; height: 52px; font-size: 18px; }
.cc-name { display: block; font-size: 20px; }
.cc-top + .row-btns { padding: 0 12px; }

/* ---------- график ---------- */
.sv-head { padding-bottom: 6px; }
.sv-list { padding-bottom: 12px; }
.sched-sum { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin: 10px 12px; }
.sched-sum > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 10px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-height: 76px; }
.sched-sum b { font-size: 22px; line-height: 1.1; }
.sched-sum span { font-size: 12px; color: var(--muted); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; }
.cal-m { font-size: 17px; font-weight: 700; }
.cal, .sgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 4px 12px 8px; }
.cal-w { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal-d { position: relative; min-height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 600; }
.cal-d.other { background: transparent; color: var(--muted); font-weight: 400; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-d.sel { background: var(--accent-fill); color: #fff; }
.cal-dot { position: absolute; bottom: 6px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.cal-d.sel .cal-dot { background: #fff; }
.sc { position: relative; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 5px 2px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); }
.sc.empty { background: transparent; }
.sc.work { background: var(--accent-soft); }
.sc.off { color: var(--muted); }
.sc.today { box-shadow: inset 0 0 0 2px var(--accent); }
.sc-d { font-size: 15px; font-weight: 700; }
.sc-h { font-size: 10px; line-height: 1.15; color: var(--ink-2); text-align: center; font-variant-numeric: tabular-nums; }
.sc-o { font-size: 11px; }
.sc-n { position: absolute; top: -6px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-shadow: 0 0 0 2px var(--bg); background: var(--accent-fill); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- профиль ---------- */
.more { padding-bottom: 16px; }
.prof { display: flex; align-items: center; gap: 14px; padding: 4px 16px 6px; }
.prof .ava { width: 52px; height: 52px; font-size: 18px; }
.prof b { display: block; font-size: 18px; }
.prof span { color: var(--muted); font-size: 14px; }
.menu { margin: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.menu-i { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font-size: 16px; text-align: left; }
.menu-i:first-child { border-top: 0; }
.menu-i:active { background: var(--surface-2); }
.menu-i span:not(.ic) { flex: 1; }
.menu-i > .ic:last-child { color: var(--muted); }
.menu-i.danger { color: var(--danger); }
.menu-i.danger > .ic:last-child { color: var(--danger); }
.about { margin: 12px; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); font-size: 14px; }
.about > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.about > div:first-child { border-top: 0; }
.about span { color: var(--muted); }
.about b { font-weight: 600; text-align: right; }
.mi-sub { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }

/* ---------- быстрый вход: экран ПИН, клавиатура (2.7.0) ---------- */
.lock, .pin-setup { gap: 4px; }
.lock .ava { width: 76px; height: 76px; margin: 0 auto 6px; font-size: 26px; }
.lock h1 { font-family: var(--font); font-size: 22px; color: var(--ink); }
.lock .form-msg, .pin-setup .form-msg { text-align: center; }
.pin-slot { display: flex; flex-direction: column; }
.pin-slot .pass-form { margin-top: 10px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 16px 0 8px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-fill); transition: background-color .12s; }
.pin-dots i.on { background: var(--accent-fill); }
.pin-dots.shake { animation: pin-shake .36s ease-in-out; }
@keyframes pin-shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 74px); justify-content: center; gap: 12px 24px; margin: 6px 0 12px; }
.pin-pad > span { width: 74px; height: 74px; }
.pin-k { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; display: grid; place-items: center; touch-action: manipulation; transition: background-color .1s, transform .1s; }
.pin-k:active { background: var(--accent-soft); transform: scale(.95); }
.pin-k.del, .pin-k.bio { border-color: transparent; background: none; color: var(--accent); }
.pin-k[hidden] { display: grid; visibility: hidden; }
.q-lead { padding: 6px 16px 0; }
.q-note { padding: 0 16px; }
@media (max-height: 640px) { .pin-pad { gap: 8px 22px; } .pin-k, .pin-pad > span { width: 64px; height: 64px; font-size: 24px; } .lock .ava { width: 56px; height: 56px; font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } .pin-k:active { transform: none; } }

/* ---------- выпадающие списки «Филиал» и «Мастер» (2.1.0) ---------- */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 12px 8px; }
.picks.one { grid-template-columns: 1fr; }
.picks .pick.wide { grid-column: 1 / -1; }
.pick.sub { border-color: var(--warn, #b26a00); }
.pick.sub .pick-l { color: var(--warn, #b26a00); font-weight: 600; }
.pick.off { opacity: .75; }
.pick {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px; min-width: 0; min-height: 52px;
  padding: 5px 10px 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); text-align: left; font: inherit;
}
.pick[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick:active { background: var(--surface-2); }
.pick-l { grid-column: 1; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.pick-v { grid-column: 1; display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 15px; line-height: 1.3; }
.pick-v b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick > .ic { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); transition: transform .15s; }
.pick[aria-expanded="true"] > .ic { transform: rotate(180deg); color: var(--accent); }
.pick-wrap { position: fixed; inset: 0; z-index: 90; }
.pick-back { position: absolute; inset: 0; }
.pick-list {
  position: fixed; overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow); opacity: 0; transform: translateY(-4px); transform-origin: top center; transition: opacity .14s ease, transform .14s ease;
}
.pick-list.up { transform: translateY(4px); transform-origin: bottom center; }
.pick-wrap.in .pick-list { opacity: 1; transform: none; }
.pick-o { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; text-align: left; }
.pick-o > span:not(.ic) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-o:active, .pick-o:focus-visible { background: var(--surface-2); outline: none; }
.pick-o.on { color: var(--accent); font-weight: 700; }
.pick-o.on .ic { color: var(--accent); }

/* ---------- «Посмотреть как…» (2.1.0) ---------- */
.pv-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 14px; }
.pv-bar > .ic { color: var(--warn); flex: none; }
.pv-bar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-x { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--warn); border-radius: 99px; background: var(--surface); color: var(--warn); font: inherit; font-size: 14px; font-weight: 700; }
.pv-note { display: flex; gap: 12px; margin: 12px; padding: 12px 14px; border-radius: var(--r-l); background: var(--warn-soft); color: var(--ink); font-size: 14px; }
.pv-note > .ic { color: var(--warn); flex: none; margin-top: 1px; }
.pv-note b { display: block; font-size: 15px; margin-bottom: 2px; }
.pv-note span { color: var(--ink-2); }
.pv-hint { margin: 4px 16px 0; }
.pv-group { margin: 16px 16px -4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pv-i b { display: block; font-weight: 600; }
.pv-i small { display: block; font-size: 13px; color: var(--muted); }

/* ---------- снимки (2.2.0) ---------- */
.im-open { margin-top: 8px; }
.cc-img { padding: 4px 12px 0; }
.banner.im-disc { background: var(--accent-soft); color: var(--ink); }
.banner.im-disc > .ic { color: var(--accent); flex: none; }
.im-list { display: flex; flex-direction: column; gap: 8px; padding: 2px 12px 16px; }
.im-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px 10px 10px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.im-card:active { background: var(--surface-2); }
.im-card > .ic { flex: none; color: var(--muted); }
.im-th { flex: none; display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 10px; background: #000; color: rgba(255, 255, 255, .55); }
.im-th img { width: 100%; height: 100%; object-fit: cover; }
.im-th.wait { background: linear-gradient(90deg, #111 0%, #2a2f31 50%, #111 100%); background-size: 200% 100%; animation: im-wait 1.2s linear infinite; }
@keyframes im-wait { to { background-position: -200% 0; } }
.im-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.im-m b { font-size: 16px; font-weight: 700; }
.im-m span { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-m span.muted { color: var(--muted); font-size: 13px; }

.iv { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: #000; color: #fff; opacity: 0; transition: opacity .18s ease; }
.iv.in { opacity: 1; }
.iv-top { flex: none; display: flex; align-items: center; gap: 4px; padding: calc(env(safe-area-inset-top, 0px) + 4px) 8px 4px; }
.iv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 4px; }
.iv-t b, .iv-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-t b { font-size: 16px; }
.iv-t span { font-size: 13px; color: rgba(255, 255, 255, .65); }
.iv .ib { color: #fff; }
.iv .ib:active { background: rgba(255, 255, 255, .14); }
.iv .ib:disabled { opacity: .35; }
.iv-tg[aria-pressed="true"] { background: var(--accent-fill); }
.iv-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; min-height: 120px; }
.iv-img { position: absolute; transform-origin: center center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.iv-img.anim { transition: transform .22s ease; }
.iv-load { position: absolute; top: 12px; right: 12px; }
.iv-load .spin { width: 22px; height: 22px; border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
.iv-err { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: rgba(0, 0, 0, .75); }
.iv-err[hidden], .iv-load[hidden], .iv-nav[hidden], .iv-picks[hidden] { display: none; }
.iv-bot { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 16px calc(env(safe-area-inset-bottom, 0px) + 8px); }
.iv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .8); font-variant-numeric: tabular-nums; }
.iv-win { text-align: right; color: rgba(255, 255, 255, .6); }
.iv-nav { display: flex; align-items: center; gap: 4px; margin: 0 -8px; }
.iv-range { flex: 1; min-width: 0; height: 44px; accent-color: var(--accent); }
.iv-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-picks > .pick { flex: 1 1 140px; margin: 0; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.iv-picks > .pick .pick-l { color: rgba(255, 255, 255, .6); }
.iv-picks > .pick .ic { color: rgba(255, 255, 255, .7); }
.iv-disc { display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .65); }
.iv-disc > .ic { flex: none; margin-top: 1px; }

@media (min-width: 560px) {
  .sh { left: 50%; right: auto; width: 520px; transform: translate(-50%, 105%); }
  .sh-wrap.in .sh { transform: translate(-50%, 0); }
  .shell, .tab-host { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 2.4.0: брони кабинета приходящими мастерами (только просмотр) */
.grp-rent .rent-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, #7c5cc4 16%, var(--surface)); color: #6a4bb3; flex: none; }
.rr.rr-rent { --st: #7c5cc4; background: repeating-linear-gradient(135deg, var(--surface) 0 9px, color-mix(in srgb, #7c5cc4 7%, var(--surface)) 9px 18px); cursor: pointer; }
.rr.rr-rent:active { background: repeating-linear-gradient(135deg, var(--surface) 0 9px, color-mix(in srgb, #7c5cc4 7%, var(--surface)) 9px 18px); }
.chip-st.rent { --st: #7c5cc4; }
