/* Приложение пациента (PWA, s72) — брендбук «Ормин» 2.0: токены одним местом.
   Цвета — docs/ustav/interfeys-vid.md «Брендбук «Ормин» 2.0»; шрифты — свои файлы. */
@font-face { font-family: "Ubuntu"; src: url("/app/fonts/Ubuntu-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("/app/fonts/Ubuntu-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("/app/fonts/Mulish-Variable.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
:root {
  --navy: #002D42; --navy-80: #335768; --navy-20: #CCD5D9; --navy-10: #E6EAEC;
  --turq: #27BEB6; --turq-dark: #1FA39C; --turq-20: #D4F2F0; --turq-10: #EAF8F7;
  --orange: #F4891F; --orange-20: #FDE7D2; --mint: #8FC97A; --mint-40: #D2E9CA; --mint-20: #E8F4E4;
  --rose: #A1281D; --rose-20: #FBE3E1;
  --bg: #FFFFFF; --surface: #F3F6F7; --surface-2: #EDF1F2; --line: #DCE3E6;
  --text: #002D42; --text-2: #4D6C7B; --text-3: #7F96A1;
  --head: "Ubuntu", "Segoe UI", Arial, sans-serif; --body: "Mulish", "Segoe UI", Arial, sans-serif;
  --r-btn: 12px; --r: 16px; --r-lg: 24px; --shadow: 0 6px 24px rgba(0, 45, 66, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--text); font: 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.ekran { padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 12px; }
h1, h2, h3 { font-family: var(--head); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
a { color: var(--navy); }
.karta { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.muted { color: var(--text-2); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r-btn);
  border: 0; font: 700 16px var(--body); cursor: pointer; text-decoration: none; background: var(--turq); color: var(--navy); }
.btn.ghost { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.btn.warn { background: var(--rose-20); color: var(--rose); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.shir { width: 100%; }
:focus-visible { outline: 3px solid var(--turq); outline-offset: 2px; }
input, select, textarea { font: inherit; color: inherit; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--bg); }
.vkladki { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--bg); border-top: 1px solid var(--line);
  padding: 4px 6px calc(8px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; z-index: 5; }
.vkladki[hidden] { display: none; }
.vk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; padding: 6px 0;
  font: 700 11px var(--body); color: var(--text-2); text-decoration: none; }
.vk.on { color: var(--navy); }
.vk-i svg { width: 22px; height: 22px; }
.vk.centr { margin-top: -22px; }
.vk.centr .vk-i { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--turq); background: var(--bg); display: grid; place-items: center; box-shadow: var(--shadow); }
.vk.centr .vk-i svg, .vk.centr .vk-i img { width: 30px; height: 30px; }

/* ---------- каркас: общее для всех экранов (s72, a1) ---------- */
body.s-vkladkami .ekran { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.ekran { padding-top: calc(16px + env(safe-area-inset-top)); min-height: 100vh; }
img { max-width: 100%; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.mel { font-size: 13px; }
.tsentr { text-align: center; }
.silno { font-weight: 800; color: var(--navy); }
a.silno { text-decoration: none; }
.vid-skryt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Логотип — `<ormin-logo>` из кита брендбука (общий с МИС, js/vendor/): ширина задаёт размер, высота — по пропорции. */
.logo { width: 94px; display: block; flex: none; }
.btn { text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.btn.soft { background: var(--turq-10); box-shadow: inset 0 0 0 1px var(--turq); }
.btn.tiho { background: transparent; color: var(--text-2); font-weight: 700; }
.btn.tiho:disabled { color: var(--text-3); opacity: 1; }
.btn svg { flex: none; }
/* Полоса «Нет связи» — сверху, поверх экрана. */
.polosa { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; padding: 10px 14px; font-size: 13.5px; line-height: 1.35; }
.polosa[hidden] { display: none; }
.polosa svg { flex: none; }
/* Загрузка — серые заготовки. */
.sk { background: var(--navy-10); border-radius: 8px; animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.zagruzka { display: flex; flex-direction: column; gap: 12px; }
.sk-karta { display: flex; flex-direction: column; gap: 10px; }
.sk-kr { display: flex; gap: 16px; }
.sk-kr .sk { width: 52px; height: 52px; border-radius: 50%; }
/* Ошибка, пусто, «не работает». */
.sost { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 12px; }
.sost h1, .sost h2 { font-size: 20px; }
.sost p { font-size: 14.5px; max-width: 34ch; }
.sost-i { width: 64px; height: 64px; border-radius: 50%; background: var(--orange-20); display: grid; place-items: center; }
.sost-znak { width: 84px; opacity: .35; }
.sost-kn { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
/* Шапка экрана с «назад». */
.shapka { display: flex; align-items: center; gap: 4px; margin: -12px -8px 0; }
.shapka h1 { font-size: 20px; }
.shapka-nazad { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--navy); }
/* Строки ошибок и сообщений. */
.osh-str { color: var(--rose); font-size: 14px; font-weight: 600; }
.osh-str[hidden], .osh-blok[hidden], .ok-blok[hidden] { display: none; }
.osh-blok { background: var(--rose-20); color: #8A1F16; border-radius: var(--r-btn); padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.ok-blok { background: var(--mint-20); border-radius: var(--r-btn); padding: 10px 12px; font-size: 14px; }
.zametka { display: flex; gap: 10px; background: var(--surface); border-radius: var(--r-btn); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.zametka svg { flex: none; margin-top: 1px; }
/* Переключатель языка. */
.yaz { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; flex: none; }
.yaz button { border: 0; background: transparent; border-radius: 9px; min-height: 44px; min-width: 48px; padding: 0 12px; font: 700 13.5px var(--body); color: var(--text-2); cursor: pointer; }
.yaz button[aria-pressed="true"] { background: var(--bg); color: var(--navy); font-weight: 800; box-shadow: 0 1px 2px rgba(0, 45, 66, .12); }
.yaz-m button { min-height: 44px; min-width: 44px; padding: 0 10px; font-size: 13px; }
/* Подсказка установки. */
.ust { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r); padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.ust-i { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; }
.ust-t { flex: 1; min-width: 0; }
.ust .btn { flex: none; min-height: 44px; }
/* Окно «как установить» на iPhone (первое открытие). */
.ust-okno .sprosit-okno { gap: 14px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.ust-golova { display: flex; align-items: center; gap: 12px; }
.ust-golova h2 { font-size: 19px; }
.ust-golova p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
.ust-logo { width: 56px; height: 56px; flex: none; border-radius: 14px; box-shadow: var(--shadow); }
.ust-shagi { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ust-shagi li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.4; }
.ust-n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--turq-20); color: var(--navy); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.ust-shagi .ust-i { width: 68px; height: 40px; color: #007AFF; }
.ust-okno .sprosit-okno:focus { outline: none; }
.ust-st { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ust-dob { font-size: 13px; font-weight: 700; color: #007AFF; }
.ust-zametka { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.ust-itog { margin: 0; background: var(--mint-20); border-radius: var(--r-btn); padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }
.ust-itog[hidden] { display: none; }
.ust-strelka { position: absolute; left: 50%; bottom: calc(4px + env(safe-area-inset-bottom)); transform: translateX(-50%); color: var(--turq); animation: ust-vniz 1.2s ease-in-out infinite; }
@keyframes ust-vniz { 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .ust-strelka { animation: none; } }
/* Вопрос снизу экрана. */
.sprosit { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sprosit-fon { position: absolute; inset: 0; background: rgba(0, 45, 66, .45); }
.sprosit-okno { position: relative; width: 100%; max-width: 560px; background: var(--bg); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sprosit-okno h2 { font-size: 19px; }
.sprosit-osh { color: var(--rose); font-weight: 600; font-size: 14px; }
.sprosit-osh[hidden] { display: none; }
/* Строки списков (профиль), переключатель. */
.karta.spisok { padding: 4px 16px; }
.stroka { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: 52px; border: 0; border-top: 1px solid var(--surface-2); background: transparent; width: 100%;
  text-align: left; text-decoration: none; color: var(--navy); font: inherit; cursor: pointer; }
.spisok > .stroka:first-child, .spisok > .stroka-d:first-child .stroka { border-top: 0; }
div.stroka { cursor: default; }
.stroka .ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface); }
.stroka .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.stroka .vl { font-size: 13px; color: var(--text-2); text-align: right; max-width: 45%; overflow-wrap: anywhere; }
.stroka .str { color: var(--text-2); display: grid; }
.stroka-d { border-top: 1px solid var(--surface-2); }
.stroka-d summary { list-style: none; border-top: 0; }
.stroka-d summary::-webkit-details-marker { display: none; }
.stroka-d .adres { padding: 0 0 12px 46px; font-size: 14px; color: var(--text-2); }
.sw { width: 56px; height: 44px; flex: none; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.sw span { position: relative; display: block; width: 52px; height: 32px; border-radius: 16px; background: var(--navy-20); transition: background .15s; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 3px rgba(0, 45, 66, .25); transition: left .15s; }
.sw[aria-checked="true"] span { background: var(--turq); }
.sw[aria-checked="true"] span::after { left: 23px; }
.lab { font: 800 12px var(--body); color: var(--navy-80); letter-spacing: .04em; text-transform: uppercase; margin: 6px 4px -4px; }
/* Кружок с буквами. */
.av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--orange-20); color: var(--navy); }
.av-1 { background: var(--mint-20); } .av-2 { background: var(--turq-20); } .av-3 { background: var(--surface-2); }
.av-b { width: 60px; height: 60px; font-size: 18px; }
