/* iOES | Themes 1.26.1 — GENERATED by build.mjs from tokens.json. Do not edit by hand.
   Modes: dark, light, colorful, colorblind, contrastDark, contrastLight (+ "system": dark/light from the device).
   Usage: <link rel="stylesheet" href="ioes-themes.css"> and set data-theme on <html> (or on any element to theme just that part).
   Backward compatible: every variable of the previous ioes-themes.css keeps its name and value. */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  /* legacy names (iOES | WEB, Planner) */
  --accent: #2BB3BF;
  --accent-hi: #6CCDD6;
  --black: #0E1726;
  --line: #2C3A55;
  --panel: #172235;
  --key: #1B2740;
  --key-op: #22304A;
  --text: #F4F4F6;
  --muted: #A0A0A8;
  --steel: #6B6B73;
  --ok: #5FBF6A;
  --emissive-strength: 1;
  --territory-mix: 0.42;
  /* semantic names */
  --background: #0E1726;
  --surface: #172235;
  --surface-raised: #1B2740;
  --surface-alt: #22304A;
  --border: #2C3A55;
  --text: #F4F4F6;
  --text-muted: #A0A0A8;
  --text-subtle: #6B6B73;
  --accent: #2BB3BF;
  --accent-strong: #6CCDD6;
  --on-accent: #0E1726;
  --success: #5FBF6A;
  --warning: #F2B84B;
  --danger: #F26B6B;
  --category-1: #5AA9E6;
  --category-2: #4FD1C5;
  --category-3: #7BC96F;
  --category-4: #F2C14E;
  --category-5: #F2895A;
  --category-6: #B392F0;
  --warm-light: #FFB547;
  --hi-vis: #FF7A1A;
  --nav-selected: #1B4253;
  --success-tint: #21383C;
  --warning-tint: #363738;
  --danger-tint: #362C3D;
  --accent-text: #2BB3BF;
  --success-text: #5FBF6A;
  --warning-text: #F2B84B;
  --danger-text: #F26E6E;
  --grid-line: #646C79;
  --grid-line-strong: #838994;
  --cell-related: #193143;
  --cell-same-number: #1B4253;
  --cell-selected: #1F5969;
  --cell-error: #433140;
  --digit-player: #87D1D8;
  --digit-note: #C5C5CA;
  --digit-error: #F27B7C;
  --obstacle-fog-fill: #3D4351;
  --obstacle-fog: #A0A0A8;
  --obstacle-crystal-fill: #233A55;
  --obstacle-crystal: #5AA9E6;
  --obstacle-mirror-fill: #333657;
  --obstacle-mirror: #B392F0;
  --obstacle-rotate-fill: #3E353C;
  --obstacle-rotate: #F2895A;
  --map-land: #182438;
  --map-water: #2C4C6C;
  --map-park: #304C45;
  --map-road-minor: #40495A;
  --map-road-major: #877955;
  --map-route: #2BB3BF;
  --map-start: #5FBF6A;
  --map-end: #F26B6B;
  --overlay-category-1: #5AA9E6;
  --overlay-category-2: #4FD1C5;
  --overlay-category-3: #7BC96F;
  --overlay-category-4: #F2C14E;
  --overlay-category-5: #F2895A;
  --overlay-category-6: #B392F0;
  --overlay-label: #F4F4F6;
  --overlay-halo: #0E1726;
  --overlay-selection: #6CCDD6;
  --overlay-handle-fill: #F4F4F6;
  --overlay-handle-stroke: #2BB3BF;
  --overlay-draft: #F2B84B;
  --overlay-measure: #F4F4F6;
  --file-category-1: #5AA9E6;
  --file-category-2: #4FD1C5;
  --file-category-3: #7BC96F;
  --file-category-4: #F2C14E;
  --file-category-5: #F2895A;
  --file-category-6: #B392F0;
  --imagery-crop: #3C6245;
  --imagery-pasture: #737F48;
  --imagery-soil: #69453B;
  --imagery-road: #5E626E;
  --paper: #FFFFFF;
  --paper-ink: #0E1726;
  --paper-ink-muted: #475569;
  --paper-rule: #90949B;
  --paper-grid: #DDDFE1;
  --paper-accent: #0B6E79;
  --paper-category-1: #1F6FB2;
  --paper-category-2: #0B7F77;
  --paper-category-3: #2F7D32;
  --paper-category-4: #9A6B00;
  --paper-category-5: #B5501F;
  --paper-category-6: #6E4BC2;
  --pixel-fill: #2BB3BF;
  --pixel-fill-edge: #228491;
  --pixel-mark: #6B6B73;
  --clue-change-bg: #193346;
  --clue-change-text: #2BB3BF;
  --clue-done: #6B6B73;
  --warm-core: #FBCB84;
  --sky-top: #0E1726;
  --sky-horizon: #35302B;
  --trail-lit: #AB8248;
  --trail-lit-edge: #FFB547;
  --steel-top: #5B6274;
  --steel-side: #484E5A;
  --steel-side-shade: #2E3543;
  --neutral-line: #6B6B73;
  --player-1: #F2C14E;
  --player-2: #B392F0;
  --player-3: #7BC96F;
  --player-4: #5AA9E6;
  --territory-1: #736540;
  --territory-2: #595184;
  --territory-3: #41684D;
  --territory-4: #335B7F;
  --board-weave: #263143;
  --module-fill-1: #5298D0;
  --module-fill-2: #49BAB4;
  --module-fill-3: #9F84D9;
  --ghost-fill: #2D3748;
  --ghost-ring: #A0A0A8;
  --sky-clear-top: #0E1726;
  --sky-clear-horizon: #192B41;
  --facade: #172235;
  --facade-lit: #68553B;
  --roof-edge: #48505F;
  --target-next: #2BB3BF;
  --target-dormant: #6B6B73;
  --hazard: #F2B84B;
  --night-street: #0E1726;
  --night-block: #172235;
  --night-block-edge: #3F4858;
  --night-plaza: #22304A;
  --night-ink: #F4F4F6;
  --night-lamp: #FFB547;
  --night-sound-ring: #6CCDD6;
  --scene-sky-top: #F28C5B;
  --scene-sky-horizon: #FFD39A;
  --scene-sea: #1B6F8A;
  --scene-sand: #E9D3A6;
  --scene-foliage: #2A8050;
  --scene-road: #3A3F4A;
  --scene-lane-mark: #F2F2E8;
  --scene-cone: #FF7A1A;
  --scene-boost: #2BB3BF;
  --paper-highlight: #F2B84B;
  --paper-highlight-current: #FF7A1A;
  --on-success: #0E1726;
  --on-warning: #0E1726;
  --on-danger: #0E1726;
  --rating: #F2B84B;
  --sun-path: #FFB547;
  --sun-disc: #FBCB84;
}

:root[data-theme="light"],
[data-theme="light"] {
  color-scheme: light;
  /* legacy names (iOES | WEB, Planner) */
  --accent: #0B6E79;
  --accent-hi: #095862;
  --black: #FAF7F2;
  --line: #E6DDCF;
  --panel: #FFFFFF;
  --key: #FFFFFF;
  --key-op: #F2ECE2;
  --text: #0E1726;
  --muted: #475569;
  --steel: #86868B;
  --ok: #1E8A3A;
  --emissive-strength: 0.55;
  --territory-mix: 0.42;
  /* semantic names */
  --background: #FAF7F2;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-alt: #F2ECE2;
  --border: #E6DDCF;
  --text: #0E1726;
  --text-muted: #475569;
  --text-subtle: #86868B;
  --accent: #0B6E79;
  --accent-strong: #095862;
  --on-accent: #FFFFFF;
  --success: #1A7A34;
  --warning: #A15C00;
  --danger: #B42318;
  --category-1: #1F6FB2;
  --category-2: #0B7F77;
  --category-3: #2F7D32;
  --category-4: #9A6B00;
  --category-5: #B5501F;
  --category-6: #6E4BC2;
  --warm-light: #A66300;
  --hi-vis: #C2410C;
  --nav-selected: #C9DFE2;
  --success-tint: #DFECE3;
  --warning-tint: #F2E8DB;
  --danger-tint: #F5E0DF;
  --accent-text: #0B6E79;
  --success-text: #1A7934;
  --warning-text: #9B5902;
  --danger-text: #B42318;
  --grid-line: #90949B;
  --grid-line-strong: #71767F;
  --cell-related: #E7F1F2;
  --cell-same-number: #C9DFE2;
  --cell-selected: #A2C8CC;
  --cell-error: #F0D3D1;
  --digit-player: #0C5763;
  --digit-note: #425064;
  --digit-error: #B42318;
  --obstacle-fog-fill: #C9C9CB;
  --obstacle-fog: #475569;
  --obstacle-crystal-fill: #D7E5F1;
  --obstacle-crystal: #1F6FB2;
  --obstacle-mirror-fill: #E5DFF4;
  --obstacle-mirror: #6E4BC2;
  --obstacle-rotate-fill: #F2E0D7;
  --obstacle-rotate: #B5501F;
  --map-land: #F6F2EA;
  --map-water: #B6CBD9;
  --map-park: #C6D6BE;
  --map-road-minor: #FFFFFF;
  --map-road-major: #D7C499;
  --map-route: #0B6E79;
  --map-start: #1A7A34;
  --map-end: #B42318;
  --overlay-category-1: #5AA9E6;
  --overlay-category-2: #4FD1C5;
  --overlay-category-3: #7BC96F;
  --overlay-category-4: #F2C14E;
  --overlay-category-5: #F2895A;
  --overlay-category-6: #B392F0;
  --overlay-label: #F4F4F6;
  --overlay-halo: #0E1726;
  --overlay-selection: #6CCDD6;
  --overlay-handle-fill: #F4F4F6;
  --overlay-handle-stroke: #2BB3BF;
  --overlay-draft: #F2B84B;
  --overlay-measure: #F4F4F6;
  --file-category-1: #5AA9E6;
  --file-category-2: #4FD1C5;
  --file-category-3: #7BC96F;
  --file-category-4: #F2C14E;
  --file-category-5: #F2895A;
  --file-category-6: #B392F0;
  --imagery-crop: #3C6245;
  --imagery-pasture: #737F48;
  --imagery-soil: #69453B;
  --imagery-road: #5E626E;
  --paper: #FFFFFF;
  --paper-ink: #0E1726;
  --paper-ink-muted: #475569;
  --paper-rule: #90949B;
  --paper-grid: #DDDFE1;
  --paper-accent: #0B6E79;
  --paper-category-1: #1F6FB2;
  --paper-category-2: #0B7F77;
  --paper-category-3: #2F7D32;
  --paper-category-4: #9A6B00;
  --paper-category-5: #B5501F;
  --paper-category-6: #6E4BC2;
  --pixel-fill: #0B6E79;
  --pixel-fill-edge: #0C5864;
  --pixel-mark: #86868B;
  --clue-change-bg: #E2EEEF;
  --clue-change-text: #0B6E79;
  --clue-done: #86868B;
  --warm-core: #D7B98C;
  --sky-top: #FAF7F2;
  --sky-horizon: #E8D6BD;
  --trail-lit: #C39756;
  --trail-lit-edge: #A66300;
  --steel-top: #A5A8AC;
  --steel-side: #B2B6BB;
  --steel-side-shade: #989EA7;
  --neutral-line: #86868B;
  --player-1: #9A6B00;
  --player-2: #6E4BC2;
  --player-3: #2F7D32;
  --player-4: #1F6FB2;
  --territory-1: #D5C194;
  --territory-2: #C2B3E5;
  --territory-3: #A8C8A9;
  --territory-4: #A1C3DF;
  --board-weave: #EEEFF0;
  --module-fill-1: #3D81B9;
  --module-fill-2: #2B8E86;
  --module-fill-3: #8062C6;
  --ghost-fill: #E7E8E9;
  --ghost-ring: #475569;
  --sky-clear-top: #B1CDE4;
  --sky-clear-horizon: #E9F1F7;
  --facade: #FFFFFF;
  --facade-lit: #E0C8A6;
  --roof-edge: #CACCCF;
  --target-next: #0B6E79;
  --target-dormant: #86868B;
  --hazard: #A15C00;
  --night-street: #0E1726;
  --night-block: #172235;
  --night-block-edge: #3F4858;
  --night-plaza: #22304A;
  --night-ink: #F4F4F6;
  --night-lamp: #FFB547;
  --night-sound-ring: #6CCDD6;
  --scene-sky-top: #F28C5B;
  --scene-sky-horizon: #FFD39A;
  --scene-sea: #1B6F8A;
  --scene-sand: #E9D3A6;
  --scene-foliage: #2A8050;
  --scene-road: #3A3F4A;
  --scene-lane-mark: #F2F2E8;
  --scene-cone: #FF7A1A;
  --scene-boost: #2BB3BF;
  --paper-highlight: #F2B84B;
  --paper-highlight-current: #FF7A1A;
  --on-success: #FFFFFF;
  --on-warning: #FFFFFF;
  --on-danger: #FFFFFF;
  --rating: #A15C00;
  --sun-path: #A16101;
  --sun-disc: #D7B98C;
}

