/* Foundry cabinet. Change this file to reskin the interface, not component rules. */
/* Self-hosted pixel fonts, tried in order: Monocraft, then Quaver, then Pixelify Sans. */
@font-face {
    font-family: "Monocraft";
    src: url("../fonts/monocraft.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Monocraft";
    src: url("../fonts/monocraft-bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Quaver";
    src: url("../fonts/quaver.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Pixelify Sans";
    src: url("../fonts/pixelify-sans-bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
:root,
.theme-option[data-theme="steamy"] {
    color-scheme: dark;

    /* Cabinet surfaces and readable text */
    --bg: #181e1b;
    --theme-board: #253159;
    --background-motion: background-drift 96s linear infinite;
    --well: #101612;
    --panel: #252e27;
    --panel-2: #303c31;
    --bar: #394638;
    --edge: #59674f;
    --edge-hi: #9ba988;
    --shadow: #080d09;
    --ink: #f2e8ce;
    --muted: #c5c8b3;
    --dim: #a7b39a;
    --inverse: #1c241b;
    --hover-surface: #40503b;

    /* Actions, status and identity. State is also marked with text or borders. */
    --accent: #f4ae58;
    --accent-hover: #ffc777;
    --accent-hi: #ffe0a5;
    --accent-low: #9e612d;
    --focus: #ffe0a5;
    --success: #b1c986;
    --success-low: #6e894d;
    --danger: #f0987b;
    --danger-low: #a5523c;
    --danger-surface: #402a23;
    --danger-ink: #ffd5bf;
    --info: #93c6c0;
    --info-surface: #21382d;
    --warning-surface: #3c3020;
    --warning-ink: #ffdfa3;
    --special: #cda4dc;

    /* Reward types, overlays and material detail */
    --upgrade-paper: #efdfb3;
    --upgrade-edge: #795525;
    --upgrade-ink: #392b18;
    --power-paper: #c9d5b5;
    --power-edge: #4c643d;
    --power-ink: #253421;
    --shade: #080d09e8;
    --board-shade: #101612ed;
    --bevel-light: #fff3cf18;
    --bevel-dark: #00090066;
    --inset-shadow: #00090088;
    --press-shadow: #00090044;
    --scanline: #00090012;
    --grid-line: #c5c8b30a;
    --decoration: #8d9a70;
    --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M12 18h16v8H12zM100 52h16v16h-16zM36 112h24v8H36zM44 104h8v8h-8zM124 124h16v8h-16zM116 132h16v8h-16zM132 12h16v8h-16zM140 20h8v8h-8z'/%3E%3C/svg%3E");
    --stripe: linear-gradient(90deg, var(--accent) 0 50%, var(--special) 0 75%, var(--success) 0);

    /* Queue funnel glass. The canvas reads these once when board cards are built. */
    --glass-tint: #b8e2d61f;
    --glass-sheen: #fff7df40;
    --glass-edge: #9ba988;

    /* Typography, physical edges and short input feedback */
    --pixel: "Monocraft", "Quaver", "Pixelify Sans", monospace;
    --mono: var(--pixel);
    --display: var(--pixel);
    --sans: var(--pixel);
    --pixel-frame:
        2px 0 0 var(--edge), -2px 0 0 var(--edge), 0 -2px 0 var(--edge), 0 2px 0 var(--edge),
        5px 5px 0 var(--shadow);
    --motion-fast: 80ms;
    --motion-snap: 160ms;
    --motion-deal: 240ms;
    --motion-step: steps(3, end);
    --motion-control: 180ms;
    --motion-toggle: 240ms;
    --ease-control: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-toggle: cubic-bezier(0.22, 1, 0.36, 1);
    --select-arrow:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);

    /* Homepage ambience: a bounded CSS layer, independent of the game renderer. */
    --home-logo-motion: home-logo-idle 8s ease-in-out infinite;
    --home-splash-motion: home-splash-pulse 1800ms ease-in-out infinite;
    --home-splash-hover-motion: home-splash-bounce 500ms var(--ease-control);
    --home-parallax-duration: 280ms;
    --home-podium-motion: home-podium-shimmer 2400ms steps(8) infinite;
    --home-arcade-title-motion: home-arcade-title 3200ms steps(1) infinite;
    /* How much of a theme accent survives as CRT neon on the dark score screen. */
    --crt-neon-mix: 82%;
    --medal-gold: #f2c14e;
    --medal-gold-hi: #fff3b0;
    --medal-silver: #c4ccd6;
    --medal-bronze: #c47a3c;
    --particle-color: var(--accent);
    --particle-highlight: var(--accent-hi);
    --particle-fill: linear-gradient(135deg, var(--particle-highlight), var(--particle-color));
    --particle-border: 0 solid transparent;
    --particle-radius: 1px;
    --particle-mask: none;
    --particle-clip: none;
    --particle-size: 3px;
    --particle-aspect: 1.5;
    --particle-opacity: 0.38;
    --particle-path: home-particle-rise;
    --particle-duration: 26s;
    --particle-turn: 100deg;
}

/* Shared material defaults for alternate palettes; semantic component tokens stay intact. */
:root:not([data-theme="steamy"]),
.theme-option:not([data-theme="steamy"]) {
    --accent-hover: var(--ink);
    --accent-hi: var(--ink);
    --focus: var(--accent);
    --success-low: var(--success);
    --danger-low: var(--danger);
    --danger-surface: var(--panel-2);
    --danger-ink: var(--ink);
    --info-surface: var(--panel-2);
    --warning-surface: var(--panel-2);
    --warning-ink: var(--accent-hi);
    --shade: #080b11e8;
    --board-shade: #080b11ed;
    --bevel-light: #ffffff18;
    --bevel-dark: #00000066;
    --inset-shadow: #00000088;
    --press-shadow: #00000044;
    --scanline: #0000000a;
    --grid-line: #ffffff06;
    --glass-tint: #ffffff1f;
    --glass-sheen: #ffffff40;
    --glass-edge: var(--edge-hi);
}

:root[data-theme="oceanic"],
.theme-option[data-theme="oceanic"] {
    --bg: #101f30;
    --well: #0a1524;
    --panel: #1b3043;
    --panel-2: #273f55;
    --bar: #345168;
    --edge: #587c94;
    --edge-hi: #a0c4da;
    --shadow: #040e1a;
    --ink: #e6f1f7;
    --muted: #bdd6e5;
    --dim: #9bbad0;
    --inverse: #071b2c;
    --hover-surface: #375872;
    --accent: #7dc9ee;
    --accent-low: #376a87;
    --success: #a4d4bd;
    --danger: #f3a58f;
    --info: #8ed9e5;
    --special: #c2b3ed;
    --decoration: #6c9fb8;
    --theme-board: #123653;
    --particle-color: var(--info);
    --particle-fill: transparent;
    --particle-border: 1px solid var(--particle-color);
    --particle-radius: 50%;
    --particle-size: 8px;
    --particle-aspect: 1;
    --particle-opacity: 0.32;
    --particle-duration: 32s;
}

:root[data-theme="darker"],
.theme-option[data-theme="darker"] {
    --bg: #151b24;
    --well: #10151d;
    --panel: #222c39;
    --panel-2: #2b3747;
    --bar: #344355;
    --edge: #53677e;
    --edge-hi: #9fb2c9;
    --shadow: #090d14;
    --ink: #e5ebf3;
    --muted: #b6c3d5;
    --dim: #9cabbf;
    --inverse: #111822;
    --hover-surface: #3b4c62;
    --accent: #b2c5de;
    --accent-low: #5b6d86;
    --success: #add3b1;
    --danger: #f2a6a1;
    --info: #a3cbe1;
    --special: #c3b4e0;
    --decoration: #8c9bb1;
    --theme-board: #202936;
    --particle-color: var(--dim);
    --particle-highlight: var(--muted);
    --particle-size: 2px;
    --particle-aspect: 1;
    --particle-opacity: 0.28;
    --particle-duration: 38s;
    --background-motion: none;
    --scanline: #d8e4f006;
    --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='64'%3E%3Cpath d='M0 0H160M0 32H160M0 64H160M80 0V32M0 32V64M160 32V64' fill='none' stroke='black'/%3E%3Cpath d='M14 9h2v1h-2zM103 21h1v2h-1zM48 48h2v1h-2zM139 43h1v2h-1z'/%3E%3C/svg%3E");
}

:root[data-theme="gruvbox"],
.theme-option[data-theme="gruvbox"] {
    --bg: #282828;
    --well: #1d2021;
    --panel: #32302f;
    --panel-2: #3c3836;
    --bar: #504945;
    --edge: #7c6f64;
    --edge-hi: #bdae93;
    --shadow: #161819;
    --ink: #ebdbb2;
    --muted: #d5c4a1;
    --dim: #bdae93;
    --inverse: #1d2021;
    --hover-surface: #504945;
    --accent: #fabd2f;
    --accent-low: #9d6b1b;
    --success: #b8bb26;
    --danger: #fb4934;
    --info: #83a598;
    --special: #d3869b;
    --decoration: #a89984;
    --theme-board: #282828;
    --particle-color: var(--accent);
    --particle-highlight: var(--success);
    --particle-clip: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    --particle-size: 7px;
    --particle-aspect: 1.4;
    --particle-path: home-particle-fall;
    --particle-duration: 30s;
    --particle-turn: 160deg;
}

:root[data-theme="atom"],
.theme-option[data-theme="atom"] {
    --bg: #282c34;
    --well: #1e222a;
    --panel: #2d333d;
    --panel-2: #353d48;
    --bar: #3d4654;
    --edge: #657082;
    --edge-hi: #a0adbf;
    --shadow: #15191f;
    --ink: #e1e6ee;
    --muted: #b8c1cf;
    --dim: #9ba8bd;
    --inverse: #1e222a;
    --hover-surface: #414d5f;
    --accent: #61afef;
    --accent-low: #32587b;
    --success: #98c379;
    --danger: #e06c75;
    --info: #56b6c2;
    --special: #c678dd;
    --decoration: #7f8ba3;
    --theme-board: #282c34;
    --particle-color: var(--info);
    --particle-highlight: var(--accent);
    --particle-radius: 50%;
    --particle-size: 4px;
    --particle-aspect: 1;
    --particle-opacity: 0.3;
    --particle-duration: 34s;
}

:root[data-theme="synthwave"],
.theme-option[data-theme="synthwave"] {
    --bg: #1b102d;
    --well: #10091d;
    --panel: #2a1940;
    --panel-2: #38244e;
    --bar: #46285d;
    --edge: #75518d;
    --edge-hi: #ba8ed0;
    --shadow: #090516;
    --ink: #fae9ff;
    --muted: #dfc6ed;
    --dim: #c5a3d8;
    --inverse: #210e30;
    --hover-surface: #4b2b61;
    --accent: #fa9bdd;
    --accent-low: #80456e;
    --success: #8de5d4;
    --danger: #ffab9b;
    --info: #82d9f6;
    --special: #d3afff;
    --decoration: #a46dcc;
    --theme-board: #29133d;
    --particle-color: var(--accent);
    --particle-highlight: var(--info);
    --particle-clip: polygon(50% 0, 100% 100%, 0 75%);
    --particle-size: 8px;
    --particle-aspect: 1.2;
    --particle-opacity: 0.4;
    --particle-duration: 28s;
    --particle-turn: 220deg;
}

:root[data-theme="sakura"],
.theme-option[data-theme="sakura"] {
    --bg: #f6e7ee;
    --well: #ecdae4;
    --panel: #fff4f8;
    --panel-2: #eedce6;
    --bar: #e0c5d4;
    --edge: #ab7e94;
    --edge-hi: #80536c;
    --shadow: #c5a0af;
    --ink: #372435;
    --muted: #684558;
    --dim: #79596a;
    --inverse: #fff8fb;
    --hover-surface: #e8ccdc;
    --accent: #a12c5a;
    --accent-low: #6c2545;
    --success: #3d7154;
    --danger: #a12e4b;
    --info: #285f7f;
    --special: #70498b;
    /* Paint the existing drifting layer directly to retain each pastel block color. */
    --decoration: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20shape-rendering='crispEdges'%3E%3Cg%20stroke='%239a728a'%20stroke-opacity='.5'%3E%3Cpath%20fill='%23d77a9f'%20d='M12%2018h16v8H12zM100%2052h16v16h-16z'/%3E%3Cpath%20fill='%23a38ac5'%20d='M36%20112h24v8H36zM44%20104h8v8h-8z'/%3E%3Cpath%20fill='%2377ab95'%20d='M124%20124h16v8h-16zM116%20132h16v8h-16z'/%3E%3Cpath%20fill='%23d4a454'%20d='M132%2012h16v8h-16zM140%2020h8v8h-8z'/%3E%3C/g%3E%3Cpath%20stroke='%23fffafd'%20stroke-opacity='.7'%20fill='none'%20d='M13%2019h14M101%2053h14M45%20105h6M37%20113h6m9%200h7M125%20125h14M117%20133h6M133%2013h14M141%2021h6'/%3E%3C/svg%3E");
    --decoration-opacity: 0.55;
    --tile: none;
    --theme-board: #f2dbe5;
    --particle-color: #cc6b95;
    --particle-highlight: #fff2f8;
    --particle-fill: linear-gradient(125deg, var(--particle-highlight), var(--particle-color) 75%);
    --particle-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 30C4 25 1 17 3 9C4 5 7 2 10 2L12 6L15 2C20 3 23 7 22 13C21 21 17 27 12 30Z'/%3E%3C/svg%3E");
    --particle-size: 13px;
    --particle-aspect: 1.35;
    --particle-opacity: 0.65;
    --particle-path: home-particle-fall;
    --particle-duration: 24s;
    --particle-turn: 230deg;
    /* Sakura's dark accents need more white to glow on the dark score screen. */
    --crt-neon-mix: 50%;
    /* Identity colors remain on borders; light surfaces need dark text/icon ink. */
    --identity-ink: var(--ink);
    --identity-inverse: var(--ink);
    --gift-ink: var(--ink);
    --gift-surface: #fffafd;
    --power-icon-fill: #fffafd;
    color-scheme: light;
    --shade: #25121fe0;
    --board-shade: #fff4f8f0;
    --bevel-light: #ffffff70;
    --bevel-dark: #62284418;
    --inset-shadow: #62284422;
    --press-shadow: #62284415;
    --grid-line: #6f28460c;
    --scanline: #6f284608;
    --glass-tint: #a12c5a1f;
}

:root[data-theme="terminal"],
.theme-option[data-theme="terminal"] {
    --bg: #09120c;
    --well: #050c08;
    --panel: #12251a;
    --panel-2: #1a3022;
    --bar: #243c2a;
    --edge: #42634a;
    --edge-hi: #99ba93;
    --shadow: #020704;
    --ink: #ddf4d9;
    --muted: #b4d3af;
    --dim: #92bc94;
    --inverse: #07140c;
    --hover-surface: #2a4630;
    --accent: #9ce19f;
    --accent-low: #476d49;
    --success: #7fde94;
    --danger: #f4b784;
    --info: #adddb6;
    --special: #c4dba1;
    --decoration: #5d9166;
    --theme-board: #0b1c12;
    --particle-color: var(--accent);
    --particle-highlight: var(--info);
    --particle-radius: 0;
    --particle-size: 2px;
    --particle-aspect: 3;
    --particle-opacity: 0.3;
    --particle-path: home-particle-fall;
    --particle-duration: 28s;
    --particle-turn: 0deg;
    --background-motion: none;
}

:root[data-theme="witch"],
.theme-option[data-theme="witch"] {
    --bg: #1b1425;
    --well: #100c19;
    --panel: #2a2135;
    --panel-2: #362b43;
    --bar: #43354f;
    --edge: #78638b;
    --edge-hi: #baa5ce;
    --shadow: #090611;
    --ink: #f0e7f9;
    --muted: #d1c2df;
    --dim: #b7a6c8;
    --inverse: #192315;
    --hover-surface: #493956;
    --accent: #bfe38c;
    --accent-low: #667f45;
    --success: #b2d9a0;
    --danger: #f3a18e;
    --info: #c3adf4;
    --special: #e2b0df;
    --decoration: #9b81b4;
    --theme-board: #281c38;
    --upgrade-paper: #e3d6f0;
    --upgrade-edge: #78618c;
    --upgrade-ink: #30213c;
    --power-paper: #d5e5bd;
    --power-edge: #667f45;
    --power-ink: #24351e;
    --glass-tint: #d7c5f324;
    --particle-color: var(--accent);
    --particle-highlight: var(--info);
    --particle-clip: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%);
    --particle-size: 9px;
    --particle-aspect: 1;
    --particle-opacity: 0.5;
    --particle-duration: 30s;
    --particle-turn: 180deg;
}

:root[data-theme="vampire"],
.theme-option[data-theme="vampire"] {
    --bg: #200f18;
    --well: #14090f;
    --panel: #321c29;
    --panel-2: #402634;
    --bar: #4d303c;
    --edge: #885e70;
    --edge-hi: #c49da9;
    --shadow: #0d050a;
    --ink: #f8e7e8;
    --muted: #dfc1c8;
    --dim: #c59faa;
    --inverse: #2a0e19;
    --hover-surface: #563440;
    --accent: #e97688;
    --accent-low: #934452;
    --success: #bbd19b;
    --danger: #ffab96;
    --info: #c4b5e5;
    --special: #d9ba7a;
    --decoration: #9e6979;
    --theme-board: #321421;
    --upgrade-paper: #eed9bd;
    --upgrade-edge: #8c6a43;
    --upgrade-ink: #40291e;
    --power-paper: #e9c6d2;
    --power-edge: #925a70;
    --power-ink: #411e2e;
    --glass-tint: #f2c0cb24;
    --particle-color: var(--accent);
    --particle-highlight: var(--special);
    --particle-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cpath d='M1 3Q9 8 15 10L17 5L20 8L23 5L25 10Q31 8 39 3L35 15Q31 11 28 18Q24 14 20 23Q16 14 12 18Q9 11 5 15Z'/%3E%3C/svg%3E");
    --particle-size: 19px;
    --particle-aspect: 0.6;
    --particle-opacity: 0.4;
    --particle-duration: 36s;
    --particle-turn: 18deg;
}
