/* ───────── Кнопка SOS на экране телефона мамы ─────────
   Телефон сам показывает, как поставить значок SOS и что будет после нажатия.
   Движок в sos-guide.js. Вся раскладка с префиксом sg-, чтобы не задевать остальные блоки */
.sg {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start;
  --sg-bg: #f8f2ee; --sg-ink: #241a22; --sg-soft: rgba(36, 26, 34, 0.08); --sg-card: #ffffff; --sg-blue: #1d7bf2;
  --sg-red: #e2403f; --sg-red-deep: #b9262a; --sg-ok: #1f9d6a;
  --sg-spring: cubic-bezier(.2, 1.4, .4, 1); --sg-out: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  .sg { --sg-bg: #1e1724; --sg-ink: #f3ebf0; --sg-soft: rgba(255, 255, 255, 0.08); --sg-card: #2a2231; --sg-blue: #4c9bff; --sg-red: #ef4b49; --sg-ok: #3ddc97; }
}
.sg-text { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.sg-text h2 { text-wrap: balance; }
.sg-lead { margin: 0; color: var(--plum-2); font-size: 19px; line-height: 1.5; max-width: 32em; }

/* Переключатель телефона */
.sg-os { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); max-width: 100%; }
.sg-os button { padding: 10px 18px; border: 0; border-radius: 14px; background: none; font: 600 15px/1 var(--font); color: var(--plum-2); cursor: pointer; transition: background 240ms, color 240ms, box-shadow 240ms; }
.sg-os button[aria-selected='true'] { background: var(--paper); color: var(--plum); box-shadow: 0 6px 16px -12px rgba(60, 20, 0, 0.5); }
.sg-os button:focus-visible, .sg-steps button:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }

