@charset "UTF-8";

/* Sub5torage — the single visual implementation.
   Edit tokens and shared components here. Feature CSS owns geometry and state only.
   No page selectors or per-feature visual variants belong in this file. */
:root {
    color-scheme: light;
    --font-body: system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
    --font-display: var(--font-body);
    --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
    /* Dashboard palette is the shared workspace baseline; semantic aliases below consume it. */
    --signal-accent: var(--main-theme-color);
    --signal-text: var(--accent-text);
    --text-on-signal: var(--text-on-dark);
    --signal-state-bg: var(--signal-accent);
    --signal-state-text: var(--text-on-signal);
    --console-bg: #e8e8e6;
    --console-panel: #fafaf8;
    --console-inset: #f0f0ed;
    --console-scene: #e4e4e1;
    --console-text: #242424;
    --console-muted: #64645f;
    --console-rule: #d0d0ca;
    --console-rule-strong: #a5a59e;
    --console-point: #8b8b83;
    --console-point-focus: #42423e;
    --console-map-bg: var(--console-scene);
    --console-map-dot: var(--console-point);
    --console-map-contour: var(--console-rule-strong);
    --console-map-grid: var(--console-rule);
    --console-map-text: var(--console-text);
    --console-map-muted: var(--console-muted);
    --console-map-accent: var(--signal-accent);
    --console-map-marker: var(--console-point-focus);
    --console-map-highlight: #fffffc;
    --console-map-shadow: #242424;
    --console-map-shadow-scale: 2.6;
    --console-map-highlight-scale: .6;
    --console-map-label-bg: var(--console-panel);
    --console-map-node-min-radius: 22px;
    --console-map-node-max-radius: 42px;
    --console-map-hover-scale: 1.22;
    --console-map-terrain-opacity: .2;
    --console-map-cover-opacity: .68;
    --console-map-particle-size: .72px;
    --console-map-particle-step: 2.4px;
    --console-map-hover-repel: .75;
    --console-map-gravity: .012;
    --console-map-node-text: var(--text-on-dark);
    --console-map-node-active-text: var(--text-on-signal);
    --console-map-node-ring: var(--console-map-marker);
    --console-map-filter-opacity: .24;
    --console-map-title-color: var(--console-text);
    --console-map-title-size: clamp(2.25rem, 15cqw, 9rem);
    --console-map-title-weight: 800;
    --console-map-title-dot-size: 1.15px;
    --console-map-title-dot-step: 3.2px;
    --console-map-title-lines: 2;
    --console-radius: var(--shell-inner-radius);
    --console-control-radius: min(var(--radius-md), calc(var(--console-radius) / 2));
    --console-inset-radius: calc(var(--console-radius) * .65);
    --console-tag-radius: min(var(--radius-sm), calc(var(--console-radius) / 3));
    --console-cell-radius: min(var(--space-half), calc(var(--console-radius) / 6));
    --console-font-number: var(--font-body);
    --console-control-height: 32px;
    --console-menu-width: 192px;
    --console-row-height: 42px;
    --console-padding: 16px;
    --console-gap: 10px;
    --console-overlay-width: 248px;
    --console-marker-size: 8px;
    --console-line-width: 1px;
    --console-dot-size: 1px;
    --console-dot-step: 12px;
    --console-icon-size: var(--space-8);
    --console-stat-size: clamp(2.285714rem, 3vw, 2.857143rem);
    --console-heading-size: clamp(1.5rem, 2.6vw, 2.3rem);
    --console-tracking: .045em;
    --font-size-root: 14px;
    --text-xs: .857143rem;
    --text-sm: .928571rem;
    --text-base: 1rem;
    --text-lg: 1.142857rem;
    --text-xl: 1.428571rem;
    --text-2xl: 1.857143rem;
    --text-display: 3rem;
    --workspace-title-size: var(--console-heading-size);
    --tracking-display: -.035em;
    --tracking-label: .075em;
    --line-height: 1.5;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-strong: 600;
    --space-0: 0px;
    --space-half: 2px;
    --space-1: 4px;
    --space-1h: 6px;
    --space-2: 8px;
    --space-2h: 10px;
    --space-3: 12px;
    --space-3h: 14px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: var(--console-radius);
    --radius-pill: 999px;
    --surface: var(--console-panel);
    --surface-sunken: var(--console-inset);
    --surface-muted: var(--console-bg);
    --surface-raised: var(--console-panel);
    --surface-contrast: #262626;
    --text-secondary-on-contrast: #c7c7c7;
    --border-on-contrast: rgb(255 255 255 / .13);
    --module-padding: var(--console-padding);
    --module-radius: var(--console-radius);
    --module-title-size: clamp(1.2rem, 1.5vw, 1.6rem);
    --focus-number-size: clamp(3rem, 4.5vw, 5rem);
    --wash-lilac: var(--surface-sunken);
    --wash-sage: var(--surface-sunken);
    --wash-peach: var(--surface-sunken);
    --text-primary: var(--console-text);
    --text-on-dark: #ffffff;
    --text-on-light: #000000;
    --text-on-accent: var(--text-on-light);
    --text-secondary: var(--console-muted);
    --text-faint: var(--console-muted);
    --border-subtle: var(--console-rule);
    --border-strong: var(--console-rule-strong);
    --border-table: var(--border-strong);
    --main-theme-color: #ff9b05;
    --accent-text: color-mix(in srgb, var(--main-theme-color) 30%, var(--text-primary));
    --main-theme-color-rgb: 255, 155, 5;
    --accent-2: var(--main-theme-color);
    --accent-2-rgb: var(--main-theme-color-rgb);
    --accent-h: 36;
    --accent-s: 100%;
    --accent-l: 51%;
    --color-success: #226d50;
    --color-success-rgb: 34, 109, 80;
    --color-warning: #8d590e;
    --color-warning-rgb: 141, 89, 14;
    --color-danger: #b62e3b;
    --color-danger-rgb: 182, 46, 59;
    --color-info: #3566bd;
    --color-info-rgb: 53, 102, 189;
    --overlay-bg: rgb(0 0 0 / .38);
    --image-scrim: rgb(0 0 0 / .58);
    --shadow-none: none;
    --shadow-sm: 0 1px 2px rgb(51 43 30 / .04), 0 3px 9px rgb(51 43 30 / .025);
    --shadow-md: 0 2px 5px rgb(51 43 30 / .035), 0 12px 32px rgb(51 43 30 / .07);
    --shadow-lg: 0 8px 24px rgb(51 43 30 / .08), 0 28px 80px rgb(51 43 30 / .14);
    --shadow-card-hover: 0 4px 10px rgb(51 43 30 / .05), 0 18px 40px rgb(51 43 30 / .1);
    --paper-texture: none;
    --shell-wash: none;
    --frame-radius: var(--console-radius);
    --scene-radius: var(--console-radius);
    --frame-padding: 14px;
    --scene-title-size: clamp(2.7rem, 5.3vw, 5.5rem);
    --scene-title-weight: 500;
    --scene-scrim: rgb(0 0 0 / .3);
    --glass-panel-bg: var(--surface-raised);
    --glass-panel-border: rgb(255 255 255 / .5);
    --glass-panel-blur: none;
    --blur-none: none;
    --blur-sm: blur(4px);
    --blur-md: blur(12px);
    --state-hover-bg: var(--surface-sunken);
    --state-hover-border: var(--border-strong);
    --state-active-bg: rgba(var(--main-theme-color-rgb), .09);
    --state-active-border: rgba(var(--main-theme-color-rgb), .28);
    --state-active-text: var(--accent-text);
    --state-focus-ring: 0 0 0 3px rgba(var(--main-theme-color-rgb), .2);
    --control-height: var(--console-control-height);
    --control-height-sm: 28px;
    --control-height-touch: 44px;
    --editor-control-size: var(--space-6);
    --editor-gutter-height: var(--control-height-sm);
    --editor-edge-size: calc(var(--editor-control-size) - var(--space-half));
    --explorer-width: 280px;
    --explorer-title-size: var(--text-xl);
    --explorer-row-height: 36px;
    --control-padding: var(--space-3);
    --component-border-width: 1px;
    --component-radius: var(--console-control-radius);
    --panel-radius: var(--console-radius);
    --panel-padding: var(--console-padding);
    --shell-frame-inset: 0px;
    --shell-frame-stroke: 5px;
    --shell-frame-radius: 0px;
    --shell-inner-radius: 26px;
    --shell-frame-color: #050505;
    --shell-icon-color: #ffffff;
    --shell-icon-hover: #202020;
    --shell-icon-active: #292929;
    --shell-rail-left: var(--shell-frame-inset);
    --shell-rail-width: 56px;
    --account-photo-height: min(var(--account-panel-width), 44dvh);
    --account-panel-width: 320px;
    --tilt-angle: 8deg;
    --tilt-perspective: 1000px;
    --tilt-response: 80ms;
    --shell-rail-span: calc(var(--shell-frame-inset) + var(--shell-rail-width));
    --shell-rail-inset: 16px;
    --sub5-sidebar-reserved-width: var(--shell-rail-span);
    --sub5-mobile-viewport-bottom: env(safe-area-inset-bottom, 0px);
    --sub5-mobile-dock-space: env(safe-area-inset-bottom, 0px);
    --bento-padding: var(--console-padding);
    --accent-soft: color-mix(in srgb, var(--main-theme-color) 12%, var(--surface-raised));
    --accent-soft-strong: color-mix(in srgb, var(--main-theme-color) 22%, var(--surface-raised));
    --ring-size: 148px;
    --ring-track: color-mix(in srgb, var(--text-primary) 12%, transparent);
    --card-padding: var(--console-padding);
    --motion-distance: 6px;
    --motion-lift: -2px;
    --z-base: 0;
    --z-shell: 10;
    --z-dropdown: 100;
    --z-modal: 200;
    --z-toast: 300;
    --z-tooltip: 400;
    --ease: cubic-bezier(.2, .7, .25, 1);
    --ease-spring: cubic-bezier(.2, .85, .25, 1.12);
    --duration-fast: .16s;
    --duration: .24s;
    --duration-slow: .36s;
    --duration-reveal: .46s;
    --editor-bg: transparent;
    --code-bg: var(--surface-sunken);
    --code-text: var(--text-primary);
    --code-border: var(--border-strong);
    --code-accent: var(--main-theme-color);
    --code-token-keyword: #7b3cb3;
    --code-token-string: #247348;
    --code-token-comment: var(--text-faint);
    --code-token-comment-style: italic;
    --code-token-number: #855018;
    --code-token-function: #315fba;
    --code-token-definition: #315fba;
    --code-token-type: #795711;
    --code-token-property: #a4434c;
    --code-token-punctuation: var(--text-secondary);
    --code-token-regexp: #247348;
    --content-grid-color: var(--border-strong);
    --graph-label-opacity: 1;
    /* Public compatibility names for persisted data and existing renderers. */
    --bg-pure: var(--surface);
    --bg-color: var(--surface-muted);
    --text-color: var(--text-primary);
    --text-muted: var(--text-secondary);
    --text-gray: var(--text-faint);
    --border-color: var(--border-strong);
    --glass-bg: var(--surface);
    --glass-bg-strong: var(--surface);
    --glass-border: var(--border-strong);
    --glass-shadow: var(--shadow-md);
    --glass-blur: none;
}
html.dark-mode {
    color-scheme: dark;
    --console-bg: #101010;
    --console-panel: #171717;
    --console-inset: #202020;
    --console-scene: #111111;
    --console-text: #efefeb;
    --console-muted: #b2b2ab;
    --console-rule: #373734;
    --console-rule-strong: #686861;
    --console-point: #77776e;
    --console-point-focus: #d6d6ce;
    --console-map-node-text: var(--text-on-light);
    --console-map-highlight: #e6e6de;
    --console-map-shadow: #080808;
    --console-map-shadow-scale: 1;
    --console-map-highlight-scale: 1;
    --shell-frame-color: #ffffff;
    --shell-icon-color: #050505;
    --shell-icon-hover: #f0f0f0;
    --shell-icon-active: #e4e4e4;
    --accent-text: var(--text-primary);
    --accent-soft: var(--surface-sunken);
    --accent-soft-strong: var(--border-subtle);
    --state-active-bg: rgb(255 255 255 / .08);
    --state-active-border: var(--border-strong);
    --glass-panel-border: rgb(255 255 255 / .13);
    --color-success: #62c794;
    --color-success-rgb: 98, 199, 148;
    --color-warning: #e0b067;
    --color-warning-rgb: 224, 176, 103;
    --color-danger: #ef8790;
    --color-danger-rgb: 239, 135, 144;
    --color-info: #8fb5f4;
    --color-info-rgb: 143, 181, 244;
    --overlay-bg: rgb(0 0 0 / .65);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .12), 0 3px 9px rgb(0 0 0 / .08);
    --shadow-md: 0 4px 16px rgb(0 0 0 / .2);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / .3);
    --shadow-card-hover: 0 4px 10px rgb(0 0 0 / .12), 0 18px 40px rgb(0 0 0 / .24);
    --paper-texture: none;
    --code-token-keyword: #c69be8;
    --code-token-string: #8dc79e;
    --code-token-comment: #a5a5a5;
    --code-token-number: #e0b067;
    --code-token-function: #93b6f4;
    --code-token-definition: #93b6f4;
    --code-token-type: #e0ca84;
    --code-token-property: #e6a0a8;
    --code-token-regexp: #8dc79e;
}
html { font-size: var(--font-size-root); font-family: var(--font-body); }
body { background-color: var(--surface-muted); background-image: var(--shell-wash); background-attachment: fixed; color: var(--text-primary); font-family: var(--font-body); font-size: var(--text-base); line-height: var(--line-height); font-weight: var(--weight-normal); -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: var(--weight-strong); line-height: 1.3; color: var(--text-primary); }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4, h5, h6 { font-size: var(--text-base); }
small, .ui-caption { font-size: var(--text-xs); color: var(--text-secondary); }
strong, b, .ui-emphasis { font-weight: var(--weight-strong); }
.ui-muted { color: var(--text-secondary); }
.ui-title { font-family: var(--font-body); font-size: var(--text-xl); font-weight: var(--weight-strong); line-height: 1.3; letter-spacing: -.025em; }
.ui-number, .ui-metric { font-family: var(--console-font-number); font-style: normal; font-stretch: normal; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "zero" 0; }
.ui-metric { font-size: var(--console-stat-size); font-weight: var(--weight-strong); line-height: 1.1; letter-spacing: -.025em; }
.ui-display { font-family: var(--font-display); font-size: var(--text-display); font-weight: var(--weight-strong); line-height: 1.15; letter-spacing: var(--tracking-display); }
.ui-workspace-heading { font-family: var(--font-display); font-size: var(--workspace-title-size); font-weight: var(--weight-strong); line-height: 1.2; letter-spacing: var(--tracking-display); }
.ui-eyebrow { font-family: var(--font-body); color: var(--accent-text); font-size: var(--text-xs); font-weight: var(--weight-strong); letter-spacing: var(--tracking-label); }
.ui-text-danger { color: var(--color-danger); }
::selection { background: rgba(var(--main-theme-color-rgb), .2); }
:where(button, input, select, textarea, [role="button"], .ui-button) { font-family: var(--font-body); font-size: var(--text-sm); line-height: var(--line-height); }
:where(button, [role="button"], input[type="button"], input[type="submit"], .ui-button) {
    min-height: var(--control-height); padding: var(--space-1h) var(--control-padding);
    border: var(--component-border-width) solid var(--border-strong); border-radius: var(--component-radius);
    background: var(--surface); color: var(--text-primary); font-weight: var(--weight-medium);
    cursor: pointer; box-shadow: none; text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), box-shadow var(--duration) var(--ease), color var(--duration-fast) var(--ease);
}
:where(button, [role="button"], .ui-button):hover { background: var(--state-hover-bg); border-color: var(--state-hover-border); text-decoration: none; }
:where(button, [role="button"], .ui-button):active { background: var(--state-active-bg); }
.ui-primary { background: var(--signal-accent); color: var(--text-on-signal); border-color: transparent; box-shadow: none; }
.ui-primary:hover { background: var(--main-theme-color); filter: brightness(.94); border-color: transparent; }
.ui-danger { color: var(--color-danger); }
.ui-danger:hover { background: rgba(var(--color-danger-rgb), .1); }
.ui-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.ui-icon { width: var(--control-height); min-width: var(--control-height); height: var(--control-height); padding: var(--space-1h); display: inline-flex; align-items: center; justify-content: center; }
.ui-compact { min-height: var(--control-height-sm); padding: var(--space-half) var(--space-2); }
/* Spatial editing controls have bounded hit regions. They never inherit the
   toolbar icon's square size or responsive touch expansion. */
