*{box-sizing:border-box} body{margin:0;background:var(--color-background);color:var(--color-on-background);font:16px/1.5 system-ui,-apple-system,sans-serif} button,select,textarea{font:inherit} button,select,a{min-height:44px} button,select{cursor:pointer} button:focus-visible,select:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid var(--color-focus);outline-offset:2px} button:disabled{opacity:.55;cursor:not-allowed} .shell{min-height:100dvh;display:flex;flex-direction:column;padding:0 max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))} .topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:1200px;width:100%;margin:auto auto 0;padding:20px 0;border-bottom:1px solid var(--color-divider)} .brand,.controls{display:flex;align-items:center;gap:12px}.brand img{border-radius:12px}.brand strong,.brand span{display:block}.brand strong{font-size:18px;line-height:1.15}.brand span{font-size:12px;color:var(--color-text-muted)} .controls button,.controls select{border:1px solid var(--color-divider);border-radius:10px;padding:0 12px;background:var(--color-surface);color:var(--color-text)} .chat{width:min(100%,820px);margin:0 auto;flex:1;display:flex;flex-direction:column}.intro{text-align:center;padding:38px 0 24px}.eyebrow{font-size:11px;letter-spacing:.12em;font-weight:700;color:var(--color-action)}h1{font-size:clamp(26px,4vw,40px);line-height:1.15;margin:12px 0}.intro p,.privacy,footer{color:var(--color-text-muted)}.intro p{margin:0}.chat-window{display:flex;flex-direction:column;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:20px;box-shadow:0 12px 36px rgb(0 0 0 / .06);min-height:340px;overflow:hidden}.chat-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--color-divider);font-size:14px}.status-dot{display:block;color:var(--color-text-muted);font-size:12px}.status-dot:before{content:'●';color:var(--color-action);margin-right:6px}#remaining{color:var(--color-text-muted);text-align:right;font-size:12px}.cw-root{--chat-bg:var(--color-surface);--chat-text:var(--color-text);--chat-soft:var(--color-surface-alt);--chat-user-background:var(--color-selected);--chat-user-text:var(--color-on-selected);--chat-accent:var(--color-action);--chat-border:var(--color-divider)}.cw-log{min-height:180px;max-height:45vh;scrollbar-gutter:stable}.loading{display:flex;gap:10px;align-items:center;padding:8px 20px;color:var(--color-text-muted);font-size:14px}.loading[hidden],.warning[hidden]{display:none}.spinner{width:18px;height:18px;border:2px solid var(--color-divider);border-top-color:var(--color-action);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}form{padding:12px 16px 16px}.compose{display:flex;gap:8px;border:1px solid var(--color-field-border);background:var(--color-field);border-radius:14px;padding:8px}textarea{resize:vertical;flex:1;min-width:0;min-height:44px;max-height:160px;padding:10px;border:0;background:transparent;color:var(--color-on-field)}.compose button,.dialog-inner button{border:0;border-radius:10px;background:var(--color-action);color:var(--color-on-action);font-weight:700;padding:0 20px}.form-meta{display:flex;justify-content:space-between;gap:8px;color:var(--color-text-muted);font-size:12px;margin:8px 4px 0}.warning{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--color-warning);color:var(--color-on-warning);border-radius:10px;padding:10px 12px;margin-bottom:10px;font-size:14px}.warning button{flex:none;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;padding:0 12px;font-weight:700}.privacy{text-align:center;font-size:12px;margin:16px 0}footer{text-align:center;font-size:14px;padding:18px 0 0}footer p{margin:0 0 4px}a{color:var(--color-action);display:inline-flex;align-items:center;font-weight:600}dialog{max-width:min(420px,calc(100% - 32px));border:1px solid var(--color-divider);border-radius:18px;background:var(--color-surface);color:var(--color-text);padding:0;box-shadow:0 18px 60px rgb(0 0 0 / .25)}dialog::backdrop{background:rgb(0 0 0 / .5)}.dialog-inner{padding:24px}.dialog-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--color-warning);color:var(--color-on-warning);font-weight:700}.dialog-inner h2{margin:14px 0 6px;font-size:22px}.dialog-inner p{color:var(--color-text-muted)}.dialog-inner button{width:100%}.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}@media(max-width:600px){.shell{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}.topbar{padding:12px 0;align-items:flex-start}.controls{gap:6px}.controls select,.controls button{padding:0 8px;font-size:13px}.brand{gap:8px}.brand img{width:40px;height:40px}.intro{padding:28px 0 20px}.chat-window{min-height:320px}.warning{align-items:flex-start;flex-direction:column}.form-meta span:first-child{display:none}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}.cw-log{scroll-behavior:auto}}

