:root { --ashc-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

.ashc-root {
  --ashc-accent: #0aa69f; --ashc-accent-strong: #067d78; --ashc-accent-soft: #e7f8f6; --ashc-accent-rgb: 10,166,159;
  --ashc-ink: #102b3f; --ashc-ink-2: #174a61; --ashc-text: #203546; --ashc-muted: #667987;
  --ashc-canvas: #f5f9fa; --ashc-card: #fff; --ashc-line: #dbe7ea; --ashc-danger: #a4423a; --ashc-danger-soft: #fff4f2;
  --ashc-panel-shadow: 0 30px 90px rgba(8,35,54,.25), 0 8px 28px rgba(8,35,54,.12);
  position: fixed; right: max(22px,env(safe-area-inset-right)); bottom: max(20px,env(safe-area-inset-bottom));
  z-index: 2147482500; color-scheme: light; font-family: var(--ashc-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.ashc-root[data-theme="violet"] {
  --ashc-accent: #526ff0; --ashc-accent-strong: #3f56c9; --ashc-accent-soft: #edf1ff; --ashc-accent-rgb: 82,111,240;
  --ashc-ink: #101f3d; --ashc-ink-2: #243f75; --ashc-canvas: #f6f8ff; --ashc-line: #dce3f3;
  --ashc-panel-shadow: 0 30px 90px rgba(16,31,61,.25), 0 8px 28px rgba(38,61,112,.13);
}
.ashc-root,.ashc-root *,.ashc-root *::before,.ashc-root *::after { box-sizing: border-box; }
.ashc-root button,.ashc-root input { font-family: inherit; }
.ashc-backdrop { position: fixed; inset: 0; display: none; background: rgba(8,24,38,.33); -webkit-backdrop-filter: blur(5px) saturate(.9); backdrop-filter: blur(5px) saturate(.9); }
.ashc-root[data-state="open"] .ashc-backdrop { display: block; animation: ashc-backdrop-in .24s ease-out both; }

.ashc-launcher {
  position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr) 24px; gap: 12px; align-items: center;
  width: 252px; min-height: 66px; padding: 9px 13px 9px 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px; background: linear-gradient(135deg,var(--ashc-ink),var(--ashc-ink-2)); color: #fff;
  box-shadow: 0 18px 54px rgba(8,35,54,.28), inset 0 1px rgba(255,255,255,.12); cursor: pointer; isolation: isolate; text-align: left;
  transition: transform .22s ease, box-shadow .22s ease;
}
.ashc-launcher::before { position: absolute; inset: -100% -40%; z-index: -1; background: linear-gradient(105deg,transparent 38%,rgba(255,255,255,.15) 50%,transparent 62%); content: ""; transform: translateX(-45%); animation: ashc-sheen 5.5s ease-in-out infinite; }
.ashc-launcher:hover { transform: translateY(-3px); box-shadow: 0 24px 68px rgba(8,35,54,.34), inset 0 1px rgba(255,255,255,.14); }
.ashc-launcher:active { transform: translateY(-1px) scale(.99); }
.ashc-launcher-icon,.ashc-brand-mark { position: relative; display: grid; place-items: center; background: linear-gradient(145deg,var(--ashc-accent),var(--ashc-accent-strong)); color: #fff; box-shadow: 0 10px 24px rgba(var(--ashc-accent-rgb),.3), inset 0 1px rgba(255,255,255,.3); }
.ashc-launcher-icon { width: 48px; height: 48px; border-radius: 16px; }
.ashc-launcher-icon svg { width: 25px; height: 25px; fill: currentColor; }
.ashc-presence-dot { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border: 3px solid var(--ashc-ink); border-radius: 50%; background: #43d58d; box-shadow: 0 0 0 3px rgba(67,213,141,.17); animation: ashc-presence 2.5s ease-in-out infinite; }
.ashc-launcher-copy { min-width: 0; }
.ashc-launcher-copy strong { display: block; color: #fff; font-size: 13px; font-weight: 800; line-height: 1.2; }
.ashc-launcher-copy small { display: block; margin-top: 4px; overflow: hidden; color: rgba(255,255,255,.67); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ashc-launcher-arrow { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; font-size: 15px; }

.ashc-panel {
  position: absolute; right: 0; bottom: 82px; display: none; flex-direction: column;
  width: min(464px,calc(100vw - 36px)); height: min(760px,calc(100dvh - 126px)); min-height: 430px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.78); border-radius: 28px; background: var(--ashc-card); box-shadow: var(--ashc-panel-shadow); transform-origin: 90% 100%;
}
.ashc-root[data-state="open"] .ashc-panel { display: flex; animation: ashc-panel-in .34s cubic-bezier(.2,.8,.2,1) both; }
.ashc-root[data-state="open"] .ashc-launcher { visibility: hidden; pointer-events: none; }
.ashc-header { position: relative; display: flex; flex: 0 0 auto; gap: 18px; align-items: flex-start; justify-content: space-between; min-height: 120px; padding: 22px 21px 20px; overflow: hidden; background: linear-gradient(135deg,var(--ashc-ink),var(--ashc-ink-2)); }
.ashc-header::after { position: absolute; right: -40px; bottom: -68px; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; content: ""; }
.ashc-brand { position: relative; z-index: 1; display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 13px; align-items: center; min-width: 0; }
.ashc-brand>div { min-width: 0; }
.ashc-brand-mark { width: 52px; height: 52px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; }
.ashc-brand-mark svg { width: 28px; height: 28px; fill: currentColor; }
.ashc-status { display: flex; gap: 7px; align-items: center; margin: 0 0 5px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 850; letter-spacing: .65px; line-height: 1.2; text-transform: uppercase; }
.ashc-status span { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #47dc94; box-shadow: 0 0 0 4px rgba(71,220,148,.13); }
.ashc-header h2 { margin: 0; color: #fff; font-size: 22px; font-weight: 820; letter-spacing: -.4px; line-height: 1.17; }
.ashc-header p { margin: 5px 0 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.4; }
.ashc-close { position: relative; z-index: 2; display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font: 300 25px/1 Arial,sans-serif; transition: transform .2s ease, background .2s ease; }
.ashc-close:hover { background: rgba(255,255,255,.16); transform: rotate(5deg); }
.ashc-safety { display: grid; grid-template-columns: 18px minmax(0,1fr); flex: 0 0 auto; gap: 9px; align-items: center; padding: 9px 17px; border-bottom: 1px solid #f1d9d5; background: var(--ashc-danger-soft); color: #88453f; font-size: 9.5px; line-height: 1.45; }
.ashc-safety svg { width: 18px; height: 18px; fill: #b85d54; }

.ashc-messages { flex: 1 1 0; min-height: 0; overflow: auto; padding: 20px 18px 13px; background: radial-gradient(circle at 100% 0,rgba(var(--ashc-accent-rgb),.08),transparent 31%),var(--ashc-canvas); overscroll-behavior: contain; scrollbar-color: rgba(var(--ashc-accent-rgb),.28) transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.ashc-messages::-webkit-scrollbar,.ashc-actions::-webkit-scrollbar { width: 7px; }
.ashc-messages::-webkit-scrollbar-thumb,.ashc-actions::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(var(--ashc-accent-rgb),.24); }
.ashc-message { display: flex; gap: 9px; align-items: flex-end; margin-bottom: 13px; animation: ashc-message-in .26s ease-out both; }
.ashc-message--user { justify-content: flex-end; }
.ashc-message-avatar { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 10px; background: linear-gradient(145deg,var(--ashc-accent),var(--ashc-accent-strong)); color: #fff; box-shadow: 0 6px 15px rgba(var(--ashc-accent-rgb),.22); font-size: 10px; font-weight: 900; }
.ashc-bubble { max-width: 84%; padding: 12px 14px; border-radius: 17px; font-size: 12.5px; line-height: 1.58; overflow-wrap: anywhere; white-space: pre-wrap; }
.ashc-message--assistant .ashc-bubble { border: 1px solid var(--ashc-line); border-bottom-left-radius: 6px; background: #fff; color: var(--ashc-text); box-shadow: 0 8px 22px rgba(20,48,67,.06); }
.ashc-message--user .ashc-bubble { border-bottom-right-radius: 6px; background: linear-gradient(145deg,var(--ashc-accent-strong),var(--ashc-accent)); color: #fff; box-shadow: 0 8px 22px rgba(var(--ashc-accent-rgb),.2); }

.ashc-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); flex: 0 0 auto; gap: 9px; min-height: 0; max-height: min(252px,34dvh); overflow: auto; padding: 12px 16px 16px; border-top: 1px solid var(--ashc-line); background: #fff; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; }
.ashc-actions:empty { display: none; }
.ashc-action { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr) 15px; gap: 9px; align-items: center; width: 100%; min-width: 0; min-height: 69px; padding: 10px; overflow: hidden; border: 1px solid var(--ashc-line); border-radius: 17px; background: #fff; color: var(--ashc-text); cursor: pointer; text-align: left; transition: transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.ashc-action:hover { border-color: rgba(var(--ashc-accent-rgb),.46); background: var(--ashc-accent-soft); box-shadow: 0 11px 28px rgba(var(--ashc-accent-rgb),.1); transform: translateY(-2px); }
.ashc-action:active { transform: translateY(0) scale(.99); }
.ashc-action--wide { grid-column: 1/-1; }
.ashc-action--primary { border-color: transparent; background: linear-gradient(135deg,var(--ashc-accent-strong),var(--ashc-accent)); color: #fff; box-shadow: 0 12px 28px rgba(var(--ashc-accent-rgb),.24); }
.ashc-action--primary::before { position: absolute; inset: 0; background: linear-gradient(100deg,transparent 30%,rgba(255,255,255,.12),transparent 70%); content: ""; transform: translateX(-100%); transition: transform .55s ease; }
.ashc-action--primary:hover { border-color: transparent; background: linear-gradient(135deg,var(--ashc-accent-strong),var(--ashc-accent)); box-shadow: 0 16px 34px rgba(var(--ashc-accent-rgb),.3); }
.ashc-action--primary:hover::before { transform: translateX(100%); }
.ashc-action--danger { border-color: #f0d4d0; background: var(--ashc-danger-soft); color: #8d3f38; }
.ashc-action-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--ashc-accent-soft); color: var(--ashc-accent-strong); font-size: 10px; font-weight: 900; }
.ashc-action--primary .ashc-action-icon { background: rgba(255,255,255,.17); color: #fff; }
.ashc-action--danger .ashc-action-icon { background: #fbe5e2; color: var(--ashc-danger); }
.ashc-action-copy { min-width: 0; }
.ashc-action-copy strong { display: block; color: inherit; font-size: 11px; font-weight: 820; line-height: 1.3; overflow-wrap: anywhere; }
.ashc-action-copy small { display: block; margin-top: 3px; color: var(--ashc-muted); font-size: 8.8px; line-height: 1.35; overflow-wrap: anywhere; }
.ashc-action--primary .ashc-action-copy small { color: rgba(255,255,255,.73); }
.ashc-action--danger .ashc-action-copy small { color: #a76963; }
.ashc-action-arrow { color: #8ba0ae; font-size: 19px; transition: transform .18s ease; }
.ashc-action:hover .ashc-action-arrow { transform: translateX(2px); }
.ashc-action--primary .ashc-action-arrow { color: rgba(255,255,255,.8); }

.ashc-input-row { display: grid; grid-template-columns: minmax(0,1fr) 46px; flex: 0 0 auto; gap: 9px; padding: 13px 16px; border-top: 1px solid var(--ashc-line); background: #fff; }
.ashc-input-row[hidden] { display: none !important; }
.ashc-input-row input { width: 100%; min-width: 0; min-height: 46px; padding: 11px 14px; border: 1px solid var(--ashc-line); border-radius: 15px; outline: 0; background: #f8fafb; color: var(--ashc-text); font-size: 13px; line-height: 1.4; transition: border-color .2s ease,background .2s ease,box-shadow .2s ease; }
.ashc-input-row input:focus { border-color: var(--ashc-accent); background: #fff; box-shadow: 0 0 0 4px rgba(var(--ashc-accent-rgb),.11); }
.ashc-input-row button { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 15px; background: linear-gradient(145deg,var(--ashc-accent-strong),var(--ashc-accent)); color: #fff; box-shadow: 0 9px 21px rgba(var(--ashc-accent-rgb),.22); cursor: pointer; transition: transform .18s ease,box-shadow .18s ease; }
.ashc-input-row button:hover { box-shadow: 0 12px 26px rgba(var(--ashc-accent-rgb),.3); transform: translateY(-1px); }
.ashc-input-row button svg { width: 21px; height: 21px; fill: currentColor; }
.ashc-footer { display: flex; flex: 0 0 auto; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px 12px; border-top: 1px solid var(--ashc-line); background: #fff; }
.ashc-footer button { flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--ashc-accent-strong); cursor: pointer; font-size: 10px; font-weight: 800; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; }
.ashc-footer span { min-width: 0; color: var(--ashc-muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; text-align: right; }
.ashc-loading { display: inline-flex; gap: 4px; align-items: center; min-height: 16px; }
.ashc-loading i { width: 6px; height: 6px; border-radius: 50%; background: var(--ashc-accent); animation: ashc-dot 1s infinite ease-in-out; }
.ashc-loading i:nth-child(2) { animation-delay: .14s; } .ashc-loading i:nth-child(3) { animation-delay: .28s; }
.ashc-prefill-notice { position: fixed; left: 50%; bottom: max(24px,env(safe-area-inset-bottom)); z-index: 2147482600; width: min(590px,calc(100vw - 28px)); padding: 15px 18px; border: 1px solid rgba(var(--ashc-accent-rgb),.25); border-radius: 18px; background: #fff; color: var(--ashc-ink); box-shadow: var(--ashc-panel-shadow); font: 700 12px/1.55 var(--ashc-font); transform: translateX(-50%); }
.ashc-root button:focus-visible,.ashc-root input:focus-visible { outline: 3px solid rgba(var(--ashc-accent-rgb),.35); outline-offset: 3px; }

@keyframes ashc-panel-in { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ashc-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ashc-message-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ashc-dot { 0%,80%,100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes ashc-presence { 0%,100% { box-shadow: 0 0 0 3px rgba(67,213,141,.15); } 50% { box-shadow: 0 0 0 6px rgba(67,213,141,0); } }
@keyframes ashc-sheen { 0%,58%,100% { transform: translateX(-45%); opacity: 0; } 68% { opacity: 1; } 84% { transform: translateX(45%); opacity: 0; } }

@media (max-width:1100px) {
  .ashc-root { right: max(16px,env(safe-area-inset-right)); bottom: max(16px,env(safe-area-inset-bottom)); }
  .ashc-panel { bottom: 78px; width: min(452px,calc(100vw - 32px)); height: min(730px,calc(100dvh - 110px)); }
}
@media (min-width:541px) and (max-width:820px) {
  .ashc-panel { width: min(444px,calc(100vw - 28px)); height: min(710px,calc(100dvh - 104px)); min-height: 400px; border-radius: 25px; }
  .ashc-actions { max-height: min(238px,35dvh); }
}
@media (max-height:720px) and (min-width:541px) {
  .ashc-root { right: 10px; bottom: 10px; }
  .ashc-panel { position: fixed; top: max(8px,env(safe-area-inset-top)); right: max(8px,env(safe-area-inset-right)); bottom: max(8px,env(safe-area-inset-bottom)); width: min(452px,calc(100vw - 16px)); height: auto; min-height: 0; border-radius: 22px; }
  .ashc-header { min-height: 0; padding: 14px 15px 13px; }
  .ashc-brand { grid-template-columns: 42px minmax(0,1fr); gap: 10px; }
  .ashc-brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .ashc-header h2 { font-size: 18px; } .ashc-status { margin-bottom: 3px; font-size: 8.5px; }
  .ashc-safety { padding: 7px 13px; font-size: 9px; } .ashc-messages { padding: 13px 14px 8px; }
  .ashc-message { margin-bottom: 9px; } .ashc-bubble { padding: 9px 11px; font-size: 11.5px; line-height: 1.48; }
  .ashc-actions { max-height: min(210px,36dvh); padding: 9px 12px 11px; } .ashc-action { min-height: 57px; padding: 8px; }
  .ashc-footer { padding: 7px 13px 8px; }
}
@media (max-width:540px) {
  body.ashc-chat-open { overflow: hidden; overscroll-behavior: none; }
  .ashc-root { right: max(10px,env(safe-area-inset-right)); bottom: max(10px,env(safe-area-inset-bottom)); }
  .ashc-launcher { grid-template-columns: 46px minmax(0,1fr); width: 182px; min-height: 60px; padding: 7px 11px 7px 7px; border-radius: 20px; }
  .ashc-launcher-icon { width: 46px; height: 46px; border-radius: 15px; } .ashc-launcher-arrow,.ashc-launcher-copy small { display: none; }
  .ashc-panel { position: fixed; inset: max(7px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left)); width: auto; height: auto; min-height: 0; border-radius: 24px; transform-origin: 100% 100%; }
  .ashc-header { min-height: 0; padding: 17px 15px 15px; } .ashc-brand { grid-template-columns: 46px minmax(0,1fr); gap: 10px; }
  .ashc-brand-mark { width: 46px; height: 46px; border-radius: 15px; } .ashc-header h2 { font-size: 19px; } .ashc-close { width: 38px; height: 38px; }
  .ashc-safety { padding: 8px 13px; } .ashc-messages { padding: 15px 13px 9px; } .ashc-bubble { max-width: calc(100% - 37px); }
  .ashc-actions { grid-template-columns: 1fr; max-height: min(290px,39dvh); padding: 10px 12px 12px; } .ashc-action--wide { grid-column: auto; }
  .ashc-input-row { padding: 10px 12px; } .ashc-footer { padding: 8px 12px 10px; }
}
@media (max-width:380px) {
  .ashc-launcher { width: 170px; }
  .ashc-panel { inset: max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left)); border-radius: 20px; }
  .ashc-brand { grid-template-columns: 42px minmax(0,1fr); gap: 9px; } .ashc-brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .ashc-header h2 { font-size: 17px; } .ashc-header p { font-size: 9.5px; }
  .ashc-safety { grid-template-columns: 16px minmax(0,1fr); gap: 7px; font-size: 8.7px; } .ashc-safety svg { width: 16px; height: 16px; }
  .ashc-message-avatar { flex-basis: 26px; width: 26px; height: 26px; } .ashc-bubble { max-width: calc(100% - 34px); font-size: 11.5px; }
  .ashc-footer span { font-size: 8px; }
}
@media (max-height:500px) {
  .ashc-panel { inset: max(3px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) auto; width: min(460px,calc(100vw - 10px)); border-radius: 18px; }
  .ashc-header { padding: 10px 13px; } .ashc-brand { grid-template-columns: 38px minmax(0,1fr); } .ashc-brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .ashc-header p { display: none; } .ashc-safety { padding: 5px 12px; } .ashc-actions { max-height: 42dvh; }
}
@media (prefers-reduced-motion:reduce) {
  .ashc-root *,.ashc-root *::before,.ashc-root *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
@media (prefers-contrast:more) {
  .ashc-panel,.ashc-action,.ashc-bubble,.ashc-input-row input { border-width: 2px; }
}
