/* client-sandbox.css — «Пройти сделку» / «Глазами клиента» (lk/client-sandbox.html) в устройстве кабинета клиента (DESIGN.md v1.3,
   client-v2.css): токены lk-tokens.css, Inter 300/400/500, без жирного (кроме логотипа), одна тёмная кнопка на экран.
   Главная: шапка «ОБИТЕЛЬ», крупный светлый заголовок «Сейчас ход …» с подсказкой и кнопкой открыть интерфейс роли; ниже две колонки
   карточками-рамками: путь сделки (как «Путь вашего ремонта» у клиента) и справа участники этапа с фото + лента «Что уже произошло».
   Интерфейс роли — окно на весь экран поверх главной (§6: отступ 24, радиус 36 сверху, затемнение), фрейм на всю высоту окна. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-family: var(--font-ui); color: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; font-synthesis: none; }
button { font: inherit; color: inherit; }
.sb { max-width: 1440px; margin: 0 auto; padding: 28px 48px 64px; }
.sb-lab { font-size: 12px; color: var(--muted); }
.sb-n { display: block; font-size: 15px; font-weight: 500; color: var(--text); }
.sb-err { margin: 10px 0 0; font-size: 14px; color: var(--over); }

/* шапка как у кабинета клиента */
.sb-head { display: flex; align-items: center; gap: 20px; }
.sb-logo { font-size: 18px; font-weight: 600; letter-spacing: .12em; }
.sb-sect { font-size: 14px; color: var(--muted); }
.sb-me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sb-pill { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; white-space: nowrap; }
.sb-x { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--surface); font-size: 22px; line-height: 1; color: var(--text); cursor: pointer; }
.sb-x:hover { background: var(--line); }

/* герой: чей ход и что сделать */
.sb-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-top: 48px; }
.sb-hero-l { flex: 1 1 520px; min-width: 0; }
.sb-display { margin: 8px 0 0; font-size: 52px; font-weight: 300; letter-spacing: -.03em; line-height: 1.04; }
.sb-lede { margin: 14px 0 0; max-width: 640px; font-size: 17px; font-weight: 300; line-height: 1.5; color: var(--text-2); }
.sb-hero-r { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.sb-turnp { display: flex; align-items: center; gap: 12px; }
.sb-btn-k { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.sb-btn-k:hover { background: var(--accent-h); }
.sb-btn-l { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13px; cursor: pointer; white-space: nowrap; }
.sb-btn-l:hover { border-color: var(--muted); }
.sb-link { padding: 0; border: 0; background: none; font-size: 14px; color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; cursor: pointer; }
.sb-link:hover { text-decoration-color: currentColor; }

/* две колонки карточками-рамками */
.sb-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; margin-top: 56px; align-items: start; }
.sb-side { display: grid; gap: 24px; }
.sb-card { border: 1px solid var(--line); border-radius: 32px; padding: 28px 28px 20px; }
.sb-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sb-h2 { margin: 0; font-size: 20px; font-weight: 500; }
.sb-empty { margin: 0 0 8px; font-size: 14px; color: var(--muted); }

.sb-path { list-style: none; margin: 0; padding: 0; }
.sb-path li + li { border-top: 1px solid var(--hair); }
.sb-path button { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 72px; align-items: center; gap: 14px; padding: 16px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.sb-path button:disabled { cursor: default; }
.sb-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-pt { font-size: 16px; }
.sb-pw { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sb-ps { justify-self: end; font-size: 12px; color: var(--muted); }
.sb-path .is-done .sb-dot { border-color: var(--done); background: var(--done); color: #fff; }
.sb-path .is-done .sb-pt { color: var(--muted); }
.sb-path .is-now .sb-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.sb-path .is-next .sb-pt { color: var(--text-2); }
.sb-path button:not(:disabled):hover .sb-pt { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.sb-now-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }

.sb-people { list-style: none; margin: 0; padding: 0; }
.sb-people li + li { border-top: 1px solid var(--hair); }
.sb-person { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.sb-ptx { flex: 1; min-width: 0; }
.sb-turn { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--surface); color: var(--done); font-size: 12px; }
.sb-turn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--done); }
.sb-arr { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text); transition: background .2s, color .2s, border-color .2s; }
.sb-person:hover .sb-arr { background: var(--accent); border-color: var(--accent); color: #fff; }
.sb-face { flex: none; border-radius: 50%; object-fit: cover; }
.sb-face-i { display: inline-grid; place-items: center; background: var(--surface); font-size: 12px; font-weight: 500; color: var(--text); }

.sb-log { list-style: none; margin: 0; padding: 0; }
.sb-log li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 10px 0; font-size: 14px; color: var(--text-2); }
.sb-log li + li { border-top: 1px solid var(--hair); }
.sb-lt { padding-top: 2px; font-variant-numeric: tabular-nums; }

/* окно роли на весь экран (§6) */
.sb-scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-end; animation: sb-fade .18s ease-out; }
.sb-win { width: 100%; height: calc(100% - 24px); background: var(--bg); border-radius: 36px 36px 0 0; box-shadow: 0 -18px 48px rgba(0, 0, 0, .12); display: flex; flex-direction: column; overflow: hidden; animation: sb-up .24s cubic-bezier(.32, .72, 0, 1); }
.sb-win-bar { display: flex; align-items: center; gap: 14px; padding: 16px 24px 16px 28px; border-bottom: 1px solid var(--hair); }
.sb-win-t { flex: 1; min-width: 0; }
.sb-win-t .sb-lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.sb-seg { display: inline-flex; flex: none; background: var(--surface); border-radius: 999px; padding: 3px; }
.sb-seg button { border: 0; background: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: var(--muted); cursor: pointer; }
.sb-seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); font-weight: 500; }
.sb-stage-frame { flex: 1; min-height: 0; display: flex; justify-content: center; background: var(--bg); }
.sb-frame { width: 100%; height: 100%; border: 0; background: var(--bg); }
.sb-stage-frame.is-phone { background: var(--surface); padding: 20px 0; }
.sb-stage-frame.is-phone .sb-frame { width: 390px; border-radius: 32px; border: 1px solid var(--line); }
@keyframes sb-fade { from { opacity: 0; } }
@keyframes sb-up { from { transform: translateY(24px); opacity: .6; } }

:is(.sb-path button, .sb-person, .sb-seg button, .sb-x, .sb-link, .sb-btn-k, .sb-btn-l):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 1100px) {
  .sb-cols { grid-template-columns: minmax(0, 1fr); }
  .sb-hero-r { align-items: flex-start; }
}
@media (max-width: 760px) {
  .sb { padding: 16px 16px 40px; }
  .sb-sect, .sb-pill { display: none; }
  .sb-hero { margin-top: 28px; }
  .sb-display { font-size: 34px; }
  .sb-lede { font-size: 15px; }
  .sb-cols { margin-top: 32px; gap: 16px; }
  .sb-side { gap: 16px; }
  .sb-card { padding: 20px 18px 12px; border-radius: 24px; }
  .sb-path button { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .sb-pw { display: none; }
  .sb-win { height: calc(100% - 12px); border-radius: 24px 24px 0 0; }
  .sb-win-bar { padding: 10px 12px 10px 16px; gap: 10px; }
  .sb-win-bar .sb-face, .sb-seg { display: none; }
  .sb-stage-frame.is-phone { padding: 0; }
  .sb-stage-frame.is-phone .sb-frame { width: 100%; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
