/* =========================================================================
   Личный кабинет пациента (демо). Дополняет styles.css: те же токены,
   стеклянные панели, Cormorant для цифр и заголовков.
   ========================================================================= */

.cab { background: linear-gradient(180deg, #F5F8F9 0%, var(--bg) 320px); }
.cab .wrap { max-width: 1180px; }

/* ---------- Уведомление и шапка ---------- */
.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 6px var(--gutter); background: var(--aqua-soft); border-bottom: 1px solid rgba(10,125,116,.18); font-size: 13px; font-weight: 600; color: var(--aqua-deep); }
.notice p { display: inline-flex; align-items: center; gap: 10px; }
.notice__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 3px rgba(44,196,179,.25); }
.notice__exit { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 12px 4px 10px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid rgba(10,125,116,.2); color: var(--ink); text-decoration: none; transition: background-color .25s var(--ease), border-color .25s; }
.notice__exit:hover { background: #fff; border-color: var(--aqua-deep); }
.notice__exit svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.cabhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gutter) 0; }
.cab .brandline { position: static; text-decoration: none; }
.cab .topbar { position: static; }

/* ---------- Каркас ---------- */
.cab__main { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(56px, 7vw, 96px); }
.csec { margin-top: clamp(48px, 6vw, 80px); }
.csec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.csec__title { font-size: clamp(30px, 3.2vw, 42px); line-height: 1; }
.csec__sub { font-size: 13.5px; color: var(--ink-2); }
.cab__two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); align-items: start; }
.cab__legal { margin-top: clamp(48px, 6vw, 72px); font-size: 12.5px; line-height: 1.55; color: var(--ink-2); max-width: 720px; }
.foot--cab { padding-bottom: 96px; }

.card { background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 18px; box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, var(--shadow-soft); }

