/* Hallmark · macrostructure: Workbench (the game is the page) · tone: luxury, old-money card room · anchor hue: baize green
 * theme: custom (vibe: "ivory stationery, baize, walnut, oxblood") · paper oklch(96.6% 0.013 88) · accent oklch(39% 0.115 20)
 * type: Libre Caslon Text 700 + Atkinson Hyperlegible Next · axes: light / roman-serif / warm · nav: N9 edge-aligned · footer: language index
 * pre-emit critique: P5 H4 E4 S5 R5 V4 · states: default hover focus active disabled */
@font-face { font-family: "Libre Caslon Text"; font-weight: 700; font-display: swap; src: url(/fonts/libre-caslon-text-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Libre Caslon Text"; font-weight: 700; font-display: swap; src: url(/fonts/libre-caslon-text-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: "Atkinson Next"; font-weight: 200 800; font-display: swap; src: url(/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Atkinson Next"; font-weight: 200 800; font-display: swap; src: url(/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF; }
:root {
  --color-paper: oklch(96.6% 0.013 88); --color-paper-2: oklch(92.6% 0.018 86); --color-rule: oklch(82% 0.025 84); --color-ink: oklch(25% 0.022 60); --color-ink-2: oklch(41% 0.024 62);
  --color-accent: oklch(39% 0.115 20); --color-accent-2: oklch(33% 0.105 20); --color-baize: oklch(41% 0.07 160); --color-baize-2: oklch(32% 0.06 162); --color-walnut: oklch(34% 0.05 48); --color-walnut-2: oklch(25% 0.04 45); --color-walnut-3: oklch(52% 0.07 52);
  --color-brass: oklch(78% 0.1 84); --color-card: oklch(99.4% 0.003 90); --color-red: oklch(50% 0.19 27); --color-slot: oklch(100% 0 0 / 0.26); --color-shade: oklch(15% 0.02 60 / 0.32); --color-veil: oklch(20% 0.04 162 / 0.86); --color-focus: oklch(52% 0.16 255);
  --font-display: "Libre Caslon Text", "Iowan Old Style", Palatino, Georgia, serif; --font-body: "Atkinson Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 48px; --radius: 8px; --ease-out: cubic-bezier(.2, .8, .25, 1); --deck: url(/img/cards.webp);
}
@media (max-width: 900px) { :root { --deck: url(/img/cards-s.webp); } }
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font: 400 19px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: clamp(12px, 2.4vw, 32px); }
.head { display: flex; align-items: center; gap: var(--space-xs) var(--space-lg); padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 27px/1 var(--font-display); letter-spacing: -.015em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; }
.games { display: flex; gap: 0 var(--space-lg); margin-inline: auto; }
.games a { padding: 10px 0 7px; border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; font-weight: 500; }
.games a:hover { border-color: var(--color-rule); } .games a[aria-current] { border-color: var(--color-accent); font-weight: 700; }
.lang { white-space: nowrap; font-size: 17px; color: var(--color-ink-2); }
.bar { display: flex; align-items: center; gap: var(--space-sm) 10px; flex-wrap: wrap; padding-block: 6px 14px; }
.bar h1 { flex: 1 1 260px; min-width: 0; margin: 0; font: 700 clamp(21px, 2vw, 26px)/1.2 var(--font-display); letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: balance; }
.stat { color: var(--color-ink-2); font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; } .stat b { color: var(--color-ink); font: 700 1.12em/1 var(--font-display); }
button, select { min-height: 46px; padding: 0 17px; border: 1.5px solid var(--color-ink); border-radius: var(--radius); background: var(--color-paper); color: var(--color-ink); font: 600 17px/1 var(--font-body); white-space: nowrap; cursor: pointer; }
button:hover:not(:disabled), select:hover { background: var(--color-paper-2); } button:active:not(:disabled) { transform: translateY(1px); } button:disabled { border-color: var(--color-rule); color: var(--color-ink-2); opacity: .62; cursor: default; }
#new, #again { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-paper); } #new:hover, #again:hover { background: var(--color-accent-2); }
.desk { max-width: 1180px; margin: 0 auto; padding: 11px; border-radius: 22px; background: linear-gradient(var(--color-walnut), var(--color-walnut-2)); box-shadow: inset 0 1.5px 0 var(--color-walnut-3), 0 22px 44px -26px var(--color-shade); }
.felt { padding: 20px 20px 14px; border-radius: 13px; background: url(/img/felt.svg), radial-gradient(110% 90% at 50% 0, var(--color-baize), var(--color-baize-2)); box-shadow: inset 0 0 0 1.5px var(--color-brass), inset 0 8px 26px var(--color-shade); }
#board { position: relative; direction: ltr; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; min-height: 56vh; }
.slot, .card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .065); }
.slot { border: 2px solid var(--color-slot); } .slot--f::after, .slot--stock::after { position: absolute; inset: 0; display: grid; place-items: center; font: 700 calc(var(--cw) * .42)/1 var(--font-display); color: var(--color-slot); content: "A"; }
.slot--stock { cursor: pointer; } .slot--stock::after { content: "↻"; } .spider .slot::after { content: none; } .spider .slot--f:not([data-p="f0"]) { border-color: transparent; } .br { display: none; }
.card { touch-action: none; perspective: 700px; } .card.up { cursor: grab; } .ready .card { transition: transform .2s var(--ease-out); } .ready .card i { transition: transform .24s var(--ease-out); } .ready .card.drag { transition: none; cursor: grabbing; } .card.deep { visibility: hidden; }
.card i { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 1px var(--color-shade), 0 2px 4px var(--color-shade); font-style: normal; }
.face { background: var(--color-card) var(--deck) calc(var(--r) * 100% / 12) calc(var(--s) * 100% / 3) / 1300% 400%; color: var(--color-ink); transform: rotateY(180deg); }
.back { background: var(--color-card) url(/img/back.svg) center / 100% 100%; } .card.up .face { transform: none; } .card.up .back { transform: rotateY(-180deg); }
.face b, .face u, .face em { display: none; font-style: normal; text-decoration: none; line-height: 1; position: absolute; font-family: var(--font-display); } .red .face { color: var(--color-red); }
/* small cards: large print, so every number reads on a phone; kings, queens and jacks keep their portraits */
.jumbo .face { background-image: none; } .jumbo .face b, .jumbo .face u, .jumbo .face em { display: block; }
.jumbo .face b { left: 6%; top: 4%; font-size: max(calc(var(--cw) * .4), 16px); letter-spacing: -.07em; } .jumbo .face u { right: 5%; top: 5%; font-size: max(calc(var(--cw) * .33), 13px); } .jumbo .face em { inset: auto 0 5%; text-align: center; font-size: calc(var(--cw) * .7); }
.jumbo .pic .face b { left: 9%; } .jumbo .pic .face em { inset: 35% 7% 5%; font-size: 0; border-radius: 2px; background: var(--deck) calc(var(--cw) * -1.287 * (var(--r) + .166)) calc(var(--cw) * -1.871 * (var(--s) + .119)) / calc(var(--cw) * 16.73) calc(var(--cw) * 7.484); }
.drag i { box-shadow: 0 0 0 1px var(--color-shade), 0 16px 28px var(--color-shade); } .hint i, .slot.hint { animation: glow .62s 2; } @keyframes glow { 50% { box-shadow: 0 0 0 5px var(--color-brass); } }
#won { position: fixed; inset: 0; z-index: 900; display: grid; place-content: center; justify-items: center; gap: var(--space-md); padding: var(--space-lg); background: var(--color-veil); color: var(--color-paper); text-align: center; } #won[hidden] { display: none; } #won strong { font: 700 clamp(44px, 9vw, 84px)/1.05 var(--font-display); color: var(--color-brass); } #won p { margin: 0; font: 700 24px/1.3 var(--font-display); }
.fan { --w: clamp(76px, 12vw, 120px); display: flex; margin-bottom: var(--space-lg); } .fan i { width: var(--w); aspect-ratio: 260 / 378; margin-inline: calc(var(--w) * -.2); border-radius: 7px; background: var(--color-card) var(--deck) 0 calc(var(--s) * 100% / 3) / 1300% 400%; box-shadow: 0 10px 22px var(--color-shade); transform-origin: 50% 130%; transform: rotate(calc((var(--s) - 1.5) * 12deg)); animation: fan .5s var(--ease-out) backwards; animation-delay: calc(var(--s) * 80ms); } @keyframes fan { from { transform: translateY(60px); opacity: 0; } }
.text { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-lg) var(--space-xl); padding-block: 64px var(--space-xl); } .text h2 { margin: 0 0 10px; font: 700 27px/1.2 var(--font-display); letter-spacing: -.01em; overflow-wrap: anywhere; } .text p { margin: 0; max-width: 62ch; text-wrap: pretty; }
.more a { display: block; padding: 14px 0; border-top: 1.5px solid var(--color-rule); font: 700 22px/1.2 var(--font-display); text-decoration: none; } .more a:hover { color: var(--color-accent); text-decoration: underline; }
footer { border-top: 1.5px solid var(--color-rule); background: var(--color-paper-2); padding-block: 36px 52px; } footer h2 { margin: 0 0 12px; font: 700 21px/1.2 var(--font-display); } footer ul { list-style: none; margin: 0; padding: 0; columns: 150px; } footer li a { display: inline-block; padding: 6px 0; text-decoration: none; white-space: nowrap; } footer li a:hover { text-decoration: underline; } footer li a[aria-current] { font-weight: 700; color: var(--color-accent); }
@media (min-width: 761px) and (max-width: 1060px) { .bar h1 { flex-basis: 100%; } .stat + .stat { margin-inline-end: auto; } }
@media (max-width: 760px) { .head { flex-wrap: wrap; padding-block: 8px 0; } .brand { font-size: 23px; } .brand svg { width: 28px; height: 28px; } .lang { margin-inline-start: auto; } .games { order: 3; flex-basis: 100%; margin: 0; gap: 0 18px; flex-wrap: wrap; } .games a { font-size: 17px; padding-top: 8px; }
  .bar { gap: 8px 6px; padding-block: 10px; } .bar h1 { flex: 1 1 0; font-size: 19px; } .stat { font-size: 15px; } .br { display: block; flex-basis: 100%; } .bar button { flex: 1 0 auto; padding: 0 8px; font-size: 15px; } .bar select { flex: 1 1 92px; min-width: 92px; width: 92px; padding: 0 6px; font-size: 15px; text-overflow: ellipsis; } .desk { padding: 0; border-radius: 0; } .felt { padding: 10px 6px; border-radius: 0; } .text { padding-top: 44px; } }
