/* Style pack 0.3.0: themes own surfaces and shape, never density or text size. */
:root {
    --type-aux: 14px; --type-body: 16px; --type-block: 18px;
    --type-page: 24px; --type-number: 30px;
    --icon-size: 20px; --icon-action: 24px; --icon-stroke: 2;
    --control-border: 1px; --status-width: 10em;
    --quote-line: 2px; --quote-inset: 12px; --quote-indent: 12px;
}
/* Density is global and independent of the selected visual theme. */
:root, [data-density="compact"] {
    --group-gap: 12px; --section-gap: 16px; --card-padding: 12px;
    --row-padding: 4px; --control-height: 44px; --service-height: 44px;
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --button-gap: 8px;
}
[data-density="standard"] {
    --group-gap: 16px; --section-gap: 24px; --card-padding: 18px;
    --row-padding: 8px; --control-height: 48px; --service-height: 52px;
    --space-1: 6px; --space-2: 12px; --space-3: 18px; --button-gap: 12px;
}
[data-density="spacious"] {
    --group-gap: 20px; --section-gap: 32px; --card-padding: 24px;
    --row-padding: 12px; --control-height: 52px; --service-height: 60px;
    --space-1: 8px; --space-2: 16px; --space-3: 24px; --button-gap: 16px;
}
:root, [data-theme="clarity"] {
    color-scheme: light;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --heading-font: var(--font); --number-font: var(--font);
    --canvas: #f5f7fb; --surface: #ffffff; --input: #fff; --preview: #f8faff; --lab: #f0f3f9;
    --text: #253247; --heading: #172339; --muted: #4e5c70; --subtle: #4e5c70;
    --border: #e4e9f1; --border-strong: #cdd5e2; --hover: #f0f3f8; --table-head: #eaf0f8;
    --accent: #345cde; --accent-hover: #2749c2; --accent-soft: #edf1ff; --on-accent: #fff; --focus: #305edc;
    --positive: #176b50; --positive-soft: #eaf6f0;
    --warning: #9a6412; --warning-soft: #fff5df;
    --danger: #bd454a; --danger-soft: #fff0f0; --danger-border: #f1ced0; --queue-third: #9c8ec9;
    --sidebar: #fff; --sidebar-text: #23314a; --sidebar-muted: #4e5c70; --sidebar-border: #e6ebf3; --sidebar-inset: #f8fafd;
    --nav-active: #edf2ff; --nav-active-text: #345cde;
    --radius: 16px; --control-radius: 8px; --badge-radius: 5px;
    --shadow: 0 2px 5px #17233903; --button-shadow: 0 2px 3px #345cde18;
}
[data-theme="night-ops"] {
    color-scheme: dark;
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    --heading-font: var(--font); --number-font: "Cascadia Code", Consolas, monospace;
    --canvas: #101820; --surface: #17222c; --input: #111c26; --preview: #121e27; --lab: #131f29;
    --text: #d0dce6; --heading: #eff6fb; --muted: #a4b8c8; --subtle: #a4b8c8;
    --border: #2a3a48; --border-strong: #405563; --hover: #20313f; --table-head: #20313f;
    --accent: #63ddcd; --accent-hover: #8be8dc; --accent-soft: #1c393c; --on-accent: #0b2726; --focus: #a1f5ea;
    --positive: #79d5aa; --positive-soft: #1e3832;
    --warning: #e2ba66; --warning-soft: #3b3223;
    --danger: #f49396; --danger-soft: #3c292f; --danger-border: #75444e; --queue-third: #9c9bda;
    --sidebar: #0d151d; --sidebar-text: #e0ebf3; --sidebar-muted: #8fa6b8; --sidebar-border: #273642; --sidebar-inset: #15232d;
    --nav-active: #1b3539; --nav-active-text: #77e3d5;
    --radius: 5px; --control-radius: 4px; --badge-radius: 3px;
    --shadow: none; --button-shadow: none;
}
[data-theme="paper-ink"] {
    color-scheme: light;
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    --heading-font: Georgia, "Times New Roman", serif; --number-font: Georgia, "Times New Roman", serif;
    --canvas: #f3eee3; --surface: #faf7f0; --input: #fffdf7; --preview: #eee7d9; --lab: #eee8db;
    --text: #453e34; --heading: #2e2c26; --muted: #625949; --subtle: #625949;
    --border: #d8d0c1; --border-strong: #b9ad97; --hover: #eee8db; --table-head: #f1ebdf;
    --accent: #a34832; --accent-hover: #873923; --accent-soft: #f5e6dc; --on-accent: #fffaf1; --focus: #893a27;
    --positive: #52714c; --positive-soft: #e8ecdf;
    --warning: #805815; --warning-soft: #f3e8ce;
    --danger: #a83c3c; --danger-soft: #f5e4df; --danger-border: #d8aaa0; --queue-third: #a58c64;
    --sidebar: #e9e2d4; --sidebar-text: #39362c; --sidebar-muted: #625949; --sidebar-border: #cec3ae; --sidebar-inset: #f2ece0;
    --nav-active: #dcd2be; --nav-active-text: #733e2c;
    --radius: 0px; --control-radius: 0px; --badge-radius: 0px;
    --shadow: none; --button-shadow: none;
}