:root[data-theme="colorful"],
[data-theme="colorful"] {
  color-scheme: dark;
  /* legacy names (iOES | WEB, Planner) */
  --accent: #FF4D2E;
  --accent-hi: #FF7A3D;
  --black: #120B1F;
  --line: #3A2C57;
  --panel: #1B1230;
  --key: #26193F;
  --key-op: #342255;
  --text: #FFF7E6;
  --muted: #C9B8F0;
  --steel: #8F7FC4;
  --ok: #3DF0A0;
  --emissive-strength: 1;
  --territory-mix: 0.42;
  /* semantic names */
  --background: #120B1F;
  --surface: #1B1230;
  --surface-raised: #26193F;
  --surface-alt: #342255;
  --border: #3A2C57;
  --text: #FFF7E6;
  --text-muted: #C9B8F0;
  --text-subtle: #8F7FC4;
  --accent: #FF4D2E;
  --accent-strong: #FF7A3D;
  --on-accent: #120B1F;
  --success: #3DF0A0;
  --warning: #FFD23F;
  --danger: #FF3DA5;
  --category-1: #3DB8FF;
  --category-2: #3DF0D0;
  --category-3: #8DF03D;
  --category-4: #FFD23F;
  --category-5: #FF7A3D;
  --category-6: #C77DFF;
  --warm-light: #FFC15C;
  --hi-vis: #FF8A2A;
  --nav-selected: #4D1F30;
  --success-tint: #203140;
  --warning-tint: #3B2D32;
  --danger-tint: #3B1840;
  --accent-text: #FF5B3D;
  --success-text: #3DF0A0;
  --warning-text: #FFD23F;
  --danger-text: #FF4AAA;
  --grid-line: #6B6270;
  --grid-line-strong: #867E86;
  --cell-related: #321830;
  --cell-same-number: #4D1F30;
  --cell-selected: #72282F;
  --cell-error: #491B47;
  --digit-player: #FF8E74;
  --digit-note: #C9B8F0;
  --digit-error: #FF4EAB;
  --obstacle-fog-fill: #4F4373;
  --obstacle-fog: #C9B8F0;
  --obstacle-crystal-fill: #213055;
  --obstacle-crystal: #3DB8FF;
  --obstacle-mirror-fill: #3A2555;
  --obstacle-mirror: #C77DFF;
  --obstacle-rotate-fill: #442532;
  --obstacle-rotate: #FF7A3D;
  --map-land: #23173A;
  --map-water: #2B4775;
  --map-park: #3C4B3B;
  --map-road-minor: #4B3F59;
  --map-road-major: #937A4F;
  --map-route: #FF5B3D;
  --map-start: #3DF0A0;
  --map-end: #FF4AAA;
  --overlay-category-1: #5AA9E6;
  --overlay-category-2: #4FD1C5;
  --overlay-category-3: #7BC96F;
  --overlay-category-4: #F2C14E;
  --overlay-category-5: #F2895A;
  --overlay-category-6: #B392F0;
  --overlay-label: #F4F4F6;
  --overlay-halo: #0E1726;
  --overlay-selection: #6CCDD6;
  --overlay-handle-fill: #F4F4F6;
  --overlay-handle-stroke: #2BB3BF;
  --overlay-draft: #F2B84B;
  --overlay-measure: #F4F4F6;
  --file-category-1: #5AA9E6;
  --file-category-2: #4FD1C5;
  --file-category-3: #7BC96F;
  --file-category-4: #F2C14E;
  --file-category-5: #F2895A;
  --file-category-6: #B392F0;
  --imagery-crop: #3C6245;
  --imagery-pasture: #737F48;
  --imagery-soil: #69453B;
  --imagery-road: #5E626E;
  --paper: #FFFFFF;
  --paper-ink: #0E1726;
  --paper-ink-muted: #475569;
  --paper-rule: #90949B;
  --paper-grid: #DDDFE1;
  --paper-accent: #0B6E79;
  --paper-category-1: #1F6FB2;
  --paper-category-2: #0B7F77;
  --paper-category-3: #2F7D32;
  --paper-category-4: #9A6B00;
  --paper-category-5: #B5501F;
  --paper-category-6: #6E4BC2;
  --pixel-fill: #FF4D2E;
  --pixel-fill-edge: #B8392A;
  --pixel-mark: #8F7FC4;
  --clue-change-bg: #361930;
  --clue-change-text: #FF4D2E;
  --clue-done: #8F7FC4;
  --warm-core: #FFD48C;
  --sky-top: #120B1F;
  --sky-horizon: #382829;
  --trail-lit: #B28559;
  --trail-lit-edge: #FFC15C;
  --steel-top: #5B6274;
  --steel-side: #484E5A;
  --steel-side-shade: #2E3543;
  --neutral-line: #60646C;
  --player-1: #FFD23F;
  --player-2: #C77DFF;
  --player-3: #8DF03D;
  --player-4: #3DB8FF;
  --territory-1: #7B6336;
  --territory-2: #633F87;
  --territory-3: #4B6F35;
  --territory-4: #295887;
  --board-weave: #2B223D;
  --module-fill-1: #3CA3E7;
  --module-fill-2: #3CD3BF;
  --module-fill-3: #B270E7;
  --ghost-fill: #322942;
  --ghost-ring: #C9B8F0;
  --sky-clear-top: #120B1F;
  --sky-clear-horizon: #18233E;
  --facade: #1B1230;
  --facade-lit: #6B4F3F;
  --roof-edge: #4D4458;
  --target-next: #FF4D2E;
  --target-dormant: #60646C;
  --hazard: #FFD23F;
  --night-street: #120B1F;
  --night-block: #1B1230;
  --night-block-edge: #443B51;
  --night-plaza: #342255;
  --night-ink: #FFF7E6;
  --night-lamp: #FFC15C;
  --night-sound-ring: #FF7A3D;
  --scene-sky-top: #F28C5B;
  --scene-sky-horizon: #FFD39A;
  --scene-sea: #1B6F8A;
  --scene-sand: #E9D3A6;
  --scene-foliage: #2A8050;
  --scene-road: #3A3F4A;
  --scene-lane-mark: #F2F2E8;
  --scene-cone: #FF7A1A;
  --scene-boost: #2BB3BF;
  --paper-highlight: #F2B84B;
  --paper-highlight-current: #FF7A1A;
  --on-success: #120B1F;
  --on-warning: #120B1F;
  --on-danger: #120B1F;
  --rating: #FFD23F;
  --sun-path: #FFC15C;
  --sun-disc: #FFD48C;
}

:root[data-theme="colorblind"],
[data-theme="colorblind"] {
  color-scheme: dark;
  /* legacy names (iOES | WEB, Planner) */
  --accent: #0072B2;
  --accent-hi: #56B4E9;
  --black: #0E1726;
  --line: #2C3A55;
  --panel: #172235;
  --key: #1B2740;
  --key-op: #22304A;
  --text: #F4F4F6;
  --muted: #A0A0A8;
  --steel: #6B6B73;
  --ok: #E69F00;
  --emissive-strength: 1;
  --territory-mix: 0.42;
  /* semantic names */
  --background: #0E1726;
  --surface: #172235;
  --surface-raised: #1B2740;
  --surface-alt: #22304A;
  --border: #2C3A55;
  --text: #F4F4F6;
  --text-muted: #A0A0A8;
  --text-subtle: #6B6B73;
  --accent: #0072B2;
  --accent-strong: #56B4E9;
  --on-accent: #FFFFFF;
  --success: #009E73;
  --warning: #F0E442;
  --danger: #D55E00;
  --category-1: #56B4E9;
  --category-2: #009E73;
  --category-3: #F0E442;
  --category-4: #E69F00;
  --category-5: #D55E00;
  --category-6: #CC79A7;
  --warm-light: #E69F00;
  --hi-vis: #D55E00;
  --nav-selected: #123451;
  --success-tint: #14333E;
  --warning-tint: #353D37;
  --danger-tint: #322A2E;
  --accent-text: #55A0CA;
  --success-text: #22AA85;
  --warning-text: #F0E442;
  --danger-text: #DC8139;
  --grid-line: #646C79;
  --grid-line-strong: #838994;
  --cell-related: #152A42;
  --cell-same-number: #123451;
  --cell-selected: #0E4065;
  --cell-error: #3D2E2A;
  --digit-player: #73AFD2;
  --digit-note: #A7A7AE;
  --digit-error: #DD843E;
  --obstacle-fog-fill: #3D4351;
  --obstacle-fog: #A0A0A8;
  --obstacle-crystal-fill: #223C55;
  --obstacle-crystal: #56B4E9;
  --obstacle-mirror-fill: #38324A;
  --obstacle-mirror: #CC79A7;
  --obstacle-rotate-fill: #392D2B;
  --obstacle-rotate: #D55E00;
  --map-land: #182438;
  --map-water: #2B4F6D;
  --map-park: #4C523A;
  --map-road-minor: #40495A;
  --map-road-major: #826B36;
  --map-route: #5FA5CD;
  --map-start: #27AC88;
  --map-end: #DD843E;
  --overlay-category-1: #56B4E9;
  --overlay-category-2: #009E73;
  --overlay-category-3: #F0E442;
  --overlay-category-4: #E69F00;
  --overlay-category-5: #D55E00;
  --overlay-category-6: #CC79A7;
  --overlay-label: #F4F4F6;
  --overlay-halo: #0E1726;
  --overlay-selection: #56B4E9;
  --overlay-handle-fill: #F4F4F6;
  --overlay-handle-stroke: #0072B2;
  --overlay-draft: #F0E442;
  --overlay-measure: #F4F4F6;
  --file-category-1: #5AA9E6;
  --file-category-2: #4FD1C5;
  --file-category-3: #7BC96F;
  --file-category-4: #F2C14E;
  --file-category-5: #F2895A;
  --file-category-6: #B392F0;
  --imagery-crop: #3C6245;
  --imagery-pasture: #737F48;
  --imagery-soil: #69453B;
  --imagery-road: #5E626E;
  --paper: #FFFFFF;
  --paper-ink: #0E1726;
  --paper-ink-muted: #475569;
  --paper-rule: #90949B;
  --paper-grid: #DDDFE1;
  --paper-accent: #0B6E79;
  --paper-category-1: #1F6FB2;
  --paper-category-2: #0B7F77;
  --paper-category-3: #2F7D32;
  --paper-category-4: #9A6B00;
  --paper-category-5: #B5501F;
  --paper-category-6: #6E4BC2;
  --pixel-fill: #0072B2;
  --pixel-fill-edge: #045788;
  --pixel-mark: #6B6B73;
  --clue-change-bg: #142C44;
  --clue-change-text: #4999C6;
  --clue-done: #6B6B73;
  --warm-core: #EBBD56;
  --sky-top: #0E1726;
  --sky-horizon: #312D20;
  --trail-lit: #9C751C;
  --trail-lit-edge: #E69F00;
  --steel-top: #5B6274;
  --steel-side: #484E5A;
  --steel-side-shade: #2E3543;
  --neutral-line: #6B6B73;
  --player-1: #E69F00;
  --player-2: #CC79A7;
  --player-3: #F0E442;
  --player-4: #56B4E9;
  --territory-1: #6E571F;
  --territory-2: #634765;
  --territory-3: #72733A;
  --territory-4: #315F81;
  --board-weave: #263143;
  --module-fill-1: #4FA2D3;
  --module-fill-2: #058F6D;
  --module-fill-3: #B46F9A;
  --ghost-fill: #2D3748;
  --ghost-ring: #A0A0A8;
  --sky-clear-top: #0E1726;
  --sky-clear-horizon: #182D41;
  --facade: #172235;
  --facade-lit: #5F4E22;
  --roof-edge: #48505F;
  --target-next: #0072B2;
  --target-dormant: #6B6B73;
  --hazard: #F0E442;
  --night-street: #0E1726;
  --night-block: #172235;
  --night-block-edge: #3F4858;
  --night-plaza: #22304A;
  --night-ink: #F4F4F6;
  --night-lamp: #E69F00;
  --night-sound-ring: #56B4E9;
  --scene-sky-top: #F28C5B;
  --scene-sky-horizon: #FFD39A;
  --scene-sea: #1B6F8A;
  --scene-sand: #E9D3A6;
  --scene-foliage: #2A8050;
  --scene-road: #3A3F4A;
  --scene-lane-mark: #F2F2E8;
  --scene-cone: #FF7A1A;
  --scene-boost: #2BB3BF;
  --paper-highlight: #F2B84B;
  --paper-highlight-current: #FF7A1A;
  --on-success: #0E1726;
  --on-warning: #0E1726;
  --on-danger: #0E1726;
  --rating: #F0E442;
  --sun-path: #E69F00;
  --sun-disc: #EBBD56;
}

