:root {
  color-scheme: light;
  --bg: #f6f8f6;
  --bg-2: #eef2ee;
  --card: #fff;
  --card-solid: #fff;
  --txt: #21332c;
  --sub: #68766f;
  --muted: #68766f;
  --line: #dce5df;
  --line-dim: #e6ece7;
  --blue: #287652;
  --blue2: #edf6f0;
  --blue3: #f5f9f6;
  --green: #287652;
  --green2: #edf6f0;
  --green3: #d4e8dc;
  --red: #a33a32;
  --red2: #fff1ef;
  --red3: #efd5d1;
  --amber: #9b701b;
  --amber2: #fff8e9;
  --amber3: #eadcbb;
  --purple: #2b6177;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
* { box-sizing: border-box; letter-spacing: 0; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--txt); }
body { font-size: 14px; line-height: 1.7; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid #83b998; outline-offset: 3px;
}
.hidden, [hidden] { display: none !important; }
.app-deco, .chat-deco, .auth-deco, #auth-particles, .auth-footer, #liveGate { display: none !important; }
header {
  height: 76px; background: #fff; border-bottom: 1px solid var(--line);
  padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.h-title { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; min-width: 0; }
.h-title small { display: block; color: var(--sub); font-size: 12px; font-weight: 400; }
.h-logo { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; }
.h-user { display: flex; align-items: center; gap: 16px; font-size: 12px; }
#me-badge { overflow-wrap: anywhere; }
.tabbar {
  display: flex; align-items: center; gap: 24px; padding: 0 max(32px, calc((100% - 1376px) / 2));
  overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line);
  scrollbar-width: thin; scrollbar-color: #cbd8cf transparent;
}
.tabbar button {
  flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  background: transparent; color: var(--sub); padding: 16px 0 13px; font-size: 13px; white-space: nowrap;
}
.tabbar button:hover { color: var(--green); }
.tabbar button.on { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.sellbar {
  display: flex; align-items: center; gap: 4px; min-height: 50px;
  padding: 9px max(32px, calc((100% - 1376px) / 2)); border-bottom: 1px solid var(--line);
}
.sb-label { font-size: 12px; color: var(--sub); margin-right: 12px; white-space: nowrap; }
.sb-btn { border: 1px solid transparent; background: transparent; color: var(--sub); border-radius: 4px; padding: 4px 13px; font-size: 12px; white-space: nowrap; }
.sb-btn.on { background: #e5efe8; color: #205f43; border-color: #d0e1d5; font-weight: 600; }
.sb-btn:hover { background: #edf3ee; }
.sellhint { display: none; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 32px 32px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.workspace-heading h1 { font-size: 25px; line-height: 1.4; margin: 0 0 6px; }
.workspace-heading p { margin: 0; font-size: 12px; color: var(--sub); }
.workspace-heading .heading-actions { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.heading-actions a { display: inline-flex; gap: 7px; align-items: center; border: 1px solid #cbd8cf; padding: 8px 12px; border-radius: 5px; background: #fff; color: var(--txt); white-space: nowrap; }
.heading-actions a:hover { background: #edf3ee; text-decoration: none; }
.icon { width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.btn, .chat-actions-bar button {
  display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  border: 1px solid var(--green); background: var(--green); color: #fff;
  padding: 10px 16px; border-radius: 5px; font-weight: 500; font-size: 14px;
  line-height: 1.5; width: 100%; margin-top: 14px; transition: background .15s;
}
.btn:hover { background: #1d6043; border-color: #1d6043; }
.btn.sm { width: auto; padding: 8px 12px; font-size: 12px; margin-top: 0; }
.btn.ghost, .btn.blue, .chat-actions-bar button {
  background: #fff; color: var(--txt); border-color: #cbd8cf;
}
.btn.ghost:hover, .btn.blue:hover, .chat-actions-bar button:hover { background: #edf3ee; }
.btn.danger { color: var(--red); background: #fff; border-color: #e2c8c4; }
.btn.danger:hover { background: var(--red2); }
.btn.on, .btn[aria-pressed=true] { color: var(--green); border-color: #83b998; background: var(--blue2); }
.icon-button { width: 36px !important; height: 36px; padding: 8px !important; flex: 0 0 36px; }
.link { color: var(--green); background: none; border: 0; font-size: 12px; padding: 5px 0; }
label { display: block; margin: 14px 0 5px; font-size: 12px; color: #4b5d51; }
input, select, textarea {
  width: 100%; min-width: 0; border: 1px solid #ccd6ce; background: #fff; color: var(--txt);
  border-radius: 4px; padding: 10px 11px; min-height: 42px; font-size: 14px;
}
textarea { min-height: 105px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #89958e; }
input:focus, select:focus, textarea:focus { outline: 2px solid #83b998; outline-offset: 1px; }
input[type=checkbox] { width: 17px; min-height: 17px; accent-color: var(--green); vertical-align: middle; flex: 0 0 auto; }
.hint, .mini-note, .adv { color: var(--sub); font-size: 12px; line-height: 1.8; margin: 6px 0; }
.field-err { color: var(--red); font-size: 12px; overflow-wrap: anywhere; }
.row, .sec-bar { display: flex; align-items: flex-end; gap: 12px; margin: 10px 0; }
.row > * { flex: 1; min-width: 0; }
.row > .btn { flex: 0 0 auto; width: auto; }
.sec-bar { align-items: center; flex-wrap: wrap; }
.stats { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 22px; }
.stat { flex: 1; min-width: 0; border-left: 3px solid #a5bbb0; padding: 0 16px; display: flex; flex-direction: column; }
.stat:first-child { border-color: var(--green); }
.stat:nth-child(2) { border-color: #2b6177; }
.stat:nth-child(3) { border-color: #a68035; }
.stat b { color: var(--txt); font-size: 26px; line-height: 1.4; font-variant-numeric: tabular-nums; order: 1; }
.stat span { color: var(--sub); font-size: 12px; margin-bottom: 7px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin-bottom: 16px; min-width: 0; }
.card .c-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.c-title { font-size: 16px; font-weight: 600; margin: 6px 0 10px; }
.c-body { color: #384e41; font-size: 14px; white-space: pre-wrap; line-height: 1.9; overflow-wrap: anywhere; }
.c-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-dim); color: var(--sub); font-size: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge, .pill { display: inline-block; border: 0; border-radius: 3px; padding: 3px 8px; color: var(--green); background: var(--blue2); font-size: 11px; }
.badge.sys { background: #f0f3f0; color: var(--sub); }
.badge.s { background: var(--amber2); color: var(--amber); }
.badge.red, .pill { background: var(--red2); color: var(--red); }
.badge.green { color: var(--green); background: var(--green2); }
.badge.blue { color: #2b6177; background: #edf3f7; }
.chip, .off-tab {
  border: 1px solid var(--line); background: #fff; color: #53665b; border-radius: 4px;
  padding: 6px 12px; font-size: 12px; cursor: pointer; line-height: 1.6; white-space: nowrap;
}
.chip:hover, .off-tab:hover { background: #edf3ee; }
.chip.on, .off-tab.on { background: #e5efe8; border-color: #b6d0bf; color: #205f43; font-weight: 600; }
details { background: transparent; border: 0; border-top: 1px solid var(--line); padding: 12px 0; margin-bottom: 16px; }
summary { list-style: none; cursor: pointer; color: var(--green); padding: 5px 0; font-weight: 600; font-size: 14px; }
summary::before { content: "+"; display: inline-block; width: 20px; }
details[open] > summary::before { content: "-"; }
summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 12px; }
.official { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; margin: 20px 0; }
.official .c-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.off-seg { margin: 0; padding: 10px 0; }
.off-seg:last-child { border-bottom: 0; }
.tbl-wrap { width: 100%; overflow-x: auto; margin: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.tbl { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; font-size: 13px; }
.tbl th { padding: 12px 14px; background: #eef2ee; color: #53665b; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tbl td { padding: 14px; border-bottom: 1px solid #edf0ed; color: #384e41; vertical-align: top; line-height: 1.9; }
.tbl tr:last-child td { border-bottom: 0; }
.off-tbl { table-layout: fixed; }
.off-tbl th { width: 50%; }
.off-tbl td.o-l { background: #fff; color: var(--txt); }
.off-tbl td.o-r { background: #f8faf8; color: #5b6c61; }
.tbl .t-time { color: var(--green); white-space: nowrap; font-weight: 600; }
.tbl .t-say { color: #53665b; }
.empty { color: var(--sub); text-align: center; padding: 48px 20px; font-size: 13px; }
.empty .btn { margin-top: 16px; }
.result-count { font-size: 12px; color: var(--sub); margin: 20px 0 12px; }
#script-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
#script-list .card { margin: 0; }
#script-list .empty { grid-column: 1 / -1; }
#sc-search { flex: 2; }
.library-filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: center; margin-bottom: 18px; }
.library-filters input, .library-filters select { font-size: 13px; }
.library-filters .btn { min-height: 42px; }
.banner, .cool, .algo-tip, .play-avoid, .scope-hint, .verdict-box, .verdict {
  background: var(--amber2); border: 0; border-left: 3px solid #c49b43;
  border-radius: 0; color: #755619; font-size: 12px; line-height: 1.9; padding: 12px 15px; margin: 12px 0;
}
.scope-hint, .algo-tip { background: var(--green2); border-color: var(--green); color: #346047; }
.scope-hint .tag { font-weight: 600; margin-right: 12px; }
.play-avoid, .verdict.warn, .verdict-box.bad { color: var(--red); background: var(--red2); border-color: var(--red); }
.play-avoid b { color: var(--red); }
.verdict.ok, .verdict-box.good { color: var(--green); background: var(--green2); border-color: var(--green); }
.hl { background: #ffe3dd; color: var(--red); border-radius: 2px; padding: 1px 3px; }
.guide h3, .play-h { font-size: 14px; color: var(--txt); margin: 16px 0 6px; font-weight: 600; }
.guide li, .play-steps li { color: #384e41; margin: 8px 0; }
.play-steps { padding-left: 22px; }
.play-script, .title-out { white-space: pre-wrap; line-height: 1.9; padding: 14px; background: #f5f8f5; border-left: 3px solid #b6ccbf; margin: 10px 0; overflow-wrap: anywhere; }
.play-ai, .tag-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pl-grid, .trend-grid, .kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
.pl-col, .trend-card, .kpi, .algo-block { background: #f1f5f1; padding: 16px; border: 0; border-radius: 4px; }
.pl-col h4, .algo-block h4, .rv-extracted h4 { margin: 0 0 10px; font-size: 14px; }
.pl-cant { background: #fff2ef; color: #8c3e36; }
.pl-can { background: #edf6f0; color: #346047; }
.pl-li { font-size: 13px; line-height: 1.9; }
.algo-block li b { color: var(--txt); }
.metric-row, .me-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.metric-row .m-name, .me-row span:first-child { color: var(--sub); font-size: 13px; }
.metric-row i { display: block; font-style: normal; color: var(--sub); font-size: 12px; }
.m-val { font-weight: 600; }
.m-val.good { color: var(--green); }
.m-val.bad { color: var(--red); }
.m-val.warn { color: var(--amber); }
.todo-item { display: flex; align-items: start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.todo-item label { margin: 0; }
.todo-item .t-txt { flex: 1; cursor: pointer; color: var(--txt); }
.todo-item.done .t-txt { color: var(--sub); text-decoration: line-through; }
.todo-item input { margin-top: 4px; }
.t-del { background: transparent; border: 0; color: var(--sub); }
.heat { display: flex; gap: 8px; margin: 16px 0; }
.heat .d { flex: 1; text-align: center; color: var(--sub); font-size: 11px; }
.heat .d b { display: block; height: 36px; background: #e9eeea; line-height: 36px; border-radius: 4px; margin-bottom: 6px; }
.heat .d.lv1 b { background: #dcebe0; }
.heat .d.lv2 b { background: #a4ccb2; }
.heat .d.lv3 b { background: var(--green); color: #fff; }
.heat .d.today b { outline: 2px solid var(--green); outline-offset: 2px; }
.progress { height: 7px; border-radius: 4px; overflow: hidden; background: #e8eee9; margin: 12px 0; }
.progress i { display: block; height: 100%; background: var(--green); }
.kpi b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi span, .t-last { font-size: 12px; color: var(--sub); }
.t-name { font-weight: 600; }
.chat-wrap { display: flex; flex-direction: column; height: calc(100dvh - 320px); min-height: 520px; max-width: 1100px; margin: 0 auto; }
#panel-chat > .banner { display: none !important; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.chat-model { font-size: 12px; color: var(--sub); display: flex; gap: 8px; align-items: center; }
.chat-toolbar .btn { padding: 5px 10px; }
.chat-history { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 12px 28px 0; display: flex; flex-direction: column; gap: 24px; scrollbar-gutter: stable; }
.chat-welcome { margin: auto; text-align: center; padding: 28px 0; }
.chat-welcome img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.chat-welcome h3 { font-size: 19px; margin: 12px 0 5px; font-weight: 600; }
.chat-welcome p { color: var(--sub); font-size: 13px; margin: 0; }
.chat-msg { display: flex; gap: 12px; max-width: 94%; min-width: 0; align-items: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; max-width: 82%; }
.chat-msg .avatar { width: 32px; height: 32px; flex: 0 0 32px; display: flex; align-items: center; justify-content: center; border-radius: 5px; background: #e1ece4; color: #346047; font-size: 11px; font-weight: 600; }
.chat-msg.ai .avatar { background: #fff; border: 1px solid var(--line); color: var(--green); }
.chat-msg .bubble { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; }
.chat-msg.ai .bubble { padding: 2px 0; }
.chat-msg.user .bubble { background: #e8f0ea; padding: 10px 15px; border-radius: 6px; white-space: pre-wrap; }
.bubble p { margin: 0 0 12px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble h1, .bubble h2, .bubble h3, .bubble h4, .bubble h5, .bubble h6 { font-size: 16px; margin: 20px 0 10px; line-height: 1.6; }
.bubble > :first-child { margin-top: 0; }
.bubble strong, .bubble b { color: var(--txt); font-weight: 600; }
.bubble ul, .bubble ol { margin: 8px 0 14px; padding-left: 24px; }
.bubble li { margin: 5px 0; }
.bubble pre { max-width: 100%; overflow-x: auto; background: #eef2ee; border: 1px solid var(--line); border-radius: 4px; padding: 14px; line-height: 1.6; white-space: pre; }
.bubble code { font-size: 12px; font-family: Consolas, monospace; background: #eef2ee; border-radius: 3px; padding: 2px 4px; }
.bubble pre code { padding: 0; background: transparent; }
.bubble blockquote { margin: 12px 0; border-left: 3px solid #a7bcb0; padding: 4px 14px; color: #53665b; }
.bubble .markdown-table { overflow-x: auto; max-width: 100%; margin: 12px 0; }
.bubble table { border-collapse: collapse; font-size: 13px; min-width: 360px; width: 100%; }
.bubble td, .bubble th { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.bubble th { background: #eef2ee; }
.bubble hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.chat-actions-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chat-actions-bar button { width: auto; font-size: 12px; padding: 5px 9px; margin: 0; }
.chat-input-area { background: #fff; border: 1px solid #cbd8cf; border-radius: 8px; padding: 16px; flex-shrink: 0; box-shadow: 0 3px 12px #21332c06; }
.chat-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chat-quick .chip { padding: 4px 10px; font-size: 12px; background: #f8faf8; }
.chat-quick button:nth-child(n+7) { display: none; }
.chat-toggles { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.chat-toggles .toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.chat-toggles .toggle input { margin: 0; }
.toggle-hint { display: none; }
.chat-box { display: flex; align-items: flex-end; gap: 12px; }
.chat-box textarea { border: 0; background: #fff; padding: 4px 0; min-height: 58px; max-height: 160px; resize: vertical; flex: 1; }
.chat-box textarea:focus { outline: none; }
.chat-input-area:focus-within { border-color: #83b998; box-shadow: 0 0 0 2px #83b99825; }
.chat-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chat-file-preview, .preview, .thumb-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chat-file-preview:empty { display: none; }
.chat-file-preview { margin-bottom: 12px; }
.chat-file-thumb, .preview .thumb { position: relative; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--bg-2); }
.chat-file-thumb img, .chat-file-thumb video, .preview img, .preview video { width: 100%; height: 100%; object-fit: cover; }
.remove { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border: 0; border-radius: 3px; color: var(--red); background: #fff; cursor: pointer; }
.thumb-row { margin: 12px 0; }
.thumb-row img, .thumb-row video { max-width: 100%; height: 100px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.preview .tag { position: absolute; bottom: 2px; left: 2px; font-size: 10px; background: #fff; }
.file-drop { border: 1px dashed #a9c1b2; padding: 24px; background: #f0f6f1; color: var(--sub); text-align: center; cursor: pointer; border-radius: 6px; margin-bottom: 12px; }
.file-drop.dragover { border-color: var(--green); background: #e5efe8; }
.rv-extracted { background: #edf6f0; padding: 16px; margin: 12px 0; }
.rv-extracted .kv { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.review-fields { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.ai-report { padding: 18px 0; margin-top: 16px; border-top: 1px solid var(--line); color: var(--txt); }
.ai-report h4 { margin: 16px 0 8px; font-size: 15px; }
.ai-report p { margin: 0 0 12px; color: #384e41; line-height: 1.9; }
#toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translateX(-50%); opacity: 0; pointer-events: none; color: #fff; background: #213c2e; padding: 12px 18px; border-radius: 6px; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 4px 24px #21332c26; font-size: 13px; transition: opacity .2s; }
#toast.show { opacity: 1; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: #162b2466; }
.modal-card { position: relative; width: min(640px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; max-height: 90dvh; overflow: auto; box-shadow: 0 20px 80px #12251e24; }
.modal-card h3 { margin: 0 0 18px; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-actions .btn { width: auto; margin-top: 0; }
.mg-item { background: #f1f5f1 !important; border-color: var(--line) !important; }
#acc-done { background: #edf6f0 !important; border-color: #a9c1b2 !important; }
#acc-done-info, #acc-done > div { color: var(--txt) !important; }
#rv-img-modal .modal-card { background: transparent; border: 0; box-shadow: none; padding: 0; width: auto; max-width: 96vw; }
#rv-img-modal img { max-width: 96vw; max-height: 88dvh; object-fit: contain; }
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px #21332c0a; }
.auth-logo-wrap { margin: 0 auto 18px; width: 56px; height: 56px; }
.auth-logo { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 7px; }
.brand { text-align: center; font-size: 22px; font-weight: 700; }
.brand-sub { text-align: center; font-size: 12px; color: var(--sub); margin: 6px 0 24px; }
.seg { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.seg button { flex: 1; border: 0; background: none; border-bottom: 2px solid transparent; padding: 10px 0; color: var(--sub); }
.seg button.on { color: var(--green); border-color: var(--green); font-weight: 600; }
.auth-trust { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; color: var(--sub); font-size: 12px; text-align: center; }
::-webkit-scrollbar { width: 7px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c6d3c9; border-radius: 4px; }
@media (max-width: 1000px) {
  #script-list { grid-template-columns: 1fr; }
  .library-filters { grid-template-columns: 1fr 1fr; }
  .library-filters #sc-search { grid-column: 1 / -1; }
  .chat-wrap { height: calc(100dvh - 320px); }
}
@media (max-width: 760px) {
  .review-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  header { height: auto; min-height: 76px; padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .h-title { font-size: 16px; }
  .h-user { gap: 10px; flex-wrap: wrap; }
  .h-user > a { display: none; }
  .h-user #me-badge { max-width: 180px; }
  .tabbar { gap: 24px; padding: 0 16px; }
  .tabbar button { padding: 13px 0 10px; }
  .sellbar { padding: 8px 16px; overflow: auto; }
  .wrap { padding: 22px 16px; }
  .workspace-heading { margin-bottom: 22px; align-items: start; }
  .workspace-heading h1 { font-size: 23px; }
  .heading-actions a { padding: 8px; }
  .heading-actions a span { display: none; }
  .stats { gap: 12px; }
  .stat { padding-left: 12px; padding-right: 0; }
  .stat b { font-size: 23px; }
  .stat span { font-size: 11px; }
  .row { flex-wrap: wrap; }
  .row > * { min-width: calc(50% - 6px); }
  .row > .btn { flex: 1; }
  .card { padding: 16px; }
  .pl-grid, .trend-grid, .kpi-grid { grid-template-columns: 1fr; }
  .chat-wrap { height: calc(100dvh - 320px); min-height: 480px; }
  .chat-history { padding-right: 0; gap: 20px; }
  .chat-msg { max-width: 100%; gap: 8px; }
  .chat-msg.user { max-width: 92%; }
  .chat-msg .avatar { width: 26px; height: 26px; flex-basis: 26px; font-size: 10px; }
  .chat-input-area { padding: 12px; }
  .chat-quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chat-quick button { flex: 0 0 auto; }
  .chat-box { flex-wrap: wrap; }
  .chat-box textarea { flex-basis: 100%; min-height: 58px; }
  .chat-actions { margin-left: auto; }
  .chat-toggles { margin: 8px 0; }
  .chat-toolbar { align-items: start; }
  .chat-model { font-size: 11px; }
  .tbl { min-width: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
