/* ChatForm — warm-premium pill in dark palette, same geometry as ref */

.chatform{
  position:relative;
  width:100%;
  max-width:680px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.chatform--compact{max-width:560px}

.chatform__stream{
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:340px;
  overflow:auto;
  padding:4px 2px 8px;
  scrollbar-width:thin;
  scrollbar-color:rgba(201,168,107,.3) transparent;
  mask-image:linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 4px), #000 100%);
}
.chatform--compact .chatform__stream{max-height:240px}
.chatform__stream::-webkit-scrollbar{width:6px}
.chatform__stream::-webkit-scrollbar-thumb{background:rgba(201,168,107,.3);border-radius:3px}

.chatform__pair{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.chatform__bubble{
  font-size:15.5px;
  line-height:1.45;
  padding:14px 18px;
  border-radius:18px;
  max-width:85%;
  width:fit-content;
  word-wrap:break-word;
  animation:chatIn .45s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes chatIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

.chatform__bubble--bot{
  background:rgba(243,236,224,.04);
  border:1px solid rgba(243,236,224,.08);
  color:var(--ink);
  border-bottom-left-radius:6px;
  font-family:var(--serif);
  font-size:18px;
  font-weight:500;
  letter-spacing:.005em;
  line-height:1.35;
  padding:16px 20px;
}
.chatform__bubble--current{
  border-color:rgba(214,184,122,.28);
  background:rgba(201,168,107,.06);
}
.chatform__bubble--user{
  align-self:flex-end;
  background:linear-gradient(180deg, rgba(214,184,122,.16), rgba(201,168,107,.08));
  border:1px solid rgba(214,184,122,.32);
  color:var(--ink);
  border-bottom-right-radius:6px;
  font-family:var(--sans);
  font-weight:500;
}
.chatform__bubble--final{
  border-color:rgba(214,184,122,.4);
  background:linear-gradient(180deg, rgba(214,184,122,.10), rgba(201,168,107,.04));
  padding:20px 24px;
  max-width:100%;
}
.chatform__final-title{
  font-family:var(--serif);
  font-size:24px;
  font-weight:500;
  margin-bottom:6px;
  color:var(--gold-2);
}
.chatform__final-sub{
  font-family:var(--sans);
  font-size:15px;
  color:var(--ink-dim);
  font-weight:400;
}

.chatform__typing{
  display:inline-flex;align-items:center;gap:6px;
  padding:18px 22px;
}
.chatform__typing span{
  width:6px;height:6px;border-radius:50%;
  background:var(--gold);opacity:.5;
  animation:typingDot 1.2s ease-in-out infinite;
}
.chatform__typing span:nth-child(2){animation-delay:.18s}
.chatform__typing span:nth-child(3){animation-delay:.36s}
@keyframes typingDot{
  0%,60%,100%{transform:translateY(0);opacity:.35}
  30%{transform:translateY(-3px);opacity:1}
}

/* Input pill — same warm geometry as ref */
.chatform__input{
  display:flex;align-items:center;gap:10px;
  background:rgba(243,236,224,.04);
  border:1px solid rgba(243,236,224,.12);
  border-radius:999px;
  padding:6px 6px 6px 22px;
  position:relative;
  transition:border-color .25s ease, background .25s ease, box-shadow .25s ease;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset, 0 14px 50px -20px rgba(201,168,107,.25);
}
.chatform__input:focus-within{
  border-color:rgba(214,184,122,.5);
  background:rgba(214,184,122,.06);
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset, 0 14px 60px -18px rgba(201,168,107,.45);
}
.chatform__input.is-locked{opacity:.55}
.chatform__input.is-error{border-color:rgba(220,120,90,.6)}

.chatform__caret{
  font-family:var(--mono);
  color:var(--gold);
  font-size:18px;
  line-height:1;
  font-weight:500;
}

.chatform__input input{
  flex:1;
  background:transparent;
  border:none;outline:none;
  color:var(--ink);
  font:inherit;
  font-family:var(--sans);
  font-size:16px;
  padding:14px 4px;
  min-width:0;
}
.chatform__input input::placeholder{color:var(--ink-mute)}

.chatform__send{
  flex-shrink:0;
  width:42px;height:42px;
  border-radius:50%;
  border:none;
  background:linear-gradient(180deg, #d6b87a, #b08749);
  color:#1d1408;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset, 0 6px 16px -4px rgba(201,168,107,.6);
}
.chatform__send:hover:not(:disabled){transform:translateX(2px) scale(1.04)}
.chatform__send:disabled{opacity:.35;cursor:not-allowed;box-shadow:none}

/* Chips */
.chatform__chips{
  display:flex;flex-wrap:wrap;gap:8px;
  padding-left:4px;
}
.chatform__chip{
  font-family:var(--sans);font-size:13px;
  padding:8px 14px;
  background:transparent;
  color:var(--ink-dim);
  border:1px solid var(--line-2);
  border-radius:999px;
  cursor:pointer;
  transition:all .2s ease;
}
.chatform__chip:hover{
  border-color:var(--gold);
  color:var(--gold-2);
  background:rgba(214,184,122,.06);
}

.chatform__error{
  font-family:var(--mono);
  font-size:11px;letter-spacing:.06em;
  color:#e89880;
  padding-left:22px;
}

.chatform__progress{
  position:relative;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 8px;
  font-family:var(--mono);
  font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--ink-mute);
}
.chatform__progress-bar{
  position:absolute;left:0;top:-6px;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--gold), transparent);
  transition:width .6s cubic-bezier(.2,.7,.2,1);
}
.chatform__progress-meta{margin-left:auto}

/* Light variant (for any light section, not used by default) */
.section-light .chatform__bubble--bot{
  background:rgba(29,22,12,.04);
  border-color:rgba(29,22,12,.10);
  color:var(--on-light-ink);
}
.section-light .chatform__bubble--user{
  color:var(--on-light-ink);
  background:linear-gradient(180deg, rgba(184,138,58,.20), rgba(184,138,58,.10));
  border-color:rgba(184,138,58,.4);
}
.section-light .chatform__input{
  background:rgba(29,22,12,.03);
  border-color:rgba(29,22,12,.12);
}
.section-light .chatform__input input{color:var(--on-light-ink)}
.section-light .chatform__input input::placeholder{color:rgba(29,22,12,.4)}
