:root { color-scheme: dark; --bg:#191919; --surface:#262626; --surface-2:#333; --surface-3:#404040; --line:#454545; --line-strong:#606060; --text:#f4f5f6; --muted:#c0c3c8; --subtle:#8d929a; --amber:#f4d24b; --panel-gap:5px; --panel-radius:0px; font-family:Inter,"Segoe UI",system-ui,sans-serif; }
:root { --accent:#a5c7ff; --accent-soft:#293c59; --danger:#ffb2bc; --input:#1d1d1d; --hover:#414754; }
:root[data-theme="light"] { color-scheme:light; --bg:#eef1f5; --surface:#fff; --surface-2:#f0f3f7; --surface-3:#e5eaf0; --line:#dce2e9; --line-strong:#bac5d2; --text:#25344a; --muted:#56657a; --subtle:#738196; --accent:#2156ae; --accent-soft:#eaf0fc; --danger:#ac2e43; --input:#f7f9fc; --hover:#e5edf8; }
* { box-sizing:border-box; }
body { margin:0; color:var(--text); background:var(--bg); font-size:13px; line-height:1.45; }
[hidden] { display:none !important; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; padding:8px 12px; border:1px solid var(--line-strong); background:var(--surface-2); color:var(--text); border-radius:6px; }
button:hover { background:var(--hover); }
button:disabled { opacity:.4; cursor:default; }
button:focus-visible,input:focus-visible,select:focus-visible { outline:2px solid #83b2ff; outline-offset:2px; }
input,select,textarea { padding:9px 11px; background:var(--input); border:1px solid var(--line-strong); border-radius:6px; color:var(--text); min-width:0; }
label { display:grid; gap:6px; }
a { color:#a5c7ff; }
h1,h2,p { margin-top:0; }
.shell { padding:5px; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); height:100dvh; min-height:0; overflow:hidden; }
.shell > main { grid-column:1; grid-row:1; min-width:0; min-height:0; overflow:hidden; display:flex; flex-direction:column; }
.auth-page { display:grid; min-height:100dvh; place-items:center; padding:28px 16px; background:radial-gradient(ellipse at 50% 20%,#253248 0%,#191919 65%); }
.auth-card { width:min(440px,100%); padding:34px; background:var(--surface); border:1px solid var(--line-strong); border-radius:12px; box-shadow:0 20px 80px #0004; }
.auth-card form { display:grid; gap:18px; }
.auth-card h1 { font-size:24px; margin:6px 0 10px; }
.eyebrow { color:var(--accent); font-size:12px; font-weight:700; letter-spacing:.12em; }
.muted { color:var(--muted); }
.primary { background:#2965db; border-color:#2965db; color:white; }
.danger { color:var(--danger); border-color:#81505b; }
.form-error { color:var(--danger); min-height:1.3em; margin:0; }
.table-wrap { width:100%; overflow:auto; }
table { border-collapse:collapse; width:100%; text-align:left; }
th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
td,th { padding:12px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
td button { padding:4px 8px; margin:0 4px 4px 0; }
.studio-dialog.history-dialog { width:min(1480px,calc(100vw - 24px)); height:min(88dvh,900px); max-height:94dvh; }
.history-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.history-dialog > header { flex-shrink:0; }
.history-dialog .dialog-body { display:flex; flex:1; flex-direction:column; gap:12px; min-height:0; overflow:hidden; }
.history-dialog .dialog-body > p { flex-shrink:0; margin-bottom:0; }
.history-dialog .table-wrap { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; }
.history-dialog .history-table thead { position:sticky; top:0; z-index:1; }
.history-dialog .history-table th { background:var(--surface); }
.history-dialog #moreHistory { flex-shrink:0; align-self:flex-start; }
.history-table { min-width:900px; table-layout:fixed; }
.history-revision-col { width:82px; }
.history-date-col { width:190px; }
.history-user-col { width:170px; }
.history-actions-col { width:180px; }
.history-table .history-date,.history-table .history-user { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.history-table .history-date { font-variant-numeric:tabular-nums; }
.history-actions { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.history-actions button { margin:0; }
.history-actions .history-view { background:var(--surface-3); border-color:var(--line-strong); color:var(--text); }
.history-actions .history-view:hover { background:var(--hover); }
.history-actions .history-restore { background:var(--amber); border-color:#d7ae23; color:#332b10; }
.history-actions .history-restore:hover:not(:disabled) { background:#e8c43a; }
.badge { display:inline-block; padding:2px 7px; background:var(--accent-soft); border-radius:4px; font-size:11px; color:var(--accent); }
.studio-dialog { width:min(960px,calc(100vw - 24px)); max-height:90dvh; background:var(--surface); color:var(--text); border:1px solid var(--line-strong); border-radius:10px; padding:0; }
.studio-dialog::backdrop { background:#000a; }
.studio-dialog header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid var(--line); }
.studio-dialog header h2 { margin:0; }
.management-dialog { width:min(1100px,calc(100vw - 24px)); }
.management-dialog[open] { display:flex; flex-direction:column; }
.management-dialog header { flex-shrink:0; flex-wrap:wrap; }
.management-dialog header p { margin:5px 0 0; font-size:11px; }
.management-actions { display:flex; align-items:center; gap:10px; margin-left:auto; }
.management-dialog .dialog-body { min-height:0; }
.statistics-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.statistics-card { min-width:0; padding:13px 15px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.statistics-card span { display:block; color:var(--muted); font-size:11px; }
.statistics-card strong { display:block; margin-top:5px; font-size:20px; font-variant-numeric:tabular-nums; }
.statistics-note { margin:0 0 12px; font-size:11px; }
@media (max-width:700px) { .statistics-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.dialog-body { padding:20px 22px; overflow:auto; }
.dialog-body form { display:grid; gap:16px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.check-label { display:flex; align-items:center; gap:8px; }
.revision-dialog { width:min(1480px,calc(100vw - 24px)); height:min(86dvh,920px); max-height:94dvh; }
.revision-dialog[open],.revision-zoom-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.revision-dialog > header,.revision-zoom-dialog > header { flex-shrink:0; }
.revision-dialog .dialog-body,.revision-zoom-dialog .dialog-body { display:flex; flex:1; flex-direction:column; min-height:0; overflow:hidden; }
#revisionContent { flex:1; min-height:0; overflow:auto; }
.revision-overview { display:grid; gap:15px; }
.revision-overview-summary { margin:0; color:var(--text); font-size:12px; }
.revision-sheet-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr)); gap:12px; align-items:start; }
.revision-sheet-card { --revision-added:#35bd86; --revision-modified:#e4ad35; --revision-deleted:#e16d7b; --revision-card-fill:var(--surface-2); display:flex; flex-direction:column; align-items:stretch; width:100%; min-width:0; gap:8px; padding:8px; text-align:left; color:var(--text); background:var(--revision-card-fill); border-color:var(--line); }
.revision-sheet-card:hover { --revision-card-fill:var(--hover); color:var(--text); background:var(--revision-card-fill); border-color:var(--accent); }
.revision-sheet-card[data-change-kinds]:not([data-change-kinds=""]) { border:2px solid transparent; background:linear-gradient(var(--revision-card-fill),var(--revision-card-fill)) padding-box,var(--revision-sheet-outline) border-box; }
.revision-preview-surface { flex:none; width:100%; height:clamp(175px,24dvh,250px); min-height:175px; border:1px solid var(--line); border-radius:5px; background:var(--gf-canvas); }
.revision-preview-surface > svg { display:block; width:100%; height:100%; }
.revision-sheet-card-copy { display:grid; gap:3px; min-width:0; }
.revision-sheet-card-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.revision-sheet-card-copy small { color:var(--muted); font-size:10px; line-height:1.45; }
.revision-sheet-status { color:var(--accent); }
.revision-change-legend { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:8px 10px; border:1px solid var(--line); border-radius:6px; color:var(--muted); font-size:10px; }
.revision-legend-item { display:inline-flex; align-items:center; gap:5px; }
.revision-legend-dot { width:9px; height:9px; border-radius:50%; }
.revision-legend-dot.added { background:#35bd86; }
.revision-legend-dot.modified { background:#e4ad35; }
.revision-legend-dot.deleted { background:#e16d7b; }
.revision-zoom-dialog { width:min(1480px,calc(100vw - 24px)); height:min(90dvh,1000px); max-height:94dvh; }
.revision-zoom-dialog #revisionZoomPreview { display:flex; flex:1; flex-direction:column; gap:10px; min-height:0; }
.revision-zoom-dialog .revision-preview-surface { flex:1; height:auto; min-height:0; }
.revision-zoom-summary { flex:none; margin:0; color:var(--muted); font-size:11px; }
.gf-revision-preview { --gf-revision-added:#35bd86; --gf-revision-modified:#e4ad35; --gf-revision-deleted:#e16d7b; }
.gf-revision-preview :is(.gf-revision-added,.gf-revision-modified,.gf-revision-deleted) { filter:drop-shadow(0 0 2px currentColor); }
.gf-revision-preview .gf-revision-added { color:var(--gf-revision-added); }
.gf-revision-preview .gf-revision-modified { color:var(--gf-revision-modified); }
.gf-revision-preview .gf-revision-deleted { color:var(--gf-revision-deleted); opacity:.78; }
.gf-revision-preview .gf-revision-added .gf-node-shape { fill:color-mix(in srgb,var(--gf-revision-added) 22%,var(--gf-node-fill)) !important; stroke:var(--gf-revision-added) !important; }
.gf-revision-preview .gf-revision-modified .gf-node-shape { fill:color-mix(in srgb,var(--gf-revision-modified) 24%,var(--gf-node-fill)) !important; stroke:var(--gf-revision-modified) !important; }
.gf-revision-preview .gf-revision-deleted .gf-node-shape { fill:color-mix(in srgb,var(--gf-revision-deleted) 20%,var(--gf-node-fill)) !important; stroke:var(--gf-revision-deleted) !important; stroke-dasharray:5 3; }
.gf-revision-preview .gf-revision-added :is(.gf-transition-bar,.gf-parallel-bar,.gf-edge-line),.gf-revision-preview .gf-revision-modified :is(.gf-transition-bar,.gf-parallel-bar,.gf-edge-line) { stroke:currentColor !important; stroke-width:2.6; }
.gf-revision-preview .gf-revision-deleted :is(.gf-transition-bar,.gf-parallel-bar,.gf-edge-line) { stroke:currentColor !important; stroke-width:2.2; stroke-dasharray:5 3; }
.revision-meta { color:var(--muted); margin-bottom:14px; }
.empty-state { padding:30px 10px; color:var(--muted); text-align:center; }
.toast { position:fixed; left:50%; bottom:24px; transform:translate(-50%,16px); opacity:0; padding:12px 18px; max-width:90vw; background:#e5f0ff; color:#14243c; border-radius:6px; z-index:10000; pointer-events:none; transition:opacity .15s,transform .15s; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.toast.error { background:#ffccd3; color:#511c2a; }
.inspector-column-resize { position:absolute; width:8px; top:0; bottom:0; cursor:col-resize; z-index:20; touch-action:none; }
.inspector-column-resize:hover,.inspector-column-resize:focus { background:#83b2ff55; }
.gf-workspace { position:relative; }
@media(max-width:640px) { .auth-card { padding:24px; } }

/* The symbol palette scrolls above a separate, always visible account footer. */
.account-dock { flex-shrink:0; padding:10px 9px; border-top:1px solid var(--line); background:var(--surface); }
.avatar { display:inline-flex; flex-shrink:0; width:44px; height:44px; }
.avatar svg { display:block; width:100%; height:100%; }
.gf-studio .account-trigger { display:flex; align-items:center; justify-content:flex-start; gap:10px; width:100%; min-height:46px; padding:2px; border:1px solid transparent; border-radius:12px; background:transparent; }
.account-trigger .avatar { width:40px; height:40px; }
.gf-studio .account-trigger:hover,.gf-studio .account-trigger[aria-expanded="true"] { border-color:var(--accent); background:var(--accent-soft); }
.account-avatar-wrap { display:inline-flex; flex-shrink:0; position:relative; }
.account-copy { display:grid; gap:2px; min-width:0; text-align:left; }
.account-copy strong { font-size:11px; font-weight:600; overflow:hidden; text-overflow:ellipsis; }
.account-copy small { color:var(--muted); font-size:10px; }
.account-status { position:absolute; right:-1px; bottom:-1px; width:10px; height:10px; border:2px solid var(--surface); background:#72c8a5; border-radius:50%; }
.gf-library.is-collapsed .account-dock { padding:9px 5px; }
.gf-library.is-collapsed .account-trigger { justify-content:center; gap:0; }
.gf-library.is-collapsed .account-copy { display:none; }
.account-menu { position:fixed; z-index:5000; width:270px; max-width:calc(100vw - 16px); padding:7px; color:var(--text); border:1px solid var(--line-strong); border-radius:13px; background:var(--surface); box-shadow:0 14px 50px #0004; }
.account-identity { display:flex; gap:12px; padding:13px 10px 16px; align-items:center; }
.account-identity > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.account-identity strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.account-identity span:not(.avatar) { font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.account-identity .account-role { margin-top:3px; font-size:10px; }
.account-menu button { display:flex; align-items:center; gap:10px; width:100%; padding:10px; border:0; text-align:left; background:transparent; }
.account-menu button:hover,.account-menu button:focus-visible { background:var(--accent-soft); }
.account-menu button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.account-menu-separator { margin:6px 8px; border-top:1px solid var(--line); }
.account-menu .account-logout { color:var(--danger); }
.preferences-dialog { width:min(620px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:hidden; }
.preferences-dialog[open] { display:flex; flex-direction:column; }
.preferences-dialog header { flex-shrink:0; }
.preferences-dialog header .eyebrow { font-size:9px; }
.preferences-dialog header h2 { margin-top:3px; font-size:21px; }
#preferencesForm { display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.preferences-body { padding:20px 24px 8px; overflow-y:auto; }
.preferences-profile { display:flex; align-items:center; gap:14px; margin-bottom:24px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.preferences-profile .avatar { width:54px; height:54px; }
.preferences-profile > div { display:grid; gap:3px; min-width:0; }
.preferences-profile strong { font-size:15px; }
.preferences-profile .muted { font-size:12px; overflow-wrap:anywhere; }
.avatar-picker-trigger { flex-shrink:0; display:grid; justify-items:center; gap:7px; padding:2px; border:0; border-radius:12px; background:transparent; }
.avatar-picker-trigger:hover { background:transparent; }
.avatar-picker-picture { position:relative; display:flex; }
.avatar-picker-trigger:hover .avatar { outline:2px solid var(--accent); outline-offset:3px; border-radius:17px; }
.avatar-picker-label { color:var(--accent); font-size:10px; }
.avatar-edit { position:absolute; right:-4px; bottom:-2px; display:grid; place-items:center; width:20px; height:20px; border:1px solid var(--line-strong); border-radius:50%; background:var(--surface); color:var(--accent); }
.avatar-edit svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.preferences-body fieldset { padding:0; margin:0 0 24px; border:0; min-width:0; }
.preferences-body legend { margin-bottom:5px; font-size:14px; font-weight:650; }
.avatar-dialog { width:min(460px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:hidden; }
.avatar-dialog[open] { display:flex; flex-direction:column; }
.avatar-dialog header { flex-shrink:0; }
.avatar-dialog header h2 { font-size:18px; }
.avatar-dialog .dialog-body { min-height:0; }
.avatar-dialog .dialog-body > p { font-size:12px; margin-bottom:15px; }
.avatar-dialog footer { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:12px; padding:14px 22px; border-top:1px solid var(--line); }
.avatar-dialog footer > span { font-size:10px; }
.avatar-choices { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.avatar-choices button { position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; padding:10px 3px 8px; font-size:10px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.avatar-choices button .avatar { width:52px; height:52px; }
.avatar-choices button:hover { background:var(--surface-2); border-color:var(--line-strong); }
.avatar-choices button[aria-checked="true"] { border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1px var(--accent); }
.avatar-check { position:absolute; right:6px; top:5px; visibility:hidden; color:var(--accent); font-size:12px; }
[aria-checked="true"] .avatar-check { visibility:visible; }
.preference-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.preference-row > span { display:grid; gap:3px; }
.preference-row strong { font-weight:550; }
.preference-row small { color:var(--muted); font-size:11px; }
.preference-switch { appearance:none; position:relative; flex-shrink:0; width:38px; height:22px; min-width:38px; margin:0; padding:0; border:1px solid var(--line-strong); border-radius:20px; background:var(--surface-3); cursor:pointer; }
.preference-switch::before { content:""; position:absolute; left:3px; top:3px; width:14px; height:14px; border-radius:50%; background:var(--muted); }
.preference-switch:checked { background:#2965db; border-color:#2965db; }
.preference-switch:checked::before { transform:translateX(16px); background:white; }
.preference-numbering { padding-top:18px; }
.preference-numbering > label { margin-bottom:10px; font-weight:550; }
.numbering-controls { display:flex; gap:10px; }
.numbering-presets { display:flex; flex:1; gap:5px; }
.numbering-presets button { flex:1; padding:7px 5px; font-size:11px; background:var(--surface); }
.numbering-presets button[aria-pressed="true"] { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
#preferenceIncrement { width:80px; }
.numbering-preview { display:block; margin-top:10px; padding:10px; text-align:center; border:1px dashed var(--line-strong); border-radius:6px; font:12px/1.5 ui-monospace,monospace; color:var(--muted); }
.preference-numbering p { margin:8px 0 0; font-size:11px; }
.preferences-footer { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 22px; border-top:1px solid var(--line); }
.preferences-footer > span { font-size:10px; }
.preferences-footer > div { display:flex; gap:8px; }
@media(max-width:640px) { .avatar-choices { grid-template-columns:repeat(3,minmax(0,1fr)); } .preferences-body { padding:16px; } .preferences-footer { padding:12px; } .preferences-footer > span { display:none; } .preferences-footer > div { width:100%; justify-content:flex-end; } .preferences-dialog header { padding:15px 16px; } }