:root[data-theme="contrastDark"],
[data-theme="contrastDark"] {
  color-scheme: dark;
  /* legacy names (iOES | WEB, Planner) */
  --accent: #5EE2EC;
  --accent-hi: #A6F0F5;
  --black: #000000;
  --line: #8A93A6;
  --panel: #0B0F17;
  --key: #151B27;
  --key-op: #1D2433;
  --text: #FFFFFF;
  --muted: #DDE1E8;
  --steel: #B4BBC8;
  --ok: #7CF08C;
  --emissive-strength: 1;
  --territory-mix: 0.42;
  /* semantic names */
  --background: #000000;
  --surface: #0B0F17;
  --surface-raised: #151B27;
  --surface-alt: #1D2433;
  --border: #8A93A6;
  --text: #FFFFFF;
  --text-muted: #DDE1E8;
  --text-subtle: #B4BBC8;
  --accent: #5EE2EC;
  --accent-strong: #A6F0F5;
  --on-accent: #000000;
  --success: #7CF08C;
  --warning: #FFD45C;
  --danger: #FF8080;
  --category-1: #7CC4FF;
  --category-2: #5EEBD9;
  --category-3: #A6EB8F;
  --category-4: #FFC94D;
  --category-5: #FFA06B;
  --category-6: #D2B8FF;
  --warm-light: #FFC46B;
  --hi-vis: #FF8A33;
  --nav-selected: #1D3D46;
  --success-tint: #1B2F27;
  --warning-tint: #2D2B21;
  --danger-tint: #2D1F26;
  --accent-text: #5EE2EC;
  --success-text: #7CF08C;
  --warning-text: #FFD45C;
  --danger-text: #FF8080;
  --grid-line: #5E6166;
  --grid-line-strong: #797B7F;
  --cell-related: #13242C;
  --cell-same-number: #1D3D46;
  --cell-selected: #2B5F68;
  --cell-error: #3C262C;
  --digit-player: #5EE2EC;
  --digit-note: #DDE1E8;
  --digit-error: #FF8080;
  --obstacle-fog-fill: #575C67;
  --obstacle-fog: #DDE1E8;
  --obstacle-crystal-fill: #1F3041;
  --obstacle-crystal: #7CC4FF;
  --obstacle-mirror-fill: #2F2D41;
  --obstacle-mirror: #D2B8FF;
  --obstacle-rotate-fill: #372926;
  --obstacle-rotate: #FFA06B;
  --map-land: #0F121A;
  --map-water: #30475F;
  --map-park: #334636;
  --map-road-minor: #3A3D43;
  --map-road-major: #897547;
  --map-route: #5EE2EC;
  --map-start: #7CF08C;
  --map-end: #FF8080;
  --overlay-category-1: #5AA9E6;
  --overlay-category-2: #4FD1C5;
  --overlay-category-3: #7BC96F;
  --overlay-category-4: #F2C14E;
  --overlay-category-5: #F2895A;
  --overlay-category-6: #B392F0;
  --overlay-label: #F4F4F6;
  --overlay-halo: #0E1726;
  --overlay-selection: #6CCDD6;
  --overlay-handle-fill: #F4F4F6;
  --overlay-handle-stroke: #2BB3BF;
  --overlay-draft: #F2B84B;
  --overlay-measure: #F4F4F6;
  --file-category-1: #5AA9E6;
  --file-category-2: #4FD1C5;
  --file-category-3: #7BC96F;
  --file-category-4: #F2C14E;
  --file-category-5: #F2895A;
  --file-category-6: #B392F0;
  --imagery-crop: #3C6245;
  --imagery-pasture: #737F48;
  --imagery-soil: #69453B;
  --imagery-road: #5E626E;
  --paper: #FFFFFF;
  --paper-ink: #0E1726;
  --paper-ink-muted: #475569;
  --paper-rule: #90949B;
  --paper-grid: #DDDFE1;
  --paper-accent: #0B6E79;
  --paper-category-1: #1F6FB2;
  --paper-category-2: #0B7F77;
  --paper-category-3: #2F7D32;
  --paper-category-4: #9A6B00;
  --paper-category-5: #B5501F;
  --paper-category-6: #6E4BC2;
  --pixel-fill: #5EE2EC;
  --pixel-fill-edge: #429EA5;
  --pixel-mark: #B4BBC8;
  --clue-change-bg: #152831;
  --clue-change-text: #5EE2EC;
  --clue-done: #B4BBC8;
  --warm-core: #FFD99F;
  --sky-top: #000000;
  --sky-horizon: #291F11;
  --trail-lit: #A98756;
  --trail-lit-edge: #FFC46B;
  --steel-top: #737984;
  --steel-side: #585A5D;
  --steel-side-shade: #313233;
  --neutral-line: #B4BBC8;
  --player-1: #FFC94D;
  --player-2: #D2B8FF;
  --player-3: #A6EB8F;
  --player-4: #7CC4FF;
  --territory-1: #715D2E;
  --territory-2: #5F5678;
  --territory-3: #4C6B49;
  --territory-4: #3A5B78;
  --board-weave: #1C2027;
  --module-fill-1: #6FAEE2;
  --module-fill-2: #55CFC2;
  --module-fill-3: #B9A3E2;
  --ghost-fill: #23272E;
  --ghost-ring: #DDE1E8;
  --sky-clear-top: #000000;
  --sky-clear-horizon: #111B24;
  --facade: #0B0F17;
  --facade-lit: #604E34;
  --roof-edge: #41444A;
  --target-next: #5EE2EC;
  --target-dormant: #B4BBC8;
  --hazard: #FFD45C;
  --night-street: #000000;
  --night-block: #0B0F17;
  --night-block-edge: #373A41;
  --night-plaza: #1D2433;
  --night-ink: #FFFFFF;
  --night-lamp: #FFC46B;
  --night-sound-ring: #A6F0F5;
  --scene-sky-top: #F28C5B;
  --scene-sky-horizon: #FFD39A;
  --scene-sea: #1B6F8A;
  --scene-sand: #E9D3A6;
  --scene-foliage: #2A8050;
  --scene-road: #3A3F4A;
  --scene-lane-mark: #F2F2E8;
  --scene-cone: #FF7A1A;
  --scene-boost: #2BB3BF;
  --paper-highlight: #F2B84B;
  --paper-highlight-current: #FF7A1A;
  --on-success: #000000;
  --on-warning: #000000;
  --on-danger: #000000;
  --rating: #FFD45C;
  --sun-path: #FFC46B;
  --sun-disc: #FFD99F;
}

:root[data-theme="contrastLight"],
[data-theme="contrastLight"] {
  color-scheme: light;
  /* legacy names (iOES | WEB, Planner) */
  --accent: #00525A;
  --accent-hi: #003C42;
  --black: #FFFFFF;
  --line: #5B6372;
  --panel: #FFFFFF;
  --key: #FFFFFF;
  --key-op: #EDEFF3;
  --text: #000000;
  --muted: #1F2733;
  --steel: #3C4556;
  --ok: #0B6B2B;
  --emissive-strength: 0.55;
  --territory-mix: 0.42;
  /* semantic names */
  --background: #FFFFFF;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-alt: #EDEFF3;
  --border: #5B6372;
  --text: #000000;
  --text-muted: #1F2733;
  --text-subtle: #3C4556;
  --accent: #00525A;
  --accent-strong: #003C42;
  --on-accent: #FFFFFF;
  --success: #0B6B2B;
  --warning: #6B5200;
  --danger: #A3110A;
  --category-1: #0B4F8A;
  --category-2: #00635C;
  --category-3: #1E5E22;
  --category-4: #6E4A00;
  --category-5: #8F3A10;
  --category-6: #8A1F7A;
  --warm-light: #7A4A00;
  --hi-vis: #A33000;
  --nav-selected: #C7D9DB;
  --success-tint: #DDEAE1;
  --warning-tint: #EAE7DB;
  --danger-tint: #F2DEDD;
  --accent-text: #00525A;
  --success-text: #0B6B2B;
  --warning-text: #6B5200;
  --danger-text: #A3110A;
  --grid-line: #949494;
  --grid-line-strong: #757575;
  --cell-related: #E6EEEF;
  --cell-same-number: #C7D9DB;
  --cell-selected: #9EBDC0;
  --cell-error: #EDCFCE;
  --digit-player: #005159;
  --digit-note: #1F2733;
  --digit-error: #A3110A;
  --obstacle-fog-fill: #A7ABB3;
  --obstacle-fog: #1F2733;
  --obstacle-crystal-fill: #D3DFEA;
  --obstacle-crystal: #0B4F8A;
  --obstacle-mirror-fill: #EAD7E7;
  --obstacle-mirror: #8A1F7A;
  --obstacle-rotate-fill: #EBDCD4;
  --obstacle-rotate: #8F3A10;
  --map-land: #F6F7F9;
  --map-water: #B0C5D8;
  --map-park: #C2D2C5;
  --map-road-minor: #FFFFFF;
  --map-road-major: #C5B799;
  --map-route: #00525A;
  --map-start: #0B6B2B;
  --map-end: #A3110A;
  --overlay-category-1: #5AA9E6;
  --overlay-category-2: #4FD1C5;
  --overlay-category-3: #7BC96F;
  --overlay-category-4: #F2C14E;
  --overlay-category-5: #F2895A;
  --overlay-category-6: #B392F0;
  --overlay-label: #F4F4F6;
  --overlay-halo: #0E1726;
  --overlay-selection: #6CCDD6;
  --overlay-handle-fill: #F4F4F6;
  --overlay-handle-stroke: #2BB3BF;
  --overlay-draft: #F2B84B;
  --overlay-measure: #F4F4F6;
  --file-category-1: #5AA9E6;
  --file-category-2: #4FD1C5;
  --file-category-3: #7BC96F;
  --file-category-4: #F2C14E;
  --file-category-5: #F2895A;
  --file-category-6: #B392F0;
  --imagery-crop: #3C6245;
  --imagery-pasture: #737F48;
  --imagery-soil: #69453B;
  --imagery-road: #5E626E;
  --paper: #FFFFFF;
  --paper-ink: #0E1726;
  --paper-ink-muted: #475569;
  --paper-rule: #90949B;
  --paper-grid: #DDDFE1;
  --paper-accent: #0B6E79;
  --paper-category-1: #1F6FB2;
  --paper-category-2: #0B7F77;
  --paper-category-3: #2F7D32;
  --paper-category-4: #9A6B00;
  --paper-category-5: #B5501F;
  --paper-category-6: #6E4BC2;
  --pixel-fill: #00525A;
  --pixel-fill-edge: #003E44;
  --pixel-mark: #3C4556;
  --clue-change-bg: #E0EAEB;
  --clue-change-text: #00525A;
  --clue-done: #3C4556;
  --warm-core: #C3AE8C;
  --sky-top: #FFFFFF;
  --sky-horizon: #E2D7C7;
  --trail-lit: #A6895C;
  --trail-lit-edge: #7A4A00;
  --steel-top: #90959D;
  --steel-side: #A5A9AD;
  --steel-side-shade: #84888F;
  --neutral-line: #3C4556;
  --player-1: #6E4A00;
  --player-2: #8A1F7A;
  --player-3: #1E5E22;
  --player-4: #0B4F8A;
  --territory-1: #C2B394;
  --territory-2: #CEA1C7;
  --territory-3: #A1BBA2;
  --territory-4: #99B5CE;
  --board-weave: #EDEDED;
  --module-fill-1: #2B6599;
  --module-fill-2: #217771;
  --module-fill-3: #983C8B;
  --ghost-fill: #E6E6E6;
  --ghost-ring: #1F2733;
  --sky-clear-top: #AAC1D6;
  --sky-clear-horizon: #E7EDF3;
  --facade: #FFFFFF;
  --facade-lit: #D0C0A6;
  --roof-edge: #C7C7C7;
  --target-next: #00525A;
  --target-dormant: #3C4556;
  --hazard: #6B5200;
  --night-street: #000000;
  --night-block: #0B0F17;
  --night-block-edge: #373A41;
  --night-plaza: #1D2433;
  --night-ink: #FFFFFF;
  --night-lamp: #FFC46B;
  --night-sound-ring: #A6F0F5;
  --scene-sky-top: #F28C5B;
  --scene-sky-horizon: #FFD39A;
  --scene-sea: #1B6F8A;
  --scene-sand: #E9D3A6;
  --scene-foliage: #2A8050;
  --scene-road: #3A3F4A;
  --scene-lane-mark: #F2F2E8;
  --scene-cone: #FF7A1A;
  --scene-boost: #2BB3BF;
  --paper-highlight: #F2B84B;
  --paper-highlight-current: #FF7A1A;
  --on-success: #FFFFFF;
  --on-warning: #FFFFFF;
  --on-danger: #FFFFFF;
  --rating: #6B5200;
  --sun-path: #7A4A00;
  --sun-disc: #C3AE8C;
}

