:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #242025;
  background: #f7f3ec;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.page { max-width: 1440px; min-height: 100vh; margin: auto; padding: 0 7%; display: flex; flex-direction: column; }
.site-header { height: 100px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6dfd5; }
.brand { color: #242025; text-decoration: none; font-size: 26px; letter-spacing: -1.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.brand-accent { color: #7651a5; }
.brand-period, .title-period { color: #f57654; }
.header-note { color: #77706c; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.header-dot { display: inline-block; width: 7px; height: 7px; background: #f57654; border-radius: 50%; margin-right: 8px; }
.layout { flex: 1; display: grid; grid-template-columns: 1fr minmax(400px, 550px); gap: 9%; align-items: center; padding: 64px 0; }
.intro { max-width: 550px; }
.eyebrow { color: #7651a5; font-size: 10px; font-weight: 700; letter-spacing: .16em; display: flex; align-items: center; gap: 9px; }
h1 { margin: 24px 0; font-family: Georgia, serif; font-weight: 400; font-size: clamp(54px, 5.7vw, 82px); line-height: 1.06; letter-spacing: -.035em; }
h1 em { color: #7651a5; font-weight: 400; }
.intro-copy { max-width: 400px; margin: 0 0 42px; color: #6d6664; font-size: 16px; line-height: 1.75; }
.intro-details { display: flex; gap: 14px; align-items: center; margin: 22px 0; }
.detail-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #a6603c; background: #fbe5d6; font-size: 24px; }
.detail-icon.heart { background: #eae2f4; color: #7651a5; }
.intro-details p { margin: 0; color: #827a76; font-size: 12px; line-height: 1.7; }
.intro-details strong { color: #393039; font-size: 13px; }
.small-print { margin-top: 40px; color: #9a918a; font-size: 11px; }
.chat-card { height: min(660px, 75vh); min-height: 510px; display: flex; flex-direction: column; background: #fffdfa; border: 1px solid #eee6de; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 70px #65515b14, 0 4px 12px #65515b0a; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 21px 24px; border-bottom: 1px solid #f0eae4; }
.avatar, .message-avatar { display: block; flex: none; background: #ece0f2; }
.avatar { width: 44px; height: 44px; border-radius: 15px; }
.chat-heading { display: grid; gap: 4px; flex: 1; }
.chat-heading strong { font-size: 14px; }
.chat-heading span { color: #99908b; font-size: 11px; }
.clear-button { width: 36px; height: 36px; border: 1px solid #eee7e1; background: transparent; border-radius: 11px; color: #8c827d; font-size: 23px; }
.clear-button:hover:not(:disabled) { color: #7651a5; border-color: #cbb8de; }
.messages { flex: 1; overflow-y: auto; padding: 26px 24px; }
.message { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; }
.message-avatar { width: 27px; height: 27px; border-radius: 9px; }
.voice-button { margin: -7px 0 0 36px; border: 0; padding: 5px 0; background: transparent; color: #7651a5; font-size: 11px; font-weight: 700; }
.voice-button:hover { text-decoration: underline; }
.voice-status { margin: 3px 0 12px 36px; color: #8b4935; font-size: 11px; line-height: 1.4; }
.voice-status:empty { display: none; }
.bubble { max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 3px 16px 16px 16px; background: #f3edf8; padding: 13px 15px; color: #4a3e4f; font-size: 13px; line-height: 1.65; }
.user-message { justify-content: flex-end; }
.user-message .bubble { color: #fff; background: #805da9; border-radius: 16px 3px 16px 16px; }
.error-message .bubble { background: #fff1e9; color: #8b4935; }
.chat-bottom { padding: 0 20px 19px; }
.status { min-height: 35px; display: flex; align-items: center; gap: 7px; color: #8d837e; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #e5aa5e; flex: none; }
.status.ready .status-dot { background: #77aa83; }
.status.error .status-dot { background: #e8755e; }
.retry { border: 0; padding: 3px 5px; background: none; color: #7651a5; font-size: 11px; font-weight: 700; text-decoration: underline; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid #eae3dd; border-radius: 13px; background: white; }
.composer:focus-within { border-color: #a68abe; }
.composer textarea { flex: 1; min-height: 40px; max-height: 110px; padding: 11px 8px; resize: none; border: 0; outline: 0; color: #393039; background: transparent; font-size: 13px; line-height: 18px; }
.composer textarea::placeholder { color: #aaa19c; }
.send-button { width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; color: white; background: #805da9; font-size: 23px; }
.send-button:disabled { opacity: .4; }
.send-button:hover:not(:disabled) { background: #68458e; }
.chat-footnote { margin: 13px 0 0; color: #a39a95; text-align: center; font-size: 10px; }
.chat-footnote span, footer span { color: #f57654; margin: 0 5px; }
footer { border-top: 1px solid #e6dfd5; padding: 22px 0; color: #a29991; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid #7651a5; outline-offset: 3px; }

@media (max-width: 800px) {
  .page { padding: 0 5%; }
  .site-header { height: 76px; }
  .header-note { display: none; }
  .layout { grid-template-columns: 1fr; gap: 28px; padding: 45px 0; }
  h1 { font-size: clamp(48px, 9vw, 68px); margin: 18px 0; }
  .intro-copy { margin-bottom: 20px; }
  .intro-details { margin: 14px 0; }
  .small-print { margin: 22px 0 0; }
  .chat-card { height: 580px; min-height: 450px; }
}

@media (max-width: 400px) {
  .chat-header, .messages { padding-left: 16px; padding-right: 16px; }
  .chat-bottom { padding-left: 14px; padding-right: 14px; }
}
