/* The name is Wick: a Monte Carlo card room at midnight. Green felt, black tuxedo, brass, ivory cards, claret.
   Always dark: it is midnight in there whatever the phone's setting says. */
@font-face { font-family: Limelight; font-display: swap; src: url(fonts/limelight.woff2) format("woff2"); }
@font-face { font-family: Jost; font-weight: 400; font-display: swap; src: url(fonts/jost-400.woff2) format("woff2"); }
@font-face { font-family: Jost; font-weight: 600; font-display: swap; src: url(fonts/jost-600.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 700; font-display: swap; src: url(fonts/bodoni-700.woff2) format("woff2"); }
:root { --felt: #0f3d2e; --felt-deep: #0a2a20; --black: #0b0d0c; --brass: #c8a04a; --brass-hi: #e6c779; --ivory: #f3ead7; --claret: #8f2535; --soft: #b9c7bd; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(120% 80% at 50% 0%, #14493a 0%, var(--felt-deep) 55%, var(--black) 100%) fixed var(--felt-deep); color: var(--ivory);
  font: 400 17px/1.5 Jost, "Helvetica Neue", Arial, sans-serif; min-height: 100dvh; }
main { max-width: 760px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); }
h1, h2 { font-family: Limelight, Georgia, serif; font-weight: 400; margin: 0; color: var(--brass-hi); }
h1 { font-size: clamp(40px, 11vw, 84px); line-height: 1.02; margin-top: 4vh; }
h2 { font-size: 24px; line-height: 1.15; }
p { margin: 0; }
a { color: var(--brass-hi); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ivory); outline-offset: 3px; }

