/* Sparrow-seal look (JP, 18 Nov 2026): one set of colours for light (clear, daylight ink-wash) and dark (mystery, one lantern).
   Linked by every page that has been moved to the new look. Tokens first, then the lantern switch, then the lit tile. */
:root{--bg:#f1e8d4;--bg2:#e7dcc3;--panel:#f8f1e1;--ink:#1f2623;--soft:#56605a;--line:rgba(31,38,35,.22);--red:#b8352a;--redtx:#f6efdd;--gold:#7a5815;--redfg:#b8352a;--ember:#c96a38;--shadow:0 10px 30px rgba(60,45,20,.16)}
[data-mode=dark]{--redfg:#e0735a;--bg:#0a1a1b;--bg2:#0d2021;--panel:#0d2021;--ink:#e8decb;--soft:#a2aaa0;--line:rgba(217,180,108,.2);--red:#a93d28;--redtx:#f6e9d2;--gold:#d9b46c;--ember:#e8884f;--shadow:0 12px 34px rgba(0,0,0,.5)}
/* the lantern switch (src/mode.js): a paper lantern in the header; lit in dark mode */
.lantern-switch{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px 0 10px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink);font:600 14px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;cursor:pointer}
.lantern-switch:focus-visible{outline:3px solid var(--red);outline-offset:2px}
.lantern-switch .ls-lamp{display:inline-flex;transition:filter .5s,color .5s}
.lantern-switch .lamp{fill:transparent;transition:fill .5s}
.lantern-switch[aria-pressed=true] .ls-lamp{color:var(--gold);filter:drop-shadow(0 0 7px rgba(255,186,90,.85))}
.lantern-switch[aria-pressed=true] .lamp{fill:rgba(255,196,110,.35)}
@media (prefers-reduced-motion:reduce){.lantern-switch .ls-lamp,.lantern-switch .lamp{transition:none}}
/* the lit tile (from the Sparrow Seal page): red back, ivory edge, engraved face, one light: daylight in light mode, the Keeper's lantern in dark */
/* ===== Lit tiles (from the Sparrow Seal page): red back, ivory edge, engraved face, one light ===== */
.t3{--lx:25%;--ly:15%;--sx:.8;--sy:1;--dx:calc(var(--k)*.071cqw);--dy:calc(var(--k)*.098cqw);--cast:rgba(28,40,34,.42);
 background:none!important;box-shadow:none!important;border-radius:12%/8.6%;isolation:isolate;transform:rotate(var(--rz,0deg))!important;z-index:4}
.t3::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;transform:translate(var(--dx),var(--dy));background:linear-gradient(135deg,#c8433b,#8f201d 45%,#5a0e0e);
 box-shadow:calc(var(--sx)*var(--k)*.125cqw) calc(var(--sy)*var(--k)*.214cqw) calc(var(--k)*.23cqw) calc(var(--k)*-.07cqw) var(--cast);background-image:linear-gradient(135deg,#c8433b,#8f201d 45%,#5a0e0e);inset:0}
.t3::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;transform:translate(calc(var(--dx)*.5),calc(var(--dy)*.5));background:linear-gradient(135deg,#d6c394,#b09b6c)}
.t3>b{position:absolute;inset:0;border-radius:inherit;overflow:hidden;display:block;
 background:radial-gradient(150% 115% at var(--lx) var(--ly),#f1e3bb 0%,#e6d4a6 34%,#dcc898 62%,#cdb787 100%);
 box-shadow:inset 0 2px 1.5px rgba(255,255,255,.8),inset 0 -4px 7px rgba(110,88,40,.2),inset -3px 0 5px rgba(110,88,40,.1)}
.t3>b::before{content:"";position:absolute;inset:0;background:var(--f) center/100% 100% no-repeat;
 filter:drop-shadow(calc(var(--sx)*1.4px) calc(var(--sy)*1.6px) 0 rgba(255,255,255,.85)) drop-shadow(calc(var(--sx)*-1px) calc(var(--sy)*-1.2px) .4px rgba(74,58,28,.45))}
.t3>b::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(52% 34% at var(--lx) var(--ly),rgba(255,255,255,.42),transparent 70%)}
/* by lantern: the light comes from the Keeper, so it moves right and goes warm; thickness stays down and right */
[data-mode=dark] .t3{--lx:88%;--ly:16%;--sx:-.8;--cast:rgba(0,0,0,.7)}
[data-mode=dark] .t3>b{background:radial-gradient(150% 120% at var(--lx) var(--ly),#fde8b8 0%,#efd49c 28%,#cbb07a 58%,#8e7c56 100%);box-shadow:inset 0 2px 1.5px rgba(255,236,190,.7),inset 0 -4px 8px rgba(40,28,10,.35),inset -3px 0 5px rgba(40,28,10,.2)}
[data-mode=dark] .t3>b::after{background:radial-gradient(56% 38% at var(--lx) var(--ly),rgba(255,206,130,.55),transparent 72%)}
.t3{--dx:calc(var(--k)*.085cqw);--dy:calc(var(--k)*.115cqw)}
/* a row of tiles: put them in a container (container-type:inline-size) so their size follows its width */
.t3-row{display:flex;align-items:flex-start;gap:3.6%;container-type:inline-size}
.t3-row .t3{position:relative;--k:17;flex:0 0 17%;width:auto;aspect-ratio:300/420;margin-top:var(--dy2,0)}

/* The enlarged tile when a tile is pressed and held (src/tile-peek.js): the same lit tile as the home page, in its own box */
.t3-peek{container-type:inline-size;display:block;width:110px;aspect-ratio:300/420;margin:0 8px 8px 0}
.t3-peek .t3{position:relative;--k:100;left:0;top:0;width:100%;height:100%;display:block;margin:0;transform:none!important}
.t3-peek.dim{filter:brightness(.72) saturate(.85)}
/* held tile (JP, 19 Nov 2026: "messy, not clean 3D"): one tile, a thin red back-edge, no middle slab, one soft shadow, room inside the card for the edge */
.t3-peek{margin:0 10px 10px 0}
.t3-peek .t3{--dx:3.2cqw;--dy:4.4cqw}
.t3-peek .t3::after{display:none}
.t3-peek .t3::before{box-shadow:0 5cqw 7cqw -3cqw var(--cast)}
.t3-peek .t3>b::before{filter:none;background-size:115.4% 113.8%;background-position:6.9% 5.45%}   /* the picture is a whole tile with its thickness: show only its face, so the lit body is not drawn twice */
#peek .voice-line{font-family:var(--han,inherit);letter-spacing:.02em}

/* The new icons (assets/look/icons.svg) on every page: a tile-style glyph in the look's ink, red and ivory, for light and dark. */
.ix{display:block;flex:none;--a:#b8352a;--tile:#f2eadb;--edge:rgba(31,38,35,.28);--edge2:rgba(31,38,35,.3);color:#25302b}
[data-mode=dark] .ix{--tile:#23463d;--a:#e9c784;--edge:rgba(242,234,219,.18);--edge2:rgba(242,234,219,.2);color:#f2eadb}
.btn.icon-only .ix{width:32px;height:32px}

/* ===== Shared components: notes, ranked lists, badges, progress (brand guide, "Light and dark modes, and the shared
   components", 20 Nov 2026). One look on every page, from the brand tokens, in light and dark mode; pages do not restyle
   these. The values are kept as their own --c-* tokens because some pages define --panel/--gold for their night table. ===== */
html{--c-note:rgba(248,241,225,.96);--c-ink:#1f2623;--c-soft:#56605a;--c-line:rgba(31,38,35,.22);--c-accent:#7a5815;--c-on-accent:#fbf5e6;
  --c-shadow:0 6px 18px rgba(60,45,20,.22);--c-me:rgba(122,84,16,.10);--c-track:rgba(31,38,35,.12);--c-fill:linear-gradient(90deg,#9a7424,#c9a24e);
  --c-tier1:#8a5a2b;--c-tier2:#5f6b70;--c-tier3:#7a5815}
html[data-mode=dark]{--c-note:rgba(13,32,33,.96);--c-ink:#e8decb;--c-soft:#a2aaa0;--c-line:rgba(217,180,108,.28);--c-accent:#d9b46c;--c-on-accent:#1a1205;
  --c-shadow:0 6px 18px rgba(0,0,0,.55);--c-me:rgba(217,180,108,.14);--c-track:rgba(243,236,220,.10);--c-fill:linear-gradient(90deg,#b8913f,#e9c784);
  --c-tier1:#d39a64;--c-tier2:#d9e1e4;--c-tier3:#e9c784}
/* Notes: tips, toasts, rule notes and Solitaire's coach tips. A paper note with a gold rule on its reading-start edge. */
html[data-mode] :is(.tip,#toast,#rulenote,#coach){background:var(--c-note);color:var(--c-ink);border:1px solid var(--c-line);border-inline-start:3px solid var(--c-accent);box-shadow:var(--c-shadow)}
html[data-mode] :is(#toast,#rulenote) :is(.han,b,strong){color:var(--c-accent)}
html[data-mode] #rulenote .ctag{background:var(--c-me);color:var(--c-accent);border:1px solid var(--c-line)}
/* Ranked lists: leaderboards and podiums. */
html[data-mode] .lb li{border-top-color:var(--c-line)}
html[data-mode] .lb li.me{background:var(--c-me);color:var(--c-ink);box-shadow:inset 3px 0 0 var(--c-accent)}
html[data-mode] :is(.lb .rk,.lb .st){color:var(--c-accent)}
html[data-mode] .lb .who small{color:var(--c-soft)}
html[data-mode] .lb .rep{min-width:44px;min-height:44px;border-color:var(--c-line);color:var(--c-soft)}
html[data-mode] .lb .rep.ask{color:var(--c-ink);border-color:var(--c-accent);background:var(--c-me)}
html[data-mode=dark] .podium li{background:var(--c-note);border-color:var(--c-line);color:var(--c-ink)}
html[data-mode] .podium small{color:var(--c-soft)}
html[data-mode] .podium .place{background:var(--c-track);color:var(--c-ink)}
html[data-mode] .podium .p1{border-color:var(--c-accent)}
html[data-mode] .podium .p1 .place{background:var(--c-accent);color:var(--c-on-accent)}
html[data-mode] .podium .me{box-shadow:inset 3px 0 0 var(--c-accent)}
/* Badges: Solitaire's badges, tournament badges, the Table's medals. Earned ones carry their tier colour. */
html[data-mode] .sbadges li{background:var(--c-note);border:1px solid var(--c-line);color:var(--c-ink);opacity:.6}
html[data-mode] .sbadges li.on{opacity:1;border-color:var(--c-accent)}
html[data-mode] .sbadges i{color:var(--c-soft)}
html[data-mode] .sbadges li.on.t1 i{color:var(--c-tier1)}html[data-mode] .sbadges li.on.t2 i{color:var(--c-tier2)}html[data-mode] .sbadges li.on.t3 i{color:var(--c-tier3)}
html[data-mode] .sbadges small{color:var(--c-soft)}
html[data-mode] .tbadges li{background:var(--c-note);color:var(--c-ink);border-color:var(--c-accent)}
html[data-mode] .tbadges i{color:var(--c-accent)}
html[data-mode] .medal.t1{--tier:var(--c-tier1)}html[data-mode] .medal.t2{--tier:var(--c-tier2)}html[data-mode] .medal.t3{--tier:var(--c-tier3)}
/* Progress: bars, the streak, the summary line. */
html[data-mode] .lvlbar{background:var(--c-track);border-color:var(--c-line)}
html[data-mode] .lvlbar span{background:var(--c-fill)}
html[data-mode] .streak b{color:var(--c-accent)}
html[data-mode] .prog-mini{border-color:var(--c-line)}
html[data-mode] .prog-line .up{color:var(--c-accent)}