[data-theme="flat-game"] {
    color-scheme: light;
    --font: "Nunito Local", "Segoe UI", sans-serif;
    --heading-font: var(--font); --number-font: var(--font);
    --canvas: #f9f5f9; --surface: #f5eef6; --input: #e9e0eb; --preview: #f0e8f1; --lab: #f0e8f1;
    --text: #282033; --heading: #282033; --muted: #584661; --subtle: #584661;
    --border: #d2c3d6; --border-strong: #957b9d; --hover: #dfd2e4; --table-head: #ede4ef;
    --accent: #ad1b64; --accent-hover: #8e1552; --accent-soft: #f5ddec; --on-accent: #fff; --focus: #8a1a54;
    --positive: #126346; --positive-soft: #e0f0e7;
    --warning: #79500b; --warning-soft: #f8edd4;
    --danger: #b3314a; --danger-soft: #f9e1e6; --danger-border: #d39aaa; --queue-third: #965078;
    --sidebar: #f0e8f1; --sidebar-text: #282033; --sidebar-muted: #584661; --sidebar-border: #d2c3d6; --sidebar-inset: #e9e0eb;
    --nav-active: #ad1b64; --nav-active-text: #fff;
    --radius: 18px; --control-radius: 12px; --badge-radius: 10px;
    --shadow: none; --button-shadow: none; --control-border: 2px; --icon-stroke: 2.2;
}
[data-theme="simple"] {
    color-scheme: light;
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    --heading-font: Georgia, "Times New Roman", serif; --number-font: var(--font);
    --canvas: #f3f2ea; --surface: #f3f2ea; --input: #fafaf5; --preview: #eeeee4; --lab: #f3f2ea;
    --text: #272922; --heading: #22251f; --muted: #505547; --subtle: #505547;
    --border: #d9dbd0; --border-strong: #74796a; --hover: #e9ebe0; --table-head: #e6e7db;
    --accent: #904b2d; --accent-hover: #7c4026; --accent-soft: #eee0d3; --on-accent: #fff; --focus: #754027;
    --positive: #4e6748; --positive-soft: #e6eadc;
    --warning: #805817; --warning-soft: #f1e9d7;
    --danger: #a33b35; --danger-soft: #f3e2da; --danger-border: #c89e92; --queue-third: #8b8065;
    --sidebar: #f3f2ea; --sidebar-text: #272922; --sidebar-muted: #505547; --sidebar-border: #d9dbd0; --sidebar-inset: #e9ebe0;
    --nav-active: #e6e7db; --nav-active-text: #272922;
    --radius: 0px; --control-radius: 0px; --badge-radius: 0px;
    --shadow: none; --button-shadow: none;
}
/* Shape and family variations preserve every shared role and spacing token. */
[data-theme="night-ops"] .eyebrow { font-family: var(--number-font); letter-spacing: .09em; }
[data-theme="night-ops"] .metric-icon { background: transparent; border: 1px solid var(--border-strong); }
[data-theme="night-ops"] .chart-gridline { stroke-dasharray: 2 4; }
[data-theme="paper-ink"] .brand { font-family: var(--heading-font); }
[data-theme="paper-ink"] .brand-mark { background: var(--text); color: var(--surface); }
[data-theme="paper-ink"] h1, [data-theme="paper-ink"] h2 { font-weight: 400; }
[data-theme="paper-ink"] .metric-card { border-top-color: var(--text); }
[data-theme="paper-ink"] .card { border-width: 1px 0; border-top-color: var(--text); }
[data-theme="paper-ink"] .page-heading { padding-bottom: var(--space-3); border-bottom: 2px solid var(--text); }
[data-theme="paper-ink"] .chart-gridline { stroke-dasharray: none; }
[data-theme="paper-ink"] .task-title { font-family: var(--heading-font); }
[data-theme="flat-game"] h1, [data-theme="flat-game"] h2, [data-theme="flat-game"] .button { font-weight: 800; }
[data-theme="flat-game"] .icon-button { border-radius: 50%; }
[data-theme="flat-game"] dialog, [data-theme="flat-game"] .toast,
[data-theme="simple"] dialog, [data-theme="simple"] .toast { box-shadow: none; }
[data-theme="flat-game"] .button:active:not(:disabled), [data-theme="flat-game"] .icon-button:active:not(:disabled) { background: #d3bed9; color: var(--text); }
[data-theme="simple"] .card, [data-theme="simple"] .metric-card, [data-theme="simple"] .filter-panel, [data-theme="simple"] .lab-panel {
    border: 0; border-top: 1px solid var(--border-strong); background: transparent;
}
[data-theme="simple"] .metric-icon { background: transparent; }
[data-theme="simple"] .preview { border: 0; border-left: 2px solid var(--border-strong); background: transparent; }
[data-theme="simple"] .quote { font-family: "Cascadia Code", Consolas, monospace; }
[data-theme="simple"] .chart-gridline { stroke-dasharray: none; }