/* ---------- Профиль и переключатель ---------- */
.profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.profile__who { display: flex; align-items: center; gap: 22px; min-width: 0; }
.profile__who .eyebrow { margin-bottom: 8px; }
.profile__mono { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: .02em; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff, #E4EEF0 70%, #CFDFE2); box-shadow: 0 0 0 1px var(--gold), 0 0 0 5px var(--bg), 0 0 0 6px var(--line), 0 18px 30px -20px rgba(13,59,66,.5); }
.profile h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1; }
.profile__meta { margin-top: 8px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid rgba(13,59,66,.14); box-shadow: var(--shadow-glass); }
.switch__tab { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 16px 4px 6px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); text-align: left; transition: background-color .3s var(--ease), color .3s, box-shadow .3s; }
.switch__tab:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.switch__tab[aria-selected="true"] { background: var(--ink); color: #fff; box-shadow: 0 10px 20px -14px rgba(13,59,66,.8); }
.switch__mono { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff, #E4EEF0 70%, #CFDFE2); box-shadow: 0 0 0 1px var(--gold); }
.switch__mono--kid { background: radial-gradient(circle at 35% 30%, #fff, #DDF4F0 70%, #BFE7E0); }
.switch__text { display: flex; flex-direction: column; line-height: 1.2; }
.switch__text b { font-size: 14px; font-weight: 600; }
.switch__text small { font-size: 11px; opacity: .72; }

/* ---------- Ближайший визит ---------- */
.visit { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px clamp(24px, 3vw, 44px); align-items: center; padding: clamp(22px, 3vw, 32px); }
.visit__when { display: flex; flex-direction: column; gap: 2px; padding-right: clamp(20px, 3vw, 40px); border-right: 1px solid var(--line); font-variant-numeric: lining-nums tabular-nums; }
.visit__day { font-family: var(--display); font-size: 72px; line-height: .9; font-weight: 500; letter-spacing: -.02em; }
.visit__mon { font-family: var(--display); font-size: 24px; line-height: 1.05; }
.visit__dow { margin-top: 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.visit__time { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 600; color: var(--aqua-deep); }
.visit__time::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 3px rgba(44,196,179,.22); }
.visit__body { min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 26px; padding: 2px 11px; border-radius: 999px; background: var(--aqua-soft); color: var(--aqua-deep); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.chip--muted { background: var(--porcelain); color: var(--ink-2); }
.visit__title { margin-top: 12px; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; }
.visit__facts { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, max-content)); gap: 14px 36px; }
.visit__facts dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.visit__facts dd { margin: 0; font-size: 15px; font-weight: 600; }
.docline { display: inline-flex; align-items: center; gap: 10px; }
.docline__mono { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff, #E4EEF0 70%, #CFDFE2); box-shadow: 0 0 0 1px var(--gold); }
.docline small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.visit__acts { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 200px; }
.visit__acts .btn { justify-content: center; padding-inline: 22px; }
.visit__acts .link { align-self: center; margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.visit__acts .link svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.visit__acts .link:hover { text-decoration: underline; }
.visit--off { grid-template-columns: minmax(0, 1fr) auto; }
.visit--off .visit__title { color: var(--ink-2); }
.visit__gone { font-size: 15px; color: var(--ink-2); margin-top: 10px; max-width: 520px; }

/* ---------- План лечения ---------- */
.plan { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); gap: 32px clamp(28px, 4vw, 56px); align-items: start; }
.stages { position: relative; }
.stages::before { content: ""; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 1px; background: var(--line); }
.stage { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.stage:last-child { border-bottom: 0; }
.stage__mark { grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-strong); font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.stage__mark svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage--done .stage__mark, .stage__mark--ok { background: var(--aqua-soft); border-color: var(--aqua); color: var(--aqua-deep); }
.stage--now .stage__mark { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 5px rgba(44,196,179,.2); }
.stage--next .stage__mark { border-style: dashed; }
.stage__name { grid-column: 2; grid-row: 1; font-size: 18px; font-weight: 600; line-height: 1.25; }
.stage__meta { grid-column: 2; grid-row: 2; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.stage__cost { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.stage__cost small { display: block; margin-top: 6px; font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); }
.stage--done .stage__cost small { color: var(--aqua-deep); }
.plan__note { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.planvis { padding: 22px 24px 24px; position: relative; overflow: hidden; }
.planvis__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.planvis__head b { font-family: var(--display); font-size: 26px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.planvis__head span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.planvis__bar { height: 3px; border-radius: 3px; background: var(--line); margin-top: 12px; overflow: hidden; }
.planvis__bar span { display: block; height: 100%; background: var(--aqua-deep); transform-origin: left; transition: transform .8s var(--ease); }
.pim { display: block; width: 100%; max-width: 250px; height: auto; margin: 12px auto 0; overflow: visible; }
.pim .w { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 6 5; fill: none; opacity: .55; }
.pim .lbl { font-family: var(--sans); font-size: 12px; fill: var(--ink-2); letter-spacing: .02em; }
.pim .lead { stroke: var(--ink); stroke-opacity: .45; stroke-width: 1; }
.pim .pt { fill: var(--aqua); }
.pim .crown-fill { opacity: .55; }
.planvis__sum { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; align-items: baseline; }
.planvis__sum > div { display: contents; }
.planvis__sum dt { color: var(--ink-2); }
.planvis__sum dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.planvis__sum .is-total dd { font-family: var(--display); font-size: 22px; font-weight: 500; }
.plan--none { padding: clamp(22px, 3vw, 30px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.plan--none .stage__mark { grid-row: auto; }

/* ---------- Напоминания ---------- */
.rems { display: flex; flex-direction: column; }
.rem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rem:last-child { border-bottom: 0; }
.rem__title { grid-column: 1; grid-row: 1; font-size: 17px; font-weight: 600; line-height: 1.3; }
.rem__sub { grid-column: 1; grid-row: 2; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.rem__act { grid-column: 2; grid-row: 1 / span 2; }
.visit__addr { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.rem__act .btn { min-height: 44px; padding: 4px 6px 4px 18px; font-size: 14px; gap: 10px; }
.rem__act .btn__ico { width: 32px; height: 32px; }
.rem__act .btn__ico svg { width: 15px; height: 15px; }

/* ---------- Оплаты ---------- */
.pay__figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pay__fig { padding: 18px 20px 20px; }
.pay__fig small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.pay__fig b { display: block; margin-top: 8px; font-family: var(--display); font-size: clamp(30px, 3vw, 38px); font-weight: 500; line-height: 1; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.pay__fig b i { font-style: normal; font-family: var(--sans); font-size: 18px; color: var(--ink-2); margin-left: 4px; }
.pay__fig--due b { color: var(--aqua-deep); }
.pay__fig span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.pay__list { margin-top: 18px; }
.pay__list li { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.pay__list li:last-child { border-bottom: 0; }
.pay__list time { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay__list b { font-weight: 600; }
.pay__list small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; }
.pay__list .num { font-family: var(--display); font-size: 20px; font-weight: 500; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- История визитов ---------- */
.hist { border-top: 1px solid var(--line); }
.hrow { border-bottom: 1px solid var(--line); }
.hrow__btn { display: grid; grid-template-columns: 150px minmax(0, 1.3fr) minmax(0, 1fr) 120px 36px; gap: 8px 20px; align-items: center; width: 100%; padding: 16px 0; border: 0; background: none; text-align: left; font-size: 15px; transition: background-color .25s; }
.hrow__btn:hover { background: linear-gradient(90deg, rgba(44,196,179,.08), rgba(255,255,255,0) 70%); }
.hrow__date { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.hrow__svc { font-weight: 600; }
.hrow__doc { color: var(--ink-2); font-size: 14px; }
.hrow__sum { text-align: right; font-family: var(--display); font-size: 22px; font-weight: 500; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.hrow__chev { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; justify-self: end; transition: transform .45s var(--ease), background-color .3s; }
.hrow__chev svg { width: 14px; height: 14px; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hrow__btn[aria-expanded="true"] .hrow__chev { transform: rotate(180deg); background: var(--aqua-soft); }
.hrow__panel { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 2px 0 20px; }
.hrow__panel[hidden] { display: none; }
.hrow__panel h3 { font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; padding-top: 4px; }
.hrow__panel p { font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 640px; }

/* ---------- Документы ---------- */
.docgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dcard { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; padding: 20px 20px 18px; border: 1px solid rgba(255,255,255,.9); border-radius: 16px; text-align: left; background: rgba(255,255,255,.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, var(--shadow-soft); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.dcard:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 34px 70px -40px rgba(13,59,66,.45), 0 2px 6px -2px rgba(13,59,66,.08); }
.dcard__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--porcelain); color: var(--aqua-deep); margin-bottom: 16px; }
.dcard__ico svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dcard__title { font-size: 16.5px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.dcard__meta { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.dcard__open { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--aqua-deep); }
.dcard__open svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform .35s var(--ease); }
.dcard:hover .dcard__open svg { transform: translateX(3px); }

/* ---------- Модальное окно ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(13,59,66,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal__dialog { position: relative; width: min(720px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(13,59,66,.6); padding: 30px 32px 28px; }
.modal__dialog:focus { outline: none; }
.modal--doc .modal__dialog { width: min(860px, 100%); background: var(--bg); }
.js .modal:not([hidden]) .modal__backdrop { animation: fadeIn .3s var(--ease-out) both; }
.js .modal:not([hidden]) .modal__dialog { animation: dialogIn .45s var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal__close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.8); display: grid; place-items: center; transition: background-color .25s, border-color .25s; z-index: 2; }
.modal__close:hover { background: #fff; border-color: var(--ink); }
.modal__close svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.modal__title { font-size: 30px; padding-right: 44px; }
.modal__hint { margin: 8px 0 20px; font-size: 14px; color: var(--ink-2); }
.modal__acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal__acts .btn { padding-inline: 22px; }
.modal .btn--danger { --btn-bg: #8E3A2B; background: linear-gradient(180deg, #A44A39 0%, var(--btn-bg) 60%); }
.modal .dates { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.modal__sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin: 18px 0 10px; }
.modal__pick { margin-top: 16px; font-size: 14px; color: var(--ink-2); min-height: 22px; }
.modal__pick b { color: var(--ink); }

/* ---------- Документ-образец ---------- */
.paper { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 48px) clamp(28px, 4vw, 44px); font-size: 14px; line-height: 1.6; color: var(--ink); }
.paper__wm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-family: var(--display); font-size: clamp(64px, 12vw, 128px); letter-spacing: .3em; font-weight: 500; color: rgba(10,125,116,.09); white-space: nowrap; pointer-events: none; user-select: none; }
.paper__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); margin-bottom: 22px; }
.paper__brand { display: flex; align-items: center; gap: 10px; }
.paper__brand svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.paper__brand b { font-family: var(--display); font-size: 22px; font-weight: 500; }
.paper__brand span { display: block; font-size: 12px; color: var(--ink-2); }
.paper__req { font-size: 11.5px; line-height: 1.5; color: var(--ink-2); text-align: right; }
.paper__req span { display: block; white-space: nowrap; }
.paper__no { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.paper h3 { font-size: 24px; margin: 6px 0 18px; text-wrap: balance; }
.paper__fields { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 20px; margin-bottom: 18px; }
.paper__fields dt { color: var(--ink-2); }
.paper__fields dd { margin: 0; font-weight: 600; border-bottom: 1px dotted var(--line-strong); }
.paper ol { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.paper table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-variant-numeric: tabular-nums; }
.paper th, .paper td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.paper th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.paper td.num, .paper th.num { text-align: right; white-space: nowrap; }
.paper__sign { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; font-size: 12.5px; color: var(--ink-2); }
.paper__sign span { display: block; padding-top: 28px; border-top: 1px solid var(--ink); }
.paper__foot { margin-top: 24px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- Тост ---------- */
.toast { position: fixed; left: 50%; bottom: 76px; z-index: 65; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 24px 50px -20px rgba(13,59,66,.7); }
.toast[hidden] { display: none; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 3px rgba(44,196,179,.3); }
.js .toast:not([hidden]) { animation: toastIn .4s var(--ease-out) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .cab .chapters { display: none; }
}
@media (max-width: 900px) {
  .visit { grid-template-columns: 160px minmax(0, 1fr); }
  .visit__acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .visit__acts .btn { flex: 1 1 200px; }
  .visit__acts .link { flex-basis: 100%; margin-top: 4px; }
  .plan { grid-template-columns: 1fr; }
  .planvis { max-width: 520px; }
  .cab__two { grid-template-columns: 1fr; }
  .docgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hrow__btn { grid-template-columns: 120px minmax(0, 1fr) 100px 36px; }
  .hrow__doc { grid-column: 2; grid-row: 2; }
  .hrow__panel { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .cabhead { padding-top: 16px; }
  .notice { padding-inline: 16px; font-size: 12.5px; }
  .notice p { gap: 8px; }
  .cab .brandline span { display: none; }
  .profile__who { gap: 16px; }
  .profile__mono { width: 64px; height: 64px; font-size: 24px; }
  .switch { width: 100%; }
  .switch__tab { flex: 1; justify-content: flex-start; }
  .csec__title { font-size: 28px; }
  .visit { grid-template-columns: 1fr; gap: 18px; padding: 22px 20px; }
  .visit__when { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .visit__day { font-size: 52px; }
  .visit__mon { font-size: 22px; }
  .visit__dow { margin-top: 0; }
  .visit__time { flex-basis: 100%; margin-top: 4px; }
  .visit__acts .btn { flex-basis: 100%; }
  .stage { grid-template-columns: 32px minmax(0, 1fr); }
  .stage__cost { grid-row: auto; grid-column: 2; text-align: left; margin-top: 8px; display: flex; align-items: baseline; gap: 10px; }
  .stage__cost small { margin-top: 0; }
  .rem { grid-template-columns: 1fr; }
  .rem__act { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .pay__figs { grid-template-columns: 1fr; }
  .hrow__btn { grid-template-columns: minmax(0, 1fr) 32px; gap: 2px 12px; padding: 14px 0; }
  .hrow__date { grid-row: 1; font-size: 12.5px; }
  .hrow__svc { grid-row: 2; }
  .hrow__doc { grid-column: 1; grid-row: 3; }
  .hrow__sum { grid-column: 1; grid-row: 4; text-align: left; margin-top: 4px; }
  .hrow__chev { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .hrow__panel { grid-template-columns: 1fr; gap: 6px; padding-bottom: 18px; }
  .docgrid { grid-template-columns: 1fr; }
  .dcard { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0 14px; padding: 14px 16px; }
  .dcard__ico { margin-bottom: 0; }
  .dcard__title { flex: 1; font-size: 15px; }
  .dcard__meta { flex-basis: 100%; margin: 6px 0 0 58px; }
  .dcard__open { display: none; }
  .modal { padding: 0; align-items: end; }
  .modal__dialog { width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 20px 20px 0 0; padding: 26px 20px 22px; }
  .modal--doc .modal__dialog { width: 100%; }
  .modal__title { font-size: 26px; }
  .modal .dates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal .times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal__acts .btn { flex: 1; justify-content: center; padding-inline: 14px; white-space: nowrap; font-size: 14px; }
  .paper__head { flex-direction: column; }
  .paper__req { text-align: left; }
  .paper__req span { white-space: normal; }
  .paper__fields { grid-template-columns: 1fr; gap: 2px 0; }
  .paper__fields dt { font-size: 12px; margin-top: 8px; }
  .paper__sign { grid-template-columns: 1fr; }
  .toast { bottom: 64px; font-size: 13px; }
}
@media (max-width: 480px) {
  .notice { font-size: 12px; line-height: 1.35; }
  .notice__dot { display: none; }
}
@media (max-width: 380px) {
  .switch__text small { display: none; }
  .switch__tab { padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .modal:not([hidden]) .modal__backdrop, .js .modal:not([hidden]) .modal__dialog, .js .toast:not([hidden]) { animation: none; }
  .dcard, .hrow__chev, .switch__tab, .planvis__bar span, .dcard__open svg { transition: none; }
}