/* Шаги */
.sg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; max-width: 34em; }
.sg-steps button { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: center; width: 100%; padding: 12px 14px; border: 0; border-radius: 18px; background: none; text-align: left; font: 500 17px/1.35 var(--font); color: var(--plum-2); cursor: pointer; transition: background 240ms, color 240ms; }
.sg-steps b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); transition: background 240ms, color 240ms; }
.sg-steps li.on button { background: var(--glass); color: var(--plum); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.sg-steps li.on b { background: var(--sg-red); color: #fff; box-shadow: none; }
.sg-steps li.sg-sep { padding: 14px 14px 2px; font: 700 13px/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--sg-red); }
.sg[data-os='ios'] [data-for]:not([data-for~='ios']),
.sg[data-os='android'] [data-for]:not([data-for~='android']),
.sg[data-os='tap'] [data-for]:not([data-for~='tap']) { display: none; }
.sg-note { margin: 0; color: var(--plum-3); font-size: 15px; line-height: 1.5; max-width: 34em; }
.sg-call { margin: 0; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; max-width: 34em; color: var(--plum); font-size: 15px; line-height: 1.45; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.sg-call i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; color: #fff; background: var(--sg-red); }

/* ───────── Телефон ───────── */
.sg-phone { position: relative; margin: 0 0 40px; justify-self: center; width: 100%; max-width: 300px; }
@media (min-width: 901px) { .sg-phone { position: sticky; top: 96px; } }
.sg-screen {
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 9 / 18.6; border-radius: 42px; background: var(--sg-bg); color: var(--sg-ink); isolation: isolate;
  box-shadow: 0 0 0 9px var(--device, #17121a), 0 0 0 10.5px #3c3238, 0 44px 80px -30px rgba(60, 20, 0, 0.55); font-family: var(--font); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sg-screen::before { content: ''; position: absolute; z-index: 9; top: 10px; left: 50%; width: 84px; height: 24px; margin-left: -42px; border-radius: 14px; background: #0c080e; }
.sg-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 380ms ease, transform 460ms var(--sg-out), visibility 0s 460ms; pointer-events: none; }
.sg-scene.is-on, .sg-scene.is-under { opacity: 1; visibility: visible; transition: opacity 380ms ease, transform 460ms var(--sg-out), visibility 0s; }
.sg-scene.is-under { opacity: 0.35; transform: scale(0.97); }
.sg-scene * { box-sizing: border-box; }

/* 1. Приложение Близко, окно «Кнопка SOS» */
.sg-app { background: linear-gradient(170deg, #ffe3cf 0%, #f8d6dc 55%, #e9def5 100%); color: #241a22; }
.sg-app-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 48px 16px 12px; }
.sg-app-head small { display: block; font-size: 11px; opacity: 0.6; }
.sg-app-head b { font-size: 22px; letter-spacing: -0.02em; }
.sg-app-row { height: 52px; margin: 10px 14px 0; border-radius: 18px; background: rgba(255, 255, 255, 0.55); }
.sg-app-row.short { width: 62%; }
.sg-sheet { position: absolute; left: 6px; right: 6px; bottom: 6px; display: grid; gap: 10px; padding: 8px 14px 18px; border-radius: 30px; background: var(--sg-card); color: var(--sg-ink); box-shadow: 0 -12px 40px -12px rgba(40, 10, 0, 0.35); transform: translateY(70%); transition: transform 520ms var(--sg-out); }
.sg-app.is-on .sg-sheet { transform: none; }
.sg-grab { justify-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--sg-soft); }
.sg-sheet-head { display: flex; align-items: center; gap: 10px; }
.sg-sheet-head img { width: 38px; height: 38px; border-radius: 10px; }
.sg-sheet-head b { font-size: 17px; }
.sg-sheet p { margin: 0; font-size: 12.5px; line-height: 1.4; opacity: 0.72; }
.sg-field { padding: 9px 12px; border-radius: 12px; background: var(--sg-soft); font-size: 11.5px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-primary { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 16px; font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #ff8a4c, #ee5126); }

/* 2. Ссылка мамы в браузере: большая кнопка, от открытия тревога не уходит */
.sg-page { display: flex; flex-direction: column; background: #fff6f3; color: #1e1216; }
@media (prefers-color-scheme: dark) { .sg-page { background: #160c10; color: #fbf1f2; } }
.sg-top { display: none; align-items: center; gap: 8px; padding: 42px 12px 8px; }
.sg[data-os='android'] .sg-top { display: flex; }
.sg-url { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 12px; background: var(--sg-soft); font-size: 11.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; }
.sg-dots { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.sg-site { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 18px 12px; text-align: center; }
.sg[data-os='android'] .sg-site { padding-top: 22px; }
.sg-site b { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.sg-site small { font-size: 12.5px; line-height: 1.35; opacity: 0.72; max-width: 16em; }
.sg-big { position: relative; margin-top: 10px; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 800; letter-spacing: 0.03em; color: #fff; background: radial-gradient(circle at 50% 30%, #f26a5e, var(--sg-red) 55%, var(--sg-red-deep)); box-shadow: 0 0 0 8px color-mix(in srgb, var(--sg-red) 16%, transparent), 0 14px 30px color-mix(in srgb, var(--sg-red) 40%, transparent); }
.sg-big::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--sg-red) 45%, transparent); opacity: 0; }
.sg-page.is-on .sg-big::after { animation: sg-ring 2.2s 400ms ease-out infinite; }
@keyframes sg-ring { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }
.sg-howto { margin-top: auto; width: 100%; padding: 10px 12px; border-radius: 14px; font-size: 11.5px; line-height: 1.35; text-align: left; background: var(--sg-soft); }
.sg-howto strong { display: block; font-size: 12px; margin-bottom: 2px; }
.sg-bottom { display: flex; align-items: center; gap: 8px; margin: 0 12px 22px; padding: 6px 6px 6px 10px; border-radius: 22px; background: var(--sg-card); color: var(--sg-ink); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.35); }
.sg[data-os='android'] .sg-bottom { display: none; }
.sg-bottom .sg-url { background: transparent; padding: 7px 6px; }
.sg-back { font-size: 20px; padding: 0 4px; opacity: 0.7; }
.sg-more { width: 36px; height: 32px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; letter-spacing: 1px; font-weight: 800; }

/* 3. Меню браузера */
.sg-menu { display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 14px 74px; }
.sg[data-os='android'] .sg-menu { align-items: flex-start; padding: 78px 10px 0; }
.sg-menu-card { width: 78%; display: grid; gap: 2px; padding: 8px; border-radius: 18px; background: var(--sg-card); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4); transform: scale(0.8); transform-origin: bottom right; transition: transform 400ms cubic-bezier(.2, .9, .3, 1.1); }
.sg[data-os='android'] .sg-menu-card { transform-origin: top right; border-radius: 12px; width: 82%; }
.sg-menu.is-on .sg-menu-card { transform: none; }
.sg-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.25; }
.sg-row > b { flex: none; width: 22px; text-align: center; font-size: 15px; font-weight: 500; }
.sg-dim { opacity: 0.45; }

/* 4. Лист «Поделиться» на iPhone */
.sg-share { display: flex; align-items: flex-end; padding: 8px; }
.sg-share-card { width: 100%; display: grid; gap: 2px; padding: 14px 10px 18px; border-radius: 26px; background: var(--sg-card); box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.35); transform: translateY(60%); transition: transform 460ms var(--sg-out); }
.sg-share.is-on .sg-share-card { transform: none; }
.sg-share-apps { display: flex; justify-content: space-around; padding: 4px 4px 10px; border-bottom: 1px solid var(--sg-soft); margin-bottom: 4px; }
.sg-share-apps i { width: 40px; height: 40px; border-radius: 11px; background: var(--sg-soft); }

/* 5. Окно «Добавить» */
.sg-confirm { display: grid; place-items: center; padding: 16px; }
.sg[data-os='ios'] .sg-confirm { align-items: start; padding-top: 48px; }
.sg-confirm-card { width: 100%; padding: 14px; border-radius: 22px; background: var(--sg-card); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.45); transform: translateY(16px) scale(0.96); transition: transform 440ms var(--sg-out); }
.sg-confirm.is-on .sg-confirm-card { transform: none; }
.sg-confirm-head { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 14px; }
.sg-add { padding: 7px 12px; border-radius: 10px; font-weight: 700; color: var(--sg-blue); }
.sg-confirm-app { display: flex; align-items: center; gap: 12px; }
.sg-confirm-app img { width: 54px; height: 54px; border-radius: 13px; }
.sg-confirm-app b { display: block; font-size: 16px; }
.sg-confirm-app small { font-size: 12px; opacity: 0.6; }
.sg-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sg-soft); font-size: 12.5px; }
.sg-toggle i { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: #34c759; }
.sg-toggle i::after { content: ''; position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.sg-confirm-card.android { display: grid; gap: 16px; border-radius: 28px; padding: 20px 18px 14px; }
.sg-confirm-card.android > b { font-size: 17px; font-weight: 600; }
.sg-abtns { display: flex; justify-content: flex-end; gap: 6px; font-size: 13.5px; font-weight: 600; color: #3c6fe0; }
.sg-abtns span { padding: 8px 12px; border-radius: 18px; }
@media (prefers-color-scheme: dark) { .sg-abtns { color: #9bb8ff; } }

/* 6–7. Экран «Домой»: появляется красный значок, палец нажимает */
.sg-home { display: flex; flex-direction: column; justify-content: space-between; padding: 54px 18px 18px; background: linear-gradient(160deg, #ffcfa6 0%, #f0898d 45%, #6c5cc4 100%); }
.sg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 12px; justify-items: center; }
.sg-grid > i { width: 48px; height: 48px; border-radius: 13px; background: rgba(255, 255, 255, 0.42); }
.sg-icon { position: relative; display: grid; justify-items: center; gap: 5px; transform: scale(0.2); opacity: 0; }
.sg-icon img { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 8px 20px -6px rgba(140, 10, 10, 0.6); transition: transform 180ms ease; }
.sg-icon small { font-size: 10.5px; font-weight: 600; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.sg-icon::before { content: ''; position: absolute; top: -6px; left: 50%; width: 64px; height: 64px; margin-left: -32px; border-radius: 18px; background: radial-gradient(closest-side, rgba(255, 90, 80, 0.55), transparent); opacity: 0; }
.sg-home.is-on .sg-icon { animation: sg-pop 680ms 280ms var(--sg-spring) forwards; }
.sg-home.is-on .sg-icon::before { animation: sg-glow 2s 900ms ease-in-out infinite; }
.sg-home.is-press .sg-icon img { transform: scale(0.86); }
@keyframes sg-pop { to { transform: none; opacity: 1; } }
@keyframes sg-glow { 50% { opacity: 1; } }
.sg-dock { display: flex; justify-content: space-around; padding: 12px; border-radius: 26px; background: rgba(255, 255, 255, 0.3); }
.sg-dock i { width: 46px; height: 46px; border-radius: 13px; background: rgba(255, 255, 255, 0.5); }

/* 8. Мама нажала: страница SOS после отправки */
.sg-sent { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 44px 14px 16px; text-align: center; background: #fff6f3; color: #1e1216; }
@media (prefers-color-scheme: dark) { .sg-sent { background: #160c10; color: #fbf1f2; } }
.sg-sent::before { content: ''; position: absolute; inset: 0; background: var(--sg-red); opacity: 0; pointer-events: none; }
.sg-sent.is-on::before { animation: sg-flash 700ms ease-out; }
@keyframes sg-flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }
.sg-okmark { align-self: center; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: var(--sg-ok); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sg-ok) 18%, transparent); }
.sg-sent.is-on .sg-okmark { animation: sg-pop-in 560ms 200ms var(--sg-spring) both; }
@keyframes sg-pop-in { from { transform: scale(0.3); opacity: 0; } }
.sg-sent > b { font-size: 18px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.sg-done { margin: 0; padding: 2px 12px; list-style: none; text-align: left; border-radius: 16px; background: color-mix(in srgb, currentColor 5%, transparent); }
.sg-done li { position: relative; padding: 7px 0 7px 22px; font-size: 11.5px; line-height: 1.3; border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.sg-done li:first-child { border-top: 0; }
.sg-done li::before { content: '✓'; position: absolute; left: 1px; top: 6px; font-weight: 800; color: var(--sg-ok); }
.sg-sent.is-on .sg-done li { animation: sg-rise 420ms var(--sg-out) both; }
.sg-sent.is-on .sg-done li:nth-child(1) { animation-delay: 450ms; }
.sg-sent.is-on .sg-done li:nth-child(2) { animation-delay: 700ms; }
.sg-sent.is-on .sg-done li:nth-child(3) { animation-delay: 950ms; }
@keyframes sg-rise { from { opacity: 0; transform: translateY(8px); } }
.sg-calls { display: grid; gap: 7px; }
.sg-calls span { padding: 11px 8px; border-radius: 14px; font-size: 14px; font-weight: 800; color: #fff; background: var(--sg-red); }
.sg-calls span + span { background: #1e1216; }
@media (prefers-color-scheme: dark) { .sg-calls span + span { background: #fbf1f2; color: #160c10; } }
.sg-cancel { padding: 10px 8px; border-radius: 14px; font-size: 12.5px; font-weight: 700; background: color-mix(in srgb, currentColor 8%, transparent); }

/* «Стук по крышке»: команда, настройка и задняя крышка */
.sg-short { display: grid; align-content: start; gap: 8px; padding: 48px 12px 12px; }
.sg-short-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; font-size: 13px; }
.sg-short-head b { font-size: 17px; }
.sg-action { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: var(--sg-card); font-size: 12.5px; box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.5); transform: translateY(10px); opacity: 0; }
.sg-action i { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 13px; color: #fff; background: #3c6fe0; }
.sg-action i.red { background: var(--sg-red); }
.sg-short.is-on .sg-action { animation: sg-rise-in 440ms var(--sg-out) forwards; }
.sg-short.is-on .sg-action:nth-of-type(2) { animation-delay: 200ms; }
.sg-short.is-on .sg-action:nth-of-type(3) { animation-delay: 400ms; }
@keyframes sg-rise-in { to { transform: none; opacity: 1; } }
.sg-ready { justify-self: end; margin-top: 4px; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--sg-blue); }
.sg-settings { display: grid; align-content: start; gap: 6px; padding: 48px 12px 12px; }
.sg-crumbs { padding: 0 6px 4px; font-size: 10.5px; line-height: 1.35; opacity: 0.55; }
.sg-settings > b { padding: 0 6px 6px; font-size: 18px; }
.sg-list { display: grid; padding: 4px; border-radius: 16px; background: var(--sg-card); }
.sg-list .sg-row { justify-content: space-between; }
.sg-list .sg-row + .sg-row { border-top: 1px solid var(--sg-soft); border-radius: 0 0 12px 12px; }
.sg-check { color: var(--sg-blue); font-weight: 800; opacity: 0; }
.sg-settings.is-on .sg-check { animation: sg-rise-in 300ms 1100ms forwards; }
.sg-backside { display: grid; place-items: center; background: linear-gradient(160deg, #3a2d40, #1b1320); }
.sg-backside::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.08) 45%, transparent 60%); }
.sg-cams { position: absolute; top: 18px; left: 18px; width: 86px; height: 86px; border-radius: 26px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sg-cams i { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #3b4a63, #07070a 60%); box-shadow: 0 0 0 3px #2a2230; }
.sg-cams i:nth-child(1) { top: 10px; left: 10px; }
.sg-cams i:nth-child(2) { bottom: 10px; left: 10px; }
.sg-cams i:nth-child(3) { top: 28px; right: 8px; width: 22px; height: 22px; }
.sg-knock { position: relative; width: 70px; height: 70px; margin-top: 30px; }
.sg-knock i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.75); opacity: 0; }
.sg-backside.is-on .sg-knock i { animation: sg-knock 900ms ease-out 2; }
.sg-backside.is-on .sg-knock i:nth-child(1) { animation-delay: 500ms; }
.sg-backside.is-on .sg-knock i:nth-child(2) { animation-delay: 760ms; }
@keyframes sg-knock { 0% { transform: scale(0.3); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.sg-backside small { position: absolute; bottom: 46px; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }
.sg-banner { position: absolute; z-index: 6; left: 10px; right: 10px; top: 44px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px; background: color-mix(in srgb, var(--sg-card) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 30px -10px rgba(20, 10, 30, 0.45); transform: translateY(-140%); opacity: 0; transition: transform 520ms var(--sg-spring), opacity 300ms; }
.sg-banner img { width: 30px; height: 30px; border-radius: 8px; }
.sg-banner b { display: block; font-size: 12.5px; }
.sg-banner small { display: block; font-size: 11px; opacity: 0.7; line-height: 1.3; }
.sg-tapdone.is-on .sg-banner { transform: none; opacity: 1; transition-delay: 250ms; }

/* Телефон родных: тревога «Мама просит помощи» приходит сразу */
.sg-family {
  position: absolute; z-index: 3; right: -34px; bottom: -30px; width: 216px; padding: 10px; border-radius: 22px;
  background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--glass-edge), 0 24px 50px -18px rgba(60, 10, 10, 0.55);
  opacity: 0; transform: translateY(18px) scale(0.94); transform-origin: bottom right; transition: opacity 320ms ease, transform 560ms var(--sg-spring); pointer-events: none;
}
.sg[data-family] .sg-family { opacity: 1; transform: none; transition-delay: 900ms; }
.sg-family-cap { margin: 0 4px 6px; font-size: 11px; font-weight: 650; letter-spacing: 0.02em; color: var(--plum-3); }
.sg-alarm { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; color: #fff; background: #e2403f; }
.sg-orb { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.sg-orb::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.sg[data-family] .sg-orb::before { animation: sg-beat 1.1s ease-in-out infinite; }
@keyframes sg-beat { 50% { transform: scale(0.65); opacity: 0.7; } }
.sg-alarm b { display: block; font-size: 13.5px; line-height: 1.2; }
.sg-alarm small { display: block; font-size: 11px; line-height: 1.3; opacity: 0.88; }
.sg-take { display: block; margin-top: 7px; padding: 8px; border-radius: 12px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--plum); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }

/* Подсветка нужной кнопки и палец */
.sg-hit { position: relative; box-shadow: 0 0 0 2px #f2552c, 0 0 0 7px rgba(242, 85, 44, 0.22); animation: sg-breathe 1.8s ease-in-out infinite; }
.sg-row.sg-hit { color: #e9481d; font-weight: 650; background: rgba(242, 85, 44, 0.1); }
.sg-icon.sg-hit { box-shadow: none; animation: none; }
@keyframes sg-breathe { 50% { box-shadow: 0 0 0 2px #f2552c, 0 0 0 11px rgba(242, 85, 44, 0.1); } }
.sg-finger { position: absolute; z-index: 8; left: 50%; top: 70%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1.5px rgba(36, 26, 34, 0.35), 0 6px 16px rgba(0, 0, 0, 0.25); opacity: 0; transition: left 540ms cubic-bezier(.3, .8, .3, 1), top 540ms cubic-bezier(.3, .8, .3, 1), opacity 240ms; pointer-events: none; }
.sg-finger.tap { animation: sg-tap 520ms 400ms ease-out; }
@keyframes sg-tap { 40% { transform: scale(0.72); } 100% { transform: none; } }

/* Подпись под телефоном: на узком экране список шагов далеко, поэтому текущий шаг повторяем здесь */
.sg-caption { display: none; }
@media (max-width: 900px) {
  /* Телефон сразу под переключателем, список шагов ниже */
  .sg { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sg-text { display: contents; }
  .sg-text > * { justify-self: start; }
  .sg-phone { order: 1; max-width: 270px; margin: 14px 0 0; justify-self: center; }
  .sg-steps, .sg-note, .sg-call { order: 3; }
  .sg-steps { margin-top: 18px; }
  .sg-family { right: -22px; bottom: -78px; width: 204px; }
  .sg-caption { order: 2; display: flex; gap: 10px; align-items: flex-start; justify-self: stretch; min-height: 3.2em; margin: 18px 0 0; transition: margin 400ms var(--sg-out); padding: 0 2px; font-size: 16px; line-height: 1.4; color: var(--plum); }
  .sg[data-family] .sg-caption { margin-top: 84px; }
  .sg-caption b { flex: none; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--sg-red); }
}
@media (max-width: 760px) { .sg-lead { font-size: 17px; } .sg-steps button { font-size: 16px; } }
@media (max-width: 380px) {
  .sg-os button { padding: 10px 13px; font-size: 14px; }
  .sg-phone { max-width: 250px; }
  .sg-family { right: -10px; width: 200px; }
}

/* Без анимации: шаги стоят на месте, телефон показывает выбранный шаг сразу */
@media (prefers-reduced-motion: reduce) {
  .sg-scene, .sg-sheet, .sg-menu-card, .sg-share-card, .sg-confirm-card, .sg-finger, .sg-family, .sg-banner, .sg-icon img { transition: none !important; }
  .sg-scene *, .sg-scene::before, .sg-sent::before, .sg-hit, .sg-finger.tap, .sg-orb::before { animation: none !important; }
  .sg-icon, .sg-action, .sg-check { transform: none; opacity: 1; }
  .sg[data-family] .sg-family { transition-delay: 0s; }
}
