:root {
  color-scheme: dark;
  --charcoal: #13151b;
  --slate: #1d2029;
  --cream: #f5f4ed;
  --gray: #b0b4c2;
  --mint: #c5f277;
  --lilac: #d3c2ff;
  --color-bg: var(--charcoal);
  --color-surface: var(--slate);
  --color-text: var(--cream);
  --color-muted: var(--gray);
  --color-accent: var(--mint);
  --color-border: #383d4a;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --content-width: 1200px;
  --radius: 8px;
  --button-bg: var(--color-accent);
  --button-text: var(--charcoal);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 1rem/1.6 var(--font-body); }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: .25em; }
button { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--lilac); outline-offset: 5px; }
button:hover, a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; }
.shell { width: min(var(--content-width), calc(100% - 5rem)); margin-inline: auto; }
.skip-link { position: fixed; top: .75rem; left: 1rem; padding: .75rem 1rem; background: var(--color-accent); color: var(--charcoal); z-index: 50; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--color-border); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.brand { display: inline-flex; align-items: center; gap: .7rem; font: 800 1.65rem/1 var(--font-display); letter-spacing: -.06em; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.header-nav { display: flex; align-items: center; gap: var(--space-4); font-size: .9rem; }
.header-nav a { text-decoration: none; padding-block: .75rem; }
.header-nav a:hover { color: var(--color-accent); }
.header-note { color: var(--color-muted); font: .7rem/1.4 monospace; letter-spacing: .12em; text-transform: uppercase; }
.opening { display: flex; align-items: end; justify-content: space-between; gap: var(--space-6); padding-block: 3.5rem 2.5rem; }
.eyebrow { font: 700 .72rem/1.5 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent); margin-bottom: .8rem; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); letter-spacing: -.065em; margin-bottom: 0; }
.opening-copy { max-width: 290px; color: var(--color-muted); margin-bottom: .3rem; }
.opening h1 span { color: var(--color-accent); }
.featured { display: grid; grid-template-columns: .9fr 1.25fr; border-radius: var(--radius); overflow: hidden; background: var(--lilac); color: var(--charcoal); }
.featured-copy { padding: clamp(1.5rem, 3.8vw, 3rem); display: flex; flex-direction: column; align-items: start; }
.featured .eyebrow { color: #42325f; display: flex; align-items: center; gap: .7rem; margin-bottom: 2rem; }
.featured .eyebrow::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.featured h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); letter-spacing: -.05em; margin-bottom: 1rem; max-width: 15ch; }
.featured-copy > p:not(.eyebrow) { max-width: 34ch; color: #40374f; margin-bottom: 1.75rem; }
.featured .button { margin-top: auto; background: var(--charcoal); color: var(--cream); }
.featured .button:focus-visible { outline-color: var(--charcoal); }
.featured-media { min-width: 0; position: relative; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.image-label { position: absolute; bottom: 1rem; right: 1rem; padding: .3rem .7rem; background: var(--charcoal); color: var(--cream); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: var(--space-3); padding: .75rem 1.3rem; border: 1px solid transparent; border-radius: 4px; background: var(--button-bg); color: var(--button-text); font-weight: 700; text-decoration: none; }
.button:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.catalog { padding-top: var(--space-6); padding-bottom: var(--space-8); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.section-heading h2 { font-size: 1.5rem; letter-spacing: -.035em; margin: 0; }
.section-heading p { margin: 0; color: var(--color-muted); font: .75rem/1.5 monospace; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
.game-card { min-width: 0; }
.game-card button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); text-align: left; background: transparent; }
.card-image { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--color-surface); }
.card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .2s ease; }
.play-mark { position: absolute; right: .8rem; bottom: .8rem; background: var(--color-accent); color: var(--charcoal); border-radius: 4px; padding: .4rem .8rem; font-size: .8rem; font-weight: 800; }
.game-card button:hover img { transform: scale(1.035); }
.game-card button:hover .card-title { color: var(--color-accent); }
.card-meta { display: flex; justify-content: space-between; align-items: start; gap: .6rem; margin-top: 1rem; }
.card-title { display: block; font: 700 1.08rem/1.3 var(--font-display); }
.card-number { font: .7rem/1.5 monospace; color: var(--color-muted); }
.card-category { display: block; margin-top: .3rem; color: var(--color-muted); font-size: .8rem; }
.recent { margin-bottom: var(--space-8); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius); }
.recent-list { display: flex; gap: .75rem; flex-wrap: wrap; }
.recent-list button { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; min-height: 48px; text-align: left; padding: .65rem 1rem; }
.recent-list button:hover { border-color: var(--color-accent); }
.text-button { border: 0; background: transparent; padding: .65rem 0; min-height: 44px; color: var(--color-muted); text-decoration: underline; text-underline-offset: .25em; }
.about { border-top: 1px solid var(--color-border); padding-block: var(--space-8); display: grid; grid-template-columns: 1fr 1.3fr; gap: 6rem; }
.about h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -.045em; max-width: 13ch; margin-bottom: 1rem; }
.about-intro { max-width: 32ch; color: var(--color-muted); }
details { border-bottom: 1px solid var(--color-border); padding: 1rem 0; }
details:first-child { border-top: 1px solid var(--color-border); }
summary { cursor: pointer; font-weight: 600; padding-block: .4rem; }
details p { margin: .75rem 0 .5rem; color: var(--color-muted); font-size: .95rem; }
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding-block: var(--space-6); }
.footer-top { display: flex; justify-content: space-between; align-items: start; gap: var(--space-4); }
.footer-top p { margin: .8rem 0 0; font-size: .85rem; color: var(--color-muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .85rem; }
.footer-nav a { padding-block: .6rem; }
.footer-bottom { border-top: 1px solid var(--color-border); margin-top: 2rem; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .75rem; color: var(--color-muted); }
.footer-bottom button { font-size: .8rem; }
.storage-notice { position: fixed; z-index: 20; bottom: 1rem; left: 1rem; width: min(460px, calc(100% - 2rem)); padding: 1.25rem; border: 1px solid #66734f; border-radius: var(--radius); background: var(--color-surface); box-shadow: 0 12px 40px #0008; }
.storage-notice h2 { font-size: 1rem; margin-bottom: .5rem; }
.storage-notice p { font-size: .85rem; color: var(--color-muted); margin-bottom: 1rem; }
.notice-actions { display: flex; gap: .75rem; }
.notice-actions .button { font-size: .8rem; padding: .7rem .9rem; flex: 1; }
.storage-status { color: var(--color-muted); font-size: .85rem; }
.game-dialog { width: min(1200px, calc(100% - 2rem)); height: min(850px, calc(100dvh - 2rem)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg); color: var(--color-text); }
.game-dialog[open] { display: flex; flex-direction: column; }
.game-dialog::backdrop { background: #090b12e8; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; flex-shrink: 0; }
.player-bar h2 { font-size: 1rem; margin: 0; }
.player-bar button { flex-shrink: 0; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); }
.game-dialog iframe { flex: 1; min-height: 0; width: 100%; border: 0; background: #000; }
.player-help { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; padding: .7rem 1rem; color: var(--color-muted); font-size: .75rem; }
.player-help p { margin: 0; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 5rem; padding-block: 4rem 6rem; }
.legal-nav { display: flex; align-items: start; flex-direction: column; gap: .4rem; }
.legal-nav a { color: var(--color-muted); padding: .6rem 0; font-size: .9rem; }
.legal-nav a[aria-current] { color: var(--color-accent); }
.legal-copy { min-width: 0; }
.legal-copy h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); margin-bottom: 1rem; }
.legal-lead { font-size: 1.15rem; color: var(--color-muted); margin-bottom: 2rem; }
.legal-copy section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.legal-copy h2 { font-size: 1.25rem; margin-bottom: .8rem; }
.legal-copy p, .legal-copy li { color: var(--color-muted); }
.legal-copy a { color: var(--color-text); overflow-wrap: anywhere; }
.legal-copy code { color: var(--color-accent); overflow-wrap: anywhere; }
.legal-copy ul { padding-left: 1.25rem; }
.legal-copy .button { color: var(--charcoal); margin-top: 2rem; }
@media (min-width: 1600px) { .opening { padding-top: 4.5rem; } }
@media (max-width: 1000px) {
  .header-note { display: none; }
  .featured-copy { padding: 1.8rem; }
  .featured .eyebrow { margin-bottom: 1.5rem; }
  .featured h2 { font-size: 2rem; }
  .about { gap: 3rem; }
  .legal-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 3rem; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 2.5rem); }
  .opening { align-items: start; flex-direction: column; gap: 1rem; padding-top: 2rem; }
  .opening-copy { max-width: 40ch; }
  .featured { grid-template-columns: 1fr 1fr; }
  .featured-copy { padding: 1.25rem; }
  .featured-copy > p:not(.eyebrow) { font-size: .9rem; }
  .featured .eyebrow { font-size: .65rem; margin-bottom: 1rem; }
  .featured h2 { font-size: 1.6rem; }
  .featured-media img { aspect-ratio: auto; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.1rem; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .about h2 { max-width: none; }
  .about-intro { max-width: 50ch; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
  .legal-layout { grid-template-columns: 1fr; gap: 2rem; padding-top: 2rem; }
  .legal-nav { flex-direction: row; flex-wrap: wrap; gap: .5rem 1rem; border-bottom: 1px solid var(--color-border); padding-bottom: 1rem; }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 76px; gap: .75rem; }
  .brand { font-size: 1.4rem; gap: .5rem; }
  .brand img { width: 28px; height: 28px; }
  .header-nav { gap: 1rem; font-size: .8rem; }
  .header-nav a:last-child { display: none; }
  h1 { font-size: clamp(2.5rem, 10.8vw, 3.4rem); }
  .featured { display: flex; flex-direction: column-reverse; }
  .featured-media img { height: auto; aspect-ratio: 16 / 10; }
  .featured-copy { padding: 1.5rem; }
  .featured h2 { font-size: 1.9rem; max-width: none; }
  .featured-copy > p:not(.eyebrow) { font-size: 1rem; }
  .featured .button { width: 100%; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 1.25rem; }
  .section-heading p { font-size: .7rem; }
  .game-grid { gap: 1.75rem .85rem; }
  .card-image img { aspect-ratio: 4/3; }
  .card-title { font-size: .95rem; line-height: 1.4; }
  .card-number { display: none; }
  .card-category { font-size: .75rem; }
  .play-mark { right: .5rem; bottom: .5rem; padding: .25rem .5rem; font-size: .7rem; }
  .catalog { padding-bottom: 3rem; }
  .about { padding-block: 3rem; }
  .footer-nav { gap: .2rem 1rem; }
  .footer-bottom { align-items: start; flex-direction: column; gap: .25rem; }
  .game-dialog { width: calc(100% - 1rem); height: calc(100dvh - 1rem); }
  .player-bar { padding: .5rem .65rem; gap: .65rem; }
  .player-bar h2 { font-size: .9rem; }
  .player-bar button { padding: .5rem .75rem; }
  .player-help { padding: .5rem .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-image img { transition: none; }
  .game-card button:hover img { transform: none; }
}
