/* Studio site. Game pages sit on the game's felt (Kings Corner: green
   baize, cream cards, brass); the studio's own pages (body.studio) on navy,
   the colour of the Large Print deck. One reading column, wider on the two
   home pages (body.wide). Fonts are self-hosted (OFL): no third-party
   requests. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next.woff") format("woff");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Serif";
  src: url("fonts/roboto-serif-700.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f2f5f1;
  --surface: #ffffff;
  --ink: #15211b;
  --muted: #4d5d54;
  --line: #d3dcd5;
  --felt: #1e5b3a;
  --felt-deep: #143f28;
  --on-felt: #f4f1e8;
  --gold: #e0a82e;
  --brass: #9a6b12;
  --red: #a3122b;
  --good: #1d7443;
  --bad: #b3261e;
  --card: #fbfaf6;
  --back: #8e1426;
  --band: radial-gradient(circle at 30% 0%, #2e7a4e, var(--felt) 45%, var(--felt-deep));
  --display: "Roboto Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible Next", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
body.studio {
  --bg: #eef0f4;
  --line: #d2d7e1;
  --muted: #4e5668;
  --ink: #161b28;
  --navy: #22305a;
  --navy-deep: #151d38;
  --band: repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 16px),
          repeating-linear-gradient(-45deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 16px),
          radial-gradient(circle at 15% 0%, #33437a, var(--navy) 50%, var(--navy-deep));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1712; --surface: #16231b; --ink: #eef3ee; --muted: #a7b7ad; --line: #2b3b32;
    --felt-deep: #10301f; --gold: #f2c14e; --brass: #f2c14e;
    --red: #ff8f8f; --good: #7bd88f; --bad: #ff8a80; color-scheme: dark;
  }
  :root:not([data-theme="light"]) body.studio { --bg: #10131b; --surface: #191e2a; --ink: #eef0f5; --muted: #a9b0c0; --line: #2d3446; }
  :root:not([data-theme="light"]) body.studio main .btn { background: var(--gold); color: #241a05; }
}
:root[data-theme="dark"] {
  --bg: #0e1712; --surface: #16231b; --ink: #eef3ee; --muted: #a7b7ad; --line: #2b3b32;
  --felt-deep: #10301f; --gold: #f2c14e; --brass: #f2c14e;
  --red: #ff8f8f; --good: #7bd88f; --bad: #ff8a80; color-scheme: dark;
}
:root[data-theme="dark"] body.studio { --bg: #10131b; --surface: #191e2a; --ink: #eef0f5; --muted: #a9b0c0; --line: #2d3446; }
:root[data-theme="dark"] body.studio main .btn { background: var(--gold); color: #241a05; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 19px/1.6 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

/* Header: brand and a short menu, then the page's heading. */
.band { background: var(--band); color: var(--on-felt); }
.band-inner, main, .foot-inner {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wide .band-inner, .wide main, .wide .foot-inner { max-width: 66rem; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1.1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font: 700 1.1rem/1.1 var(--display); text-decoration: none; }
.brand svg { width: 2.3rem; height: 2.3rem; flex: none; }
.top { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.top a { font-weight: 700; font-size: .95rem; text-decoration: none; padding: .45rem 0; border-bottom: 2px solid transparent; }
.top a:hover { border-bottom-color: var(--gold); }
.hero { display: grid; gap: 2rem; padding-block: 1.75rem 2.25rem; }
.hero h1 {
  font: 700 clamp(2.1rem, 6.5vw, 3.3rem)/1.08 var(--display);
  letter-spacing: -.01em;
  margin: 0 0 .7rem;
  text-wrap: balance;
}
.hero p { margin: 0; max-width: 36rem; font-size: 1.08rem; color: color-mix(in srgb, var(--on-felt) 88%, transparent); }
.hero .actions { margin-top: 1.5rem; }
.hero-aside { display: flex; justify-content: center; }
.wide .hero { padding-block: 2.5rem 3rem; }
@media (min-width: 54rem) {
  .hero.has-aside { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 3rem; }
  .wide .hero { padding-block: 3.5rem 4rem; }
}

/* Buttons and the store note. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
  padding: 0 1.35rem;
  border-radius: 12px;
  background: var(--gold);
  color: #241a05;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: color-mix(in srgb, var(--gold) 85%, #fff); }
.btn.store { background: var(--felt); color: var(--on-felt); }
main .btn { background: var(--felt); color: var(--on-felt); }
.studio main .btn { background: var(--navy); }
main .btn:hover { background: var(--felt-deep); }
.studio main .btn:hover { background: var(--navy-deep); }
.soon {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
  padding: 0 1.1rem;
  border-radius: 12px;
  border: 2px dashed color-mix(in srgb, currentColor 45%, transparent);
  font-weight: 700;
  font-size: .95rem;
}
main .soon { color: var(--muted); border-color: var(--line); }

/* Reading column. */
main { padding-block: 2.25rem 3.5rem; }
h2 { font: 700 1.6rem/1.2 var(--display); margin: 2.75rem 0 .6rem; text-wrap: balance; }
main > h2:first-child { margin-top: .5rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 .3rem; }
p, li { max-width: 65ch; }
ul { padding-left: 1.3rem; }
li + li { margin-top: .35rem; }
.lede { font-size: 1.1rem; }
.muted { color: var(--muted); }
mark { background: color-mix(in srgb, var(--gold) 35%, transparent); color: inherit; padding: 0 .2em; border-radius: 3px; }
.summary {
  border: 2px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.summary ul { margin: .4rem 0 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
th { font-size: .8rem; letter-spacing: .02em; color: var(--muted); }

/* Phone screenshots: the game as it looks in the hand. */
.phone {
  width: min(16.5rem, 72vw);
  padding: .5rem;
  border-radius: 2.3rem;
  background: #0b120e;
  box-shadow: 0 1.6rem 3rem -1rem rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .09);
  flex: none;
}
.phone img { display: block; width: 100%; border-radius: 1.85rem; }
.hero-aside .phone { transform: rotate(3deg); }
.shot { margin: 0; }
.shot img { display: block; width: 100%; max-width: 22rem; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 1rem 2rem -1.2rem rgba(0, 0, 0, .35); }
.split { display: grid; gap: 1.75rem; align-items: center; }
.split .phone { justify-self: center; width: min(14rem, 52vw); }
@media (min-width: 46rem) {
  .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; }
}

/* A real sequence: sealed, played, checked. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.5rem; min-height: 2.6rem; margin: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--felt);
  color: var(--on-felt);
  font: 700 1.15rem/1 var(--display);
}
.steps strong { display: block; font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 2rem; margin: 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .45em;
  width: 1.1rem;
  height: .6rem;
  border-left: 3px solid var(--good);
  border-bottom: 3px solid var(--good);
  transform: rotate(-45deg);
}

/* Studio home: a fanned hand in the hero, one row per game. */
.fan { position: relative; width: 17rem; height: 18.5rem; margin-inline: auto; }
.pc {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10.5rem;
  aspect-ratio: 5 / 7;
  margin-left: -5.25rem;
  border-radius: 14px;
  transform-origin: 50% 115%;
  transform: rotate(var(--r));
  box-shadow: 0 1.2rem 2rem -1rem rgba(0, 0, 0, .6);
}
.pc.back {
  border: 7px solid var(--card);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .2) 0 2px, transparent 2px 11px),
    var(--back);
}
.pc.b1 { --r: -22deg; }
.pc.b2 { --r: -9deg; }
.pc.face {
  --r: 6deg;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .6rem;
  background: var(--card);
  color: #141414;
  text-decoration: none;
}
.pc.face svg { width: 4.6rem; height: 4.6rem; }
.pc.face .name { font: 700 1.15rem/1.1 var(--display); }
.pc.face .idx { position: absolute; top: .55rem; left: .7rem; font: 700 1.25rem/1 var(--display); text-align: center; }
.pc.face .red { color: #a3122b; }
.pc.face:hover, .pc.face:focus-visible { --r: 3deg; }
@media (prefers-reduced-motion: no-preference) {
  .pc { transition: transform .25s ease; animation: deal .75s cubic-bezier(.2, .8, .2, 1) both; }
  .pc.b2 { animation-delay: .08s; }
  .pc.face { animation-delay: .16s; }
  @keyframes deal { from { transform: translateY(1.5rem) rotate(0deg); opacity: 0; } }
}
@media (max-width: 30rem) {
  .fan { width: 14rem; height: 15rem; }
  .pc { width: 8.6rem; margin-left: -4.3rem; border-radius: 12px; }
  .pc.face svg { width: 3.6rem; height: 3.6rem; }
}

.feature {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: 22px;
  background: var(--surface);
  border: 2px solid var(--line);
}
.feature .phone { justify-self: center; width: min(13rem, 60vw); }
.feature h3 { font: 700 clamp(1.6rem, 4vw, 2rem)/1.15 var(--display); margin: 0 0 .4rem; }
.feature h3 a { text-decoration: none; }
.feature .lede { margin: 0; }
.feature .more { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; margin: 1rem 0 0; }
@media (min-width: 46rem) {
  .feature { grid-template-columns: auto minmax(0, 1fr); gap: 2.75rem; padding: 2rem 2.5rem; }
}
.principles { display: grid; gap: .5rem 2rem; }
.principles h3 { font: 700 1.2rem/1.25 var(--display); margin: 1rem 0 .3rem; }
.principles p { margin: 0; }
@media (min-width: 46rem) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Contact page. */
.contact .email-line { font-size: 1.2rem; font-weight: 700; margin: 0 0 .5rem; overflow-wrap: anywhere; }
.contact .muted { margin: 0; }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1.5rem; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }

