@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/inter-regular.ttf') format('truetype'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/inter-bold.ttf') format('truetype'); }
:root { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #202020; background: #fffafa; font-size: 16px; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
progress { appearance: none; position: fixed; inset: 0 0 auto; z-index: 2; width: 100%; height: 4px; border: 0; background: #f1f1f1; color: #d7e5ff; }
progress::-webkit-progress-bar { background: #f1f1f1; }
progress::-webkit-progress-value { background: #d7e5ff; }
progress::-moz-progress-bar { background: #d7e5ff; }
main { max-width: 800px; margin: auto; height: 100%; overflow-y: auto; overscroll-behavior-y: contain; padding: 16px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.chat-label { margin: 0 0 14px 48px; color: #626775; font-size: 11px; line-height: 1.5; }
#messages { display: flex; flex-direction: column; gap: 10px; }
.row, #status { display: flex; align-items: flex-end; gap: 8px; }
.avatar { display: block; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; }
.bubble { padding: 8px 16px; max-width: calc(100% - 48px); border-radius: 6px; background: #f7f8ff; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.bubble strong { font-weight: 700; }
.audio-card { width: min(340px, calc(100% - 48px)); min-width: 0; }
.audio-card audio { display: block; width: 100%; min-width: 0; height: 54px; margin: 10px 0; }
.audio-note { margin: 0; font-size: 12px; line-height: 1.5; color: #626775; }
.audio-card details { margin-top: 10px; font-size: 14px; }
.audio-card summary { cursor: pointer; padding: 8px 0; }
.bubble mark { background: #fbcfe8; color: #831843; padding: 1px 6px; border-radius: 4px; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.reply { align-self: flex-end; width: fit-content; max-width: 78%; margin-left: auto; background: #303235; color: #fff; padding: 10px 16px; border-radius: 12px 12px 3px 12px; line-height: 1.5; overflow-wrap: anywhere; }
#status { margin-top: 10px; min-height: 40px; }
.typing { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 64px; height: 36px; flex: 0 0 64px; padding: 0 13px; background: #f7f8ff; border-radius: 14px 14px 14px 4px; }
.typing::before { content: ""; position: absolute; bottom: 0; left: -4px; width: 10px; height: 10px; background: #f7f8ff; border-bottom-right-radius: 10px; }
.typing-dot { width: 7px; height: 7px; border-radius: 50%; background: #87909a; opacity: .55; }
@keyframes typing-wave {
  0%, 60%, 100% { transform: translateY(0) scale(.92); opacity: .5; }
  30% { transform: translateY(-3px) scale(1.05); opacity: 1; }
}
@keyframes message-arrive { from { transform: translateY(4px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  #status:not([hidden]) .typing-dot { animation: typing-wave 1.2s ease-in-out infinite; }
  #status .typing-dot:nth-child(2) { animation-delay: .15s; }
  #status .typing-dot:nth-child(3) { animation-delay: .3s; }
  #messages > .row, #messages > .reply { animation: message-arrive .16s ease-out; }
}
#choices { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin: 24px 0; }
button { font: inherit; font-weight: 400; line-height: 1.5; min-height: 48px; max-width: 100%; padding: 12px 16px; border: 0; border-radius: 6px; background: #303235; color: #fff; cursor: pointer; touch-action: manipulation; overflow-wrap: anywhere; }
#choices button { width: fit-content; max-width: 78%; margin-left: auto; border-radius: 12px 12px 3px 12px; text-align: left; }
button:hover { background: #242628; }
button:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #be185d; outline-offset: 3px; }
#finish { margin: 24px 0 0 48px; border-top: 1px solid #e5e7eb; padding-top: 12px; font-size: 14px; line-height: 1.6; }
#finish button { display: block; width: 100%; margin-top: 12px; }
@media (max-width: 480px) { main { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); } .bubble { padding: 10px 12px; } }
@media (prefers-reduced-motion: no-preference) { progress::-webkit-progress-value { transition: width .2s; } }
