:host { --bg:var(--site-surface); --fg:var(--site-text); --muted:var(--site-muted); --line:var(--site-border); --soft:var(--site-soft); --blue:var(--site-primary); color:var(--fg); font:14px/1.7 var(--site-font); color-scheme:inherit; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
button,input,textarea,select { font:inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; border:1px solid var(--line); background:var(--bg); color:var(--fg); border-radius:8px; padding:7px 11px; line-height:1.45; }
button:hover { background:var(--soft); }
button:disabled { cursor:default; opacity:.55; }
:focus-visible { outline:3px solid var(--site-primary); outline-offset:2px; }
a { color:var(--blue); }
.primary { background:var(--blue); border-color:var(--blue); color:var(--site-on-primary); }
.primary:hover { background:var(--site-primary-hover); }
.muted,small { color:var(--muted); }
.launch { position:fixed; right:24px; bottom:24px; z-index:10000; border:0; box-shadow:0 6px 24px color-mix(in srgb,var(--site-text) 15%,transparent); padding:12px 19px; border-radius:30px; font-weight:600; }
.panel { position:fixed; z-index:10001; right:16px; top:calc(var(--site-header) + 12px); bottom:16px; width:min(470px,calc(100vw - 32px)); background:var(--bg); border:1px solid var(--line); border-radius:16px; box-shadow:0 12px 65px color-mix(in srgb,var(--site-text) 15%,transparent); display:flex; flex-direction:column; overflow:hidden; }
.head { padding:16px 18px 12px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:10px; }
.head strong { font-size:16px; }
.head .spacer { flex:1; }
.head a { font-size:12px; text-decoration:none; }
.head button { padding:5px 8px; font-size:12px; }
.status { padding:8px 18px; font-size:12px; color:var(--muted); background:var(--soft); }
.quote { margin:12px 18px 0; border-left:3px solid var(--site-primary); padding:7px 10px; background:var(--soft); font-size:12px; }
.quote summary { cursor:pointer; font-weight:600; }
.quote pre { white-space:pre-wrap; max-height:130px; overflow:auto; font:inherit; margin:6px 0; }
.messages { padding:16px 18px; flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; }
.empty { padding:28px 4px; }
.empty h2 { font-size:22px; line-height:1.4; margin:0 0 12px; }
.empty p { color:var(--muted); }
.quick { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.quick button { font-size:13px; text-align:left; }
.message { margin:0 0 22px; overflow-wrap:anywhere; }
.message .who { font-size:11px; font-weight:600; color:var(--muted); margin-bottom:6px; }
.message.user .body { white-space:pre-wrap; background:var(--site-primary-soft); padding:10px 13px; border-radius:10px; }
.body p { margin:8px 0; }
.body h1,.body h2,.body h3 { font-size:16px; margin:16px 0 8px; }
.body ul,.body ol { padding-left:22px; }
.body pre { padding:12px; overflow:auto; background:var(--site-code); border:1px solid var(--line); border-radius:8px; line-height:1.5; }
.body code { font:12px/1.6 var(--site-mono); background:var(--site-code); }
.body pre code { background:transparent; }
.body table { display:block; max-width:100%; overflow:auto; border-collapse:collapse; font-size:12px; }
.body th,.body td { border:1px solid var(--line); padding:7px; min-width:65px; text-align:left; }
.body th { background:var(--soft); }
.body blockquote { margin:10px 0; padding-left:12px; border-left:3px solid var(--line); color:var(--muted); }
.message .tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.message .tools button { font-size:12px; padding:4px 8px; }
.error { color:var(--site-danger); background:var(--site-danger-soft); padding:8px 10px; border-radius:6px; font-size:12px; white-space:pre-wrap; }
.composer { padding:12px 18px 16px; border-top:1px solid var(--line); }
textarea { width:100%; resize:vertical; min-height:78px; max-height:180px; border:1px solid var(--line); border-radius:9px; padding:10px; background:var(--bg); color:var(--fg); }
.compose-actions { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; margin-top:8px; }
.compose-actions small { font-size:11px; }
.progress { padding:0 18px 8px; font-size:12px; color:var(--muted); }
.selection { position:fixed; z-index:10002; padding:5px; display:flex; gap:3px; background:var(--bg); border:1px solid var(--line); border-radius:10px; box-shadow:0 5px 25px color-mix(in srgb,var(--site-text) 15%,transparent); max-width:calc(100vw - 20px); }
.selection button { font-size:12px; padding:6px 9px; border:0; white-space:nowrap; }
.notice { position:fixed; z-index:10004; bottom:90px; left:50%; transform:translateX(-50%); background:var(--site-text); color:var(--site-bg); border-radius:8px; padding:10px 16px; max-width:90vw; box-shadow:0 6px 20px color-mix(in srgb,var(--site-text) 15%,transparent); }
@media(max-width:767px) {
 .launch { right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); }
 .panel { left:0; right:0; top:auto; bottom:var(--keyboard,0px); width:100%; height:min(76dvh,var(--viewport,76dvh)); border-radius:16px 16px 0 0; }
 .head { padding:12px 14px; }
 .messages { padding:14px; }
 .composer { padding:10px 14px calc(12px + env(safe-area-inset-bottom)); }
 .selection { bottom:calc(76px + env(safe-area-inset-bottom)); left:50%!important; top:auto!important; transform:translateX(-50%); }
 textarea { font-size:16px; min-height:64px; }
 .head button,.compose-actions button,.message .tools button,.selection button { min-height:44px; }
 .selection { flex-wrap:wrap; justify-content:center; width:max-content; }
}
/* Assistant task hierarchy. */
.assistant-mark { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:var(--site-primary-soft); color:var(--site-primary-ink); font-size:19px; flex:none; }
.assistant-title { display:grid; gap:1px; }
.assistant-title strong { line-height:1.4; font-size:15px; }
.assistant-title small { font-size:10px; font-weight:400; }
.head { gap:8px; }
.quick { display:grid; grid-template-columns:1fr; gap:9px; }
.quick button { display:grid; gap:4px; width:100%; padding:13px 15px; border-radius:12px; background:var(--bg); }
.quick button:hover { border-color:var(--site-primary); background:var(--site-primary-soft); }
.quick button strong { font-weight:600; font-size:13px; color:var(--fg); }
.quick button small { font-size:12px; font-weight:400; }
.empty { padding:22px 2px; }
.empty h2 { font-size:23px; letter-spacing:-.03em; }
.empty p { font-size:13px; line-height:1.85; }
.status { border-bottom:1px solid var(--line); padding:10px 18px; }
@media(max-width:700px) {
 .head { flex-wrap:wrap; }
 .head .spacer { min-width:0; }
}

.ocr-icon { display:inline-block; width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; vertical-align:-.2em; pointer-events:none; }
.ocr-has-icon > .ocr-icon { margin-right:5px; }
.assistant-mark.ocr-has-icon > .ocr-icon { width:20px; height:20px; margin:0; }
.launch > .ocr-icon { width:18px; height:18px; margin-right:7px; }
@media(max-width:600px) { .head [data-new] > .ocr-icon { display:none; } }
