:root { color-scheme: light; font-family: system-ui, sans-serif; color: #251719; background: #f4f1f1; --brand-red: #c41230; --brand-red-dark: #941025; --brand-red-soft: #fff0f2; --border: #e3d6d8; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: .75rem; }
main { position: relative; width: min(40rem, 100%); padding: clamp(1rem, 3vw, 1.75rem); background: white; border-radius: 1rem; box-shadow: 0 1rem 3rem #4b101a18; }
.brand-logo { position: absolute; top: 1rem; left: 1rem; display: block; width: 5.5rem; height: auto; margin: 0; }
h1 {
  max-width: 32rem;
  margin: .15rem auto 1rem;
  color: #302b2c;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -.025em;
  text-align: center;
  padding-inline: 4.5rem;
}
h1::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: .22rem;
  margin: .55rem auto 0;
  border-radius: 999px;
  background: var(--brand-red);
}
.subtitle { max-width: 31rem; margin: -.25rem auto 1rem; color: #6b5b5e; font-size: .92rem; line-height: 1.45; text-align: center; }
.messages { height: 13rem; overflow-y: auto; display: flex; flex-direction: column; gap: .65rem; margin: 1rem 0; padding: .8rem; background: #f8f5f5; border-radius: .75rem; }
.message { max-width: 82%; margin: 0; padding: .7rem .9rem; border-radius: .75rem; background: white; white-space: pre-line; }
.message.user { align-self: end; color: white; background: var(--brand-red); }
.message.error { color: #8b1e1e; background: #fdeaea; }
label { display: block; margin-bottom: .4rem; font-weight: 650; }
.composer { display: flex; gap: .5rem; }
input { min-width: 0; flex: 1; padding: .7rem; border: 1px solid #cbb8bc; border-radius: .45rem; font: inherit; }
input:focus { outline: 2px solid #c4123040; border-color: var(--brand-red); }
button { padding: .7rem 1.1rem; border: 0; border-radius: .45rem; color: white; background: var(--brand-red); font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: var(--brand-red-dark); }
.photo-picker { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .75rem; margin-top: .55rem; color: #6b5b5e; font-size: .85rem; }
.photo-button { display: inline-block; margin: 0; padding: .55rem .8rem; border: 1px solid #edcbd1; border-radius: .45rem; color: var(--brand-red-dark); background: var(--brand-red-soft); font-weight: 700; cursor: pointer; }
.photo-button:hover { border-color: var(--brand-red); }
#photos { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
#photo-status { min-width: 0; }
button.secondary { margin: 0 auto; color: var(--brand-red-dark); background: var(--brand-red-soft); border: 1px solid #edcbd1; }
.new-chat-section { margin-top: 1rem; text-align: center; }
.new-chat-section hr { margin: 0 0 .85rem; border: 0; border-top: 1px solid var(--border); }
#status { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-weight: 650; }
#status:empty { display: none; }
a { color: var(--brand-red-dark); }
dl { display: grid; grid-template-columns: minmax(9rem, 1fr) 1fr; gap: .25rem 1rem; margin: 2rem 0; }
dt, dd { margin: 0; padding: .55rem; border-bottom: 1px solid var(--border); }
dt { font-weight: 700; }

@media (max-height: 720px) {
  body { place-items: start center; }
  main { padding-block: .8rem; }
  .brand-logo { top: .8rem; left: .8rem; width: 4.75rem; }
  h1 { margin-bottom: .7rem; font-size: 1.25rem; }
  h1::after { margin-top: .4rem; }
  .subtitle { margin-bottom: .7rem; font-size: .82rem; }
  .messages { height: 10.5rem; margin: .7rem 0; }
}

@media (max-width: 520px) {
  .brand-logo { top: .75rem; left: .75rem; width: 4.25rem; }
  h1 { min-height: 3.25rem; padding-inline: 3.5rem; }
}
