/* Rainbow Yatzy · marketing site
   Visual language from the app (RainbowYatzy/UI/Theme.swift): a private games
   table. Espresso leather, an oxblood scorebook, petrol felt in a lacquered
   walnut frame, brass fittings and ivory inlays. The red, green and blue dice
   are the only saturated colours on the page.
   Written with logical properties (inline/block) so right-to-left languages work. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/jost-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/jost-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/jost-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-greek-wght-normal.woff2) format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-vietnamese-wght-normal.woff2) format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
/* Serif numerals only, like the gold figures in the app's scorebook. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/fraunces-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0024,U+0030-0039,U+002B,U+002C,U+002E,U+002F,U+00A3,U+20AC; }

/* ---------- Tokens ---------- */
:root {
  --espresso: #140D0A;
  --leather: #24170F;
  --leather-2: #33221A;
  --oxblood: #4A1519;
  --oxblood-deep: #2E0C0F;
  --brass-light: #F6E2A8;
  --brass: #C99A4B;
  --brass-dark: #7D5A24;
  --gold: #E3BD6E;
  --ivory: #F3E8D0;
  --ink: #2A1A12;
  --red: #E0262B;
  --green: #1AA64A;
  --blue: #2463E0;
  --text: var(--ivory);
  --text-2: rgb(243 232 208 / .68);
  --text-3: rgb(243 232 208 / .42);
  --hairline: rgb(227 189 110 / .18);

  --gold-foil: linear-gradient(180deg, #F8E3AE 0%, #E3BD6E 48%, #B98A3E 100%);
  --brass-fill: linear-gradient(180deg, #F6E2A8, #E2C27C 40%, #C99A4B 75%, #A77A35);
  --bone-fill: linear-gradient(180deg, #FBF4E3, #ECDFC2);
  --rainbow: linear-gradient(90deg, var(--red), var(--green), var(--blue));

  --font-display: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-num: "Fraunces", "New York", ui-serif, Georgia, serif;

  --wrap: 1180px;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--espresso);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The room: espresso leather in warm lamplight, with a little grain. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, #3A2418 0%, rgb(58 36 24 / 0) 60%),
    radial-gradient(120% 90% at 50% 120%, #24160F 0%, #120B08 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--noise); opacity: .14; mix-blend-mode: overlay;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--brass-light); }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.1; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgb(227 189 110 / .35); color: #fff; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 40px); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ivory); color: var(--ink); font-weight: 600; }
.skip:focus { top: 12px; }

.num { font-family: var(--font-num); font-variant-numeric: lining-nums tabular-nums; font-optical-sizing: auto; }
.gold { background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.smallcaps {
  font-family: var(--font-display); font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow--rule::after { content: ""; width: 48px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }

/* The name: an all-caps sans in gold foil. Swap the name in _config.yml. */
.wordmark {
  font-family: var(--font-display); font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em;
  background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgb(0 0 0 / .35)) drop-shadow(0 10px 24px rgb(0 0 0 / .35));
}
.wordmark--hero { position: relative; font-size: clamp(2.9rem, 1.4rem + 6.2vw, 6.4rem); line-height: .98; margin-block: 22px 18px; text-wrap: balance; margin-inline-end: -.16em; }
.wordmark--sm { font-size: 1.05rem; letter-spacing: .22em; filter: none; }
.rainbow-rule { display: block; width: 84px; height: 3px; border-radius: 3px; background: var(--rainbow); margin-block-end: 26px; box-shadow: 0 0 18px rgb(36 99 224 / .35); }

/* ---------- Buttons ---------- */
.btn {
  --h: 54px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 0 26px; border: 0; border-radius: 16px;
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 600; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--sm { --h: 40px; padding: 0 16px; border-radius: 12px; font-size: .9rem; }
/* Matte bone inlay with a gold hairline just inside the edge. */
.btn--bone {
  color: var(--ink); background: var(--bone-fill);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -2px 0 rgb(150 120 74 / .28), 0 8px 18px -6px rgb(0 0 0 / .65), 0 2px 4px rgb(0 0 0 / .35);
}
.btn--bone::after { content: ""; position: absolute; inset: 4px; border-radius: inherit; border: 1px solid rgb(160 120 50 / .38); pointer-events: none; }
.btn--sm.btn--bone::after { inset: 3px; border-radius: 9px; }
.btn--bone:hover { color: var(--ink); filter: brightness(1.04); transform: translateY(-1px); }
.btn--ghost { color: var(--ivory); background: rgb(36 23 15 / .55); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .35); }
.btn--ghost:hover { color: var(--brass-light); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .7); }

.store-badge { display: inline-block; border-radius: 12px; transition: transform .2s var(--ease); }
.store-badge img { height: 56px; width: auto; }
.store-badge:hover { transform: translateY(-1px); }
.store-soon {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px;
  border-radius: 16px; color: var(--ivory); font-weight: 600;
  background: linear-gradient(180deg, #3A1216, #26090C);
  box-shadow: inset 0 0 0 1px rgb(227 189 110 / .45), inset 0 0 0 5px #2E0C0F, inset 0 0 0 6px rgb(227 189 110 / .18), 0 10px 22px -8px rgb(0 0 0 / .7);
}
.store-soon svg { color: var(--gold); }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.is-scrolled { background: rgb(20 13 10 / .78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--hairline); }
.nav__inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory); text-decoration: none; }
.brand:hover { color: var(--ivory); }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .24em; text-transform: uppercase; }
.mark { filter: drop-shadow(0 3px 6px rgb(0 0 0 / .5)); flex: none; }
.nav__links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav__links a { color: var(--text-2); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ivory); }
.nav__cta { margin-inline-start: 6px; }
.page-privacy .nav__cta, .page-support .nav__cta, .page-404 .nav__cta { margin-inline-start: auto; }
@media (max-width: 920px) { .nav__links { display: none; } .nav__cta { margin-inline-start: auto; } }
@media (max-width: 420px) { .brand__name { font-size: .8rem; letter-spacing: .18em; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(24px, 5vw, 60px) clamp(40px, 6vw, 80px); isolation: isolate; }
.lamp { position: absolute; inset: -120px 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background: radial-gradient(48% 46% at 72% 40%, rgb(227 189 110 / .13), transparent 70%), radial-gradient(40% 40% at 20% 20%, rgb(74 21 25 / .45), transparent 70%); }
.lamp--soft { height: 600px; opacity: .7; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero__tagline { text-wrap: balance; font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); font-weight: 400; color: var(--ivory); letter-spacing: .01em; }
.hero__lede { margin-block-start: 18px; max-width: 34em; color: var(--text-2); font-size: 1.08rem; }
.hero__lede em { font-style: normal; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-block-start: 34px; }
.hero__note { margin-block-start: 16px; color: var(--text-3); font-size: .9rem; }

.hero__stage { position: relative; height: clamp(520px, 52vw, 680px); perspective: 1600px; }
.phone {
  position: absolute; inset-inline-start: 50%; top: 50%; width: clamp(250px, 23vw, 310px); aspect-ratio: 581 / 1259;
  padding: 11px; border-radius: 52px;
  background: linear-gradient(145deg, #5C4636, #2B1D15 30%, #1A110C 60%, #4A3628);
  box-shadow: inset 0 0 0 1.5px rgb(246 226 168 / .28), inset 0 0 0 4px #0B0705, 0 50px 90px -30px rgb(0 0 0 / .9), 0 30px 60px -20px rgb(0 0 0 / .6), -30px 40px 80px -40px rgb(74 21 25 / .8);
  transform: translate(-50%, -50%) rotateY(-14deg) rotateX(6deg) rotateZ(2deg);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
[dir="rtl"] .phone { transform: translate(50%, -50%) rotateY(14deg) rotateX(6deg) rotateZ(-2deg); }
.phone::after { content: ""; position: absolute; inset: 11px; border-radius: 42px; pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / .16) 0%, rgb(255 255 255 / .03) 28%, transparent 40%); }
.phone__screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #000; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Glossy dice in real 3D (drawn by assets/js/dice3d.js) */
.cube-wrap { --cs: 84px; position: absolute; width: var(--cs); height: var(--cs); animation: float 7s ease-in-out infinite alternate; z-index: 2; }
.cube-wrap--a { --cs: 92px; top: 6%; inset-inline-start: 2%; animation-delay: -2s; }
.cube-wrap--b { --cs: 74px; top: 40%; inset-inline-end: 0%; animation-duration: 8s; }
.cube-wrap--c { --cs: 108px; bottom: 4%; inset-inline-start: 10%; animation-delay: -4s; animation-duration: 9s; }
.die3d { position: absolute; left: 50%; top: 50%; width: 175%; height: 175%; translate: -50% -50%; pointer-events: none; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .45)); }
.cube-wrap .die--fallback { --s: 100%; width: 100%; height: 100%; rotate: -12deg; }
.cube-wrap.has-3d .die--fallback { display: none; }
.cube-shadow { position: absolute; inset-inline: 10%; bottom: -38%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .55), transparent); filter: blur(4px); animation: shadow 7s ease-in-out infinite alternate; animation-delay: inherit; animation-duration: inherit; }
@keyframes float { from { translate: 0 -10px; } to { translate: 0 14px; } }
@keyframes shadow { from { opacity: .5; scale: .8; } to { opacity: .9; scale: 1; } }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; }
  .rainbow-rule { margin-inline: auto; }
  .wordmark--hero { margin-inline-end: 0; padding-inline-start: .16em; }
  .eyebrow--rule::before { content: ""; width: 48px; height: 1px; background: linear-gradient(-90deg, var(--gold), transparent); }
  .hero__actions { justify-content: center; }
  .hero__lede { margin-inline: auto; }
  .hero__stage { height: 560px; margin-block-start: 10px; }
  .phone { width: 250px; transform: translate(-50%, -50%) rotateY(-8deg) rotateX(4deg); }
  .cube-wrap--a { inset-inline-start: calc(50% - 210px); }
  .cube-wrap--b { inset-inline-end: calc(50% - 200px); }
  .cube-wrap--c { inset-inline-start: calc(50% - 170px); }
}
@media (max-width: 480px) {
  .hero__stage { height: 500px; }
  .phone { width: 224px; }
  .cube-wrap--a { --cs: 70px; inset-inline-start: 2%; }
  .cube-wrap--b { --cs: 58px; inset-inline-end: 2%; }
  .cube-wrap--c { --cs: 80px; inset-inline-start: 6%; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(70px, 10vw, 130px); }
.section__head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-block-end: clamp(36px, 5vw, 60px); }
.section__head .eyebrow::before, .section__head .eyebrow::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.section__head .eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }
.section__title { margin-block-start: 16px; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.35rem); letter-spacing: -.01em; text-wrap: balance; max-width: 18em; }
.section__intro { margin-block-start: 18px; max-width: 40em; color: var(--text-2); font-size: 1.08rem; text-wrap: pretty; }
.section + .section::before { content: ""; position: absolute; top: 0; inset-inline: 50% auto; translate: -50% 0; width: min(560px, 70%); height: 1px; background: linear-gradient(90deg, transparent, var(--hairline), transparent); }
[dir="rtl"] .section + .section::before { translate: 50% 0; }