.ui-editor-control { display: inline-flex; align-items: center; justify-content: center; width: var(--editor-control-size); height: var(--editor-control-size); min-width: 0; min-height: 0; padding: 0; border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--radius-xs); background: var(--surface); color: var(--text-secondary); font-size: var(--text-xs); line-height: 1; box-shadow: none; }
.ui-editor-control[data-control-kind="gutter"] { width: var(--editor-control-size); height: var(--editor-gutter-height); }
.ui-editor-control[data-control-kind="edge-column"] { width: var(--editor-edge-size); height: auto; }
.ui-editor-control[data-control-kind="edge-row"] { width: auto; height: var(--editor-edge-size); }
.ui-editor-control:hover { background: var(--state-hover-bg); border-color: var(--state-hover-border); color: var(--text-primary); }
.ui-editor-control:focus-visible { opacity: 1; }
.ui-editor-control.is-dragging { background: var(--signal-accent); border-color: var(--signal-accent); color: var(--text-on-signal); }
.ui-editor-block-target { background: var(--state-hover-bg); box-shadow: inset var(--component-border-width) 0 var(--signal-accent); }

.ui-block-drag-preview { position: fixed; z-index: calc(var(--z-modal) + 5); width: min(360px, calc(100vw - var(--space-6))); box-sizing: border-box; padding: var(--space-3); border: var(--component-border-width) solid var(--border-strong); border-radius: var(--console-inset-radius); background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-lg); pointer-events: none; user-select: none; }
.ui-block-drag-label { display: block; margin-block-end: var(--space-2); color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-strong); }
.ui-block-drag-preview-body { max-height: 5.1em; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; color: var(--text-primary); font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.ui-block-drag-status { display: block; margin: var(--space-2) 0 0; padding-block-start: var(--space-2); border-block-start: var(--component-border-width) solid var(--border-subtle); color: var(--accent-text); font-size: var(--text-xs); }
.ui-block-drag-preview[data-drop-state="invalid"] .ui-block-drag-status { color: var(--text-secondary); }
.ui-block-drag-source { position: absolute; z-index: 4; left: 0; right: 0; box-sizing: border-box; border: var(--component-border-width) dashed var(--signal-accent); border-radius: var(--radius-xs); background: rgba(var(--main-theme-color-rgb), .1); pointer-events: none; }
.ui-block-drop-indicator { position: absolute; z-index: 6; left: 0; right: 0; height: 3px; border-radius: var(--radius-pill); background: var(--signal-accent); box-shadow: 0 0 0 1px var(--surface-raised); pointer-events: none; }
.ui-block-drop-indicator::before { content: ''; position: absolute; left: -3px; top: -2px; width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--signal-accent); }
.ui-block-reorder-active { overflow-anchor: none; scroll-behavior: auto; --block-reorder-duration: var(--duration-fast); --block-reorder-easing: var(--ease); }
.ui-block-reorder-active .cm-scroller { overflow-anchor: none; }
.ui-block-drag-origin { display: block; height: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; line-height: 0; }
.ui-block-drag-slot { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 1px; box-sizing: border-box; overflow: hidden; border: var(--component-border-width) dashed var(--signal-accent); border-radius: var(--console-inset-radius); background: rgba(var(--main-theme-color-rgb), .06); color: var(--accent-text); font-family: var(--font-body); font-size: var(--text-xs); line-height: 1.4; pointer-events: none; user-select: none; }
.ui-block-drag-preview.ui-block-drag-lift { max-width: calc(100vw - var(--space-4)); max-height: calc(100dvh - var(--space-4)); padding: 0; overflow: hidden; border: var(--component-border-width) solid var(--border-strong); border-radius: var(--console-inset-radius); background: var(--surface-raised); box-shadow: var(--shadow-lg); opacity: .96; }
.ui-block-drag-rendered { display: block; position: relative; width: 100%; max-height: calc(100dvh - var(--space-12)); overflow: hidden; outline: 0; background: var(--editor-bg); color: var(--text-primary); }
.ui-block-drag-rendered .ui-block-drag-rendered-content { min-height: 0; margin: 0; padding: 0; caret-color: transparent; }
.ui-block-drag-rendered :is(.nmd-table-add, .nmd-table-del, .nmd-image-handle, .nmd-media-resize) { display: none; }
.ui-block-drag-lift .ui-block-drag-status { margin: 0; padding: var(--space-2) var(--space-3); border-block-start: var(--component-border-width) solid var(--border-subtle); background: var(--surface-raised); }
.ui-block-drag-media-placeholder { display: flex; align-items: center; justify-content: center; min-height: var(--space-12); padding: var(--space-3); box-sizing: border-box; background: var(--surface-sunken); color: var(--text-secondary); border-radius: var(--console-inset-radius); }


:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]), select, textarea, .ui-input) {
    min-height: var(--control-height); padding: var(--space-1h) var(--control-padding);
    border: var(--component-border-width) solid var(--border-strong); border-radius: var(--component-radius);
    background: var(--surface); color: var(--text-primary); box-shadow: none;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 1; }
input[type="file"]::file-selector-button { margin-inline-end: var(--space-2); padding: var(--space-half) var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-sunken); color: var(--text-primary); font: inherit; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--state-hover-bg); }
textarea { line-height: 1.6; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--main-theme-color); }
:where(button, input, select, textarea, a, [tabindex], [role="button"]):focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; box-shadow: var(--state-focus-ring); }
:where(button, input, select, textarea):disabled, [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
[aria-busy="true"] { cursor: progress; }
.ui-surface { background: var(--surface); color: var(--text-primary); border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--panel-radius); box-shadow: none; }
.ui-paper { background-color: var(--surface); background-image: var(--paper-texture); color: var(--text-primary); border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--panel-radius); box-shadow: none; }
.ui-inset { background: var(--surface-sunken); border-radius: var(--console-inset-radius); }
.ui-popover, .ui-dialog { background: var(--surface-raised); color: var(--text-primary); border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--panel-radius); box-shadow: var(--shadow-lg); }
.ui-overlay { background: var(--overlay-bg); backdrop-filter: var(--blur-sm); }
.ui-interactive { border-radius: var(--component-radius); color: var(--text-primary); transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease); }
.ui-interactive:hover { background: var(--state-hover-bg); }
.ui-interactive:is(.active, .selected, .is-active, .is-selected, [aria-selected="true"], [aria-current="page"]), [role="tab"][aria-selected="true"] { background: var(--state-active-bg); color: var(--state-active-text); }
.ui-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-half) var(--space-2); background: var(--surface-sunken); color: var(--text-secondary); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.ui-divider { border-bottom: var(--component-border-width) solid var(--border-subtle); }
.ui-decoration { display: none; }
hr { border: 0; border-top: var(--component-border-width) solid var(--border-strong); }
table { border-collapse: collapse; color: var(--text-primary); }
th { background: var(--surface-sunken); color: var(--text-secondary); font-weight: var(--weight-strong); font-size: var(--text-sm); }
th, td { border-bottom: var(--component-border-width) solid var(--border-subtle); padding: var(--space-2) var(--space-3); }
tr:hover > td { background: var(--state-hover-bg); }
code, pre, kbd, samp { font-family: var(--font-mono); font-size: var(--text-sm); }
pre { padding: var(--space-4); background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-border); border-radius: var(--component-radius); overflow: auto; }
:not(pre) > code, kbd { background: var(--surface-sunken); border-radius: var(--radius-xs); padding: var(--space-half) var(--space-1); }
blockquote { border-left: 3px solid var(--border-strong); color: var(--text-secondary); padding-left: var(--space-4); }
progress { accent-color: var(--main-theme-color); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); }
::-webkit-scrollbar-track { background: transparent; }
/* Shared adapters: editor, canvas, navigation and ephemeral overlays. */
.cm-editor { background: var(--editor-bg); color: var(--text-primary); font-family: var(--font-body); }
.cm-editor .cm-scroller { font-family: var(--font-body); line-height: var(--line-height); }
.cm-content { caret-color: var(--main-theme-color); }
.cm-activeLine { background: var(--state-hover-bg); }
.cm-selectionBackground { background: var(--state-active-bg); }
.cm-tooltip { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--component-radius); box-shadow: var(--shadow-md); }
.board-grid-dots { background-image: radial-gradient(circle, var(--content-grid-color) 1px, transparent 1px); background-size: 40px 40px; }
.board-grid-lines { background-image: linear-gradient(var(--content-grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--content-grid-color) 1px, transparent 1px); background-size: 40px 40px; }
.board-group-frame { border: 1px dashed var(--state-active-border); background: var(--state-active-bg); border-radius: var(--component-radius); }
.drag-selection-box { border: 1px solid var(--main-theme-color); background: rgba(var(--main-theme-color-rgb), .1); }
.ui-session-banner { position: fixed; left: 50%; bottom: var(--space-4); transform: translateX(-50%); z-index: var(--z-toast); display: flex; align-items: center; gap: var(--space-2); max-width: calc(100vw - 32px); padding: var(--space-2) var(--space-3); background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: var(--panel-radius); box-shadow: var(--shadow-md); font-size: var(--text-sm); }
.ui-session-banner-action { white-space: nowrap; font-weight: var(--weight-strong); }
.ui-notification-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding-inline: 3px; border-radius: var(--radius-pill); background: var(--color-danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.ui-visually-hidden { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ui-graph-canvas { font-size: var(--text-xs); font-family: var(--font-body); }
.ui-select { min-height: var(--control-height); border: 1px solid var(--border-strong); border-radius: var(--component-radius); padding: var(--space-1h) var(--space-3); background: var(--surface); color: var(--text-primary); font: inherit; }
.ui-tree-toggle { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; width: var(--control-height-sm); min-height: var(--control-height-sm); padding: var(--space-1); color: var(--text-secondary); }
.ui-tree-label { font-size: var(--text-sm); color: var(--text-primary); }
.ui-text-strong { font-weight: var(--weight-strong); }
.ui-breadcrumb-separator { color: var(--text-faint); margin-inline: var(--space-1h); }
.ui-popover { z-index: var(--z-dropdown); }
/* Searchable choice panels: a clear selection first, contextual actions second. */
.ui-picker-trigger { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); min-height: 56px; text-align: left; background: var(--surface-raised); border-color: var(--border-subtle); border-radius: var(--radius-md); box-shadow: none; }
.ui-picker-trigger[aria-expanded="true"] { border-color: var(--accent-text); background: var(--surface-raised); }
.ui-picker-label { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: var(--space-half); }
.ui-picker-label small { color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-normal); }
.ui-picker-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-base); font-weight: var(--weight-strong); }
.ui-picker-chevron { color: var(--text-secondary); font-size: var(--text-xs); transition: transform var(--duration-fast) var(--ease); }
.ui-picker-trigger[aria-expanded="true"] .ui-picker-chevron { transform: rotate(180deg); }
.ui-choice-panel { display: flex; flex-direction: column; padding: var(--space-2); border-radius: var(--radius-xl); overflow: hidden; }
.ui-choice-panel[hidden], .ui-choice-panel [hidden] { display: none; }
.ui-choice-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); flex-shrink: 0; padding: var(--space-4) var(--space-3) var(--space-3); }
.ui-choice-heading h2 { margin: 0; color: var(--text-primary); font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: -.02em; }
.ui-choice-heading p { margin: var(--space-1) 0 0; color: var(--text-secondary); font-size: var(--text-sm); }
.ui-choice-heading .ui-icon { margin-top: calc(var(--space-1) * -1); }
.ui-choice-search { display: flex; align-items: center; flex-shrink: 0; gap: var(--space-2); margin: 0 var(--space-3) var(--space-3); padding: 0 var(--space-3); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text-secondary); }
.ui-choice-search:focus-within { border-color: var(--accent-text); box-shadow: var(--state-focus-ring); }
.ui-choice-search input { flex: 1; min-width: 0; width: 100%; min-height: var(--control-height-touch); padding: var(--space-2) 0; color: var(--text-primary); background: transparent; border: 0; border-radius: 0; }
.ui-choice-search input:focus-visible { outline: none; box-shadow: none; }
.ui-choice-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-1) var(--space-1) var(--space-2); }
.ui-choice-scopes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); padding: 0 var(--space-2) var(--space-3); }
.ui-choice-scope { display: flex; justify-content: center; align-items: center; gap: var(--space-2); min-height: var(--control-height-touch); border-color: var(--border-subtle); border-radius: var(--radius-md); box-shadow: none; background: var(--surface); color: var(--text-secondary); }
.ui-choice-scope[aria-pressed="true"] { background: var(--signal-state-bg); border-color: var(--signal-state-bg); color: var(--signal-state-text); font-weight: var(--weight-strong); }
.ui-choice-section-title { display: flex; align-items: center; justify-content: space-between; margin: var(--space-1) var(--space-3) var(--space-2); color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.ui-choice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 var(--space-1); margin: var(--space-half) 0; padding: 0 var(--space-1); border: 1px solid transparent; border-radius: var(--radius-md); color: var(--text-primary); }
.ui-choice-row:hover, .ui-choice-row:focus-within { background: var(--surface); }
.ui-choice-row[data-selected="true"] { background: var(--signal-state-bg); border-color: var(--signal-state-bg); color: var(--signal-state-text); }
.ui-choice-select { display: flex; align-items: center; gap: var(--space-3); min-width: 0; min-height: var(--control-height-touch); padding: var(--space-1) var(--space-2); text-align: left; color: inherit; border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: none; }
.ui-choice-select:hover, .ui-choice-select:active { background: transparent; }
.ui-choice-symbol { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; background: var(--surface-sunken); color: var(--text-secondary); border-radius: var(--radius-sm); }
.ui-picker-trigger .ui-choice-symbol, .ui-choice-row[data-selected="true"] .ui-choice-symbol { background: var(--signal-accent); color: var(--text-on-signal); }
.ui-choice-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--text-base); font-weight: var(--weight-medium); }
.ui-choice-row[data-selected="true"] .ui-choice-name { font-weight: var(--weight-strong); }
.ui-choice-check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; background: var(--signal-accent); color: var(--text-on-signal); border-radius: var(--radius-pill); font-size: var(--text-xs); }
.ui-choice-more { color: var(--text-secondary); }
.ui-choice-more[aria-expanded="true"] { background: var(--surface-sunken); color: var(--text-primary); }
.ui-choice-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); margin: 0 var(--space-2) var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border-subtle); }
.ui-choice-action { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-height-touch); padding: var(--space-2); background: transparent; border: 0; box-shadow: none; text-align: left; font-size: var(--text-sm); }
.ui-choice-action > i { width: var(--space-4); text-align: center; }
.ui-choice-row.dragging { opacity: .48; }
.ui-choice-row.drag-over { border-color: var(--accent-text); }
.ui-choice-empty { padding: var(--space-6) var(--space-3); margin: 0; text-align: center; color: var(--text-secondary); font-size: var(--text-sm); }
.ui-choice-footer { display: flex; flex-shrink: 0; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--border-subtle); }
.ui-choice-create { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-height-touch); background: var(--surface-contrast); color: var(--text-on-dark); border-color: transparent; border-radius: var(--radius-md); box-shadow: none; }
.ui-choice-create:hover { background: var(--surface-contrast); color: var(--text-on-dark); border-color: transparent; filter: brightness(1.15); }
.ui-modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: var(--overlay-bg); }
.ui-toolbar-separator { width: 1px; height: var(--space-5); margin-inline: var(--space-1); background: var(--border-strong); flex-shrink: 0; }
.ui-embed-hint { padding: var(--space-1h) var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--component-radius); background: var(--surface); color: var(--text-secondary); font-size: var(--text-xs); box-shadow: var(--shadow-sm); }
.ui-embed-surface { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: var(--panel-radius); }
.ui-row { display: flex; align-items: center; gap: var(--space-2); }
.ui-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
.ui-avatar { border-radius: var(--radius-pill); object-fit: cover; }
.ui-media { border-radius: var(--component-radius); }
.ui-thumbnail, .ui-media-frame { border: 1px solid var(--border-strong); border-radius: var(--component-radius); }
.ui-dismiss { color: var(--text-on-dark); background: var(--overlay-bg); border: 0; border-radius: var(--radius-pill); }
.ui-link, .ui-text-accent { color: var(--accent-text); }
.ui-centered { display: inline-flex; align-items: center; justify-content: center; }
.ui-menu-item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
.ui-menu-item:hover, .ui-list-row:hover { background: var(--state-hover-bg); }
.ui-list-row { padding: var(--space-2) var(--space-3); }
.ui-on-accent { color: var(--content-foreground, var(--text-on-accent)); }
.ui-on-accent :is(.ui-caption, .ui-muted) { color: var(--content-foreground, var(--text-on-accent)); }
.ui-success { color: var(--color-success); }
.ui-warning { color: var(--color-warning); }
.ui-badge.ui-danger { color: var(--color-danger); }
.ui-badge.ui-warning { color: var(--color-warning); }
.ui-badge.ui-success { color: var(--color-success); }
.ui-dialog { padding: var(--panel-padding); }
.ui-content-swatch { background-color: var(--content-color); }
.ui-content-text { color: var(--content-color); }
.ui-tree-row { padding-inline-start: var(--space-2); }
.ui-status-bar { background: var(--color-info); }
.ui-status-bar[data-ui-status="danger"] { background: var(--color-danger); }
.ui-status-bar[data-ui-status="warning"] { background: var(--color-warning); }
.ui-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.ui-field { display: flex; flex-direction: column; gap: var(--space-1h); }
.ui-empty { padding: var(--space-6); color: var(--text-secondary); text-align: center; }
.ui-spinner { width: var(--space-5); height: var(--space-5); border: 2px solid var(--border-strong); border-top-color: var(--main-theme-color); border-radius: var(--radius-pill); animation: ui-spin .8s linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
.ui-inline-icon { margin-inline-end: var(--space-1h); }
.ui-drag-handle { color: var(--text-faint); cursor: grab; padding: var(--space-1); }
.ui-empty-state { padding: var(--space-8); color: var(--text-secondary); text-align: center; }
.ui-empty-icon { display: block; font-size: var(--text-2xl); color: var(--text-faint); margin-bottom: var(--space-3); }
.ui-panel-body { padding: var(--panel-padding); }
.ui-reset-margin { margin: 0; }
.ui-data-bar { background: var(--content-color, var(--main-theme-color)); color: var(--content-foreground, var(--text-on-accent)); border-radius: var(--radius-xs); }
.ui-data-outline { outline: 1px solid var(--content-border, var(--border-strong)); outline-offset: -1px; }
.ui-editor-heading-1, .ui-editor-heading-2, .ui-editor-heading-3, .ui-editor-heading-4, .ui-editor-heading-5, .ui-editor-heading-6 { font-family: var(--font-display); color: var(--text-primary); font-weight: var(--weight-strong); line-height: 1.3; }
.ui-editor-heading-1 { font-size: var(--text-2xl); }
.ui-editor-heading-2 { font-size: var(--text-xl); }
.ui-editor-heading-3 { font-size: var(--text-lg); }
.ui-editor-heading-4 { font-size: var(--text-base); }
.ui-editor-heading-5, .ui-editor-heading-6 { font-size: var(--text-sm); }
.ui-text-italic { font-style: italic; }
.ui-text-strike { text-decoration: line-through; color: var(--text-secondary); }
.ui-inline-code, .ui-code-line { font-family: var(--font-mono); background: var(--code-bg); color: var(--code-text); }

.ui-code-line { box-sizing: border-box; padding-inline: var(--space-4); border-inline: var(--component-border-width) solid var(--code-border); font-size: var(--text-sm); line-height: 1.7; }
.ui-code-block-start { border-block-start: var(--component-border-width) solid var(--code-border); border-start-start-radius: var(--console-inset-radius); border-start-end-radius: var(--console-inset-radius); }
.ui-code-block-end { border-block-end: var(--component-border-width) solid var(--code-border); border-end-start-radius: var(--console-inset-radius); border-end-end-radius: var(--console-inset-radius); padding-block-end: var(--space-3); }
.ui-code-header { position: relative; min-height: var(--control-height); box-sizing: border-box; padding: var(--space-2) calc(var(--control-height-sm) + var(--space-6)) var(--space-2) var(--space-4); border-block-end: var(--component-border-width) solid var(--code-border); color: var(--text-secondary); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.7; }
.ui-code-line.ui-code-body { padding-block: 0; }
.ui-code-header + .ui-code-body { padding-block-start: var(--space-2); }
.ui-code-line.ui-code-body.ui-code-block-end { padding-block-end: var(--space-3); }
/* Match CodeMirror's own line specificity so its runtime padding cannot split
   the shared header/body frame or push the language against rounded corners. */
.cm-line.ui-code-line { padding: 0 var(--space-4); }
.cm-line.ui-code-header { padding-block: var(--space-2); padding-inline-end: calc(var(--control-height-sm) + var(--space-6)); }
.cm-line.ui-code-header + .cm-line.ui-code-body { padding-block-start: var(--space-2); }
.cm-line.ui-code-line.ui-code-block-end:not(.ui-code-header) { padding-block-end: var(--space-3); }

.ui-code-footer { min-height: var(--space-3); line-height: 1; }
.ui-code-copy { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-sm); min-width: 0; height: var(--control-height-sm); min-height: 0; margin: 0; padding: 0; border: var(--component-border-width) solid var(--code-border); border-radius: var(--console-control-radius); background: var(--surface-raised); color: var(--text-secondary); font-size: var(--text-xs); line-height: 1; box-shadow: none; cursor: pointer; }
.ui-code-header .ui-code-copy { position: absolute; top: 50%; right: var(--space-3); transform: translateY(-50%); }
.ui-code-copy:hover { background: var(--state-hover-bg); color: var(--text-primary); }
.ui-code-block { overflow: hidden; margin-block: var(--space-3); border: var(--component-border-width) solid var(--code-border); border-radius: var(--console-inset-radius); background: var(--code-bg); color: var(--code-text); }
.ui-code-content { margin: 0; padding: var(--space-3) var(--space-4); overflow-x: auto; border: 0; border-radius: 0; background: transparent; color: inherit; font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.7; white-space: pre-wrap; }