/* data-theme="system" follows the device: dark unless the device is light */
@media (prefers-color-scheme: light) {
  :root[data-theme="system"],
  [data-theme="system"] {
    color-scheme: light;
    /* legacy names (iOES | WEB, Planner) */
    --accent: #0B6E79;
    --accent-hi: #095862;
    --black: #FAF7F2;
    --line: #E6DDCF;
    --panel: #FFFFFF;
    --key: #FFFFFF;
    --key-op: #F2ECE2;
    --text: #0E1726;
    --muted: #475569;
    --steel: #86868B;
    --ok: #1E8A3A;
    --emissive-strength: 0.55;
    --territory-mix: 0.42;
    /* semantic names */
    --background: #FAF7F2;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --surface-alt: #F2ECE2;
    --border: #E6DDCF;
    --text: #0E1726;
    --text-muted: #475569;
    --text-subtle: #86868B;
    --accent: #0B6E79;
    --accent-strong: #095862;
    --on-accent: #FFFFFF;
    --success: #1A7A34;
    --warning: #A15C00;
    --danger: #B42318;
    --category-1: #1F6FB2;
    --category-2: #0B7F77;
    --category-3: #2F7D32;
    --category-4: #9A6B00;
    --category-5: #B5501F;
    --category-6: #6E4BC2;
    --warm-light: #A66300;
    --hi-vis: #C2410C;
    --nav-selected: #C9DFE2;
    --success-tint: #DFECE3;
    --warning-tint: #F2E8DB;
    --danger-tint: #F5E0DF;
    --accent-text: #0B6E79;
    --success-text: #1A7934;
    --warning-text: #9B5902;
    --danger-text: #B42318;
    --grid-line: #90949B;
    --grid-line-strong: #71767F;
    --cell-related: #E7F1F2;
    --cell-same-number: #C9DFE2;
    --cell-selected: #A2C8CC;
    --cell-error: #F0D3D1;
    --digit-player: #0C5763;
    --digit-note: #425064;
    --digit-error: #B42318;
    --obstacle-fog-fill: #C9C9CB;
    --obstacle-fog: #475569;
    --obstacle-crystal-fill: #D7E5F1;
    --obstacle-crystal: #1F6FB2;
    --obstacle-mirror-fill: #E5DFF4;
    --obstacle-mirror: #6E4BC2;
    --obstacle-rotate-fill: #F2E0D7;
    --obstacle-rotate: #B5501F;
    --map-land: #F6F2EA;
    --map-water: #B6CBD9;
    --map-park: #C6D6BE;
    --map-road-minor: #FFFFFF;
    --map-road-major: #D7C499;
    --map-route: #0B6E79;
    --map-start: #1A7A34;
    --map-end: #B42318;
    --overlay-category-1: #5AA9E6;
    --overlay-category-2: #4FD1C5;
    --overlay-category-3: #7BC96F;
    --overlay-category-4: #F2C14E;
    --overlay-category-5: #F2895A;
    --overlay-category-6: #B392F0;
    --overlay-label: #F4F4F6;
    --overlay-halo: #0E1726;
    --overlay-selection: #6CCDD6;
    --overlay-handle-fill: #F4F4F6;
    --overlay-handle-stroke: #2BB3BF;
    --overlay-draft: #F2B84B;
    --overlay-measure: #F4F4F6;
    --file-category-1: #5AA9E6;
    --file-category-2: #4FD1C5;
    --file-category-3: #7BC96F;
    --file-category-4: #F2C14E;
    --file-category-5: #F2895A;
    --file-category-6: #B392F0;
    --imagery-crop: #3C6245;
    --imagery-pasture: #737F48;
    --imagery-soil: #69453B;
    --imagery-road: #5E626E;
    --paper: #FFFFFF;
    --paper-ink: #0E1726;
    --paper-ink-muted: #475569;
    --paper-rule: #90949B;
    --paper-grid: #DDDFE1;
    --paper-accent: #0B6E79;
    --paper-category-1: #1F6FB2;
    --paper-category-2: #0B7F77;
    --paper-category-3: #2F7D32;
    --paper-category-4: #9A6B00;
    --paper-category-5: #B5501F;
    --paper-category-6: #6E4BC2;
    --pixel-fill: #0B6E79;
    --pixel-fill-edge: #0C5864;
    --pixel-mark: #86868B;
    --clue-change-bg: #E2EEEF;
    --clue-change-text: #0B6E79;
    --clue-done: #86868B;
    --warm-core: #D7B98C;
    --sky-top: #FAF7F2;
    --sky-horizon: #E8D6BD;
    --trail-lit: #C39756;
    --trail-lit-edge: #A66300;
    --steel-top: #A5A8AC;
    --steel-side: #B2B6BB;
    --steel-side-shade: #989EA7;
    --neutral-line: #86868B;
    --player-1: #9A6B00;
    --player-2: #6E4BC2;
    --player-3: #2F7D32;
    --player-4: #1F6FB2;
    --territory-1: #D5C194;
    --territory-2: #C2B3E5;
    --territory-3: #A8C8A9;
    --territory-4: #A1C3DF;
    --board-weave: #EEEFF0;
    --module-fill-1: #3D81B9;
    --module-fill-2: #2B8E86;
    --module-fill-3: #8062C6;
    --ghost-fill: #E7E8E9;
    --ghost-ring: #475569;
    --sky-clear-top: #B1CDE4;
    --sky-clear-horizon: #E9F1F7;
    --facade: #FFFFFF;
    --facade-lit: #E0C8A6;
    --roof-edge: #CACCCF;
    --target-next: #0B6E79;
    --target-dormant: #86868B;
    --hazard: #A15C00;
    --night-street: #0E1726;
    --night-block: #172235;
    --night-block-edge: #3F4858;
    --night-plaza: #22304A;
    --night-ink: #F4F4F6;
    --night-lamp: #FFB547;
    --night-sound-ring: #6CCDD6;
    --scene-sky-top: #F28C5B;
    --scene-sky-horizon: #FFD39A;
    --scene-sea: #1B6F8A;
    --scene-sand: #E9D3A6;
    --scene-foliage: #2A8050;
    --scene-road: #3A3F4A;
    --scene-lane-mark: #F2F2E8;
    --scene-cone: #FF7A1A;
    --scene-boost: #2BB3BF;
    --paper-highlight: #F2B84B;
    --paper-highlight-current: #FF7A1A;
    --on-success: #FFFFFF;
    --on-warning: #FFFFFF;
    --on-danger: #FFFFFF;
    --rating: #A15C00;
    --sun-path: #A16101;
    --sun-disc: #D7B98C;
  }
}