/* Leather: oxblood with a tooled gold border, as used for the scorebook. */
.leather {
  position: relative;
  background: radial-gradient(120% 90% at 50% 0%, #5D1C21 0%, #3F1216 55%, #2A0B0E 100%);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgb(255 190 170 / .14), inset 0 -10px 24px rgb(0 0 0 / .35), 0 0 0 1px #0D0605, 0 24px 50px -18px rgb(0 0 0 / .8);
}
.leather::before, .leather::after { content: ""; position: absolute; pointer-events: none; border-radius: calc(var(--radius) - 5px); }
.leather::before { inset: 5px; border: 1px solid rgb(227 189 110 / .42); }
.leather::after { inset: 9px; border: 1px dashed rgb(227 189 110 / .2); border-radius: calc(var(--radius) - 9px); }
.leather > * { position: relative; z-index: 1; }

/* ---------- Dice (2D, as in the app's menus) ---------- */
.die {
  --s: 46px; --p: 18%;
  position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 22%;
  background: var(--die-face);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 calc(var(--s) * -.05) calc(var(--s) * .1) rgb(0 0 0 / .18), 0 calc(var(--s) * .07) 0 var(--die-side), 0 calc(var(--s) * .14) calc(var(--s) * .22) rgb(0 0 0 / .55);
}
.die::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(85% 60% at 25% 15%, rgb(255 255 255 / .45), transparent 52%); pointer-events: none; }
.die--red   { --die-face: linear-gradient(140deg, #FF5A4E, #E0262B 48%, #B8181D); --die-side: #7E0E12; }
.die--green { --die-face: linear-gradient(140deg, #4FD87F, #1AA64A 48%, #128A3B); --die-side: #0A5424; }
.die--blue  { --die-face: linear-gradient(140deg, #5E92FF, #2463E0 48%, #1A4FBE); --die-side: #0F3383; }
.die--ivory { --die-face: linear-gradient(140deg, #FFFBF1, #F1E7D1 50%, #DCCCA9); --die-side: #A48F68; }
.die--lg { --s: clamp(40px, 9vw, 74px); }
.pip {
  position: absolute; width: var(--p); height: var(--p); translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #FFFFFF, #F3E8D0 60%, #D9C9A6);
  box-shadow: inset 0 1px 1.5px rgb(0 0 0 / .35), 0 .5px 0 rgb(255 255 255 / .35);
}
.die--ivory .pip { background: radial-gradient(circle at 50% 40%, #4A3324, #2A1A12); box-shadow: inset 0 1px 1px rgb(0 0 0 / .6), 0 .5px 0 rgb(255 255 255 / .6); }
.die[data-v="1"] .pip { --p: 22%; }
.pip--tl { left: 27%; top: 27%; } .pip--tr { left: 73%; top: 27%; }
.pip--ml { left: 27%; top: 50%; } .pip--mr { left: 73%; top: 50%; }
.pip--c  { left: 50%; top: 50%; }
.pip--bl { left: 27%; top: 73%; } .pip--br { left: 73%; top: 73%; }
/* Pip positions are physical, not mirrored, in right-to-left languages. */
.cube .pip, .die .pip { direction: ltr; }
/* Small flat die used as a pictogram in the scorecard. */
.die--glyph { --s: 15px; --p: 20%; background: none; box-shadow: inset 0 0 0 1.2px currentColor; border-radius: 26%; }
.die--glyph::before { display: none; }
.die--glyph .pip { background: currentColor; box-shadow: none; }
.die--glyph[data-v="1"] .pip { --p: 24%; }

/* ---------- Playable demo ---------- */
.board { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.board__card { padding: 18px 16px 16px; }
.board__status { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 10px 14px; color: var(--text-2); }
.board__status b { font-family: var(--font-num); font-weight: 600; font-size: 1.15rem; color: var(--ivory); }
.board__total b { font-size: 1.6rem; background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px;
  min-height: clamp(64px, 6.4vw, 86px); padding: 10px 2px 9px; border: 0; border-radius: 12px; cursor: pointer;
  color: var(--text-3);
  background: linear-gradient(180deg, #1D0608, #2B0B0E 70%, #3A1115);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / .6), inset 0 0 0 1px rgb(0 0 0 / .35), 0 1px 0 rgb(255 190 170 / .08);
  transition: transform .18s var(--ease), box-shadow .18s, background .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
}
.tile__label { font-family: var(--font-display); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; }
.tile__label::after { content: ""; display: block; width: 18px; height: 2px; margin: 4px auto 0; border-radius: 2px; background: transparent; }
.tile--red .tile__label::after { background: var(--red); }
.tile--green .tile__label::after { background: var(--green); }
.tile--blue .tile__label::after { background: var(--blue); }
.tile--colour-full .tile__label::after, .tile--flush .tile__label::after { background: var(--rainbow); }
.tile__score { font-size: clamp(1.25rem, 1rem + .9vw, 1.6rem); font-weight: 600; line-height: 1; color: inherit; min-height: 1em; }
.tile__score:empty::before { content: "–"; opacity: .5; font-family: var(--font-body); font-weight: 300; }
/* Live preview: a bone inlay showing what the dice would score now. */
.tile.is-option { color: var(--ink); background: var(--bone-fill); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgb(150 120 74 / .3), 0 6px 12px -6px rgb(0 0 0 / .8); }
.tile.is-option:hover { transform: translateY(-2px); }
.tile.is-zero .tile__score { opacity: .45; }
.tile.is-zero { color: var(--text-3); }
/* Scored: written in the book in ivory, no longer tappable. */
.tile.is-scored { cursor: default; color: var(--ivory); }
.tile.is-scored .tile__score { color: var(--ivory); text-shadow: 0 1px 0 rgb(0 0 0 / .6); }
.tile.is-scored.is-fresh .tile__score { animation: ink-in .6s var(--ease); }
.tile.is-selected { color: var(--ivory); background: linear-gradient(180deg, #4E171C, #2E0C0F); box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 0 3px rgb(227 189 110 / .18), 0 10px 22px -10px rgb(227 189 110 / .6); transform: translateY(-2px); }
.tile.is-selected .tile__score { background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile:disabled { cursor: default; }
@keyframes ink-in { from { opacity: 0; transform: scale(1.4); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

.bonus { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 8px 10px; color: var(--text-2); }
.bonus .smallcaps { font-size: .62rem; white-space: nowrap; }
.bonus__track { flex: 1; height: 6px; border-radius: 6px; background: rgb(0 0 0 / .45); box-shadow: inset 0 1px 2px rgb(0 0 0 / .6); overflow: hidden; }
.bonus__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brass-fill); transition: width .6s var(--ease); }
.bonus__value { font-size: .95rem; white-space: nowrap; }
.bonus__value b { color: var(--ivory); font-weight: 600; }
.bonus__chip { padding: 2px 8px; border-radius: 8px; font-size: .72rem; font-weight: 700; color: var(--ink); background: var(--brass-fill); opacity: .45; transition: opacity .3s; }
.bonus__chip.is-won { opacity: 1; box-shadow: 0 0 14px rgb(227 189 110 / .6); }

/* The tray: lacquered walnut around petrol felt, with the keep rack below. */
.board__table { position: relative; }
.tray {
  position: relative; padding: 16px; border-radius: 26px;
  background:
    repeating-linear-gradient(97deg, rgb(255 255 255 / .025) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(93deg, rgb(0 0 0 / .08) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, #6A3420 0%, #3D1B0F 40%, #2A1109 100%);
  box-shadow: inset 0 1px 0 rgb(255 200 160 / .28), inset 0 -3px 8px rgb(0 0 0 / .5), 0 0 0 1px #0B0503, 0 30px 60px -24px rgb(0 0 0 / .9);
}
.tray__plate {
  position: absolute; z-index: 3; inset-inline-start: 50%; translate: -50% -50%; top: 16px;
  padding: 3px 14px; border-radius: 8px; color: #3A2410; white-space: nowrap;
  background: linear-gradient(180deg, #F6E2A8, #E2C27C 40%, #B88A3E 80%, #9A7330);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 2px 5px rgb(0 0 0 / .6);
}
[dir="rtl"] .tray__plate { translate: 50% -50%; }
.tray__plate .smallcaps { font-size: .62rem; letter-spacing: .24em; }
.tray__plate b { font-weight: 700; }
.tray__plate--kept { top: auto; bottom: calc(16px + var(--rack-h, 82px) + 12px); translate: -50% 50%; }
[dir="rtl"] .tray__plate--kept { translate: 50% 50%; }
.felt {
  position: relative; aspect-ratio: 1.3; border-radius: 14px; overflow: hidden;
  background: radial-gradient(90% 85% at 50% 42%, #2F5552 0%, #1D3A39 48%, #0C1B1B 100%);
  box-shadow: inset 0 6px 18px rgb(0 0 0 / .7), inset 0 0 0 1px rgb(0 0 0 / .6);
}
.felt::before { content: ""; position: absolute; inset: 0; background-image: var(--noise); opacity: .35; mix-blend-mode: overlay; }
.felt__seal { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.felt__seal span {
  display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px dashed rgb(0 0 0 / .22); box-shadow: 0 0 0 10px transparent, 0 0 0 11px rgb(0 0 0 / .14);
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: .12em; color: rgb(0 0 0 / .2);
  text-shadow: 0 1px 0 rgb(255 255 255 / .05);
}
.felt__hint { position: absolute; inset-inline: 0; bottom: 14px; text-align: center; color: rgb(243 232 208 / .38); font-size: .62rem; letter-spacing: .3em; transition: opacity .3s; }
.felt__hint::before, .felt__hint::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-inline: 10px; vertical-align: middle; background: currentColor; opacity: .6; }
.rack {
  --rack-h: 82px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; height: var(--rack-h); margin-block-start: 26px; padding: 10px;
  border-radius: 14px;
  background: radial-gradient(120% 120% at 50% 0%, #5A1B20, #3A1014 60%, #250A0C);
  box-shadow: inset 0 0 0 1px rgb(227 189 110 / .25), inset 0 4px 10px rgb(0 0 0 / .6);
  position: relative;
}
.rack::before { content: ""; position: absolute; inset-inline: 2px; top: -14px; height: 4px; border-radius: 4px; background: var(--brass-fill); box-shadow: 0 2px 4px rgb(0 0 0 / .6); }
.rack::after { content: ""; position: absolute; inset: 5px; border-radius: 10px; border: 1px dashed rgb(227 189 110 / .25); pointer-events: none; }
.rack__slot { border-radius: 10px; background: rgb(0 0 0 / .22); box-shadow: inset 0 2px 5px rgb(0 0 0 / .55); }

.dice-layer { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.dice-layer .die {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  transition: transform .45s var(--ease), opacity .3s;
  will-change: transform;
}
.dice-layer .die.is-rolling { transition: none; }
.dice-layer .die.is-out { opacity: 0; }
.dice-layer .die:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.board__actions { display: flex; gap: 12px; margin-block-start: 16px; }
.btn--action { flex: 1; --h: 64px; justify-content: space-between; padding: 0 22px; font-size: 1.12rem; }
.btn--action:disabled { cursor: default; filter: saturate(.6) brightness(.75); transform: none; }
.rolls { display: inline-flex; gap: 6px; }
.rolls i { width: 13px; height: 13px; border-radius: 50%; background: var(--brass-fill); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 1px 2px rgb(0 0 0 / .4); transition: opacity .3s, filter .3s; }
.rolls i.is-used { background: #D8CBAE; box-shadow: inset 0 1px 2px rgb(0 0 0 / .35); }
.btn__stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn__stack .smallcaps { font-size: .6rem; color: rgb(42 26 18 / .6); }
.btn__num { font-size: 1.9rem; font-weight: 600; }
.board__msg { min-height: 1.6em; margin-block-start: 14px; color: var(--text-2); font-size: .95rem; text-align: center; }
.board__msg a { white-space: nowrap; }

.gameover { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgb(12 7 5 / .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: var(--radius); }
.gameover[hidden] { display: none; }
.gameover__card { width: min(440px, 100%); padding: 40px 30px 30px; text-align: center; animation: rise .6s var(--ease); }
.gameover__score { margin-block: 12px 10px; font-size: 4.4rem; font-weight: 600; line-height: 1; background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gameover__body { color: var(--text-2); }
.gameover__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block-start: 24px; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .board { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .board__table { order: 2; }
}
@media (max-width: 420px) {
  .board__card { padding: 14px 10px 12px; }
  .grid { gap: 4px; }
  .tile { min-height: 58px; padding: 7px 1px 6px; border-radius: 10px; }
  .tile__label { font-size: .52rem; letter-spacing: .08em; }
  .tray { padding: 12px; }
  .rack { --rack-h: 64px; gap: 5px; padding: 7px; }
  .tray__plate--kept { bottom: calc(12px + 64px + 12px); }
  .tray__plate:not(.tray__plate--kept) { top: 12px; }
}

/* ---------- Modes ---------- */
.modes__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 980px; margin-inline: auto; }
.mode {
  position: relative; padding: 34px 32px 34px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(51 34 26 / .9), rgb(36 23 15 / .9));
  box-shadow: inset 0 0 0 1px rgb(227 189 110 / .18), inset 0 1px 0 rgb(255 220 180 / .08), 0 24px 50px -24px rgb(0 0 0 / .8);
}
.mode--rainbow { background: radial-gradient(120% 90% at 50% 0%, #5D1C21, #3F1216 55%, #2A0B0E); box-shadow: inset 0 0 0 1.5px rgb(227 189 110 / .6), inset 0 0 0 6px #33100F, inset 0 0 0 7px rgb(227 189 110 / .2), 0 24px 50px -24px rgb(0 0 0 / .8); }
.mode__dice { display: flex; gap: 10px; margin-block-end: 26px; }
.mode__dice .die { --s: 44px; }
.mode__dice .die:nth-child(1) { rotate: -6deg; } .mode__dice .die:nth-child(3) { rotate: 7deg; }
.mode__name { font-size: 2rem; letter-spacing: .02em; }
.mode__meta { margin-block: 8px 16px; color: var(--gold); }
.mode p:last-child { color: var(--text-2); }
@media (max-width: 760px) { .modes__grid { grid-template-columns: 1fr; } }

/* ---------- Rainbow combos ---------- */
.combos { display: grid; gap: 16px; max-width: 980px; margin-inline: auto; }
.combo {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 22px 26px; border-radius: 20px;
  background: linear-gradient(90deg, rgb(29 58 57 / .55), rgb(36 23 15 / .55) 45%);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 18px 40px -26px rgb(0 0 0 / .9);
}
.combo__roll { display: flex; gap: 8px; padding: 14px 16px; border-radius: 14px; background: radial-gradient(90% 90% at 50% 40%, #2F5552, #1D3A39 55%, #0C1B1B); box-shadow: inset 0 3px 10px rgb(0 0 0 / .6), 0 0 0 4px #3D1B0F, 0 0 0 5px rgb(255 200 160 / .15); }
.combo__roll .die { --s: 40px; }
.combo__roll .die:nth-child(2n) { rotate: 4deg; } .combo__roll .die:nth-child(3n) { rotate: -5deg; }
.combo__text h3 { font-size: 1.3rem; margin-block-end: 6px; }
.combo__text p { color: var(--text-2); }
.score-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 76px; padding: 10px 12px; border-radius: 14px; color: var(--ink); background: var(--bone-fill); box-shadow: inset 0 1px 0 #fff, 0 8px 16px -8px rgb(0 0 0 / .8); }
.score-chip .smallcaps { font-size: .58rem; letter-spacing: .16em; opacity: .7; }
.score-chip b { font-size: 1.9rem; font-weight: 600; line-height: 1; }
.combo--flush .combo__roll { box-shadow: inset 0 3px 10px rgb(0 0 0 / .6), 0 0 0 4px #3D1B0F, 0 0 0 5px rgb(255 200 160 / .15), 0 0 40px rgb(36 99 224 / .35); }
.rainbow__note { display: block; text-wrap: balance; margin-block-start: 28px; color: var(--text-3); font-size: .95rem; text-align: center; }
.rainbow-dot { display: inline-block; vertical-align: -1px; margin-inline-end: 10px; width: 10px; height: 10px; border-radius: 50%; background: conic-gradient(var(--red) 0 33%, var(--green) 0 66%, var(--blue) 0); }
@media (max-width: 860px) {
  .combo { grid-template-columns: 1fr auto; gap: 18px; padding: 20px; }
  .combo__roll { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 400px) { .combo__roll { gap: 5px; padding: 12px; } .combo__roll .die { --s: 36px; } }

/* ---------- Features ---------- */
.features__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature { padding: 28px 24px 26px; border-radius: 20px; background: linear-gradient(180deg, rgb(51 34 26 / .6), rgb(36 23 15 / .35)); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .12); transition: transform .3s var(--ease), box-shadow .3s; }
.feature:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .3), 0 20px 40px -24px rgb(0 0 0 / .9); }
.feature__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-block-end: 20px; border-radius: 50%; color: var(--gold);
  background: radial-gradient(circle at 50% 30%, #4E171C, #2A0B0E); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .5), inset 0 0 0 4px #2E0C0F, inset 0 0 0 5px rgb(227 189 110 / .18), 0 8px 16px -6px rgb(0 0 0 / .8); }
.feature__icon .icon { width: 28px; height: 28px; }
.feature h3 { font-size: 1.14rem; margin-block-end: 8px; }
.feature p { color: var(--text-2); font-size: .96rem; }
@media (max-width: 1040px) { .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .features__grid { grid-template-columns: 1fr; gap: 12px; }
  .feature { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 20px 18px; }
  .feature__icon { grid-row: span 2; width: 48px; height: 48px; margin: 0; }
  .feature__icon .icon { width: 24px; height: 24px; }
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 900px; margin-inline: auto; align-items: stretch; }
.plan { padding: 38px 34px 34px; border-radius: var(--radius); background: linear-gradient(180deg, rgb(51 34 26 / .85), rgb(36 23 15 / .85)); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .18), 0 24px 50px -24px rgb(0 0 0 / .8); }
.plan__name { color: var(--gold); font-size: .78rem; }
.plan__price { margin-block: 14px 4px; font-size: clamp(3rem, 2.2rem + 3vw, 4.4rem); font-weight: 600; line-height: 1; }
.plan__price .num { font-weight: 600; }
.plan__price--word { font-family: var(--font-display); font-weight: 500; letter-spacing: .01em; }
.plan__caption { color: var(--text-2); }
.plan__list { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-block-start: 1px solid var(--hairline); display: grid; gap: 12px; }
.plan__list li { display: flex; gap: 12px; align-items: flex-start; }
.plan__list .icon { flex: none; width: 20px; height: 20px; margin-block-start: 3px; color: var(--gold); stroke-width: 2.2; }
.plan--full { padding: 38px 34px 34px; background: radial-gradient(120% 90% at 50% 0%, #5D1C21 0%, #3F1216 55%, #2A0B0E 100%); box-shadow: inset 0 1px 0 rgb(255 190 170 / .14), 0 0 0 1px #0D0605, 0 0 0 1px rgb(227 189 110 / .3), 0 30px 60px -20px rgb(0 0 0 / .85), 0 0 80px -20px rgb(227 189 110 / .18); }
.plan--full .plan__price .num { font-size: 1.05em; filter: drop-shadow(0 3px 0 rgb(0 0 0 / .4)); }
.promise { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px; max-width: 900px; margin: 30px auto 0; padding: 22px 28px; border-radius: 18px; background: radial-gradient(90% 140% at 50% 50%, rgb(47 85 82 / .45), rgb(12 27 27 / .25)); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .2); }
.promise__title { color: var(--gold); }
.promise ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.promise li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.promise .icon { width: 22px; height: 22px; color: var(--gold); }
.pricing__note { margin-block-start: 18px; text-align: center; color: var(--text-3); font-size: .88rem; }
@media (max-width: 560px) { .promise ul { flex-direction: column; align-items: flex-start; } }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan, .plan--full { padding: 30px 24px 26px; } }

/* ---------- FAQ ---------- */
.faq__list { display: grid; gap: 10px; }
.qa { border-radius: 16px; background: linear-gradient(180deg, rgb(51 34 26 / .7), rgb(36 23 15 / .6)); box-shadow: inset 0 0 0 1px rgb(227 189 110 / .14); transition: box-shadow .25s; }
.qa[open] { box-shadow: inset 0 0 0 1px rgb(227 189 110 / .35); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.14rem; font-weight: 500; }
.qa summary::-webkit-details-marker { display: none; }
.qa__toggle { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(227 189 110 / .45); }
.qa__toggle::before, .qa__toggle::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 11px; height: 1.5px; translate: -50% -50%; background: var(--gold); transition: rotate .3s var(--ease); }
.qa__toggle::after { rotate: 90deg; }
.qa[open] .qa__toggle::after { rotate: 0deg; }
.qa p { padding: 0 24px 22px; color: var(--text-2); max-width: 62ch; }

/* ---------- Closing ---------- */
.closing { text-align: center; }
.closing__tray { display: inline-block; max-width: 100%; padding: 14px; border-radius: 26px; margin-block-end: 44px;
  background: repeating-linear-gradient(97deg, rgb(255 255 255 / .025) 0 2px, transparent 2px 7px), linear-gradient(180deg, #6A3420, #3D1B0F 40%, #2A1109);
  box-shadow: inset 0 1px 0 rgb(255 200 160 / .28), 0 0 0 1px #0B0503, 0 40px 70px -30px rgb(0 0 0 / .95); }
.closing__felt { display: flex; justify-content: center; gap: clamp(8px, 2vw, 18px); padding: clamp(20px, 4vw, 34px) clamp(14px, 5vw, 46px); border-radius: 14px;
  background: radial-gradient(90% 90% at 50% 40%, #2F5552, #1D3A39 50%, #0C1B1B); box-shadow: inset 0 6px 18px rgb(0 0 0 / .7); }
.closing__felt .die:nth-child(1) { rotate: -8deg; translate: 0 4px; }
.closing__felt .die:nth-child(2) { rotate: 5deg; translate: 0 -6px; }
.closing__felt .die:nth-child(3) { rotate: -3deg; }
.closing__felt .die:nth-child(4) { rotate: 9deg; translate: 0 5px; }
.closing__felt .die:nth-child(5) { rotate: -6deg; translate: 0 -3px; }
.closing__title { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); }
.closing__body { margin: 18px auto 0; max-width: 32em; color: var(--text-2); font-size: 1.1rem; }
.closing__actions { display: flex; justify-content: center; margin-block-start: 30px; }

/* ---------- Footer ---------- */
.footer { margin-block-start: 40px; padding-block: 50px 60px; border-block-start: 1px solid var(--hairline); background: linear-gradient(180deg, rgb(0 0 0 / .15), rgb(0 0 0 / .35)); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 26px 40px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__tag { color: var(--text-3); font-size: .9rem; margin-block-start: 4px; }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.footer__links a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.footer__links a:hover { color: var(--ivory); }
.footer__legal { grid-column: 1 / -1; color: var(--text-3); font-size: .78rem; line-height: 1.6; }
.lang { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--hairline); }
.lang select { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-size: .9rem; cursor: pointer; padding-inline-end: 4px; }
.lang option { background: var(--leather); color: var(--ivory); }
@media (max-width: 640px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Document pages (privacy, support, 404) ---------- */
.doc { position: relative; padding-block: clamp(40px, 7vw, 80px) 40px; isolation: isolate; }
.doc__head { text-align: center; margin-block-end: 36px; }
.doc__head .section__title { margin-inline: auto; }
.doc__body { --radius: 24px; padding: clamp(28px, 5vw, 56px); }
.doc__body h2 { font-size: 1.4rem; margin-block: 36px 12px; color: var(--ivory); }
.doc__body h2:first-child { margin-block-start: 0; }
.doc__body h3 { font-size: 1.08rem; margin-block: 24px 6px; }
.doc__body p { color: var(--text-2); margin-block-end: 12px; max-width: 66ch; }
.doc__body p strong { color: var(--ivory); }
.doc__updated { display: block; margin-block-end: 24px; color: var(--gold); }
.doc__lede { font-size: 1.12rem; color: var(--ivory) !important; }
.notfound { text-align: center; padding-block: 20px; }
.notfound p { margin-inline: auto; }
.notfound__dice { display: flex; justify-content: center; gap: 14px; margin-block-end: 26px; }
.notfound__dice .die { --s: 60px; }
.notfound__dice .die:nth-child(1) { rotate: -10deg; } .notfound__dice .die:nth-child(3) { rotate: 8deg; }
.die--blank { animation: wobble 2.6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { rotate: -6deg; } 50% { rotate: 12deg; translate: 0 -6px; } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Scores read left to right in every language. */
.bonus__value, .board__status b, .plan__price, .gameover__score { direction: ltr; unicode-bidi: isolate; }
