:root {
  color-scheme: light;
  --ink: #17242c;
  --muted: #607386;
  --sea: #1e77bb;
  --sea-dark: #14598d;
  --foam: #edf7ff;
  --sun: #246ee8;
  --line: #cfe2f2;
  --paper: #ffffff;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; color: var(--ink); background: linear-gradient(180deg, #eaf5ff 0, #ffffff 440px); }
button, textarea { font: inherit; }
.site-header { max-width: 960px; margin: auto; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: white; background: var(--sea); font-weight: 800; }
.brand b, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }
.area-pill { padding: 7px 11px; border: 1px solid #b9d7ef; border-radius: 99px; color: var(--sea-dark); background: rgba(255,255,255,.9); font-size: 13px; }
main { width: min(760px, calc(100% - 28px)); margin: auto; }
.hero { text-align: center; padding: 54px 18px 28px; }
.eyebrow { margin: 0 0 10px; color: var(--sea); letter-spacing: .13em; font-size: 12px; font-weight: 800; }
h1 { margin: 0; font-size: clamp(36px, 8vw, 64px); letter-spacing: -.05em; }
.hero > p:not(.eyebrow) { max-width: 620px; margin: 18px auto; line-height: 1.8; color: #45565f; }
.health { display: inline-block; padding: 8px 12px; border: 1px solid #d9eaf7; border-radius: 10px; background: #fff; color: var(--muted); box-shadow: 0 6px 30px rgba(30,119,187,.09); font-size: 13px; }
.chat-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.97); box-shadow: 0 22px 70px rgba(30,119,187,.13); }
.messages { min-height: 310px; max-height: 570px; overflow-y: auto; padding: 24px; }
.message { display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-start; }
.message.user { flex-direction: row-reverse; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sea); color: white; font-weight: 800; }
.user .avatar { background: var(--sun); }
.bubble { max-width: min(620px, 85%); padding: 14px 16px; border-radius: 4px 18px 18px; background: var(--foam); line-height: 1.75; }
.user .bubble { border-radius: 18px 4px 18px 18px; background: #e8f2ff; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble a { color: var(--sea); font-weight: 700; text-underline-offset: 2px; }
.bubble .small { margin-top: 8px; color: var(--muted); font-size: 12px; }
.feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(30,119,187,.16); color: var(--muted); font-size: 12px; }
.feedback button { border: 1px solid #b9d7ef; border-radius: 99px; padding: 5px 10px; background: white; color: var(--sea-dark); cursor: pointer; }
.feedback button:disabled { opacity: .5; cursor: wait; }
.starters { padding: 0 20px 16px; display: flex; gap: 8px; overflow-x: auto; }
.starters button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #b9d7ef; border-radius: 99px; background: white; color: var(--sea-dark); cursor: pointer; }
.composer { margin: 0 16px 16px; padding: 12px; border: 1px solid #b9d7ef; border-radius: 17px; background: white; }
.composer textarea { width: 100%; min-height: 58px; resize: vertical; border: 0; outline: 0; color: var(--ink); }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#counter { color: var(--muted); font-size: 12px; }
#sendButton { border: 0; border-radius: 12px; padding: 10px 17px; background: var(--sea); color: white; font-weight: 800; cursor: pointer; }
#sendButton:disabled { cursor: wait; opacity: .55; }
.notice { margin: 28px 0 60px; padding: 22px 24px; border: 1px solid #c9e1f3; border-left: 4px solid var(--sea); border-radius: 8px; background: #eef7ff; }
.notice h2 { margin: 0 0 10px; font-size: 18px; }
.notice ul { margin: 0; padding-left: 1.2em; color: #4e5d64; line-height: 1.8; }
.notice a, .notice a:visited { color: var(--sea-dark); font-weight: 700; text-underline-offset: 2px; }
footer { padding: 24px; border-top: 1px solid var(--line); background: white; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
footer a { color: var(--sea); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 600px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; padding-inline: 14px; }
  .area-pill { width: 100%; text-align: center; font-size: 11px; }
  .hero { padding-top: 34px; }
  .messages { padding: 16px 13px; min-height: 360px; }
  .bubble { max-width: 88%; }
}