@media (prefers-reduced-motion: reduce) { .card, .card i { transition: none !important; } .hint i, .fan i { animation-duration: .01s; } }

.lang { position: relative; z-index: 30; } .lang summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--color-rule); border-radius: var(--radius); list-style: none; color: var(--color-ink); cursor: pointer; } .lang summary::-webkit-details-marker { display: none; } .lang summary:hover, .lang[open] summary { border-color: var(--color-ink); } .lang svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.langs { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); width: min(560px, calc(100vw - 24px)); max-height: min(72vh, 620px); overflow: auto; overscroll-behavior: contain; columns: 3 130px; column-gap: 4px; padding: 12px; border: 1.5px solid var(--color-ink); border-radius: var(--radius); background: var(--color-paper); box-shadow: 0 24px 40px -18px var(--color-shade); } .langs a { display: block; padding: 8px 12px; border-radius: 4px; color: var(--color-ink); text-decoration: none; white-space: nowrap; break-inside: avoid; } .langs a:hover { background: var(--color-paper-2); } .langs a[aria-current] { background: var(--color-accent); color: var(--color-paper); }
.help { display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid var(--color-ink); border-radius: var(--radius); font-weight: 700; text-decoration: none; } .help:hover { background: var(--color-paper-2); }
.text { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .text ol { counter-reset: step; display: grid; gap: 16px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 20px; } .text li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); max-width: 62ch; text-wrap: pretty; } .text li::before { content: counter(step); font: 700 27px/1.15 var(--font-display); color: var(--color-accent); } #how { scroll-margin-top: 20px; }
.fan i { background-position: calc(var(--r, 0) * 100% / 12) calc(var(--s) * 100% / 3); }
@media (max-width: 760px) { .text { grid-template-columns: minmax(0, 1fr); } .lang summary { min-height: 40px; padding: 0 11px; } .help { width: 40px; height: 40px; } }
.score { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin: 12px 0 0; color: oklch(95% .02 88 / .85); font-size: 18px; } .score b { font: 700 1.12em/1 var(--font-display); color: var(--color-paper); font-variant-numeric: tabular-nums; }
#day { display: inline-flex; align-items: center; gap: 9px; } #day svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; } .slot.off { opacity: .28; }
#hint[data-n]:not([data-n=""])::after { content: "\1F0CF\00A0" attr(data-n); margin-inline-start: 9px; } #joker { position: fixed; left: 50%; top: 46%; z-index: 800; width: clamp(150px, 18vw, 220px); height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--color-shade), 0 30px 60px -10px var(--color-shade); pointer-events: none; } #joker[hidden] { display: none; }
#cal, #sty { width: min(420px, calc(100vw - 24px)); padding: 24px; border: 1.5px solid var(--color-ink); border-radius: var(--radius); background: var(--color-paper); color: var(--color-ink); } #cal::backdrop, #sty::backdrop { background: var(--color-veil); } #cal h2 { margin: 0 0 14px; font: 700 27px/1.2 var(--font-display); } #cal p { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; } #cal div { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; } #cal i { font-style: normal; color: var(--color-ink-2); } #cal div button { min-height: 44px; padding: 0; border-color: var(--color-rule); } #cal .won { border-color: var(--color-baize); background: var(--color-baize); color: var(--color-paper); }
@media (max-width: 1180px) { #day span { display: none; } } @media (max-width: 760px) { .score { gap: 2px 16px; font-size: 15px; } #day { flex: 0 0 auto; padding: 0 10px; } }
#trail { position: fixed; inset: 0; z-index: 850; cursor: pointer; } #style svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; } button.help { padding: 0; }
[data-table="blue"] { --color-baize: oklch(44% .085 250); --color-baize-2: oklch(32% .075 255); } [data-table="wine"] { --color-baize: oklch(41% .1 15); --color-baize-2: oklch(29% .08 12); } [data-table="night"] { --color-baize: oklch(36% .014 260); --color-baize-2: oklch(25% .014 260); }
[data-back="blue"] .back { filter: hue-rotate(232deg) saturate(1.15); } [data-back="green"] .back { filter: hue-rotate(150deg) saturate(.8); } [data-back="black"] .back { filter: grayscale(1) brightness(.82); }
#sty div { display: flex; gap: 12px; } #sty div + div { margin-top: 18px; } .sw { flex: 1; min-height: 74px; padding: 0; border-color: var(--color-rule); } .sw-table[data-v="green"] { background: oklch(41% .07 160) !important; } .sw-table[data-v="blue"] { background: oklch(44% .085 250) !important; } .sw-table[data-v="wine"] { background: oklch(41% .1 15) !important; } .sw-table[data-v="night"] { background: oklch(36% .014 260) !important; }
.sw-back { background: url(/img/back.svg) center / 120% auto !important; } .sw-back[data-v="blue"] { filter: hue-rotate(232deg) saturate(1.15); } .sw-back[data-v="green"] { filter: hue-rotate(150deg) saturate(.8); } .sw-back[data-v="black"] { filter: grayscale(1) brightness(.82); }
.sw-cards { min-height: 120px; background: white !important; color: oklch(20% 0 0); } .sw-cards[data-v="classic"] { background: white var(--deck) calc(11 * 100% / 12) 0 / auto 400% !important; } .sw-cards[data-v="classic"] { flex: 0 0 84px; } .sw-cards[data-v="big"] { flex: 0 0 84px; } .sw-cards[data-v="big"]::after { content: "Q\2660\FE0E"; font: 700 34px/1 var(--font-display); }
[data-table="green"] .sw-table[data-v="green"], [data-table="blue"] .sw-table[data-v="blue"], [data-table="wine"] .sw-table[data-v="wine"], [data-table="night"] .sw-table[data-v="night"], [data-back="red"] .sw-back[data-v="red"], [data-back="blue"] .sw-back[data-v="blue"], [data-back="green"] .sw-back[data-v="green"], [data-back="black"] .sw-back[data-v="black"], [data-cards="classic"] .sw-cards[data-v="classic"], [data-cards="big"] .sw-cards[data-v="big"] { outline: 3px solid var(--color-brass); outline-offset: 2px; }
@media (max-width: 760px) { .games { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); } }
.slot--q, .slot--o { display: none; } .games { flex-wrap: wrap; justify-content: center; gap: 0 20px; } .games a { font-size: 18px; }
@media (max-width: 1340px) { #day span { display: none; } } @media (max-width: 760px) { .games { justify-content: flex-start; flex-wrap: nowrap; } .games a { font-size: 17px; } .bar .help { flex: 0 0 40px; } .bar h1 { flex: 1 1 0; } }