/* device asks for more contrast (Increase Contrast): dark → contrastDark */
@media (prefers-contrast: more) {
  :root[data-theme="dark"],
  [data-theme="dark"],
  :root:not([data-theme]) {
    color-scheme: dark;
    /* legacy names (iOES | WEB, Planner) */
    --accent: #5EE2EC;
    --accent-hi: #A6F0F5;
    --black: #000000;
    --line: #8A93A6;
    --panel: #0B0F17;
    --key: #151B27;
    --key-op: #1D2433;
    --text: #FFFFFF;
    --muted: #DDE1E8;
    --steel: #B4BBC8;
    --ok: #7CF08C;
    --emissive-strength: 1;
    --territory-mix: 0.42;
    /* semantic names */
    --background: #000000;
    --surface: #0B0F17;
    --surface-raised: #151B27;
    --surface-alt: #1D2433;
    --border: #8A93A6;
    --text: #FFFFFF;
    --text-muted: #DDE1E8;
    --text-subtle: #B4BBC8;
    --accent: #5EE2EC;
    --accent-strong: #A6F0F5;
    --on-accent: #000000;
    --success: #7CF08C;
    --warning: #FFD45C;
    --danger: #FF8080;
    --category-1: #7CC4FF;
    --category-2: #5EEBD9;
    --category-3: #A6EB8F;
    --category-4: #FFC94D;
    --category-5: #FFA06B;
    --category-6: #D2B8FF;
    --warm-light: #FFC46B;
    --hi-vis: #FF8A33;
    --nav-selected: #1D3D46;
    --success-tint: #1B2F27;
    --warning-tint: #2D2B21;
    --danger-tint: #2D1F26;
    --accent-text: #5EE2EC;
    --success-text: #7CF08C;
    --warning-text: #FFD45C;
    --danger-text: #FF8080;
    --grid-line: #5E6166;
    --grid-line-strong: #797B7F;
    --cell-related: #13242C;
    --cell-same-number: #1D3D46;
    --cell-selected: #2B5F68;
    --cell-error: #3C262C;
    --digit-player: #5EE2EC;
    --digit-note: #DDE1E8;
    --digit-error: #FF8080;
    --obstacle-fog-fill: #575C67;
    --obstacle-fog: #DDE1E8;
    --obstacle-crystal-fill: #1F3041;
    --obstacle-crystal: #7CC4FF;
    --obstacle-mirror-fill: #2F2D41;
    --obstacle-mirror: #D2B8FF;
    --obstacle-rotate-fill: #372926;
    --obstacle-rotate: #FFA06B;
    --map-land: #0F121A;
    --map-water: #30475F;
    --map-park: #334636;
    --map-road-minor: #3A3D43;
    --map-road-major: #897547;
    --map-route: #5EE2EC;
    --map-start: #7CF08C;
    --map-end: #FF8080;
    --overlay-category-1: #5AA9E6;
    --overlay-category-2: #4FD1C5;
    --overlay-category-3: #7BC96F;
    --overlay-category-4: #F2C14E;
    --overlay-category-5: #F2895A;
    --overlay-category-6: #B392F0;
    --overlay-label: #F4F4F6;
    --overlay-halo: #0E1726;
    --overlay-selection: #6CCDD6;
    --overlay-handle-fill: #F4F4F6;
    --overlay-handle-stroke: #2BB3BF;
    --overlay-draft: #F2B84B;
    --overlay-measure: #F4F4F6;
    --file-category-1: #5AA9E6;
    --file-category-2: #4FD1C5;
    --file-category-3: #7BC96F;
    --file-category-4: #F2C14E;
    --file-category-5: #F2895A;
    --file-category-6: #B392F0;
    --imagery-crop: #3C6245;
    --imagery-pasture: #737F48;
    --imagery-soil: #69453B;
    --imagery-road: #5E626E;
    --paper: #FFFFFF;
    --paper-ink: #0E1726;
    --paper-ink-muted: #475569;
    --paper-rule: #90949B;
    --paper-grid: #DDDFE1;
    --paper-accent: #0B6E79;
    --paper-category-1: #1F6FB2;
    --paper-category-2: #0B7F77;
    --paper-category-3: #2F7D32;
    --paper-category-4: #9A6B00;
    --paper-category-5: #B5501F;
    --paper-category-6: #6E4BC2;
    --pixel-fill: #5EE2EC;
    --pixel-fill-edge: #429EA5;
    --pixel-mark: #B4BBC8;
    --clue-change-bg: #152831;
    --clue-change-text: #5EE2EC;
    --clue-done: #B4BBC8;
    --warm-core: #FFD99F;
    --sky-top: #000000;
    --sky-horizon: #291F11;
    --trail-lit: #A98756;
    --trail-lit-edge: #FFC46B;
    --steel-top: #737984;
    --steel-side: #585A5D;
    --steel-side-shade: #313233;
    --neutral-line: #B4BBC8;
    --player-1: #FFC94D;
    --player-2: #D2B8FF;
    --player-3: #A6EB8F;
    --player-4: #7CC4FF;
    --territory-1: #715D2E;
    --territory-2: #5F5678;
    --territory-3: #4C6B49;
    --territory-4: #3A5B78;
    --board-weave: #1C2027;
    --module-fill-1: #6FAEE2;
    --module-fill-2: #55CFC2;
    --module-fill-3: #B9A3E2;
    --ghost-fill: #23272E;
    --ghost-ring: #DDE1E8;
    --sky-clear-top: #000000;
    --sky-clear-horizon: #111B24;
    --facade: #0B0F17;
    --facade-lit: #604E34;
    --roof-edge: #41444A;
    --target-next: #5EE2EC;
    --target-dormant: #B4BBC8;
    --hazard: #FFD45C;
    --night-street: #000000;
    --night-block: #0B0F17;
    --night-block-edge: #373A41;
    --night-plaza: #1D2433;
    --night-ink: #FFFFFF;
    --night-lamp: #FFC46B;
    --night-sound-ring: #A6F0F5;
    --scene-sky-top: #F28C5B;
    --scene-sky-horizon: #FFD39A;
    --scene-sea: #1B6F8A;
    --scene-sand: #E9D3A6;
    --scene-foliage: #2A8050;
    --scene-road: #3A3F4A;
    --scene-lane-mark: #F2F2E8;
    --scene-cone: #FF7A1A;
    --scene-boost: #2BB3BF;
    --paper-highlight: #F2B84B;
    --paper-highlight-current: #FF7A1A;
    --on-success: #000000;
    --on-warning: #000000;
    --on-danger: #000000;
    --rating: #FFD45C;
    --sun-path: #FFC46B;
    --sun-disc: #FFD99F;
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root[data-theme="system"],
  [data-theme="system"] {
    color-scheme: dark;
    /* legacy names (iOES | WEB, Planner) */
    --accent: #5EE2EC;
    --accent-hi: #A6F0F5;
    --black: #000000;
    --line: #8A93A6;
    --panel: #0B0F17;
    --key: #151B27;
    --key-op: #1D2433;
    --text: #FFFFFF;
    --muted: #DDE1E8;
    --steel: #B4BBC8;
    --ok: #7CF08C;
    --emissive-strength: 1;
    --territory-mix: 0.42;
    /* semantic names */
    --background: #000000;
    --surface: #0B0F17;
    --surface-raised: #151B27;
    --surface-alt: #1D2433;
    --border: #8A93A6;
    --text: #FFFFFF;
    --text-muted: #DDE1E8;
    --text-subtle: #B4BBC8;
    --accent: #5EE2EC;
    --accent-strong: #A6F0F5;
    --on-accent: #000000;
    --success: #7CF08C;
    --warning: #FFD45C;
    --danger: #FF8080;
    --category-1: #7CC4FF;
    --category-2: #5EEBD9;
    --category-3: #A6EB8F;
    --category-4: #FFC94D;
    --category-5: #FFA06B;
    --category-6: #D2B8FF;
    --warm-light: #FFC46B;
    --hi-vis: #FF8A33;
    --nav-selected: #1D3D46;
    --success-tint: #1B2F27;
    --warning-tint: #2D2B21;
    --danger-tint: #2D1F26;
    --accent-text: #5EE2EC;
    --success-text: #7CF08C;
    --warning-text: #FFD45C;
    --danger-text: #FF8080;
    --grid-line: #5E6166;
    --grid-line-strong: #797B7F;
    --cell-related: #13242C;
    --cell-same-number: #1D3D46;
    --cell-selected: #2B5F68;
    --cell-error: #3C262C;
    --digit-player: #5EE2EC;
    --digit-note: #DDE1E8;
    --digit-error: #FF8080;
    --obstacle-fog-fill: #575C67;
    --obstacle-fog: #DDE1E8;
    --obstacle-crystal-fill: #1F3041;
    --obstacle-crystal: #7CC4FF;
    --obstacle-mirror-fill: #2F2D41;
    --obstacle-mirror: #D2B8FF;
    --obstacle-rotate-fill: #372926;
    --obstacle-rotate: #FFA06B;
    --map-land: #0F121A;
    --map-water: #30475F;
    --map-park: #334636;
    --map-road-minor: #3A3D43;
    --map-road-major: #897547;
    --map-route: #5EE2EC;
    --map-start: #7CF08C;
    --map-end: #FF8080;
    --overlay-category-1: #5AA9E6;
    --overlay-category-2: #4FD1C5;
    --overlay-category-3: #7BC96F;
    --overlay-category-4: #F2C14E;
    --overlay-category-5: #F2895A;
    --overlay-category-6: #B392F0;
    --overlay-label: #F4F4F6;
    --overlay-halo: #0E1726;
    --overlay-selection: #6CCDD6;
    --overlay-handle-fill: #F4F4F6;
    --overlay-handle-stroke: #2BB3BF;
    --overlay-draft: #F2B84B;
    --overlay-measure: #F4F4F6;
    --file-category-1: #5AA9E6;
    --file-category-2: #4FD1C5;
    --file-category-3: #7BC96F;
    --file-category-4: #F2C14E;
    --file-category-5: #F2895A;
    --file-category-6: #B392F0;
    --imagery-crop: #3C6245;
    --imagery-pasture: #737F48;
    --imagery-soil: #69453B;
    --imagery-road: #5E626E;
    --paper: #FFFFFF;
    --paper-ink: #0E1726;
    --paper-ink-muted: #475569;
    --paper-rule: #90949B;
    --paper-grid: #DDDFE1;
    --paper-accent: #0B6E79;
    --paper-category-1: #1F6FB2;
    --paper-category-2: #0B7F77;
    --paper-category-3: #2F7D32;
    --paper-category-4: #9A6B00;
    --paper-category-5: #B5501F;
    --paper-category-6: #6E4BC2;
    --pixel-fill: #5EE2EC;
    --pixel-fill-edge: #429EA5;
    --pixel-mark: #B4BBC8;
    --clue-change-bg: #152831;
    --clue-change-text: #5EE2EC;
    --clue-done: #B4BBC8;
    --warm-core: #FFD99F;
    --sky-top: #000000;
    --sky-horizon: #291F11;
    --trail-lit: #A98756;
    --trail-lit-edge: #FFC46B;
    --steel-top: #737984;
    --steel-side: #585A5D;
    --steel-side-shade: #313233;
    --neutral-line: #B4BBC8;
    --player-1: #FFC94D;
    --player-2: #D2B8FF;
    --player-3: #A6EB8F;
    --player-4: #7CC4FF;
    --territory-1: #715D2E;
    --territory-2: #5F5678;
    --territory-3: #4C6B49;
    --territory-4: #3A5B78;
    --board-weave: #1C2027;
    --module-fill-1: #6FAEE2;
    --module-fill-2: #55CFC2;
    --module-fill-3: #B9A3E2;
    --ghost-fill: #23272E;
    --ghost-ring: #DDE1E8;
    --sky-clear-top: #000000;
    --sky-clear-horizon: #111B24;
    --facade: #0B0F17;
    --facade-lit: #604E34;
    --roof-edge: #41444A;
    --target-next: #5EE2EC;
    --target-dormant: #B4BBC8;
    --hazard: #FFD45C;
    --night-street: #000000;
    --night-block: #0B0F17;
    --night-block-edge: #373A41;
    --night-plaza: #1D2433;
    --night-ink: #FFFFFF;
    --night-lamp: #FFC46B;
    --night-sound-ring: #A6F0F5;
    --scene-sky-top: #F28C5B;
    --scene-sky-horizon: #FFD39A;
    --scene-sea: #1B6F8A;
    --scene-sand: #E9D3A6;
    --scene-foliage: #2A8050;
    --scene-road: #3A3F4A;
    --scene-lane-mark: #F2F2E8;
    --scene-cone: #FF7A1A;
    --scene-boost: #2BB3BF;
    --paper-highlight: #F2B84B;
    --paper-highlight-current: #FF7A1A;
    --on-success: #000000;
    --on-warning: #000000;
    --on-danger: #000000;
    --rating: #FFD45C;
    --sun-path: #FFC46B;
    --sun-disc: #FFD99F;
  }
}

/* device asks for more contrast (Increase Contrast): light → contrastLight */
@media (prefers-contrast: more) {
  :root[data-theme="light"],
  [data-theme="light"] {
    color-scheme: light;
    /* legacy names (iOES | WEB, Planner) */
    --accent: #00525A;
    --accent-hi: #003C42;
    --black: #FFFFFF;
    --line: #5B6372;
    --panel: #FFFFFF;
    --key: #FFFFFF;
    --key-op: #EDEFF3;
    --text: #000000;
    --muted: #1F2733;
    --steel: #3C4556;
    --ok: #0B6B2B;
    --emissive-strength: 0.55;
    --territory-mix: 0.42;
    /* semantic names */
    --background: #FFFFFF;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --surface-alt: #EDEFF3;
    --border: #5B6372;
    --text: #000000;
    --text-muted: #1F2733;
    --text-subtle: #3C4556;
    --accent: #00525A;
    --accent-strong: #003C42;
    --on-accent: #FFFFFF;
    --success: #0B6B2B;
    --warning: #6B5200;
    --danger: #A3110A;
    --category-1: #0B4F8A;
    --category-2: #00635C;
    --category-3: #1E5E22;
    --category-4: #6E4A00;
    --category-5: #8F3A10;
    --category-6: #8A1F7A;
    --warm-light: #7A4A00;
    --hi-vis: #A33000;
    --nav-selected: #C7D9DB;
    --success-tint: #DDEAE1;
    --warning-tint: #EAE7DB;
    --danger-tint: #F2DEDD;
    --accent-text: #00525A;
    --success-text: #0B6B2B;
    --warning-text: #6B5200;
    --danger-text: #A3110A;
    --grid-line: #949494;
    --grid-line-strong: #757575;
    --cell-related: #E6EEEF;
    --cell-same-number: #C7D9DB;
    --cell-selected: #9EBDC0;
    --cell-error: #EDCFCE;
    --digit-player: #005159;
    --digit-note: #1F2733;
    --digit-error: #A3110A;
    --obstacle-fog-fill: #A7ABB3;
    --obstacle-fog: #1F2733;
    --obstacle-crystal-fill: #D3DFEA;
    --obstacle-crystal: #0B4F8A;
    --obstacle-mirror-fill: #EAD7E7;
    --obstacle-mirror: #8A1F7A;
    --obstacle-rotate-fill: #EBDCD4;
    --obstacle-rotate: #8F3A10;
    --map-land: #F6F7F9;
    --map-water: #B0C5D8;
    --map-park: #C2D2C5;
    --map-road-minor: #FFFFFF;
    --map-road-major: #C5B799;
    --map-route: #00525A;
    --map-start: #0B6B2B;
    --map-end: #A3110A;
    --overlay-category-1: #5AA9E6;
    --overlay-category-2: #4FD1C5;
    --overlay-category-3: #7BC96F;
    --overlay-category-4: #F2C14E;
    --overlay-category-5: #F2895A;
    --overlay-category-6: #B392F0;
    --overlay-label: #F4F4F6;
    --overlay-halo: #0E1726;
    --overlay-selection: #6CCDD6;
    --overlay-handle-fill: #F4F4F6;
    --overlay-handle-stroke: #2BB3BF;
    --overlay-draft: #F2B84B;
    --overlay-measure: #F4F4F6;
    --file-category-1: #5AA9E6;
    --file-category-2: #4FD1C5;
    --file-category-3: #7BC96F;
    --file-category-4: #F2C14E;
    --file-category-5: #F2895A;
    --file-category-6: #B392F0;
    --imagery-crop: #3C6245;
    --imagery-pasture: #737F48;
    --imagery-soil: #69453B;
    --imagery-road: #5E626E;
    --paper: #FFFFFF;
    --paper-ink: #0E1726;
    --paper-ink-muted: #475569;
    --paper-rule: #90949B;
    --paper-grid: #DDDFE1;
    --paper-accent: #0B6E79;
    --paper-category-1: #1F6FB2;
    --paper-category-2: #0B7F77;
    --paper-category-3: #2F7D32;
    --paper-category-4: #9A6B00;
    --paper-category-5: #B5501F;
    --paper-category-6: #6E4BC2;
    --pixel-fill: #00525A;
    --pixel-fill-edge: #003E44;
    --pixel-mark: #3C4556;
    --clue-change-bg: #E0EAEB;
    --clue-change-text: #00525A;
    --clue-done: #3C4556;
    --warm-core: #C3AE8C;
    --sky-top: #FFFFFF;
    --sky-horizon: #E2D7C7;
    --trail-lit: #A6895C;
    --trail-lit-edge: #7A4A00;
    --steel-top: #90959D;
    --steel-side: #A5A9AD;
    --steel-side-shade: #84888F;
    --neutral-line: #3C4556;
    --player-1: #6E4A00;
    --player-2: #8A1F7A;
    --player-3: #1E5E22;
    --player-4: #0B4F8A;
    --territory-1: #C2B394;
    --territory-2: #CEA1C7;
    --territory-3: #A1BBA2;
    --territory-4: #99B5CE;
    --board-weave: #EDEDED;
    --module-fill-1: #2B6599;
    --module-fill-2: #217771;
    --module-fill-3: #983C8B;
    --ghost-fill: #E6E6E6;
    --ghost-ring: #1F2733;
    --sky-clear-top: #AAC1D6;
    --sky-clear-horizon: #E7EDF3;
    --facade: #FFFFFF;
    --facade-lit: #D0C0A6;
    --roof-edge: #C7C7C7;
    --target-next: #00525A;
    --target-dormant: #3C4556;
    --hazard: #6B5200;
    --night-street: #000000;
    --night-block: #0B0F17;
    --night-block-edge: #373A41;
    --night-plaza: #1D2433;
    --night-ink: #FFFFFF;
    --night-lamp: #FFC46B;
    --night-sound-ring: #A6F0F5;
    --scene-sky-top: #F28C5B;
    --scene-sky-horizon: #FFD39A;
    --scene-sea: #1B6F8A;
    --scene-sand: #E9D3A6;
    --scene-foliage: #2A8050;
    --scene-road: #3A3F4A;
    --scene-lane-mark: #F2F2E8;
    --scene-cone: #FF7A1A;
    --scene-boost: #2BB3BF;
    --paper-highlight: #F2B84B;
    --paper-highlight-current: #FF7A1A;
    --on-success: #FFFFFF;
    --on-warning: #FFFFFF;
    --on-danger: #FFFFFF;
    --rating: #6B5200;
    --sun-path: #7A4A00;
    --sun-disc: #C3AE8C;
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root[data-theme="system"],
  [data-theme="system"] {
    color-scheme: light;
    /* legacy names (iOES | WEB, Planner) */
    --accent: #00525A;
    --accent-hi: #003C42;
    --black: #FFFFFF;
    --line: #5B6372;
    --panel: #FFFFFF;
    --key: #FFFFFF;
    --key-op: #EDEFF3;
    --text: #000000;
    --muted: #1F2733;
    --steel: #3C4556;
    --ok: #0B6B2B;
    --emissive-strength: 0.55;
    --territory-mix: 0.42;
    /* semantic names */
    --background: #FFFFFF;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --surface-alt: #EDEFF3;
    --border: #5B6372;
    --text: #000000;
    --text-muted: #1F2733;
    --text-subtle: #3C4556;
    --accent: #00525A;
    --accent-strong: #003C42;
    --on-accent: #FFFFFF;
    --success: #0B6B2B;
    --warning: #6B5200;
    --danger: #A3110A;
    --category-1: #0B4F8A;
    --category-2: #00635C;
    --category-3: #1E5E22;
    --category-4: #6E4A00;
    --category-5: #8F3A10;
    --category-6: #8A1F7A;
    --warm-light: #7A4A00;
    --hi-vis: #A33000;
    --nav-selected: #C7D9DB;
    --success-tint: #DDEAE1;
    --warning-tint: #EAE7DB;
    --danger-tint: #F2DEDD;
    --accent-text: #00525A;
    --success-text: #0B6B2B;
    --warning-text: #6B5200;
    --danger-text: #A3110A;
    --grid-line: #949494;
    --grid-line-strong: #757575;
    --cell-related: #E6EEEF;
    --cell-same-number: #C7D9DB;
    --cell-selected: #9EBDC0;
    --cell-error: #EDCFCE;
    --digit-player: #005159;
    --digit-note: #1F2733;
    --digit-error: #A3110A;
    --obstacle-fog-fill: #A7ABB3;
    --obstacle-fog: #1F2733;
    --obstacle-crystal-fill: #D3DFEA;
    --obstacle-crystal: #0B4F8A;
    --obstacle-mirror-fill: #EAD7E7;
    --obstacle-mirror: #8A1F7A;
    --obstacle-rotate-fill: #EBDCD4;
    --obstacle-rotate: #8F3A10;
    --map-land: #F6F7F9;
    --map-water: #B0C5D8;
    --map-park: #C2D2C5;
    --map-road-minor: #FFFFFF;
    --map-road-major: #C5B799;
    --map-route: #00525A;
    --map-start: #0B6B2B;
    --map-end: #A3110A;
    --overlay-category-1: #5AA9E6;
    --overlay-category-2: #4FD1C5;
    --overlay-category-3: #7BC96F;
    --overlay-category-4: #F2C14E;
    --overlay-category-5: #F2895A;
    --overlay-category-6: #B392F0;
    --overlay-label: #F4F4F6;
    --overlay-halo: #0E1726;
    --overlay-selection: #6CCDD6;
    --overlay-handle-fill: #F4F4F6;
    --overlay-handle-stroke: #2BB3BF;
    --overlay-draft: #F2B84B;
    --overlay-measure: #F4F4F6;
    --file-category-1: #5AA9E6;
    --file-category-2: #4FD1C5;
    --file-category-3: #7BC96F;
    --file-category-4: #F2C14E;
    --file-category-5: #F2895A;
    --file-category-6: #B392F0;
    --imagery-crop: #3C6245;
    --imagery-pasture: #737F48;
    --imagery-soil: #69453B;
    --imagery-road: #5E626E;
    --paper: #FFFFFF;
    --paper-ink: #0E1726;
    --paper-ink-muted: #475569;
    --paper-rule: #90949B;
    --paper-grid: #DDDFE1;
    --paper-accent: #0B6E79;
    --paper-category-1: #1F6FB2;
    --paper-category-2: #0B7F77;
    --paper-category-3: #2F7D32;
    --paper-category-4: #9A6B00;
    --paper-category-5: #B5501F;
    --paper-category-6: #6E4BC2;
    --pixel-fill: #00525A;
    --pixel-fill-edge: #003E44;
    --pixel-mark: #3C4556;
    --clue-change-bg: #E0EAEB;
    --clue-change-text: #00525A;
    --clue-done: #3C4556;
    --warm-core: #C3AE8C;
    --sky-top: #FFFFFF;
    --sky-horizon: #E2D7C7;
    --trail-lit: #A6895C;
    --trail-lit-edge: #7A4A00;
    --steel-top: #90959D;
    --steel-side: #A5A9AD;
    --steel-side-shade: #84888F;
    --neutral-line: #3C4556;
    --player-1: #6E4A00;
    --player-2: #8A1F7A;
    --player-3: #1E5E22;
    --player-4: #0B4F8A;
    --territory-1: #C2B394;
    --territory-2: #CEA1C7;
    --territory-3: #A1BBA2;
    --territory-4: #99B5CE;
    --board-weave: #EDEDED;
    --module-fill-1: #2B6599;
    --module-fill-2: #217771;
    --module-fill-3: #983C8B;
    --ghost-fill: #E6E6E6;
    --ghost-ring: #1F2733;
    --sky-clear-top: #AAC1D6;
    --sky-clear-horizon: #E7EDF3;
    --facade: #FFFFFF;
    --facade-lit: #D0C0A6;
    --roof-edge: #C7C7C7;
    --target-next: #00525A;
    --target-dormant: #3C4556;
    --hazard: #6B5200;
    --night-street: #000000;
    --night-block: #0B0F17;
    --night-block-edge: #373A41;
    --night-plaza: #1D2433;
    --night-ink: #FFFFFF;
    --night-lamp: #FFC46B;
    --night-sound-ring: #A6F0F5;
    --scene-sky-top: #F28C5B;
    --scene-sky-horizon: #FFD39A;
    --scene-sea: #1B6F8A;
    --scene-sand: #E9D3A6;
    --scene-foliage: #2A8050;
    --scene-road: #3A3F4A;
    --scene-lane-mark: #F2F2E8;
    --scene-cone: #FF7A1A;
    --scene-boost: #2BB3BF;
    --paper-highlight: #F2B84B;
    --paper-highlight-current: #FF7A1A;
    --on-success: #FFFFFF;
    --on-warning: #FFFFFF;
    --on-danger: #FFFFFF;
    --rating: #6B5200;
    --sun-path: #7A4A00;
    --sun-disc: #C3AE8C;
  }
}

/* scales (same in every mode) */
:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-menu: 14px;
  --radius-xl: 24px;
  --radius-sheet: 28px;
  --radius-pill: 999px;
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-xxxl: 48px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --type-hero-size: clamp(44px, 6.4vw, 84px); --type-hero-line: 1.02; --type-hero-weight: 800; --type-hero-tracking: -0.03em;
  --type-section-title-size: clamp(32px, 4.4vw, 52px); --type-section-title-line: 1.08; --type-section-title-weight: 700; --type-section-title-tracking: -0.02em;
  --type-display-size: 34px; --type-display-line: 41px; --type-display-weight: 700;
  --type-title-size: 28px; --type-title-line: 34px; --type-title-weight: 700;
  --type-title-2-size: 22px; --type-title-2-line: 28px; --type-title-2-weight: 600;
  --type-title-3-size: 20px; --type-title-3-line: 25px; --type-title-3-weight: 600;
  --type-headline-size: 17px; --type-headline-line: 22px; --type-headline-weight: 600;
  --type-body-size: 17px; --type-body-line: 22px; --type-body-weight: 400;
  --type-callout-size: 16px; --type-callout-line: 21px; --type-callout-weight: 400;
  --type-subhead-size: 15px; --type-subhead-line: 20px; --type-subhead-weight: 400;
  --type-footnote-size: 13px; --type-footnote-line: 18px; --type-footnote-weight: 400;
  --type-caption-size: 12px; --type-caption-line: 16px; --type-caption-weight: 500;
  --type-kpi-size: 34px; --type-kpi-line: 38px; --type-kpi-weight: 700;
  --type-kpi-small-size: 22px; --type-kpi-small-line: 26px; --type-kpi-small-weight: 700;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.24);
  --shadow-panel: 0 24px 48px -30px rgba(0, 0, 0, 0.55);
  --shadow-panel-hover: 0 32px 64px -28px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
  --dur-reveal: 1000ms;
}