button { font: inherit; font-weight: 600; color: var(--ivory); background: transparent; border: 1.5px solid var(--brass); border-radius: 6px; min-height: 48px; padding: 0 18px; cursor: pointer; }
button.brass { background: linear-gradient(#e2c06f, #b98f3a); color: #1a1405; border-color: #e6c779; }
button:disabled { opacity: 0.38; cursor: default; }
button.link { border: 0; min-height: 44px; padding: 0 4px; text-decoration: underline; font-weight: 400; color: var(--soft); }

/* Title screen */
.catch { font-size: clamp(19px, 3.4vw, 24px); margin: 18px 0 14px; max-width: 30ch; color: var(--ivory); }
.prologue { color: var(--soft); max-width: 58ch; }
.missions { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); counter-reset: mission; }
.missions li { counter-increment: mission; }
.missions button { width: 100%; height: 100%; text-align: left; display: grid; gap: 2px; padding: 12px 14px; background: rgba(0, 0, 0, 0.28); border-color: rgba(200, 160, 74, 0.5); font-weight: 400; }
.missions b { font-family: Limelight, Georgia, serif; font-weight: 400; font-size: 19px; color: var(--brass-hi); }
.missions b::before { content: counter(mission) ". "; }
.missions span { color: var(--soft); font-size: 15px; }
.missions i { font-style: normal; font-size: 14px; color: var(--brass); }
.missions button[aria-pressed="true"] { border-color: var(--ivory); background: rgba(0, 0, 0, 0.5); }
.missions button:disabled b { color: var(--soft); }
#begin { min-width: 220px; }
.fine { color: var(--soft); font-size: 14px; margin-top: 22px; }

/* Table screen */
.boss { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; }
.initial { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 400 30px/1 Limelight, Georgia, serif; color: #1a1405;
  background: radial-gradient(circle at 35% 30%, #f0d88f, #b98f3a 70%); border: 2px solid #7a5d1f; }
.boss-who p { color: var(--soft); font-size: 15px; }
.bank { grid-column: 1 / -1; }
.bank p { font-size: 15px; color: var(--soft); display: flex; justify-content: space-between; }
.bank b, .purse b, .stake b { color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.bar { height: 10px; border: 1px solid var(--brass); border-radius: 5px; overflow: hidden; background: rgba(0, 0, 0, 0.4); }
.bar span { display: block; height: 100%; background: var(--claret); transition: width 0.4s ease; }
.plaque { margin: 12px 0; padding: 8px 12px; border: 1px solid var(--brass); border-radius: 4px; background: rgba(0, 0, 0, 0.35); font-size: 15px; color: var(--brass-hi); }
.talk { min-height: 86px; padding: 10px 12px; border-left: 3px solid var(--claret); background: rgba(0, 0, 0, 0.3); display: grid; gap: 4px; align-content: start; }
.talk b, dialog b { color: var(--brass-hi); font-weight: 600; }
.talk .wick b { color: var(--ivory); }

.felt { margin: 14px 0; padding: 16px 12px; border-radius: 120px / 40px; background: radial-gradient(90% 100% at 50% 40%, #17523f, var(--felt) 70%); border: 3px solid #7a5d1f;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35), inset 0 0 40px rgba(0, 0, 0, 0.45); display: grid; gap: 8px; justify-items: center; text-align: center; }
.who { font-size: 15px; color: var(--soft); margin-bottom: 6px; }
.who b { color: var(--ivory); font-size: 17px; }
.print { font-family: Limelight, Georgia, serif; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(230, 199, 121, 0.75); font-size: clamp(15px, 3.6vw, 20px); margin-top: 6px; }
.print.small { font-size: clamp(11px, 2.6vw, 13px); margin-top: 0; }
.cards { display: flex; justify-content: center; min-height: 92px; padding-left: 22px; }
.card { width: 62px; height: 90px; margin-left: -22px; border-radius: 7px; background: var(--ivory); color: #14110c; border: 1px solid #b9ad92; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  display: grid; grid-template-rows: auto auto 1fr; justify-items: start; padding: 5px 7px; flex: none; }
.card i { font-style: normal; font-size: 15px; line-height: 1; margin-top: 1px; }
.card b { font: 700 24px/1 "Bodoni Moda", Georgia, serif; }
.card span { font-size: 26px; line-height: 1; justify-self: end; align-self: end; }
.card.red { color: var(--claret); }
.card.back { border: 3px solid var(--ivory); background-color: var(--claret);
  background-image: repeating-linear-gradient(45deg, rgba(243, 234, 215, 0.28) 0 2px, transparent 2px 9px), repeating-linear-gradient(-45deg, rgba(243, 234, 215, 0.28) 0 2px, transparent 2px 9px); }
.dealt { animation: slide 0.28s ease-out both; }
@keyframes slide { from { transform: translate(40px, -60px) rotate(8deg); opacity: 0; } }
.hands { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 8px; }
.hand { padding: 6px 8px; border-radius: 10px; border: 1.5px solid transparent; }
.hand.active { border-color: var(--brass-hi); background: rgba(0, 0, 0, 0.18); }
.wager { color: var(--soft); }
.tag { margin-left: 8px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--soft); color: var(--ivory); font-size: 13px; font-weight: 600; }
.tag.up { background: var(--brass); border-color: var(--brass); color: #1a1405; }
.tag.down { background: var(--claret); border-color: var(--claret); }

.result { min-height: 28px; text-align: center; font-weight: 600; font-size: 19px; color: var(--brass-hi); }
.controls { display: grid; gap: 10px; margin-top: 8px; }
.stake { text-align: center; }
.stake span { color: var(--soft); font-size: 14px; }
.chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.chip { width: 60px; height: 60px; min-height: 0; padding: 0; border-radius: 50%; border: 4px dashed var(--ivory); background: var(--claret); font-variant-numeric: tabular-nums; }
.chip:nth-child(2) { background: #1d4f7a; } .chip:nth-child(3) { background: #14110c; } .chip:nth-child(4) { background: #5b3a86; }
.buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.buttons.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .buttons.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.purse { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(200, 160, 74, 0.4); }

dialog { width: min(92vw, 480px); border: 2px solid var(--brass); border-radius: 10px; background: var(--felt-deep); color: var(--ivory); padding: 22px; }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h2 { margin-bottom: 12px; }
dialog p { margin-bottom: 8px; }
dialog button { margin-top: 10px; width: 100%; }
.doc { max-width: 64ch; } .doc h1 { font-size: 40px; } .doc h2 { margin: 22px 0 6px; } .doc p, .doc ul { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { .dealt { animation: none; } .bar span { transition: none; } }
