@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

.pb-root, .pb-root * { box-sizing: border-box; }
.pb-root {
  --pb-red: #d73419;
  --pb-red-dark: #aa2615;
  --pb-orange: #ef7b22;
  --pb-ink: #161616;
  --pb-cream: #fffaf4;
  --pb-line: #eadfd7;
  --pb-green: #18794e;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

.pb-launcher {
  position: relative;
  min-height: 70px;
  padding: 8px 18px 8px 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: #171412;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 18px 48px rgba(36,18,10,.25), 0 2px 8px rgba(0,0,0,.12);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pb-launcher:hover { transform: translateY(-2px); box-shadow: 0 24px 55px rgba(36,18,10,.28); }
.pb-launcher.is-hidden { display: none; }
.pb-launcher-orbit {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fff7ef, #f5ded1);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.28);
}
.pb-mascot { display:block; width:100%; height:100%; object-fit:contain; }
.pb-mascot-launcher { width: 49px; height: 49px; }
.pb-launcher-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.pb-launcher-copy strong { font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.pb-launcher-copy small { margin-top: 4px; font-size: 9.5px; opacity: .68; font-weight: 500; }
.pb-online-dot {
  position:absolute; right:10px; top:7px;
  width:9px; height:9px; border-radius:50%;
  background:#4ade80; border:2px solid #171412;
}

.pb-panel {
  width: min(420px, calc(100vw - 28px));
  height: min(720px, calc(100vh - 38px));
  border-radius: 28px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(54,37,28,.12);
  box-shadow: 0 35px 90px rgba(40,20,10,.27), 0 5px 20px rgba(0,0,0,.08);
}
.pb-panel.is-open { display:flex; animation:pbEnter .22s cubic-bezier(.2,.8,.2,1); }
@keyframes pbEnter {
  from { opacity:0; transform:translateY(12px) scale(.98); }
  to { opacity:1; transform:none; }
}

.pb-header {
  min-height: 76px;
  padding: 13px 14px 12px 15px;
  display:flex; align-items:center; justify-content:space-between;
  background: #fff;
  border-bottom: 1px solid #f0e8e2;
}
.pb-header-brand { display:flex; align-items:center; gap:11px; min-width:0; }
.pb-mascot-header {
  width: 48px; height: 48px; border-radius:16px;
  background:#fff4eb; border:1px solid #f0ded2;
}
.pb-header-title { font-size:15px; font-weight:800; letter-spacing:-.02em; color:var(--pb-ink); }
.pb-status { margin-top:3px; font-size:10px; color:#7b706a; font-weight:600; display:flex; align-items:center; gap:5px; }
.pb-status span { width:6px; height:6px; border-radius:50%; background:#22a061; box-shadow:0 0 0 3px rgba(34,160,97,.10); }
.pb-close {
  width:38px; height:38px; padding:0;
  display:grid; place-items:center;
  border:0; border-radius:50%;
  background:#f7f2ee; cursor:pointer; color:#28211e;
  transition:background .15s ease;
}
.pb-close:hover { background:#eee5df; }
.pb-close svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }

.pb-deadline-bar {
  min-height: 40px;
  padding: 8px 14px;
  display:flex; align-items:center; gap:8px;
  background: linear-gradient(90deg, #fff2e7, #fff9f5);
  border-bottom: 1px solid #f3ded0;
  color:#6f2b18;
  font-size:10px;
  font-weight:650;
}
.pb-deadline-label {
  padding:4px 7px; border-radius:999px;
  background:var(--pb-red); color:#fff;
  font-size:9px; font-weight:800; letter-spacing:.04em;
}
.pb-deadline-text { flex:1; }
.pb-countdown { font-weight:800; white-space:nowrap; color:#9f331c; }

.pb-messages {
  flex:1;
  overflow-y:auto;
  padding: 18px 15px 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(239,123,34,.055), transparent 28%),
    linear-gradient(#fffdfa, #fff);
  scroll-behavior:smooth;
}
.pb-messages::-webkit-scrollbar { width:6px; }
.pb-messages::-webkit-scrollbar-thumb { background:#ddd1c8; border-radius:99px; }

.pb-msg-row { display:flex; align-items:flex-end; gap:7px; margin:0 0 13px; }
.pb-user { justify-content:flex-end; }
.pb-assistant { justify-content:flex-start; }
.pb-mini-avatar {
  flex:0 0 27px; width:27px; height:27px;
  border-radius:9px; overflow:hidden; background:#fff1e7;
  border:1px solid #edd9cc;
}
.pb-mini-avatar img { width:100%; height:100%; object-fit:cover; }
.pb-msg-stack { max-width:84%; min-width:0; }
.pb-user .pb-msg-stack { display:flex; justify-content:flex-end; }
.pb-msg {
  padding: 11px 13px;
  border-radius: 17px;
  font-size: 12.6px;
  line-height: 1.52;
  word-break: break-word;
}
.pb-msg a { text-decoration:underline; text-underline-offset:2px; }
.pb-assistant .pb-msg {
  background:#fff;
  color:#26211e;
  border:1px solid #ece3dd;
  border-bottom-left-radius:6px;
  box-shadow:0 2px 8px rgba(43,24,14,.035);
}
.pb-user .pb-msg {
  max-width:86%;
  background:#1b1816;
  color:#fff;
  border-bottom-right-radius:6px;
}
.pb-sources {
  margin-top:5px;
  display:flex; flex-wrap:wrap; gap:5px;
}
.pb-sources-title {
  width:100%; font-size:8.5px; text-transform:uppercase; letter-spacing:.08em;
  color:#9b8e86; font-weight:800;
}
.pb-sources a {
  display:block; max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  padding:5px 7px; border:1px solid #eadfd8; border-radius:8px;
  background:#fff; color:#72584b; text-decoration:none;
  font-size:8.8px; font-weight:650;
}
.pb-sources a:hover { border-color:#cfb9ab; }

.pb-quick-actions {
  padding: 9px 12px 7px;
  display:flex; flex-wrap:wrap; gap:7px;
  background:#fff;
  border-top:1px solid #f2ebe6;
}
.pb-quick-actions:empty { display:none; }
.pb-chip {
  appearance:none;
  border:1px solid #ded2ca;
  background:#fff;
  color:#2e2824;
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
  font:inherit;
  font-size:10.2px;
  line-height:1.2;
  font-weight:700;
  transition:.15s ease;
}
.pb-chip:hover { transform:translateY(-1px); border-color:#baa297; }
.pb-chip-primary {
  border-color:var(--pb-red);
  background:var(--pb-red);
  color:#fff;
}
.pb-chip-primary:hover { background:var(--pb-red-dark); border-color:var(--pb-red-dark); }
.pb-chip:disabled { opacity:.45; cursor:not-allowed; transform:none; }

.pb-progress-wrap {
  padding: 8px 14px 9px;
  background:#fff;
  border-top:1px solid #f3ece7;
}
.pb-progress-wrap[hidden] { display:none; }
.pb-progress-label {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:6px; font-size:9px; color:#7d716b; font-weight:700;
}
.pb-progress-label span:first-child { color:#342b26; }
.pb-progress {
  height:5px; overflow:hidden; border-radius:999px; background:#f0e6df;
}
.pb-progress span {
  display:block; width:0; height:100%; border-radius:inherit;
  background:linear-gradient(90deg, var(--pb-red), var(--pb-orange));
  transition:width .3s ease;
}

.pb-upload-zone {
  padding: 10px 12px 8px;
  background:#fff;
  border-top:1px solid #f1e9e4;
}
.pb-upload-zone[hidden] { display:none; }
.pb-upload-card {
  margin-bottom:8px; padding:9px;
  border:1px solid #eaded6; border-radius:14px;
  background:#fffdfb;
}
.pb-file-field {
  display:flex; align-items:center; gap:9px;
  cursor:pointer;
}
.pb-file-field input { position:absolute; opacity:0; pointer-events:none; width:1px; height:1px; }
.pb-file-icon {
  width:32px; height:32px; border-radius:10px;
  display:grid; place-items:center;
  background:#fff0e6; color:var(--pb-red); font-size:18px; font-weight:800;
}
.pb-file-field span:nth-child(2) { flex:1; min-width:0; }
.pb-file-field strong { display:block; font-size:10.5px; color:#2b2521; }
.pb-file-field small { display:block; margin-top:2px; font-size:8.5px; color:#91847c; }
.pb-file-name {
  margin:6px 0 0 41px;
  font-size:8.8px; color:#9b8d85;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.pb-file-name.has-file { color:var(--pb-green); font-weight:700; }
.pb-upload-continue {
  width:100%; border:0; border-radius:12px;
  padding:10px 12px; background:var(--pb-red); color:#fff;
  font:inherit; font-size:10.5px; font-weight:800; cursor:pointer;
}
.pb-upload-continue:disabled { opacity:.35; cursor:not-allowed; }

.pb-input-row {
  padding: 9px 10px 8px;
  display:flex; align-items:flex-end; gap:7px;
  background:#fff;
  border-top:1px solid #f0e9e4;
}
.pb-input {
  flex:1;
  min-height:43px !important;
  max-height:120px;
  resize:none;
  outline:none !important;
  border:1px solid #ded4cd !important;
  border-radius:14px !important;
  padding:10px 12px !important;
  background:#fff !important;
  color:#1e1b19 !important;
  box-shadow:none !important;
  font:inherit !important;
  font-size:11.5px !important;
  line-height:1.4 !important;
}
.pb-input::placeholder { color:#a99c94; }
.pb-input:focus { border-color:#c5afa2 !important; box-shadow:0 0 0 3px rgba(215,52,25,.06) !important; }
.pb-send {
  flex:0 0 43px; width:43px; height:43px;
  display:grid; place-items:center;
  border:0; border-radius:13px;
  background:var(--pb-red); color:#fff; cursor:pointer;
  transition:.15s ease;
}
.pb-send:hover { background:var(--pb-red-dark); transform:translateY(-1px); }
.pb-send:disabled { opacity:.45; cursor:wait; transform:none; }
.pb-send svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.pb-footnote {
  padding: 0 15px 10px;
  background:#fff;
  text-align:center;
  color:#a0958e;
  font-size:8px;
  line-height:1.4;
}
.pb-typing { display:flex; align-items:center; gap:4px; min-height:36px; }
.pb-typing span { width:5px; height:5px; border-radius:50%; background:#a08f85; animation:pbDot 1.1s infinite ease-in-out; }
.pb-typing span:nth-child(2) { animation-delay:.14s; }
.pb-typing span:nth-child(3) { animation-delay:.28s; }
.pb-typing em { margin-left:4px; color:#93857d; font-size:8.5px; font-style:normal; }
@keyframes pbDot { 0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-3px);opacity:1} }

@media (max-width: 600px) {
  .pb-root { right:10px; bottom:10px; left:10px; }
  .pb-launcher { margin-left:auto; padding-right:10px; }
  .pb-launcher-copy { display:none; }
  .pb-online-dot { right:5px; top:4px; }
  .pb-panel {
    width:100%;
    height:calc(100dvh - 20px);
    border-radius:24px;
  }
  .pb-msg-stack { max-width:87%; }
}

@media (prefers-reduced-motion: reduce) {
  .pb-panel.is-open, .pb-launcher, .pb-chip, .pb-send, .pb-progress span { animation:none; transition:none; }
}
