/* ═══════════════════════════════════════════════════════
   calls.iluh.in — поверх общей дизайн-системы (app.css)
   ═══════════════════════════════════════════════════════ */
:root {
    --a4: #ec4899;
    --cell: rgba(255, 255, 255, .045);
    --win: rgba(13, 15, 25, .74);
    --win-line: rgba(255, 255, 255, .1);
    --tb: rgba(255, 255, 255, .08);
    --tile-peer: linear-gradient(150deg, #0e3b63 0%, #14243f 70%);
    --tile-me: linear-gradient(150deg, #4b2152 0%, #261a40 70%);
    --sil1: rgba(255, 255, 255, .34); --sil2: rgba(255, 255, 255, .22);
    --label-bg: rgba(0, 0, 0, .5);
    --chip-bg: rgba(16, 18, 28, .72);
}
html[data-theme="light"] {
    --a4: #db2777;
    --cell: rgba(15, 23, 42, .045);
    --win: rgba(255, 255, 255, .78);
    --win-line: rgba(15, 23, 42, .1);
    --tb: rgba(15, 23, 42, .06);
    --tile-peer: linear-gradient(150deg, #a9d8ff 0%, #c9d8ff 70%);
    --tile-me: linear-gradient(150deg, #f6c9f5 0%, #dcd0ff 70%);
    --sil1: rgba(255, 255, 255, .8); --sil2: rgba(255, 255, 255, .55);
    --label-bg: rgba(15, 23, 42, .62);
    --chip-bg: rgba(255, 255, 255, .8);
}
button { -webkit-tap-highlight-color: transparent; }
.btn:disabled { opacity: .42; pointer-events: none; filter: saturate(.5); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Аватары ── */
.av { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font: 800 15px/1 'Manrope', sans-serif; letter-spacing: .01em; }
.av-pink { background: linear-gradient(135deg, #f472b6, #ec4899 55%, #db2777); }
.av-cyan { background: linear-gradient(135deg, #22d3ee, #3b82f6); }
.av .ic { width: 55%; height: 55%; stroke-width: 2; }

/* ═════════ Каркас страницы ═════════ */
.page { width: min(1200px, 100%); margin: 0 auto; padding: 88px 24px 36px; }
.page-narrow { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding-top: 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; min-height: calc(100vh - 170px); min-height: calc(100dvh - 170px); }
.hero-left > * { animation: rise .85s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.hero-left .card { animation-delay: calc(var(--i, 0) * 90ms + .05s); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 15px 7px 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 700; color: var(--fg-soft); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: livepulse 2.2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } }
.hero-left h1 { margin: 20px 0 14px; font-size: clamp(36px, 4.1vw, 58px); line-height: 1.03; font-weight: 800; letter-spacing: -.038em; color: var(--fg); }
.grad-text { white-space: nowrap; background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3), var(--a1)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 7s linear infinite; }
@keyframes shine { to { background-position: -300% 0; } }
.lead { margin: 0 0 28px; max-width: 470px; color: var(--muted); font-size: 16.5px; line-height: 1.6; }

.call-card { width: 100%; max-width: 520px; padding: 24px; }
.card[data-view="home"] .v-home { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: .08s, .08s, 0s; }
.v-home { min-width: 0; }
.call-card .stage { position: relative; display: block; min-height: 300px; }
.call-card .stage.anim { transition: height .55s var(--ease); }
.call-card .view { position: absolute; left: 0; right: 0; top: 0; }

/* ═════════ ID комнаты: ячейки ═════════ */
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lbl-row .lbl { margin: 0; }
.lbl-hint { font-size: 12px; color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.idrow { display: flex; gap: 10px; align-items: stretch; }
.digits { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 9px; border-radius: 20px; overflow: hidden; background: var(--field); box-shadow: inset 0 0 0 1.5px var(--line); cursor: text; transition: box-shadow .35s, background .35s; }
.digits:focus-within { box-shadow: inset 0 0 0 1.5px var(--a1), 0 0 0 4px rgba(59, 130, 246, .15); }
.digits-input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; opacity: 0; border: 0; background: none; font-size: 16px; cursor: text; caret-color: transparent; }
.dc { position: relative; flex: 1 1 0; min-width: 0; max-width: 44px; height: 56px; display: grid; place-items: center; border-radius: 13px; background: var(--cell); box-shadow: inset 0 0 0 1px var(--line); font: 700 25px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); transition: box-shadow .25s, background .25s, transform .25s var(--ease); }
.dc::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ph); transition: opacity .2s; }
.dc.on::before { display: none; }
.dc.on { background: linear-gradient(180deg, rgba(59, 130, 246, .13), rgba(6, 182, 212, .06)); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .35); }
.dc.pop { animation: dpop .42s var(--ease); }
@keyframes dpop { 0% { transform: scale(.7) translateY(6px); } 60% { transform: scale(1.1); } 100% { transform: none; } }
.digits:focus-within .dc.cur { box-shadow: inset 0 0 0 1.5px var(--a2), 0 0 14px rgba(6, 182, 212, .35); }
.digits:focus-within .dc.cur:not(.on)::before { width: 2px; height: 26px; border-radius: 2px; background: var(--a2); animation: caret 1s steps(1) infinite; }
.sep { flex: none; width: 8px; height: 2px; border-radius: 2px; background: var(--dz-line); }
.digits::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgba(6, 182, 212, .22), transparent); }
.digits[data-st="checking"]::after { opacity: 1; animation: sweep-x 1.1s ease-in-out infinite; }
@keyframes sweep-x { to { left: 110%; } }
.digits[data-st="free"] { box-shadow: inset 0 0 0 1.5px var(--ok), 0 0 28px rgba(52, 211, 153, .16); }
.digits[data-st="waiting"] { box-shadow: inset 0 0 0 1.5px #f59e0b, 0 0 28px rgba(245, 158, 11, .2); animation: amber 2s ease-in-out infinite; }
.digits[data-st="occupied"], .digits[data-st="error"] { box-shadow: inset 0 0 0 1.5px var(--err), 0 0 28px rgba(251, 113, 133, .18); animation: shake .5s; }
@keyframes amber { 50% { box-shadow: inset 0 0 0 1.5px #f59e0b, 0 0 40px rgba(245, 158, 11, .34); } }

.dice { flex: none; width: 66px; border: 0; border-radius: 20px; display: grid; place-items: center; cursor: pointer; color: var(--fg-soft); background: var(--ghost); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), background .25s, color .25s; }
.dice:hover { background: var(--ghost-h); color: var(--fg); transform: translateY(-2px); }
.dice:active { transform: scale(.94); }
.dice .ic { width: 26px; height: 26px; transition: transform .6s var(--ease); }
.dice:hover .ic { transform: rotate(-16deg) scale(1.08); }
.dice.rolling .ic { animation: roll .7s var(--ease); color: var(--a2); }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }

.status { display: flex; align-items: center; gap: 10px; min-height: 22px; margin: 14px 2px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.sdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: .7; transition: background .3s, box-shadow .3s, opacity .3s; }
.status[data-st="checking"] .sdot { background: var(--a1); opacity: 1; animation: blink .8s ease-in-out infinite; }
.status[data-st="free"] { color: var(--ok); } .status[data-st="free"] .sdot { background: var(--ok); opacity: 1; box-shadow: 0 0 10px var(--ok); }
.status[data-st="waiting"] { color: #d97706; } .status[data-st="waiting"] .sdot { background: #f59e0b; opacity: 1; animation: livepulse-a 1.6s infinite; }
.status[data-st="occupied"], .status[data-st="error"] { color: var(--err); } .status[data-st="occupied"] .sdot, .status[data-st="error"] .sdot { background: var(--err); opacity: 1; box-shadow: 0 0 10px var(--err); }
html[data-theme="dark"] .status[data-st="waiting"] { color: #fbbf24; }
@keyframes blink { 50% { opacity: .25; } }
@keyframes livepulse-a { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(245, 158, 11, 0); } }

.btns { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; margin-top: 18px; }
.btns .btn { height: 54px; font-size: 15px; border-radius: 16px; }
.privacy { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.privacy .ic { flex: none; margin-top: 2px; color: var(--ok); }

/* ═════════ Подключение: два узла и луч ═════════ */
.conn { position: relative; width: min(320px, 100%); height: 110px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.node { position: relative; flex: none; width: 70px; height: 70px; display: grid; place-items: center; z-index: 2; }
.node .av { width: 62px; height: 62px; font-size: 18px; box-shadow: 0 8px 26px rgba(59, 130, 246, .35); }
.n1 .av { box-shadow: 0 8px 26px rgba(236, 72, 153, .4); }
.n2 .av .u { display: none; } .n2 .av .q { font-size: 24px; }
.halo { position: absolute; inset: -7px; border-radius: 50%; border: 2px dashed var(--a2); opacity: .75; animation: spin 7s linear infinite; }
.n2::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--a2); opacity: 0; }
.card[data-view="busy"] .n2::after { animation: ripple 1.6s ease-out infinite; }
.beam { flex: 1; min-width: 0; height: 70px; margin: 0 -8px; overflow: visible; }
.bp-bg { fill: none; stroke: var(--ring-bg); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bp-flow { fill: none; stroke: url(#grad); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 5 9; vector-effect: non-scaling-stroke; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.pk { fill: var(--a2); filter: drop-shadow(0 0 6px var(--a2)); }
/* режим «присоединяемся»: узлы сближаются */
.card[data-mode="join"] .halo { display: none; }
.card[data-mode="join"] .n2 .av .q { display: none; } .card[data-mode="join"] .n2 .av .u { display: block; }
.card[data-mode="join"][data-view="busy"] .n1 { animation: to-r 1.15s .25s var(--ease) forwards; }
.card[data-mode="join"][data-view="busy"] .n2 { animation: to-l 1.15s .25s var(--ease) forwards; }
.card[data-mode="join"][data-view="busy"] .beam { animation: beam-in 1.15s .25s var(--ease) forwards; transform-origin: center; }
@keyframes to-r { to { transform: translateX(44px); } } @keyframes to-l { to { transform: translateX(-44px); } }
@keyframes beam-in { to { opacity: .0; transform: scaleX(.3); } }

/* ═════════ Готово ═════════ */
.roomid { margin: 4px 0 14px; padding: 4px 12px; border: 0; border-radius: 12px; background: none; cursor: pointer; font: 800 36px/1.15 var(--mono); letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap; background-image: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; transition: transform .3s var(--ease), filter .3s; }
button.roomid:hover { transform: scale(1.04); filter: drop-shadow(0 0 14px rgba(6, 182, 212, .4)); }
.roomid-lg { margin: 8px 0 12px; font-size: clamp(30px, 8vw, 40px); cursor: default; }
.call-card .actions { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 8px; width: 100%; margin-top: 16px; }
.call-card .actions .btn { width: 100%; padding: 0 10px; font-size: 13.5px; white-space: nowrap; }
.call-card .actions .btn-grad { height: 46px; }
.call-card .actions .btn-ghost { height: 46px; }
.v-error .actions { display: flex; justify-content: center; }
.v-error .actions .btn { width: auto; padding: 0 22px; }
.linkbtn { margin-top: 14px; padding: 4px 6px; border: 0; background: none; color: var(--muted); font: 600 12.5px/1.2 inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); cursor: pointer; transition: color .2s; }
a.linkbtn { display: inline-block; text-decoration-color: var(--line); }
.linkbtn:hover { color: var(--err); text-decoration-color: currentColor; }
a.linkbtn:hover { color: var(--fg); }
.chip-st { color: var(--fg-soft); }
.chip-st .sdot { width: 8px; height: 8px; }
.chip-st.waiting .sdot { background: #f59e0b; opacity: 1; animation: livepulse-a 1.6s infinite; }
.chip-st.occupied .sdot { background: var(--err); opacity: 1; }
.solo-eyebrow { margin: 4px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.solo-text { margin-bottom: 20px; }
.solo-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.solo-note { max-width: 330px; margin: 14px 0 6px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.btn-wide { width: 100%; }
.room-card .result { width: 100%; margin-top: 4px; }
.room-card .lobby { width: 100%; margin: 18px 0 14px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }

/* Анонс экрана подключения */
.lb-cam, .lb-mic { position: relative; border-radius: 18px; padding: 14px; min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.lb-cam { background: var(--tile-me); }
.lb-mic { background: var(--field); align-items: stretch; justify-content: space-between; }
.lb-cam .av { width: 50px; height: 50px; font-size: 14px; }
.lb-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--fg-soft); }
.lb-cam .lb-label { color: #fff; padding: 3px 8px; border-radius: 8px; background: var(--label-bg); }
.lb-label .ic { width: 14px; height: 14px; }
.eq.big { position: static; right: auto; bottom: auto; opacity: 1; display: flex; align-items: flex-end; gap: 3px; height: 42px; }
.eq.big i { flex: 1; height: var(--h, 50%); border-radius: 3px; background: linear-gradient(180deg, var(--a2), var(--a1)); transform-origin: bottom; animation: eq-big 1.1s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes eq-big { 0%, 100% { transform: scaleY(.18); } 50% { transform: scaleY(1); } }

/* ═════════ Сцена: окно звонка ═════════ */
.hero-right { min-width: 0; }
.scene { position: relative; width: min(600px, 100%); margin: 0 auto; padding: 84px 34px 90px; }
.sc-beam { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.arc-bg { fill: none; stroke: var(--dz-line); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.arc-flow { fill: none; stroke: url(#grad); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 10; opacity: .8; vector-effect: non-scaling-stroke; animation: dash 1.4s linear infinite; }
.sc-av { position: absolute; z-index: 0; width: 60px; height: 60px; animation: floaty 8s ease-in-out infinite; }
.sc-av .av { width: 100%; height: 100%; font-size: 17px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--a2) 12%, transparent), 0 14px 34px rgba(6, 182, 212, .3); }
.sc-av.l { left: 1%; bottom: 1%; } .sc-av.r { right: 1%; top: 1%; animation-delay: -3s; }
.sc-av.r .av { box-shadow: 0 0 0 6px color-mix(in srgb, var(--a4) 12%, transparent), 0 14px 34px rgba(236, 72, 153, .3); }

.tilt { position: relative; z-index: 1; transform-style: preserve-3d; transform: perspective(1300px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s ease-out; will-change: transform; }
.win { position: relative; padding: 14px; border-radius: 28px; overflow: hidden; background: var(--win); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); box-shadow: 0 0 0 1px var(--win-line), 0 50px 100px rgba(0, 0, 0, .5), 0 0 80px rgba(59, 130, 246, .12), inset 0 1px 0 rgba(255, 255, 255, .08); animation: floaty 9s ease-in-out infinite; }
html[data-theme="light"] .win { box-shadow: 0 0 0 1px var(--win-line), 0 40px 80px rgba(30, 41, 90, .18), inset 0 1px 0 #fff; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.win-top { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 12px; }
.mpill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--tb); font-size: 12.5px; color: var(--fg-soft); }
.mpill .ic { width: 13px; height: 13px; color: var(--ok); }
.mpill b { font: 700 12.5px var(--mono); letter-spacing: .05em; font-variant-numeric: tabular-nums; color: var(--fg); }
.mtime { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--err); animation: blink 1.4s ease-in-out infinite; }

.tiles { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .45s var(--ease); }
.tile.peer { background: var(--tile-peer); } .tile.me { background: var(--tile-me); }
.tile.speaking { box-shadow: 0 0 0 2.5px var(--a1), 0 0 34px rgba(59, 130, 246, .5); }
.tbg { position: absolute; inset: -20%; pointer-events: none; background: radial-gradient(40% 40% at 25% 25%, rgba(34, 211, 238, .35), transparent 70%), radial-gradient(45% 45% at 78% 72%, rgba(139, 92, 246, .32), transparent 70%); animation: drift 12s ease-in-out infinite alternate; }
.tile.me .tbg { background: radial-gradient(40% 40% at 70% 25%, rgba(236, 72, 153, .38), transparent 70%), radial-gradient(45% 45% at 25% 78%, rgba(139, 92, 246, .32), transparent 70%); animation-delay: -4s; }
@keyframes drift { to { transform: translate(7%, 6%) rotate(8deg) scale(1.1); } }
.sil { position: absolute; inset: 0; transition: opacity .45s; }
.sil::before { content: ''; position: absolute; left: 50%; top: 24%; width: 31%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(circle at 35% 30%, var(--sil1), var(--sil2)); }
.sil::after { content: ''; position: absolute; left: 50%; bottom: -14%; width: 72%; height: 48%; transform: translateX(-50%); border-radius: 50% 50% 0 0 / 80% 80% 0 0; background: linear-gradient(180deg, var(--sil1), var(--sil2)); }
.tile.peer .sil { animation: sway 7s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(3%) rotate(1.4deg); } }
.tile .av.big { position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; height: auto; font-size: clamp(16px, 2.4vw, 24px); transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: opacity .4s, transform .5s var(--ease); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.tile.cam-off .av.big { opacity: 1; transform: translate(-50%, -50%); }
.tile.cam-off .sil { opacity: 0; }
.tname { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 9px; background: var(--label-bg); color: #fff; font-size: 12px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tmic { position: absolute; left: 10px; top: 10px; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: rgba(251, 113, 133, .9); color: #fff; opacity: 0; transform: scale(.5); transition: opacity .25s, transform .35s var(--ease); }
.tmic .ic { width: 14px; height: 14px; }
.tile.muted .tmic { opacity: 1; transform: none; }
.eq { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: flex-end; gap: 3px; height: 20px; opacity: 0; transition: opacity .3s; }
.tile.speaking .eq { opacity: 1; }
.eq i { width: 3.5px; height: 100%; border-radius: 3px; background: #fff; transform: scaleY(.2); transform-origin: bottom; }
.tile.speaking .eq i { animation: eq .85s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.2s !important; } .eq i:nth-child(3) { animation-delay: -.45s !important; } .eq i:nth-child(4) { animation-delay: -.1s !important; } .eq i:nth-child(5) { animation-delay: -.6s !important; }
@keyframes eq { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
.thand { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #f59e0b; color: #fff; opacity: 0; transform: scale(.4) rotate(-30deg); transition: opacity .25s, transform .45s var(--ease); }
.thand .ic { width: 16px; height: 16px; }
.tile.hand .thand { opacity: 1; transform: none; animation: wave 1.1s .3s ease-in-out 2; }
@keyframes wave { 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }

.tbar { display: flex; justify-content: center; gap: 8px; margin: 14px 0 2px; }
.tbar button { position: relative; width: 44px; height: 44px; border: 0; border-radius: 15px; display: grid; place-items: center; cursor: pointer; background: var(--tb); color: var(--fg-soft); transition: background .25s, color .25s, transform .3s var(--ease); }
.tbar button:hover { transform: translateY(-3px); color: var(--fg); }
.tbar button:active { transform: scale(.9); }
.tbar .ic { grid-area: 1 / 1; width: 19px; height: 19px; }
.tbar .is-on { background: rgba(59, 130, 246, .2); color: var(--a1); }
.tbar .is-on .i-off, .tbar .is-off .i-on { display: none; }
.tbar .is-off { background: rgba(251, 113, 133, .16); color: var(--err); }
.tbar .act { background: rgba(245, 158, 11, .2); color: #f59e0b; }
.tbar .hang { width: 56px; background: var(--err); color: #fff; box-shadow: 0 8px 22px rgba(251, 113, 133, .4); }
.tbar .hang .ic { transform: rotate(135deg); }
.tbar .hang:hover { color: #fff; filter: brightness(1.08); }

.chatpop { position: absolute; right: 16px; bottom: 80px; max-width: 74%; display: flex; gap: 9px; align-items: flex-start; padding: 9px 13px 9px 9px; border-radius: 16px 16px 5px 16px; background: var(--surface); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--win-line), 0 14px 30px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(12px) scale(.94); transform-origin: bottom right; transition: opacity .3s, transform .5s var(--ease); pointer-events: none; z-index: 4; }
.chatpop.show { opacity: 1; transform: none; }
.cav { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #22d3ee, #3b82f6); color: #fff; font: 800 10px 'Manrope', sans-serif; }
.chatpop div { display: flex; flex-direction: column; line-height: 1.35; font-size: 12.5px; color: var(--fg); } .chatpop b { font-size: 11px; color: var(--muted); }
.reacts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.rx { position: absolute; bottom: 62px; font-size: 28px; animation: rx-up 2.4s ease-out forwards; }
@keyframes rx-up { 0% { opacity: 0; transform: translate(0, 10px) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0), -190px) scale(1.25) rotate(var(--r, 0deg)); } }
.endcover { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: inherit; background: rgba(6, 8, 14, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .45s; color: #fff; }
html[data-theme="light"] .endcover { background: rgba(238, 242, 251, .82); color: var(--fg); }
.endcover b { font-size: 16px; } .endcover small { color: var(--muted); font-size: 12.5px; }
.endcover .ec-ic { width: 34px; height: 34px; margin-bottom: 4px; color: var(--err); transform: rotate(135deg); }
.win.ended .endcover { opacity: 1; }

.fchip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--fg); white-space: nowrap; background: var(--chip-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--win-line), 0 14px 30px rgba(0, 0, 0, .25); transform: translateZ(60px); animation: floaty 7s ease-in-out infinite; }
.fchip .ic { width: 15px; height: 15px; color: var(--a2); }
.fchip.f1 { top: -22px; left: 50%; margin-left: -66px; } .fchip.f2 { right: -26px; bottom: -20px; animation-delay: -2.5s; } .fchip.f2 .ic { color: var(--ok); }
.fchip.f3 { left: -30px; top: 9%; animation-delay: -4.5s; } .fchip.f3 .ic { color: var(--a3); }
.scene.paused *, .scene.paused { animation-play-state: paused !important; }

/* ═════════ Как это работает ═════════ */
.how { margin-top: clamp(56px, 9vw, 110px); }
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-eyebrow { display: inline-block; margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--a2); }
.sec-title { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps::before { content: ''; position: absolute; z-index: -1; top: 74px; left: 17%; right: 17%; height: 0; border-top: 2px dashed var(--line); }
.steps::after { content: ''; position: absolute; z-index: -1; top: 69px; left: 17%; width: 10px; height: 10px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 14px var(--a2); animation: travel 5s ease-in-out infinite; }
@keyframes travel { 0% { left: 17%; opacity: 0; } 10%, 90% { opacity: 1; } 100% { left: calc(83% - 10px); opacity: 0; } }
.step { position: relative; padding: 26px 24px 26px; border-radius: 26px; text-align: left; background: var(--surface); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 1px var(--line), var(--card-inset); transition: transform .45s var(--ease), box-shadow .45s; }
.step:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px var(--line), 0 24px 50px rgba(6, 182, 212, .14); }
.sn { position: absolute; right: 22px; top: 16px; font: 800 44px/1 var(--mono); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--line); }
.si { width: 52px; height: 52px; margin-bottom: 18px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 10px 26px rgba(59, 130, 246, .35); transition: transform .5s var(--ease); }
.step:hover .si { transform: rotate(-8deg) scale(1.08); }
.si .ic { width: 24px; height: 24px; }
.step h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.js .step { opacity: 0; }
.js .how.in .step { opacity: 1; animation: rise .8s var(--ease) backwards; animation-delay: calc(var(--i) * 130ms); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.trust .chip { padding: 8px 15px; font-size: 13px; }
.pfoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.pfoot span:first-child { font-family: var(--mono); }

/* ═════════ Адаптив ═════════ */
@media (max-width: 1020px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; min-height: 0; }
    .hero-left { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .lead { margin-left: auto; margin-right: auto; }
    .scene { padding-top: 46px; }
}
@media (max-width: 760px) {
    .steps { grid-template-columns: 1fr; } .steps::before, .steps::after { display: none; }
    .page { padding: 76px 16px 28px; }
}
@media (max-width: 560px) {
    .call-card { padding: 18px 16px; }
    .dc { height: 50px; font-size: 22px; border-radius: 11px; } .digits { padding: 8px; gap: 4px; } .dice { width: 56px; border-radius: 18px; }
    .btns { grid-template-columns: 1fr; } .btns .btn { height: 52px; }
    .roomid { font-size: clamp(26px, 9vw, 34px); }
    .call-card .actions { grid-template-columns: 1fr 1fr; } .call-card .actions .btn-grad { grid-column: 1 / -1; }
    .scene { padding: 72px 4px 78px; }
    .win { padding: 11px; border-radius: 24px; }
    /* на телефоне свой экран — маленькое окошко поверх собеседника */
    .tiles { grid-template-columns: 1fr; }
    .tile.peer { aspect-ratio: 4 / 4.4; }
    .tile.me { position: absolute; right: 10px; bottom: 10px; width: 32%; aspect-ratio: 3 / 4; border-radius: 14px; z-index: 2; box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 10px 24px rgba(0, 0, 0, .4); }
    .tile.me .tname, .tile.me .eq { display: none; } .tile.me .av.big { width: 52%; font-size: 13px; }
    .tile.peer .tname { bottom: 10px; }
    .tbar { gap: 6px; } .tbar button { width: 40px; height: 40px; border-radius: 13px; } .tbar .hang { width: 50px; }
    .fchip.f2 { right: -2px; bottom: -18px; } .fchip.f3 { left: -2px; top: 11%; } .fchip.f1 { margin-left: -58px; } .fchip { font-size: 11.5px; padding: 7px 12px 7px 9px; }
    .sc-av { width: 48px; height: 48px; } .sc-av .av { font-size: 14px; } .sc-av.l { left: 2%; bottom: 0; } .sc-av.r { right: 2%; top: 0; }
    .room-card .lobby { grid-template-columns: 1fr; }
}
