/* 365 Games - the look shared by every card game (moved out of Solitaire's page, 3 Oct 2026). */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Clash Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/clash-display-600.woff2") format("woff2"); }

:root {
  --felt-a: #1f7a45; --felt-b: #0b3d20; --felt-ink: #eaf5ec; --bar: rgba(3, 22, 11, .55); --bar-line: rgba(255, 255, 255, .12);
  --btn: rgba(255, 255, 255, .1); --btn-hi: rgba(255, 255, 255, .2); --gold: #ffd257; --cyan: #22c3ee;
  --card: #fffdf7; --card-edge: #d8d2c3; --red: #c6152f; --black: #17191f; --slot: rgba(255, 255, 255, .22);
  --sheet: #fbfaf5; --sheet-ink: #15211a; --sheet-soft: #5b6b60; --sheet-line: #e2ded2; --primary: #146c3a; --primary-ink: #fff;
  --cw: 90px; --ch: 126px;
}
body.felt-blue { --felt-a: #1f5f9c; --felt-b: #0a2547; --primary: #1a5da3; }
body.felt-red { --felt-a: #8e2537; --felt-b: #3b0c16; --primary: #8e2537; }
body.felt-slate { --felt-a: #45526a; --felt-b: #141a25; --primary: #34465f; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden; color: var(--felt-ink); font: 500 16px/1.4 Archivo, "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(120% 90% at 50% 30%, var(--felt-a), var(--felt-b)); background-color: var(--felt-b);
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
/* a faint woven texture, like real baize */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* ---------- the bar along the top ---------- */
.bar {
  position: relative; z-index: 3000; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 14px 8px; background: var(--bar); border-bottom: 1px solid var(--bar-line);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 9px; font: 600 21px/1 "Clash Display", Archivo, sans-serif; letter-spacing: .01em; white-space: nowrap; }
.brand b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--cyan); color: #04212c; font: 700 14px/1 Archivo, sans-serif; letter-spacing: -.02em; }
.info { display: flex; gap: 6px; font-variant-numeric: tabular-nums; }
.chip { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 3px 10px; border-radius: 10px; background: rgba(0, 0, 0, .18); }
.chip small { font-size: 12px; opacity: .75; letter-spacing: .04em; text-transform: uppercase; }
.chip span { font: 700 18px/1.15 Archivo, sans-serif; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tb {
  display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px;
  background: var(--btn); color: var(--felt-ink); font: 700 16px/1 Archivo, sans-serif; cursor: pointer; transition: background .15s, transform .1s;
}
.tb:hover { background: var(--btn-hi); }
.tb:active { transform: scale(.97); }
.tb:disabled { opacity: .45; cursor: default; }
.tb svg { width: 22px; height: 22px; flex: none; }
.tb.main { background: var(--gold); color: #2a2000; }
.tb.main:hover { background: #ffe08a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 1180px) { .tb .lbl-x { display: none; } }
/* 4 Oct 2026: the bar keeps to one row - the less-used buttons drop their words first (Share, Feedback, Full screen, then
   My scores and Settings); their names still show on hover, and screen readers still read them */
@media (max-width: 1400px) { .tb.tb2 { padding: 0 11px; } .tb.tb2 .lbl { display: none; } }
@media (max-width: 1100px) { .tb.tb3 { padding: 0 11px; } .tb.tb3 .lbl { display: none; } }
@media (max-width: 860px) { .tb { padding: 0 11px; } .tb .lbl { display: none; } .brand span { display: none; } .chip { min-width: 54px; padding: 2px 7px; } }
/* a phone: the icon buttons a little narrower (still 44 px tall), so Share and Feedback fit without a second row */
@media (max-width: 480px) { .tools { gap: 3px; } .tb, .tb.tb2, .tb.tb3 { padding: 0 7px; } }

/* ---------- the table ---------- */
/* 4 Oct 2026 - the "made today" revamp (owner: "if Solitaire was made like today ... almost like a triple A game"):
   premium paper cards with a printed border and mirrored corner, gold-framed court cards, three card backs, cards that
   lift and tilt as they fly, a shine on cards turned over, a glow on every place the dragged card can go, soft table
   light. The game itself is unchanged. */
#board { position: relative; flex: 1; overflow: hidden; touch-action: none;
  background: radial-gradient(140% 110% at 50% 30%, rgba(255, 255, 255, .05) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .3) 100%); }
.slot {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .08);
  border: 2px solid var(--slot); background: rgba(0, 0, 0, .12); display: grid; place-items: center;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .25);
  color: rgba(255, 255, 255, .32); font: 700 calc(var(--cw) * .36) / 1 Archivo, sans-serif; transition: box-shadow .2s, border-color .2s;
}
.slot.found { border-color: rgba(255, 214, 120, .38); color: rgba(255, 214, 120, .5); background: radial-gradient(circle at 50% 45%, rgba(255, 214, 120, .1), rgba(0, 0, 0, .14) 70%); }
.slot.stock { cursor: pointer; }
.slot.stock svg { width: 46%; height: 46%; opacity: .8; }
.slot.hint, .card.hint .front, .card.hint .back { box-shadow: 0 0 0 4px var(--gold), 0 0 22px 6px rgba(255, 210, 87, .7) !important; }
/* while a card is being dragged, every place it may go glows */
.slot.can { border-color: #8ff0ff; box-shadow: inset 0 0 18px rgba(143, 240, 255, .35), 0 0 16px 3px rgba(143, 240, 255, .55); }
.card.can .front { box-shadow: 0 0 0 3px #8ff0ff, 0 0 20px 5px rgba(143, 240, 255, .6) !important; }
/* Pyramid: the card picked up, waiting for its partner - lifted, with a gold edge */
.card.sel .wig { transform: translateY(-7%) scale(1.05); }
.card.sel .front { box-shadow: 0 0 0 3px var(--gold), 0 0 22px 6px rgba(255, 210, 87, .65), 0 14px 24px rgba(0, 0, 0, .35) !important; }

.card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); transition: transform .3s cubic-bezier(.2, .8, .25, 1); will-change: transform; cursor: pointer; }
.card .wig { position: absolute; inset: 0; transition: transform .15s; }
.card .flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .34s cubic-bezier(.3, .7, .3, 1); }
.card.down .flip { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: calc(var(--cw) * .08); -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
/* the paper: warm white with a faint grain, a printed border just inside the edge, and a soft shadow on the table */
.front {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)' opacity='.06'/%3E%3C/svg%3E"),
    radial-gradient(130% 90% at 28% 12%, #ffffff 0%, #fffdf8 42%, #f3eee0 100%);
  box-shadow: 0 0 0 1px var(--card-edge) inset, 0 1px 1px rgba(0, 0, 0, .28), 0 3px 9px rgba(0, 0, 0, .16);
}
.front::before { content: ""; position: absolute; inset: calc(var(--cw) * .035); border-radius: calc(var(--cw) * .055); border: 1px solid rgba(0, 0, 0, .07); pointer-events: none; }
.red .front { color: var(--red); }
.blk .front { color: var(--black); }
/* lifting, flying, landing */
.card.drag { transition: none; }
.card.drag .wig { transform: scale(1.05) rotate(-1deg); }
.card.drag .front, .card.drag .back { box-shadow: 0 0 0 1px var(--card-edge) inset, 0 18px 34px rgba(0, 0, 0, .45), 0 6px 12px rgba(0, 0, 0, .25); }
.card.fly .wig { animation: fly .38s cubic-bezier(.2, .8, .3, 1); }
.card.fly .front, .card.fly .back { box-shadow: 0 0 0 1px var(--card-edge) inset, 0 14px 26px rgba(0, 0, 0, .38); transition: box-shadow .38s; }
@keyframes fly { 0% { transform: none } 38% { transform: translateY(-5%) scale(1.07) rotate(-2.5deg) } 82% { transform: scale(.99) } 100% { transform: none } }
.card.nope .wig { animation: nope .32s; }
@keyframes nope { 20% { transform: translateX(-6px) } 45% { transform: translateX(5px) } 70% { transform: translateX(-3px) } 100% { transform: none } }
.card.pop .wig { animation: pop .38s; }
@keyframes pop { 40% { transform: scale(1.1) } 100% { transform: none } }
.card.pop .front { box-shadow: 0 0 0 2px rgba(255, 214, 120, .9), 0 0 24px 6px rgba(255, 214, 120, .55); transition: box-shadow .2s; }
/* a card just turned face up catches the light */
.card.shine .front::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, .85) 46%, rgba(255, 255, 255, 0) 60%); background-size: 260% 100%; animation: shine .75s ease-out forwards; }
@keyframes shine { from { background-position: 140% 0 } to { background-position: -40% 0 } }