.ui-inline-code { border-radius: var(--radius-xs); padding: var(--space-half) var(--space-1); }
.ui-quote-line { border-left: 3px solid var(--main-theme-color); color: var(--text-secondary); }
.ui-callout-line { border-left: 3px solid rgb(var(--callout-rgb, var(--main-theme-color-rgb))); background: rgba(var(--callout-rgb, var(--main-theme-color-rgb)), .07); }
.ui-document-link { background: var(--surface-sunken); border: 1px solid var(--border-strong); border-radius: var(--component-radius); color: var(--accent-text); }
.ui-document-link::before { font-family: "Font Awesome 6 Free"; font-weight: var(--weight-normal); color: var(--text-secondary); }
.ui-svg-icon { fill: currentColor; }
.ui-connection { fill: none; stroke: var(--content-color, var(--main-theme-color)); stroke-width: 2; stroke-linecap: round; }
.ui-button.ui-primary, a.ui-primary, [role="button"].ui-primary { background: var(--signal-accent); color: var(--text-on-signal); border-color: transparent; }
.ui-button.ui-primary:hover, a.ui-primary:hover, [role="button"].ui-primary:hover { background: var(--signal-accent); color: var(--text-on-signal); border-color: transparent; filter: brightness(.94); }
.ui-danger.ui-interactive { color: var(--color-danger); }
.ui-danger.ui-interactive:hover { background: rgba(var(--color-danger-rgb), .1); color: var(--color-danger); }
.ui-content-swatch.ui-interactive:is(.active, .selected, .is-active, .is-selected, [aria-selected="true"]) { background: var(--content-color); border-color: var(--content-color); }
.ui-on-accent.ui-interactive:is(.active, .selected, .is-active, .is-selected, [aria-selected="true"]) { color: var(--content-foreground, var(--text-on-accent)); }
.ui-content-swatch.ui-interactive:hover, .ui-data-bar.ui-interactive:is(:hover, .active, .selected, .is-active, .is-selected, [aria-selected="true"]) { background: var(--content-color, var(--main-theme-color)); }
.ui-data-bar.ui-interactive:is(:hover, .active, .selected, .is-active, .is-selected, [aria-selected="true"]) { color: var(--content-foreground, var(--text-on-accent)); }
.ui-image-surface { color: var(--text-on-dark); }
.ui-image-surface :is(h1, h2, h3, p, .ui-display, .ui-muted, .ui-caption) { color: var(--text-on-dark); }
.ui-image-overlay { display: block; background: var(--image-scrim); }
.ui-nav-item { color: var(--text-secondary); font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--weight-medium); text-decoration: none; white-space: nowrap; }
.ui-nav-item:is(.active, [aria-current="page"]) { color: var(--accent-text); }
.ui-nav-label { display: block; font-size: var(--text-xs); line-height: 1.1; }
body.sub5-shell { padding-left: var(--shell-rail-span); }
html:has(> body.sub5-shell) { scrollbar-color: var(--shell-icon-active) var(--shell-frame-color); }
html:has(> body.sub5-shell)::-webkit-scrollbar-track { background: var(--shell-frame-color); }
html:has(> body.sub5-shell)::-webkit-scrollbar-thumb { background: var(--shell-icon-active); }
.ui-shell-frame { position: fixed; inset: var(--shell-frame-inset); z-index: var(--z-shell); overflow: hidden; border-radius: var(--shell-frame-radius); box-shadow: 0 0 0 100vmax var(--surface-muted); pointer-events: none; }
.ui-shell-frame::before { content: ""; position: absolute; inset: var(--shell-frame-stroke) var(--shell-frame-stroke) var(--shell-frame-stroke) var(--shell-rail-width); border-radius: var(--shell-inner-radius); box-shadow: 0 0 0 100vmax var(--shell-frame-color); }
.ui-shell-rail { position: fixed; top: var(--shell-frame-inset); bottom: var(--shell-rail-inset); left: var(--shell-rail-left); width: var(--shell-rail-width); height: auto; display: flex; flex-direction: column; align-items: center; padding: 0 var(--space-2) var(--space-1); gap: var(--space-1); background: transparent; color: var(--shell-icon-color); border: 0; border-radius: 0; box-shadow: none; z-index: calc(var(--z-shell) + 1); }
.ui-nav-group { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); width: 100%; }
.ui-nav-group[aria-label="작업 도구"] { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-block: var(--space-2); }
.ui-nav-group[aria-label="작업 도구"]::-webkit-scrollbar { display: none; }
.ui-nav-group[aria-label="관리 도구"] { flex: 0 0 auto; margin: 0; padding-top: var(--space-2); border: 0; }
.ui-shell-rail .ui-nav-item { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: var(--space-10); height: var(--space-10); min-height: var(--space-10); margin: 0; padding: var(--space-2h); color: var(--shell-icon-color); background: transparent; border: 0; border-radius: var(--radius-pill); box-shadow: none; text-decoration: none; }
.ui-shell-rail .ui-nav-item::after { content: none; }
.ui-shell-rail .ui-nav-item:hover { background: var(--shell-icon-hover); color: var(--shell-icon-color); }
.ui-shell-rail .ui-nav-item:is(.active, [aria-current="page"]) { background: var(--shell-icon-active); color: var(--shell-icon-color); }
.ui-shell-rail :is(.ui-nav-item, .ui-profile-trigger):focus-visible { outline: 2px solid var(--shell-icon-color); outline-offset: -2px; box-shadow: none; }
.ui-nav-glyph { display: inline-flex; align-items: center; justify-content: center; width: var(--space-5); height: var(--space-5); flex-shrink: 0; color: inherit; }
.ui-nav-glyph svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ui-shell-rail .ui-profile-trigger[aria-expanded="true"] { background: var(--shell-icon-active); }
.ui-avatar:has(.ui-avatar-fallback) { display: grid; place-items: center; overflow: hidden; background: var(--accent-soft-strong); color: var(--accent-text); border-radius: var(--radius-md); }
.ui-avatar > img { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.ui-avatar-fallback { grid-area: 1 / 1; font-size: var(--text-lg); font-weight: var(--weight-strong); }
.ui-account-overlay { justify-content: flex-start; align-items: flex-end; padding: var(--space-5) var(--space-4) calc(var(--shell-rail-inset) + var(--space-3)) calc(var(--shell-rail-span) + var(--space-4)); background: transparent; backdrop-filter: none; }
.ui-account-panel.ui-dialog { position: relative; isolation: isolate; width: min(var(--account-panel-width), 100%); max-height: 100%; overflow: visible; padding: 0; border: 0; border-radius: var(--shell-inner-radius); background: transparent; box-shadow: none; perspective: var(--tilt-perspective); }
.ui-account-panel::before { content: ""; position: absolute; inset: var(--space-2) var(--space-1) 0; z-index: -1; border: 1px solid var(--border-strong); border-radius: var(--shell-inner-radius); background: var(--surface-muted); box-shadow: var(--shadow-lg); transform: translateX(calc(-1 * var(--space-1))) rotate(-2deg); pointer-events: none; }
.ui-id-card { position: relative; max-height: calc(100dvh - var(--shell-rail-inset) - var(--space-10)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; color: var(--text-primary); background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--shell-inner-radius); box-shadow: var(--shadow-lg); transform-style: preserve-3d; transform: rotateX(calc(var(--tilt-x, 0) * var(--tilt-angle) * -1)) rotateY(calc(var(--tilt-y, 0) * var(--tilt-angle))); transition: transform var(--tilt-response) linear; }
.ui-id-card::before { content: ""; position: absolute; top: var(--space-3); left: 50%; z-index: 1; width: var(--space-10); height: var(--space-1h); border-radius: var(--radius-pill); background: var(--image-scrim); box-shadow: inset 0 1px 2px var(--image-scrim), 0 1px 0 var(--surface-raised); transform: translateX(-50%); pointer-events: none; }
.ui-id-photo.ui-avatar { display: grid; width: 100%; height: var(--account-photo-height); max-height: calc(100vw - var(--shell-rail-span) - var(--space-8)); border: 0; border-radius: 0; background: var(--surface-muted); color: var(--text-secondary); }
.ui-id-photo > img { display: block; object-position: center; }
.ui-id-photo .ui-avatar-fallback { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 7rem); font-weight: var(--weight-strong); }
.ui-id-face { position: relative; margin-top: calc(-1 * var(--space-8)); padding: var(--space-5) var(--space-5) var(--space-4); border-radius: 0 var(--space-12) 0 0; background: var(--surface-raised); }
.ui-id-brand { display: block; margin-bottom: var(--space-3); font-size: var(--text-xs); font-weight: var(--weight-strong); letter-spacing: .15em; color: var(--text-secondary); }
.ui-id-name { margin: 0; font-family: var(--font-body); font-size: var(--text-2xl); line-height: 1.15; font-weight: var(--weight-strong); letter-spacing: var(--tracking-display); overflow-wrap: anywhere; }
.ui-id-handle { margin: var(--space-1h) 0 0; color: var(--text-secondary); font-size: var(--text-sm); overflow-wrap: anywhere; }
.ui-id-description { max-height: 6em; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: var(--space-3) 0 0; padding-right: var(--space-1); color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ui-id-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); }
.ui-id-appearance { display: flex; align-items: center; gap: var(--space-2); }
.ui-id-control { position: relative; display: inline-grid; place-items: center; flex: 0 0 var(--control-height-touch); width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); padding: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); color: var(--text-secondary); background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; cursor: pointer; transition: background-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease); }
.ui-id-control:hover { background: var(--state-hover-bg); color: var(--text-primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.ui-id-control > i { font-size: var(--text-base); pointer-events: none; }
.ui-id-control[aria-pressed="true"] { color: var(--text-on-signal); background: var(--main-theme-color); border-color: var(--main-theme-color); box-shadow: var(--shadow-sm); }
.ui-id-color { background: var(--main-theme-color); color: var(--text-on-signal); border-color: transparent; }
.ui-id-color:hover { background: var(--main-theme-color); color: var(--text-on-signal); }
.ui-id-color input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: var(--space-2h); margin: 0; opacity: 0; border: 0; border-radius: inherit; cursor: pointer; }
.ui-id-color:focus-within { outline: 2px solid var(--main-theme-color); outline-offset: 3px; }
.ui-id-edit { margin-left: auto; background: transparent; border-color: transparent; box-shadow: none; }
.ui-id-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: var(--text-xs); letter-spacing: .08em; }
.ui-id-logout { color: var(--text-secondary); font-size: var(--text-xs); letter-spacing: normal; text-decoration: none; }
.ui-id-logout:hover { color: var(--text-primary); text-decoration: underline; }
.ui-account-panel.ui-motion-enter { animation-name: ui-account-reveal; }
@keyframes ui-account-reveal { from { opacity: 0; transform: translateX(calc(-1 * var(--space-3))); } to { opacity: 1; transform: translateX(0); } }
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .ui-id-card { transform: none; transition: none; } }
.ui-breadcrumbs { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--space-1); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ui-breadcrumb-item { flex: 0 1 auto; min-width: 0; max-width: 180px; min-height: var(--control-height-sm); padding: var(--space-1) var(--space-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: transparent; border-color: transparent; border-radius: var(--radius-sm); box-shadow: none; }
.ui-breadcrumb-item:hover { background: var(--state-hover-bg); }
.ui-workspace-toolbar { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.ui-card { background: var(--surface-raised); color: var(--text-primary); border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--panel-radius); box-shadow: none; transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
.ui-card:hover { background-color: var(--surface-raised); border-color: var(--border-strong); box-shadow: none; }
.ui-bento-card { position: relative; padding: var(--bento-padding); border: 1px solid var(--border-subtle); border-radius: var(--panel-radius); background: var(--surface-raised); color: var(--text-primary); box-shadow: none; }
.ui-block-accent { background: var(--signal-accent); color: var(--text-on-signal); border-color: transparent; }
.ui-block-accent :is(h1, h2, h3, p, a, .ui-kicker, .ui-muted, .ui-caption, .ui-eyebrow) { color: inherit; }
.ui-block-accent .ui-button { background: var(--text-on-signal); color: var(--main-theme-color); border-color: transparent; }
.ui-block-accent .ui-button.ui-ghost { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--text-on-signal) 40%, transparent); box-shadow: none; }
.ui-block-accent .ui-button:hover { filter: brightness(.94); }
.ui-block-soft { background: var(--surface-sunken); border-color: var(--border-subtle); }
.ui-block-sage { background: var(--wash-sage); border-color: color-mix(in srgb, var(--wash-sage) 72%, var(--border-strong)); }
.ui-block-peach { background: var(--wash-peach); border-color: color-mix(in srgb, var(--wash-peach) 72%, var(--border-strong)); }
.ui-kicker { font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--weight-strong); letter-spacing: var(--tracking-label); color: var(--accent-text); }
.ui-feature-heading { font-family: var(--font-display); font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.15; letter-spacing: var(--tracking-display); font-weight: var(--weight-strong); }
.ui-section-heading { font-family: var(--font-body); font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: -.025em; }
.ui-summary-text { font-size: var(--text-lg); font-weight: var(--weight-strong); }
.ui-date-chip { padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text-secondary); font-size: var(--text-xs); }
.ui-search-field { position: relative; display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0 var(--space-2); min-width: 0; max-width: 100%; min-height: var(--control-height); flex-shrink: 0; border: 1px solid var(--border-subtle); border-radius: var(--component-radius); background: var(--surface-sunken); color: var(--text-secondary); }
.ui-search-field:focus-within { border-color: var(--main-theme-color); box-shadow: var(--state-focus-ring); }
.ui-search-field input { flex: 1 1 0%; width: 100%; min-width: 0; height: auto; border: 0; border-radius: 0; background: transparent; padding: var(--space-2) 0; box-shadow: none; font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-primary); }
.ui-search-field input:focus-visible { outline: none; box-shadow: none; }
.ui-search-field > :is(i, svg) { position: static; inset: auto; transform: none; display: block; flex: 0 0 var(--space-4); width: var(--space-4); height: var(--space-4); font-size: var(--text-sm); line-height: var(--space-4); text-align: center; color: var(--text-secondary); pointer-events: none; }
.ui-search-shortcut { flex: 0 0 auto; min-width: 0; min-height: var(--control-height-sm); padding: 0 var(--space-1); border: 0; background: transparent; box-shadow: none; color: var(--text-secondary); }
.ui-search-shortcut kbd { font: inherit; font-size: var(--text-xs); padding: var(--space-half) var(--space-1); background: var(--surface-muted); white-space: nowrap; }
.ui-text-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--accent-text); }
.ui-notice { padding: var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text-secondary); }
.ui-stat-value { font-family: var(--console-font-number); font-size: var(--console-stat-size); font-weight: var(--weight-strong); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "zero" 0; letter-spacing: -.025em; }
.ui-stat-card { padding: var(--card-padding); border: 1px solid var(--border-subtle); border-radius: var(--panel-radius); background: var(--surface-raised); color: var(--text-primary); text-decoration: none; }
.ui-stat-card.ui-block-soft { background: var(--surface-sunken); }
.ui-stat-card.ui-block-peach { background: var(--wash-peach); }
.ui-stat-icon, .ui-document-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: var(--space-10); height: var(--space-10); border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-text); font-size: var(--text-lg); }
.ui-stat-card:hover { background: var(--surface-sunken); text-decoration: none; }
.ui-stat-card > i { color: var(--accent-text); }
.ui-progress-ring { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); flex: 0 0 auto; width: var(--ring-size); height: var(--ring-size); border-radius: var(--radius-pill); background: conic-gradient(var(--main-theme-color) var(--progress-value, 0%), var(--ring-track) 0); }
.ui-progress-ring::before { content: ""; position: absolute; inset: var(--space-3); border-radius: inherit; background: var(--wash-sage); }
.ui-progress-ring > * { position: relative; }
.ui-progress-ring .ui-stat-value > span { font-size: var(--text-lg); }
.ui-progress-track { border-radius: var(--radius-pill); background: var(--ring-track); }
.ui-visual-cover { overflow: hidden; border-radius: var(--radius-lg); background: var(--accent-soft); }
.ui-visual-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ui-cover-placeholder { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--accent-soft-strong); color: var(--accent-text); }
.ui-cover-placeholder::before, .ui-cover-placeholder::after { content: ""; position: absolute; width: 65%; aspect-ratio: 1; border: 1px solid currentColor; border-radius: var(--radius-pill); opacity: .28; }
.ui-cover-placeholder::before { left: -18%; top: -25%; }
.ui-cover-placeholder::after { right: -12%; bottom: -30%; border-width: var(--space-6); }
.ui-cover-placeholder > i { position: relative; font-size: var(--text-display); }
.ui-cover-sheet { position: absolute; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-3); width: 64%; height: 78%; left: 24%; top: 18%; padding: var(--space-5); rotate: 10deg; background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-family: var(--font-display); font-size: clamp(1rem, 1.5vw, 1.8rem); font-weight: var(--weight-strong); line-height: 1.1; letter-spacing: var(--tracking-display); }
.ui-cover-sheet > i { font-size: var(--text-xl); color: var(--accent-text); }
.ui-cover-sheet-back { top: 4%; left: 10%; rotate: -14deg; background: var(--wash-peach); }
.ui-cover-spark { position: absolute; top: 0; right: 0; font-size: var(--text-display); color: var(--accent-text); }
.ui-link-card { display: flex; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface); color: var(--text-primary); text-decoration: none; transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
.ui-link-card:hover { border-color: var(--state-active-border); background: var(--accent-soft); text-decoration: none; }
.ui-link-card :is(h3, p) { font-family: var(--font-body); }
.ui-card-heading { font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: 1.4; color: var(--text-primary); }
.ui-cover-mark { position: relative; font-size: var(--text-display); color: var(--accent-text); }
.ui-list-link { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.ui-list-link:hover { color: var(--accent-text); text-decoration: none; }
.ui-activity-dot { display: inline-block; flex: 0 0 auto; width: var(--space-2); height: var(--space-2); border-radius: var(--radius-pill); background: var(--main-theme-color); }
.ui-activity-dot:is(.ui-success, .ui-warning, .ui-text-danger, .ui-text-accent) { background: currentColor; }
.ui-activity-dot[data-ui-state="read"] { background: transparent; border: 1px solid var(--text-faint); }
.ui-unread { background: var(--state-active-bg); }
.ui-check-outline { display: inline-block; width: var(--space-4); height: var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); }
.ui-chart-bar { background: var(--main-theme-color); border-radius: var(--radius-pill); }
.ui-chart-bar:is(.ui-success, .ui-warning, .ui-text-danger) { background: currentColor; }
.ui-chart-bar.ui-content-swatch { background: var(--content-color); }
.ui-chart-cell { border-radius: var(--space-half); background: color-mix(in srgb, var(--main-theme-color) 5%, var(--surface-sunken)); }
.ui-chart-cell[data-level="1"] { background: color-mix(in srgb, var(--main-theme-color) 25%, var(--surface)); }
.ui-chart-cell[data-level="2"] { background: color-mix(in srgb, var(--main-theme-color) 45%, var(--surface)); }
.ui-chart-cell[data-level="3"] { background: color-mix(in srgb, var(--main-theme-color) 70%, var(--surface)); }
.ui-chart-cell[data-level="4"] { background: var(--main-theme-color); }
/* Shared photographic workspace: frame, inset islands and glass information panels. */
.ui-workspace-frame { position: relative; padding: var(--frame-padding); background: var(--surface); border: 1px solid color-mix(in srgb, var(--surface-raised) 70%, var(--border-subtle)); border-radius: var(--frame-radius); box-shadow: var(--shadow-lg); }
.ui-photo-stage { position: relative; background: var(--surface-sunken); border-radius: var(--scene-radius); color: var(--text-on-dark); }
.ui-photo-stage > img { border-radius: inherit; }
.ui-photo-shade { background: var(--scene-scrim); border-radius: inherit; }
.ui-stage-copy, .ui-stage-copy :is(h1, h2, h3, p, .ui-kicker, .ui-caption) { color: var(--text-on-dark); }
.ui-stage-copy > .ui-kicker { font-size: var(--text-xs); font-weight: var(--weight-medium); letter-spacing: .2em; }
.ui-stage-copy > p:last-child { font-size: var(--text-sm); opacity: .85; }
.ui-display-heading { font-family: var(--font-display); font-size: var(--scene-title-size); font-weight: var(--scene-title-weight); letter-spacing: -.065em; line-height: 1.06; text-wrap: balance; text-shadow: 0 2px 24px rgb(0 0 0 / .12); }
.ui-floating-toolbar { padding: var(--space-2) var(--space-4); background: var(--surface); color: var(--text-primary); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.ui-floating-toolbar::before, .ui-floating-toolbar::after { content: ""; position: absolute; top: 0; width: var(--radius-xl); height: var(--radius-xl); pointer-events: none; background: radial-gradient(circle at 0 100%, transparent var(--radius-xl), var(--surface) calc(var(--radius-xl) + 1px)); }
.ui-floating-toolbar::before { right: 100%; }
.ui-floating-toolbar::after { left: 100%; transform: scaleX(-1); }
.ui-floating-toolbar :is(select, .ui-button) { background: transparent; border-color: transparent; box-shadow: none; border-radius: var(--radius-pill); }
.ui-floating-toolbar :is(select, .ui-button):hover { background: var(--surface-sunken); }
.ui-toolbar-label { font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap; }
.ui-toolbar-label > i { margin-right: var(--space-2); }
.ui-shelf-card { padding: var(--space-4); background: var(--surface-raised); color: var(--text-primary); border-radius: var(--radius-xl); }
.ui-shelf-card .ui-document-icon { width: var(--space-8); height: var(--space-8); border-radius: var(--radius-pill); font-size: var(--text-sm); }
.ui-shelf-row { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.ui-shelf-row:last-child { border-bottom: 0; }
.ui-shelf-row:hover { color: var(--accent-text); text-decoration: none; }
.ui-preview-tile { color: var(--text-on-dark); border: 0; border-radius: var(--radius-lg); background: var(--accent-soft); text-decoration: none; }
.ui-preview-tile:hover { text-decoration: none; }
.ui-preview-caption { background: var(--surface-raised); color: var(--text-primary); }
.ui-preview-caption :is(h3, p, .ui-card-heading, .ui-caption) { color: inherit; }
.ui-preview-caption .ui-card-heading { font-size: var(--text-xs); }
.ui-preview-caption .ui-caption { opacity: .8; }
.ui-frame-cutout { background: var(--surface); border-radius: 0 var(--scene-radius) 0 0; }
.ui-frame-cutout::before, .ui-frame-cutout::after { content: ""; position: absolute; width: var(--scene-radius); height: var(--scene-radius); pointer-events: none; background: radial-gradient(circle at 100% 0, transparent var(--scene-radius), var(--surface) calc(var(--scene-radius) + 1px)); }
.ui-frame-cutout::before { bottom: 100%; left: 0; }
.ui-frame-cutout::after { left: 100%; bottom: 0; }
.ui-launchpad { padding: var(--space-6); border-radius: var(--scene-radius); }
.ui-launchpad .ui-kicker { font-size: .64rem; letter-spacing: .1em; }
.ui-launchpad .ui-section-heading { font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: var(--weight-medium); letter-spacing: -.05em; }
.ui-launch-mark { display: inline-grid; place-items: center; width: var(--space-10); height: var(--space-10); flex-shrink: 0; border: 1px solid color-mix(in srgb, var(--text-on-signal) 30%, transparent); border-radius: var(--radius-pill); font-size: var(--text-sm); }
.ui-action-orb { display: inline-grid; place-items: center; width: var(--space-16); height: var(--space-16); border: 10px solid var(--surface); border-radius: var(--radius-pill); background: var(--signal-accent); color: var(--text-on-signal); text-decoration: none; box-shadow: none; transition: filter var(--duration) var(--ease); }
.ui-action-orb:hover { color: var(--text-on-signal); background: var(--signal-accent); border-color: var(--surface); text-decoration: none; filter: brightness(.96); }
.ui-action-orb > i { transition: rotate var(--duration) var(--ease); }
.ui-action-orb:hover > i { rotate: -35deg; }
.ui-inline-stat { color: inherit; font-size: var(--text-xs); text-decoration: none; }
.ui-inline-stat:hover { color: inherit; text-decoration: none; opacity: .7; }
.ui-inline-stat > strong { font-family: var(--console-font-number); font-size: var(--text-2xl); font-weight: var(--weight-strong); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.025em; }
.ui-launchpad .ui-inline-stat > strong { font-size: var(--text-display); }
.ui-launchpad .ui-button { min-height: var(--control-height-sm); padding: var(--space-1h) var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); }
.ui-glass-panel { padding: var(--space-5); background: var(--glass-panel-bg); backdrop-filter: var(--glass-panel-blur); border: 1px solid var(--glass-panel-border); border-radius: var(--scene-radius); color: var(--text-primary); box-shadow: var(--shadow-md); }
.ui-glass-panel .ui-kicker { color: var(--text-secondary); font-size: .64rem; letter-spacing: .12em; }
.ui-glass-panel .ui-icon { background: var(--surface); color: var(--text-primary); border: 0; border-radius: var(--radius-pill); }
.ui-glass-panel .ui-progress-ring { --ring-size: 92px; }
.ui-glass-panel .ui-progress-ring::before { inset: var(--space-2); background: var(--surface); }
.ui-glass-panel .ui-stat-value { font-size: var(--text-2xl); }
.ui-glass-panel .ui-progress-ring .ui-caption { font-size: .64rem; }
.ui-glass-panel .ui-summary-text { font-size: var(--text-xs); font-weight: var(--weight-medium); }
.ui-glass-panel .ui-badge { padding: 0; background: transparent; font-size: var(--text-xs); }
.ui-compact-scene { --scene-title-size: clamp(2.4rem, 3.4vw, 4rem); }
.ui-compact-scene .ui-glass-panel { padding: var(--space-4); border-radius: var(--module-radius); }
.ui-compact-scene .ui-glass-panel .ui-progress-ring { --ring-size: 76px; }
.ui-compact-scene .ui-glass-panel .ui-stat-value { font-size: var(--text-xl); }
.ui-compact-scene .ui-glass-panel .ui-section-heading { font-size: var(--text-base); }
/* A complete workbench consumes the same modules, compact rows and schedule roles. */
.ui-workspace-masthead { padding: var(--space-3) var(--space-3) var(--space-5); color: var(--text-primary); }
.ui-workspace-masthead h1 { font-size: var(--workspace-title-size); font-weight: var(--weight-medium); letter-spacing: var(--tracking-display); }
.ui-panel { position: relative; padding: var(--module-padding); border: 1px solid var(--border-subtle); border-radius: var(--module-radius); background: var(--surface-raised); color: var(--text-primary); }
.ui-panel.ui-block-soft { background: var(--surface-sunken); border-color: var(--border-subtle); }
.ui-panel-heading { font-family: var(--font-body); font-size: var(--module-title-size); font-weight: var(--weight-medium); line-height: 1.2; letter-spacing: -.04em; }
.ui-focus-panel { --text-primary: var(--text-on-dark); --text-secondary: var(--text-secondary-on-contrast); --text-faint: var(--text-secondary-on-contrast); --border-subtle: var(--border-on-contrast); --border-strong: var(--border-on-contrast); --surface: var(--surface-contrast); --surface-sunken: color-mix(in srgb, var(--surface-contrast) 90%, white); --state-hover-bg: rgb(255 255 255 / .06); --accent-text: var(--text-on-dark); --color-danger: #ffadb6; --color-warning: #ffd393; --color-success: #84d9b4; background: var(--surface-contrast); border-color: transparent; color: var(--text-primary); }
.ui-focus-summary { border-bottom: 1px solid var(--border-subtle); }
.ui-focus-number { font-family: var(--console-font-number); font-size: var(--focus-number-size); font-weight: var(--weight-strong); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.025em; color: var(--text-primary); }
.ui-row-index { display: inline-grid; place-items: center; flex-shrink: 0; width: var(--space-8); height: var(--space-8); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); font-family: var(--console-font-number); font-size: var(--text-xs); font-variant-numeric: lining-nums tabular-nums; color: var(--text-secondary); }
.ui-task-row, .ui-activity-row { color: var(--text-primary); background: transparent; border-radius: var(--component-radius); border: 0; border-bottom: 1px solid var(--border-subtle); text-decoration: none; box-shadow: none; transition: color var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease); }
.ui-task-row:last-child, .ui-activity-row:last-child { border-bottom: 0; }
.ui-task-row:hover, .ui-activity-row:hover { background: var(--state-hover-bg); color: var(--text-primary); text-decoration: none; }
.ui-task-row .ui-caption, .ui-activity-row .ui-caption { font-size: var(--text-xs); }
.ui-task-row .ui-badge { background: color-mix(in srgb, var(--surface-sunken) 80%, transparent); font-size: .714286rem; }
.ui-activity-row .ui-document-icon { width: var(--space-8); height: var(--space-8); font-size: var(--text-xs); border-radius: var(--radius-pill); }
.ui-stat-strip { border-block: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent); }
.ui-mini-stat { font-size: var(--text-xs); color: var(--text-secondary); }
.ui-mini-stat > strong { font-family: var(--console-font-number); font-size: var(--console-stat-size); line-height: 1.1; font-weight: var(--weight-strong); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.025em; color: var(--text-primary); }
.ui-schedule { color: var(--text-primary); }
.ui-schedule-label { color: var(--text-primary); text-decoration: none; font-size: var(--text-sm); }
.ui-schedule-label:hover { color: var(--accent-text); text-decoration: none; }
.ui-schedule-label > strong { font-weight: var(--weight-medium); }
.ui-schedule-header { font-size: var(--text-xs); color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); }
.ui-schedule-row { border-bottom: 1px solid var(--border-subtle); }
.ui-schedule-row:last-child { border-bottom: 0; }
.ui-schedule-track { background-image: repeating-linear-gradient(90deg, var(--border-subtle) 0 1px, transparent 1px 25%); }
.ui-schedule-bar { background: var(--signal-accent); color: var(--text-on-signal); border-radius: var(--radius-pill); box-shadow: none; text-decoration: none; transition: filter var(--duration-fast) var(--ease); }
.ui-schedule-bar:hover { color: var(--text-on-signal); filter: brightness(.92); text-decoration: none; }
.ui-stage-copy { animation: ui-title-arrive var(--duration-reveal) var(--ease); }
@keyframes ui-title-arrive { from { translate: 0 var(--motion-distance); } to { translate: none; } }
.ui-nav-item > i { transition: color var(--duration) var(--ease); }
.ui-nav-item:is(.active, [aria-current="page"]) > i { color: var(--accent-text); }
/* Shared editorial cover. A saved image keeps its original content and crop. */
.ui-artwork { position: relative; isolation: isolate; background-color: var(--wash-lilac); background-image: none; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.ui-artwork:not(:has(img:not([hidden]))) { color: var(--text-primary); }
.ui-artwork:not(:has(img:not([hidden]))) :is(h1, h2, h3, p, a, .ui-display, .ui-muted, .ui-caption, .ui-eyebrow) { color: var(--text-primary); }
.ui-artwork:not(:has(img:not([hidden]))) .ui-image-overlay { background: transparent; }
.ui-artwork-field { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.ui-artwork-field::before, .ui-artwork-field::after { content: ""; position: absolute; border: 1px solid color-mix(in srgb, var(--text-primary) 22%, transparent); border-radius: var(--radius-pill); }
.ui-artwork-field::before { width: clamp(180px, 26vw, 380px); aspect-ratio: 1.55; right: 6%; top: -52%; rotate: -24deg; background: color-mix(in srgb, var(--surface) 18%, transparent); }
.ui-artwork-field::after { width: clamp(120px, 18vw, 260px); aspect-ratio: 1.25; right: 10%; bottom: -38%; rotate: 24deg; border-width: 18px; border-color: color-mix(in srgb, var(--surface) 42%, transparent); outline: 1px solid color-mix(in srgb, var(--text-primary) 20%, transparent); outline-offset: 14px; }
.ui-artwork:has(img:not([hidden])) > .ui-artwork-field { display: none; }
/* Animation belongs to shared roles; editable content and canvas geometry never animate. */
.ui-motion-enter { animation: ui-reveal var(--duration-slow) var(--ease); }
.ui-artwork { animation: ui-appear var(--duration-reveal) var(--ease); }
.ui-artwork-field::after { animation: ui-ink-arrive var(--duration-reveal) var(--ease); }
@keyframes ui-reveal { from { opacity: 0; translate: 0 var(--motion-distance); } to { opacity: 1; translate: none; } }
@keyframes ui-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes ui-ink-arrive { from { opacity: 0; rotate: 12deg; } to { opacity: 1; rotate: 24deg; } }
@media (hover: hover) and (pointer: fine) {
    .ui-card:not([draggable="true"]):not([draggable="true"] *):not(.dragging, .is-dragging, .drag-over):not(.dragging *, .is-dragging *, .drag-over *) { transition: translate var(--duration) var(--ease-spring), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease); }
    .ui-card:not([draggable="true"]):not([draggable="true"] *):not(.dragging, .is-dragging, .drag-over):not(.dragging *, .is-dragging *, .drag-over *):hover { translate: 0 var(--motion-lift); }
}
.ui-canvas-viewport { overflow: clip; min-width: 0; min-height: 0; }
.ui-input-with-icon { position: relative; display: flex; align-items: center; gap: var(--space-2); }
.ui-input-with-icon > :is(i, svg) { position: absolute; inset-inline-start: var(--space-3); width: var(--space-4); pointer-events: none; color: var(--text-faint); }
.ui-input-with-icon > :is(input, select) { padding-inline-start: calc(var(--space-3) * 2 + var(--space-4)); }
.ui-tree-label { min-height: var(--control-height-sm); padding: var(--space-1); border-color: transparent; background: transparent; text-align: start; box-shadow: none; }
/* Explorer: one typography, search, row and disclosure model for every workspace. */
.ui-explorer-panel { padding: var(--panel-padding); gap: var(--space-3); background: var(--surface); color: var(--text-primary); border: 0; border-radius: var(--panel-radius); box-shadow: none; font: var(--text-sm)/var(--line-height) var(--font-body); }
.ui-explorer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-shrink: 0; height: auto; min-height: var(--space-10); margin: 0; padding: 0 0 var(--space-2); }
.ui-explorer-head > div { min-width: 0; gap: 0; }
.ui-explorer-title { margin: 0; font: var(--weight-strong) var(--explorer-title-size)/1.3 var(--font-body); letter-spacing: -.025em; color: var(--text-primary); }
.ui-explorer-description { margin: var(--space-1) 0 0; font: var(--text-xs)/var(--line-height) var(--font-body); color: var(--text-secondary); }
.ui-explorer-actions { position: relative; display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; padding: 0; margin: 0; }
.ui-explorer-actions > .ui-primary { display: flex; align-items: center; justify-content: center; gap: var(--space-2); flex: 1 1 auto; min-width: 0; }
.ui-explorer-label { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin: var(--space-2) 0 0; padding: var(--space-1) var(--space-2); color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.ui-explorer-meta { color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-normal); white-space: nowrap; }
.ui-explorer-filter { margin: 0; padding: 0; }
.ui-explorer-filter select { width: 100%; min-width: 0; }
.ui-explorer-scroll { min-height: 0; overflow-y: auto; padding: 0; }
.ui-explorer-empty { padding: var(--space-5) var(--space-2); color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.7; }
.ui-explorer-empty p { margin: 0 0 var(--space-3); }
.ui-nav-row { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-width: 0; min-height: var(--explorer-row-height); margin: 0; padding: var(--space-1) var(--space-2); border: 0; border-radius: var(--component-radius); background: transparent; color: var(--text-primary); font: var(--weight-normal) var(--text-sm)/var(--line-height) var(--font-body); text-align: start; text-decoration: none; box-shadow: none; }
.ui-nav-row:hover, .ui-nav-row:focus-within { background: var(--state-hover-bg); text-decoration: none; }
.ui-nav-row:is(.active,.is-active,.selected,.is-selected,[aria-current="page"],[aria-selected="true"],[aria-pressed="true"]) { background: var(--signal-state-bg); color: var(--signal-state-text); }
.ui-row-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.ui-row-icon { flex: 0 0 var(--space-5); width: var(--space-5); text-align: center; color: var(--text-secondary); }
.ui-row-count { margin-left: auto; flex-shrink: 0; }
.ui-nav-row > .ui-tree-label { flex: 1 1 auto; min-width: 0; min-height: var(--control-height-sm); padding: 0; color: inherit; box-shadow: none; }
.ui-nav-row > .ui-tree-toggle { flex: 0 0 var(--space-5); width: var(--space-5); min-width: var(--space-5); min-height: var(--control-height-sm); height: var(--control-height-sm); padding: 0; border: 0; box-shadow: none; }
.ui-result-row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); width: 100%; padding: var(--space-3) var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; text-align: start; box-shadow: none; }
.ui-result-row strong { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.ui-result-row > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-secondary); font-size: var(--text-xs); }
.ui-row-tools { display: flex; gap: var(--space-half); flex: 0 0 auto; }
.ui-row-tool { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: var(--control-height-sm); min-width: var(--control-height-sm); min-height: var(--control-height-sm); height: var(--control-height-sm); padding: 0; border: 0; border-radius: var(--radius-xs); background: transparent; box-shadow: none; color: var(--text-secondary); }
.ui-nav-row > .ui-row-tool { display: none; }
.ui-nav-row:is(:hover,:focus-within) > .ui-row-tool { display: inline-flex; visibility: visible; opacity: 1; }
.ui-nav-row > .ui-row-tools { display: none; }
.ui-nav-row:is(:hover,:focus-within) > .ui-row-tools { display: flex; }
.ui-explorer-group { margin: 0; padding: 0; min-width: 0; border: 0; background: transparent; box-shadow: none; }
.ui-explorer-group > summary { display: flex; align-items: center; gap: var(--space-2); min-height: var(--explorer-row-height); padding: var(--space-1h) var(--space-2); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: var(--text-xs); font-weight: var(--weight-strong); cursor: pointer; list-style: none; }
.ui-explorer-group > summary::before { content: '›'; width: var(--space-3); flex-shrink: 0; font-size: var(--text-lg); line-height: 1; transform: rotate(0deg); }
.ui-explorer-group[open] > summary::before { transform: rotate(90deg); }
.ui-explorer-group > summary:hover { background: var(--state-hover-bg); }
.ui-explorer-group > summary::-webkit-details-marker, .ui-action-menu > summary::-webkit-details-marker { display: none; }
.ui-explorer-group-body { padding: var(--space-1) 0 var(--space-2); }
.ui-action-menu { position: relative; flex: 0 0 auto; }
.ui-action-menu > summary { display: flex; align-items: center; justify-content: center; width: var(--control-height); height: var(--control-height); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); list-style: none; cursor: pointer; background: var(--surface-raised); color: var(--text-secondary); }
.ui-action-menu[open] > summary { background: var(--state-hover-bg); color: var(--text-primary); }
.ui-menu-content { position: absolute; top: calc(100% + var(--space-1)); right: 0; z-index: var(--z-dropdown); min-width: 200px; max-width: calc(100vw - var(--shell-rail-span) - var(--space-8)); padding: var(--space-1); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-lg); }
.ui-menu-content > :is(button,a) { display: flex; align-items: center; justify-content: flex-start; gap: var(--space-2); width: 100%; min-height: var(--control-height); padding: var(--space-2) var(--space-3); border: 0; background: transparent; box-shadow: none; text-align: start; white-space: nowrap; }
.ui-menu-content > :is(button,a):hover { background: var(--state-hover-bg); }
.ui-menu-content > :is(button,a) > i { width: var(--space-4); text-align: center; }
.ui-menu-field { display: grid; gap: var(--space-1); margin: 0; padding: var(--space-2); color: var(--text-secondary); font-size: var(--text-xs); }
.ui-menu-field > select { width: 100%; min-width: 0; max-width: 100%; }
.ui-search-field > select { flex: 1 1 auto; min-width: 0; padding-inline: 0; border: 0; background: transparent; box-shadow: none; }
.ui-view-tabs { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-1); flex-shrink: 0; max-width: 100%; padding: var(--space-1); overflow: auto hidden; border: 0; border-radius: var(--radius-md); background: var(--surface-sunken); box-shadow: none; }
.ui-view-tabs[data-wrap="true"] { flex-wrap: wrap; flex-shrink: 1; overflow: visible; }
.ui-row-link { display: block; width: 100%; min-width: 0; min-height: var(--control-height-sm); padding: var(--space-1) 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-primary); box-shadow: none; text-align: start; }
.ui-table-sort { min-height: var(--control-height-sm); padding: var(--space-1) 0; border: 0; background: transparent; color: var(--text-secondary); box-shadow: none; }
.ui-view-tab { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); flex: 0 0 auto; min-height: var(--control-height); padding: var(--space-1h) var(--space-3); border: 0; border-radius: var(--component-radius); background: transparent; color: var(--text-secondary); font: var(--weight-medium) var(--text-sm)/var(--line-height) var(--font-body); white-space: nowrap; box-shadow: none; }
.ui-view-tab:is(.active,.is-active,[aria-selected="true"],[aria-pressed="true"]) { background: var(--signal-state-bg); color: var(--signal-state-text); box-shadow: none; }
@media (max-width: 700px) { .ui-view-tabs[data-density="compact"] .ui-view-tab { flex: 1 1 auto; gap: var(--space-1); padding-inline: var(--space-1h); } .ui-view-tabs[data-density="compact"] .ui-view-tab > i { display: none; } }
/* Shared document collections, metadata and template selection. */
.ui-library { width: 100%; max-width: 1120px; margin-inline: auto; padding: var(--space-8); box-sizing: border-box; color: var(--text-primary); }
/* Reusable instrument/operations workspace. Data and panel placement live in consumers. */
.ui-console { min-width: 0; background: transparent; color: var(--console-text); font-family: var(--font-body); font-size: var(--text-sm); line-height: var(--line-height); font-variant-numeric: tabular-nums; }
.ui-console :where(h1, h2, h3, h4, p) { margin: 0; color: inherit; }
.ui-console :is(a, button, input, select) { color: var(--console-text); }
.ui-console input:is([type="checkbox"], [type="radio"], [type="range"]) { accent-color: var(--signal-accent); }
.ui-console :is(a, button):focus-visible, .ui-console :is(input, select):focus-visible { outline-color: var(--signal-text); box-shadow: none; }
.ui-console a:hover { color: var(--signal-text); text-decoration: none; }
.ui-console-number { font-family: var(--console-font-number); font-style: normal; font-stretch: normal; font-weight: var(--weight-strong); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "zero" 0; letter-spacing: -.025em; }
.ui-console-code { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ui-console-code { font-size: var(--text-xs); letter-spacing: var(--console-tracking); }
.ui-console-brand { color: var(--console-text); font-family: var(--font-body); font-size: var(--text-lg); font-style: normal; font-weight: var(--weight-strong); line-height: 1.2; letter-spacing: -.025em; }
.ui-console-bar { min-width: 0; padding: var(--space-2) var(--console-padding); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-radius); background: var(--console-panel); color: var(--console-text); }
.ui-console-panel { position: relative; min-width: 0; padding: var(--console-padding); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-radius); background: var(--console-panel); color: var(--console-text); box-shadow: none; }
.ui-console-overlay { position: absolute; background: var(--console-panel); color: var(--console-text); border-color: var(--console-rule); border-radius: var(--console-radius); box-shadow: var(--shadow-md); backdrop-filter: none; }
.ui-console-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-width: 0; margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: var(--console-line-width) solid var(--console-rule); }
.ui-console-title { font-family: var(--font-body); font-size: var(--text-base); font-weight: var(--weight-medium); line-height: 1.35; letter-spacing: -.015em; }
.ui-console-kicker { color: var(--console-muted); font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--weight-normal); letter-spacing: var(--console-tracking); line-height: 1.5; }
.ui-console-heading { font-family: var(--font-body); font-size: var(--console-heading-size); font-weight: var(--weight-medium); line-height: 1.2; letter-spacing: -.04em; }
.ui-console-description { color: var(--console-muted); font-size: var(--text-xs); line-height: 1.65; }
.ui-console-meta { color: var(--console-muted); font-family: var(--font-body); font-size: var(--text-xs); line-height: 1.5; }
.ui-console-stats { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: var(--space-4); min-width: 0; }
.ui-console-stat { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); min-width: 0; }
.ui-console-stat > :is(strong, .ui-console-number) { color: var(--console-text); font-family: var(--console-font-number); font-size: var(--console-stat-size); font-style: normal; font-stretch: normal; line-height: 1.1; font-weight: var(--weight-strong); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "zero" 0; letter-spacing: -.025em; }
.ui-console-readout > .ui-console-number { font-size: var(--console-stat-size); line-height: 1.1; }
.ui-console-stat > :is(span, small) { color: var(--console-muted); font-size: var(--text-xs); }
.ui-console-stat > :is(strong, .ui-console-number) > span { margin-left: var(--space-half); font-size: var(--text-sm); letter-spacing: normal; }
.ui-console-stat[data-state="attention"] > :is(strong, .ui-console-number) { color: var(--signal-text); }
.ui-console-row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; min-height: var(--console-row-height); padding: var(--space-2) 0; border: 0; border-bottom: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-control-radius); background: transparent; color: var(--console-text); box-shadow: none; text-align: start; }
.ui-console-row > :is(i, svg) { flex: 0 0 var(--space-4); color: var(--console-muted); }
.ui-console-row > .ui-console-row-copy { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: var(--space-half); }
.ui-console-row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: 1.4; }
.ui-console-row-meta { color: var(--console-muted); font-size: var(--text-xs); }
.ui-console-row:last-child { border-bottom-color: transparent; }
:is(a, button).ui-console-row:hover { background: var(--console-inset); color: var(--console-text); text-decoration: none; }
.ui-console .ui-console-row[aria-current="true"] { --console-text: var(--signal-state-text); --console-muted: var(--signal-state-text); padding-inline: var(--space-2); background: var(--signal-state-bg); color: var(--signal-state-text); box-shadow: none; }
.ui-console .ui-console-row-action { display: flex; align-items: center; gap: var(--space-2); flex: 1 1 auto; min-width: 0; min-height: var(--console-control-height); padding: 0; border: 0; border-radius: var(--console-control-radius); background: transparent; color: inherit; box-shadow: none; font: inherit; text-align: start; }
.ui-console .ui-console-row-action:hover { background: transparent; color: inherit; box-shadow: none; }
.ui-console-order-button { display: inline-flex; align-items: center; justify-content: center; width: var(--space-6); height: var(--space-6); min-height: var(--space-6); padding: var(--space-half); border: 0; border-radius: var(--console-tag-radius); background: transparent; color: var(--console-muted); box-shadow: none; font-size: var(--text-xs); }
.ui-console-order-button:hover { background: var(--console-inset); color: var(--console-text); box-shadow: none; }
.ui-console-order-actions { display: flex; flex-direction: column; flex-shrink: 0; }
.ui-console .ui-console-row[aria-current="true"] .ui-console-order-button { color: var(--signal-state-text); background: transparent; }
.ui-console .ui-console-row[aria-current="true"] .ui-console-order-button:hover { background: rgb(255 255 255 / .18); color: var(--signal-state-text); }
.ui-console-feed { list-style: none; margin: 0; padding: 0; }
.ui-console-feed > li { min-width: 0; }
.ui-console-feed .ui-console-row { width: 100%; }
.ui-console-tag { display: inline-flex; align-items: center; gap: var(--space-1); flex: 0 0 auto; max-width: 100%; padding: var(--space-half) var(--space-1h); border: var(--console-line-width) solid var(--console-rule-strong); border-radius: var(--console-tag-radius); background: transparent; color: var(--console-muted); font-size: var(--text-xs); font-weight: var(--weight-normal); line-height: 1.25; white-space: nowrap; }
.ui-console-tag:is([data-state="attention"], [data-state="overdue"], [data-state="signal"], .is-signal), .ui-console .ui-console-tag:is([data-state="attention"], [data-state="overdue"], [data-state="signal"], .is-signal) { border-color: var(--signal-state-bg); background: var(--signal-state-bg); color: var(--signal-state-text); }
.ui-console-chart { display: block; min-width: 0; width: 100%; overflow: hidden; color: var(--console-muted); }
.ui-console-chart :is(svg, canvas) { display: block; width: 100%; max-width: 100%; }
.ui-console-chart svg { overflow: visible; }
.ui-console-chart [data-chart-role="line"] { fill: none; stroke: var(--console-point-focus); stroke-width: var(--console-line-width); vector-effect: non-scaling-stroke; }
.ui-console-chart [data-chart-role="signal"] { fill: none; stroke: var(--signal-accent); stroke-width: var(--console-line-width); vector-effect: non-scaling-stroke; }
.ui-console-chart [data-chart-role="area"] { fill: var(--console-rule); stroke: none; }
.ui-console-chart [data-chart-role="grid"] { fill: none; stroke: var(--console-rule); stroke-width: var(--console-line-width); vector-effect: non-scaling-stroke; }
.ui-console-chart [data-chart-role="label"] { fill: var(--console-muted); font-family: var(--console-font-number); font-size: var(--text-xs); font-variant-numeric: lining-nums tabular-nums; }
.ui-console-layers { display: grid; gap: var(--space-1); min-width: 0; }
.ui-console-layers.ui-popover { grid-template-columns: minmax(0, 1fr); width: min(var(--console-menu-width), calc(100vw - var(--shell-rail-span) - var(--space-10))); max-height: min(360px, calc(100dvh - var(--space-10))); overflow-y: auto; overscroll-behavior: contain; padding: var(--space-3); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-inset-radius); background: var(--console-panel); color: var(--console-text); box-shadow: var(--shadow-md); }
.ui-console-layers > :is(label, button) { display: flex; align-items: center; gap: var(--space-2h); min-width: 0; min-height: var(--console-control-height); padding: var(--space-1h) 0; color: var(--console-text); font-size: var(--text-sm); cursor: pointer; }
.ui-console-layers > :is(label, button) > span { min-width: 0; word-break: keep-all; overflow-wrap: normal; }
.ui-console-layers input[type="checkbox"] { flex: 0 0 auto; width: var(--space-3h); height: var(--space-3h); margin: 0; accent-color: var(--signal-accent); }
.ui-console-layers > label:hover { color: var(--signal-text); }
.ui-console-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--console-control-height); padding: var(--space-1h) var(--space-3); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-control-radius); background: var(--console-panel); color: var(--console-text); box-shadow: none; font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--weight-medium); line-height: 1.4; text-decoration: none; }
.ui-console-button:hover { border-color: var(--console-rule-strong); background: var(--console-inset); color: var(--console-text); box-shadow: none; }
.ui-console-button:is([aria-pressed="true"], [aria-selected="true"], .is-active), .ui-console .ui-console-button:is([aria-pressed="true"], [aria-selected="true"], .is-active) { border-color: var(--signal-state-bg); background: var(--signal-state-bg); color: var(--signal-state-text); box-shadow: none; }
.ui-console-button[data-emphasis="primary"] { border-color: var(--signal-accent); background: var(--signal-accent); color: var(--text-on-signal); }
.ui-console .ui-console-button[data-emphasis="primary"] { color: var(--text-on-signal); }
.ui-console-button[data-emphasis="primary"]:hover { background: var(--signal-accent); border-color: var(--signal-accent); filter: brightness(.94); }
.ui-console-alert { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--console-control-height); padding: var(--space-1h) var(--space-3); border: var(--console-line-width) solid var(--signal-state-bg); border-radius: var(--console-control-radius); background: var(--signal-state-bg); color: var(--signal-state-text); box-shadow: none; font-size: var(--text-xs); font-weight: var(--weight-strong); line-height: 1.4; }
.ui-console .ui-console-alert { color: var(--signal-state-text); }
.ui-console-alert:hover, .ui-console .ui-console-alert:hover { border-color: var(--signal-state-bg); background: color-mix(in srgb, var(--signal-state-bg) 94%, black); color: var(--signal-state-text); }
.ui-console-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); min-width: 0; }
.ui-console-toolbar :is(input, select), .ui-console-scope > select { min-height: var(--console-control-height); min-width: 0; padding: var(--space-1h) var(--space-2); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-control-radius); background: var(--console-panel); color: var(--console-text); box-shadow: none; font-family: var(--font-body); font-size: var(--text-xs); }
.ui-console .ui-search-field { min-height: var(--console-control-height); padding-inline: var(--space-2); border-color: var(--console-rule); border-radius: var(--console-control-radius); background: var(--console-inset); color: var(--console-muted); }
.ui-console .ui-search-field:focus-within { border-color: var(--signal-text); box-shadow: none; }
.ui-console .ui-search-field :is(input, i, svg) { border: 0; background: transparent; color: var(--console-text); }
.ui-console .ui-search-field input { padding: var(--space-1) 0; min-height: 0; font-size: var(--text-xs); }
.ui-console .ui-search-field input::placeholder { color: var(--console-muted); }
.ui-console-scene { position: relative; min-width: 0; overflow: hidden; border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-radius); background: var(--console-scene); color: var(--console-text); }
.ui-console-scene[data-overlay-overflow="visible"] { overflow: visible; }
.ui-console-stage { overflow: hidden; border-radius: inherit; }
.ui-console-scene canvas { display: block; width: 100%; height: 100%; }
.ui-console-map { cursor: grab; touch-action: none; }
.ui-console-dot-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--console-map-title-lines); overflow: hidden; margin: 0; padding: 0; border: 0; background: transparent; color: var(--console-map-title-color); font-family: var(--font-body); font-size: var(--console-map-title-size); font-weight: var(--console-map-title-weight); line-height: 1.12; letter-spacing: -.04em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; text-shadow: none; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .ui-console-dot-title { background-image: radial-gradient(circle, var(--console-map-title-color) var(--console-map-title-dot-size), transparent calc(var(--console-map-title-dot-size) + .1px)); background-size: var(--console-map-title-dot-step) var(--console-map-title-dot-step); background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
}
@media (forced-colors: active) {
    .ui-console-dot-title { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}
.ui-console-scene canvas[data-map-hover="true"] { cursor: pointer; }
.ui-console-scene canvas[data-map-drag="true"] { cursor: grabbing; }
.ui-console-status { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); color: var(--console-muted); font-size: var(--text-xs); }
.ui-console-status::before { content: ""; display: block; flex: 0 0 auto; width: var(--space-1h); height: var(--space-1h); border-radius: var(--radius-pill); background: var(--console-point-focus); }
.ui-console-status[data-state="attention"]::before { background: var(--signal-accent); }
.ui-console-status[data-state="warning"]::before { background: var(--signal-accent); }
.ui-console-empty { padding: var(--space-5) var(--space-2); color: var(--console-muted); font-size: var(--text-sm); line-height: 1.65; text-align: center; }
.ui-console-inset { min-width: 0; padding: var(--space-3); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-inset-radius); background: var(--console-inset); color: var(--console-text); }
.ui-console-scope { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); min-width: 0; color: var(--console-muted); font-size: var(--text-xs); }
.ui-console-scope > strong { color: var(--console-text); font-weight: var(--weight-medium); }
.ui-console-scope.ui-picker-trigger { padding: var(--space-2) var(--space-3); border-color: var(--console-rule); border-radius: var(--console-control-radius); background: var(--console-inset); box-shadow: none; }
.ui-console-scope.ui-picker-trigger > i:first-child { background: transparent; color: var(--console-muted); border-radius: var(--console-control-radius); }
.ui-console-scope.ui-picker-trigger .ui-picker-label small { color: var(--console-muted); }
.ui-console-scope.ui-picker-trigger .ui-picker-label strong { color: var(--console-text); }
.ui-console-meter { display: block; width: 100%; height: var(--space-1); overflow: hidden; border: 0; border-radius: var(--radius-pill); background: var(--console-rule); color: var(--signal-accent); accent-color: var(--signal-accent); }
.ui-console-meter::-webkit-progress-bar { background: var(--console-rule); }
.ui-console-meter::-webkit-progress-value { background: var(--signal-accent); }
.ui-console-meter::-moz-progress-bar { background: var(--signal-accent); }
.ui-console-meter > :is(span, div) { display: block; height: 100%; background: var(--signal-accent); }
/* Shared portfolio instruments: quantity, declared state and task progress are separate facts. */
.ui-console-overview { position: relative; display: flex; align-items: flex-start; gap: var(--space-4); min-width: 0; padding: var(--console-padding); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-radius); background: var(--console-panel); color: var(--console-text); text-align: left; box-shadow: none; transition: border-color var(--duration-fast), transform var(--duration-fast); }
.ui-console-overview .ui-console-number { font-size: clamp(2rem, 3.1vw, 3.25rem); line-height: 1.05; letter-spacing: -.04em; }
.ui-console-overview-icon { display: grid; place-items: center; flex: 0 0 var(--space-10); width: var(--space-10); height: var(--space-10); border-radius: var(--console-inset-radius); background: var(--console-inset); color: var(--signal-text); font-size: var(--text-lg); }
.ui-console-overview-arrow { margin-left: auto; color: var(--console-muted); font-size: var(--text-lg); }
.ui-console-overview:hover { border-color: var(--signal-text); transform: translateY(-2px); background: var(--console-panel); box-shadow: none; }
.ui-console .ui-console-overview[aria-pressed="true"] { border-color: var(--signal-state-bg); background: var(--signal-state-bg); color: var(--signal-state-text); }
.ui-console-overview[aria-pressed="true"] :is(.ui-console-meta,.ui-console-overview-arrow) { color: var(--signal-state-text); }
.ui-console-overview[aria-pressed="true"] .ui-console-overview-icon { background: var(--text-on-dark); color: var(--text-on-light); }
.ui-console-state-chart { display: flex; gap: 2px; height: var(--space-2); margin-left: auto; overflow: hidden; border-radius: var(--console-tag-radius); }
.ui-console-state-chart > span { min-width: 3px; background: currentColor; }
.ui-console-state-chart > [data-project-state="unspecified"] { opacity: .25; }
.ui-console-state-chart > [data-project-state="planned"] { opacity: .45; }
.ui-console-state-chart > [data-project-state="paused"] { opacity: .65; }
.ui-console-state-chart > [data-project-state="completed"] { opacity: .85; }
.ui-console-project-state { display: inline-flex; align-items: center; gap: var(--space-1h); padding: var(--space-half) var(--space-2); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--radius-pill); background: var(--console-inset); color: var(--console-muted); font-size: var(--text-xs); font-weight: var(--weight-normal); }
.ui-console-project-state[data-project-state="active"] { background: var(--signal-state-bg); border-color: var(--signal-state-bg); color: var(--signal-state-text); }
.ui-console-project-state[data-project-state="completed"] { background: var(--console-text); border-color: var(--console-text); color: var(--console-panel); }
.ui-console-project-row { width: 100%; min-width: 0; padding: var(--space-4); margin-top: var(--space-2); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-inset-radius); background: var(--console-panel); color: var(--console-text); text-align: left; box-shadow: none; font-size: var(--text-sm); transition: border-color var(--duration-fast), background var(--duration-fast); }
.ui-console-project-row:hover { background: var(--console-inset); border-color: var(--console-rule-strong); box-shadow: none; }
.ui-console .ui-console-project-row[aria-pressed="true"] { border-color: var(--signal-state-bg); background: var(--signal-state-bg); color: var(--signal-state-text); }
.ui-console-project-row[aria-pressed="true"] :is(.ui-console-meta,.ui-console-time,.ui-console-index,.ui-console-number) { color: var(--signal-state-text); }
.ui-console-project-row[aria-pressed="true"] :is(.ui-console-count,.ui-console-project-state,.ui-console-tag) { border-color: var(--text-on-dark); background: var(--text-on-dark); color: var(--text-on-light); }
.ui-console-project-row[aria-pressed="true"] .ui-console-meter { background: rgb(255 255 255 / .3); }
.ui-console-project-row[aria-pressed="true"] .ui-console-meter > span { background: var(--text-on-dark); }
.ui-console-material { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-inset-radius); background: var(--console-panel); color: var(--console-text); text-decoration: none; box-shadow: none; transition: transform var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast); }
.ui-console-material[data-layout="horizontal"] { flex-direction: row; }
.ui-console-material:hover { color: var(--console-text); border-color: var(--signal-text); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ui-console-material-art { position: relative; display: grid; place-items: center; overflow: hidden; min-height: 100px; background: var(--console-inset); color: var(--signal-text); border-bottom: var(--console-line-width) solid var(--console-rule); }
.ui-console-material-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ui-console-material[data-layout="horizontal"] .ui-console-material-art { border-bottom: 0; border-right: var(--console-line-width) solid var(--console-rule); }
.ui-console-material-symbol { display: grid; place-items: center; font-size: var(--text-display); line-height: 1; transform: rotate(-6deg); transition: transform var(--duration-fast); }
.ui-console-material-art[data-kind="board"] .ui-console-material-symbol { transform: rotate(6deg); }
.ui-console-material:hover .ui-console-material-symbol { transform: rotate(0deg) scale(1.08); }
.ui-console-material-kind, .ui-console-material-open { position: absolute; display: grid; place-items: center; background: var(--console-panel); color: var(--console-text); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-tag-radius); font-size: var(--text-xs); line-height: 1.4; }
.ui-console-material-kind { top: var(--space-3); left: var(--space-3); padding: var(--space-1) var(--space-2); }
.ui-console-material-open { right: var(--space-3); bottom: var(--space-3); width: var(--space-6); height: var(--space-6); }
.ui-console-material:hover .ui-console-material-open { background: var(--signal-state-bg); color: var(--signal-state-text); border-color: var(--signal-state-bg); }
.ui-console-material-copy { padding: var(--space-3) var(--space-4) var(--space-4); }
.ui-console-material-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: var(--space-2) 0; color: var(--console-text); font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.45; }
.ui-console-tag[data-state="new"] { background: var(--signal-state-bg); color: var(--signal-state-text); border-color: var(--signal-state-bg); }
.ui-console-project-dot { flex: 0 0 var(--space-3); width: var(--space-3); height: var(--space-3); border-radius: var(--radius-pill); background: var(--signal-state-bg); }
.ui-console-project-row[aria-pressed="true"] .ui-console-project-dot { background: var(--text-on-dark); }
@media (prefers-reduced-motion: reduce) { .ui-console-material, .ui-console-material-symbol, .ui-console-material:hover .ui-console-material-symbol { transition: none; transform: none; } }
@media (max-width: 540px) { .ui-console-material { flex-direction: row; } .ui-console-material .ui-console-material-art { border-bottom: 0; border-right: var(--console-line-width) solid var(--console-rule); } .ui-console-material-symbol { font-size: var(--text-2xl); } .ui-console-material-kind { left: var(--space-2); top: var(--space-2); } .ui-console-material-open { right: var(--space-2); bottom: var(--space-2); } }
.ui-console-orbit { position: relative; display: grid; place-items: center; width: min(100%, 132px); aspect-ratio: 1; }
.ui-console-orbit > svg { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.ui-console-orbit circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ui-console-orbit [data-orbit="track"] { stroke: var(--console-rule); }
.ui-console-orbit [data-orbit="value"] { stroke: var(--signal-accent); stroke-dasharray: 0 100; transition: stroke-dasharray var(--duration); }
.ui-console-orbit > div { position: absolute; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.ui-console-orbit .ui-console-number { font-size: var(--text-2xl); line-height: 1; }
.ui-console-orbit .ui-console-number > span { font-size: var(--text-sm); }
.ui-console-activity > .ui-console-resource-icon { flex-basis: var(--space-10); width: var(--space-10); height: var(--space-10); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-control-radius); background: var(--console-inset); }
.ui-console-activity > .ui-console-resource-icon[data-preview="true"] { flex-basis: var(--space-12); width: var(--space-12); height: var(--space-10); }
@media (max-width: 700px) {
    .ui-console-overview { gap: var(--space-2); padding: var(--space-3); }
    .ui-console-overview-icon, .ui-console-state-chart { display: none; }
    .ui-console-overview .ui-console-number { font-size: var(--text-2xl); }
    .ui-console-overview-arrow { display: none; }
    .ui-console-overview .ui-console-meta { font-size: var(--text-xs); overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { .ui-console-overview, .ui-console-project-row, .ui-console-orbit [data-orbit="value"] { transition: none; transform: none; } }
.ui-console-divider { height: var(--console-marker-size); margin-block: var(--space-4); border: 0; background-image: repeating-linear-gradient(135deg, transparent 0 4px, var(--console-rule) 4px 5px, transparent 5px 8px); }
.ui-console-task, .ui-console-activity, .ui-console-resource { width: 100%; min-width: 0; min-height: var(--console-row-height); border: 0; border-bottom: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-control-radius); background: transparent; color: var(--console-text); box-shadow: none; text-decoration: none; }
:is(.ui-console-task, .ui-console-activity, .ui-console-resource):hover { background: var(--console-inset); color: var(--console-text); text-decoration: none; }
:is(.ui-console-task, .ui-console-activity, .ui-console-resource):last-child { border-bottom-color: transparent; }
.ui-console-index { flex-shrink: 0; color: var(--console-muted); font-family: var(--console-font-number); font-size: var(--text-xs); font-variant-numeric: lining-nums tabular-nums; }
.ui-console-time { flex-shrink: 0; color: var(--console-muted); font-family: var(--console-font-number); font-size: var(--text-xs); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.ui-count, .ui-row-count, .ui-console-count { display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-6); min-height: var(--space-6); padding: var(--space-half) var(--space-1h); border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-primary); font-family: var(--console-font-number); font-size: var(--text-base); font-style: normal; font-weight: var(--weight-strong); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "zero" 0; line-height: 1.2; }
.ui-count:empty, .ui-row-count:empty { display: none; }
.ui-console-row[aria-current="true"] .ui-console-count { border-color: var(--text-on-dark); background: var(--text-on-dark); color: var(--text-on-light); }
.ui-console-resource-icon { display: grid; place-items: center; flex: 0 0 var(--console-icon-size); width: var(--console-icon-size); height: var(--console-icon-size); border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-control-radius); background: var(--console-inset); color: var(--console-muted); }
.ui-console-preview { padding: 0; border: var(--console-line-width) solid var(--console-rule); border-radius: var(--console-inset-radius); background: var(--console-inset); }
.ui-console-heatmap-cell { border-radius: var(--console-cell-radius); background: var(--console-rule); }
.ui-console-heatmap-cell[data-level="1"] { background: color-mix(in srgb, var(--console-point-focus) 30%, var(--console-panel)); }
.ui-console-heatmap-cell[data-level="2"] { background: color-mix(in srgb, var(--console-point-focus) 50%, var(--console-panel)); }
.ui-console-heatmap-cell[data-level="3"] { background: color-mix(in srgb, var(--console-point-focus) 75%, var(--console-panel)); }
.ui-console-heatmap-cell[data-level="4"] { background: var(--signal-accent); }
.ui-console-heatmap-cell.is-future { background: transparent; border: var(--console-line-width) solid var(--console-rule); }
.ui-console-schedule { color: var(--console-text); }
.ui-console-schedule .ui-schedule-label { color: var(--console-text); }
.ui-console-schedule .ui-schedule-label:hover { color: var(--signal-text); }
.ui-console-schedule :is(.ui-schedule-header, .ui-schedule-row) { border-color: var(--console-rule); }
.ui-console-schedule :is(.ui-schedule-header, .ui-caption) { color: var(--console-muted); font-size: var(--text-xs); }
.ui-console-schedule .ui-schedule-track { background-image: repeating-linear-gradient(90deg, var(--console-rule) 0 var(--console-line-width), transparent var(--console-line-width) 25%); }
.ui-console-schedule .ui-schedule-bar { border-radius: var(--radius-pill); background: var(--signal-accent); color: var(--text-on-signal); }
.ui-console-schedule .ui-schedule-bar:hover { color: var(--text-on-signal); }
@media (max-width: 900px), (pointer: coarse) {
    :root { --console-control-height: var(--control-height-touch); --console-row-height: var(--control-height-touch); }
    .ui-console-button, .ui-console-alert { min-height: var(--control-height-touch); }
    .ui-console-order-button { width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); }
    .ui-console-layers > label { min-height: var(--control-height-touch); }
}
@media (max-width: 1000px) { .ui-console { --console-overlay-width: 220px; } }
@media (max-width: 700px) { .ui-console-overlay[data-stack="mobile"] { position: relative; } }
@media (max-width: 640px) {
    :root { --console-padding: var(--space-3); --console-gap: var(--space-2); }
    .ui-console-stats { gap: var(--space-2); }
    .ui-console-toolbar { gap: var(--space-1h); }
}
.ui-library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-5); }
.ui-library-heading { min-width: 0; }
.ui-library-title { margin: 0 0 var(--space-2); font: var(--weight-strong) var(--text-2xl)/1.2 var(--font-display); letter-spacing: var(--tracking-display); }
.ui-library-description { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.ui-library-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); flex-shrink: 0; }
.ui-library-actions > button, .ui-library-state > button { display: inline-flex; align-items: center; gap: var(--space-2); }
.ui-library-context { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-block: var(--space-3); color: var(--text-secondary); font-size: var(--text-xs); }
.ui-library-views { width: fit-content; margin-bottom: var(--space-5); }
.ui-library-tools { display: grid; grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(100px, auto)); align-items: center; gap: var(--space-2); }
.ui-library-tools > select { width: 100%; min-width: 0; }
.ui-library-result-count { margin-block: var(--space-4) var(--space-2); color: var(--text-secondary); font-size: var(--text-xs); }
.ui-library-storage-notice { padding: var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--color-warning); font-size: var(--text-sm); }
.ui-library-list { border-top: 1px solid var(--border-strong); }
.ui-record-row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding-inline: var(--space-3); border-bottom: 1px solid var(--border-subtle); transition: background-color var(--duration-fast) var(--ease); }
.ui-record-row:hover, .ui-record-row:focus-within { background: var(--state-hover-bg); }
.ui-record-main { display: flex; align-items: flex-start; gap: var(--space-4); flex: 1 1 auto; min-width: 0; padding: var(--space-4) 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-primary); box-shadow: none; text-align: start; font-weight: var(--weight-normal); }
.ui-record-main:hover { background: transparent; }
.ui-record-icon { display: grid; place-items: center; width: var(--space-10); height: var(--space-10); flex-shrink: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text-secondary); font-size: var(--text-lg); }
.ui-record-content { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: var(--space-1h); }
.ui-record-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-base); font-weight: var(--weight-strong); }
.ui-record-summary { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-secondary); font-size: var(--text-sm); overflow-wrap: anywhere; }
.ui-record-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); color: var(--text-secondary); font-size: var(--text-xs); }
.ui-record-project { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-record-favorite { flex-shrink: 0; }
.ui-record-favorite[aria-pressed="true"] { color: var(--accent-text); }
.ui-badge[data-state="review"] { color: var(--color-warning); }
.ui-badge[data-state="archived"] { border: 1px solid var(--border-subtle); background: transparent; }
.ui-library-empty-title { font-size: var(--text-xl); color: var(--text-primary); }
.ui-document-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding-block: var(--space-1) var(--space-4); font-size: var(--text-xs); color: var(--text-secondary); }
.ui-document-title { font-family: var(--font-display); font-size: clamp(var(--text-2xl), 2.5vw, var(--text-display)); font-weight: var(--weight-strong); line-height: 1.25; letter-spacing: -.025em; border: 0; border-radius: 0; background: transparent; color: var(--text-primary); box-shadow: none; }
.ui-document-title:focus-visible { outline: none; box-shadow: inset 0 -1px var(--border-strong); }
.ui-document-state { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-secondary); font-weight: var(--weight-medium); }
.ui-child-pages { margin-block: var(--space-8) var(--space-4); padding-block-start: var(--space-5); border-block-start: var(--component-border-width) solid var(--border-subtle); }
.ui-child-pages-head { display: flex; align-items: center; gap: var(--space-2); margin-block-end: var(--space-3); }
.ui-child-pages-head > button { margin-inline-start: auto; }
.ui-child-pages-head .ui-section-heading { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.ui-child-pages-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-2); }
.ui-child-page { min-width: 0; border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--console-inset-radius); background: var(--surface); }
.ui-child-page-open { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; min-width: 0; padding: var(--space-4); border: 0; border-radius: inherit; background: transparent; text-align: start; box-shadow: none; }
.ui-child-page-open:hover { background: var(--state-hover-bg); }
.ui-metadata-value { padding: var(--space-half) var(--space-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-raised); }
.ui-quiet-button { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height-sm); padding: var(--space-1) var(--space-2); border-color: transparent; background: transparent; color: var(--text-secondary); box-shadow: none; }
.ui-property-list { padding: var(--space-4); margin-bottom: var(--space-4); }
.ui-property-list > div { display: grid; grid-template-columns: minmax(90px, .28fr) minmax(0, 1fr); align-items: center; gap: var(--space-3); padding-block: var(--space-2); font-size: var(--text-sm); }
.ui-property-list > div > :first-child { color: var(--text-secondary); }
.ui-property-list :is(input, select, textarea) { width: 100%; min-width: 0; box-sizing: border-box; }
.ui-property-list.is-locked { opacity: 1; }
.ui-template-picker { width: min(880px, 100%); max-height: calc(100dvh - var(--space-10)); overflow-y: auto; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-lg); }
.ui-template-picker > .ui-title { margin: 0 0 var(--space-1); }
.ui-transfer-panel { width: min(960px, 100%); max-height: calc(100dvh - var(--space-10)); overflow-y: auto; box-sizing: border-box; padding: var(--space-6); }
.ui-transfer-panel > .ui-title { margin: 0 0 var(--space-2); }
.ui-transfer-destination { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-3); margin-block: var(--space-4); }
.ui-transfer-filebar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block: var(--space-3); }
.ui-transfer-summary { margin-block: var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--text-primary); }
.ui-transfer-scroll { max-height: min(46dvh, 460px); overflow: auto; margin-block: var(--space-3); border: var(--component-border-width) solid var(--border-subtle); border-radius: var(--console-inset-radius); }
.ui-transfer-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); text-align: start; }
.ui-transfer-table caption { padding: var(--space-3); text-align: start; color: var(--text-secondary); }
.ui-transfer-table :is(th, td) { padding: var(--space-3); border-block-end: var(--component-border-width) solid var(--border-subtle); text-align: start; vertical-align: top; }
.ui-transfer-table th { position: sticky; top: 0; background: var(--surface-raised); color: var(--text-secondary); font-weight: var(--weight-medium); z-index: 1; }
.ui-transfer-table select { min-width: 120px; max-width: 100%; }
.ui-transfer-path { min-width: 140px; max-width: 380px; overflow-wrap: anywhere; color: var(--text-primary); }
.ui-transfer-row-status { min-width: 120px; overflow-wrap: anywhere; color: var(--text-secondary); }
.ui-transfer-row-status[data-state="error"], .ui-transfer-row-status[data-state="blocked"] { color: var(--color-danger); }
.ui-transfer-row-status[data-state="success"] { color: var(--color-success); }
.ui-transfer-warning { margin-block: var(--space-2); font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.ui-transfer-warnings { max-height: 160px; overflow-y: auto; }
.ui-transfer-progress { width: 100%; height: var(--space-2); accent-color: var(--main-theme-color); }
.ui-transfer-status { min-height: 1.5em; }
.ui-template-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); margin-block: var(--space-5); }
.ui-form-field { display: grid; gap: var(--space-1h); min-width: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.ui-form-field > :is(input, select, textarea) { width: 100%; min-width: 0; box-sizing: border-box; }
.ui-template-layout { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr); gap: var(--space-5); }
.ui-template-list { display: grid; grid-auto-rows: max-content; align-content: start; gap: var(--space-1); max-height: min(360px, 48dvh); overflow-y: auto; }
.ui-template-option { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; padding: var(--space-3); border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; box-shadow: none; text-align: start; }
.ui-template-option > i { width: var(--space-5); flex-shrink: 0; padding-top: var(--space-1); text-align: center; color: var(--text-secondary); }
.ui-template-option > span { display: grid; gap: var(--space-1); }
.ui-template-option[aria-checked="true"] { border-color: var(--signal-state-bg); background: var(--signal-state-bg); color: var(--signal-state-text); }
/* Explicit UI choices share the dashboard's filled state. Authored content keeps
   its own selection and stored-color contrast rules. */