/* effects: recomputed on every themed element so scoped data-theme parts get their own colors */
:root,
[data-theme] {
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);
  --sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%);
  --night-lamp-glow: color-mix(in srgb, var(--night-lamp) 28%, transparent);
  /* glass (web equivalent of OS27 Liquid Glass): token surface, less see-through than OS26, darker edge, brighter top highlight */
  --glass-fill: color-mix(in srgb, var(--surface-raised) 80%, transparent);
  --glass-edge: color-mix(in srgb, var(--text) 20%, transparent);
  --glass-highlight: inset 0 1px 0 color-mix(in srgb, #FFFFFF 20%, transparent);
  /* OS27 toolbar: clear over the top of the content, solid with a hairline once content scrolls under it */
  --toolbar-solid: color-mix(in srgb, var(--background) 96%, transparent);
  --toolbar-edge: var(--border);
  --glass-blur: saturate(1.6) blur(18px);
  --scrim: rgba(0, 0, 0, 0.32);
  --sun-shadow: rgba(0, 0, 0, 0.36);
  --hud-scrim: color-mix(in srgb, var(--surface) 84%, transparent);
  --warm-glow: color-mix(in srgb, var(--warm-light) 22%, transparent);
  --gradient-brand: linear-gradient(90deg, var(--accent), var(--category-6), var(--category-5));
}

/* Modal scrim: put behind a drawer, sheet or dialog; tapping it closes the panel */
.ioes-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
.ioes-scrim[hidden] { display: none; }

/* Base surface so any page using these tokens follows the theme */
html, body { background: var(--black); color: var(--text); }

/* Accessible focus ring in every theme */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Type helpers */
.ioes-hero { font-family: var(--font-sans); font-size: var(--type-hero-size); line-height: var(--type-hero-line); font-weight: var(--type-hero-weight); letter-spacing: var(--type-hero-tracking); }
.ioes-section-title { font-family: var(--font-sans); font-size: var(--type-section-title-size); line-height: var(--type-section-title-line); font-weight: var(--type-section-title-weight); letter-spacing: var(--type-section-title-tracking); }
.ioes-display { font-family: var(--font-sans); font-size: var(--type-display-size); line-height: var(--type-display-line); font-weight: var(--type-display-weight); }
.ioes-title { font-family: var(--font-sans); font-size: var(--type-title-size); line-height: var(--type-title-line); font-weight: var(--type-title-weight); }
.ioes-title-2 { font-family: var(--font-sans); font-size: var(--type-title-2-size); line-height: var(--type-title-2-line); font-weight: var(--type-title-2-weight); }
.ioes-title-3 { font-family: var(--font-sans); font-size: var(--type-title-3-size); line-height: var(--type-title-3-line); font-weight: var(--type-title-3-weight); }
.ioes-headline { font-family: var(--font-sans); font-size: var(--type-headline-size); line-height: var(--type-headline-line); font-weight: var(--type-headline-weight); }
.ioes-body { font-family: var(--font-sans); font-size: var(--type-body-size); line-height: var(--type-body-line); font-weight: var(--type-body-weight); }
.ioes-callout { font-family: var(--font-sans); font-size: var(--type-callout-size); line-height: var(--type-callout-line); font-weight: var(--type-callout-weight); }
.ioes-subhead { font-family: var(--font-sans); font-size: var(--type-subhead-size); line-height: var(--type-subhead-line); font-weight: var(--type-subhead-weight); }
.ioes-footnote { font-family: var(--font-sans); font-size: var(--type-footnote-size); line-height: var(--type-footnote-line); font-weight: var(--type-footnote-weight); }
.ioes-caption { font-family: var(--font-sans); font-size: var(--type-caption-size); line-height: var(--type-caption-line); font-weight: var(--type-caption-weight); }
.ioes-kpi { font-family: var(--font-rounded); font-size: var(--type-kpi-size); line-height: var(--type-kpi-line); font-weight: var(--type-kpi-weight); font-variant-numeric: tabular-nums; }
.ioes-kpi-small { font-family: var(--font-rounded); font-size: var(--type-kpi-small-size); line-height: var(--type-kpi-small-line); font-weight: var(--type-kpi-small-weight); font-variant-numeric: tabular-nums; }

/* ---------- components (same names as the Swift package) ---------- */
.ioes-btn, .ioes-card, .ioes-chip, .ioes-tile, .ioes-panel, .ioes-icon-tile, .ioes-board, .ioes-cell, .ioes-device, .ioes-device__screen,
.ioes-toolbar, .ioes-sidebar, .ioes-sidebar__item { box-sizing: border-box; }   /* no global reset needed */
.ioes-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  min-height: 48px; padding: 0 var(--space-xl); border-radius: var(--radius-pill);   /* capsule, like iOS 26/27 buttons */
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font: var(--type-headline-weight) var(--type-headline-size)/1 var(--font-sans);
  transition: filter var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.ioes-btn:active { transform: scale(0.98); }
.ioes-btn:disabled, .ioes-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.ioes-btn--primary { background: var(--accent); color: var(--on-accent); }
.ioes-btn--primary:hover { filter: brightness(1.08); }
.ioes-btn--secondary { background: var(--glass-fill); color: var(--text); border-color: var(--glass-edge); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.ioes-btn--secondary:hover { border-color: var(--accent); }
.ioes-btn--block { display: flex; width: 100%; }

.ioes-card {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm);
}

.ioes-chip {
  --chip: var(--text-muted);
  display: inline-flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill);
  background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border);
  font: 600 13px/18px var(--font-sans); white-space: nowrap;
}
.ioes-chip--on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ioes-chip--tint { background: color-mix(in srgb, var(--chip) 18%, transparent); color: var(--chip); border-color: color-mix(in srgb, var(--chip) 35%, transparent); }
/* status chips: opaque tint + text color checked ≥4.5:1 on it (use these, not --chip, for success/warning/danger words) */
.ioes-chip--success { background: var(--success-tint); color: var(--success-text); border-color: color-mix(in srgb, var(--success) 45%, var(--success-tint)); }
.ioes-chip--warning { background: var(--warning-tint); color: var(--warning-text); border-color: color-mix(in srgb, var(--warning) 45%, var(--warning-tint)); }
.ioes-chip--danger { background: var(--danger-tint); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 45%, var(--danger-tint)); }

.ioes-icon-tile {
  --tile-color: var(--accent);
  display: inline-grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--tile-color) 18%, transparent); color: var(--tile-color);
  border: 1px solid color-mix(in srgb, var(--tile-color) 35%, transparent); font-size: 26px; line-height: 1;
}
.ioes-icon-tile > svg, .ioes-icon-tile > img { width: 56%; height: 56%; }
.ioes-icon-tile > svg:not([fill="none"]) { fill: currentColor; }
.ioes-icon-tile > svg[fill="none"], .ioes-icon-tile--line > svg { fill: none; stroke: currentColor; }
.ioes-icon-tile--sm { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 18px; }
.ioes-icon-tile--lg { width: 72px; height: 72px; border-radius: var(--radius-lg); font-size: 34px; }

