:root {
  --bg: #ffffff; --panel: #f6f7f9; --panel-2: #eceef2; --text: #14161a; --muted: #6a7079; --line: #e3e6eb;
  --accent: #4f46e5; --accent-2: #14b8a6; --accent-text: #fff; --user: #eef0ff; --code-bg: #0f1218; --code-text: #e6e9ef;
  --danger: #dc2626; --ok: #16a34a; --shadow: 0 8px 30px rgba(15, 18, 24, .12);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] {
  --bg: #0e1013; --panel: #15181d; --panel-2: #1d2128; --text: #e8eaee; --muted: #9097a2; --line: #262b33;
  --accent: #818cf8; --accent-text: #0e1013; --user: #1c2030; --code-bg: #0a0c10; --shadow: 0 8px 30px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1013; --panel: #15181d; --panel-2: #1d2128; --text: #e8eaee; --muted: #9097a2; --line: #262b33;
    --accent: #818cf8; --accent-text: #0e1013; --user: #1c2030; --code-bg: #0a0c10; --shadow: 0 8px 30px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
kbd { font: 11px var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #5eead4, #6366f1); display: grid; place-items: center; flex: none; }
.logo span { width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; }
.logo.big { width: 56px; height: 56px; border-radius: 16px; }
.logo.big span { width: 24px; height: 24px; border-width: 5px; }

.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 14px; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.icon-btn { background: none; border: 0; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.only-mobile { display: none; }
.scrim { display: none; }

/* login */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; padding: 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 12px; text-align: center; justify-items: center; }
.login-card h1 { margin: 4px 0 0; font-size: 26px; }
.login-card input { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.login-card .btn { width: 100%; }
.err { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 13px; }

/* layout */
.app { display: grid; grid-template-columns: 280px 1fr; height: 100dvh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 12px; gap: 10px; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.btn.new { display: flex; align-items: center; gap: 8px; width: 100%; font-weight: 600; }
.btn.new kbd { margin-left: auto; }
.search input { width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.conv-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 8px 4px; }
.conv { display: flex; align-items: center; gap: 4px; border-radius: 9px; padding: 0 4px 0 10px; cursor: pointer; }
.conv:hover, .conv.active { background: var(--panel-2); }
.conv .name { flex: 1; min-width: 0; padding: 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.conv .pin { font-size: 11px; opacity: .7; }
.conv .acts { display: none; gap: 0; }
.conv:hover .acts, .conv.active .acts, .conv:focus-within .acts { display: flex; }
.conv .acts button { background: none; border: 0; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.conv .acts button:hover { background: var(--bg); color: var(--text); }
.conv input.rename { flex: 1; min-width: 0; margin: 4px 0; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--accent); background: var(--bg); }
.empty-list { color: var(--muted); font-size: 13px; padding: 12px 8px; }
.side-bottom { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 2px; }
.side-link { display: flex; gap: 10px; align-items: center; background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 14px; }
.side-link:hover { background: var(--panel-2); }

.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100dvh; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.title-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.title-wrap h2 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; color: var(--muted); white-space: nowrap; }
.badge.demo { color: #b45309; border-color: #f59e0b66; background: #f59e0b14; }
.top-actions { display: flex; }

.scroller { flex: 1; overflow-y: auto; scroll-behavior: smooth; overscroll-behavior: contain; }
.messages { max-width: 780px; margin: 0 auto; padding: 24px 16px 8px; display: flex; flex-direction: column; gap: 22px; }
.welcome { max-width: 780px; margin: 0 auto; padding: 12vh 16px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.welcome h1 { margin: 6px 0 0; font-size: clamp(26px, 5vw, 36px); letter-spacing: -.02em; }
.welcome p { margin: 0; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; width: 100%; }
.suggestions button { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; line-height: 1.35; }
.suggestions button:hover { background: var(--panel-2); }
.suggestions small { display: block; color: var(--muted); margin-top: 2px; }

.msg { display: flex; flex-direction: column; gap: 6px; }
.msg.user { align-items: flex-end; }
.bubble { max-width: 88%; background: var(--user); border-radius: 18px 18px 4px 18px; padding: 10px 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.assistant .body { width: 100%; overflow-wrap: anywhere; }
.msg-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools, .msg.last .msg-tools { opacity: 1; }
@media (hover: none) { .msg-tools { opacity: 1; } }
.msg-tools button { background: none; border: 0; border-radius: 6px; padding: 3px 8px; font-size: 12px; color: var(--muted); }
.msg-tools button:hover { background: var(--panel-2); color: var(--text); }
.edit-box { width: min(560px, 100%); display: grid; gap: 8px; }
.edit-box textarea { width: 100%; min-height: 80px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--bg); resize: vertical; }
.edit-box .row { display: flex; gap: 8px; justify-content: flex-end; }

.attach { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.attach img { max-width: 220px; max-height: 180px; border-radius: 12px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13px; max-width: 240px; }
.file-chip span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* markdown */
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: .6em 0; } .md h1, .md h2, .md h3, .md h4 { margin: 1.2em 0 .4em; line-height: 1.25; }
.md h1 { font-size: 1.45em; } .md h2 { font-size: 1.25em; } .md h3 { font-size: 1.1em; } .md h4 { font-size: 1em; }
.md ul, .md ol { padding-left: 1.5em; margin: .5em 0; } .md li { margin: .2em 0; } .md li > p { margin: .2em 0; }
.md blockquote { margin: .8em 0; padding: .1em 1em; border-left: 3px solid var(--accent-2); color: var(--muted); }
.md a { color: var(--accent); text-underline-offset: 2px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--panel-2); padding: .12em .4em; border-radius: 5px; }
.md .tbl { overflow-x: auto; margin: .8em 0; }
.md table { border-collapse: collapse; font-size: .94em; min-width: 60%; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--panel); }
.codeblock { margin: .8em 0; border-radius: 12px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line); }
.codeblock .head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 14px; font: 12px var(--mono); color: #9aa3b2; background: rgba(255,255,255,.04); }
.codeblock .head button { background: none; border: 0; color: #9aa3b2; border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.codeblock .head button:hover { background: rgba(255,255,255,.1); color: #fff; }
.codeblock pre { margin: 0; padding: 12px 14px; overflow-x: auto; color: var(--code-text); }
.codeblock code { background: none; padding: 0; font-size: 13px; line-height: 1.5; color: inherit; }
.tk-c { color: #7d8799; } .tk-s { color: #a5d6a7; } .tk-n { color: #f6b26b; } .tk-k { color: #c4a7ff; } .tk-f { color: #7cc4ff; }

.cursor::after { content: ""; display: inline-block; width: 8px; height: 1.05em; background: var(--accent); margin-left: 2px; vertical-align: text-bottom; border-radius: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.thinking { display: inline-flex; gap: 4px; padding: 6px 0; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

.tool { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: var(--panel); font-size: 13.5px; overflow: hidden; }
.tool summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; list-style: none; }
.tool summary::-webkit-details-marker { display: none; }
.tool .st { margin-left: auto; font-size: 12px; color: var(--muted); }
.tool.err .st { color: var(--danger); } .tool.ok .st { color: var(--ok); }
.tool .detail { border-top: 1px solid var(--line); padding: 8px 12px; display: grid; gap: 6px; }
.tool pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 var(--mono); max-height: 240px; overflow: auto; background: var(--bg); border-radius: 8px; padding: 8px; }
.tool .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.errbox { border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); color: var(--danger); border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: 14px; }

.jump { position: absolute; right: 24px; bottom: 150px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); z-index: 5; }

/* composer */
.composer-wrap { max-width: 780px; width: 100%; margin: 0 auto; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); }
.composer { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 8px 8px 8px 12px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.composer.drag { border-color: var(--accent-2); border-style: dashed; }
.composer textarea { width: 100%; resize: none; border: 0; background: none; outline: none; padding: 6px 4px; max-height: 220px; line-height: 1.5; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-row .left { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; }
.app-pills { display: flex; gap: 4px; margin-left: 6px; overflow: hidden; }
.app-pills span { font-size: 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 1px 8px; white-space: nowrap; color: var(--muted); }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text); font-size: 18px; font-weight: 700; flex: none; }
.send:disabled { opacity: .35; cursor: default; }
.send.stop { background: var(--text); color: var(--bg); font-size: 12px; }
.mic-on { color: var(--danger) !important; animation: blink 1.2s steps(2) infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:not(:empty) { padding: 4px 0 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px 4px 8px; font-size: 13px; max-width: 220px; }
.chip img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.chip .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { background: none; border: 0; color: var(--muted); border-radius: 50%; width: 20px; height: 20px; }
.chip button:hover { background: var(--panel-2); color: var(--text); }
.fine { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.notice { background: color-mix(in srgb, #f59e0b 14%, transparent); border: 1px solid #f59e0b66; border-radius: 10px; padding: 6px 12px; font-size: 13px; margin-bottom: 8px; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(8, 10, 14, .55); display: grid; place-items: center; z-index: 40; padding: 16px; backdrop-filter: blur(2px); }
.modal-card { width: min(640px, 100%); max-height: min(86dvh, 820px); overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 16px 18px 20px; display: grid; gap: 16px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; }
.field small { color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.field textarea { min-height: 90px; resize: vertical; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; background: var(--panel); border: 0; padding: 8px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 -8px; }
.modal-body > div > .section-title:not(:first-child) { margin-top: 14px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel); display: grid; gap: 6px; }
.card .row { display: flex; align-items: center; gap: 10px; }
.card .ico { font-size: 22px; width: 32px; text-align: center; }
.card .grow { flex: 1; min-width: 0; }
.card .name { font-weight: 600; }
.card .tools-line { font: 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; transition: .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .15s; }
.switch input:checked + i { background: var(--accent); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(16px); background: var(--accent-text); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.mem { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 10px; }
.mem span { flex: 1; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 99px; font-size: 14px; box-shadow: var(--shadow); animation: pop .2s ease-out; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 70; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 8px; }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(310px, 86vw); z-index: 30; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  .app.side-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
  .app.side-open .scrim { display: block; }
  .only-mobile { display: grid; }
  .suggestions { grid-template-columns: 1fr; }
  .bubble { max-width: 94%; }
  .app-pills { display: none; }
  .jump { right: 16px; }
  .conv .acts { display: flex; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Platform v1.1 workspaces */
.side-separator{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--muted);padding:10px 17px 4px;opacity:.8}
.workspace{display:grid;gap:14px;min-width:0}
.work-hero{display:flex;gap:14px;align-items:center;padding:14px;background:var(--panel-2);border:1px solid var(--line);border-radius:14px}
.work-hero strong{font-size:16px}.work-hero p{font-size:13px;margin:4px 0 0;color:var(--muted);line-height:1.45}
.work-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;font-size:24px;background:var(--bg)}
.work-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
.work-panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:17px;display:grid;gap:13px;align-content:start;min-width:0;margin:0}
.work-panel h4{margin:0;font-size:16px}.work-panel label:not(.work-check):not(.work-step){display:grid;gap:6px;font-size:13px;font-weight:600}
.work-panel input:not([type=checkbox]),.work-panel select,.work-panel textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:10px;padding:11px;background:var(--bg);color:var(--text);font:inherit}
.work-panel textarea{resize:vertical;min-height:74px;line-height:1.5}
.work-note{font-size:12px;color:var(--muted);line-height:1.6;margin:0}.work-check{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.5}
.work-scroll{max-height:300px;overflow-y:auto;display:grid;gap:7px}
.work-project{background:var(--bg);color:var(--text);text-align:left;border:1px solid var(--line);border-radius:10px;padding:12px;display:grid;gap:3px;width:100%;cursor:pointer}
.work-project:hover{border-color:var(--accent)}.work-project small{color:var(--muted)}
.work-editor{display:grid;grid-template-columns:200px minmax(0,1fr);gap:12px;min-height:310px}.work-files{display:grid;align-content:start;gap:4px;max-height:360px;overflow:auto}
.work-files button{text-align:left;padding:8px;border:0;border-radius:7px;color:var(--text);background:transparent;word-break:break-all;cursor:pointer}
.work-files button.on{background:var(--panel-2);color:var(--accent)}.work-code{min-width:0;display:grid;gap:5px}
.work-code label{font:12px monospace;color:var(--muted)}.work-code textarea{height:340px!important;min-height:250px;font:12px/1.55 monospace;background:var(--bg);tab-size:2}
.work-message{margin:0;padding:10px 13px;border-radius:9px;font-size:13px;background:var(--panel-2);color:var(--accent)}.work-error{color:var(--danger)}
.work-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:300px;overflow:auto}
.work-image{display:grid;gap:5px;min-width:0}.work-image img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:9px}.work-image small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-image a{font-size:12px;color:var(--accent)}
.work-step{display:flex;align-items:flex-start;gap:12px;padding:10px;background:var(--panel-2);border-radius:9px;font-size:14px;line-height:1.5}
.work-step span{flex:1}.work-step input{margin-top:4px;flex:none}.work-step:has(input:checked) span{text-decoration:line-through;color:var(--muted)}
.work-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.work-stats>div{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--panel);display:grid;gap:5px}.work-stats strong{font-size:23px}.work-stats small{font-size:12px;color:var(--muted)}
.work-provider{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:7px 0;min-width:0}
.work-provider>span:first-child{display:grid;gap:4px;min-width:0}.work-provider small{color:var(--muted);font-size:11px;overflow-wrap:anywhere}.work-pill{border:1px solid var(--line);color:var(--muted);border-radius:99px;font-size:11px;white-space:nowrap;padding:5px 9px}.work-pill.ready{color:var(--ok);border-color:var(--ok)}
.work-log{padding:8px 0;border-bottom:1px solid var(--line);display:grid;gap:3px;font-size:13px}.work-log small{color:var(--muted);font-size:11px;overflow-wrap:anywhere}
@media(max-width:650px){.work-grid{grid-template-columns:1fr}.work-editor{grid-template-columns:1fr}.work-files{display:flex;overflow:auto;max-height:55px}.work-files button{white-space:nowrap}.work-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.work-panel{padding:12px}.work-hero{align-items:flex-start}.workspace{gap:10px}.work-code textarea{height:240px!important}}
.side-bottom{max-height:min(60vh,480px);overflow-y:auto;flex:none;scrollbar-width:thin}
.side-separator{line-height:1.2}
#seg{flex-wrap:wrap}
#seg button{min-width:64px}