/* the corner: big enough to read when the cards overlap in a column - and a small suit mark in the opposite corner, like a
   real card (no number there: an upside-down 6 reads as a 9) */
.idx { position: absolute; left: 5%; top: 2.5%; font: 700 calc(var(--cw) * .32) / 1 Archivo, "Arial Narrow", sans-serif; letter-spacing: -.05em; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.idx.ten { letter-spacing: -.09em; font-size: calc(var(--cw) * .29); }
.sui { position: absolute; right: 5%; top: 2.5%; font: calc(var(--cw) * .29) / 1 "Segoe UI Symbol", "Apple Symbols", Archivo, sans-serif; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.cor { position: absolute; right: 5%; bottom: 2.5%; transform: rotate(180deg); opacity: .85; }
.cor i { font: calc(var(--cw) * .14) / 1 "Segoe UI Symbol", "Apple Symbols", Archivo, sans-serif; font-style: normal; }
.pips { position: absolute; left: 19%; right: 19%; top: 37%; bottom: 14%; }
.pip { position: absolute; transform: translate(-50%, -50%); font: calc(var(--cw) * .2) / 1 "Segoe UI Symbol", "Apple Symbols", Archivo, sans-serif;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 -.5px 0 rgba(0, 0, 0, .18); }
.pip.dn { transform: translate(-50%, -50%) rotate(180deg); }
.r9 .pip, .r10 .pip { font-size: calc(var(--cw) * .17); }
.ace { position: absolute; left: 0; right: 0; top: 30%; bottom: 6%; display: grid; place-items: center; font: calc(var(--cw) * .62) / 1 "Segoe UI Symbol", "Apple Symbols", Archivo, sans-serif;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .9), 0 3px 6px rgba(0, 0, 0, .18); }
.ace::before { content: ""; position: absolute; left: 50%; top: 50%; width: 74%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px solid currentColor; opacity: .16; box-shadow: inset 0 0 0 calc(var(--cw) * .025) rgba(255, 214, 120, .25); }
.ace i { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font: 700 calc(var(--cw) * .1) / 1 Archivo, sans-serif; font-style: normal; color: #fff; letter-spacing: -.02em; }
/* the court cards: a gold frame round a suit-tinted panel, the emblem in gold */
.court { position: absolute; left: 13%; right: 13%; top: 31%; bottom: 11%; border-radius: calc(var(--cw) * .05);
  border: calc(var(--cw) * .022) solid #c9a227;
  box-shadow: inset 0 0 0 calc(var(--cw) * .012) #fffaf0, inset 0 0 0 calc(var(--cw) * .024) currentColor, 0 1px 2px rgba(0, 0, 0, .15);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 236, 170, .55), rgba(255, 255, 255, 0) 62%),
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .04) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, .03) 0 2px, transparent 2px 6px); }
.red .court { background-color: rgba(198, 21, 47, .08); }
.blk .court { background-color: rgba(23, 25, 31, .07); }
.court svg { width: 50%; height: auto; fill: #d9a520; stroke: currentColor; stroke-width: .9; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.court b { font: 700 calc(var(--cw) * .34) / 1 Georgia, "Times New Roman", serif; text-shadow: 0 1px 0 #fff, 0 2px 0 rgba(201, 162, 39, .5); }
.court em { font: calc(var(--cw) * .17) / 1 "Segoe UI Symbol", Archivo, sans-serif; font-style: normal; }

/* the backs: 365 navy (the default), royal red, seaside - each with a printed white border */
.back {
  transform: rotateY(180deg); border: calc(var(--cw) * .045) solid #fbfaf4;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 55%),
    repeating-linear-gradient(45deg, rgba(34, 195, 238, .28) 0 2px, transparent 2px 10px),
    repeating-linear-gradient(-45deg, rgba(34, 195, 238, .28) 0 2px, transparent 2px 10px),
    linear-gradient(155deg, #17447a, #0a2245);
  box-shadow: 0 0 0 1px #cfc9b8, inset 0 0 0 calc(var(--cw) * .02) rgba(255, 214, 120, .55), 0 1px 1px rgba(0, 0, 0, .28), 0 3px 9px rgba(0, 0, 0, .16);
}
.back::after {
  content: "365"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 4% 9%; border-radius: 999px; background: #0a2245; border: 2px solid var(--cyan);
  color: var(--cyan); font: 700 calc(var(--cw) * .2) / 1 Archivo, sans-serif; letter-spacing: -.03em; box-shadow: 0 0 10px rgba(34, 195, 238, .45);
}
body.back-royal .back {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 220, 140, .22), rgba(255, 255, 255, 0) 50%),
    radial-gradient(circle at 0 0, rgba(255, 214, 120, .35) 0 2px, transparent 3px) 0 0 / 12px 12px,
    radial-gradient(circle at 6px 6px, rgba(255, 214, 120, .22) 0 3px, transparent 4px) 0 0 / 12px 12px,
    linear-gradient(155deg, #8e1d2c, #4a0712);
}
body.back-royal .back::after { background: #4a0712; border-color: #e3b44a; color: #ffd98a; box-shadow: 0 0 10px rgba(255, 214, 120, .45); }
body.back-sea .back {
  background:
    radial-gradient(circle at 50% 38%, #ffe7a3 0 12%, rgba(255, 200, 90, .45) 13%, transparent 28%),
    repeating-radial-gradient(ellipse at 50% 120%, rgba(255, 255, 255, .22) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #ff9a6a 0%, #ffcf8a 30%, #2aa3c4 52%, #0b5e86 100%);
}
body.back-sea .back::after { background: #0b5e86; border-color: #fff3c4; color: #fff3c4; top: 66%; box-shadow: 0 0 10px rgba(255, 243, 196, .5); }

/* the board turns instant while it is laid out again (resize, first draw) */
.instant .card, .instant .card .flip { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .card, .card .flip { transition-duration: .01s !important; } .card .wig { animation: none !important; } .card.shine .front::after { animation: none; display: none; } }
/* Extra effects switched off (a slower PC, or a quieter table): no lifting, tilting or shine */
body.nofx .card.fly .wig, body.nofx .card.pop .wig { animation: none; }
body.nofx .card.shine .front::after { display: none; }

/* the tables: two more - oak and night */
body.felt-oak {
  --felt-a: #8a5a2b; --felt-b: #3d220c; --primary: #7a4a1e; --bar: rgba(30, 16, 4, .6);
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 220, 170, .22), rgba(0, 0, 0, .5)),
    repeating-linear-gradient(91deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 9px, rgba(255, 255, 255, .04) 9px 11px, transparent 11px 23px),
    linear-gradient(180deg, #7a4a22, #5a3416);
  background-color: #4a2a10;
}
body.felt-night {
  --felt-a: #1b2350; --felt-b: #060918; --primary: #2b3a8a; --bar: rgba(4, 6, 20, .6);
  background: radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .7), transparent 60%), radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1.5px 1.5px at 42% 8%, rgba(255, 240, 200, .7), transparent 60%), radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(120% 90% at 50% 30%, #1f2a60, #060918);
  background-color: #060918;
}
body.felt-oak::before, body.felt-night::before { opacity: .12; }

/* floating points and the score's little bump */
.chip span.bump { animation: bump .4s ease-out; }
@keyframes bump { 35% { transform: scale(1.28); color: var(--gold); } 100% { transform: none } }
.floatpts { position: fixed; z-index: 3900; pointer-events: none; transform: translate(-50%, 0); font: 700 24px/1 Archivo, sans-serif; color: #ffd76a;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 0 12px rgba(255, 200, 80, .6); animation: floatpts 1.1s ease-out forwards; }
@keyframes floatpts { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8) } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1) } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1) } }
#spark { position: fixed; inset: 0; z-index: 3800; pointer-events: none; }
#winBig { position: fixed; left: 50%; top: 22%; z-index: 4600; transform: translate(-50%, -50%); pointer-events: none; text-align: center;
  font: 600 clamp(48px, 9vw, 110px)/1 "Clash Display", Archivo, sans-serif; color: #ffe08a; letter-spacing: .02em;
  text-shadow: 0 4px 0 #8a5a00, 0 0 40px rgba(255, 200, 80, .8), 0 0 90px rgba(255, 160, 40, .5); animation: winBig 1s cubic-bezier(.2, 1.4, .4, 1) both; }
