/* Navy night, with the red and blue of the taegeuk */
:root{--bg:#070b18;--ink:#f1f4ff;--muted:#98a3c4;--card:#111a33;--line:#25325a;--red:#e8435f;--blue:#3d7bff;--grad:linear-gradient(120deg,#d9365a,#7a4fd0 50%,#2766e8)}
*{box-sizing:border-box}[hidden]{display:none!important}
html{color-scheme:dark}
body{margin:0;min-height:100dvh;background:radial-gradient(520px 380px at 100% 0,#3d7bff2e,transparent),radial-gradient(460px 380px at 0 100%,#e8435f26,transparent),var(--bg) fixed;color:var(--ink);font:16px/1.5 -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;-webkit-tap-highlight-color:transparent}
main{max-width:480px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 16px) 18px calc(env(safe-area-inset-bottom) + 24px)}
section{display:flex;flex-direction:column;gap:14px}
h1{font-size:34px;margin:8px 0 0;letter-spacing:-.5px}h2{margin:0}h3{margin:8px 0 0;font-size:17px}
header{text-align:center}header p{margin:0;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-size:12px}
header::after{content:"";display:block;width:56px;height:3px;margin:12px auto 0;border-radius:3px;background:var(--grad)}
button,input,select,textarea{font:inherit;color:inherit}
button{min-height:50px;padding:10px 16px;border:1px solid var(--line);border-radius:14px;background:var(--card);font-weight:600;cursor:pointer}
button:disabled{opacity:.4}button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.primary{background:var(--grad);border:0;color:#fff;box-shadow:0 6px 24px #3d7bff40}.danger{background:#e8435f1f;border-color:var(--red);color:#ff8498}
.back{align-self:flex-start;border:0;background:none;padding:0;color:#7da8ff}
.row{display:flex;gap:10px}.row>*{flex:1}
label{display:flex;flex-direction:column;gap:4px;font-weight:600}
input:not([type=radio]):not([type=checkbox]),select,textarea{width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--card);font-weight:400;font-size:16px}
::placeholder{color:#6f7ba0}
fieldset{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}legend{font-weight:600;margin-bottom:4px}
.choice{flex-direction:row;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--card)}
.choice:has(:checked){border-color:var(--blue)}
.choice span{display:flex;flex-direction:column}.choice small{font-weight:400;color:var(--muted)}.choice input{width:20px;height:20px;accent-color:var(--blue)}
.note{color:var(--muted);font-size:14px;margin:0}

.stage{display:flex;justify-content:center;align-items:center}
.stage svg{width:100%;max-width:300px;height:300px;fill:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 7px #6c8dff99)}
.stage .ring{stroke:#6d86d640;stroke-width:1.5;transform-origin:110px 140px}.stage .inner{stroke-dasharray:3 12}
.stage .mouth{stroke-width:3;fill:#f4f7ff55}
.inner{animation:spin 40s linear infinite}.thinking .inner{animation-duration:4s}
.listening .ring{stroke:var(--red);animation:pulse 1.2s ease-in-out infinite alternate}
.talking .ring{stroke:var(--blue)}.talking .arm{animation:wave .7s ease-in-out infinite alternate;transform-origin:110px 128px}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{to{transform:scale(1.08)}}@keyframes wave{to{transform:rotate(-12deg)}}

/* full-screen call */
#call{position:fixed;inset:0;max-width:480px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 12px) 18px calc(env(safe-area-inset-bottom) + 18px);gap:10px;align-items:stretch}
.topbar{display:flex;justify-content:space-between;align-items:center}.topbar button{min-height:44px;border-radius:99px}
#timer{margin:0;color:var(--muted);font-variant-numeric:tabular-nums}
.bubble{flex:0 1 auto;display:flex;flex-direction:column;min-height:0;max-height:24dvh;padding:10px 14px;border:1px solid var(--line);border-radius:18px;background:#111a33d9}
.bubble small{font-size:11px;color:#7da8ff;font-weight:700}.bubble p{margin:0;overflow-y:auto;font-size:18px}
.bubble.me{border-color:#e8435f66}.bubble.me small{color:#ff8498}
#call .stage{flex:1 1 0;min-height:110px}#call .stage svg{height:100%;max-width:100%}
#status{margin:0;text-align:center;color:var(--muted);font-size:14px}
#talk{align-self:center;flex:none;width:84px;height:84px;padding:0;border-radius:50%;border:3px solid #ffffffd0;background:var(--card);display:grid;place-items:center}
#talk span{width:62px;height:62px;border-radius:50%;background:var(--grad);transition:.18s}
#talk.on{border-color:var(--red);box-shadow:0 0 0 9px #e8435f2e,0 0 32px #e8435f80}#talk.on span{width:30px;height:30px;border-radius:8px;background:var(--red)}

.card{background:var(--card);border-radius:14px;padding:12px;border:1px solid var(--line)}.card p{margin:2px 0}
.said{color:#ff8498}.better{color:#8bb2ff;font-weight:700}
.item{display:flex;gap:8px}.item button:first-child{flex:1;text-align:left}
details p{margin:6px 0}
@media (prefers-reduced-motion:reduce){.stage *{animation:none!important}}