/* ---------- tool twins (web = native): hero map, stats, icon buttons ---------- */
.ioes-hero-map { position: relative; box-sizing: border-box; width: 100%; min-height: 240px; aspect-ratio: 16 / 10; max-height: 52vh; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--map-land); }
.ioes-hero-map > :is(canvas, img, iframe, .map) { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.ioes-hero-map__overlay { position: absolute; inset: var(--space-sm) var(--space-sm) auto auto; display: flex; gap: var(--space-xs); }
.ioes-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md) var(--space-lg); margin: 0; }
.ioes-stat { margin: 0; min-width: 0; }
.ioes-stat dt, .ioes-stat__label { color: var(--text-muted); font: 500 13px/18px var(--font-sans); }
.ioes-stat dd, .ioes-stat__value { margin: 2px 0 0; color: var(--text); font: 700 22px/26px var(--font-rounded); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .ioes-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ioes-btn > svg { width: 18px; height: 18px; flex: none; }
.ioes-btn { text-transform: none; letter-spacing: normal; }   /* sentence case everywhere: never uppercase buttons */
.ioes-icon-btn { display: inline-grid; place-items: center; flex: none; box-sizing: border-box; width: 44px; height: 44px; padding: 0; cursor: pointer;
  border-radius: var(--radius-pill); border: 1px solid var(--glass-edge); background: var(--glass-fill); color: var(--accent-text);
  box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.ioes-icon-btn > svg { width: 20px; height: 20px; }
.ioes-icon-btn:hover { border-color: var(--accent); }
.ioes-status-line { margin: 0; color: var(--text-muted); font: 400 13px/18px var(--font-sans); }

/* ---------- game catalog (arcade family): grid of game cards ---------- */
.ioes-game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: var(--space-md); }
.ioes-game-card {
  display: flex; flex-direction: column; gap: var(--space-sm); box-sizing: border-box; min-height: 44px;
  padding: var(--space-lg); border-radius: var(--radius-xl); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
a.ioes-game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-panel-hover); }
.ioes-game-card[aria-disabled="true"] { cursor: default; }
.ioes-game-card__art { width: 72px; height: 72px; flex: none; border-radius: 22%; object-fit: cover; box-shadow: var(--shadow-sm); background: var(--surface-alt); }
.ioes-game-card__name { margin: var(--space-xs) 0 0; font: 600 17px/22px var(--font-sans); color: var(--text); }
.ioes-game-card__pitch { margin: 0; font: 400 13px/18px var(--font-sans); color: var(--text-muted); }
.ioes-game-card__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: auto; padding-top: var(--space-xs); }
.ioes-chip--ios { background: var(--surface-alt); color: var(--text); border-color: var(--border); }
.ioes-game-card__body { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; flex: 1; }   /* optional wrapper for name, pitch, chips */
@media (max-width: 520px) {
  .ioes-game-grid { grid-template-columns: minmax(0, 1fr); }
  /* art on the left, everything else stacked on the right — works with flat markup or with __body */
  .ioes-game-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--space-md); row-gap: var(--space-xs); align-items: start; }
  .ioes-game-card > :is(.ioes-game-card__art, .ioes-icon-tile) { grid-column: 1; grid-row: 1 / span 3; width: 56px; height: 56px; font-size: 26px; }   /* image or icon-tile avatar */
  .ioes-game-card > :not(.ioes-game-card__art):not(.ioes-icon-tile) { grid-column: 2; min-width: 0; }
  .ioes-game-card__chips { margin-top: 0; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .ioes-game-card { transition: none; } a.ioes-game-card:hover { transform: none; } }

/* back link in game pages and sub-pages: <a class="ioes-back" href="/arcade/">Arcade</a> */
.ioes-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 var(--space-md) 0 var(--space-sm); box-sizing: border-box;
  border-radius: var(--radius-pill); background: var(--hud-scrim); border: 1px solid var(--border); color: var(--accent-text);
  font: 600 15px/1 var(--font-sans); text-decoration: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ioes-back::before { content: "‹"; font-size: 22px; line-height: 1; margin-top: -2px; }

.ioes-section-header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); margin: var(--space-xl) 0 var(--space-md); }
.ioes-section-header h2, .ioes-section-header h3 { margin: 0; font: var(--type-title-2-weight) var(--type-title-2-size)/var(--type-title-2-line) var(--font-sans); color: var(--text); }
.ioes-section-header p { margin: 2px 0 0; font: 400 var(--type-footnote-size)/var(--type-footnote-line) var(--font-sans); color: var(--text-muted); }
.ioes-section-header a, .ioes-section-header button { font: 600 var(--type-subhead-size)/1 var(--font-sans); color: var(--accent-text); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }

.ioes-tile {
  --tile: var(--accent);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0;
}
.ioes-tile__label { display: flex; align-items: center; gap: var(--space-xs); color: var(--text-muted); font: 600 var(--type-caption-size)/var(--type-caption-line) var(--font-sans); text-transform: uppercase; letter-spacing: 0.04em; }
.ioes-tile__label i { width: 8px; height: 8px; border-radius: 50%; background: var(--tile); flex: none; }
.ioes-tile__value { color: var(--text); font: var(--type-kpi-weight) var(--type-kpi-size)/var(--type-kpi-line) var(--font-rounded); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ioes-tile__value small { font: 500 var(--type-subhead-size)/1 var(--font-sans); color: var(--text-muted); margin-left: 4px; }
.ioes-tile__delta { font: 600 var(--type-footnote-size)/var(--type-footnote-line) var(--font-sans); color: var(--text-muted); }
.ioes-tile__delta--up { color: var(--success-text); }
.ioes-tile__delta--down { color: var(--danger-text); }

/* ---------- game board (grid puzzles: Sudoku …). Every state has a non-color cue too. ---------- */
.ioes-board {
  --board-size: 9;
  display: grid; grid-template-columns: repeat(var(--board-size), 1fr); aspect-ratio: 1;
  background: var(--surface); border: 3px solid var(--grid-line-strong); border-radius: var(--radius-sm); overflow: hidden;
  font-family: var(--font-rounded); font-variant-numeric: tabular-nums; container-type: inline-size;
}
.ioes-cell {
  position: relative; display: grid; place-items: center; min-width: 0; aspect-ratio: 1;
  border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line);
  color: var(--text); font-weight: 600; font-size: calc(100cqi / var(--board-size) * 0.55);
}
.ioes-cell--box-r { border-right: 3px solid var(--grid-line-strong); }
.ioes-cell--box-b { border-bottom: 3px solid var(--grid-line-strong); }
.ioes-cell--edge-r { border-right: 0; }
.ioes-cell--edge-b { border-bottom: 0; }
.ioes-cell--related { background: var(--cell-related); }
.ioes-cell--same { background: var(--cell-same-number); font-weight: 800; }
.ioes-cell--selected { background: var(--cell-selected); box-shadow: inset 0 0 0 2px var(--accent-text); }
.ioes-cell--player { color: var(--digit-player); font-weight: 500; }
.ioes-cell--error { background: var(--cell-error); color: var(--digit-error); text-decoration: underline wavy var(--digit-error) 2px; text-underline-offset: 3px; }
.ioes-cell__notes { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; padding: 6%; box-sizing: border-box; color: var(--digit-note); font-weight: 500; font-size: calc(100cqi / var(--board-size) * 0.22); text-align: center; align-items: center; }
/* obstacles: fill + ink, each with its own pattern so they differ without color */
.ioes-cell--fog { color: transparent; background: repeating-linear-gradient(135deg, var(--obstacle-fog-fill) 0 6px, color-mix(in srgb, var(--obstacle-fog) 35%, var(--obstacle-fog-fill)) 6px 8px); }
.ioes-cell--crystal { background: var(--obstacle-crystal-fill); box-shadow: inset 0 0 0 2px var(--obstacle-crystal); }
.ioes-cell--crystal::after { content: ""; position: absolute; inset: 18%; background: linear-gradient(135deg, transparent calc(50% - 1px), var(--obstacle-crystal) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); pointer-events: none; }
.ioes-cell--mirror { background: var(--obstacle-mirror-fill); box-shadow: inset 0 0 0 2px var(--obstacle-mirror); }
.ioes-cell--mirror::before { content: ""; position: absolute; top: 0; left: 0; width: 0; height: 0; border-top: 12px solid var(--obstacle-mirror); border-right: 12px solid transparent; pointer-events: none; }   /* corner tag on each linked cell */
.ioes-cell--rotate { background: var(--obstacle-rotate-fill); }
.ioes-box--rotate { outline: 2px dashed var(--obstacle-rotate); outline-offset: -3px; }
.ioes-obstacle-icon { color: var(--ink, currentColor); width: 1em; height: 1em; }

/* ---------- switch (toggle): <input type="checkbox" role="switch" class="ioes-switch"> ---------- */
.ioes-switch {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; box-sizing: border-box; margin: 0; cursor: pointer;
  width: 51px; height: 31px; border-radius: var(--radius-pill); vertical-align: middle;
  background: color-mix(in srgb, var(--text-subtle) 45%, var(--surface-alt)); border: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.ioes-switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform var(--dur-fast) var(--ease);
}
.ioes-switch:checked { background: var(--accent); border-color: var(--accent); }
.ioes-switch:checked::before { transform: translateX(20px); }
.ioes-switch:disabled { opacity: 0.45; cursor: not-allowed; }
.ioes-switch:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[data-host="mac"] .ioes-switch { width: 38px; height: 22px; }
[data-host="mac"] .ioes-switch::before { width: 18px; height: 18px; top: 1px; left: 1px; }
[data-host="mac"] .ioes-switch:checked::before { transform: translateX(16px); }
.ioes-setting { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .ioes-switch, .ioes-switch::before { transition: none; } }

/* ---------- segmented control: <div class="ioes-segmented" role="group"><button aria-pressed="true">…</button>… ---------- */
.ioes-segmented { display: inline-flex; gap: 2px; padding: 2px; box-sizing: border-box; border-radius: var(--radius-md); background: var(--surface-alt); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; }
.ioes-segmented > button { flex: 1 0 auto; min-height: 32px; padding: 0 var(--space-md); border: 0; border-radius: calc(var(--radius-md) - 3px); background: none; color: var(--text-muted); font: 600 14px/1 var(--font-sans); cursor: pointer; white-space: nowrap; transition: background var(--dur-fast) var(--ease); }
.ioes-segmented > button[aria-pressed="true"], .ioes-segmented > button[aria-selected="true"] { background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-sm); }
.ioes-segmented--block { display: flex; width: 100%; }
[data-host="mac"] .ioes-segmented > button { min-height: 24px; font-size: 12px; }

/* ---------- phone tab bar: <nav class="ioes-tabbar"><a class="ioes-tabbar__item" aria-current="page"><svg/>Today</a>… ---------- */
.ioes-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px var(--space-xs); box-sizing: border-box;
  /* floating glass capsule, like the iOS 26/27 tab bar */
  left: var(--space-md); right: var(--space-md); bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius-pill); background: var(--glass-fill); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-highlight), var(--shadow-md); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.ioes-tabbar__item[aria-current="page"], .ioes-tabbar__item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: var(--radius-pill); }
.ioes-tabbar__item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; justify-content: center; border: 0; background: none; color: var(--text-muted); font: 500 10px/1.2 var(--font-sans); text-decoration: none; cursor: pointer; }
.ioes-tabbar__item > svg { width: 24px; height: 24px; }
.ioes-tabbar__item[aria-current="page"], .ioes-tabbar__item[aria-selected="true"] { color: var(--accent-text); }
@media (min-width: 768px) { .ioes-tabbar--phone-only { display: none; } }   /* iPad / Mac / desktop use the sidebar */
[data-host="mac"] .ioes-tabbar { display: none; }
/* OS27: the bar minimizes while scrolling down (ioes-themes.js sets .is-minimized): labels hide, the bar shrinks to its icons */
.ioes-tabbar { transition: left var(--dur-base) var(--ease), right var(--dur-base) var(--ease), padding var(--dur-base) var(--ease); }
.ioes-tabbar.is-minimized { left: 25%; right: 25%; padding-top: 2px; padding-bottom: 2px; }
.ioes-tabbar.is-minimized .ioes-tabbar__item { font-size: 0; gap: 0; min-height: 40px; }
/* Search in its own glass capsule at the end of the bar: <a class="ioes-tabbar__item ioes-tabbar__search"><svg/>Search</a> */
.ioes-tabbar__search { position: absolute; right: calc(-1 * (44px + var(--space-sm))); top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  font-size: 0; gap: 0; background: var(--glass-fill); border: 1px solid var(--glass-edge); box-shadow: var(--glass-highlight), var(--shadow-md);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.ioes-tabbar:has(.ioes-tabbar__search) { right: calc(var(--space-md) + 44px + var(--space-sm)); }
.ioes-tabbar.is-minimized:has(.ioes-tabbar__search) { right: calc(25% + 44px + var(--space-sm)); }

/* ---------- HUD pips (first to 3 …): <span class="ioes-pips" aria-label="2 of 3"><i class="is-on"></i><i class="is-on"></i><i></i></span> ---------- */
.ioes-pips { display: inline-flex; gap: 3px; align-items: center; }
.ioes-pips > i { width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid currentColor; opacity: 0.7; }
.ioes-pips > i.is-on { background: currentColor; opacity: 1; }

/* ---------- banner (toast): <div class="ioes-banner ioes-banner--top" role="status"><svg/>Floor done</div> ---------- */
.ioes-banner {
  --banner: var(--accent);
  display: inline-flex; align-items: center; gap: var(--space-sm); box-sizing: border-box; max-width: min(92vw, 520px);
  padding: 10px var(--space-lg); border-radius: var(--radius-pill); background: var(--glass-fill); color: var(--text);
  border: 1.5px solid var(--banner); box-shadow: var(--glass-highlight), var(--shadow-md); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); font: 600 15px/1.3 var(--font-sans);
}
.ioes-banner > svg { width: 18px; height: 18px; flex: none; color: var(--banner); }
.ioes-banner--success { --banner: var(--success); }
.ioes-banner--warning { --banner: var(--warning); }
.ioes-banner--danger { --banner: var(--danger); }
.ioes-banner--top { position: fixed; z-index: 30; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); animation: ioes-banner-in var(--dur-base) var(--ease); }
@keyframes ioes-banner-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .ioes-banner--top { animation: none; } .ioes-segmented > button, .ioes-tabbar, .ioes-toolbar { transition: none; } }

/* ---------- HUD over a moving 3D scene ---------- */
.ioes-hud { background: var(--hud-scrim); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: var(--radius-md); padding: var(--space-xs) var(--space-md); text-shadow: 0 1px 2px color-mix(in srgb, var(--background) 80%, transparent); }

