/* ЖЕЛЕЗО, «Помост». Экраны входа и клиента (design/app/).
   Только надстройка над system/components.css: новые составные блоки экранов,
   названия системы не переопределяются. */

/* ───────────── общее ───────────── */
.app-title { margin-top: var(--s-2); }
.app-lead { margin-top: var(--s-3); max-width: 34ch; font-size: 15px; line-height: 1.5; color: var(--c-text-dim); }
.app-lead b { color: var(--c-text); font-weight: 600; white-space: nowrap; }
.app-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--c-text-dim); }
.app-sep { height: 1px; background: var(--c-line); border: 0; margin: 0; }
.nowrap { white-space: nowrap; }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.screen__bar .btn--block { margin-bottom: 3px; }
.bar-stack { display: grid; gap: 10px; }

/* тост поверх экрана: сверху, под вырезом камеры */
.app-toast { position: absolute; left: var(--s-4); right: var(--s-4); top: calc(var(--safe-top) - 4px); z-index: 70; }

/* срезанные углы: плашки «Помоста» */
.cut { clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }

/* ───────────── первый экран: заставка и выбор роли ───────────── */
.role-scr { background: #0E0F0D; }
.role-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #050505; }
.role-media video, .role-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); }
.role-light { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(70% 40% at 30% 18%, rgba(255, 244, 225, 0.1), transparent 70%); mix-blend-mode: screen; }
.role-vign { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 80% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55)); }
.role-ui {
  position: absolute; inset: 0; z-index: 7;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 4px) var(--s-5) calc(var(--s-5) + var(--safe-bottom));
  pointer-events: none;
}
.role-shade {
  position: absolute; inset: 0; z-index: 5; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.45), transparent 22%, transparent 40%, rgba(8, 8, 7, 0.8) 62%, rgba(10, 10, 9, 0.95));
}
.role-grain { position: absolute; inset: -50%; z-index: 3; pointer-events: none; opacity: 0.14; mix-blend-mode: overlay; background-size: 160px; }
.role-scr.is-splash .role-grain { animation: role-grain 0.5s steps(4) infinite; }
@keyframes role-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, -2%); } 100% { transform: translate(3%, 1%); } }
.role-scr .gmark { z-index: 8; }
.role-ui > * { opacity: 0; }
.role-scr.is-ready .role-ui { pointer-events: auto; }
.role-scr.is-ready .role-shade, .role-scr.is-ready .role-ui > * { opacity: 1; }
.role-tag { margin-top: auto; max-width: 31ch; font-size: 15px; line-height: 1.45; color: #D2CFC6; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.role-tag b { color: var(--c-text); font-weight: 600; }
.role-pick { margin-top: var(--s-5); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick .btn { min-height: 96px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 14px 14px 12px; text-align: left; }
.role-pick .btn b { font-family: var(--f-display); font-stretch: var(--f-display-stretch); font-weight: 800; font-size: 22px; line-height: 0.95; letter-spacing: 0.03em; text-transform: uppercase; }
.role-pick .btn small { font-family: var(--f-body); font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.3; opacity: 0.86; }
.role-pick .btn:not(.btn--primary) { --btn-face: #2A2B27; }
.role-pick .btn--primary small { color: #4A3A08; opacity: 1; }
.role-pick .btn--wide { grid-column: 1 / -1; min-height: 54px; flex-direction: row; justify-content: center; align-items: center; gap: 10px; font-size: 16px; }
.role-pick .btn--ghost::before { background: rgba(14, 15, 13, 0.5); box-shadow: inset 0 0 0 1.5px var(--c-line-strong); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.role-foot { margin-top: var(--s-3); text-align: center; font-size: 12px; line-height: 1.4; color: #9C998F; }

/* ───────────── вход: шапка с магнезией и шаги ───────────── */
.auth-hero { position: relative; height: 196px; margin: 0 calc(var(--s-5) * -1) var(--s-2); overflow: hidden; isolation: isolate; background: #0E0F0D; }
.auth-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; filter: grayscale(1) contrast(1.08) brightness(0.86); }
.auth-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 15, 13, 0.6) 0, rgba(14, 15, 13, 0) 110px),
    linear-gradient(180deg, rgba(61, 62, 58, 0) 40%, rgba(61, 62, 58, 0.8) 78%, var(--c-bg) 100%);
}
.auth-hero--short { height: 150px; }
.auth-steps { position: absolute; left: var(--s-5); right: var(--s-5); bottom: 10px; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--c-text); }
.auth-steps__bars { display: flex; gap: 4px; }
.auth-steps__bars i { width: 22px; height: 4px; background: rgba(240, 238, 232, 0.24); clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%); }
.auth-steps__bars i.is-on { background: var(--c-text); }
.auth-steps span { color: var(--c-text-dim); font-weight: 500; }
.auth-form { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.legal { font-size: 12px; line-height: 1.45; color: #A9A69D; text-align: center; text-wrap: balance; }
.legal a { color: var(--c-text-dim); text-decoration: underline; text-decoration-color: var(--c-line-strong); text-underline-offset: 3px; }

/* подсказка номера из SIM-карты / кода из SMS: плашка над клавиатурой */
.suggest {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start; max-width: 100%;
  min-height: 44px; padding: 8px 14px 8px 10px; border-radius: var(--r-md);
  background: var(--c-surface-2); box-shadow: inset 0 0 0 1px var(--c-line), inset 0 1px 0 rgba(255, 250, 238, 0.06);
  font-size: 14px; line-height: 1.25; text-align: left; color: var(--c-text-dim);
  transition: transform var(--dur-fast) var(--ease-heavy);
}
.suggest b { color: var(--c-text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.suggest svg { flex: none; width: 20px; height: 20px; color: var(--c-text); }
.suggest:active { transform: translateY(1px) scale(0.98); }

/* к кому шёл клиент: продолжим после входа */
.pending { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 6px 10px 10px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--c-line); }
.pending img { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; object-position: 50% 20%; filter: grayscale(0.2); }
.pending__text { min-width: 0; font-size: 13px; line-height: 1.35; color: var(--c-text-dim); }
.pending__text b { display: block; font-size: 14px; font-weight: 600; color: var(--c-text); overflow-wrap: anywhere; }
.pending__x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--c-text-dim); }
.pending__x svg { width: 18px; height: 18px; }

/* код: клетки по ширине экрана, номер и повторная отправка */
.otp--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 320px; }
.otp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: var(--s-4); }
.otp-row .otp-note { margin: 0; font-variant-numeric: tabular-nums; }
.otp-resend { min-height: 40px; font-size: 14px; }
.otp-resend:disabled { color: var(--c-text-dim); text-decoration: none; cursor: default; }
.phone-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: var(--s-3); font-size: 15px; color: var(--c-text-dim); }
.phone-line b { color: var(--c-text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-line .link-action { min-height: 32px; font-size: 14px; }

/* ───────────── сканер QR ───────────── */
.scan-scr { background: #050505; }
.scan-view { position: absolute; inset: 0; overflow: hidden; background: #0B0B0A; }
.scan-cam { position: absolute; inset: -3%; }
.scan-cam > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; filter: saturate(0.85) contrast(1.02) brightness(0.8); transition: filter 0.35s ease; }
.scan-scr.is-torch .scan-cam > img { filter: saturate(0.92) contrast(1) brightness(1.15); }
.scan-noise { position: absolute; inset: -20%; pointer-events: none; opacity: 0.1; mix-blend-mode: overlay; background-size: 140px; }
/* постер тренера с QR, приклеенный к стойке: бумага в перспективе, освещена как сцена */
.poster {
  position: absolute; left: 50%; top: 41%; width: 142px; aspect-ratio: 148 / 210; margin: -100px 0 0 -71px;
  transform: perspective(640px) rotateY(-18deg) rotateX(5deg) rotateZ(-1.8deg);
  padding: 10px 10px 8px; border-radius: 1px;
  background: url("../media/pomost-grain.png") 0 0 / 80px 80px, linear-gradient(100deg, #CFC9BB, #E6E1D5 46%, #C9C3B4);
  background-blend-mode: soft-light, normal;
  color: #1B1C19;
  box-shadow: 5px 9px 16px -6px rgba(0, 0, 0, 0.75), 1px 1px 2px rgba(0, 0, 0, 0.5);
  filter: brightness(0.6) contrast(0.86) saturate(0.85) sepia(0.12) blur(0.6px);
  transition: filter 0.35s ease;
  display: grid; align-content: start; gap: 5px;
}
.scan-scr.is-torch .poster { filter: brightness(0.98) contrast(0.92) sepia(0.06) blur(0.5px); }
.poster::before { content: ""; position: absolute; left: 50%; top: -5px; width: 30px; height: 12px; margin-left: -15px; background: rgba(214, 208, 190, 0.55); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
/* свет из окна справа и спад к низу листа */
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.04) 45%, rgba(255, 246, 225, 0.1) 75%, rgba(0, 0, 0, 0.12)), linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.18)); pointer-events: none; }
.poster__mark { font-family: var(--f-display); font-weight: 900; font-size: 13px; line-height: 1; letter-spacing: 0.06em; }
.poster__qr { width: 100%; aspect-ratio: 1; padding: 6px; background: #F2F0E9; }
.poster__qr svg { width: 100%; height: 100%; }
.poster__name { font-family: var(--f-display); font-stretch: 84%; font-weight: 800; font-size: 11px; line-height: 1; text-transform: uppercase; }
.poster__cta { font-size: 7.5px; font-weight: 600; line-height: 1.25; color: #3B3C38; }
.scan-shade { position: absolute; inset: 0; pointer-events: none; }
/* прицел: всё вокруг окна затемнено, уголки — меловые, со срезом */
.reticle {
  position: absolute; left: 50%; top: 41%; width: 244px; height: 244px; margin: -122px 0 0 -122px;
  border-radius: 18px;
  box-shadow: 0 0 0 2000px rgba(8, 8, 7, 0.52);
  transition: transform 0.42s var(--ease-out), box-shadow 0.42s ease;
}
.reticle i { position: absolute; width: 38px; height: 38px; border: 0 solid var(--c-text); transition: border-color 0.3s ease; }
.reticle i:nth-child(1) { left: 0; top: 0; border-width: 4px 0 0 4px; border-top-left-radius: 18px; }
.reticle i:nth-child(2) { right: 0; top: 0; border-width: 4px 4px 0 0; border-top-right-radius: 18px; }
.reticle i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 4px 4px; border-bottom-left-radius: 18px; }
.reticle i:nth-child(4) { right: 0; bottom: 0; border-width: 0 4px 4px 0; border-bottom-right-radius: 18px; }
.reticle__beam { position: absolute; left: 14px; right: 14px; top: 50%; height: 2px; background: linear-gradient(90deg, rgba(240, 238, 232, 0), rgba(240, 238, 232, 0.75), rgba(240, 238, 232, 0)); box-shadow: 0 0 12px rgba(240, 238, 232, 0.4); }
.scan-scr.is-found .reticle { transform: scale(0.8) rotate(-1.2deg); box-shadow: 0 0 0 2000px rgba(8, 8, 7, 0.7); }
.scan-scr.is-found .reticle i { border-color: var(--c-ok); }
.scan-scr.is-found .reticle__beam { opacity: 0; }
.scan-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--safe-top) - 6px) var(--s-4) 0; }
.scan-top .topbar__back--float { position: static; }
.scan-title { font-weight: 600; font-size: 16px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.scan-hint {
  position: absolute; left: var(--s-5); right: var(--s-5); top: calc(41% + 140px); z-index: 3;
  display: grid; justify-items: center; gap: 4px; text-align: center;
}
.scan-hint b { display: inline-block; padding: 7px 12px; background: rgba(14, 15, 13, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 15px; font-weight: 600; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.scan-hint span { font-size: 13px; color: #CFCBC2; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
.scan-scr.is-found .scan-hint { opacity: 0; transition: opacity 0.2s ease; }
.scan-tools { position: absolute; left: 0; right: 0; bottom: calc(var(--s-6) + var(--safe-bottom)); z-index: 3; display: flex; justify-content: center; gap: 28px; }
.scan-tool { display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: #D8D5CC; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
.scan-tool__plate {
  display: grid; place-items: center; width: 60px; height: 60px;
  background: rgba(30, 31, 28, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(240, 238, 232, 0.16);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  color: var(--c-text);
  transition: transform var(--dur-fast) var(--ease-heavy), background 0.2s ease;
}
.scan-tool__plate svg { width: 26px; height: 26px; }
.scan-tool:active .scan-tool__plate { transform: scale(0.94); }
.scan-tool[aria-pressed="true"] .scan-tool__plate { background: var(--c-text); color: var(--c-surface-1); }
.scan-found {
  position: absolute; left: var(--s-3); right: var(--s-3); bottom: calc(var(--s-3) + var(--safe-bottom)); z-index: 5;
  display: grid; gap: var(--s-4); padding: var(--s-4);
}
.scan-found .who__ava { width: 56px; height: 56px; }
.scan-found .who__text b { font-size: 17px; overflow-wrap: anywhere; }

/* ───────────── профиль тренера: нет записи ───────────── */
.closed-note { display: grid; gap: 10px; padding: 18px 18px 16px; }
.closed-note__head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; line-height: 1.25; }
.closed-note__head svg { flex: none; width: 22px; height: 22px; color: var(--c-steel); }
.closed-note p { font-size: 14px; line-height: 1.5; color: var(--c-text-dim); }
.closed-note .btn { justify-self: start; margin-top: 4px; }
.notify-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--c-line); font-size: 14px; line-height: 1.35; color: var(--c-text-dim); }
.notify-row b { display: block; color: var(--c-text); font-weight: 600; font-size: 15px; }
.svc--muted .svc__row { cursor: default; }
.svc--muted .svc__price { font-size: 20px; color: var(--c-text-dim); }
.book-bar--closed .book-bar__when { color: var(--c-text); font-weight: 600; font-size: 14px; }

/* переключатель (как в системных настройках, но плитой) */
.toggle { position: relative; flex: none; width: 50px; height: 30px; border-radius: 6px; background: var(--c-surface-3); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(240, 238, 232, 0.1); transition: background 0.2s ease; }
.toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 4px; background: linear-gradient(180deg, #8F8C84, #75736C); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); transition: transform 0.22s var(--ease-out), background 0.2s ease; }
.toggle[aria-checked="true"] { background: #3D5E46; }
.toggle[aria-checked="true"]::after { transform: translateX(20px); background: linear-gradient(180deg, #F4F2EC, #D9D6CD); }

/* ───────────── услуги ───────────── */
.svc-cards { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.svc-card { display: grid; gap: 12px; padding: 18px; }
.svc-card__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.svc-card__name { font-weight: 650; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.svc-card__len { grid-column: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-text-dim); }
.svc-card__len svg { width: 15px; height: 15px; }
.svc-card__price { grid-column: 2; grid-row: 1 / span 2; text-align: right; display: grid; gap: 4px; }
.svc-card__price b { font-family: var(--f-num); font-stretch: var(--f-num-stretch); font-weight: 700; font-size: 28px; line-height: 0.9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc-card__price small { font-size: 12px; color: var(--c-text-dim); white-space: nowrap; }
.svc-card p { font-size: 14px; line-height: 1.5; color: var(--c-text-dim); }
.svc-card__fits { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.4; color: var(--c-text-dim); padding-top: 12px; border-top: 1px solid var(--c-line); }
.svc-card__fits svg { width: 18px; height: 18px; color: var(--c-text); }
.svc-card__fits b { color: var(--c-text); font-weight: 600; }
.svc-card .btn { margin-top: 2px; }

/* ───────────── подтверждение ─────────────
   Табло записи: утопленная панель, как на табличке «вес взят», только на графите. */
.board {
  position: relative; display: grid; gap: 8px; padding: 14px 16px 16px;
  border-radius: var(--r-md);
  background: url("../media/pomost-grain.png") 0 0 / 96px 96px, #141512;
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 250, 238, 0.08);
  color: #F3ECD8;
  container-type: inline-size;
}
.board__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--f-num); font-stretch: var(--f-num-stretch); font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: #CFC8B5; }
.board__row--foot { font-size: 16px; color: #9F9886; }
.board__time { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; font-family: var(--f-num); font-stretch: var(--f-num-stretch); font-weight: 800; font-size: clamp(64px, 27cqi, 96px); line-height: 0.82; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(255, 226, 160, 0.18); }
.board__time small { font-size: 0.32em; font-weight: 700; color: #9F9886; letter-spacing: 0.02em; text-shadow: none; }
.board__rel { position: absolute; right: 16px; top: 14px; }
.info-rows { display: grid; }
.info-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--c-line); }
.info-row:last-child { border-bottom: 0; }
.info-row > svg { width: 20px; height: 20px; margin-top: 1px; color: var(--c-steel); }
.info-row__k { font-size: 13px; line-height: 1.3; color: var(--c-text-dim); }
.info-row__v { grid-column: 2; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.info-row__v small { display: block; font-size: 13px; font-weight: 400; color: var(--c-text-dim); }
.info-row__side { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.info-row__side.t-num { font-size: 28px; }
.info-row .link-action { min-height: 36px; font-size: 14px; }
.confirm-bar .book-bar__price { font-size: 26px; }
.rule-note--ok svg { color: var(--c-ok); }

/* ───────────── экран «вес взят» отдельной страницей ───────────── */
.done--page { position: absolute; inset: 0; z-index: 1; }
.done--page .done__mount { margin: 22px 0 26px; }
.done-toast { position: absolute; left: var(--s-4); right: var(--s-4); bottom: calc(var(--s-4) + var(--safe-bottom)); z-index: 60; }

/* ───────────── мои тренировки ───────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head .h2 { min-width: 0; }
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  border-radius: var(--r-md); background: var(--c-surface-3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(240, 238, 232, 0.08), 0 1px 0 rgba(255, 250, 238, 0.07);
}
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 10px; border-radius: 6px; font-size: 15px; font-weight: 600; color: var(--c-text-dim); transition: transform var(--dur-fast) var(--ease-heavy); }
.seg button small { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: inherit; opacity: 0.7; }
.seg button[aria-selected="true"] { background: var(--c-text); color: var(--c-surface-1); box-shadow: 0 2px 0 #9C998F; }
.seg button:active { transform: translateY(1px); }

/* ближайшая тренировка: большое табло */
.next-up { display: grid; gap: 14px; padding: 16px; text-decoration: none; color: inherit; }
.next-up__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next-up__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--c-text); }
.next-up__label::before { content: ""; width: 7px; height: 7px; background: var(--c-accent); clip-path: polygon(2px 0, 100% 0, 100% calc(100% - 2px), calc(100% - 2px) 100%, 0 100%, 0 2px); }
.next-up__in { font-size: 13px; color: var(--c-text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.next-up .who__text b { overflow-wrap: anywhere; }
.next-up__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.next-up__foot .t-small { min-width: 0; }

/* строка записи: табло слева, что и с кем справа */
.bk-list { display: grid; gap: 10px; }
.bk-day { margin: var(--s-6) 0 var(--s-3); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--c-text-dim); }
.bk-day:first-child { margin-top: var(--s-2); }
.bk-day b { color: var(--c-text); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }
.bk {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) 16px; align-items: center; gap: 14px;
  padding: 10px 14px 10px 10px; text-decoration: none; color: inherit;
  transition: transform var(--dur-fast) var(--ease-heavy);
}
.bk:active { transform: translateY(1px); }
.bk__board {
  display: grid; justify-items: center; align-content: center; gap: 5px; height: 84px; border-radius: 6px;
  background: url("../media/pomost-grain.png") 0 0 / 96px 96px, #141512; background-blend-mode: soft-light, normal;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 250, 238, 0.07);
  color: #F3ECD8; font-family: var(--f-num); font-stretch: var(--f-num-stretch); font-variant-numeric: tabular-nums; text-transform: uppercase;
}
.bk__board span { font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0.05em; color: #B8B19E; }
.bk__board b { font-size: 30px; font-weight: 800; line-height: 0.85; }
.bk__board small { font-size: 12px; font-weight: 600; line-height: 1; color: #8E8877; }
.bk__body { display: grid; gap: 5px; min-width: 0; }
.bk__svc { font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.bk__who { font-size: 13px; line-height: 1.3; color: var(--c-text-dim); overflow-wrap: anywhere; }
.bk__body .badge-status { justify-self: start; margin-top: 3px; }
.bk > svg { width: 16px; height: 16px; color: var(--c-text-dim); }
.bk.is-past .bk__board { opacity: 0.72; }
.bk.is-cancel .bk__board b { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(243, 236, 216, 0.5); }
.bk__new { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 6px; vertical-align: 2px; background: var(--c-accent); color: var(--c-on-accent); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }

/* абонемент */
.pkg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 16px; padding: 16px 18px 18px; }
.pkg__head { display: grid; gap: 3px; min-width: 0; }
.pkg__head b { font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pkg__head span { font-size: 13px; color: var(--c-text-dim); overflow-wrap: anywhere; }
.pkg .counter { grid-column: 1 / -1; }
.pkg .counter__value b { font-size: 48px; }
.pkg__until { align-self: start; text-align: right; font-size: 12px; line-height: 1.3; color: var(--c-text-dim); white-space: nowrap; }
.pkg__until b { display: block; font-size: 15px; color: var(--c-text); font-weight: 600; }

/* ───────────── детали записи ───────────── */
.remind { display: grid; gap: 12px; padding: 16px; }
.remind__head { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.remind__head svg { width: 22px; height: 22px; color: var(--c-accent); }
.remind__head b { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.remind__head span { font-size: 13px; line-height: 1.4; color: var(--c-text-dim); }
.remind__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.remind.is-answered .remind__actions { display: none; }
.remind__ok { display: none; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--c-ok); }
.remind__ok svg { width: 18px; height: 18px; }
.remind.is-answered .remind__ok { display: flex; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-actions .btn { min-height: 52px; }
.sheet__lead { font-size: 15px; line-height: 1.5; color: var(--c-text-dim); }
.sheet__lead b { color: var(--c-text); font-weight: 600; }
.late-mark { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: var(--r-md); background: rgba(242, 131, 107, 0.07); box-shadow: inset 0 0 0 1px rgba(242, 131, 107, 0.3); font-size: 14px; line-height: 1.45; color: var(--c-text-dim); }
.late-mark svg { width: 22px; height: 22px; color: var(--c-danger); }
.late-mark b { display: block; color: var(--c-text); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn--danger.btn--fill { --btn-face: #5A2219; --btn-edge: #2A0E0A; --btn-edge-h: 3px; --btn-text: #FFD9CF; }
.btn--danger.btn--fill::before { background: url("../media/pomost-grain.png") 0 0 / 128px 128px, var(--btn-face); background-blend-mode: soft-light, normal; box-shadow: inset 0 0 0 1px rgba(242, 131, 107, 0.35); }
.btn--danger.btn--fill::after { opacity: 1; background: var(--btn-edge); transform: translateY(var(--btn-edge-h)); box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.6); }
.btn--danger.btn--fill:active:not(:disabled)::after, .btn--danger.btn--fill.is-pressed::after { opacity: 1; transform: translateY(1px); }
.btn--danger.btn--fill:active:not(:disabled), .btn--danger.btn--fill.is-pressed { transform: translateY(2px); }

/* ───────────── мои тренеры ───────────── */
.tr-list { display: grid; gap: 12px; margin-top: var(--s-5); }
.tr {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 10px 14px 10px 10px;
  text-decoration: none; color: inherit; align-items: stretch;
  transition: transform var(--dur-fast) var(--ease-heavy);
}
.tr:active { transform: translateY(1px); }
.tr__photo { position: relative; width: 96px; min-height: 124px; border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-3); }
.tr__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) contrast(1.05); }
.tr__photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(240, 238, 232, 0.08); border-radius: inherit; }
.tr__body { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 4px 0 2px; }
.tr__name { display: block; font-family: var(--f-display); font-stretch: 84%; font-weight: 800; font-size: 19px; line-height: 1; text-transform: uppercase; overflow-wrap: normal; hyphens: none; text-wrap: balance; }
.tr__spec { font-size: 13px; line-height: 1.35; color: var(--c-text-dim); overflow-wrap: anywhere; }
.tr__next { display: grid; gap: 2px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--c-line); }
.tr__next span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--c-ok); }
.tr__next span::before { content: ""; width: 6px; height: 6px; background: currentColor; clip-path: polygon(2px 0, 100% 0, 100% calc(100% - 2px), calc(100% - 2px) 100%, 0 100%, 0 2px); }
.tr__next b { font-family: var(--f-num); font-stretch: var(--f-num-stretch); font-weight: 700; font-size: 20px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tr__next b small { font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--c-text-dim); margin-left: 6px; }
.tr__next.is-off span { color: var(--c-text-dim); }
.tr__next.is-off b { font-family: var(--f-body); font-size: 14px; font-weight: 600; color: var(--c-text-dim); }
.tr.is-off .tr__photo img { filter: grayscale(0.6) brightness(0.8); }
.add-trainer { display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; gap: 14px; align-items: center; margin-top: 12px; padding: 14px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1.5px var(--c-line-strong); text-decoration: none; color: inherit; background: repeating-linear-gradient(-45deg, rgba(240, 238, 232, 0.035) 0 1px, rgba(0, 0, 0, 0) 1px 8px); }
.add-trainer__icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--c-surface-1); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.add-trainer__icon svg { width: 24px; height: 24px; }
.add-trainer b { display: block; font-weight: 600; font-size: 15px; }
.add-trainer span { font-size: 13px; line-height: 1.35; color: var(--c-text-dim); }
.add-trainer > svg { width: 16px; height: 16px; color: var(--c-text-dim); }

/* пустые состояния */
.empty--screen { margin-top: var(--s-6); }
.empty--screen .empty__media { aspect-ratio: 4 / 3; }
.empty__steps { display: grid; gap: 10px; width: 100%; margin-top: 4px; counter-reset: st; }
.empty__steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; line-height: 1.45; color: var(--c-text-dim); counter-increment: st; }
.empty__steps li::before { content: counter(st); display: grid; place-items: center; width: 28px; height: 28px; background: var(--c-surface-1); font-family: var(--f-num); font-stretch: var(--f-num-stretch); font-weight: 700; font-size: 16px; color: var(--c-text); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.empty__steps b { color: var(--c-text); font-weight: 600; }

/* ───────────── профиль клиента ───────────── */
.me { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: var(--s-5); }
.me__ava { display: grid; place-items: center; width: 72px; height: 72px; background: url("../media/pomost-grain.png") 0 0 / 96px 96px, #2B2C28; background-blend-mode: soft-light, normal; font-family: var(--f-display); font-stretch: 84%; font-weight: 800; font-size: 28px; color: var(--c-text); box-shadow: inset 0 1px 0 rgba(255, 250, 238, 0.1); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.me__name { font-family: var(--f-display); font-stretch: 84%; font-weight: 800; font-size: 26px; line-height: 0.98; text-transform: uppercase; overflow-wrap: anywhere; }
.me__phone { margin-top: 6px; font-size: 15px; color: var(--c-text-dim); font-variant-numeric: tabular-nums; }
.set-list { display: grid; padding: 4px 16px; }
.set { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--c-line); text-decoration: none; color: inherit; }
.set:last-child { border-bottom: 0; }
.set > svg:first-child { width: 22px; height: 22px; color: var(--c-steel); }
.set b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.set span { font-size: 13px; line-height: 1.35; color: var(--c-text-dim); }
.set > svg:last-child:not(:first-child) { width: 16px; height: 16px; color: var(--c-text-dim); }
.set__val { font-size: 14px; color: var(--c-text-dim); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .reticle, .reticle i, .scan-cam > img, .poster, .toggle, .toggle::after, .seg button, .bk, .tr, .suggest { transition: none; }
}
@media (max-height: 760px) {
  .auth-hero { height: 150px; }
  .auth-hero--short { height: 120px; }
}

.book-bar__price.is-empty { font-family: var(--f-body); font-size: 17px; font-weight: 600; color: var(--c-text-dim); }

/* две кнопки в ряд на узком экране: без переноса внутри слова */
.detail-actions .btn, .contact-row .btn { padding-inline: 12px; gap: 8px; overflow-wrap: normal; white-space: nowrap; }
.detail-actions .btn svg, .contact-row .btn svg { width: 18px; height: 18px; }
@media (max-width: 380px) {
  .confirm-bar { gap: 10px; }
  .confirm-bar .btn { padding-inline: 14px; font-size: 16px; letter-spacing: 0.04em; }
  .confirm-bar .book-bar__price { font-size: 24px; }
}

/* фото клиента: шестигранник-«гайка» как у аватара; камера, пока фото нет */
button.me__ava { border: 0; cursor: pointer; padding: 0; position: relative; }
.me__ava.has-photo { background-size: cover; background-position: center; background-blend-mode: normal; }
.me__ava svg { width: 30px; height: 30px; color: var(--c-text-dim); }
.photo-pick { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-2); }
.photo-pick__text { display: grid; gap: 2px; font-size: var(--t-sm); color: var(--c-text-dim); }
.photo-pick__text b { font-size: var(--t-md); color: var(--c-text); font-weight: 600; }
.me__hint { margin: 4px 0 0; font-size: var(--t-xs); color: var(--c-text-dim); }
.me__ava.has-photo svg { display: none; }
.tr__body { grid-template-columns: minmax(0, 1fr); }

/* фактура страницы тренера (выбирает тренер: бетон, рифлёный лист, чёрная резина, тёмный металл, мел).
   Холст под содержимым; --c-bg — средний тон фактуры, им заканчивается градиент под фото. */
.page-surf { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.screen.has-surf > .screen__body, .screen.has-surf > .screen__bar { position: relative; z-index: 1; }
