:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --ink: #172923;
  --muted: #465854;
  --line: #cbcfc1;
  --forest: #203b31;
  --rust: #a23827;
  font-family: system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #a43f27;
  outline-offset: 4px;
}
a { color: inherit; }
p { margin: 0; }

.skip, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  z-index: 1;
  width: auto;
  height: auto;
  clip-path: none;
  background: white;
  padding: 12px;
}
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.12rem;
  font-weight: 800;
}
.header-link { font-size: .92rem; text-underline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
  padding: clamp(42px, 7vw, 92px) 0 38px;
}
h1 {
  font: 600 clamp(3rem, 7.2vw, 6.6rem)/.96 Georgia, serif;
  letter-spacing: -.075em;
  margin: 0 0 20px;
}
h1 em { color: #335e50; font-weight: 400; }
.intro-copy { max-width: 36ch; font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.55; color: var(--muted); }

.voice-card {
  max-width: 475px;
  background: var(--forest);
  color: #fff8eb;
  border-radius: 18px;
  padding: clamp(16px, 3.2vw, 26px);
  margin-top: 28px;
}
.voice-control {
  min-height: 62px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f5c46a;
  color: #192722;
  font-size: clamp(1.12rem, 2.5vw, 1.31rem);
  font-weight: 800;
}
.voice-control:not(:disabled):hover { background: #ffda8e; }
.voice-control:focus-visible, .enable-audio:focus-visible { outline-color: #ffe0a6; }
.voice-control svg { width: 24px; height: 24px; flex: 0 0 auto; }
.voice-control .end-icon { display: none; }
.voice-card:is([data-state="active"], [data-state="connecting"], [data-state="closing"]) .mic-icon { display: none; }
.voice-card:is([data-state="active"], [data-state="connecting"], [data-state="closing"]) .end-icon { display: block; }
.voice-card[data-state="active"] .voice-control { background: #fdf0e5; color: #852e23; }
.voice-card[data-state="active"] .voice-control:hover { background: #f9d9cc; }
.voice-status { font-weight: 650; line-height: 1.4; margin-top: 12px; }
.voice-privacy { color: #d0ddd5; font-size: .82rem; line-height: 1.5; margin-top: 7px; }
.enable-audio { margin-top: 10px; padding: 8px 12px; color: #fff8eb; border: 1px solid #bed1c2; border-radius: 6px; background: transparent; }

.portrait {
  display: grid;
  place-items: end center;
  margin: 0;
  aspect-ratio: 1.04;
  overflow: hidden;
  border: 1px solid #b5c5b9;
  border-radius: 22px;
  background: radial-gradient(ellipse at 55% 35%, #e3e9db, #b8ccb9);
}
.portrait img { display: block; object-fit: contain; width: 100%; height: 100%; max-height: 510px; }

.suggestions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 20px; border-top: 1px solid var(--line); padding: 19px 0; font-size: .92rem; }
.suggestions span { font-weight: 750; }
.suggestions p { color: var(--muted); }
.text-chat { border: 1px solid var(--line); border-radius: 12px; max-width: 720px; }
.text-chat summary { cursor: pointer; padding: 16px; font-weight: 720; }
.text-inner { padding: 0 16px 16px; }
.text-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0; }
.text-head h2 { margin: 0; font-size: 1.05rem; }
#mode, .speaker, footer { color: var(--muted); font-size: .84rem; }
.reset { margin-left: auto; background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; color: var(--ink); }
.transcript { max-height: 355px; overflow: auto; padding: 5px; }
.turn { margin-bottom: 11px; }
.speaker { display: block; margin: 0 0 4px; font-weight: 650; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; background: #e9eae0; border-radius: 8px; padding: 10px 13px; line-height: 1.5; }
.visitor .message { background: #e0eade; }
.pending .message { color: var(--muted); }
.notice { padding: 8px 0; color: var(--rust); }
.composer { display: flex; align-items: stretch; gap: 8px; margin-top: 9px; }
.composer textarea { min-width: 0; flex: 1; color: var(--ink); padding: 10px; border: 1px solid #7d8b82; border-radius: 8px; background: #fffdfa; resize: vertical; }
.composer button { color: #fff; background: var(--forest); border: 0; border-radius: 8px; padding: 0 15px; font-weight: 700; }
footer { padding: 23px 0 40px; line-height: 1.5; }

@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; padding-top: 35px; gap: 23px; }
  h1 { letter-spacing: -.06em; }
  .voice-card, .portrait { max-width: 475px; }
  .portrait { width: 100%; aspect-ratio: 1.4; justify-self: start; }
  .portrait img { min-height: 0; }
  .suggestions { gap: 9px 16px; }
}
