:root {
  --blue: #2d6cdf;
  --blue-dark: #1e4fb2;
  --blue-soft: #eaf1ff;
  --ink: #17253d;
  --muted: #6d7a90;
  --line: #e3e9f2;
  --canvas: #f5f8fc;
  --surface: #fff;
  --success: #23a56b;
  --warning: #e28b33;
  --danger: #d95967;
  --shadow: 0 12px 30px rgba(31, 59, 103, .08);
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 72px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 36px; position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: 0; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; background: var(--blue); display: grid; place-items: center; color: white; font-weight: 800; box-shadow: 0 6px 15px rgba(45,108,223,.25); }
.brand-logo-shell { position: relative; overflow: hidden; }
.brand-logo-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-logo-fallback { width: 100%; height: 100%; display: none; place-items: center; color: inherit; font: inherit; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 1px; letter-spacing: 0; }
.site-nav { display:flex; align-items:center; gap:4px; margin-left:28px; }
.site-nav-link { color:var(--muted); font-size:13px; padding:8px 11px; border-radius:7px; }
.site-nav-link:hover { color:var(--blue); background:var(--blue-soft); }
.site-nav-link.active { color:var(--blue); background:var(--blue-soft); font-weight:600; }
.topbar-spacer { flex: 1; }
.topbar-link { padding: 9px 12px; color: var(--muted); font-size: 13px; border-radius: 8px; }
.topbar-link:hover { color: var(--blue); background: var(--blue-soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #dce9ff; color: var(--blue-dark); display: grid; place-items: center; flex:0 0 32px; overflow:hidden; font-size: 12px; font-weight: 700; }
.avatar-image { display:block; width:100%; height:100%; object-fit:cover; background:#edf2f8; color:transparent; }
.avatar-image-shell { position:relative; overflow:hidden; }
.avatar-image-shell > .avatar-image { position:relative; z-index:1; }
.avatar-fallback { position:absolute; inset:0; display:grid; place-items:center; }
.avatar-guest { position:relative; background:#f1f4f8; color:#65758d; }
.avatar-guest::before { content:""; position:absolute; top:7px; left:11px; width:8px; height:8px; border:1.5px solid currentColor; border-radius:50%; }
.avatar-guest i { position:absolute; left:7px; bottom:5px; width:16px; height:8px; border:1.5px solid currentColor; border-bottom:0; border-radius:10px 10px 0 0; }
.auth-entry { display:inline-flex; align-items:center; gap:8px; border:1px solid transparent; background:transparent; color:#52627a; border-radius:9px; padding:4px 9px 4px 4px; font-size:12px; font-weight:600; transition:background .16s ease, border-color .16s ease, color .16s ease; }
.auth-entry:hover { background:#f6f8fc; border-color:#dbe4f0; color:var(--blue); }
.user-chip { display:inline-flex; align-items:center; gap:8px; border:1px solid transparent; background:transparent; color:var(--ink); border-radius:9px; padding:4px 9px 4px 4px; font-size:12px; transition:background .16s ease, border-color .16s ease, color .16s ease; }
.user-chip:hover { background:#f6f8fc; border-color:#dbe4f0; color:var(--blue); }
.user-chip-name { max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.settings-button { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.settings-button:hover { color: var(--blue); border-color: #aac5fb; background: var(--blue-soft); }

.market-shell { max-width: 1440px; margin: 0 auto; padding: 38px 36px 60px; }
.hero-row { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:28px; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; margin: 0; letter-spacing: -.04em; }
.hero-copy { color: var(--muted); font-size: 15px; margin: 12px 0 0; max-width: 580px; line-height: 1.7; }
.hero-stats { display:flex; gap: 8px; }
.stat { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 18px; min-width: 110px; }
.stat strong { display:block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 12px; }

.market-search-row { margin: 0 0 12px; }
.market-category-row { display:flex; align-items:center; min-height:40px; margin:0 0 14px; }
.search { width:100%; min-width:180px; position:relative; border:1px solid #b9c9df; border-radius:10px; background:var(--surface); box-shadow:0 3px 12px rgba(31,59,103,.06); transition:border-color .16s ease, box-shadow .16s ease; }
.search:focus-within { border-color:var(--blue); box-shadow:0 0 0 3px rgba(45,108,223,.13), 0 5px 16px rgba(31,59,103,.08); }
.search input { width:100%; border:0; outline:0; padding: 11px 14px 11px 38px; background:transparent; border-radius:9px; color:var(--ink); }
.search input::placeholder { color:#8795a9; }
.search-icon { position:absolute; left:13px; top:10px; color:#7286a2; font-size: 16px; pointer-events:none; }
.filter-pills { display:flex; gap:7px; flex-wrap:wrap; }
.pill { border:1px solid transparent; background:transparent; color:var(--muted); padding:8px 13px; border-radius:7px; font-size:13px; white-space:nowrap; }
.pill:hover { color:var(--blue); background:var(--blue-soft); }
.pill.active { background:var(--blue); color:#fff; box-shadow: 0 5px 12px rgba(45,108,223,.22); }

.section-label { display:flex; align-items:center; justify-content:flex-end; margin: 0 0 12px; min-height:18px; }
.section-label h2 { font-size: 15px; margin:0; }
.section-label span { font-size: 12px; color:var(--muted); }
.app-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.app-card { background:var(--surface); border:1px solid var(--line); border-radius: 12px; padding:18px; display:flex; flex-direction:column; min-height: 263px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.app-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(31,59,103,.12); border-color:#bed2fa; }
.app-head { display:flex; gap:12px; align-items:flex-start; }
.app-icon { width:48px; height:48px; flex:0 0 48px; border-radius: 12px; display:grid; place-items:center; color:white; font-size:20px; font-weight:800; }
.app-icon.orange { background:#ef9a45; } .app-icon.blue { background:#5c83ec; } .app-icon.teal { background:#35a999; } .app-icon.violet { background:#8b75de; } .app-icon.rose { background:#e97c93; }
.app-icon.icon-image-shell { overflow:hidden; padding:0; background:transparent !important; border-radius:10px; }
.app-icon-image { width:100%; height:100%; display:block; object-fit:contain; border-radius:inherit; background:transparent; }
.app-icon-fallback { width:100%; height:100%; display:none; place-items:center; color:#fff; font-size:20px; font-weight:800; }
.side-app .app-icon-fallback { color:#fff; font-size:16px; }
.app-title { flex:1; min-width:0; } .app-title h3 { font-size:15px; margin: 1px 0 5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .app-title p { margin:0; color:var(--muted); font-size:11px; }
.star { border:0; background:transparent; color:#9eb0c9; padding: 1px 0 0 8px; font-size:18px; line-height:1; } .star.active { color:#f2b13d; }
.tag-row { display:flex; gap:6px; flex-wrap:wrap; margin: 14px 0 9px; } .tag { padding:4px 7px; border-radius:5px; font-size:10px; background:#eef3fb; color:#6880a8; } .tag.accent { color:#b87124; background:#fff3df; }
.app-desc { color:#718097; font-size:12px; line-height:1.65; margin:0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.card-footer { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:auto; padding-top: 18px; }
.creator-row { margin-top:12px; min-height:26px; }
.card-creator { display:inline-flex; align-items:center; gap:7px; color:#74849a; font-size:11px; min-width:0; }
.creator-avatar { width:22px; height:22px; flex:0 0 22px; border-radius:50%; overflow:hidden; font-size:10px; }
.creator-avatar.brand-logo-shell { display:inline-grid; }
.creator-avatar .brand-logo-image { width:100%; height:100%; object-fit:cover; }
.creator-avatar .brand-logo-fallback { width:100%; height:100%; font-size:10px; }
.card-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.share-role { height:30px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; gap:5px; flex:0 0 auto; border:1px solid #c8d7eb; border-radius:7px; background:#fff; color:#5276b8; font-size:11px; font-weight:700; line-height:1; white-space:nowrap; transition:all .16s ease; }
.share-role span { font-size:15px; line-height:1; }
.share-role:hover { color:#fff; background:var(--blue); border-color:var(--blue); box-shadow:0 5px 12px rgba(45,108,223,.18); }
.use-count { color:#9aa8bb; font-size:11px; }
.btn { border:0; border-radius:7px; padding:9px 14px; font-size:12px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; gap:7px; transition: all .16s ease; }
.btn-primary { color:#fff; background:var(--blue); box-shadow:0 5px 12px rgba(45,108,223,.18); } .btn-primary:hover { background:var(--blue-dark); }
.btn-ghost { color:var(--blue); background:var(--blue-soft); } .btn-ghost:hover { background:#dce8ff; }
.btn-outline { color:var(--blue); background:#fff; border:1px solid #9dbbf7; } .btn-outline:hover { background:var(--blue-soft); }
.btn-danger { color:#c84c5d; background:#fff0f1; } .btn-danger:hover { background:#ffe2e5; }
.btn-sm { padding:7px 10px; font-size:11px; }
.empty-state { grid-column:1/-1; border:1px dashed #cdd8e8; border-radius:12px; padding:60px 20px; text-align:center; color:var(--muted); }

.spaces-shell { max-width:1440px; margin:0 auto; padding:32px 36px 60px; }
.spaces-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.spaces-toolbar .search { max-width:420px; }
.spaces-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.spaces-heading { margin:34px 0 20px; }
.spaces-heading h1 { font-size:30px; }
.spaces-heading p:not(.eyebrow) { margin:8px 0 0; color:var(--muted); font-size:13px; }
.spaces-grid .app-card { min-height:284px; }
.spaces-grid .card-footer { align-items:flex-start; flex-direction:column; }
.spaces-grid .card-actions { flex-wrap:wrap; }
.spaces-empty { max-width:460px; margin:100px auto; padding:34px; border:1px solid var(--line); border-radius:10px; text-align:center; background:#fff; }
.spaces-empty h1 { font-size:25px; }
.spaces-empty p { color:var(--muted); line-height:1.7; margin:12px 0 22px; }
.space-publish { display:flex; align-items:center; gap:11px; margin:4px 0 18px; padding:12px; border:1px solid var(--line); border-radius:8px; background:#fbfcfe; cursor:pointer; }
.space-publish input { width:17px; height:17px; accent-color:var(--blue); }
.space-publish strong, .space-publish small { display:block; }
.space-publish strong { font-size:12px; color:var(--ink); }
.space-publish small { margin-top:4px; font-size:10px; color:var(--muted); }

.chat-shell { display:grid; grid-template-columns: 270px minmax(0,1fr); min-height: calc(100vh - 72px); max-width: 1440px; margin:0 auto; }
.chat-side { background:#f9fbfe; border-right:1px solid var(--line); padding:24px 18px; }
.back-link { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; margin-bottom: 28px; } .back-link:hover { color:var(--blue); }
.chat-history-actions { display:flex; gap:8px; margin:-10px 0 18px; }
.chat-history-actions .btn { flex:1; min-width:0; white-space:nowrap; }
.chat-history-list { display:flex; flex-direction:column; gap:7px; }
.chat-history-item { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-size:12px; text-align:left; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-history-item:hover, .chat-history-item.active { border-color:#9dbbf7; background:var(--blue-soft); color:var(--blue); }
.chat-history-empty { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.side-app { display:flex; gap:11px; align-items:center; padding: 13px 10px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.side-app .app-icon { width:40px; height:40px; flex-basis:40px; font-size:16px; border-radius:10px; } .side-app strong { font-size:13px; display:block; } .side-app span { color:var(--muted); font-size:11px; }
.chat-note { border-top:1px solid var(--line); margin-top:24px; padding-top:20px; color:var(--muted); font-size:12px; line-height:1.7; }
.chat-main { display:flex; flex-direction:column; min-width:0; background:#fff; }
.chat-top { padding: 22px 34px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:14px; } .chat-top h1 { font-size:19px; letter-spacing:-.02em; } .chat-top p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.chat-model-control { display: grid; grid-template-columns: auto minmax(130px, 180px); align-items: center; gap: 5px 8px; }
.chat-model-control label { color: var(--muted); font-size: 11px; }
.chat-model-control select { border: 1px solid #d6e0ee; border-radius: 6px; color: var(--ink); background: #fff; padding: 7px 8px; font-size: 11px; outline: 0; }
.chat-model-control select:focus { border-color: #8fb1f5; box-shadow: 0 0 0 3px #e9f0ff; }
.connection-label { grid-column: 2; color: var(--success); font-size: 10px; }
.connection-label.error { color:var(--danger); }
.chat-messages { flex:1; overflow:auto; padding: 34px max(24px, calc((100% - 860px)/2)); background:#fbfcfe; }
.welcome { max-width:680px; margin:0 auto 28px; padding:24px; border:1px solid var(--line); border-radius:12px; background:#fff; } .welcome h2 { margin:0 0 10px; font-size:19px; } .welcome p { margin:0; color:var(--muted); font-size:13px; line-height:1.7; }
.message { display:flex; gap:10px; margin: 18px auto; max-width: 780px; } .message.user { flex-direction:row-reverse; } .message-avatar { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; flex:0 0 30px; background:#e3edff; color:var(--blue); font-size:11px; font-weight:700; } .message.user .message-avatar { background:var(--blue); color:#fff; }
.bubble { max-width:70%; min-width:0; border:1px solid var(--line); padding:12px 15px; border-radius:5px 12px 12px 12px; color:#344258; font-size:13px; line-height:1.7; background:#fff; white-space:normal; overflow-wrap:anywhere; }
.message.assistant .bubble { width:fit-content; max-width:min(100%,720px); }
.message.user .bubble { background:var(--blue); border-color:var(--blue); color:#fff; border-radius:12px 5px 12px 12px; }
.message-plain { white-space:pre-wrap; }
.markdown-content { color:#2e3d55; white-space:normal; }
.markdown-content > :first-child { margin-top:0; }
.markdown-content > :last-child { margin-bottom:0; }
.markdown-content p { margin:0 0 10px; }
.markdown-content h2, .markdown-content h3, .markdown-content h4 { margin:18px 0 8px; color:#182842; line-height:1.4; letter-spacing:0; }
.markdown-content h2 { font-size:17px; }
.markdown-content h3 { font-size:15px; }
.markdown-content h4 { font-size:14px; }
.markdown-content ul, .markdown-content ol { margin:7px 0 12px; padding-left:22px; }
.markdown-content li { margin:3px 0; padding-left:2px; }
.markdown-content a { color:var(--blue); text-decoration:underline; text-decoration-color:#a9c4f7; text-underline-offset:3px; }
.markdown-content a:hover { color:var(--blue-dark); text-decoration-color:currentColor; }
.markdown-content code { padding:2px 5px; border:1px solid #dce5f1; border-radius:4px; background:#f2f5f9; color:#bd3d58; font-family:Consolas,"Courier New",monospace; font-size:.92em; }
.markdown-content blockquote { margin:10px 0; padding:8px 12px; border-left:3px solid #8eb1ef; background:#f5f8fd; color:#5c6e88; }
.markdown-content hr { height:1px; margin:16px 0; border:0; background:#e2e8f1; }
.md-code { max-width:100%; margin:10px 0 12px; overflow:hidden; border:1px solid #253552; border-radius:7px; background:#142038; color:#e9eef7; }
.md-code-head { height:34px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 11px; border-bottom:1px solid #2c3d5c; background:#1b2a45; color:#aebbd0; font-size:10px; text-transform:lowercase; }
.md-code-head button { border:0; border-radius:4px; padding:4px 7px; background:#293b5d; color:#dce5f3; font-size:10px; }
.md-code-head button:hover { background:#375078; color:#fff; }
.md-code-head button:disabled { cursor:default; opacity:.75; }
.md-code pre { max-width:100%; margin:0; padding:13px 14px; overflow:auto; white-space:pre; line-height:1.6; tab-size:2; }
.md-code pre code { padding:0; border:0; border-radius:0; background:transparent; color:inherit; font-family:Consolas,"Courier New",monospace; font-size:12px; }
.md-table-wrap { max-width:100%; margin:10px 0 13px; overflow-x:auto; border:1px solid #dce4ef; border-radius:6px; }
.md-table-wrap table { width:100%; min-width:420px; }
.md-table-wrap th, .md-table-wrap td { padding:9px 11px; border-right:1px solid #e7ecf3; border-bottom:1px solid #e7ecf3; font-size:11px; line-height:1.55; vertical-align:top; }
.md-table-wrap th { background:#f4f7fb; color:#53647d; font-weight:700; }
.md-table-wrap tr:last-child td { border-bottom:0; }
.md-table-wrap th:last-child, .md-table-wrap td:last-child { border-right:0; }
.md-image-link { display:block; width:fit-content; max-width:100%; margin:9px 0; text-decoration:none !important; }
.md-image { display:block; width:auto; max-width:100%; max-height:440px; border:1px solid #dce4ef; border-radius:7px; object-fit:contain; background:#f7f9fc; }
.chat-compose { border-top:1px solid var(--line); padding: 16px max(24px, calc((100% - 860px)/2)); background:#fff; } .quick-prompts { display:flex; gap:7px; flex-wrap:wrap; margin-bottom:10px; } .quick { border:1px solid #d9e4f5; border-radius:6px; padding:7px 10px; background:#f8faff; color:#5e7294; font-size:11px; } .quick:hover { color:var(--blue); border-color:#aac5fb; }
.chat-request-error { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:11px; margin:0 0 12px; padding:11px 12px; border:1px solid #f0bec5; border-radius:8px; background:#fff5f6; color:#8f3947; }
.chat-request-error-icon { width:26px; height:26px; display:grid; place-items:center; border-radius:50%; background:#cf5264; color:#fff; font-size:14px; font-weight:800; }
.chat-request-error-copy { min-width:0; }
.chat-request-error-copy strong { display:block; margin-bottom:3px; color:#9f3244; font-size:12px; }
.chat-request-error-copy p { margin:0; color:#985464; font-size:11px; line-height:1.55; overflow-wrap:anywhere; }
.chat-request-error .btn { white-space:nowrap; border-color:#dda1ab; color:#a13d4d; background:#fff; }
.chat-request-error-close { width:26px; height:26px; border:0; border-radius:5px; background:transparent; color:#b06c77; font-size:18px; line-height:1; }
.chat-request-error-close:hover { background:#f8dfe3; color:#933747; }
.pending-files { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 10px; }
.pending-file { display:flex; align-items:center; gap:7px; max-width:240px; border:1px solid #d9e4f5; border-radius:8px; padding:5px 7px; background:#f8faff; color:#526681; font-size:11px; }
.pending-file img { width:28px; height:28px; object-fit:cover; border-radius:5px; }
.file-glyph { width:28px; height:28px; display:grid; place-items:center; border-radius:5px; background:#e8effb; color:var(--blue); font-size:14px; }
.pending-file-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pending-file small { color:#93a1b4; white-space:nowrap; }
.remove-file { border:0; background:transparent; color:#93a1b4; font-size:16px; line-height:1; padding:2px; }
.remove-file:hover { color:var(--danger); }
.composer { display:flex; align-items:flex-end; gap:10px; border:1px solid #cbd8ea; border-radius:10px; padding:8px; } .composer textarea { flex:1; min-height:42px; max-height:130px; resize:vertical; border:0; outline:0; padding:7px; color:var(--ink); font-size:13px; } .composer-actions { display:flex; flex-direction:column; align-items:stretch; gap:4px; } .send-btn { width:40px; height:40px; padding:0; } .clear-draft-btn { width:40px; height:20px; border:0; border-radius:5px; background:#f0f4fb; color:#71829e; font-size:17px; line-height:1; padding:0; } .clear-draft-btn:hover:not(:disabled) { background:#fcebed; color:var(--danger); } .clear-draft-btn:disabled { cursor:not-allowed; opacity:.45; }
.attach-btn { width:40px; height:40px; border:0; border-radius:7px; background:#f0f4fb; color:#6a7d9b; font-size:20px; line-height:1; }
.attach-btn:hover { color:var(--blue); background:var(--blue-soft); }
.stop-btn { height:40px; }
.upload-hint { color:#9aa8bb; font-size:10px; margin-top:8px; }
.message-attachments { display:flex; max-width:100%; flex-wrap:wrap; gap:8px; margin-top:12px; padding-top:10px; border-top:1px solid #e7ecf3; }
.message-image-link { display:block; max-width:100%; overflow:hidden; border:1px solid #dce4ef; border-radius:7px; background:#f7f9fc; }
.message-image { display:block; width:auto; max-width:320px; max-height:240px; object-fit:contain; }
.message-file { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:9px; width:min(100%,330px); min-height:52px; padding:7px 9px; border:1px solid #dce5f1; border-radius:7px; background:#f7f9fc; color:#50627c; font-size:11px; }
a.message-file:hover { border-color:#a9c3f4; background:#f0f5ff; }
.message-file-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:5px; background:#e4edfb; color:#3565b7; font-size:9px; font-weight:800; }
.message-file-copy { min-width:0; }
.message-file-copy strong, .message-file-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-file-copy strong { color:#33445d; font-size:11px; }
.message-file-copy small { margin-top:2px; color:#8b9ab0; font-size:9px; }
.message-file-action { color:var(--blue); font-size:10px; font-weight:700; }
.typing-cursor { color:var(--blue); animation:blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity:0; } }

.admin-shell { display:flex; min-height:calc(100vh - 72px); max-width: 1440px; margin:0 auto; }
.admin-side { width:230px; background:#12213b; color:#d8e2f3; padding:24px 14px; display:flex; flex-direction:column; }
.admin-brand { display:flex; align-items:center; gap:10px; padding: 0 10px 27px; color:#fff; font-size:16px; font-weight:700; } .admin-brand .brand-mark { width:29px; height:29px; border-radius:8px; font-size:13px; }
.admin-label { color:#8396b6; font-size:10px; letter-spacing:.08em; padding:0 11px; margin: 12px 0 8px; text-transform:uppercase; }
.admin-nav { display:flex; flex-direction:column; gap:3px; } .admin-nav button { text-align:left; color:#aebed7; background:transparent; border:0; border-radius:7px; padding:11px 12px; font-size:13px; } .admin-nav button:hover { background:#1d3154; color:#fff; } .admin-nav button.active { background:var(--blue); color:#fff; }
.admin-side-bottom { margin-top:auto; border-top:1px solid #253752; padding:18px 9px 0; color:#8da0bd; font-size:11px; line-height:1.7; }
.admin-content { flex:1; min-width:0; padding: 30px 34px 60px; }
.admin-top { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom: 26px; } .admin-top h1 { font-size:25px; } .admin-top p { color:var(--muted); font-size:12px; margin:8px 0 0; }
.metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:22px; } .metric { background:#fff; border:1px solid var(--line); border-radius:10px; padding:17px; } .metric span { color:var(--muted); font-size:11px; } .metric strong { display:block; font-size:25px; margin-top:7px; } .metric em { color:var(--success); font-size:11px; font-style:normal; }
.panel { background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden; } .panel-head { display:flex; justify-content:space-between; align-items:center; padding:17px 18px; border-bottom:1px solid var(--line); } .panel-head h2 { margin:0; font-size:14px; } .panel-head span { font-size:11px; color:var(--muted); }
.table-wrap { overflow:auto; } table { border-collapse:collapse; width:100%; min-width:700px; } th, td { padding:14px 16px; border-bottom:1px solid #edf1f6; text-align:left; font-size:12px; vertical-align:middle; } th { color:#8290a4; font-weight:500; background:#fbfcfe; font-size:11px; } tbody tr:last-child td { border-bottom:0; } td strong { font-size:12px; } .table-sub { color:var(--muted); font-size:10px; margin-top:3px; } .status { display:inline-flex; align-items:center; gap:5px; font-size:11px; padding:4px 8px; border-radius:20px; } .status::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; } .status.on { color:var(--success); background:#eaf9f1; } .status.off { color:#a4afbe; background:#f0f3f7; }
.model-id { color: #536b91; background: #f3f6fb; border-radius: 5px; padding: 4px 6px; font-size: 11px; }
.login-shell { min-height:calc(100vh - 72px); display:grid; place-items:center; padding:30px; background:linear-gradient(135deg,#f5f8ff 0%,#f5f8fc 58%,#edf4ff 100%); } .login-card { width:min(420px,100%); background:#fff; border:1px solid var(--line); border-radius:14px; padding:34px; box-shadow:var(--shadow); } .login-card h1 { font-size:25px; } .login-card p { color:var(--muted); font-size:13px; line-height:1.7; margin:11px 0 25px; } .field { margin-bottom:16px; } .field label { display:block; font-size:11px; color:#65758d; margin-bottom:7px; } .field input, .field textarea, .field select { width:100%; border:1px solid #d6e0ee; border-radius:7px; padding:10px 11px; outline:0; color:var(--ink); background:#fff; } .field input:focus, .field textarea:focus, .field select:focus { border-color:#8fb1f5; box-shadow:0 0 0 3px #e9f0ff; } .field textarea { min-height:80px; resize:vertical; } .field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; } .login-actions { display:flex; justify-content:flex-end; align-items:center; margin-top:21px; } .hint { color:#a3adbb; font-size:11px; }
.api-key-row { display:flex; align-items:center; gap:8px; }
.api-key-row input { flex:1; min-width:0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing:.02em; }
.api-key-link { margin-top:9px; text-decoration:none; }
.panel-form { padding:20px 18px 22px; max-width:560px; }
.admin-count-badge { align-self:flex-start; padding:8px 11px; border-radius:7px; background:#eaf1ff; color:var(--blue); font-size:11px; font-weight:700; }
.email-settings-form { display:grid; gap:16px; }
.email-panel { overflow:visible; }
.email-form-body { padding:20px 18px 4px; }
.email-result-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.settings-toggle-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:18px; }
.setting-toggle { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; border:1px solid var(--line); border-radius:8px; background:#fbfcfe; cursor:pointer; }
.setting-toggle > span { min-width:0; }
.setting-toggle strong, .setting-toggle small { display:block; }
.setting-toggle strong { color:var(--ink); font-size:12px; }
.setting-toggle small { margin-top:5px; color:var(--muted); font-size:10px; line-height:1.5; }
.setting-toggle input { position:absolute; opacity:0; pointer-events:none; }
.setting-toggle i { position:relative; width:38px; height:22px; flex:0 0 38px; border-radius:20px; background:#c7d1df; transition:.18s ease; }
.setting-toggle i::after { content:''; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(15,35,64,.25); transition:.18s ease; }
.setting-toggle input:checked + i { background:var(--blue); }
.setting-toggle input:checked + i::after { transform:translateX(16px); }
.setting-toggle input:focus-visible + i { box-shadow:0 0 0 3px #dce8ff; }
.email-save-bar { position:sticky; bottom:12px; z-index:4; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; border:1px solid #d2deed; border-radius:9px; background:rgba(255,255,255,.96); box-shadow:0 10px 30px rgba(29,59,104,.12); }
.email-save-bar span { color:var(--muted); font-size:11px; }
.admin-notice { margin:18px; }
.workflow-admin-top { margin-bottom:16px; }
.workflow-admin-form { gap:12px; }
.workflow-admin-grid, .workflow-admin-prompt-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.workflow-admin-section { overflow:hidden; }
.workflow-admin-section > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; list-style:none; cursor:pointer; }
.workflow-admin-section > summary::-webkit-details-marker { display:none; }
.workflow-admin-section > summary span, .workflow-admin-section > summary strong, .workflow-admin-section > summary small { display:block; min-width:0; }
.workflow-admin-section > summary strong { color:var(--ink); font-size:12px; }
.workflow-admin-section > summary small { margin-top:3px; color:var(--muted); font-size:9px; }
.workflow-admin-section > summary b { flex:0 0 auto; color:var(--blue); font-size:10px; font-weight:700; }
.workflow-admin-section[open] > summary { border-bottom:1px solid var(--line); }
.workflow-admin-section .email-form-body { padding:12px 13px 3px; }
.prompt-section textarea { min-height:210px; font-size:11px; line-height:1.55; }
.batch-admin-model-groups { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.batch-admin-model-groups h3 { margin:0 0 9px; color:var(--ink); font-size:12px; }
.batch-admin-model-list { display:grid; gap:7px; }
.batch-admin-model { display:flex; align-items:center; gap:9px; min-height:48px; padding:9px 11px; border:1px solid var(--line); border-radius:7px; background:#fbfcfe; cursor:pointer; }
.batch-admin-model input { width:15px; height:15px; accent-color:var(--blue); }
.batch-admin-model span, .batch-admin-model strong, .batch-admin-model small { display:block; min-width:0; }
.batch-admin-model strong { color:var(--ink); font-size:11px; }
.batch-admin-model small { margin-top:3px; overflow:hidden; color:var(--muted); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.batch-admin-fields { display:grid; gap:10px; }
.batch-admin-field { padding:0; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#fbfcfe; }
.batch-admin-field-summary { display:grid; grid-template-columns:28px minmax(0,1fr) auto auto; align-items:center; gap:9px; padding:8px 10px; list-style:none; cursor:pointer; }
.batch-admin-field-summary::-webkit-details-marker { display:none; }
.batch-admin-field-summary > span:nth-child(2), .batch-admin-field-summary strong, .batch-admin-field-summary small { display:block; min-width:0; }
.batch-admin-field-summary strong { color:var(--ink); font-size:11px; }
.batch-admin-field-summary small { margin-top:2px; overflow:hidden; color:var(--muted); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.batch-admin-field-index { color:#8da8d1; font-size:10px; text-align:center; }
.batch-admin-field-body { padding:10px; border-top:1px solid var(--line); }
.batch-admin-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px 12px; }
.batch-admin-field-grid .field { margin:0; }
.batch-admin-field-wide { grid-column:1 / -1; }
.batch-admin-options[hidden] { display:none; }
.batch-admin-field-switches { display:flex; flex-wrap:wrap; gap:18px; margin-top:11px; padding-top:10px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.batch-admin-field-switches label { display:flex; align-items:center; gap:6px; cursor:pointer; }
.batch-admin-field-switches input { accent-color:var(--blue); }
.clone-admin-toggle-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
.clone-admin-toggle-grid .setting-toggle { min-height:60px; padding:10px; }
.clone-admin-limit-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.clone-admin-limit-grid .field { margin:0; }
@media (max-width: 900px) { .workflow-admin-grid, .workflow-admin-prompt-grid { grid-template-columns:1fr; } .clone-admin-limit-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 760px) { .batch-admin-model-groups, .batch-admin-field-grid, .clone-admin-toggle-grid { grid-template-columns:1fr; } .batch-admin-field-wide { grid-column:auto; } }
@media (max-width: 560px) { .batch-admin-field-summary { grid-template-columns:24px minmax(0,1fr) auto; } .batch-admin-field-summary .btn { grid-column:2; justify-self:start; } .clone-admin-limit-grid { grid-template-columns:1fr 1fr; } }
.branding-preview { display:flex; align-items:center; gap:11px; padding:14px; margin-bottom:20px; border:1px solid var(--line); border-radius:9px; background:#f8faff; }
.branding-preview .brand-mark { width:38px; height:38px; border-radius:10px; font-size:16px; }
.branding-preview strong, .branding-preview span { display:block; }
.branding-preview strong { font-size:14px; }
.branding-preview div span { margin-top:3px; color:var(--muted); font-size:10px; }
.branding-avatar-preview { display:flex; align-items:center; gap:22px; padding:0 2px 18px; }
.branding-avatar-preview > div { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; }
.branding-avatar { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:50%; background:#e3edff; color:var(--blue); font-size:11px; font-weight:700; }
.modal-backdrop { position:fixed; inset:0; background:rgba(14,28,49,.55); display:grid; place-items:center; z-index:40; padding:18px; } .modal { width:min(640px,100%); max-height:calc(100vh - 36px); overflow:auto; background:#fff; border-radius:13px; box-shadow:0 24px 70px rgba(10,28,57,.24); } .modal-head { display:flex; align-items:center; justify-content:space-between; padding:20px 22px 16px; border-bottom:1px solid var(--line); } .modal-head h2 { margin:0; font-size:16px; } .modal-kicker { margin: 5px 0 0; color: var(--muted); font-size: 11px; } .close { border:0; background:#f2f5f9; color:#708099; border-radius:6px; width:28px; height:28px; } .modal-body { padding:20px 22px; } .modal-foot { display:flex; justify-content:flex-end; gap:8px; padding:15px 22px 20px; border-top:1px solid var(--line); }
.notice { padding:10px 12px; border-radius:7px; background:#fff5e8; color:#9b6a27; font-size:11px; margin-bottom:15px; } .error { color:var(--danger); font-size:11px; margin-top:8px; } .field-help { color: var(--muted); font-size: 11px; line-height: 1.7; margin: -2px 0 0; }
.auth-switch { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:4px; color:var(--muted); font-size:11px; }
.profile-summary { display:flex; align-items:center; gap:16px; padding:16px; border:1px solid var(--line); border-radius:9px; background:#f8faff; }
.profile-avatar-wrap { position:relative; width:72px; height:72px; flex:0 0 72px; }
.profile-avatar { width:72px; height:72px; display:grid; place-items:center; border-radius:50%; overflow:hidden; object-fit:cover; background:var(--blue); color:#fff; font-size:22px; font-weight:700; border:3px solid #fff; box-shadow:0 4px 14px rgba(31,59,103,.16); }
.avatar-edit-button { position:absolute; right:-1px; bottom:-1px; width:25px; height:25px; display:grid; place-items:center; border:2px solid #fff; border-radius:50%; background:var(--blue); color:#fff; padding:0; font-size:12px; box-shadow:0 3px 8px rgba(31,59,103,.2); }
.avatar-edit-button:hover { background:var(--blue-dark); }
.profile-main { min-width:0; flex:1; }
.profile-main strong, .profile-main > span { display:block; }
.profile-main > span { margin-top:4px; color:var(--muted); font-size:11px; }
.profile-avatar-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.profile-avatar-help { margin:9px 2px 2px; }
.profile-id { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid #edf1f6; font-size:12px; }
.profile-id span { color:var(--muted); }
.profile-id code { color:#536b91; font-size:11px; overflow-wrap:anywhere; }
.profile-actions { margin:16px -22px -20px; }
.profile-actions-spacer { flex:1; }
.auth-form-intro { display:flex; align-items:center; gap:11px; margin-bottom:18px; padding:12px; border:1px solid #e5ebf4; border-radius:8px; background:#f8faff; }
.auth-form-icon { width:34px; height:34px; display:grid; place-items:center; flex:0 0 34px; border-radius:50%; background:#e7efff; color:var(--blue); font-size:15px; font-weight:700; }
.auth-form-intro > div strong, .auth-form-intro > div span { display:block; }
.auth-form-intro > div strong { font-size:12px; }
.auth-form-intro > div span { margin-top:3px; color:var(--muted); font-size:10px; }
.auth-switch-button { border:0; background:transparent; color:var(--blue); padding:4px 0; font-size:11px; font-weight:600; }
.auth-switch-button:hover { color:var(--blue-dark); text-decoration:underline; }
.auth-submit { min-width:86px; }
.activation-modal { width:min(500px,100%); }
.activation-body { text-align:center; padding:28px 30px 24px; }
.activation-icon { width:48px; height:48px; margin:0 auto 16px; display:grid; place-items:center; border-radius:50%; background:#e7f7ef; color:#168a55; font-size:24px; font-weight:800; }
.activation-body h3 { margin:0 0 10px; font-size:18px; color:#213452; }
.activation-body > p { margin:0 auto; max-width:390px; color:#596b84; font-size:12px; line-height:1.8; }
.activation-body > p strong { color:#213452; overflow-wrap:anywhere; }
.activation-hint { margin-top:18px; padding:11px 12px; border:1px solid #dfe8f4; border-radius:7px; background:#f7f9fc; color:#718199; font-size:11px; line-height:1.65; text-align:left; }
.activation-modal .modal-foot { justify-content:center; }
.footer { text-align:center; padding:22px; color:#99a6b8; font-size:11px; }
.toast { position:fixed; left:50%; bottom:26px; z-index:80; transform:translate(-50%, 16px); opacity:0; pointer-events:none; padding:10px 16px; border-radius:8px; color:#fff; background:#213452; box-shadow:0 10px 25px rgba(16,37,71,.2); font-size:12px; transition:opacity .2s ease, transform .2s ease; }
.toast.show { opacity:1; transform:translate(-50%, 0); }
.toast.error { background:#c84c5d; color:#fff; }
.toast.success { display:flex; align-items:center; gap:10px; padding:14px 20px; border-radius:12px; color:#26372f; background:#fff; box-shadow:0 14px 36px rgba(25,54,42,.18); font-size:13px; font-weight:700; }
.toast.success::before { content:'✓'; width:22px; height:22px; flex:0 0 22px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#20a464; font-size:13px; font-weight:800; }
@media (max-width: 1100px) { .app-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .hero-row { align-items:flex-start; flex-direction:column; } }
@media (max-width: 820px) { .topbar { padding:0 18px; } .site-nav { margin-left:12px; gap:0; } .site-nav-link { padding:7px 8px; font-size:12px; } .topbar-link { display:none; } .auth-entry > span:last-child, .user-chip-name { display:none; } .auth-entry, .user-chip { padding:3px; border:0; } .market-shell, .spaces-shell { padding:26px 18px 45px; } .market-search-row { margin-bottom:10px; } .market-category-row { align-items:flex-start; } .spaces-toolbar { align-items:stretch; flex-direction:column; } .spaces-toolbar .search { max-width:none; } .spaces-actions { justify-content:flex-start; } .app-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .chat-shell { grid-template-columns:1fr; } .chat-side { display:none; } .chat-top { padding:18px; flex-wrap:wrap; } .chat-model-control { margin-left:auto; } .chat-messages, .chat-compose { padding-left:18px; padding-right:18px; } .admin-side { width:66px; padding:16px 8px; } .admin-brand { padding:0 8px 26px; } .admin-brand span, .admin-label, .admin-side-bottom, .admin-nav button { font-size:0; } .admin-nav button { text-align:center; padding:12px 5px; } .admin-nav button::first-letter { font-size:17px; } .admin-content { padding:24px 18px 45px; } .metrics { grid-template-columns:repeat(2,1fr); } .settings-toggle-grid { grid-template-columns:1fr; } .email-result-grid { grid-template-columns:1fr; } }
@media (max-width: 520px) { .app-grid { grid-template-columns:1fr; } .hero-stats { width:100%; } .stat { flex:1; min-width:0; } .field-row { grid-template-columns:1fr; gap:0; } .login-card { padding:25px 20px; } .bubble { max-width:calc(100vw - 100px); } .chat-request-error { grid-template-columns:auto minmax(0,1fr) auto; } .chat-request-error .btn { grid-column:2; justify-self:start; } .chat-request-error-close { grid-column:3; grid-row:1; } }

.batch-shell { max-width:1440px; margin:0 auto; padding:30px 36px 60px; }
.batch-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.batch-page-head h1 { font-size:30px; letter-spacing:-.03em; }
.batch-page-head p:not(.eyebrow) { margin:8px 0 0; color:var(--muted); font-size:13px; }
.batch-status { display:flex; align-items:center; gap:8px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); font-size:11px; white-space:nowrap; }
.batch-status i { width:7px; height:7px; border-radius:50%; background:#aeb9c9; }
.batch-status i.designing, .batch-status i.generating { background:var(--warning); box-shadow:0 0 0 4px #fff2df; }
.batch-status i.ready, .batch-status i.done { background:var(--success); }
.batch-status i.error { background:var(--danger); }
.batch-workspace { display:grid; grid-template-columns:minmax(300px,370px) minmax(0,1fr); gap:18px; align-items:start; }
.batch-config, .batch-main { min-width:0; display:grid; gap:14px; }
.batch-section, .batch-output, .batch-actionbar, .batch-prompts { border:1px solid var(--line); background:#fff; border-radius:10px; }
.batch-section { padding:16px; }
.batch-section-head, .batch-output-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.batch-section-head > div, .batch-output-head > div { display:flex; align-items:baseline; gap:8px; }
.batch-section-head span, .batch-output-head span { color:var(--blue); font-size:10px; font-weight:700; letter-spacing:.08em; }
.batch-section h2, .batch-output h2 { margin:0; font-size:14px; }
.batch-section-head small, .batch-output-head small { color:var(--muted); font-size:10px; }
.batch-dropzone { width:100%; min-height:100px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:5px; border:1px dashed #b9cbe7; border-radius:8px; background:#f8faff; color:#607594; }
.batch-dropzone:hover:not(:disabled) { border-color:var(--blue); background:var(--blue-soft); color:var(--blue); }
.batch-dropzone:disabled { cursor:not-allowed; opacity:.55; }
.batch-dropzone span { font-size:22px; line-height:1; color:var(--blue); }
.batch-dropzone strong { font-size:12px; }
.batch-dropzone small { color:#91a0b5; font-size:10px; }
.batch-reference-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; margin-top:10px; }
.batch-reference-grid figure { position:relative; aspect-ratio:1; margin:0; overflow:hidden; border-radius:6px; border:1px solid #dce5f1; background:#f3f6fa; }
.batch-reference-grid img { width:100%; height:100%; display:block; object-fit:cover; }
.batch-reference-grid button { position:absolute; top:3px; right:3px; width:20px; height:20px; border:0; border-radius:5px; background:rgba(16,34,59,.68); color:#fff; line-height:1; }
.batch-reference-grid button:hover { background:var(--danger); }
.clone-reference-grid figure > span { position:absolute; left:4px; bottom:4px; min-width:20px; height:20px; display:grid; place-items:center; border-radius:5px; color:#fff; background:rgba(16,34,59,.68); font-size:9px; font-weight:700; }
.clone-upload-section .batch-dropzone { min-height:88px; }
.clone-result-tools { margin:-42px 0 12px; }
.batch-field { min-width:0; margin-bottom:11px; }
.batch-field:last-child { margin-bottom:0; }
.batch-field label { display:block; margin-bottom:5px; color:#60718b; font-size:10px; }
.batch-field input, .batch-field textarea, .batch-field select { width:100%; border:1px solid #d6e0ee; border-radius:6px; padding:8px 9px; outline:0; color:var(--ink); background:#fff; font-size:11px; }
.batch-field input:focus, .batch-field textarea:focus, .batch-field select:focus { border-color:#8fb1f5; box-shadow:0 0 0 3px #e9f0ff; }
.batch-field textarea { min-height:58px; resize:vertical; line-height:1.55; }
.batch-two-cols { display:grid; grid-template-columns:1fr 1fr; gap:0 9px; }
.batch-actionbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 15px; }
.batch-actionbar > div:first-child { min-width:0; }
.batch-actionbar strong, .batch-actionbar span { display:block; }
.batch-actionbar strong { font-size:13px; }
.batch-actionbar span { max-width:480px; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.batch-actionbar > div:last-child { display:flex; gap:7px; flex:0 0 auto; }
.batch-actionbar .btn { white-space:nowrap; }
.batch-prompts { padding:0 15px; }
.batch-prompts summary { padding:13px 0; color:#526783; cursor:pointer; font-size:11px; font-weight:600; }
.batch-prompt-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:0 0 12px; }
.batch-prompts > p { margin:0 0 13px; color:#93a0b3; font-size:10px; line-height:1.6; }
.batch-output { padding:16px; }
.batch-output-head { margin-bottom:12px; }
.batch-empty { min-height:180px; display:flex; flex-direction:column; align-items:center; justify-content:center; border:1px dashed #d9e2ef; border-radius:8px; background:#fbfcfe; color:#7c8da7; text-align:center; }
.batch-empty span { margin-bottom:8px; color:#aac1e5; font-size:28px; }
.batch-empty strong { color:#657995; font-size:12px; }
.batch-empty p { margin:6px 0 0; color:#9ba8b9; font-size:10px; }
.batch-empty.compact { min-height:110px; }
.batch-plan-stream { min-height:180px; overflow:hidden; border:1px solid #d9e2ef; border-radius:8px; background:#fbfcfe; }
.batch-plan-stream-head { height:38px; display:flex; align-items:center; gap:8px; padding:0 12px; border-bottom:1px solid #e7edf5; color:#60718b; }
.batch-plan-stream-head > span { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#9eb4d6; }
.batch-plan-stream.is-streaming .batch-plan-stream-head > span { background:var(--blue); box-shadow:0 0 0 4px #e7efff; animation:batch-stream-pulse 1.2s ease-in-out infinite; }
.batch-plan-stream-head strong { font-size:11px; }
.batch-plan-stream-head small { margin-left:auto; color:#98a5b7; font-size:9px; }
.batch-plan-stream pre { max-height:360px; min-height:142px; overflow:auto; margin:0; padding:13px; color:#52647e; font:10px/1.75 "Noto Sans SC",sans-serif; white-space:pre-wrap; overflow-wrap:anywhere; }
@keyframes batch-stream-pulse { 50% { opacity:.4; transform:scale(.8); } }
.batch-font-spec { margin-bottom:10px; padding:11px 12px; border-left:3px solid var(--blue); background:#f7f9fd; }
.batch-font-spec label { display:block; margin-bottom:6px; color:#526b93; font-size:11px; font-weight:700; }
.batch-font-spec textarea { width:100%; min-height:70px; resize:vertical; border:1px solid #d6e0ee; border-radius:6px; padding:8px 9px; color:#51647f; background:#fff; font:inherit; font-size:11px; line-height:1.6; outline:0; }
.batch-font-spec textarea:focus { border-color:#8fb1f5; box-shadow:0 0 0 3px #e9f0ff; }
.batch-plan-list { display:grid; gap:8px; }
.batch-plan-item { display:grid; grid-template-columns:32px minmax(0,1fr); gap:10px; padding:13px 0; border-top:1px solid #edf1f6; }
.batch-plan-item > span { color:#9bb2d8; font-size:16px; font-weight:700; }
.batch-plan-editor { min-width:0; }
.batch-plan-editor-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.batch-plan-editor-head strong { color:#344b70; font-size:12px; }
.batch-plan-editor-head small { color:#94a1b4; font-size:9px; }
.batch-plan-fields { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.batch-plan-fields label { min-width:0; color:#60718b; font-size:10px; }
.batch-plan-fields input, .batch-plan-fields textarea { width:100%; margin-top:4px; border:1px solid #d6e0ee; border-radius:6px; padding:7px 8px; color:var(--ink); background:#fff; font:inherit; font-size:10px; line-height:1.5; outline:0; }
.batch-plan-fields textarea { min-height:64px; resize:vertical; }
.batch-plan-fields input:focus, .batch-plan-fields textarea:focus { border-color:#8fb1f5; box-shadow:0 0 0 3px #e9f0ff; }
.batch-plan-fields .batch-plan-wide { grid-column:1 / -1; }
.batch-plan-fields .batch-plan-wide textarea { min-height:90px; }
.clone-plan-list { gap:7px; }
.clone-plan-card { min-width:0; overflow:hidden; border:1px solid #dfe7f1; border-radius:8px; background:#fff; }
.clone-plan-card[open] { border-color:#b9ccef; box-shadow:0 5px 15px rgba(34,72,127,.07); }
.clone-plan-summary { min-width:0; min-height:68px; display:grid; grid-template-columns:30px 52px minmax(0,1fr) auto; align-items:center; gap:10px; padding:7px 10px; list-style:none; cursor:pointer; }
article.clone-plan-card .clone-plan-summary { cursor:default; }
.clone-plan-summary::-webkit-details-marker { display:none; }
.clone-plan-number { color:#8da8d1; font-size:12px; text-align:center; }
.clone-plan-thumb { width:52px; height:52px; overflow:hidden; display:grid; place-items:center; border:1px solid #dce5f1; border-radius:6px; background:#f3f6fa; color:#91a0b5; font-size:9px; }
.clone-plan-thumb img { width:100%; height:100%; display:block; object-fit:cover; }
.clone-plan-summary-copy { min-width:0; display:grid; gap:4px; }
.clone-plan-summary-copy strong, .clone-plan-summary-copy small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.clone-plan-summary-copy strong { color:#3b5275; font-size:11px; }
.clone-plan-summary-copy small { color:#8c9aae; font-size:9px; }
.clone-plan-state { min-width:56px; color:var(--blue); font-size:9px; font-weight:700; text-align:right; white-space:nowrap; }
.clone-plan-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; white-space:nowrap; }
.clone-plan-actions .btn { padding:5px 8px; font-size:9px; }
details.clone-plan-card .clone-plan-state::after { content:'⌄'; display:inline-block; margin-left:5px; font-size:12px; transition:transform .18s ease; }
details.clone-plan-card[open] .clone-plan-state::after { transform:rotate(180deg); }
.clone-plan-card.is-running { border-color:#c7d7f1; background:#f9fbff; }
.clone-plan-card.is-running .clone-plan-state { color:#b77718; }
.clone-plan-card.is-error { border-color:#efcbd0; background:#fffafb; }
.clone-plan-card.is-error .clone-plan-state { color:var(--danger); }
.clone-plan-body { padding:12px 14px 14px 102px; border-top:1px solid #edf1f6; background:#fbfcfe; }
.batch-plan-symbol { color:#2d6cdf; background:#edf3ff; border-color:#cfddf5; font-size:13px; font-weight:800; }
.batch-font-card .clone-plan-number { font-size:10px; }
.batch-font-card .batch-font-spec { margin:0; padding:0; border-left:0; background:transparent; }
.batch-font-card .batch-font-spec textarea { min-height:82px; }
.batch-task-summary { display:flex; gap:15px; margin:0 0 11px; color:var(--muted); font-size:10px; }
.batch-task-summary .success { color:var(--success); }
.batch-task-summary .danger { color:var(--danger); }
.batch-result-tools { display:flex; justify-content:flex-end; gap:7px; margin:-32px 0 11px; }
.batch-result-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.batch-result-item { min-width:0; overflow:hidden; border:1px solid #e1e8f1; border-radius:8px; background:#fff; }
.batch-result-item.error { border-color:#f0c7cd; }
.batch-result-media { aspect-ratio:1; display:grid; place-items:center; overflow:hidden; background:#f5f7fa; color:#9aa8bb; font-size:11px; }
.batch-result-media img { width:100%; height:100%; object-fit:cover; cursor:zoom-in; transition:transform .2s ease; }
.batch-result-media img:hover { transform:scale(1.03); }
.batch-result-meta { display:grid; gap:5px; padding:9px; }
.batch-result-meta strong { color:#445b7e; font-size:11px; }
.batch-result-meta small { min-height:16px; overflow:hidden; color:#9aa6b7; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.batch-result-meta .btn { justify-self:start; padding:5px 8px; font-size:10px; }
.batch-history { margin-top:18px; padding-top:16px; border-top:1px solid #e6ecf4; }
.batch-history-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:11px; }
.batch-history-head > div { display:flex; align-items:center; gap:8px; }
.batch-history-head-actions { display:flex; align-items:center; gap:8px; }
.batch-history-head span { color:#8ea3c3; font-size:9px; font-weight:700; }
.batch-history-head h3 { margin:0; color:#344b70; font-size:13px; }
.batch-history-head small { color:#94a1b4; font-size:9px; }
.batch-history-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.batch-history-item { min-width:0; overflow:hidden; border:1px solid #e1e8f1; border-radius:8px; background:#fff; }
.batch-history-preview { width:100%; aspect-ratio:1; display:block; overflow:hidden; padding:0; border:0; background:#f5f7fa; cursor:zoom-in; }
.batch-history-preview img { width:100%; height:100%; display:block; object-fit:cover; transition:transform .2s ease; }
.batch-history-preview:hover img { transform:scale(1.03); }
.batch-history-item > div { display:grid; gap:4px; padding:9px; }
.batch-history-actions { display:flex; align-items:center; gap:6px; margin-top:2px; }
.batch-history-item strong, .batch-history-item small, .batch-history-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.batch-history-item strong { color:#445b7e; font-size:10px; }
.batch-history-item small, .batch-history-item span { color:#98a5b7; font-size:9px; }
.batch-history-item .btn { justify-self:start; padding:5px 8px; font-size:10px; }
.batch-image-preview-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:28px; background:rgba(13,25,44,.78); }
.batch-image-preview { width:min(92vw,980px); max-height:92vh; overflow:hidden; border-radius:10px; background:#fff; box-shadow:0 24px 80px rgba(0,0,0,.28); }
.batch-image-preview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid #e5ebf3; color:var(--ink); font-size:12px; }
.batch-image-preview-close { width:28px; height:28px; border:0; border-radius:6px; background:transparent; color:#718198; font-size:22px; line-height:1; cursor:pointer; }
.batch-image-preview-close:hover { background:#f1f4f8; color:var(--ink); }
.batch-image-preview-body { max-height:calc(92vh - 54px); display:grid; place-items:center; overflow:auto; padding:16px; background:#f5f7fa; }
.batch-image-preview-body img { display:block; max-width:100%; max-height:calc(92vh - 90px); object-fit:contain; }
.batch-editor-backdrop { position:fixed; inset:0; z-index:110; display:grid; place-items:center; padding:18px; background:rgba(27,43,67,.48); backdrop-filter:blur(4px); }
.batch-editor { width:min(1180px,96vw); height:min(820px,94vh); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; border:1px solid #d9e2ee; border-radius:10px; background:#fff; color:#263752; box-shadow:0 24px 64px rgba(20,38,66,.24); }
.batch-editor-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 16px; border-bottom:1px solid #e2e8f2; }
.batch-editor-head > div:first-child { display:grid; gap:4px; min-width:0; }
.batch-editor-head strong { font-size:14px; }
.batch-editor-head small, .batch-editor-foot p { color:#78879b; font-size:10px; }
.batch-editor-head-actions { display:flex; align-items:center; gap:5px; }
.batch-editor-head-actions output { min-width:44px; color:#53657e; font-size:10px; text-align:center; }
.batch-editor-body { min-height:0; display:grid; grid-template-columns:220px minmax(0,1fr); }
.batch-editor-tools { display:grid; align-content:start; gap:12px; padding:14px; overflow:auto; border-right:1px solid #e2e8f2; background:#f8faff; }
.batch-editor-tools label { display:grid; gap:6px; color:#687992; font-size:10px; }
.batch-editor-tools input[type=color] { width:100%; height:30px; padding:2px; border:1px solid #d6e0ed; border-radius:5px; background:#fff; }
.batch-editor-tools input[type=range] { width:100%; accent-color:#2d6cdf; }
.batch-editor-tools input[type=text] { width:100%; box-sizing:border-box; padding:8px; border:1px solid #d6e0ed; border-radius:5px; outline:0; background:#fff; color:#293b56; }
.batch-editor-tool-row { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.batch-editor-tool-row .active { border-color:#2d6cdf; background:#2d6cdf; color:#fff; }
.batch-editor-command-row { display:flex; gap:6px; }
.batch-editor-stage { min-width:0; min-height:0; display:grid; place-items:center; overflow:auto; padding:15px; background:#f1f4f9; }
.batch-editor-canvas-wrap { position:relative; display:grid; place-items:center; max-width:100%; max-height:100%; }
.batch-editor-canvas-wrap canvas { display:block; max-width:none; max-height:none; border:1px solid #dbe3ee; background:#fff; box-shadow:0 10px 30px rgba(32,53,82,.16); touch-action:none; }
.batch-editor-canvas-wrap canvas[data-tool=draw], .batch-editor-canvas-wrap canvas[data-tool=mask] { cursor:crosshair; }
.batch-editor-canvas-wrap canvas[data-tool=text] { cursor:text; }
.batch-editor-canvas-wrap span { color:#78879b; font-size:11px; }
.batch-editor-foot { padding:12px 16px; border-top:1px solid #e2e8f2; background:#fff; }
.batch-editor-foot > label { display:block; margin-bottom:6px; color:#687992; font-size:10px; }
.batch-editor-foot > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
.batch-editor-foot textarea { min-height:48px; resize:vertical; padding:9px 10px; border:1px solid #cbd9eb; border-radius:6px; outline:0; color:#293b56; font:inherit; font-size:11px; }
.batch-editor-foot p { min-height:14px; margin:5px 0 0; }
@media (max-width: 1050px) { .batch-result-grid, .batch-history-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 820px) { .batch-shell { padding:25px 18px 45px; } .batch-page-head { align-items:flex-start; flex-direction:column; } .batch-workspace { grid-template-columns:1fr; } .batch-config { grid-template-columns:1fr 1fr; } .batch-config .batch-section:first-child { grid-column:1 / -1; } .batch-actionbar { align-items:flex-start; flex-direction:column; } .batch-actionbar > div:last-child { width:100%; flex-wrap:wrap; } }
@media (max-width: 560px) { .batch-config { grid-template-columns:1fr; } .batch-config .batch-section:first-child { grid-column:auto; } .batch-two-cols, .batch-prompt-grid, .batch-plan-fields { grid-template-columns:1fr; } .batch-plan-fields .batch-plan-wide { grid-column:auto; } .batch-result-grid, .batch-history-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .batch-result-tools { justify-content:flex-start; margin:0 0 11px; } .batch-actionbar > div:last-child .btn { flex:1; } .clone-plan-summary { grid-template-columns:24px 44px minmax(0,1fr); gap:7px; padding:7px; } .clone-plan-thumb { width:44px; height:44px; } .clone-plan-summary > .clone-plan-state { grid-column:3; text-align:left; } .clone-plan-actions { grid-column:3; justify-content:flex-start; } .clone-plan-actions .clone-plan-state { text-align:left; } .clone-plan-body { padding:10px; } }
@media (max-width: 700px) { .batch-editor-backdrop { padding:0; } .batch-editor { width:100%; height:100vh; border:0; border-radius:0; } .batch-editor-body { grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr); } .batch-editor-tools { grid-template-columns:1fr 1fr; gap:8px; border-right:0; border-bottom:1px solid #e2e8f2; } .batch-editor-tool-row, .batch-editor-command-row { grid-column:1 / -1; } .batch-editor-foot > div { grid-template-columns:1fr; } }
