/* ---------- установка, вход, уведомления, устройства (ЭКРАНЫ, раздел 9) ----------
   Этих экранов в прототипе не было: оформлены в его стиле — светлая основа, крупный заголовок, одна главная синяя кнопка,
   те же листы (.sheet), строки настроек (.set-row) и карточки (.card). Цвета и размеры — из 10-tokens.css. */

/* ---- экран входа: поверх всего приложения (126-auth.js) ---- */
.auth { position: absolute; inset: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain; background: var(--bg);
  padding: calc(28px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px) + var(--kb, 0px)); animation: fade .25s both; }
.auth-in { display: flex; flex-direction: column; max-width: 360px; margin: 0 auto; padding-top: 20px; }
.auth-icon { width: 72px; height: 72px; margin-bottom: 20px; }
.auth-title { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); overflow-wrap: break-word; }
.auth-sub { margin-top: 6px; font-size: 17px; line-height: 22px; font-weight: 500; color: var(--muted); }

/* 9.1: три шага со значками */
.auth-steps { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.auth-steps li { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px 10px 12px; border-radius: 20px; background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--shade) var(--shade-s), transparent); font-size: 17px; line-height: 22px; overflow-wrap: break-word; }
.auth-steps li > span:last-child { min-width: 0; }
.auth-step-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.auth-step-ic .ico { width: 24px; height: 24px; }
.auth-step-ic.is-app { background: none; }
.auth-step-ic.is-app svg { width: 44px; height: 44px; }
.auth-small { margin-top: 16px; padding: 0 4px; font-size: 13px; line-height: 18px; color: var(--muted); }

/* 9.2: восемь ячеек кода (16 px и больше — иначе iPhone увеличивает страницу при вводе) */
.auth-code { display: flex; gap: 6px; margin-top: 24px; }
.auth-cell { flex: 1 1 0; min-width: 0; height: 56px; padding: 0; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--muted) 40%, var(--line)); background: var(--surface); color: var(--text);
  font: 600 24px/28px var(--font-ui); text-align: center; font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; caret-color: var(--accent); }
.auth-cell.gap { margin-left: 8px; }
.auth-cell:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-code.is-bad .auth-cell { border-color: var(--urgent); }
.auth-err { margin-top: 12px; font-size: 15px; line-height: 20px; font-weight: 500; color: color-mix(in srgb, var(--urgent) 80%, var(--text)); overflow-wrap: break-word; }
.auth-go { width: 100%; margin-top: 20px; }
.auth-hint { margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--muted); overflow-wrap: break-word; }
@media (max-height: 640px) { .auth-in { padding-top: 0; } .auth-icon { width: 56px; height: 56px; margin-bottom: 12px; } .auth-code { margin-top: 16px; } }
@media (prefers-reduced-motion: reduce) { .auth { animation: none; } }

/* ---- 9.3: особые карточки стопки «Уведомления» и «Уведомления запрещены» ---- */
.card[data-type="notif"] { box-shadow: inset 4px 0 0 var(--accent), var(--shadow-card); }
.card[data-type="notifDenied"] { box-shadow: inset 4px 0 0 var(--doing), var(--shadow-card); }
.card[data-type="notif"] .card-title, .card[data-type="notifDenied"] .card-title { margin-top: 10px; }
.card[data-type="notif"] .card-title { font-size: clamp(19px, 5.4vw, 22px); }
.card[data-type="notifDenied"] .card-meta { margin-top: 10px; }

/* ---- «Настройки → Устройства»: список подключённых устройств ---- */
.dev-muted { font-size: 15px; line-height: 20px; color: var(--muted); }
.dev-row { gap: 8px 12px; }
.dev-row .set-k { flex: 1 1 150px; }
.dev-row .set-k small + small { margin-top: 2px; }
.dev-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; vertical-align: 2px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: color-mix(in srgb, var(--accent) 75%, var(--text)); font-size: 12px; line-height: 16px; font-weight: 600; }
.dev-btn { flex: none; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); font-size: 15px; line-height: 20px; font-weight: 600; }
.dev-btn:active:not(:disabled) { background: var(--line); }
.dev-btn:disabled { opacity: .5; }
.dev-btn.danger { background: color-mix(in srgb, var(--urgent) 14%, var(--surface)); color: color-mix(in srgb, var(--urgent) 80%, var(--text)); }
.dev-confirm { flex: 1 1 100%; display: flex; gap: 8px; }
.dev-confirm .dev-btn { flex: 1; }

/* ---- 9.4: панель «Уведомления» ---- */
.ps-state { margin-top: 12px; font-size: 17px; line-height: 22px; font-weight: 600; overflow-wrap: break-word; }
.ps-text { margin-top: 6px; font-size: 15px; line-height: 20px; color: var(--muted); overflow-wrap: break-word; }
.ps-msg, .pr-notice { margin-top: 12px; font-size: 15px; line-height: 20px; font-weight: 500; color: color-mix(in srgb, var(--done) 75%, var(--text)); overflow-wrap: break-word; }
.ps-msg.is-err, .pr-notice.is-err { color: color-mix(in srgb, var(--urgent) 80%, var(--text)); }
.ps-btns { display: grid; gap: 8px; margin-top: 16px; }
.ps-btns:empty { display: none; }
.ps-btns button:disabled { opacity: .5; }

/* ---- 9.5: панель «Подключить ещё устройство» ---- */
.pr-code { margin-top: 16px; text-align: center; font-size: 40px; line-height: 48px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.pr-code.is-wait { font-size: 17px; line-height: 22px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.pr-left { margin-top: 4px; text-align: center; font-size: 15px; line-height: 20px; color: var(--muted); }
.pr-text { margin-top: 12px; text-align: center; font-size: 15px; line-height: 20px; overflow-wrap: break-word; }
.pr-note { margin-top: 8px; text-align: center; font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: break-word; }
.pr-notice { text-align: center; }

/* ручка у наших панелей: зона для тяги вниз шире самой полоски */
#pushSheet .grabber, #pairSheet .grabber { position: relative; touch-action: none; }
#pushSheet .grabber::after, #pairSheet .grabber::after { content: ""; position: absolute; inset: -14px -80px -10px; }