/* glass utility for floating controls (never for content cards) */
.ioes-glass { background: var(--glass-fill); border: 1px solid var(--glass-edge); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
@media (prefers-reduced-transparency: reduce) {
  :root, [data-theme] { --glass-fill: var(--surface-raised); --glass-blur: none; --glass-edge: var(--border); }
  .ioes-toolbar, .ioes-tabbar, .ioes-hud, .ioes-menu, .ioes-sidebar { background: var(--surface-raised); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ioes-js .ioes-toolbar:not(.is-scrolled) { background: var(--background); }
}

/* ---------- OS27 menu / popover: <div class="ioes-menu" role="menu"><button role="menuitem">Rename</button><hr>…</div> ---------- */
.ioes-menu { box-sizing: border-box; min-width: 200px; max-width: min(92vw, 320px); padding: 6px; display: flex; flex-direction: column; gap: 1px;
  border-radius: var(--radius-menu); background: var(--glass-fill); border: 1px solid var(--glass-edge); color: var(--text);
  box-shadow: var(--glass-highlight), var(--shadow-lg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); font: 400 15px/1.3 var(--font-sans); }
.ioes-menu > [role="menuitem"], .ioes-menu > button, .ioes-menu > a { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; padding: 0 10px;
  border: 0; border-radius: calc(var(--radius-menu) - 6px); background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }   /* concentric: outer radius − padding */
.ioes-menu > [role="menuitem"]:hover, .ioes-menu > button:hover, .ioes-menu > a:hover, .ioes-menu > :focus-visible { background: var(--nav-selected); }
.ioes-menu > hr { border: 0; border-top: 1px solid var(--border); margin: 4px 10px; }
.ioes-menu .is-destructive { color: var(--danger-text); }
[data-host="mac"] .ioes-menu { font-size: 13px; } [data-host="mac"] .ioes-menu > [role="menuitem"], [data-host="mac"] .ioes-menu > button { min-height: 28px; }

/* ---------- OS27 sheet: <dialog class="ioes-sheet"><div class="ioes-sheet__grabber"></div>…</dialog> (bottom sheet on phones, centered on wide) ---------- */
.ioes-sheet { box-sizing: border-box; width: min(560px, calc(100vw - 2 * var(--space-md))); max-height: calc(100dvh - 2 * var(--space-xl)); overflow: auto;
  padding: var(--space-xl); border: 1px solid var(--border); border-radius: var(--radius-sheet); background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-lg); }
.ioes-sheet::backdrop { background: var(--scrim); }
.ioes-sheet__grabber { display: none; width: 36px; height: 5px; margin: calc(-1 * var(--space-md)) auto var(--space-md); border-radius: 3px; background: color-mix(in srgb, var(--text) 30%, transparent); }
@media (max-width: 720px) {
  .ioes-sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; border-bottom: 0; padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom, 0px)); }
  .ioes-sheet__grabber { display: block; }
}
/* Reduce Transparency: the OS27 floating pieces turn solid (after their own rules so this wins) */
@media (prefers-reduced-transparency: reduce) {
  .ioes-menu, .ioes-sidebar, .ioes-sidebar__pinned, .ioes-tabbar__search { background: var(--surface-raised); border-color: var(--border); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- paper: ink on white in every mode (PDF/print previews, field sheets, reports) ---------- */
.ioes-paper {
  color-scheme: light; background: var(--paper); color: var(--paper-ink);
  --text: var(--paper-ink); --text-muted: var(--paper-ink-muted); --text-subtle: var(--paper-ink-muted);
  --background: var(--paper); --surface: var(--paper); --surface-raised: var(--paper); --surface-alt: var(--paper-grid);
  --border: var(--paper-rule); --accent: var(--paper-accent);
  --category-1: var(--paper-category-1); --category-2: var(--paper-category-2); --category-3: var(--paper-category-3);
  --category-4: var(--paper-category-4); --category-5: var(--paper-category-5); --category-6: var(--paper-category-6);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ioes-paper--sheet { box-sizing: border-box; padding: 48px; box-shadow: var(--shadow-lg); border-radius: 2px; }
@media print { .ioes-paper--sheet { box-shadow: none; padding: 0; } }

/* ---------- map overlay on imagery (same in every mode) ---------- */
:root { --overlay-fill-opacity: 0.35; --overlay-halo-opacity: 0.6; --overlay-halo-width: 3px; --overlay-line-width: 3px; --overlay-dash: 8 6; }

/* ---------- app chrome: toolbar + sidebar (web and Mac host) ---------- */
.ioes-app { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--background); color: var(--text); }
.ioes-app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ioes-toolbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--space-sm);
  min-height: 52px; padding: 0 var(--space-md); padding-left: max(var(--space-md), var(--ioes-titlebar-inset, 0px));
  background: var(--toolbar-solid); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);   /* OS27: uniform, near-solid toolbar */
  border-bottom: 1px solid var(--toolbar-edge);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
/* with ioes-themes.js: clear while the content is at the top, solid once it scrolls under the bar (no JS: always solid) */
.ioes-js .ioes-toolbar:not(.is-scrolled) { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ioes-toolbar__title { font: 700 15px/1.2 var(--font-sans); margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ioes-toolbar__spacer { flex: 1; }
.ioes-sidebar .ioes-toolbar, .ioes-sidebar:not([hidden]) + .ioes-app__main .ioes-toolbar { --ioes-titlebar-inset: 0px; }   /* only a toolbar at the window's left edge needs the inset */
.ioes-sidebar {
  flex: none; width: 232px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden;
  padding: var(--space-sm); background: color-mix(in srgb, var(--surface) 70%, var(--background)); border-right: 1px solid var(--border);
  font: 400 14px/1.3 var(--font-sans);
}
.ioes-sidebar__section { margin: var(--space-md) var(--space-sm) var(--space-xs); color: var(--text-muted); font: 600 11px/1.2 var(--font-sans); letter-spacing: 0.02em; }
.ioes-sidebar__item {
  box-sizing: border-box; display: flex; align-items: center; gap: var(--space-sm); min-height: 32px; padding: 0 var(--space-sm);
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: default; width: 100%;
}
.ioes-sidebar__item > svg, .ioes-sidebar__item > .ioes-sidebar__icon { width: 18px; height: 18px; flex: none; color: var(--accent); }
.ioes-sidebar__item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.ioes-sidebar__item[aria-current="page"], .ioes-sidebar__item.is-selected { background: var(--nav-selected); color: var(--text); font-weight: 600; }
.ioes-sidebar__item[aria-current="page"] .ioes-sidebar__badge, .ioes-sidebar__item.is-selected .ioes-sidebar__badge { color: var(--text); }   /* muted text is not ≥4.5:1 on the selection */
.ioes-sidebar__badge { margin-left: auto; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
/* OS27 (macOS 27 / iPadOS 27): on wide windows the sidebar floats inset as a rounded glass panel; the content runs under its edge */
@media (min-width: 1024px) {
  .ioes-sidebar { margin: var(--space-sm) 0 var(--space-sm) var(--space-sm); height: calc(100vh - 2 * var(--space-sm)); height: calc(100dvh - 2 * var(--space-sm));
    position: sticky; top: var(--space-sm); border: 1px solid var(--glass-edge); border-radius: var(--radius-menu);
    background: var(--glass-fill); box-shadow: var(--glass-highlight), var(--shadow-sm); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
}
/* rows pinned at the top or bottom of the sidebar (account picker, sync status): a floating glass piece, never an opaque band */
.ioes-sidebar__pinned { margin-top: auto; padding: var(--space-sm); border-radius: var(--radius-menu); background: var(--glass-fill); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); color: var(--text-muted); font-size: 12px; }
@media (max-width: 720px) { .ioes-app { flex-direction: column; } .ioes-sidebar { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); } .ioes-sidebar__section { display: none; } .ioes-sidebar__item { width: auto; white-space: nowrap; } }

/* ---------- Mac host: page running inside an iOES Mac app (IOESWebHost sets data-host="mac") ---------- */
[data-host="mac"] {
  --ioes-titlebar-inset: 80px;            /* room for the window buttons when a toolbar touches the left edge */
  font: 400 13px/1.38 var(--font-sans);
  -webkit-user-select: none; user-select: none; cursor: default;
}
[data-host="mac"] input, [data-host="mac"] textarea, [data-host="mac"] [contenteditable], [data-host="mac"] .ioes-selectable { -webkit-user-select: text; user-select: text; cursor: auto; }
[data-host="mac"] .ioes-web-menu { display: none !important; }   /* menus the native menu bar already has (Mac only; iOS keeps them) */
[data-host] .ioes-web-only { display: none !important; }          /* browser-only text/controls: hidden in any iOES app */
.ioes-host-only, .ioes-mac-only, .ioes-ios-only { display: none; }
[data-host] .ioes-host-only, [data-host="mac"] .ioes-mac-only, [data-host="ios"] .ioes-ios-only { display: revert; }
[data-host="mac"] .ioes-toolbar { min-height: 52px; padding-top: 0; }
[data-host="mac"] .ioes-sidebar { padding-top: 44px; font-size: 13px; }   /* window buttons sit over the sidebar (macOS 27: inside the floating sidebar) */
[data-host="mac"] .ioes-sidebar__item { min-height: 28px; }
[data-host="mac"] .ioes-btn { min-height: 28px; padding: 0 var(--space-md); border-radius: 7px; font-size: 13px; font-weight: 500; }
[data-host="mac"] .ioes-chip { font-size: 11px; line-height: 16px; }
[data-host="mac"] .ioes-card, [data-host="mac"] .ioes-tile { padding: var(--space-md); }
[data-host="mac"] .ioes-section-header h2, [data-host="mac"] .ioes-section-header h3 { font-size: 17px; line-height: 22px; }
[data-host="mac"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-host="mac"] ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 25%, transparent); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }

.ioes-panel {
  position: relative; overflow: hidden; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-xl);
  box-shadow: var(--shadow-panel);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.ioes-panel::before { content: ""; position: absolute; inset: 0; background: var(--sheen); pointer-events: none; }
.ioes-panel--lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-panel-hover); }
.ioes-glow { background: radial-gradient(60% 50% at 50% 0%, var(--glow), transparent 70%), var(--background); }
.ioes-gradient-text { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ioes-progress { height: 3px; background: var(--gradient-brand); transform-origin: 0 50%; }
.ioes-reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.ioes-reveal.is-in { opacity: 1; transform: none; }

/* device frames for demo videos/images: put the <video>/<img> inside .ioes-device__screen */
.ioes-device { --bezel: color-mix(in srgb, var(--surface-raised) 86%, var(--text)); display: inline-block; max-width: 100%; }
.ioes-device__screen { position: relative; overflow: hidden; background: #000; border: 1px solid var(--border); }
.ioes-device__screen > img, .ioes-device__screen > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ioes-device--phone { width: 280px; padding: 10px; border-radius: 44px; background: var(--bezel); border: 1px solid var(--border); box-shadow: var(--shadow-panel); }
.ioes-device--phone .ioes-device__screen { aspect-ratio: 9 / 19.5; border-radius: 34px; }
.ioes-device--tablet { width: 520px; padding: 14px; border-radius: 30px; background: var(--bezel); border: 1px solid var(--border); box-shadow: var(--shadow-panel); }
.ioes-device--tablet .ioes-device__screen { aspect-ratio: 4 / 3; border-radius: 16px; }
.ioes-device--tablet.ioes-device--portrait { width: 400px; }
.ioes-device--tablet.ioes-device--portrait .ioes-device__screen { aspect-ratio: 3 / 4; }
.ioes-device--watch {
  --band: color-mix(in srgb, var(--surface-raised) 70%, var(--text-subtle));
  position: relative; width: 200px; padding: 12px; margin: 40px 10px 40px 0;
  border-radius: 56px; background: var(--bezel); border: 1px solid var(--border); box-shadow: var(--shadow-panel);
}
.ioes-device--watch .ioes-device__screen { aspect-ratio: 396 / 484; border-radius: 44px; }
.ioes-device--watch::before {
  content: ""; position: absolute; left: 20%; right: 20%; top: -40px; bottom: -40px; pointer-events: none;
  background: linear-gradient(to bottom, var(--band) 0 40px, transparent 40px calc(100% - 40px), var(--band) calc(100% - 40px));
  border-radius: 14px 14px 14px 14px / 10px 10px 10px 10px;
}
.ioes-device--watch::after {
  content: ""; position: absolute; right: -9px; top: 24%; width: 9px; height: 40px; border-radius: 0 5px 5px 0;
  background: var(--bezel); border: 1px solid var(--border); border-left: 0;
  box-shadow: 0 64px 0 -6px var(--bezel);
}
.ioes-device--laptop { width: 760px; }
.ioes-device--laptop .ioes-device__screen { aspect-ratio: 16 / 10; border: 12px solid var(--bezel); border-bottom-width: 18px; border-radius: 18px 18px 4px 4px; box-shadow: 0 0 0 1px var(--border); }
.ioes-device--laptop::after { content: ""; display: block; height: 14px; margin: 0 -7%; background: linear-gradient(var(--bezel), color-mix(in srgb, var(--bezel) 80%, var(--background))); border-radius: 0 0 14px 14px; box-shadow: var(--shadow-panel); }

@media (prefers-reduced-motion: reduce) {
  .ioes-btn, .ioes-panel, .ioes-reveal { transition: none; }
  .ioes-btn:active, .ioes-panel--lift:hover { transform: none; }
  .ioes-reveal { opacity: 1; transform: none; }
}
