/* Mahjong Solitaire in the sparrow-seal look (JP, 19 Nov 2026). Loaded after the page's own styles.
   The board's painting still comes from the board (and, until the skins retire, from the level's set); everything
   around it follows light (daylight paper) and dark (night, one lantern). */
html[data-mode=dark]{color-scheme:dark;--room:#0a1a1b;--panel:#0d2021;--line:rgba(217,180,108,.28);--ink:#e8decb;--muted:#b3b9ae;--gold:#d9b46c;--gold-deep:#b8913f}
html[data-mode=light]{color-scheme:light;--room:#f1e8d4;--panel:#f8f1e1;--line:rgba(31,38,35,.26);--ink:#1f2623;--muted:#4a544e;--gold:#8a6420;--gold-deep:#9a7424}
/* ----- loading: the tile of the day, the seal pressing onto it, one brush stroke ----- */
#preload{background:var(--bg);overflow:hidden}
#preload .pl-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:62% 50%}
#preload .pl-bg.dk,html[data-mode=dark] #preload .pl-bg.lt{display:none}html[data-mode=dark] #preload .pl-bg.dk{display:block}
#preload::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(90% 70% at 50% 44%,rgba(241,232,212,.28),rgba(241,232,212,.8) 88%)}
html[data-mode=dark] #preload::after{background:radial-gradient(70% 60% at 50% 46%,rgba(7,19,20,0),rgba(4,10,11,.74) 100%),rgba(4,12,13,.3)}
#preload .pl-card{position:relative;z-index:1;align-items:center;gap:clamp(16px,4vmin,30px)}
.pl-tod{position:relative;display:flex;justify-content:center}
#preload .pl-tile{flex-direction:column;align-items:center;gap:10px;padding:0;background:none;border:0;text-align:center}
#preload .pl-tile img{width:min(30vmin,150px);height:auto;aspect-ratio:300/420;object-fit:contain;filter:drop-shadow(8px 12px 10px rgba(28,40,34,.42));animation:pl-sway 6s ease-in-out infinite}
html[data-mode=dark] #preload .pl-tile img{filter:drop-shadow(-8px 12px 12px rgba(0,0,0,.7)) drop-shadow(0 0 22px rgba(255,190,100,.25))}
#preload .pl-tile span{display:flex;flex-direction:column;gap:2px}
#preload .pl-tile small{font:700 11px/1.2 var(--body);letter-spacing:.22em;text-transform:uppercase;color:var(--ember)}
#preload .pl-tile b{font:400 1.5rem/1.2 var(--display);color:var(--ink)}
#preload .pl-tile i{color:var(--soft)}
@keyframes pl-sway{0%,100%{transform:rotateY(-12deg) rotateX(4deg)}50%{transform:rotateY(12deg) rotateX(-2deg)}}
.pl-tod{perspective:900px}
.pl-chop{position:absolute;right:calc(50% - min(30vmin,150px)/2 - 34px);top:-14px;z-index:2;filter:drop-shadow(0 3px 4px rgba(0,0,0,.35));animation:pl-press 3.8s cubic-bezier(.3,.8,.3,1) infinite}
.pl-chop svg{display:block;transform:rotate(-6deg)}
@keyframes pl-press{0%,40%{opacity:0;transform:translateY(-26px) scale(1.6)}52%{opacity:1;transform:translateY(0) scale(.94)}58%{transform:scale(1)}88%{opacity:1}100%{opacity:0}}
.pl-brush{width:200px;height:5px;border-radius:3px;background:var(--line);overflow:hidden}
.pl-brush i{display:block;width:38%;height:100%;border-radius:3px;background:linear-gradient(90deg,transparent,var(--red),transparent);animation:pl-sweep 1.8s ease-in-out infinite}
@keyframes pl-sweep{0%{transform:translateX(-110%)}100%{transform:translateX(280%)}}
#preload .pl-level{color:var(--ink)}#preload .pl-level small,#preload .pl-streak{color:var(--muted)}
#preload .pl-tour b{color:var(--ink)}#preload .pl-tour small{color:var(--ember)}
@media (prefers-reduced-motion:reduce){#preload .pl-tile img,.pl-brush i{animation:none}.pl-chop{animation:none;opacity:1}}
/* ----- top bar, tools, menus: glass in the mode's own colour ----- */
html[data-mode=light] .bar .hud,html[data-mode=light] .bar .boxes,html[data-mode=light] .bar #menu-btn,html[data-mode=light] .tools .btn:not(.gold){background:color-mix(in srgb,var(--panel) 78%,transparent);color:var(--ink);border-color:var(--line);box-shadow:0 4px 14px rgba(60,45,20,.18)}
html[data-mode=light] .bar .info{text-shadow:none}
html[data-mode=light] .bar .box:not(.on){background:rgba(31,38,35,.06);border-color:rgba(31,38,35,.3)}
html[data-mode=light] .btn.ghost{background:color-mix(in srgb,var(--panel) 80%,transparent);color:var(--ink)}
html[data-mode=dark] .bar .hud,html[data-mode=dark] .bar .boxes,html[data-mode=dark] .bar #menu-btn,html[data-mode=dark] .tools .btn:not(.gold){background:color-mix(in srgb,#0a1a1b 88%,transparent)}
/* Night: the empty slots' dashes read at 4.5:1 or more on any board (they were 2.6:1); a board's own rim (combo-look.js) wins. */
html[data-mode=dark] .bar #combo .box:not(.on){border-color:var(--box-rim,#8fc4ad)}
.btn.gold{background:var(--red);color:var(--redtx);border-color:transparent}
html[data-mode=light] .sheet{background:rgba(60,45,20,.45)}
.card{background-color:var(--panel);background-image:var(--paper,none);color:var(--ink)}
.card h2,.card h3,#after h3{color:var(--ink)}
html[data-mode=light] .card,html[data-mode=light] #after>section{box-shadow:0 12px 40px rgba(60,45,20,.3)}
html[data-mode=light] .choice{background:rgba(31,38,35,.05)}
html[data-mode=light] #after>section{background:var(--panel);color:var(--ink)}
html[data-mode=light] .guides-link a{color:var(--redfg)}
/* the lantern switch in the menu */
.card .lantern-switch{margin:8px 0}
/* the coach tip and the home button */
.home-btn svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}
/* the board-finished sheet: a paper scroll with the sparrow seal stamped on it */
.won-head{display:flex;align-items:center;gap:10px}
.won-head .seal-stamp{flex:0 0 auto;display:block;transform:rotate(-4deg);filter:drop-shadow(0 2px 2px rgba(0,0,0,.25));animation:pl-stamp .6s .15s both}
.won-head .seal-stamp svg{display:block}
@keyframes pl-stamp{from{opacity:0;transform:rotate(-4deg) scale(1.8)}to{opacity:1;transform:rotate(-4deg) scale(1)}}
.card.won{border-top:1px solid var(--ink);border-bottom:1px solid var(--ink);border-radius:6px}
html[data-mode=dark] .card.won{background:linear-gradient(180deg,#0e2223,#0a1a1b);border-color:rgba(217,180,108,.5);box-shadow:0 24px 60px rgba(0,0,0,.7),0 0 60px rgba(232,136,79,.07)}
@media (prefers-reduced-motion:reduce){.won-head .seal-stamp{animation:none}}
/* The combo banner in the sparrow look (19 Nov 2026): a red seal stamps down over a quiet ink-wash panel, no gold glow.
   Daylight: paper and ink. Night: the dark panel and warm ivory. Edition boards keep their own banners (scroll, plaque). */
#burst .banner.stamp{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 12px;padding:10px 18px;border-radius:14px;border:1px solid var(--line);background:color-mix(in srgb,var(--room) 90%,transparent);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);box-shadow:0 10px 30px rgba(0,0,0,.28)}
#burst .banner.stamp .chop{display:inline-flex;margin:0 0 6px;border-radius:9px;line-height:0}
#burst .banner.stamp b{color:var(--ink);text-shadow:none;font-size:calc(min(5.5vw,1.35rem) / var(--tz,1))}
#burst .banner.stamp .pts{color:var(--ink);text-shadow:none;font-size:calc(min(5vw,1.2rem) / var(--tz,1))}
#burst .banner.stamp span{color:var(--ink);text-shadow:none}
#burst .banner.stamp .gain i{color:#b8352a;text-shadow:none}
#burst .banner.stamp small{color:#b8352a}
html:not([data-mode=light]) #burst .banner.stamp .gain i,html:not([data-mode=light]) #burst .banner.stamp small{color:#e0735a}
@media (prefers-reduced-motion:reduce){#burst .banner.stamp{box-shadow:none}}
/* the held-tile view keeps its dark panel in daylight too, so its words keep the light gold (19 Nov 2026) */
#peek b{color:#e9c784}
#peek .voice-line{color:#f3ecdc}
/* The opening beat (src/opening-beat.js): a quiet card above the tools, dark mode only; it never covers the board's tiles
   for taps outside itself, and fades in line by line. */
#beat{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:70;display:flex;align-items:center;gap:10px;width:min(92vw,380px);box-sizing:border-box;padding:6px 8px 6px 12px;border-radius:14px;border:1px solid var(--line);background:color-mix(in srgb,var(--room) 92%,transparent);color:var(--ink);box-shadow:0 8px 24px rgba(0,0,0,.4);pointer-events:none;animation:beat-in .8s ease both}
html[data-mode=light] #beat{display:none}
#beat img{flex:0 0 auto;height:64px;width:auto;filter:drop-shadow(0 0 8px rgba(255,186,90,.35))}
#beat .lines{flex:1 1 auto;min-width:0;font-size:14px;line-height:1.4}
#beat p{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#beat b{color:#d9b46c;font-weight:600;margin-inline-end:2px}
#beat .l2{animation:beat-in .8s 2s ease both}
#beat .skip{pointer-events:auto;flex:0 0 auto;min-height:44px;min-width:44px;border:0;border-radius:10px;background:transparent;color:var(--soft,#a2aaa0);font:inherit;cursor:pointer}
@keyframes beat-in{from{opacity:0;transform:translateX(-50%) translateY(6px)}to{opacity:1;transform:translateX(-50%)}}
#beat .l2{animation-name:beat-line}
@keyframes beat-line{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){#beat,#beat .l2{animation:none}}

#burst .banner.stamp .chop{display:inline-flex;border-radius:8px;line-height:0}#burst .banner.stamp .bt{display:flex;flex-direction:column;align-items:flex-start}#burst .banner.stamp .extras{flex-basis:100%;text-align:center}
html[data-mode=dark] #burst .banner.stamp{background:rgba(7,17,18,.92);border-color:rgba(217,180,108,.4);box-shadow:0 0 34px rgba(232,146,58,.22),0 10px 30px #000a}html[data-mode=dark] #burst .banner.stamp .gain i,html[data-mode=dark] #burst .banner.stamp small{color:#e8923a}
/* Light mode: buttons and toasts that kept the dark-green look (sheets, toasts) become paper (JP, 19 Nov 2026). */
html[data-mode=light] .btn:not(.gold):not(.ghost){background:#fbf5e6;color:var(--ink);border-color:var(--gold-deep)}

/* The cleared-board card and the saying by day (the chips and the box kept the dark-green look). */
html[data-mode=light] .stats div{background:rgba(31,38,35,.06);border:1px solid var(--line);color:var(--ink)}
html[data-mode=light] .saying{background:rgba(31,38,35,.05);border-color:var(--gold-deep)}
html[data-mode=light] .saying-text{color:var(--ink)}html[data-mode=light] .saying-reading{color:var(--muted)}
.saying-ico.ix{width:44px;height:44px;margin:0 auto 6px}
html[data-mode=light] .chip:not([aria-pressed=true]){background:#fffaf0;color:var(--ink);border-color:var(--line)}
html[data-mode=light] .chip[aria-pressed=true]{background:#f1d597;color:#22190a;border-color:#9a7424}
html[data-mode=light] input,html[data-mode=light] select{background:#fffaf0;color:var(--ink)}
/* The combo look of the board (src/combo-look.js; solitaire.js sets --cl-panel / --cl-ink / --cl-accent on #burst and #combo for the board's tile set and
   the mode). The stamp banner reads only these, so it suits the board in daylight and at night and its words always reach 4.5:1
   (test/combo-look.test.js). The set's own dark strip (#burst.own) never reaches it. */
#burst .banner.stamp,#burst.own .banner.stamp{background:var(--cl-panel,#fbf5e6);border-color:var(--cl-accent,#9a7424)}
#burst .banner.stamp b,#burst .banner.stamp .pts,#burst .banner.stamp span,#burst .banner.stamp .bt{color:var(--cl-ink,#1f2623)}
#burst .banner.stamp .gain i,#burst .banner.stamp small{color:var(--cl-accent,#9a2a20)}
html[data-mode=light] #burst .banner.stamp{box-shadow:0 10px 30px rgba(60,45,20,.35)}
html[data-mode=dark] #burst .banner.stamp{box-shadow:0 0 34px color-mix(in srgb,var(--cl-accent,#e8923a) 28%,transparent),0 10px 30px #000a}

/* Board cleared in light mode (JP, 19 Nov 2026): the reward chips and the stamp read on paper. */
html[data-mode=light] .rewards li{background:#f1e6c8;border:1px solid rgba(122,84,16,.5);color:#1f2623}
html[data-mode=light] .rewards li span{color:#1f2623}
html[data-mode=light] .rewards b{color:#7a5410}
html[data-mode=light] .won-more>summary{color:#1f2623;font-weight:600}
html[data-mode=light] .won-more .note{color:#3d4640}
html[data-mode=light] .won .stamp{background:#b8352a;color:#fbf5e6;border-color:#8f2620;box-shadow:0 2px 0 rgba(122,30,20,.35)}

/* A finished set (JP, 19 Nov 2026: not spectacular or visible enough): the banner is larger and a glow in the board's accent opens behind it. */
#burst .halo{position:absolute;left:50%;top:50%;width:min(92vw,520px);aspect-ratio:1;margin:calc(min(92vw,520px) / -2) 0 0 calc(min(92vw,520px) / -2);border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,color-mix(in srgb,var(--cl-accent,#f0b840) 60%,transparent),color-mix(in srgb,var(--cl-accent,#f0b840) 24%,transparent) 55%,transparent 72%);mix-blend-mode:normal}
html[data-mode=dark] #burst .halo{background:radial-gradient(closest-side,color-mix(in srgb,var(--cl-accent,#f0c46a) 65%,transparent),color-mix(in srgb,var(--cl-accent,#f0c46a) 28%,transparent) 55%,transparent 72%);mix-blend-mode:screen}
#burst .banner.stamp{padding:16px 26px;border-width:2px;border-color:var(--cl-accent,var(--line));box-shadow:0 0 0 4px color-mix(in srgb,var(--cl-accent,#c9852f) 30%,transparent),0 14px 40px rgba(0,0,0,.36)}
#burst .banner.stamp b{font-size:calc(min(7.4vw,1.9rem) / var(--tz,1))}
#burst .banner.stamp .pts{font-size:calc(min(6.4vw,1.6rem) / var(--tz,1))}
#burst .banner.stamp .chop svg{width:46px;height:46px}
@media (prefers-reduced-motion:reduce){#burst .halo{display:none}}

/* Fewer white buttons (JP, 19 Nov 2026): in daylight the board tools are one ink rail with ivory words and a brand icon each, Hint in
   seal red; the tile count and menu are ink chips. Paper stays for sheets and cards. */
html[data-mode=light] .tools{background:rgba(31,38,35,.9);border-radius:16px;padding:5px;gap:4px;box-shadow:0 6px 18px rgba(31,38,35,.28);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
html[data-mode=light] .tools .btn:not(.gold){background:transparent;border-color:transparent;color:#f6efde;box-shadow:none}
html[data-mode=light] .tools #hint-btn:not(:disabled){background:#b8352a;border-color:#8f2620;color:#fbf5e6}
html[data-mode=light] .tools .btn:not(.gold):disabled{opacity:.5}
html[data-mode=light] .tools .badge{background:#fbf5e6;color:#8f2620;border-color:#8f2620}
html[data-mode=light] .bar .hud,html[data-mode=light] .bar #menu-btn{background:rgba(31,38,35,.9);color:#f6efde;border-color:rgba(233,199,132,.45)}
html[data-mode=light] .bar .hud,html[data-mode=light] .bar .hud *{color:#f6efde;text-shadow:none}

/* The combo holder (JP, 19 Nov 2026): in daylight an ink strip with four plain dashed slots, its rim in the board's own accent; a filled slot keeps the tile. Nothing more. */
html[data-mode=light] .bar #combo .boxes{background:rgba(31,38,35,.9);border:1.5px solid var(--box-rim,rgba(233,199,132,.5));box-shadow:0 4px 12px rgba(31,38,35,.25)}
html[data-mode=light] .bar #combo .box:not(.on){background:rgba(246,239,222,.07);border:1.5px dashed var(--box-rim,#e9c784)}

/* The combo banner at the top, under the combo boxes, not in the middle of the board (JP, 20 Nov 2026: "too much in the middle
   of the screen", hard to read and hard on the eyes; players keep picking tiles while it shows, and taps go through it).
   A solid, compact card: no glow behind it, no blur, no flash. Every look (stamp, scroll, plaque) sits up there. */
#burst{place-items:start center;padding-top:6px;box-sizing:border-box}
#burst .halo{display:none}
#burst .banner.stamp{padding:8px 16px;gap:2px 10px;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:0 6px 18px rgba(0,0,0,.3)}
#burst .banner.stamp b{font-size:calc(min(6vw,1.45rem) / var(--tz,1))}
#burst .banner.stamp .pts{font-size:calc(min(5.4vw,1.3rem) / var(--tz,1))}
#burst .banner.stamp .chop svg{width:34px;height:34px}
#burst .banner small.extras,#burst .banner.stamp small.extras{opacity:1}
/* The card is solid on every board. A tile set with its own colours (#burst.own) used to paint it with a strip that faded to
   transparent (solitaire.html), which outranked the panel: dark words on a see-through card over the board. */
#burst .banner.stamp:not(.scroll):not(.plaque),#burst.own .banner.stamp:not(.scroll):not(.plaque){background:var(--cl-panel,#fbf5e6)}
/* Combo steps (COMBO_TIERS in solitaire-core.js, JP 20 Nov 2026): the card says one word and the points; a bigger combo gets a
   little more light round it, a larger seal at the top steps and, for the very best, one soft shine across. Subtle, and the
   words stay easy to read; nothing moves under reduced motion. */
#burst.tier-2 .banner.stamp{box-shadow:0 0 0 3px color-mix(in srgb,var(--cl-accent,#c9852f) 24%,transparent),0 6px 18px rgba(0,0,0,.3)}
#burst.tier-3 .banner.stamp{box-shadow:0 0 0 4px color-mix(in srgb,var(--cl-accent,#c9852f) 32%,transparent),0 0 22px color-mix(in srgb,var(--cl-accent,#e8b45a) 30%,transparent),0 6px 18px rgba(0,0,0,.3)}
#burst.tier-4 .banner.stamp{box-shadow:0 0 0 4px color-mix(in srgb,var(--cl-accent,#c9852f) 42%,transparent),0 0 30px color-mix(in srgb,var(--cl-accent,#e8b45a) 40%,transparent),0 6px 18px rgba(0,0,0,.3)}
#burst.tier-5 .banner.stamp{position:relative;box-shadow:0 0 0 5px color-mix(in srgb,var(--cl-accent,#c9852f) 50%,transparent),0 0 40px color-mix(in srgb,var(--cl-accent,#e8b45a) 48%,transparent),0 6px 18px rgba(0,0,0,.3)}
#burst:is(.tier-4,.tier-5) .banner.stamp .chop svg{width:40px;height:40px}
#burst.tier-5 .banner.stamp::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.42) 50%,transparent 60%) 120% 0/260% 100% no-repeat;animation:combo-shine 1.3s .4s ease-out both}
@keyframes combo-shine{to{background-position:-60% 0}}
@media (prefers-reduced-motion:reduce){#burst.tier-5 .banner.stamp::after{display:none}}