#winBig[hidden] { display: none; }
#winBig small { display: block; margin-top: 10px; font: 700 clamp(16px, 2.2vw, 24px)/1.2 Archivo, sans-serif; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); letter-spacing: 0; }
@keyframes winBig { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-6deg) } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) } }
.backs { display: flex; gap: 10px; }
.backs button { width: 34px; height: 46px; border-radius: 6px; border: 3px solid transparent; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.backs button[aria-pressed="true"] { border-color: var(--sheet-ink); }

/* ---------- messages ---------- */
#toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 4000; transform: translate(-50%, 30px); opacity: 0;
  padding: 12px 20px; border-radius: 14px; background: rgba(8, 20, 12, .92); color: #fff; font: 700 17px/1.3 Archivo, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#stuck {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 3500; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding: 12px 14px 12px 20px; border-radius: 16px;
  background: var(--sheet); color: var(--sheet-ink); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px); font-weight: 700;
}
#stuck[hidden] { display: none; }

/* ---------- the pop-up sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px; background: rgba(2, 12, 6, .55); backdrop-filter: blur(3px); }
.scrim[hidden] { display: none; }
.sheet {
  width: min(560px, 100%); max-height: calc(100% - 8px); overflow: auto; padding: 24px 24px 20px; border-radius: 20px;
  background: var(--sheet); color: var(--sheet-ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); -webkit-user-select: text; user-select: text;
}
.sheet h2 { margin: 0 0 4px; font: 600 28px/1.15 "Clash Display", Archivo, sans-serif; text-wrap: balance; }
.sheet p { margin: 0 0 12px; }
.sheet .soft { color: var(--sheet-soft); font-size: 15px; }
.sheet .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px;
  border: 2px solid var(--sheet-line); background: #fff; color: var(--sheet-ink); font: 700 17px/1.1 Archivo, sans-serif; cursor: pointer;
}
.btn:hover { border-color: #c9c3b3; }
.btn.go { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.go:hover { filter: brightness(1.08); }
.btn.wide { flex: 1 1 200px; }
.choice { display: grid; gap: 10px; margin-top: 14px; }
.choice .btn { justify-content: flex-start; text-align: left; min-height: 64px; }
.choice .btn small { display: block; font-weight: 500; font-size: 14px; color: var(--sheet-soft); margin-top: 3px; }
.choice .btn.go small { color: rgba(255, 255, 255, .85); }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: #ece8dc; gap: 4px; }
.seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; font: 700 16px Archivo, sans-serif; color: var(--sheet-ink); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.set { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--sheet-line); }
.set:first-of-type { border-top: 0; }
.set label { font-weight: 700; }
.set small { display: block; color: var(--sheet-soft); font-weight: 500; font-size: 14px; }
.sw { position: relative; flex: none; width: 58px; height: 34px; border-radius: 999px; border: 0; background: #cfcab9; cursor: pointer; transition: background .2s; }
.sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.sw[aria-checked="true"] { background: var(--primary); }
.sw[aria-checked="true"]::after { transform: translateX(24px); }
.felts { display: flex; gap: 10px; }
.felts button { width: 42px; height: 42px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.felts button[aria-pressed="true"] { border-color: var(--sheet-ink); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; }
.tile { padding: 12px 10px; border-radius: 14px; background: #f0ede3; text-align: center; }
.tile b { display: block; font: 700 26px/1.1 Archivo, sans-serif; font-variant-numeric: tabular-nums; }
.tile span { font-size: 14px; color: var(--sheet-soft); }
@media (max-width: 460px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sheet { padding: 20px 16px 16px; } }
.badges { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.badges li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #fff4cf; color: #5a4200; font-weight: 700; }
.badges li::before { content: "\2605"; color: #e0a600; font-size: 20px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0 2px; text-align: center; }
.week div { padding: 8px 0 6px; border-radius: 10px; background: #f0ede3; font-size: 13px; color: var(--sheet-soft); }
.week div b { display: block; font-size: 20px; line-height: 1.2; color: #c9c3b3; }
.week div.won b { color: var(--primary); }
.week div.today { outline: 2px solid var(--primary); }
.how { margin: 8px 0 0; padding-left: 20px; }
.how li { margin: 0 0 8px; }
.foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--sheet-line); font-size: 14px; color: var(--sheet-soft); }
.foot a { color: var(--primary); font-weight: 700; }

#fx { position: fixed; inset: 0; z-index: 4500; pointer-events: none; }
#fx.on { pointer-events: auto; cursor: pointer; }
#fxhint { position: fixed; left: 50%; bottom: 22px; z-index: 4600; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-weight: 700; pointer-events: none; }
#fxhint[hidden] { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* FreeCell's free cells and Spider's finished runs */
.slot.cell { border-style: dashed; }
.slot.cell::after { content: ""; }
.slot.done { border-color: rgba(255, 210, 87, .35); color: rgba(255, 210, 87, .45); font-size: calc(var(--cw) * .2); }
.slot.stock .left { position: absolute; right: 6%; bottom: 4%; font: 700 calc(var(--cw) * .18) / 1 Archivo, sans-serif; color: rgba(255, 255, 255, .7); }

