/* The call pages and My calls: setup steps on a pine evening ground, then the full-screen call. Loads after style.css. */
.call-page { min-height: 100svh; color: var(--on-dark); background: radial-gradient(560px 380px at 12% -4%, rgba(237, 182, 92, .2), transparent 70%), radial-gradient(460px 360px at 100% 8%, rgba(237, 182, 92, .09), transparent 70%), var(--pine-800) fixed; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; padding: 10px 20px; }
.c-head .logo { font-size: 25px; }
.c-step { margin-left: auto; font-weight: 800; font-size: 14px; color: var(--on-dark-soft); white-space: nowrap; }
.c-acct { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; background: none; font-weight: 800; font-size: 15px; color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; white-space: nowrap; cursor: pointer; }
.c-step:empty + .c-acct { margin-left: auto; }
.c-progress { max-width: 600px; height: 4px; margin: 0 auto; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.c-progress i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--gold); transition: width .6s var(--out); }
.c-main { max-width: 640px; margin: 0 auto; padding: 30px 20px 40px; }

.view { animation: view-in .45s var(--out) both; }
@keyframes view-in { from { transform: translateY(14px); } }   /* movement only, so a step is never invisible */
.view h1 { font-size: clamp(32px, 8.2vw, 44px); font-weight: 800; color: #fff; }
.view h2 { margin-top: 36px; font-size: 26px; color: #fff; }
.sub { margin-top: 10px; color: var(--on-dark-soft); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -14px 0 6px -8px; padding: 0 10px 0 4px; border: 0; background: none; color: var(--on-dark-soft); font-weight: 800; font-size: 15px; cursor: pointer; border-radius: 999px; }
.back svg, .pill svg, .x svg, .add svg, .row svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.link { min-height: 44px; padding: 10px 4px; border: 0; background: none; color: var(--gold); font-weight: 800; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.note { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 16px; font-weight: 700; }
.note b { color: #fff; overflow-wrap: anywhere; }
.note.warn { background: rgba(237, 182, 92, .16); color: #FFE2B0; }
.oops { margin-top: 12px; font-size: 16px; font-weight: 700; color: #FFB3BF; text-align: center; }
.reassure { margin-top: 12px; font-size: 15px; color: var(--on-dark-soft); text-align: center; }
.reassure a { display: inline-block; padding: 12px 4px; color: #fff; font-weight: 700; }
.left { text-align: left; }

/* The pinned button at the bottom of each step: the button and nothing else */
.dock { position: sticky; bottom: 0; z-index: 5; margin: 26px -20px 0; padding: 20px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(14, 36, 29, 0), var(--pine-800) 30%); }
.dock .oops { margin-top: 10px; }

[data-hello-clip], [data-ready-clip], [data-stage-clip] { display: contents; }

/* 1. Who should call */
.who-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px; }
.who { position: relative; padding: 0; border: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--pine-700); color: #fff; cursor: pointer; transition: transform .3s var(--out), box-shadow .25s; }
.who .clip { object-position: center 26%; transition: scale .9s var(--out); }
.who::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); }
.who span { position: absolute; z-index: 1; left: 14px; right: 12px; bottom: 12px; text-align: left; font: 700 19px/1.15 var(--serif); font-variation-settings: "SOFT" 100; }
.who:active { transform: scale(.98); }
.who[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--gold); }
.who[aria-pressed="true"]::before { content: ""; position: absolute; z-index: 1; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%230E241D' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }

/* 2. Details */
.field { display: block; margin-top: 26px; }
.field > span { display: block; margin-bottom: 8px; font-weight: 800; font-size: 17px; color: #fff; }
.field small { margin-left: 6px; font-weight: 700; font-size: 14px; color: var(--on-dark-soft); }
.field input, .field select { width: 100%; height: 56px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--cream); color: var(--ink); font-weight: 700; font-size: 18px; caret-color: var(--red); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 38px; background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231B2A24' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
.field input::placeholder { color: #6E6C60; font-weight: 600; }
.field input:focus, .field select:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.field input.bad { outline: 3px solid #FF8A9B; outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips.family { margin-top: 22px; }
.chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; transition: background-color .2s, transform .18s var(--out); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--pine-900); box-shadow: none; }
[data-ages] .chip { min-width: 48px; padding: 0 12px; }
/* Brothers and sisters */
.sibs { margin-top: 34px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); }
.sib { display: grid; grid-template-columns: 1fr 104px 44px; gap: 10px; align-items: end; }
.sib .field { margin-top: 18px; }
.x { display: grid; place-items: center; width: 44px; height: 56px; padding: 0; border: 0; border-radius: 14px; background: none; color: var(--on-dark-soft); cursor: pointer; }
.add { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 14px 16px; border: 0; border-radius: 16px; background: rgba(237, 182, 92, .12); color: #fff; text-align: left; cursor: pointer; transition: background-color .2s, transform .18s var(--out); }
.add:active { transform: scale(.985); }
.add svg { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--gold); color: var(--pine-900); }
.add b { display: block; font-weight: 800; font-size: 18px; }
.add small { display: block; font-size: 15px; line-height: 1.35; color: var(--on-dark-soft); }

/* 3. The preview */
.hello { position: relative; margin-top: 22px; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 4.4; background: #000; isolation: isolate; }
.hello .clip { position: absolute; inset: 0; z-index: -2; object-position: center 22%; }
.hello::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 46%, rgba(0, 0, 0, .86)); }
.hello .btn { position: absolute; left: 14px; right: 14px; bottom: 14px; width: auto; }
.hello-cap { position: absolute; left: 14px; right: 14px; bottom: 84px; padding: 10px 14px; border-radius: 14px; background: rgba(7, 20, 15, .78); font-weight: 700; font-size: 17px; line-height: 1.4; color: #fff; }
.hello-cap:empty { display: none; }

/* 4. Choose a call */
.opts { display: grid; gap: 10px; margin-top: 22px; }
.opt { position: relative; display: grid; grid-template-columns: auto 1fr auto; column-gap: 14px; align-items: start; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); cursor: pointer; transition: background-color .2s, box-shadow .2s; }
.opt input { appearance: none; -webkit-appearance: none; grid-row: 1 / span 2; width: 24px; height: 24px; margin: 2px 0 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); transition: box-shadow .2s; }
.opt input:checked { box-shadow: inset 0 0 0 7.5px var(--gold); }
.opt:has(input:checked) { background: rgba(237, 182, 92, .12); box-shadow: inset 0 0 0 2px var(--gold); }
.opt:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.opt b { grid-column: 2; font: 700 20px/1.25 var(--serif); font-variation-settings: "SOFT" 100; color: #fff; }
.opt b em { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--red); font: 800 12px/1.5 var(--sans); font-style: normal; white-space: nowrap; vertical-align: 3px; }
.opt span { grid-column: 2 / -1; margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--on-dark-soft); }
.opt strong { grid-column: 3; grid-row: 1; text-align: right; font: 800 22px/1.15 var(--serif); font-variation-settings: "SOFT" 100; color: var(--gold); }
.opt strong small { display: block; max-width: 9.5em; margin-top: 3px; font: 700 12.5px/1.3 var(--sans); color: var(--on-dark-soft); }
.bill { margin: 22px 0 0; padding: 4px 18px; border-radius: 16px; background: rgba(7, 20, 15, .4); font-size: 16px; }
.bill div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; color: var(--on-dark-soft); }
.bill div + div { border-top: 1px solid rgba(255, 255, 255, .1); }
.bill dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.bill .sum { font-weight: 800; font-size: 18px; color: #fff; }
.bill .sum dd { color: var(--gold); }

/* 5. Sign in (also the gate on My calls) */
[data-si] .btn { margin-top: 18px; }
.field .code { font-size: 28px; font-weight: 800; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; padding: 0 8px 0 calc(8px + .32em); }
.field .code::placeholder { color: #B9B5A6; }

/* Ready */
.summary { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-top: 24px; padding: 12px 8px 12px 12px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.summary .clip, .row img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; object-position: center 22%; }
.summary b { display: block; font: 700 20px/1.2 var(--serif); font-variation-settings: "SOFT" 100; color: #fff; }
.summary span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--on-dark-soft); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 14px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 44px; border-radius: 999px; font-weight: 800; font-size: 16px; color: var(--on-dark-soft); transition: background-color .25s, color .25s; }
.seg input:checked + span { background: var(--gold); color: var(--pine-900); }
.seg input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.switch { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .07); cursor: pointer; }
.switch b { display: block; font-weight: 800; font-size: 18px; color: #fff; }
.switch small { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--on-dark-soft); }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 54px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, .22); transition: background-color .25s; }
.switch i::after { content: ""; display: block; width: 26px; height: 26px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: translate .3s var(--out); }
.switch input:checked + i { background: var(--answer); }
.switch input:checked + i::after { translate: 22px 0; }
.switch input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: 3px; }
.steps-mini { margin: 22px 0 0; padding: 0 0 0 22px; color: var(--on-dark-soft); font-size: 16px; }
.steps-mini li + li { margin-top: 8px; }
.steps-mini b { color: #fff; }

/* After the call */
.cloud { position: relative; margin-top: 20px; padding: 14px 16px 14px 46px; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 16px; font-weight: 700; color: #fff; }
.cloud a { color: var(--gold); }
.cloud::before { content: ""; position: absolute; left: 14px; top: 15px; width: 22px; height: 22px; border-radius: 50%; }
.cloud[data-state="busy"]::before { border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--gold); animation: spin .7s linear infinite; }
.cloud[data-state="done"]::before { background: var(--answer) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%2307140F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.cloud[data-state="warn"] { background: rgba(237, 182, 92, .16); color: #FFE2B0; }
.cloud[data-state="warn"]::before { background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6.5v7M12 17.4v.1' fill='none' stroke='%2307140F' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.keepsake { margin-top: 20px; }
.keepsake video, .detail video { display: block; width: min(100%, 300px); aspect-ratio: 9 / 16; margin: 0 auto 16px; border-radius: 16px; background: #000; object-fit: cover; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.cert-wrap { margin-top: 8px; }
.cert-wrap .chips { margin-top: 14px; }
.cert { display: block; width: min(100%, 420px); height: auto; margin: 18px auto 16px; border-radius: 10px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.after-end { margin-top: 34px; }

/* My calls */
.rows { display: grid; gap: 10px; margin-top: 24px; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; width: 100%; padding: 12px 14px 12px 12px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .07); color: var(--on-dark-soft); text-align: left; cursor: pointer; transition: background-color .2s, transform .18s var(--out); }
.row:active { transform: scale(.985); }
.row b { display: block; font: 700 20px/1.2 var(--serif); font-variation-settings: "SOFT" 100; color: #fff; }
.row small { display: block; margin-top: 3px; font-size: 15px; line-height: 1.35; }
.empty { margin-top: 12px; text-align: center; }
.empty .clip { width: 148px; height: 148px; margin: 0 auto 22px; border-radius: 50%; object-position: center 22%; box-shadow: 0 0 0 4px var(--gold), 0 24px 44px -20px rgba(0, 0, 0, .8); }
.empty .btn { margin-top: 24px; }
.words { margin-top: 14px; padding: 6px 18px; border-radius: 16px; background: rgba(7, 20, 15, .4); }
.words p { padding: 12px 0; font-size: 17px; line-height: 1.45; color: #fff; }
.words p + p { border-top: 1px solid rgba(255, 255, 255, .1); }
.words b { display: block; font-size: 14px; font-weight: 800; color: var(--gold); }
.words .child b { color: #8FE3A9; }
.detail .btn { margin-top: 4px; }
.mine-acct { margin-top: 40px; font-size: 15px; color: var(--on-dark-soft); text-align: center; overflow-wrap: anywhere; }

/* The call: one portrait column, full screen on phones, centred on wide screens */
/* overflow: clip, not hidden: nothing inside (a focused field, a script) may scroll the call out of place */
.stage { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; font-family: var(--sans); overflow: hidden; overflow: clip; }
.stage-bg { position: absolute; inset: 0; background: var(--photo) center 28% / cover; filter: blur(30px) brightness(.45); }
.stage-col { position: relative; height: 100%; max-width: 520px; margin: 0 auto; overflow: hidden; overflow: clip; isolation: isolate; background: #000; }
/* The picture. The live face is the picture of the call: it covers the whole column as soon as it plays.
   The portrait clip underneath is only what shows while the face connects, or if it drops. */
.stage-photo { position: absolute; inset: 0; z-index: -2; transition: top .8s var(--out); }
.stage-photo .clip { position: absolute; inset: 0; object-position: center 26%; }
.stage-face { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.stage-face video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; }
.stage[data-face] .stage-face { opacity: 1; }
/* Santa waving back: a short clip over the same frame as the face, faded in and out (call.js 'wave') */
.stage-wave { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.stage-wave video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; }
.stage[data-waving] .stage-wave { opacity: 1; }
/* With the live face on, the face's frame ends where the words can reach (three lines, the typing box and the
   buttons) and fades into the dark behind them, so the card never covers his lips. The portrait clip underneath
   hides; it comes back if the face drops. */
.stage[data-mode="live"][data-face] :is(.stage-face, .stage-wave) { bottom: min(calc(340px + env(safe-area-inset-bottom)), 45%); -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.stage[data-mode="live"][data-face] [data-stage-clip] { visibility: hidden; }
/* While it rings the face sits lower, under the caller's name; on Answer it rises to fill the screen */
.stage[data-mode="ringing"] .stage-photo { top: 14%; }
.stage[data-mode="ringing"] .stage-col::before { background: linear-gradient(#000 13%, rgba(0, 0, 0, .7) 26%, transparent 44%, transparent 56%, rgba(0, 0, 0, .8)); }
.stage-col::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .1) 22%, transparent 36%, transparent 56%, rgba(0, 0, 0, .78)); }
.stage[data-face] .stage-col::before { background: linear-gradient(rgba(0, 0, 0, .55), transparent 16%, transparent 64%, rgba(0, 0, 0, .7)); }
.stage-col::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 5px rgba(48, 209, 88, .95), inset 0 0 70px rgba(48, 209, 88, .5); opacity: 0; transition: opacity .35s; }
.stage[data-state="listening"] .stage-col::after { opacity: 1; }
.stage[data-mode="ringing"] .live, .stage[data-mode="live"] .ringing { display: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border: 0; border-radius: 999px; background: rgba(7, 20, 15, .72); color: #fff; font-weight: 800; font-size: 16px; }
button.pill { cursor: pointer; min-height: 44px; }
.pill:empty { visibility: hidden; }
.pill.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--answer); }

.ringing { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto 1fr auto auto; justify-items: center; padding: calc(14px + env(safe-area-inset-top)) 18px calc(26px + env(safe-area-inset-bottom)); text-align: center; }
.ringing .pill { justify-self: start; }
.ring-name { margin-top: 5vh; text-shadow: 0 2px 14px #000; }
.ring-name p { font-size: clamp(40px, 12vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.ring-name span { display: block; margin-top: 6px; font-size: 21px; font-weight: 700; }
.ring-note { grid-row: 4; max-width: 21em; margin-bottom: 22px; padding: 10px 16px; border-radius: 14px; background: rgba(7, 20, 15, .78); font-size: 16px; font-weight: 700; line-height: 1.35; }
.ring-answer { grid-row: 5; display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.ring-answer span { position: relative; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--answer); transition: scale .2s var(--out); }
.ring-answer:active span { scale: .94; }
.ring-answer span::before, .ring-answer span::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--answer); animation: ring 1.8s ease-out infinite; }
.ring-answer span::after { animation-delay: .6s; }
.ring-answer svg { width: 46px; fill: #fff; animation: wiggle 1.8s ease-in-out infinite; }
@keyframes wiggle { 0%, 40%, 100% { rotate: 0deg; } 8%, 24% { rotate: -14deg; } 16%, 32% { rotate: 14deg; } }
.ring-answer b { font-size: 21px; font-weight: 700; text-shadow: 0 1px 8px #000; }
.ring-answer:focus-visible { outline: none; }
.ring-answer:focus-visible span { outline: 3px solid #fff; outline-offset: 4px; }
.stage[data-state="connecting"] .ring-answer span::before, .stage[data-state="connecting"] .ring-answer span::after, .stage[data-state="connecting"] .ring-answer svg { animation: none; }
.stage[data-state="connecting"] .ring-answer span { opacity: .7; }

.live { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); }
.live-top { display: flex; justify-content: space-between; gap: 10px; }
/* The child's own picture, FaceTime's size and FaceTime's corner: about 30% of the column, bottom right, riding just
   above the words. Up in the top corner a tile this size covers one of his eyes; down here it sits on beard and coat. */
.selfview { align-self: flex-end; flex: none; position: relative; width: 32%; min-width: 112px; max-width: 156px; aspect-ratio: 3 / 4; margin-top: auto; border-radius: 18px; overflow: hidden; background: #111; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6), 0 14px 28px -10px rgba(0, 0, 0, .7); transition: box-shadow .3s; }
.stage[data-state="listening"] .selfview { box-shadow: 0 0 0 3px var(--answer), 0 14px 28px -10px rgba(0, 0, 0, .7); }
.stage[data-hearing] .selfview { box-shadow: 0 0 0 4px var(--answer), 0 0 26px rgba(48, 209, 88, .7); }
.selfview video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfview > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 7px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); text-align: center; font-size: 14px; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selfview > span:empty { display: none; }
/* Camera refused or missing on a video call: say so, where their picture would be */
.self-off { display: none; }
.selfview[data-cam="off"] { background: rgba(7, 20, 15, .86); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .28), 0 14px 28px -10px rgba(0, 0, 0, .7); }
.selfview[data-cam="off"] video, .selfview[data-cam="off"] > span { display: none; }
.selfview[data-cam="off"] .self-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px; text-align: center; }
.self-off svg { width: 26px; height: 26px; margin-bottom: 1px; fill: none; stroke: var(--on-dark-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.self-off b { font-size: 14px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.self-off small { font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--on-dark-soft); text-wrap: balance; }
/* "Santa can see you": only while the camera is live, from the child's first turn (when he starts getting their pictures) */
.self-cue { align-self: flex-end; display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(7, 20, 15, .72); font-size: 13px; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.self-cue svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.selfview[hidden] + .self-cue, .selfview[data-cam="off"] + .self-cue, .selfview:not([data-seen]) + .self-cue { display: none; }
.selfview:not([hidden]) ~ .live-card { margin-top: 12px; }
@media (max-height: 560px) { .selfview { width: 96px; min-width: 0; } }   /* a short window, or the keyboard up */
/* The words sit on a dark card at the bottom, at most three lines (the newest), so they never cover the face */
.live-card { margin-top: auto; padding: 14px 18px 16px; border-radius: 22px; background: rgba(7, 20, 15, .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.cue { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--on-dark-soft); transition: color .3s; }
.stage[data-state="listening"] .cue { color: #5CE88A; font-size: 21px; }
.meter { display: none; align-items: center; gap: 3px; height: 22px; }
.stage[data-state="listening"] .meter, .stage[data-state="speaking"] .meter { display: inline-flex; }
.meter i { width: 4px; border-radius: 3px; background: currentColor; height: calc(22% + var(--level, 0) * var(--k, 60%)); transition: height .1s linear; }
.meter i:nth-child(1), .meter i:nth-child(5) { --k: 34%; } .meter i:nth-child(2), .meter i:nth-child(4) { --k: 58%; } .meter i:nth-child(3) { --k: 78%; }
.stage[data-state="speaking"] .meter { color: var(--gold); }
.said { display: flex; flex-direction: column; justify-content: flex-end; max-height: 4.14em; margin-top: 8px; overflow: hidden; font-size: clamp(19px, 5.4vw, 22px); font-weight: 600; line-height: 1.38; }
.said:has(span:empty), .heard:empty { display: none; }
.heard { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--on-dark-soft); }
.typebox { display: flex; gap: 8px; margin-top: 10px; padding: 6px; border-radius: 999px; background: rgba(7, 20, 15, .86); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
.typebox:focus-within { box-shadow: inset 0 0 0 2.5px var(--gold); }
.typebox input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; background: none; color: #fff; font-weight: 700; font-size: 17px; outline: none; }
.typebox input::placeholder { color: rgba(255, 255, 255, .7); }
.controls { display: flex; justify-content: center; align-items: flex-start; gap: 34px; margin-top: 16px; }
.controls button { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; text-shadow: 0 1px 6px #000; }
.controls span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(7, 20, 15, .6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color .2s, scale .2s var(--out); }
.controls button:active span { scale: .93; }
.controls svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.controls .slash { display: none; }
.controls [aria-pressed="true"] span { background: #fff; }
.controls [aria-pressed="true"] svg { stroke: var(--pine-900); }
.controls [aria-pressed="true"] .slash { display: block; }
.controls .end span { width: 72px; height: 72px; background: #FF453A; }
.controls .end svg { width: 36px; height: 36px; fill: #fff; stroke: none; }
.confirm { position: absolute; inset: 0; z-index: 4; display: grid; place-items: end center; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .55); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.confirm > div { display: grid; gap: 10px; width: 100%; padding: 22px 18px 18px; border-radius: 26px; background: var(--pine-800); text-align: center; animation: view-in .4s var(--out) both; }
.confirm p { margin-bottom: 6px; font: 700 24px var(--serif); font-variation-settings: "SOFT" 100; }

@media (hover: hover) and (pointer: fine) {
  .back:hover { color: #fff; }
  .chip:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .13); }
  .who:hover .clip { scale: 1.04; }
  .add:hover { background: rgba(237, 182, 92, .2); }
  .row:hover { background: rgba(255, 255, 255, .12); }
  .x:hover { color: #fff; }
}
@media (min-width: 560px) {
  .who-grid { grid-template-columns: repeat(3, 1fr); }
  .c-main { padding-top: 44px; }
}
@media (min-width: 900px) and (min-height: 700px) {
  .stage-col { height: calc(100% - 48px); margin-top: 24px; border-radius: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .view, .ring-answer span::before, .ring-answer span::after, .ring-answer svg { animation: none !important; }
}
