/* Uxella — оформление кабинета. Система ЮниксAI/Uvexa (ТЗ §15), токены — из прототипа
   prototype/uxella-master.html: бумага #FCFBF7, ink #141719, кислотный #C8FF00 только заливкой под
   тёмным текстом (текстовый вариант — #4A6300). Шрифты — со своего сервера (public/fonts). */

@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/onest-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/onest-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/static/fonts/golos-text-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/static/fonts/golos-text-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fcfbf7; --bg-2: #f1efe6; --surface: #ffffff;
  --text: #141719; --text-2: #6e7168; --line: rgba(20, 23, 25, 0.12); --line-2: rgba(20, 23, 25, 0.22);
  --island: #141719; --on-island: #f5f3ec; --on-island-2: #9da298; --line-island: rgba(245, 243, 236, 0.14);
  --acid: #c8ff00; --acid-ink: #4a6300; --acid-soft: #f2fad0;
  --coral: #a83426; --coral-soft: #f8e6e3; --amber: #86620a; --amber-soft: #f7efd9; --sky: #3b6e86; --sky-soft: #e7eef2;
  --btn-bg: #141719; --btn-fg: #f5f3ec;
  --f-d: "Onest", -apple-system, "Segoe UI", Arial, sans-serif;
  --f-b: "Golos Text", -apple-system, "Segoe UI", Arial, sans-serif;
  --f-m: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 18px; --e: cubic-bezier(0.22, 0.61, 0.36, 1);
  --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101312; --bg-2: #0a0c0b; --surface: #191e1b;
    --text: #f1efe8; --text-2: #9da298; --line: rgba(245, 243, 236, 0.11); --line-2: rgba(245, 243, 236, 0.22);
    --island: #222924;
    --acid-ink: #c8ff00; --acid-soft: rgba(200, 255, 0, 0.12);
    --coral: #f0907f; --coral-soft: rgba(240, 144, 127, 0.14);
    --amber: #e3b75a; --amber-soft: rgba(227, 183, 90, 0.14); --sky: #8db9ce; --sky-soft: rgba(141, 185, 206, 0.14);
    --btn-bg: #c8ff00; --btn-fg: #141719;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101312; --bg-2: #0a0c0b; --surface: #191e1b;
  --text: #f1efe8; --text-2: #9da298; --line: rgba(245, 243, 236, 0.11); --line-2: rgba(245, 243, 236, 0.22);
  --island: #222924;
  --acid-ink: #c8ff00; --acid-soft: rgba(200, 255, 0, 0.12);
  --coral: #f0907f; --coral-soft: rgba(240, 144, 127, 0.14);
  --amber: #e3b75a; --amber-soft: rgba(227, 183, 90, 0.14); --sky: #8db9ce; --sky-soft: rgba(141, 185, 206, 0.14);
  --btn-bg: #c8ff00; --btn-fg: #141719;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
html { background: var(--bg-2); }
body {
  margin: 0; background: var(--bg-2); color: var(--text);
  font-family: var(--f-b); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-family: var(--f-d); font-weight: 600; margin: 0; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; border-radius: 8px; }
.num { font-family: var(--f-m); font-variant-numeric: tabular-nums; }

