/* Phone concierge: Hospi look (ivory, slate, brass, Noto Serif), 390 px first. */
:root{--ivory:#f7f4ee;--slate:#27455c;--slate-deep:#1b3242;--brass:#d5bd91;--brass-deep:#a98c57;--ink:#26232a;--muted:#59534c;--rule:#d7d0c5;--end:#a1372b;--serif:'Noto Serif',Georgia,serif;--sans:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;color-scheme:light;font-family:var(--sans);color:var(--ink);background:var(--ivory)}
*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--ivory);-webkit-font-smoothing:antialiased;overscroll-behavior:none}
[hidden]{display:none!important}
h1,p{margin:0}button,input{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:focus-visible,input:focus-visible{outline:3px solid var(--brass-deep);outline-offset:3px}
svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

.phone{position:relative;display:flex;flex-direction:column;min-height:100svh;max-width:560px;margin:0 auto;background:var(--ivory)}
.bar{position:absolute;inset:0 0 auto;z-index:3;display:flex;align-items:center;justify-content:space-between;padding:calc(env(safe-area-inset-top) + 14px) 18px 14px}
.brand{display:flex;align-items:center;gap:10px;color:var(--slate)}
.brand strong{display:block;font:500 17px/1.15 var(--serif);letter-spacing:.01em}
.brand small{display:block;font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted);margin-top:3px}
.mark{display:grid;place-items:center;width:34px;height:38px;border:1px solid var(--brass-deep);font:400 24px/1 var(--serif);padding-bottom:2px;background:#f7f4eecc}
.live{display:none;align-items:center;gap:7px;padding:6px 11px;border-radius:999px;background:#0f1d27b3;color:white;font-size:13px;font-variant-numeric:tabular-nums;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.dot{width:7px;height:7px;border-radius:50%;background:#95edb9;box-shadow:0 0 0 3px #95edb933}

.stage{position:relative;flex:none;height:62svh;min-height:330px;overflow:hidden;background:#ded6c8}
.stage:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(var(--ivory) 0,#f7f4ee00 18%,#f7f4ee00 72%,var(--ivory) 100%)}
.poster,#cara-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 22%}
#cara-video{opacity:0;background:#ded6c8;transition:opacity .4s}
.captions{position:absolute;z-index:2;left:14px;right:14px;bottom:16px;display:none;flex-direction:column;align-items:center;gap:6px;pointer-events:none;text-align:center}
#caption{font-size:18px;line-height:1.4;color:white;background:#101c26d9;padding:10px 14px;border-radius:14px;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
#heard{font-size:13px;line-height:1.35;color:white;background:#101c26b0;padding:5px 11px;border-radius:10px;max-width:92%}
#caption:empty,#heard:empty{display:none}
.hear{position:absolute;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);min-height:56px;padding:14px 24px;border-radius:999px;background:white;color:var(--slate);font-weight:600;box-shadow:0 8px 30px #0003}

.panel{flex:1;display:flex;flex-direction:column;gap:20px;padding:6px 22px calc(env(safe-area-inset-bottom) + 22px);position:relative;z-index:1}
.message h1{font:400 40px/1.1 var(--serif);letter-spacing:-.02em;color:var(--slate)}
.message p{margin-top:8px;font-size:17px;line-height:1.45;color:var(--muted)}
.message:before{content:"";display:block;width:36px;height:2px;background:var(--brass);margin-bottom:14px}
.actions{display:flex;flex-direction:column;gap:10px}
.primary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:64px;border-radius:999px;background:var(--slate);color:white;font-size:19px;font-weight:600;letter-spacing:.005em;box-shadow:0 10px 26px #27455c33}
.primary svg{width:22px;height:22px;color:var(--brass)}
.primary:active{background:var(--slate-deep)}
.primary:disabled{opacity:.7;cursor:default}
.secondary{min-height:52px;border-radius:999px;border:1px solid var(--rule);background:white;color:var(--slate);font-size:16px;font-weight:600}
.fine{margin-top:auto;font-size:12px;line-height:1.55;color:var(--muted)}

body[data-state=connecting] .primary{pointer-events:none}
body[data-state=connecting] .primary span:after{content:"";display:inline-block;width:1.1em;text-align:left;animation:dots 1.2s steps(4) infinite}
@keyframes dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}

.composer{display:flex;gap:8px;padding:14px 14px 0;background:var(--ivory)}
.composer input{flex:1;min-width:0;min-height:50px;border:1px solid #928c83;border-radius:999px;background:white;padding:0 18px;font-size:16px}
.send{width:50px;height:50px;border-radius:50%;background:var(--slate);color:white;display:grid;place-items:center;flex:none}

.controls{display:none;justify-content:center;gap:22px;padding:12px 16px calc(env(safe-area-inset-bottom) + 14px);background:var(--ivory)}
.controls button{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:72px;color:var(--slate)}
.ring{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:white;border:1px solid var(--rule);box-shadow:0 4px 14px #27455c14}
.label{font-size:12px;font-weight:600}
.controls [aria-pressed=true] .ring{background:var(--slate);border-color:var(--slate);color:white}
#mute[aria-pressed=true] .ring{background:var(--ink);border-color:var(--ink)}
.end .ring{background:var(--end);border-color:var(--end);color:white}
.end .label{color:var(--end)}

/* Live call: Cara's video takes the screen, the panel gives way to the controls. */
body[data-state=live]{background:#0f1d27}
body[data-state=live] .phone{background:#0f1d27;height:100svh}
body[data-state=live] .stage{flex:1;height:auto;min-height:0;background:#0f1d27}
body[data-state=live] .stage:after{background:linear-gradient(#0f1d2799 0,#0f1d2700 16%,#0f1d2700 70%,#0f1d27aa 100%)}
body[data-state=live] .panel{display:none}
body[data-state=live] .controls{display:flex;border-radius:24px 24px 0 0}
body[data-state=live] .composer{border-radius:24px 24px 0 0}
body[data-state=live] .composer:not([hidden])+.controls{border-radius:0}
body[data-state=live] .captions{display:flex}
body[data-state=live] .live{display:flex}
body[data-state=live] .brand{color:white}
body[data-state=live] .brand small{color:#dfe6ea}
body[data-state=live] .mark{border-color:var(--brass);background:#0f1d2766;color:white}
body.video-on #cara-video{opacity:1}

/* After a call or a refusal the poster rests behind the message. */
body:is([data-state=ended],[data-state=mic],[data-state=busy],[data-state=limit],[data-state=lost],[data-state=unavailable]) .poster{filter:saturate(.75) brightness(1.04);opacity:.85}
body:is([data-state=ended],[data-state=mic],[data-state=busy],[data-state=limit],[data-state=lost],[data-state=unavailable]) .stage{height:44svh}
body:is([data-state=ended],[data-state=mic],[data-state=busy],[data-state=limit],[data-state=lost],[data-state=unavailable]) .message h1{font-size:32px}

@media (min-height:820px){.stage{height:64svh}}
@media (prefers-reduced-motion:reduce){#cara-video{transition:none}body[data-state=connecting] .primary span:after{animation:none;content:"…"}}