.ui-selection-control:is(.active,.is-active,.selected,.is-selected,.is-on,[aria-selected="true"],[aria-pressed="true"]) { background: var(--signal-state-bg); border-color: var(--signal-state-bg); color: var(--signal-state-text); box-shadow: none; }
:is(.ui-nav-row:is(.active,.is-active,.selected,.is-selected,[aria-current="page"],[aria-selected="true"],[aria-pressed="true"]), .ui-view-tab:is(.active,.is-active,[aria-selected="true"],[aria-pressed="true"]), .ui-choice-row[data-selected="true"], .ui-template-option[aria-checked="true"], .ui-selection-control:is(.active,.is-active,.selected,.is-selected,.is-on,[aria-selected="true"],[aria-pressed="true"])) :is(.ui-row-icon,.ui-row-label,.ui-tree-label,.ui-tree-toggle,.ui-row-link,.ui-row-tool,.ui-choice-name,.ui-choice-more,.ui-choice-action,.ui-caption,.ui-muted,small,i,svg) { color: var(--signal-state-text); }
.ui-selection-control:is(.active,.is-active,.selected,.is-selected,.is-on,[aria-selected="true"],[aria-pressed="true"]) :is(span,strong):not(.ui-count):not(.ui-row-count) { color: inherit; }
:is(.ui-nav-row:is(.active,.is-active,.selected,.is-selected,[aria-current="page"],[aria-selected="true"],[aria-pressed="true"]), .ui-choice-row[data-selected="true"]) :is(.ui-tree-toggle,.ui-tree-label,.ui-row-link,.ui-row-tool,.ui-choice-more,.ui-choice-action):hover { background: rgb(255 255 255 / .18); color: var(--signal-state-text); }
.ui-choice-row[data-selected="true"] .ui-choice-more[aria-expanded="true"] { background: rgb(255 255 255 / .18); color: var(--signal-state-text); }
:is(.ui-nav-row:is(.active,.is-active,.selected,.is-selected,[aria-current="page"],[aria-selected="true"],[aria-pressed="true"]), .ui-view-tab:is(.active,.is-active,[aria-selected="true"],[aria-pressed="true"]), .ui-choice-row[data-selected="true"], .ui-selection-control:is(.active,.is-active,.selected,.is-selected,.is-on,[aria-selected="true"],[aria-pressed="true"])) :is(.ui-count,.ui-row-count) { border-color: var(--text-on-dark); background: var(--text-on-dark); color: var(--text-on-light); }
.ui-primary > :is(i,svg,span) { color: inherit; }
.ui-template-preview { padding: var(--space-5); max-height: min(360px, 48dvh); overflow-y: auto; box-sizing: border-box; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface); }
.ui-template-preview > h3 { margin-top: 0; }
.ui-template-preview > ul { padding-left: var(--space-5); font-size: var(--text-sm); line-height: 2; }
.ui-template-error { padding: var(--space-3); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--color-danger); font-size: var(--text-sm); }
.ui-template-picker > .ui-actions { position: sticky; bottom: 0; justify-content: flex-end; gap: var(--space-2); padding-block: var(--space-3) 0; border-top: 1px solid var(--border-subtle); background: var(--surface-raised); }
@media (max-width: 1100px) {
    .ui-library-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ui-library-search { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .ui-library { padding: var(--space-5) var(--space-3); }
    .ui-library-head { flex-wrap: wrap; gap: var(--space-3); }
    .ui-library-actions { justify-content: flex-start; }
    .ui-library-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ui-library-tools > select:last-child { grid-column: 1 / -1; }
    .ui-record-row { gap: var(--space-1); padding-inline: 0; }
    .ui-record-main { gap: var(--space-2); }
    .ui-record-icon { width: var(--space-8); height: var(--space-8); }
    .ui-record-favorite { width: var(--control-height-touch); height: var(--control-height-touch); }
    .ui-template-layout, .ui-template-summary { grid-template-columns: minmax(0, 1fr); }
    .ui-modal-overlay { padding: var(--space-2); }
    .ui-template-picker { max-height: calc(100dvh - var(--space-4)); padding: var(--space-4); }
    .ui-template-preview { padding: var(--space-4); }
    .ui-template-list { max-height: 28dvh; }
    .ui-property-list { padding: var(--space-3); }
    .ui-property-list > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-1h); }
}
@media (min-width: 901px) { .ui-mobile-only { display: none; } }
@media (max-width: 700px) {
    .ui-console-row[data-controls="order"] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: var(--space-2); }
    .ui-console-row[data-controls="order"] > .ui-console-row-action { width: 100%; }
    .ui-console-row[data-controls="order"] > .ui-console-order-actions { flex-direction: row; justify-content: flex-end; }
}
@media (min-width: 901px) {
    .ui-explorer-panel.ui-explorer-collapsed { padding: var(--space-2); }
    .ui-explorer-collapsed > :is(.ui-search-field,.ui-explorer-actions) { display: none; }
    .ui-explorer-collapsed .ui-explorer-head { padding: 0; justify-content: center; }
}
@media (max-width: 900px), (pointer: coarse) {
    :root { --explorer-row-height: var(--control-height-touch); }
    .ui-explorer-panel { padding: var(--space-3); }
    .ui-nav-row > .ui-row-tool { display: inline-flex; visibility: visible; opacity: 1; }
    .ui-nav-row > .ui-row-tools { display: flex; }
    .ui-action-menu > summary, .ui-search-field, .ui-view-tab { min-height: var(--control-height-touch); }
}
@media (max-width: 900px) { .ui-desktop-only { display: none; } }
button[role="checkbox"] { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-sm); min-width: var(--control-height-sm); min-height: var(--control-height-sm); height: var(--control-height-sm); padding: 0; }
button[role="checkbox"][aria-checked="true"] { background: var(--signal-accent); border-color: var(--signal-accent); color: var(--text-on-signal); }
button[role="checkbox"][aria-checked="false"] > :is(i, svg) { visibility: hidden; }
.ui-cursor-pointer { width: 0; height: 0; border-style: solid; border-width: 0 var(--space-2h) var(--space-4) 0; border-color: transparent transparent var(--content-color, var(--main-theme-color)) transparent; }
@media (max-width: 900px), (pointer: coarse) {
    :where(button, [role="button"], .ui-button, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select) { min-height: var(--control-height-touch); }
    .ui-icon { width: var(--control-height-touch); height: var(--control-height-touch); }
    .ui-display { font-size: var(--text-2xl); }
    .ui-session-banner { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 900px) {
    :root { --shell-frame-stroke: 4px; --shell-inner-radius: 20px; --shell-rail-width: 48px; --shell-rail-inset: 12px; --bento-padding: var(--console-padding); --ring-size: 124px; --frame-radius: var(--console-radius); --scene-radius: var(--console-radius); --frame-padding: 10px; }
    .ui-shell-rail { padding-inline: var(--space-1); }
    .ui-account-overlay { padding: var(--space-3) var(--space-3) calc(var(--shell-rail-inset) + var(--space-3)) calc(var(--shell-rail-span) + var(--space-2)); }
    .ui-id-face { padding: var(--space-4); }

    .ui-workspace-toolbar { flex-wrap: wrap; row-gap: var(--space-2); }
    .ui-workspace-toolbar > .ui-breadcrumbs { flex: 1 1 100%; }
    .ui-breadcrumb-item { flex: 0 1 auto; min-height: var(--control-height-sm); max-width: min(180px, 55vw); }
    .ui-artwork-field::before { right: -20%; opacity: .55; }
    .ui-artwork-field::after { right: -12%; opacity: .55; }
}
@media (max-width: 640px) {
    :root { --scene-title-size: clamp(2rem, 7vw, 3.4rem); }
    .ui-launchpad { padding: var(--space-5); }
    .ui-glass-panel { padding: var(--space-4); }
    .ui-compact-scene { --scene-title-size: clamp(1.8rem, 6vw, 2.8rem); }
    .ui-panel { padding: var(--space-4); }
    .ui-mini-stat > strong { font-size: var(--text-2xl); }
    .ui-floating-toolbar { padding: var(--space-2); }
    .ui-floating-toolbar::before, .ui-floating-toolbar::after { display: none; }
    .ui-frame-cutout { border-radius: 0; }
    .ui-frame-cutout::before, .ui-frame-cutout::after { display: none; }
    .ui-stat-card { padding: var(--space-3); }
    .ui-stat-card .ui-stat-value { font-size: var(--text-2xl); }
    .ui-stat-card .ui-caption { word-break: keep-all; }
    .ui-stat-card .ui-stat-icon { width: var(--space-8); height: var(--space-8); font-size: var(--text-base); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .ui-card:hover { translate: none !important; }
}