/* Мобильный каркас: колонка до 440px по центру, от 360px без горизонтальной прокрутки. */
.app {
  max-width: 440px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); overflow-x: hidden;
}
.screen { display: flex; flex-direction: column; gap: 22px; padding: 18px 16px 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top h1 { font-size: 26px; }
.top .sub { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.avatar {
  width: var(--tap); height: var(--tap); border-radius: 50%; flex: none;
  background: var(--island); color: var(--acid);
  display: grid; place-items: center; font-family: var(--f-d); font-weight: 700; font-size: 18px; text-decoration: none;
}
.brand { font-family: var(--f-m); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.brand::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 1px var(--line-2); }

/* Тёмный остров — сводка дня (как в прототипе). */
.island {
  background: var(--island); color: var(--on-island); border-radius: var(--r); padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.island small { font-family: var(--f-m); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-island-2); }
.island .clock { font-family: var(--f-d); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.island .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pill-acid {
  background: var(--acid); color: #141719; border-radius: 99px; padding: 8px 14px;
  font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.note {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px; font-size: 14px;
}
.note .meta { color: var(--text-2); font-size: 13px; }
.note code { font-family: var(--f-m); font-size: 12.5px; }

/* Нижняя панель вкладок. Экраны — С7–С8, пока вкладки не нажимаются. */
.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(440px, 100%); z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  /* Столько колонок, сколько вкладок (С22: шесть с «Сайтом», в ограниченном режиме — одна). */
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding: 6px 2px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tab {
  min-height: var(--tap); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 4px 0; font-size: 11px; color: var(--text-2); text-decoration: none; min-width: 0;
}
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab .ic { padding: 3px 14px; border-radius: 99px; display: grid; place-items: center; }
@media (max-width: 400px) { .tab { font-size: 10.5px; letter-spacing: -0.01em; } .tab .ic { padding: 3px 10px; } }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] .ic { background: var(--acid); color: #141719; }
.tab[aria-disabled="true"] { cursor: default; }

/* Страница ошибки. */
.error { max-width: 440px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding: 48px 20px; display: flex; flex-direction: column; gap: 14px; }
.error .code { font-family: var(--f-m); font-size: 13px; letter-spacing: 0.12em; color: var(--text-2); }
.error .rid { font-family: var(--f-m); font-size: 12px; color: var(--text-2); }

/* ─── Кабинет (С7): компоненты из прототипа prototype/uxella-master.html ─────────────────────── */

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
.lbl { font-family: var(--f-m); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lbl .cnt { background: var(--coral-soft); color: var(--coral); padding: 2px 8px; border-radius: 99px; letter-spacing: 0.04em; }
.block { display: flex; flex-direction: column; gap: 10px; }
.sub { color: var(--text-2); font-size: 14px; }

.island { position: relative; overflow: hidden; gap: 16px; }
.island::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, var(--line-island) 1px, transparent 1px); background-size: calc(100% / 6) 100%; opacity: 0.45; -webkit-mask-image: linear-gradient(#000, transparent 90%); mask-image: linear-gradient(#000, transparent 90%); }
.island > * { position: relative; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat b { display: block; font-family: var(--f-d); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.stat span { font-size: 12px; color: var(--on-island-2); }
.next { border-top: 1px solid var(--line-island); padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.next small { display: block; font-family: var(--f-m); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-island-2); }
.next strong { font-weight: 500; }
.pill-acid { min-height: var(--tap); text-decoration: none; }
.botline { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--on-island-2); }
.botline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); flex: none; animation: pulse 2.4s var(--e) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .botline .dot { animation: none; } }

.alert { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 10px; }
.alert.warn { border-left: 3px solid var(--amber); }
.alert.need { border-left: 3px solid var(--coral); }
.alert p { font-size: 14px; overflow-wrap: anywhere; }
.alert p b { font-weight: 600; }
.alert .meta { font-size: 12.5px; color: var(--text-2); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acts form { display: contents; }

/* Кнопки: цель нажатия не меньше 44 px (ТЗ §15). */
.btn {
  min-height: var(--tap); padding: 0 16px; border-radius: 99px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
  background: var(--btn-bg); color: var(--btn-fg); transition: transform 0.15s var(--e);
}
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.danger { background: transparent; color: var(--coral); box-shadow: inset 0 0 0 1px var(--coral); }
.btn.sm { padding: 0 13px; font-size: 13.5px; }
.btn.wide { width: 100%; }

/* Расписание дня. */
.day { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.row .t { font-family: var(--f-m); font-size: 13px; color: var(--text-2); padding-top: 13px; font-variant-numeric: tabular-nums; }
.row .body { padding: 6px 0; min-width: 0; }
.appt { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; text-decoration: none; min-height: var(--tap); }
.appt .who { font-weight: 600; overflow-wrap: anywhere; }
.appt .what { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.appt.new { box-shadow: 0 0 0 2px var(--acid); }
.appt.done, .appt.bad { opacity: 0.75; }
.st { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; flex: none; }
.st.ok, .st.done { background: var(--acid-soft); color: var(--acid-ink); }
.st.wait { background: var(--amber-soft); color: var(--amber); }
.st.new { background: var(--sky-soft); color: var(--sky); }
.st.pending, .st.bad { background: var(--coral-soft); color: var(--coral); }
.gap { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 11px 13px; display: flex; flex-direction: column; gap: 9px; }
.gap .g1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gap .g1 b { font-weight: 600; color: var(--acid-ink); }
.gap .fits { font-size: 12.5px; color: var(--text-2); }
.gap.closed { background: repeating-linear-gradient(135deg, transparent 0 7px, var(--line) 7px 8px); }
.gap.closed .g1 b { color: var(--text-2); }
.dayoff { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--text-2); }

/* Календарь: лента дней. Прокручивается только лента — страница вбок не уезжает. */
.week { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.week::-webkit-scrollbar { display: none; }
.dchip { flex: none; width: 54px; min-height: 64px; border-radius: 14px; padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.dchip .wd { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.dchip .dn { font-family: var(--f-d); font-weight: 600; font-size: 19px; }
.dchip .load { width: 26px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.dchip .load i { display: block; height: 100%; background: var(--text); }
.dchip.off { opacity: 0.5; }
.dchip.today { box-shadow: inset 0 0 0 1.5px var(--acid-ink); }
.dchip.sel { background: var(--island); border-color: var(--island); color: var(--on-island); opacity: 1; }
.dchip.sel .wd { color: var(--on-island-2); }
.dchip.sel .load { background: var(--line-island); }
.dchip.sel .load i { background: var(--acid); }
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dayhead h2 { font-size: 20px; }
.dayhead .sub { font-size: 13px; }

/* Переключатель «Выходной» — настоящий чекбокс в форме. */
.sw { position: relative; width: 46px; height: 28px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background 0.2s; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--e); }
.sw input:checked + span { background: var(--acid-ink); }
.sw input:checked + span::after { transform: translateX(18px); }
.sw input:focus-visible + span { outline: 2px solid var(--acid); outline-offset: 2px; }
.swrow { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); min-height: var(--tap); cursor: pointer; }

/* Формы: поля от 16 px — iOS не приближает страницу. */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h2 { font-size: 18px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); min-width: 0; }
.field input, .field select, .field textarea {
  font-size: 16px; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); padding: 0 12px; width: 100%; min-width: 0;
}
.field textarea { padding: 10px 12px; min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--acid); outline-offset: 1px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--acid-ink); flex: none; }
details.more summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; font-size: 14px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--text-2); }
details.more[open] summary::after { content: "−"; }

.flash { border-radius: 14px; padding: 12px 14px; font-size: 14px; background: var(--acid-soft); color: var(--text); border: 1px solid var(--line); }
.flash.err { background: var(--coral-soft); color: var(--coral); }

.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.li { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); text-decoration: none; min-height: var(--tap); }
.li:first-child { border-top: 0; }
.li .ava { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-weight: 600; font-family: var(--f-d); flex: none; }
.li .mid { flex: 1; min-width: 0; }
.li .n { font-weight: 600; overflow-wrap: anywhere; }
.li .s { font-size: 13px; color: var(--text-2); }
.li[aria-current="true"] { background: var(--acid-soft); }
.tag { display: inline-flex; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.tag.red { background: var(--coral-soft); color: var(--coral); }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--text-2); text-decoration: none; font-size: 14px; align-self: flex-start; }
.hint { font-size: 13px; color: var(--text-2); }

