:root{
  color-scheme:light;
  --forest:#101d18;
  --forest-2:#1b2b22;
  --graphite:#202524;
  --olive:#5f744d;
  --olive-dark:#405436;
  --sand:#e9dfcc;
  --sand-2:#f5efe3;
  --paper:#fffdf8;
  --line:#ded4c2;
  --ink:#1f2521;
  --muted:#697168;
  --danger:#9d3f35;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  letter-spacing:0;
}
*{box-sizing:border-box}
html{height:100%;background:var(--forest)}
body{height:100%;margin:0;overflow:hidden;color:var(--ink);background:
  linear-gradient(90deg,#06110eb8 0%,#10221945 24%,#0c181312 50%,#10221945 76%,#06110eb8 100%),
  radial-gradient(ellipse at center,#16332410 0%,#0b191245 72%,#030807b5 100%),
  url("../media/vector-bg-training.webp") center center/cover fixed no-repeat;
  background-color:var(--forest)}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:
  linear-gradient(180deg,#03100d86 0%,#10251a14 42%,#04100ba8 100%),
  radial-gradient(ellipse at center,transparent 0 44%,#02060570 100%);
  opacity:.56}
button,input{font:inherit}
button{border:0;cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.65}
a{color:inherit}
.vector-shell{position:relative;z-index:1;height:100vh;display:flex;justify-content:center;align-items:center;padding:20px}
.chat-card{position:relative;width:min(560px,100%);height:min(860px,calc(100vh - 40px));min-height:560px;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;background:
  linear-gradient(180deg,#f3eddf 0%,#efe7d7 56%,#eadfcd 100%);
  border:1px solid #d5c8b2;border-radius:10px;box-shadow:0 26px 90px #0009;overflow:hidden}
.chat-card:before{content:"";position:absolute;inset:0;pointer-events:none;background:
  linear-gradient(115deg,#fff8ea24 0%,transparent 45%,#d8c9b01c 100%),
  url("../media/vector-chat-plaster.webp") center center/cover no-repeat;
  opacity:.15}
.chat-card>*{position:relative;z-index:1}
.chat-card.compact{display:flex;flex-direction:column;height:auto;min-height:0;max-height:min(860px,calc(100vh - 40px))}
.chat-card.compact .chat-log{flex:0 1 auto;max-height:calc(100% - 174px);padding-bottom:5px}
.chat-card.compact .chat-controls{flex:0 0 auto}
.chat-card.compact .legal-drawer{flex:0 0 auto;margin-top:0}
.chat-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;background:#fbf8f0f2;border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}
.consultant{display:flex;align-items:center;gap:12px;min-width:0}
.consultant-photo{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#d7ddcb;border:2px solid #fff;box-shadow:0 2px 10px #0002}
.consultant-meta{display:grid;gap:1px;min-width:0}
.consultant-meta strong{font-size:16px;line-height:1.15;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand{font-size:11px;font-weight:700;color:var(--olive-dark);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;line-height:1.25}
.status span{width:8px;height:8px;border-radius:50%;background:#4ca86d;box-shadow:0 0 0 3px #4ca86d24;flex:0 0 auto}
.phone-link{flex:0 0 auto;text-decoration:none;font-weight:700;font-size:14px;color:#243627;background:#e9eddd;border:1px solid #c8d4b8;border-radius:999px;padding:8px 12px}
.chat-log{min-height:0;overflow-y:auto;padding:14px 16px 12px;scroll-behavior:smooth;scrollbar-color:#c8bda8 transparent}
.message-row{display:flex;margin:7px 0;animation:message-in .18s ease-out both}
.message-row.bot{justify-content:flex-start}
.message-row.user{justify-content:flex-end}
.bubble{max-width:84%;padding:9px 12px;border-radius:17px;line-height:1.44;font-size:14.5px;font-weight:430;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 1px 8px #2f25150f}
.bot .bubble{background:#fffefa;border-bottom-left-radius:6px;border:1px solid #eee5d7}
.user .bubble{background:#657a50;color:white;border-bottom-right-radius:6px;border:1px solid #5a7046}
.typing{display:flex;align-items:center;gap:8px;color:#606b62;font-size:13px;padding:8px 11px;background:#fffefa;border:1px solid #eee5d7;border-radius:17px;border-bottom-left-radius:6px;box-shadow:0 1px 8px #2f25150f}
.typing:after{content:"..."}
.typing-dots{display:inline-flex;gap:3px;order:-1}
.typing-dots span{width:5px;height:5px;border-radius:50%;background:#7c877d;animation:dot 1s infinite ease-in-out}
.typing-dots span:nth-child(2){animation-delay:.12s}
.typing-dots span:nth-child(3){animation-delay:.24s}
.chat-controls{padding:10px 16px 13px;border-top:1px solid #ded4c2;background:#fbf8f0e6;backdrop-filter:blur(8px)}
.quick-replies{display:flex;flex-wrap:wrap;gap:8px}
.payment-entry{margin-top:10px;padding-top:11px;border-top:1px solid #ded4c2}
.payment-entry-label{margin:0 0 7px;color:#667061;font-size:12.5px;font-weight:650}
.quick-reply,.payment-reply,.restart-button,.form-submit{min-height:44px;border-radius:999px;border:1px solid #c4cbb8;background:#fffdf8;color:#283229;padding:9px 13px;font-weight:650;transition:background .14s,border-color .14s,transform .14s,box-shadow .14s}
.payment-reply{width:100%;max-width:360px;text-align:center;background:#f4f1e6;border-color:#bfc9b1;color:#31402f}
.quick-reply:hover,.payment-reply:hover,.restart-button:hover{background:#f2f5ec;border-color:#9dae8d;box-shadow:0 2px 8px #31412510}
.quick-reply:active,.payment-reply:active,.restart-button:active,.form-submit:active{transform:translateY(1px)}
.inline-panel,.summary-card,.lead-form{background:#fffefa;border:1px solid #e7ddcf;border-radius:10px;padding:13px;box-shadow:0 2px 14px #2f251510}
.inline-panel{display:grid;gap:10px}
.inline-panel label,.lead-form label{display:grid;gap:6px;font-size:13px;font-weight:650;color:#3f473f}
.inline-panel input,.lead-form input{width:100%;min-height:44px;border:1px solid #d6cdbd;border-radius:9px;background:#fff;padding:10px 12px;color:var(--ink)}
.inline-panel input:focus,.lead-form input:focus,.consent input:focus-visible,.quick-reply:focus-visible,.payment-reply:focus-visible,.form-submit:focus-visible,.restart-button:focus-visible{outline:3px solid #97b87366;outline-offset:2px}
.inline-actions{display:flex;gap:8px;justify-content:flex-end}
.inline-actions button{min-height:40px;border-radius:8px;background:var(--olive);color:white;padding:9px 14px;font-weight:700}
.region-note{display:grid;gap:9px;background:#fffefa;border:1px solid #e7ddcf;border-radius:10px;padding:9px 12px;font-size:13.5px;box-shadow:0 2px 14px #2f251510}
.region-note span{color:var(--muted);font-weight:650}
.region-note .restart-button{justify-self:start;margin-top:0}
.summary-card{margin:7px 0;width:min(390px,100%)}
.summary-card h2{font-size:15px;margin:0 0 10px;font-weight:750}
.summary-card dl{display:grid;gap:0;margin:0}
.summary-card div{display:grid;grid-template-columns:132px minmax(0,1fr);gap:12px;border-top:1px solid #efe6da;padding:8px 0}
.summary-card div:first-of-type{border-top:0;padding-top:0}
.summary-card dt{color:var(--muted);font-size:12.5px}
.summary-card dd{margin:0;font-weight:650;overflow-wrap:anywhere}
.restart-button{margin-top:10px;min-height:38px;padding:8px 12px;font-size:13px;color:#526147;background:#f8f4eb}
.lead-form{display:grid;gap:11px;margin-top:8px;width:min(390px,100%)}
.consent{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:9px;font-size:13px;line-height:1.35;font-weight:500!important}
.consent input{width:18px;min-height:18px;height:18px;accent-color:var(--olive);margin-top:1px}
.consent a{color:#365d37;font-weight:800}
.form-submit{border-radius:9px;background:var(--olive);border-color:var(--olive);color:white}
.form-submit:hover{background:var(--olive-dark);border-color:var(--olive-dark)}
.field-error{color:var(--danger);font-size:13px;min-height:18px;margin:0}
.legal-drawer{border-top:1px solid #ded4c2;background:#fbf8f0f0;padding:9px 16px 11px;font-size:12.5px;color:#59635b}
.legal-drawer summary{cursor:pointer;font-weight:700;color:#4e5b50;list-style:none}
.legal-drawer summary:before{content:"▸ ";color:#758865}
.legal-drawer[open] summary:before{content:"▾ "}
.legal-drawer section{display:grid;gap:7px;max-height:180px;overflow:auto;margin-top:9px;padding-right:6px}
.legal-drawer h2{font-size:13px;color:#2d352f;margin:5px 0 0}
.legal-drawer p{margin:0;white-space:pre-wrap;line-height:1.55}
@keyframes message-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes dot{0%,70%,100%{transform:translateY(0);opacity:.45}35%{transform:translateY(-3px);opacity:1}}
@media(max-width:700px){
  body{overflow:hidden}
  body:before{opacity:.82}
  .vector-shell{height:100dvh;padding:0}
  .chat-card{width:100%;height:100dvh;min-height:0;border-radius:0;border-left:0;border-right:0;box-shadow:none}
}
@media(max-width:430px){
  .chat-header{padding:10px 11px;gap:8px}
  .consultant{gap:9px}
  .consultant-photo{width:42px;height:42px}
  .consultant-meta strong{font-size:15px}
  .brand{font-size:9.5px}
  .status{font-size:11px}
  .phone-link{font-size:12px;padding:7px 9px}
  .chat-log{padding:12px}
  .chat-controls{padding:10px 12px 12px}
  .bubble{max-width:91%;font-size:14px}
  .quick-reply{flex:1 1 auto;min-width:calc(50% - 8px);padding:9px 10px}
  .summary-card div{grid-template-columns:1fr;gap:2px}
  .legal-drawer{padding-left:12px;padding-right:12px}
}
@media(max-width:365px){
  .phone-link{font-size:11px;padding:7px 8px}
  .status{max-width:178px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media(prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
