:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#f8eaf3;background:#130f19;color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at top,#3a1e37 0,#1d1324 52%,#100e17 100%)}button,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55}.app{max-width:720px;margin:auto;min-height:100dvh;display:flex;flex-direction:column;padding:20px 18px max(18px,env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;padding-bottom:22px;border-bottom:1px solid #61445d}h1{font-size:28px;letter-spacing:-1px;margin:1px 0}h1 span{color:#ff83ae}.eyebrow{font-size:10px;letter-spacing:2.4px;color:#c5a2b6;font-weight:800}.status{border:1px solid #77516b;border-radius:30px;padding:7px 10px;font-size:12px;color:#dfb8cb}.panel{margin:auto 0;text-align:center;padding:35px 12px}.big-heart{font-size:80px;color:#ff83ae;line-height:1.15}.panel h2{font-size:28px;margin:12px 0}.panel p{line-height:1.5;color:#ddc3d3}button.primary,.secondary{border:none;border-radius:15px;padding:15px 18px;font-weight:700}.primary,.send{background:#fd87b0;color:#2b1026}.secondary{background:#3b2a40;color:#ffe9f2}.footnote{font-size:12px;color:#b89ead!important}#chat{display:flex;flex:1;min-height:0;flex-direction:column}#chat[hidden]{display:none}.feed{flex:1;min-height:250px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:20px 0 10px}.empty{margin:auto;color:#cdb3c3;font-size:14px}.bubble{max-width:82%;align-self:flex-start;background:#392b41;border-radius:18px 18px 18px 4px;padding:11px 14px;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:#814163;border-radius:18px 18px 4px 18px}.bubble p{white-space:pre-wrap;margin:0}.bubble img{display:block;max-width:100%;max-height:380px;border-radius:12px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;pointer-events:none}.metadata{font-size:10px;color:#e1bed1;text-align:right;margin-top:7px}#compose{display:flex;align-items:flex-end;gap:12px;border:1px solid #63465b;border-radius:22px;padding:10px;background:#281c30}.attach,.send{border-radius:50%;width:41px;height:41px;display:grid;place-items:center;font-size:27px;flex-shrink:0}.attach{background:#46324d;color:#ffc3dc;cursor:pointer}.send{border:none;font-size:18px}#message{flex:1;min-width:0;max-height:140px;border:none;resize:none;outline:none;background:transparent;color:#fff;padding:10px 0}.toast{position:fixed;bottom:85px;left:50%;transform:translateX(-50%);background:#ecb4d1;color:#2d172b;padding:10px 16px;border-radius:10px;display:none;max-width:85vw}.toast.show{display:block}
/* Phase 2: retain the original palette and bubbles; simplify the phone layout. */
[hidden]{display:none!important}body{height:100dvh;min-height:0}.app{height:100dvh;min-height:0;padding-top:max(16px,env(safe-area-inset-top))}header{flex-shrink:0;gap:8px;padding-bottom:16px}.status{max-width:145px;text-align:center}h1{font-size:clamp(21px,6vw,28px)}.panel{overflow:auto}#pairForm{display:grid;gap:12px;text-align:left}#pairCode{width:100%;background:#281c30;color:#fff;border:1px solid #77516b;border-radius:12px;padding:12px;font-size:16px}#chat{overflow:hidden}.feed{min-height:0}#compose{gap:7px;flex-shrink:0;margin-top:8px}.attach{border:0;font-size:20px;min-width:44px;min-height:44px;width:44px;height:44px}.send{min-width:44px;min-height:44px}#message{font-size:16px}dialog{width:min(94vw,600px);max-height:90dvh;background:#281c30;color:#f8eaf3;border:1px solid #805c76;border-radius:20px;padding:14px}dialog::backdrop{background:#130f19dd}dialog video,dialog img{display:block;width:100%;max-height:65dvh;object-fit:contain;border-radius:12px}.camera-actions{display:flex;gap:12px;margin-top:14px}.camera-actions button{flex:1;min-height:48px}.bubble{flex-shrink:0}.toast{z-index:1000;pointer-events:none}@media(max-width:390px){.app{padding-left:10px;padding-right:10px}#compose{gap:4px;padding:7px}.attach{min-width:44px;width:44px}header{gap:4px}.status{font-size:11px;padding:6px}}
/* Home-screen layout: safe areas, bounded feed, no Safari input zoom. */
html{height:100%;overscroll-behavior:none}body{overflow:hidden}.app{padding-bottom:max(12px,env(safe-area-inset-bottom))}button,input{font-size:16px;touch-action:manipulation}#safetyNumber{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.8;padding:14px;color:#ffb5d1}#confirmKeys{margin-top:12px}#installGuide{overflow:auto;flex-shrink:0;max-height:24dvh;font-size:12px;color:#ddc3d3}#deviceActions{text-align:right;flex-shrink:0}#deviceActions button{font-size:11px;padding:7px;margin-top:6px}#fallbackChoice{display:block;font-size:12px;margin:20px 0}#verify{min-height:0}#setup{min-height:0}@media(display-mode:standalone){.app{width:100%}}
body,.app{height:var(--app-height,100dvh)}

#enrollmentEntry{display:grid;gap:12px;text-align:left;margin:20px 0}#personalLink{width:100%;min-width:0;padding:12px;border:1px solid #77516b;border-radius:12px;background:#281c30;color:#fff;font:inherit;font-size:16px}
