/* Fireplace (D11). James, 2026-09-30: "for the red and green one put a fireplace with stockings in the background and maybe some presents in the lower portion."
   Look references: inbox/gemini-themes-2026-09-30/GEMINI-3.8-Flash__theme-christmas-C1.png
   (pine green, cranberry and gold keys, gold 3x3 lines, warm gold lightning) and
   the genuine backdrop inbox/gemini-themes-2026-09-30-r2/GEMINI-3.8-Flash__theme2-C1b-BG.png,
   shipped as fireplace/hearth.webp (its stretched-pixel top and bottom bands
   cropped off: 1170 x 2065, WebP q84, 100 KB).
   DESIGNER-OWNED FILE (themes/CONTRACT.md). Every rule is zero-weight
   :where(body[data-theme="fireplace"]); keys, panels, inks and lines are set
   through variables only, so a selected, matched, row/column or mistake key
   always keeps the game's look.

   Readability (D3/D9, measured in test/theme-fireplace.test.mjs and on pixels):
   - Pine and cranberry keys: cream givens, warm gold entries, pale cream notes,
     earned clues in the entries' gold (as Supercharged's are its entries' lime;
     a pale gold read as a given); gold 3x3 lines.
   - Gold keys (top+bottom): a light champagne gold, so their digits are dark:
     near-black pine givens, deep cranberry entries, near-black espresso notes (no
     glow, and in 3D a 0.35 px stroke of their own colour, --ink-note-stroke:
     the steep 3D Top's tiny notes measured 3.1:1 without it), earned clues in
     the entries' cranberry;
     their 3x3 lines are a deep cranberry ribbon (no gold line can reach 3:1
     on a gold key), with a gold sheen. */

/* The cabin: the fireplace, stockings and presents behind the whole page; the
   card lets it through, darkened only behind its header and its foot (on a
   phone the card carries its own copy, below). */