/* Вход. */
.login { max-width: 440px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding: 40px 20px; display: flex; flex-direction: column; gap: 18px; }
.login h1 { font-size: 28px; }
.login ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.login code { font-family: var(--f-m); font-size: 14px; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.kv dd a { display: inline-block; padding: 13px 0; margin: -13px 0; }
.nw { white-space: nowrap; }
.dchip.sel { border-color: color-mix(in srgb, var(--acid-ink) 70%, var(--island)); }

/* ─── Кабинет С8: переписки, клиентки, настройки, публичная страница ─── */
/* Tabs: badge "need you" on Chats. */
.tab .ic { position: relative; }
.tab .badge { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border-radius: 99px; padding: 4px; gap: 4px; }
.seg a { min-height: 38px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--text-2); display: grid; place-items: center; text-decoration: none; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 23, 25, 0.12); }
.ch { font-family: var(--f-m); font-size: 10px; font-weight: 500; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 5px; background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.li .r { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.li .time { font-size: 12px; color: var(--text-2); }
.li .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acid-ink); }
.li.unread .n, .li.unread .s { color: var(--text); font-weight: 600; }
.li .clip { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.li .p { font-family: var(--f-m); font-size: 14px; white-space: nowrap; }
.li.muted .mid { opacity: 0.6; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 16px; min-height: 46px; }
.search input { border: 0; background: none; outline: none; flex: 1; font-size: 16px; min-width: 0; min-height: var(--tap); }
.search svg { flex: none; color: var(--text-2); }
.search:focus-within { outline: 2px solid var(--acid); outline-offset: 1px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag.ok { background: var(--acid-soft); color: var(--acid-ink); }
.tag.am { background: var(--amber-soft); color: var(--amber); }
.red { color: var(--coral); }
.st.need { background: var(--coral-soft); color: var(--coral); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }

/* Chat. */
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.m { max-width: 86%; padding: 9px 12px 6px; border-radius: 16px; font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 4px; }
.m.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.m.me { align-self: flex-end; background: var(--island); color: var(--on-island); border-bottom-right-radius: 5px; }
.m.master { align-self: flex-end; background: var(--acid-soft); color: var(--text); border-bottom-right-radius: 5px; }
.m .who { font-family: var(--f-m); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.m .btns { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; }
.m .btns span { font-size: 12px; border: 1px solid var(--line-2); border-radius: 99px; padding: 2px 8px; color: var(--text-2); }
.m .tm { align-self: flex-end; font-size: 10.5px; opacity: 0.6; }
.daysep { align-self: center; font-size: 12px; color: var(--text-2); background: var(--bg-2); border-radius: 99px; padding: 3px 10px; margin: 6px 0 2px; }
.compose { display: flex; gap: 8px; align-items: flex-end; }
.compose .grow { flex: 1; }
.compose textarea { min-height: 48px; border-radius: 22px; padding: 12px 16px; resize: vertical; }
.send { width: var(--tap); height: var(--tap); border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; flex: none; margin-bottom: 2px; }

/* Settings. */
/* Разделы — переносом по строкам, не лентой вбок: на iPhone лента выглядела обрезанной (замечание 28.09.2026). */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); display: grid; place-items: center; text-decoration: none; font-size: 13.5px; }
.lnk { color: var(--acid-ink); text-decoration: none; font-weight: 600; letter-spacing: 0.04em; min-height: var(--tap); display: inline-flex; align-items: center; }
.li.svc { padding-right: 6px; }
.li.svc .mid { text-decoration: none; min-height: var(--tap); display: flex; flex-direction: column; justify-content: center; }
.updown { display: flex; flex-direction: column; flex: none; }
.updown form { display: contents; }
.updown button { width: 36px; height: 26px; border-radius: 8px; color: var(--text-2); font-size: 15px; }
.updown button:disabled { opacity: 0.25; cursor: default; }
.wrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.wrow .check { font-size: 14px; min-width: 0; }
.qr { background: #fff; border-radius: 12px; padding: 8px; width: min(220px, 100%); align-self: center; }
.qr svg { display: block; width: 100%; height: auto; }
code.url { font-family: var(--f-m); font-size: 12.5px; overflow-wrap: anywhere; background: var(--bg-2); border-radius: 8px; padding: 8px 10px; }
details.more[open] { gap: 12px; }

/* Public page. */
.pub { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding: 32px 16px 40px; display: flex; flex-direction: column; gap: 22px; }
.pub h1 { font-size: 30px; }
.pub .lead { font-size: 16px; white-space: pre-line; }
.pub .card p { white-space: pre-line; }
.pubfoot { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); margin-top: 12px; }
.pubfoot a { color: var(--text-2); min-height: 32px; display: inline-flex; align-items: center; }
.li .mid > .n, .li .mid > .s { display: block; }
.li .mid > .s.clip { display: -webkit-box; }

/* Журнал действий (С10) */
.chips a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.li.jr { align-items: flex-start; }
.li.jr .mid { display: flex; flex-direction: column; gap: 2px; }
.li.jr .s a { color: inherit; }
.li.jr.erase { border-left: 3px solid var(--coral); }
.li.jr .d { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }

/* ─── Политика ПДн мастера /privacy (С10б) ─────────────────────────────────── */
.brand a { color: inherit; text-decoration: none; }
.policy h1 { font-size: 26px; }
.policy .draftnote { font-size: 13.5px; }
.policy-body { display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.policy-body h2 { font-size: 17px; margin-top: 10px; }
.policy-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* ─── Акт об уничтожении ПДн (С10б): лист A4, печать из браузера ────────────── */
.act-bar { max-width: 794px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.act {
  max-width: 794px; margin: 0 auto 32px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); padding: 28px 22px;
  display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 1.5;
}
.act-head { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.act-kicker { font-family: var(--f-m); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.act h1 { font-size: 22px; }
.act h2 { font-size: 15px; margin-top: 6px; }
.act-date { color: var(--text-2); font-size: 13px; }
.act-warn { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.act table { width: 100%; border-collapse: collapse; }
.act th, .act td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.act-kv th { width: 38%; font-weight: 500; color: var(--text-2); }
.act-list thead th { font-family: var(--f-m); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); font-weight: 400; }
.act-list td:last-child { width: 36%; }
.act-blank { display: inline-block; min-width: 60%; border-bottom: 1px solid var(--line-2); height: 1.2em; }
.act-log { font-size: 13px; color: var(--text-2); }
.act-sign { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 16px; margin-top: 24px; }
.act-sign div { display: flex; flex-direction: column; gap: 4px; }
.act-line { border-bottom: 1px solid var(--text); min-height: 1.6em; font-size: 13px; }
.act-sign small { font-size: 11px; color: var(--text-2); text-align: center; }
@media (max-width: 520px) {
  .act { padding: 20px 14px; border-radius: 0; border-left: 0; border-right: 0; }
  .act-kv th { width: auto; display: block; padding-bottom: 0; border-bottom: 0; }
  .act-kv td { display: block; padding-top: 2px; }
  .act-sign { grid-template-columns: 1fr; }
}
@media print {
  @page { size: A4; margin: 12mm 14mm 12mm; }
  html, body { background: #fff !important; }
  .noprint { display: none !important; }
  .act {
    --text: #000; --text-2: #333; --line: #999; --line-2: #666; --surface: #fff;
    max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; font-size: 10pt; line-height: 1.35; gap: 8px; color: #000; background: #fff;
  }
  .act h1 { font-size: 15pt; }
  .act h2 { font-size: 11pt; margin-top: 2px; break-after: avoid; }
  .act th, .act td { padding: 4px 6px; }
  .act-log { font-size: 9pt; }
  .act-sign { margin-top: 18px; }
  .act tr, .act-sign { break-inside: avoid; }
  .act-kv th { width: 38%; display: table-cell; }
  .act-kv td { display: table-cell; }
  .act-sign { grid-template-columns: 1fr 1.6fr 1fr; }
}

/* ─── Поля на iOS (правка по скринам с телефона) ───────────────────────────────
   Safari рисует date/time и select родным контролом: своя минимальная ширина (поле вылезает из
   колонки и наползает на соседнее) и своя высота. Снимаем родной вид — поле слушается сетки. */
.field input, .field select { -webkit-appearance: none; appearance: none; height: var(--tap); }
.field input[type="time"], .field input[type="date"] { display: block; line-height: var(--tap); text-align: left; }
.field input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239da298' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
/* В паре подписи бывают в одну и в две строки — поля прижаты к низу ячейки, стоят на одной линии. */
.pair .field { justify-content: flex-end; }
/* Недельный график: день — сколько останется, часы — узкие колонки по центру. */
.wrow { grid-template-columns: minmax(0, 1fr) 76px 76px; gap: 6px; }
.wrow .field input { padding: 0 6px; text-align: center; }
.wrow .field input::-webkit-date-and-time-value { text-align: center; }
/* Закрытый details в Safari: пустой слот содержимого получал flex-gap — лишний низ у карточки. */
details.more:not([open]) { gap: 0; }
.wrow .field input::-webkit-calendar-picker-indicator { display: none; }

/* С16: сферы мастера, прайс по сферам, «звать повторно» в услуге */
.lbl.sub { margin: 14px 0 6px; letter-spacing: 0.08em; }
.spheres { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0 14px; margin: 6px 0 10px; }
.sph { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.sph .check { flex: 1; min-width: 0; }
.radio { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-size: 12px; color: var(--text-2); cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--acid-ink); margin: 0; }
.radio:not(:has(input:checked)) span { opacity: 0.55; }
.repeat:not(:has(input[name="repeat"]:checked)) .repeat-fields { display: none; }

/* ─── Тариф (С17) ─────────────────────────────────────────────────────────── */
.flash.warn { background: var(--amber-soft); color: var(--text); display: block; text-decoration: none; }
.plan-note .lnk { min-height: 0; display: inline; white-space: nowrap; }
.plan-now .plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feat li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.feat li > span:first-child { width: 14px; flex: none; font-weight: 700; color: var(--acid-ink); }
.feat li.off { color: var(--text-2); }
.feat li.off > span:first-child { color: var(--text-2); }
.plan-row .r { text-align: right; }
.plan-row .time { white-space: normal; }
.pub .notice { border-radius: 14px; padding: 14px; background: var(--amber-soft); border: 1px solid var(--line); }
.plan-link { text-decoration: none; color: var(--text); gap: 4px; }

/* Анкета самостоятельной регистрации (С18) — голый домен платформы, телефон в первую очередь. */
.su-top { max-width: 560px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.su-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-d); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.su-logo svg { width: 30px; height: 30px; flex: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .su-logo rect { fill: #c8ff00; } :root:not([data-theme="light"]) .su-logo path { stroke: #141719; } }
:root[data-theme="dark"] .su-logo rect { fill: #c8ff00; }
:root[data-theme="dark"] .su-logo path { stroke: #141719; }
.su { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; overflow-x: hidden; }
.su h1 { font-size: 30px; }
.su .lead { font-size: 16px; color: var(--text-2); }
.su-form { gap: 14px; }
.su-form .card { gap: 14px; }
.ferr { color: var(--coral); font-size: 13px; }
#su-slug-status b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--coral); }
.su-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.su-set { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.su-set legend { padding: 0; margin-bottom: 8px; }
.su-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.su-chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; cursor: pointer; }
.su-chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--acid-ink); }
.su-chip:has(input:checked) { background: var(--acid); color: #141719; box-shadow: none; }
.su-chip:has(input:checked) input { accent-color: #141719; }
.su-chip:has(input:focus-visible) { outline: 2px solid var(--acid-ink); outline-offset: 2px; }
.su-group { display: flex; flex-direction: column; gap: 6px; }
.su-group[hidden] { display: none; }
.su-svc, .su-svc-head { display: grid; grid-template-columns: minmax(0, 1fr) 62px 78px; gap: 6px; align-items: center; }
.su-svc-head { font-size: 12px; color: var(--text-2); font-family: var(--f-m); }
.su-svc-head span:not(:first-child) { padding-left: 12px; }
.su-svc .check { font-size: 14px; min-width: 0; overflow-wrap: break-word; hyphens: auto; line-height: 1.25; gap: 8px; }
.su-svc .field input { padding: 0 8px; }
.su-consent { align-items: flex-start; }
.su-consent input { margin-top: 1px; }
.su-consent a { color: inherit; }
.su-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
[data-zone][hidden], .su-nojs[hidden] { display: none; }

/* «Тариф» — оплата (С19): выбор тарифа и периода, итог, автопродление, история платежей. */
.seg-radio { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border-radius: 99px; padding: 4px; gap: 4px; }
.seg-radio label { position: relative; min-height: 38px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.seg-radio input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-radio label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 23, 25, 0.12); }
.seg-radio label:has(input:focus-visible) { outline: 2px solid var(--acid); outline-offset: 1px; }
.plan-pick { display: flex; flex-direction: column; gap: 8px; }
.plan-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.plan-opt:has(input:checked) { border-color: var(--acid-ink); box-shadow: inset 0 0 0 1px var(--acid-ink); background: var(--acid-soft); }
.plan-opt input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--acid-ink); flex: none; }
.plan-opt .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-opt .n { font-weight: 600; }
.plan-opt .s { font-size: 13px; color: var(--text-2); }
.plan-opt .p { font-family: var(--f-m); font-size: 13.5px; text-align: right; flex: none; }
.plan-opt .p small { display: block; font-size: 12px; color: var(--text-2); }
.pay-total { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; }
.pay-total .sum { font-family: var(--f-d); font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.pay-contact { display: flex; flex-direction: column; gap: 10px; }
.pay-warn { background: var(--amber-soft); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.check.autopay { align-items: flex-start; min-height: 0; }
.check.autopay input { margin-top: 1px; }
.renew { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.pay-row .r { text-align: right; }

/* «Сайт» (С22): промо-лэндинг «Ультра» — акцент, фото, галерея, отзывы. */
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { display: contents; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 99px; font-size: 13.5px; cursor: pointer; }
.swatch input[type="radio"] { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.swatch input[type="color"] { position: relative; z-index: 1; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch:has(input[type="radio"]:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.swatch:has(input[type="radio"]:focus-visible) { outline: 2px solid var(--acid); outline-offset: 1px; }
.contrast { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.contrast .demo { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 99px; font: 600 14.5px var(--f-d); }
.contrast .hint { flex: 1 1 200px; }
.thumb { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; background: var(--bg-2); }
.thumb.tall { max-width: 200px; aspect-ratio: 4 / 5; max-height: none; }
.upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload input[type="file"] { flex: 1 1 200px; min-width: 0; font-size: 13.5px; }
.upload .field { flex: 1 1 100%; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g-item { padding: 8px; gap: 8px; }
.g-item .thumb { aspect-ratio: 1; max-height: none; }
.g-item .cap { display: flex; gap: 6px; align-items: flex-end; }
.g-item .cap .field { flex: 1; }
.g-item .cap .btn { flex: none; width: var(--tap); padding: 0; }
.g-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.g-actions .updown { flex-direction: row; }

/* График (С23б): шаги формы, день недели с перерывами, продление. */
.step { font-weight: 600; font-size: 14px; margin-top: 4px; }
.wday { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.wday:last-of-type { border-bottom: 0; }
details.breaks summary { cursor: pointer; font-size: 13px; color: var(--text-2); min-height: 32px; display: flex; align-items: center; list-style: none; }
details.breaks summary::-webkit-details-marker { display: none; }
/* Отступы — полями, не gap: Safari на iPhone не делает <details> flex-контейнером, и пары слипались (замечание 28.09.2026). */
details.breaks[open] { padding-bottom: 6px; }
details.breaks .brk { gap: 8px; margin-top: 10px; }
details.breaks .hint { font-size: 12.5px; margin-top: 8px; }
.card.extend { display: flex; flex-direction: column; gap: 10px; }
.card.extend p { font-size: 14px; }