/* Defaults for the widget CSS when used outside its shadow root. */
.cw-root {
  --cw-surface: var(--chat-surface, var(--bg-surface, #fff));
  --cw-background: var(--chat-background, var(--bg-ivory, #faf8f4));
  --cw-text: var(--chat-text, var(--text-forest, #103628));
  --cw-muted: var(--chat-muted, var(--text-muted, #526a5f));
  --cw-accent: var(--chat-accent, var(--green-accent, #256f43));
  --cw-accent-text: var(--chat-accent-text, var(--text-on-dark, #f7f5f0));
  --cw-soft: var(--chat-soft, var(--green-soft, #e5f3df));
  --cw-border: var(--chat-border, var(--border-card, #dce2d8));
  --cw-presence: var(--chat-presence, #25834b);
  --cw-panel-border: var(--chat-border, var(--cw-accent));
  --cw-badge: var(--chat-badge, #247a45);
  --cw-send-background: var(--chat-send-background, var(--chat-accent, #a3e635));
  --cw-send-text: var(--chat-send-text, var(--chat-accent-text, #102019));
  --cw-user-background: var(--chat-user-background, var(--chat-soft, #d7eee4));
  --cw-user-text: var(--chat-user-text, var(--cw-text));
  --cw-focus: var(--cw-text);
  --cw-shadow: var(--shadow-lg, 0 16px 40px rgba(16, 54, 40, .18));
  --cw-font: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --cw-small: 12px;
  --cw-body: 14px;
  --cw-title: 14px;
  --cw-line: 1.5;
  --cw-panel-width: 380px;
  --cw-panel-height: 600px;
  --cw-content-width: 760px;
  --cw-header-height: 56px;
  --cw-avatar-size: 32px;
  --cw-action-size: 36px;
  --cw-launch-size: 56px;
  --cw-target: 44px;
  --cw-check-size: 20px;
  --cw-icon-size: 18px;
  --cw-edge: 12px;
  --cw-gap: 12px;
  --cw-half-gap: 6px;
  --cw-pad: 16px;
  --cw-message-gap: 8px;
  --cw-message-width: 85%;
  --cw-radius: 16px;
  --cw-small-radius: 10px;
  --cw-pill: 999px;
  --cw-border-size: 1px;
  --cw-focus-size: 3px;
  --cw-zero: 0px;
  --cw-full: 100%;
  --cw-z: 2147483000;
  --cw-transition: var(--motion-fast, 150ms);
  --cw-typing-duration: calc(var(--motion-slow, 300ms) * 4);
  --cw-disabled-opacity: .6;
  --cw-hover-scale: 1.05;
  --cw-viewport-width: 100vw;
  --cw-viewport-height: 100dvh;
  --cw-input-line: 21px;
  --cw-input-padding: 10px;
  --cw-rich-width: 92%;
  --cw-code-surface: #f4f7f2;
  --cw-table-stripe: #f0f7ed;
  --cw-link: #075c36;
  --cw-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --cw-sidebar-width: 280px;
  --cw-card-shadow: 0 4px 24px rgba(16, 54, 40, .08);
  --cw-sidebar-bg: linear-gradient(155deg, var(--cw-soft), var(--cw-surface));
}

.cw-root { position: static; right: auto; bottom: auto; z-index: auto; font: inherit; --cw-text: var(--color-text); --cw-soft: var(--color-surface-alt); --cw-surface: var(--color-surface); --cw-user-background: var(--color-selected); --cw-user-text: var(--color-on-selected); --cw-accent: var(--color-action); --cw-border: var(--color-divider); --cw-link: var(--color-action); --cw-code-surface: var(--color-surface-alt); --cw-table-stripe: var(--color-surface-alt); }
.cw-root textarea { width: auto; border: 0; background: transparent; padding: 10px; }

.mask-notice { color: var(--color-text-muted); font-size: 12px; margin: 4px 0 12px 32px; }
