/* The quieter printed boards are the reference: ivory, charcoal, and clear rules.
   Card headers and the four approved game treatments keep their existing style. */
html[data-theme="newspaper"]{--puzzle-ink:#34332c;--puzzle-paper:#f4f0e3;--puzzle-rule:#77766b;--puzzle-grid:#c8c4b7;--puzzle-clue:#dfdbcf}

/* Apothecary: recognizable bottle shapes, without engraved interior details. */
html[data-theme="newspaper"] #game-dialog .apothecary-grid{
 gap:0;padding:0;background:var(--puzzle-paper);border:2px solid var(--puzzle-rule);overflow:hidden;
}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell{
 background:var(--puzzle-paper);border:0;border-right:1px solid var(--puzzle-grid);border-bottom:1px solid var(--puzzle-grid);color:var(--puzzle-ink);box-shadow:none;
}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell.fixed{background:var(--puzzle-clue);color:var(--puzzle-ink)}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell:nth-child(4n){border-right:0}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell:nth-child(n+13){border-bottom:0}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell:nth-child(4n+2){border-right:2px solid var(--puzzle-rule)}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell:nth-child(n+5):nth-child(-n+8){border-bottom:2px solid var(--puzzle-rule)}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell.selected{outline:2px solid var(--puzzle-ink);outline-offset:-5px;background:#f7f3e8}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .potion-icon{width:29px;height:39px}
html[data-theme="newspaper"] .sudoku-drawing{border-color:var(--puzzle-rule);background:var(--puzzle-paper)}
.sudoku-drawing .potion-icon{width:17px;height:23px}
.potion-palette .potion-icon{width:21px;height:28px}

/* Graveyard: a simple headstone, a single boundary rule, and a quiet path. */
html[data-theme="newspaper"] #game-dialog .path-grid{background:var(--puzzle-paper);border-color:var(--puzzle-rule)}
html[data-theme="newspaper"] #game-dialog .path-cell{border-color:var(--puzzle-grid)}
html[data-theme="newspaper"] #game-dialog .path-cell.path-visited{background:#e9e6dc}
html[data-theme="newspaper"] #game-dialog .path-cell.path-end{background:#e9e6dc;box-shadow:inset 0 0 0 2px var(--puzzle-ink)}
html[data-theme="newspaper"] #game-dialog .path-walls .garden-hedge{stroke:var(--puzzle-ink);stroke-width:7;stroke-linecap:square}
html[data-theme="newspaper"] #game-dialog .path-walls .garden-leaves{display:none}
html[data-theme="newspaper"] #game-dialog .path-trace polyline{stroke:#aaa699;stroke-width:14}
html[data-theme="newspaper"] #game-dialog .path-trace circle{fill:var(--puzzle-ink)}
html[data-theme="newspaper"] .path-number,
html[data-theme="newspaper"] .path-number.first-number{
 background:var(--puzzle-paper);color:var(--puzzle-ink);border:1px solid var(--puzzle-rule);border-bottom:1px solid var(--puzzle-rule);border-radius:13px 13px 0 0;padding:0;box-shadow:none;font-weight:400;
}
html[data-theme="newspaper"] .path-visited .path-number{background:var(--puzzle-ink);color:var(--puzzle-paper);border-color:var(--puzzle-ink)}
html[data-theme="newspaper"] .preview-gravestone{background:var(--puzzle-paper);color:var(--puzzle-ink);border:1px solid var(--puzzle-rule);border-bottom:1px solid var(--puzzle-rule);border-radius:10px 10px 0 0;padding:0;font-weight:400}
html[data-theme="newspaper"] .path-card-grid{border-color:var(--puzzle-rule);background:var(--puzzle-paper)}
html[data-theme="newspaper"] .path-card-grid svg path{stroke:#aaa699;stroke-width:5;opacity:1}
html[data-theme="newspaper"] .path-card-grid svg path.preview-hedge{stroke:var(--puzzle-ink);stroke-width:3;stroke-dasharray:none;stroke-linecap:square}
html[data-theme="newspaper"] .path-card-grid svg circle{fill:var(--puzzle-ink)}

/* Knightle: one ruled letter board, matching the other grid puzzles. */
html[data-theme="newspaper"] #game-dialog .horse-grid{gap:0;border:2px solid var(--puzzle-rule);background:var(--puzzle-paper);max-width:310px}
html[data-theme="newspaper"] #game-dialog .horse-cell.cell{
 background:var(--puzzle-paper);color:var(--puzzle-ink);border:0;border-right:1px solid var(--puzzle-grid);border-bottom:1px solid var(--puzzle-grid);box-shadow:none;font:400 32px/1 Georgia,'Times New Roman',serif;
}
html[data-theme="newspaper"] #game-dialog .horse-cell:nth-child(3n){border-right:0}
html[data-theme="newspaper"] #game-dialog .horse-cell:nth-child(n+7){border-bottom:0}
html[data-theme="newspaper"] #game-dialog .horse-cell.horse-option{background:#e9e6dc;outline:1px dashed var(--puzzle-rule);outline-offset:-5px}
html[data-theme="newspaper"] #game-dialog .horse-cell.horse-used{background:repeating-linear-gradient(135deg,#e9e6dc 0 4px,#d4d0c5 4px 5px);color:var(--puzzle-ink)}
html[data-theme="newspaper"] #game-dialog .horse-cell.horse-current,
html[data-theme="newspaper"] #game-dialog .horse-cell.horse-centre,
html[data-theme="newspaper"] #game-dialog .horse-cell.horse-centre:hover{background:var(--puzzle-ink);color:var(--puzzle-paper);box-shadow:none}
html[data-theme="newspaper"] #game-dialog .horse-word strong{font:400 clamp(20px,4.5vw,27px)/1.4 Georgia,'Times New Roman',serif;color:var(--puzzle-ink);letter-spacing:1px}
html[data-theme="newspaper"] .horse-card-grid{gap:0;border:2px solid var(--puzzle-rule);background:var(--puzzle-paper)}
html[data-theme="newspaper"] .horse-card-grid i{background:var(--puzzle-paper);color:var(--puzzle-ink);border:0;border-right:1px solid var(--puzzle-grid);border-bottom:1px solid var(--puzzle-grid)}
html[data-theme="newspaper"] .horse-card-grid i:nth-child(3n){border-right:0}
html[data-theme="newspaper"] .horse-card-grid i:nth-child(n+7){border-bottom:0}
html[data-theme="newspaper"] .horse-card-grid i:nth-child(5){background:var(--puzzle-ink);color:var(--puzzle-paper)}

/* Scrapple: keep the scraps, lose the tilt and raised tile effect. */
.scrapple-mini-scraps i:nth-child(n),.scrapple-scrap:nth-child(n){rotate:0deg;box-shadow:none}
.scrapple-card-preview i,.scrapple-scrap{border-color:var(--puzzle-rule)}
.scrapple-scrap:disabled{opacity:1;background:transparent;color:#aaa699;border:1px dashed #b8b3a5}
html[data-theme="newspaper"] #game-dialog .scrapple-tile{border:1px solid var(--puzzle-rule);background:var(--puzzle-ink);color:var(--puzzle-paper)}
html[data-theme="newspaper"] #game-dialog .scrapple-tile:disabled{background:transparent;border-color:var(--puzzle-grid)}

@media(max-width:540px){
 html[data-theme="newspaper"] #game-dialog .apothecary-grid .potion-icon{width:25px;height:34px}
 .sudoku-drawing .potion-icon{width:13px;height:18px}
 html[data-theme="newspaper"] #game-dialog .horse-cell.cell{font-size:29px}
}
html[data-theme="newspaper"] .horse-card-grid{grid-template-columns:repeat(3,40px)}
html[data-theme="newspaper"] .horse-card-grid i{height:40px;font-size:23px}
@media(max-width:540px){
 html[data-theme="newspaper"] .horse-card-grid{grid-template-columns:repeat(3,28px)}
 html[data-theme="newspaper"] .horse-card-grid i{height:28px;font-size:19px}
}
/* Remove leftover green hover effects from the original theme. */
html[data-theme="newspaper"] #game-dialog .path-cell:not(.path-visited):hover{background:var(--puzzle-paper);box-shadow:none}
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell:not(.fixed):not([data-value="1"]):hover{background:var(--puzzle-paper);box-shadow:none}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell:not(.revealed):not(.start-cell):not(.flower-obscured):hover{background:#c9c5b5;box-shadow:none}
html[data-theme="newspaper"] #game-dialog .cell:focus-visible{outline-color:var(--puzzle-rule)}
/* One serif weight for the two letter games. */
.scrapple-card-preview i,.scrapple-scrap,
html[data-theme="newspaper"] #game-dialog .scrapple-tile{font-weight:400}
/* Air Strike: derived crosses replace blocked-square shading. */
html[data-theme="newspaper"] #game-dialog .meow-cell.meow-auto{background-color:#eeeadf}
.meow-cross{font:400 27px/1 Georgia,'Times New Roman',serif;color:#514f45;pointer-events:none}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell{font:400 23px/1 Georgia,'Times New Roman',serif}
html[data-theme="newspaper"] .mini-grid i{font-family:Georgia,'Times New Roman',serif;font-weight:400}
.grass-icon{display:block;width:26px;height:26px;margin:auto;pointer-events:none}
/* Every sun/empty preview square is paper. Every moon square is ink. */
html[data-theme="newspaper"] .binary-card-grid i:nth-child(n){background:#f4f0e3;color:#34332c;border-color:#c8c4b7}
html[data-theme="newspaper"] .binary-card-grid i.moon-square:nth-child(n){background:#34332c;color:#f4f0e3;border-color:#8d846d}
@media(max-width:540px){
 html[data-theme="newspaper"] #game-dialog .flower-grid .cell{font-size:20px}
 .grass-icon{width:23px;height:23px}
 .meow-cross{font-size:24px}
}
/* Glyphs animate inside stationary ruled cells; the grid never bounces. */
.woof-mark{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;transform-origin:center;z-index:1}
.woof-leaving{color:#514f45;z-index:0}
html[data-theme="newspaper"] #game-dialog .meow-cell{transition:background-color 180ms ease,color 180ms ease}
/* Graveyard: draw/retract the trail without moving its numbered landmarks. */
html[data-theme="newspaper"] #game-dialog .path-trace .path-retract{stroke:#aaa699;stroke-width:14}
html[data-theme="newspaper"] #game-dialog .path-cell{transition:background-color 140ms ease,box-shadow 140ms ease}
html[data-theme="newspaper"] #game-dialog .path-number{transition:background-color 160ms ease,color 160ms ease,border-color 160ms ease}
html[data-theme="newspaper"] #game-dialog .path-cell.path-end{box-shadow:inset 0 0 0 1px var(--puzzle-rule)}
/* Keep the same opaque headstones and grid rules through the final board lift. */
html[data-theme="newspaper"] .finishing-state .path-cell{border-color:var(--puzzle-grid)}
html[data-theme="newspaper"] .finishing-state .path-cell.path-visited,
html[data-theme="newspaper"] .finishing-state .path-cell.path-visited:hover{background:#e9e6dc}
/* Apothecary: steady cabinet rules, animated bottles, and a readable palette. */
html[data-theme="newspaper"] #game-dialog .apothecary-grid{margin-top:0}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell{position:relative;transition:background-color 160ms ease}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell.potion-match{background:#e8e4d8}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell.selected{background:#ece7d8}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell.potion-entry{color:#292820}
.potion-mark{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;transform-origin:50% 70%}
.potion-leaving{pointer-events:none}
html[data-theme="newspaper"] #game-dialog #digits.potion-palette{align-items:stretch;gap:9px;margin-top:20px}
html[data-theme="newspaper"] #game-dialog #digits.potion-palette button[data-potion]{display:grid;place-items:center;width:49px;height:49px;min-width:49px;min-height:49px;padding:8px}
html[data-theme="newspaper"] #game-dialog #digits.potion-palette button.active{background:var(--puzzle-ink);color:var(--puzzle-paper)}
html[data-theme="newspaper"] #game-dialog #digits.potion-palette button:disabled{opacity:.38}
@media(max-width:540px){
 html[data-theme="newspaper"] #game-dialog #digits.potion-palette{gap:7px}
 html[data-theme="newspaper"] #game-dialog #digits.potion-palette button[data-potion]{width:43px;height:43px;min-width:43px;min-height:43px;padding:7px}
}
html[data-theme="newspaper"] #game-dialog .apothecary-grid .cell.fixed.potion-match{background:#d8d4c8}
/* Results announce their heading through focus, without a browser focus ring. */
#game-dialog #game-title:focus{outline:none}
/* Numerals: Roman numerals replace bottle artwork across all three surfaces. */
.roman-numeral{display:block;pointer-events:none;font:400 28px/1 Georgia,'Times New Roman',serif;letter-spacing:.2px}
.apothecary-grid .cell.fixed .roman-numeral{font-weight:700}
.potion-palette .roman-numeral{font-size:22px}
.sudoku-drawing .roman-numeral{font-size:17px}
@media(max-width:540px){
 .apothecary-grid .roman-numeral{font-size:26px}
 .potion-palette .roman-numeral{font-size:21px}
 .sudoku-drawing .roman-numeral{font-size:12px}
}
/* Flower Field stays in ink and paper, including the grass-square hover. */
html[data-theme="newspaper"] #game-dialog .flower-grid .start-cell,
html[data-theme="newspaper"] #game-dialog .flower-grid .start-cell:hover{
 background:#34332c;color:#f4f0e3;box-shadow:none;outline:none;border:0;animation:flower-start-ink 2.6s ease-in-out infinite;
}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell.flower-obscured,
html[data-theme="newspaper"] #game-dialog .flower-grid .cell.flower-obscured:hover{
 background-color:#e4dfd1;background-image:repeating-linear-gradient(135deg,transparent 0 4px,#8c867352 4px 5px);
 color:#34332c;box-shadow:none;cursor:default;outline:none;
}
/* Marks and stepped-on flowers share the same transparent ink glyph. */
.flower-mark{display:grid;place-items:center;width:100%;height:100%;margin:0;background:transparent;font:400 25px/1 Georgia,serif;pointer-events:none;transform-origin:center}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell{transition:background-color 180ms ease,color 180ms ease}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell.revealed{animation:none}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell.flower-arrive{animation:flower-reveal 300ms var(--flower-delay,0ms) ease-out both}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell.flower-hatch{animation:flower-hatch 360ms var(--flower-delay,0ms) ease-out both}
.flower-hatch .flower-hit{animation:flower-ink-stamp 360ms ease-out both}
@keyframes flower-start-ink{0%,100%{background-color:#34332c}50%{background-color:#535044}}
@keyframes flower-reveal{from{background-color:#cbc7b8;color:transparent}to{background-color:#f4f0e3;color:#34332c}}
@keyframes flower-hatch{from{opacity:.35}to{opacity:1}}
@keyframes flower-ink-stamp{0%{opacity:0;transform:scale(1.3) rotate(-12deg)}65%{opacity:1;transform:scale(.94) rotate(2deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@media(max-width:540px){.flower-mark{font-size:22px}}
@media(prefers-reduced-motion:reduce){
 html[data-theme="newspaper"] #game-dialog .flower-grid .cell,
 html[data-theme="newspaper"] #game-dialog .flower-grid .cell.start-cell,
 html[data-theme="newspaper"] #game-dialog .flower-grid .cell.flower-arrive,
 html[data-theme="newspaper"] #game-dialog .flower-grid .cell.flower-hatch,
 .flower-hatch .flower-hit{animation:none;transition:none}
}

/* Flower Field only displays actionable input errors below the board. */


/* Keep panel footers quiet; actionable errors remain visible when present. */


/* Keep value palettes separate from the editing actions after helper text removal. */
html[data-theme="newspaper"] #game-dialog .entry-digits,
html[data-theme="newspaper"] #game-dialog #digits.potion-palette{margin-top:22px;margin-bottom:0;align-items:center}
html[data-theme="newspaper"] #game-dialog .entry-digits ~ .game-controls,
html[data-theme="newspaper"] #game-dialog .potion-palette ~ .game-controls{margin-top:22px;margin-bottom:0}
html[data-theme="newspaper"] #game-dialog .symbol-digits button[data-digit]{display:grid;place-items:center;box-sizing:border-box;width:49px;height:49px;min-width:49px;min-height:49px;padding:8px;flex:0 0 49px}
@media(max-width:540px){
 html[data-theme="newspaper"] #game-dialog .symbol-digits button[data-digit]{width:43px;height:43px;min-width:43px;min-height:43px;flex-basis:43px;padding:7px}
}

/* Feedback has a stable slot so an error never recentres or resizes the panel. */
html[data-theme="newspaper"] #game-content .game-status{display:block;box-sizing:border-box;height:3em;min-height:3em;margin:12px 0;line-height:1.5;overflow:auto;overflow-wrap:anywhere}
html[data-theme="newspaper"] #game-content .game-status:empty{visibility:hidden}
html[data-theme="newspaper"] #game-content .horse-hint{display:block;box-sizing:border-box;height:78px;min-height:78px;overflow:auto;margin:14px 0 0}
html[data-theme="newspaper"] #game-content .horse-hint[hidden]{visibility:hidden}
@media(max-width:540px){html[data-theme="newspaper"] #game-content .game-status{height:4.5em;min-height:4.5em}}


/* A clear board frame lets the page show through between the field squares. */
html[data-theme="newspaper"] #game-dialog .flower-grid{background:transparent;border-width:3px}

/* Sun ink is golden while the board keeps its monochrome treatment. */
html[data-theme="newspaper"][data-colour-mode="colourful"] #game-dialog .binary-grid .entry-cell[data-value="0"],
html[data-theme="newspaper"][data-colour-mode="colourful"] #game-dialog .binary-grid .entry-cell.fixed[data-value="0"],
html[data-theme="newspaper"][data-colour-mode="colourful"] #game-dialog .binary-grid .entry-cell.selected[data-value="0"],
html[data-theme="newspaper"][data-colour-mode="colourful"] #game-dialog .symbol-digits button[data-digit="0"],
html[data-theme="newspaper"][data-colour-mode="colourful"] #game-dialog .symbol-digits button[data-digit="0"]:hover,
html[data-theme="newspaper"][data-colour-mode="colourful"] .card .binary-card-grid i:not(.moon-square):not(:empty){color:#b58a18}

/* Flower Field follows the same continuous ruled-grid layout as the other games. */
html[data-theme="newspaper"] #game-dialog .flower-grid{gap:0;padding:0;overflow:hidden}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell:nth-child(n){border:0;border-right:1px solid var(--puzzle-grid);border-bottom:1px solid var(--puzzle-grid);border-radius:0;box-shadow:none}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell:nth-child(8n){border-right:0}
html[data-theme="newspaper"] #game-dialog .flower-grid .cell:nth-child(n+57){border-bottom:0}
html[data-theme="newspaper"] .card .mini-grid{gap:0;border:1px solid var(--puzzle-rule);overflow:hidden}
html[data-theme="newspaper"] .card .mini-grid i:nth-child(n){border:0;border-right:1px solid var(--puzzle-grid);border-bottom:1px solid var(--puzzle-grid);border-radius:0}
html[data-theme="newspaper"] .card .mini-grid i:nth-child(5n){border-right:0}
html[data-theme="newspaper"] .card .mini-grid i:nth-child(n+21){border-bottom:0}

/* The outer frame supplies the final right and bottom edges. */
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell:nth-child(6n){border-right:0}
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell:nth-child(n+31){border-bottom:0}

/* Moon squares share the same fine rule as every other square. */
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell[data-value="1"]{border-color:#c7bea4}
html[data-theme="newspaper"] .binary-card-grid i.moon-square:nth-child(n){border-color:#c8c4b7}

/* Inset from the cell's inner face so one-sided grid rules cannot offset selection. */
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell.cell.selected{outline:none;box-shadow:none}
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell.selected::after{content:"";position:absolute;inset:3px;border:2px solid #6b5d39;pointer-events:none;box-sizing:border-box}
html[data-theme="newspaper"] #game-dialog .binary-grid .entry-cell.selected[data-value="1"]::after{border-color:#b9a57b}

/* Sun & Moon is tapped directly; no persistent selector or symbol palette. */
html[data-theme="newspaper"] #game-dialog .binary-grid.tap-cycle-grid .entry-cell{outline:none;box-shadow:none}
html[data-theme="newspaper"] #game-dialog .binary-grid.tap-cycle-grid .entry-cell::after{content:none}
html[data-theme="newspaper"] #game-dialog .entry-digits[hidden]{display:none}

html[data-theme="newspaper"] .card[data-game="sudoku"] .sudoku-drawing i:nth-child(4n+3){border-left:2px solid var(--puzzle-rule)}
html[data-theme="newspaper"] .card[data-game="sudoku"] .sudoku-drawing i:nth-child(n+9):nth-child(-n+12){border-top:2px solid var(--puzzle-rule)}

/* Graveyard miniature: internal grid rules sit beneath the trail and hedges. */
html[data-theme="newspaper"] .path-card-grid{isolation:isolate}
html[data-theme="newspaper"] .path-card-grid::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background-image:linear-gradient(to right,transparent calc(33.333333% - .5px),var(--puzzle-grid) calc(33.333333% - .5px),var(--puzzle-grid) calc(33.333333% + .5px),transparent calc(33.333333% + .5px),transparent calc(66.666667% - .5px),var(--puzzle-grid) calc(66.666667% - .5px),var(--puzzle-grid) calc(66.666667% + .5px),transparent calc(66.666667% + .5px)),linear-gradient(to bottom,transparent calc(33.333333% - .5px),var(--puzzle-grid) calc(33.333333% - .5px),var(--puzzle-grid) calc(33.333333% + .5px),transparent calc(33.333333% + .5px),transparent calc(66.666667% - .5px),var(--puzzle-grid) calc(66.666667% - .5px),var(--puzzle-grid) calc(66.666667% + .5px),transparent calc(66.666667% + .5px))}
html[data-theme="newspaper"] .path-card-grid>span{border:0;z-index:2}
html[data-theme="newspaper"] .path-card-grid>svg{z-index:1}

/* Stronger neutral contrast for Flower Field's monochrome grid only. */
html[data-theme="newspaper"][data-colour-mode="monochrome"] #game-dialog .flower-grid,
html[data-theme="newspaper"][data-colour-mode="monochrome"] .card[data-game="minesweeper"] .card-art{--puzzle-grid:#8e8a7b}
html[data-theme="newspaper"][data-colour-mode="monochrome"] #game-dialog .flower-grid .cell[data-paint="covered"],
html[data-theme="newspaper"][data-colour-mode="monochrome"] .card[data-game="minesweeper"] .mini-grid i:not(.open):not(.flag){background:#c5c1b4}
