:root { color-scheme: light; font-family: ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #50352b; background: #fff8ed; }
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; background-position: center; background-size: cover; }
button { font: inherit; color: #50352b; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:not(:disabled):active { filter: brightness(.9); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, #captions:focus-visible { outline: 3px solid #a5652c; outline-offset: 5px; }
[hidden] { display: none !important; }
#room { height: 100dvh; width: 100%; max-width: 1184px; margin: auto; padding: calc(env(safe-area-inset-top) + 16px) 20px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; gap: 12px; }
h1 { text-align: center; font-size: 28px; line-height: 1.25; font-weight: 700; margin: 8px 0 0; flex: none; }
.scene { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.character { flex: 1; min-height: 0; width: calc(100% + 40px); }
canvas { display: block; width: 100%; height: 100%; }
.conversation { flex: 0 0 170px; width: 100%; max-width: 600px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 0; }
#status { font-size: 17px; line-height: 1.4; white-space: pre-line; margin: 0; }
#status:empty { display: none; }
#captions { width: 100%; max-height: 124px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; flex-shrink: 1; touch-action: pan-y; }
#captions::-webkit-scrollbar { display: none; }
#captions.scrolled { mask-image: linear-gradient(to bottom, transparent, black 22px); }
#caption { font-size: 24px; font-weight: 600; line-height: 31px; overflow-wrap: anywhere; white-space: pre-wrap; text-shadow: 0 1px 1px #fffcf5; }
.controls { flex: none; height: 90px; display: flex; align-items: center; justify-content: center; }
.pill { background: #fffcf5; border-radius: 40px; min-height: 60px; padding: 12px 30px; font-size: 20px; font-weight: 600; }
#active-controls { display: flex; gap: 40px; width: 280px; align-items: flex-start; }
.call-button { width: 120px; padding: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 17px; line-height: 21px; color: inherit; }
.circle { width: 60px; height: 60px; border-radius: 50%; background: #fffcf5; display: grid; place-items: center; flex: none; color: #50352b; }
.coral { background: #e87969; }
svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
svg rect, .phone { fill: currentColor; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2.4s infinite; }
.dots i:nth-child(2) { animation-delay: .3s; } .dots i:nth-child(3) { animation-delay: .6s; }
#calling p { font-size: 20px; margin: 14px 0 0; }
@keyframes pulse { 0%, 60%, 100% { opacity: .35; transform: scale(.9); } 20% { opacity: 1; transform: scale(1.15); } }
body.night { color: #fffcf5; text-shadow: 0 1px 2px #50352b; }
body.night #caption { text-shadow: 0 1px 2px #50352b; }
@media (max-height: 740px) and (orientation: portrait) { .conversation { flex-basis: 144px; } h1 { font-size: 24px; } #room { padding-top: calc(env(safe-area-inset-top) + 8px); } }
@media (min-width: 600px) { #room { padding-left: 32px; padding-right: 32px; } .character { width: calc(100% + 64px); } h1 { font-size: 32px; } }
@media (orientation: landscape) { .scene { flex-direction: row; gap: 24px; } .character { flex: 0 0 55%; width: 55%; height: 100%; } .conversation { flex: 1; height: min(100%, 320px); } .controls { height: 60px; } #active-controls { width: 520px; } .call-button { flex-direction: row; width: 240px; justify-content: center; gap: 12px; } h1 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }

h1 a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