/* Footer. */
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot-inner { padding-block: 1.75rem 2.75rem; }
.foot-inner p { margin: 0 0 .8rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }

/* Verify page */
label { display: block; font-weight: 700; margin-bottom: .4rem; }
textarea, input[type="text"] {
  width: 100%;
  font: .9rem/1.45 var(--mono);
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
}
textarea { min-height: 11rem; resize: vertical; }
input[type="text"] { font: 1.1rem var(--body); }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: .9rem; }
button {
  font: 700 1.05rem var(--body);
  min-height: 3.2rem;
  padding: 0 1.4rem;
  border-radius: 12px;
  border: 0;
  background: var(--felt);
  color: var(--on-felt);
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.checks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .6rem; }
.check { display: grid; grid-template-columns: 1.8rem 1fr; gap: .5rem; align-items: start; }
.check svg { width: 1.6rem; height: 1.6rem; margin-top: .1rem; }
.check.ok svg { color: var(--good); }
.check.bad svg { color: var(--bad); }
.check strong { display: block; }
.check code { font: .8rem/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.verdict { font: 700 1.3rem/1.3 var(--display); margin: 1.5rem 0 0; }
.verdict.ok { color: var(--good); }
.verdict.bad { color: var(--bad); }
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr)); gap: .4rem; margin-top: .6rem; }
.card {
  background: #fbfaf6;
  color: #141414;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  padding: .35rem 0;
  font: 700 1rem/1 var(--body);
  font-variant-numeric: tabular-nums;
}
.card.red { color: #a3122b; }
.card small { display: block; font: 400 .65rem/1 var(--body); color: #5a5a5a; margin-top: .2rem; }
@media (prefers-reduced-motion: no-preference) {
  .checks li { animation: rise .25s ease-out both; }
  @keyframes rise { from { transform: translateY(4px); } to { transform: none; } }
}

/* Rules pages: inline card chips, the table layout, questions. */
.pip {
  display: inline-block;
  min-width: 2.1em;
  padding: 0 .3em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfaf6;
  color: #141414;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
  white-space: nowrap;
}
.pip.red { color: #a3122b; }
.layout { margin: 1.5rem 0; }
.layout .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  max-width: 26rem;
  padding: .8rem;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 30%, #2e7a4e, var(--felt) 60%, var(--felt-deep));
  border: 8px solid #4a2f1f;
}
.layout .spot {
  min-height: 4.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  border-radius: 9px;
  color: var(--on-felt);
  font: 700 .85rem/1.2 var(--body);
  text-align: center;
}
.layout .side { background: rgba(255, 255, 255, .1); }
.layout .corner { border: 2px dashed color-mix(in srgb, var(--gold) 80%, transparent); }
.layout .stock { background: #7a1d2b; }
.layout figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; max-width: 30rem; }
details { border-top: 1px solid var(--line); padding: .6rem 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: .5rem 0 0; }

