:root {
  --paper: #f3efe5;
  --ink: #171815;
  --muted: #686b64;
  --line: #d9d3c6;
  --panel: #fffdf8;
  --green: #246b4b;
  --green-soft: #dceadf;
  --warm: #e7ddcb;
  --shadow: 0 18px 50px rgba(40, 36, 27, .11);
  --radius: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; }
body { min-height: 100vh; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 48px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.intro h1 { margin: 12px 0 6px; font-size: clamp(2.1rem, 5vw, 4.6rem); letter-spacing: -.035em; line-height: .96; font-weight: 650; }
.intro p { max-width: 640px; margin: 0; color: var(--muted); line-height: 1.55; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .14em; font-weight: 700; }
.status i, .chat-head small i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.flow { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); font-size: .78rem; }
.flow span { border: 1px solid var(--line); padding: 7px 9px; border-radius: 7px; background: rgba(255,255,255,.35); }
.flow b { font-weight: 500; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 24px; margin-top: 26px; align-items: start; }
.phone, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.phone { min-height: 680px; display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden; }
.chat-head { min-height: 76px; padding: 15px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--panel); display: grid; place-items: center; font-weight: 700; }
.chat-head strong { display: block; font-size: .95rem; }
.chat-head small { color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.chat-head small i { width: 6px; height: 6px; }
.chat-head button { margin-left: auto; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 8px; }
.chat-head button:hover, .chat-head button:focus-visible { background: var(--warm); color: var(--ink); outline: none; }
.messages { padding: 24px 22px; overflow-y: auto; min-height: 390px; max-height: 500px; background: #efe9dd; }
.message { display: flex; margin: 0 0 13px; }
.bubble { max-width: min(82%, 620px); padding: 11px 13px; border-radius: 12px; line-height: 1.47; font-size: .94rem; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 3px 10px rgba(0,0,0,.04); }
.assistant .bubble { background: var(--panel); border-top-left-radius: 3px; }
.user { justify-content: end; }
.user .bubble { background: var(--green-soft); border-top-right-radius: 3px; }
.typing .bubble { color: var(--muted); }
.suggestions { padding: 10px 14px; display: flex; gap: 8px; overflow-x: auto; border-top: 1px solid var(--line); }
.suggestions button { flex: 0 0 auto; border: 1px solid var(--line); background: transparent; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: .78rem; }
.suggestions button:hover, .suggestions button:focus-visible { border-color: var(--ink); outline: none; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid var(--line); align-items: end; }
.composer textarea { width: 100%; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: none; }
.composer textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,107,75,.12); }
.composer button { min-height: 44px; border: 0; padding: 0 18px; border-radius: 10px; background: var(--ink); color: white; font-weight: 650; }
.composer button:disabled { opacity: .45; cursor: wait; }
.side { display: grid; gap: 18px; }
.panel { padding: 19px; box-shadow: 0 12px 35px rgba(40,36,27,.07); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 1rem; }
.panel-head span { font-size: .65rem; letter-spacing: .1em; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.panel-head button { border: 0; background: transparent; color: var(--green); font-size: .78rem; padding: 6px; border-radius: 6px; }
.panel ul { margin: 16px 0 0; padding: 0 0 0 18px; color: var(--muted); line-height: 1.55; font-size: .88rem; }
.panel li + li { margin-top: 9px; }
.operations { margin-top: 14px; display: grid; gap: 9px; }
.operation { border-top: 1px solid var(--line); padding-top: 10px; }
.operation strong { display: block; font-size: .82rem; }
.operation small { color: var(--muted); line-height: 1.4; display: block; margin-top: 3px; }
.empty { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.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 { outline: 2px solid var(--green); outline-offset: 2px; }
::selection { background: var(--green); color: white; }
@media (max-width: 820px) {
  .shell { width: min(100% - 20px, 680px); padding-top: 20px; }
  .intro { display: block; }
  .flow { margin-top: 18px; overflow-x: auto; padding-bottom: 3px; }
  .workspace { grid-template-columns: 1fr; }
  .phone { min-height: 70vh; }
  .side { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .shell { width: 100%; padding: 0; }
  .intro { padding: 22px 16px 18px; }
  .intro h1 { font-size: 2.5rem; }
  .flow { font-size: .68rem; }
  .workspace { margin: 0; gap: 0; }
  .phone { border-left: 0; border-right: 0; border-radius: 0; min-height: 74vh; box-shadow: none; }
  .messages { min-height: 390px; padding: 18px 13px; }
  .bubble { max-width: 88%; }
  .side { padding: 14px; }
}