/* ---------- 4 Oct 2026: difficulty levels in New game (Solitaire) - a card per level, stars for how hard ---------- */
.lvls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 2px; }
.lvls button {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px 13px; min-height: 92px; text-align: left;
  border-radius: 16px; border: 2px solid var(--sheet-line); background: #fff; color: var(--sheet-ink); cursor: pointer; overflow: hidden;
  font: 700 18px/1.1 Archivo, sans-serif; transition: transform .16s ease, border-color .16s, box-shadow .2s, background .2s;
  animation: lvIn .42s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i, 0) * 55ms);
}
.lvls button:hover { transform: translateY(-2px); border-color: #c9c3b3; box-shadow: 0 8px 18px rgba(20, 40, 30, .12); }
.lvls button small { font: 500 14px/1.35 Archivo, sans-serif; color: var(--sheet-soft); }
.lvls .lvtop { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.lvls .lvst { display: inline-flex; gap: 3px; }
.lvls .lvst i { width: 13px; height: 13px; background: #ddd8ca; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.lvls .lvst i.on { background: linear-gradient(160deg, #ffe08a, #e0a400); }
.lvls button[aria-pressed="true"] { border-color: var(--primary); background: linear-gradient(160deg, #ffffff, #eef7f1); box-shadow: 0 0 0 2px var(--primary) inset, 0 10px 24px rgba(20, 108, 58, .18); }
.lvls button[aria-pressed="true"]::after {   /* a slow shine across the chosen level */
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); animation: lvShine 2.8s ease-in-out infinite;
}
@keyframes lvIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes lvShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (max-width: 460px) { .lvls { grid-template-columns: 1fr; } .lvls button { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .lvls button { animation: none; } .lvls button[aria-pressed="true"]::after { display: none; } }
body.nofx .lvls button { animation: none; } body.nofx .lvls button[aria-pressed="true"]::after { display: none; }
/* the deck can't be turned over again (Hard / Expert): a quiet cross instead of the turn-over arrow */
.slot.stock .spent { display: grid; place-items: center; width: 100%; height: 100%; font: 700 calc(var(--cw) * .32) / 1 Archivo, sans-serif; color: rgba(255, 255, 255, .45); }
/* a phone: Full screen gives way to Games (phones rarely use it, and iPhones can't) */
@media (max-width: 480px) { #bFull { display: none; } }

/* ---------- 4 Oct 2026: challenges and the Hall of Fame (Solitaire) ---------- */
.chalh { margin: 18px 0 0; font: 700 13px/1 Archivo, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--sheet-soft); }
.chals { margin-top: 8px; }
.btn.hofbtn { background: linear-gradient(180deg, #fff3c4, #ffd257 60%, #e8b030); border-color: #d9a520; color: #2a1d00; }
.btn.hofbtn small { color: #5a4300 !important; }
.btn.hofbtn:hover { filter: brightness(1.05); border-color: #b8860b; }
/* the challenge clock, over the table */
.chal {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; pointer-events: none;
  background: rgba(8, 20, 40, .82); color: #fff; border: 1px solid rgba(255, 210, 87, .55); box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 18px rgba(255, 210, 87, .2);
  font: 700 15px/1 Archivo, sans-serif; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: chalIn .4s cubic-bezier(.2, .9, .3, 1.2);
}
.chal[hidden] { display: none; }
.chal .ci { font-size: 18px; }
.chal b { font: 800 22px/1 Archivo, sans-serif; font-variant-numeric: tabular-nums; color: #ffd257; min-width: 3.2ch; }
.chal .cl { color: #cfd8ef; font-weight: 600; }
.chal.hurry { border-color: #ff6b6b; box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 22px rgba(255, 90, 90, .45); animation: chalIn .4s, chalPulse 1s ease-in-out infinite; }
.chal.hurry b { color: #ff8a8a; }
.chal.done { opacity: .85; border-color: rgba(255, 255, 255, .3); box-shadow: none; animation: none; }
.chal.done b { color: #cfd8ef; }
@keyframes chalIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes chalPulse { 0%, 100% { transform: translate(-50%, 0) scale(1); } 50% { transform: translate(-50%, 0) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .chal, .chal.hurry { animation: none; } }
/* the Journey (4 Oct 2026): its button in New game, and its goals pill while a level is played */
.btn.jourbtn { background: linear-gradient(135deg, #1d97e3, #0d5f9a); border-color: #0d5f9a; color: #fff; }
.btn.jourbtn small { color: rgba(255, 255, 255, .88) !important; }
.btn.jourbtn:hover { filter: brightness(1.07); }
.chal.jour { gap: 12px; border-color: rgba(127, 232, 255, .55); box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 18px rgba(127, 232, 255, .2); }
.chal.jour .cl { font-size: 14px; }
@media (max-width: 480px) { .chal.jour { gap: 8px; padding: 7px 12px 7px 10px; font-size: 13px; max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; } .chal.jour .cl { font-size: 12.5px; } }