:where(body[data-theme="fireplace"]) .ambient{background:linear-gradient(180deg,#0f0604 0,#0f060400 10%,#0f060400 84%,#0f0604 100%),url(fireplace/hearth.webp) 28% 0/cover no-repeat,#160a06}
:where(body[data-theme="fireplace"]) .ambient:after{opacity:1;background-image:radial-gradient(ellipse 95% 70% at 50% 42%,#0a040300 52%,#0a0403a6 100%);background-size:auto;mask-image:none}
:where(body[data-theme="fireplace"]) .topbar{background:#120604c7;border-bottom-color:#ffcf7a24}
:where(body[data-theme="fireplace"]) .stage-shell{border-color:#ffcf7a47;box-shadow:0 26px 90px #0009,inset 0 1px #ffe2a02e;background:linear-gradient(180deg,#140805e6 0%,#140805b3 12%,#1408054d 24%,#14080500 38%,#14080500 72%,#0f0604a6 100%)}
/* Phones: the cube (or a flat board) fills the stage, so the page's plate
   would sit behind it. The card carries the same plate, laid out for the
   room a phone leaves (sizes in vw: the card is the screen's width less 8 px,
   so the plate is 1.765 x that tall and the fire's top is 45.36 vw down it):
   - 3D: the fire burns in the corner above the cube's top-left edge, its
     top at the stage's top (85.6 px down the card); the stockings hang
     behind the title, the snowy window is top right, and the presents peek
     out at the foot, either side of the orbit buttons;
   - a flat board (Quick Play, the Face view) covers the whole stage, so the
     fire moves into the header, between the title and the mode label (the
     gap's middle is 26.5 vw + 12 px across), its top 20 px down; the sides of
     the header stay dark behind the text. Under 360 px the gap is too
     narrow for it: the 3D layout stays. */
@media(max-width:720px){:where(body[data-theme="fireplace"]) .stage-shell{background:linear-gradient(180deg,#14080580 0,#14080540 70px,#14080526 110px,#14080500 150px,#14080500 72%,#0f0604a6 100%),url(fireplace/hearth.webp) 0 calc(85.6px - 45.36vw)/100% auto no-repeat,#1a0d07}}
@media(min-width:360px) and (max-width:720px){:where(body[data-theme="fireplace"]):where(.flat-view) .stage-shell{background:linear-gradient(90deg,#140805b3 0,#14080540 35%,#14080500 44% 58%,#14080580 66%,#140805c7 100%),url(fireplace/hearth.webp) calc(26.5vw + 12px) calc(23.6px - 45.36vw)/100% auto no-repeat,#1a0d07}}
/* A flat board's header has the fire right beside its 9 px mode label: warm
   dark behind the label (inside the header, clear of its foot: no seam). */
:where(body[data-theme="fireplace"]):where(.flat-view) .stage-top{background:radial-gradient(ellipse 92px 30px at calc(100% - 78px) 41px,#140805d9 0,#140805a6 55%,#14080500 100%)}
:where(body[data-theme="fireplace"]) .stage:before{background:radial-gradient(ellipse 58% 55% at 50% 55%,#ff9a3d2e,#ff9a3d00 71%),radial-gradient(ellipse 70% 22% at 50% 98%,#ff8a2a33,#ff8a2a00 82%)}
:where(body[data-theme="fireplace"]) .stage:after{background:linear-gradient(90deg,#140805 1%,#14080500 19% 81%,#140805 99%)}
@media(max-width:720px){:where(body[data-theme="fireplace"]) .stage:after{background:none}}
:where(body[data-theme="fireplace"]) .stage-halo{border-color:#ffcf7a26;box-shadow:0 0 60px #ffb34721,inset 0 0 60px #ff9a3d1c}
:where(body[data-theme="fireplace"]) .floor{background:radial-gradient(ellipse,#ffb3471a,#ffb34700 70%)}
/* The foot: a pine-green velvet panel (fireplace/velvet-tile.webp, ChatGPT/Codex
   GPT-6.1 Sol, stretched to the panel so its soft rim frames it), as the C1
   reference's dark green controls panel. */
:where(body[data-theme="fireplace"]) .stage-bottom{background:linear-gradient(180deg,#0a1a1033,#0a1a1000 40%),url(fireplace/velvet-tile.webp) 0 0/100% 100% no-repeat,#07140c;border-top-color:#ffcf7a2e}
/* Phones, a flat board: the board fills the stage, so the presents come down
   into the foot: the plate's gift piles (its rows 1500-1800 across the foot),
   the red gift with its gold bow in the foot's free top-right corner (right
   of the cell readout), the rest under warm dark behind the text. */
@media(max-width:720px){:where(body[data-theme="fireplace"]):where(.flat-view) .stage-bottom{background:radial-gradient(ellipse 150px 62px at 100% 0,#1508062e 0,#15090699 55%,#150906d6 100%),url(fireplace/hearth.webp) 0 calc(10.3px - 128.2vw)/100% auto no-repeat,#1a0d07}}
:where(body[data-theme="fireplace"]) .reward-overlay{background:#0e0503db}

/* Every face: a burnished gold trim and a warm glow. */
:where(body[data-theme="fireplace"]) .face{--face-rim:#a87a26;--face-glow:#ffb3475c}
/* Pine and cranberry keys: cream, gold and pale gold digits, gold 3x3 lines. */
:where(body[data-theme="fireplace"]) .face-front,:where(body[data-theme="fireplace"]) .face-back,:where(body[data-theme="fireplace"]) .face-right,:where(body[data-theme="fireplace"]) .face-left{--ink-given:#fff3d6;--ink-given-glow:#ffcf8a5c;--ink-entry:#ffdb70;--ink-entry-glow:#ff9a3d80;--ink-note:#f6e7c6;--ink-note-glow:#ffcf8a59;--ink-earned:#ffdb70;--ink-earned-glow:#ffd24a;--guide:#ffd36a;--guide-glow:#ffb3479c}
/* Front+back: pine green. */
:where(body[data-theme="fireplace"]) .face-front,:where(body[data-theme="fireplace"]) .face-back{--face-panel:#0a2416;--gap:#06180d}
:where(body[data-theme="fireplace"]) .face-front .voxel,:where(body[data-theme="fireplace"]) .face-back .voxel{--key:linear-gradient(145deg,#1f5a3a,#0d3120);--band-hi:#e8f7d85c;--band-lo:#03120aa1;--lit-side:#f3e2b4bf;--lit-top:#fbefcccc}
/* Right+left: cranberry red. */
:where(body[data-theme="fireplace"]) .face-right,:where(body[data-theme="fireplace"]) .face-left{--face-panel:#2e0a11;--gap:#1e0509}
:where(body[data-theme="fireplace"]) .face-right .voxel,:where(body[data-theme="fireplace"]) .face-left .voxel{--key:linear-gradient(145deg,#8a1f30,#4f0f1b);--band-hi:#ffd9cf5c;--band-lo:#1a0509a1;--lit-side:#ffdccbbf;--lit-top:#ffe9dccc}
/* Top+bottom: champagne gold, dark digits, a cranberry ribbon for the 3x3 lines.
   (A deeper gold measured 3.65-4.4:1 for the far-row digits of the steep 3D
   Top in Chromium: anti-aliasing thins small dark glyphs, so the keys are this
   light and the inks this dark; flat they measure 9.5-13:1.) */
:where(body[data-theme="fireplace"]) .face-top,:where(body[data-theme="fireplace"]) .face-bottom{--face-panel:#c39550;--gap:#c49a52;--ink-given:#08200f;--ink-given-glow:#fff6dc80;--ink-entry:#5e081d;--ink-entry-glow:#fff6dc8c;--ink-note:#140a02;--ink-note-glow:#0000;--ink-note-stroke:.35px;--ink-earned:#5e081d;--ink-earned-glow:#fff6dc80;--guide:#5c0618;--guide-glow:#ffd36a8c}
:where(body[data-theme="fireplace"]) .face-top .voxel,:where(body[data-theme="fireplace"]) .face-bottom .voxel{--key:linear-gradient(145deg,#fbe9b0,#f0d088);--band-hi:#fff8e0d9;--band-lo:#5a3a0a73;--lit-side:#4a2a06e6;--lit-top:#4a2a06eb}

/* The start menu tile: a gold edge. */
#theme-choices [data-theme-choice="fireplace"] .theme-swatch{box-shadow:inset 0 0 0 1px #ffcf7a66}

/* Real material at each key's corners. One static layer per face, below the
   box lines, with a clear centre. The 5% opacity bounds even a black/white
   material pixel; it preserves the three face-pair colours. The repeat
   pitch follows the shared grid (nine cells and its existing gaps).
   No per-key filter, shadow, animation or extra DOM. */
:where(body[data-theme="fireplace"]){--material-gap:2px}
@media(max-width:500px){:where(body[data-theme="fireplace"]){--material-gap:1px}}
:where(body[data-theme="fireplace"]) .face::after{content:'';position:absolute;inset:var(--rail);z-index:4;pointer-events:none;opacity:.05;background-image:url(fireplace/velvet-tile.webp);background-size:calc((100% + var(--material-gap))/9) calc((100% + var(--material-gap))/9);background-repeat:repeat;-webkit-mask-image:radial-gradient(circle at 2px 2px,#000 0 2px,#0000 4px),radial-gradient(circle at calc(100% - 4px) calc(100% - 4px),#000 0 2px,#0000 4px);mask-image:radial-gradient(circle at 2px 2px,#000 0 2px,#0000 4px),radial-gradient(circle at calc(100% - 4px) calc(100% - 4px),#000 0 2px,#0000 4px);-webkit-mask-size:calc((100% + var(--material-gap))/9) calc((100% + var(--material-gap))/9);mask-size:calc((100% + var(--material-gap))/9) calc((100% + var(--material-gap))/9);-webkit-mask-repeat:repeat;mask-repeat:repeat}
/* Top/Bottom key edges in 3D stay 1 px for this theme (its gaps and box lines measured right at 1 px). */
:where(body[data-theme="fireplace"]) .face{--pair-rim-3d:1px}
