:root {
  --paper: #f8f1df;
  --paper-2: #fffaf0;
  --ink: #111827;
  --muted: #53606f;
  --sea: #0f9fb5;
  --sea-dark: #087386;
  --red: #ef3e36;
  --yellow: #f6c945;
  --line: #1d2939;
  --shadow: 0 18px 45px rgba(17, 24, 39, .15);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: white; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 6;
  background: rgba(248, 241, 223, .94);
  border-bottom: 3px solid var(--ink);
  backdrop-filter: blur(12px);
}
.header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; letter-spacing: 0; }
.brand span { max-width: 14rem; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 800;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--ink); background: var(--paper-2); }
.menu-button { display: none; border: 2px solid var(--ink); background: var(--paper-2); min-height: 42px; padding: 8px 12px; font-weight: 900; }

.band { padding: 72px 0; }
.band.tight { padding: 26px 0; }
.hero {
  min-height: calc(100svh - 76px);
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(17,24,39,.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17,24,39,.07) 1px, transparent 1px),
    var(--paper);
  background-size: 38px 38px;
  border-bottom: 3px solid var(--ink);
}
.hero-grid, .split, .contact-grid, .play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: center; }
.hero-copy h1 {
  margin: 0 0 18px;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .95;
}
.page-hero h1 {
  margin: 0 0 16px;
  max-width: 900px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
}
.hero-copy p, .page-hero p { max-width: 700px; font-size: 1.12rem; color: var(--muted); }
.label { margin: 0 0 12px; color: var(--red); text-transform: uppercase; font-weight: 900; font-size: .82rem; }
.hero-actions, .control-row, .choice-row, .tag-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  padding: 10px 16px;
  color: var(--ink);
  background: var(--paper-2);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}
.button.primary { background: var(--yellow); }
.button.ghost { background: white; }
.button.small { min-height: 38px; padding: 7px 12px; box-shadow: none; }
.button:disabled, .icon-button:disabled { opacity: .55; cursor: not-allowed; }
.text-link { display: inline-block; margin-top: 16px; font-weight: 900; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.icon-button {
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  background: var(--sea);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.ticket-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 12px;
  transform: rotate(-2deg);
}
.ticket-wall span {
  aspect-ratio: 1.35 / 1;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  font-weight: 900;
  font-size: clamp(1.3rem, 4vw, 3.6rem);
  background: white;
}
.ticket-wall .ticket { background: var(--yellow); font-size: clamp(1rem, 2vw, 2rem); }
.ticket-wall .red, .ticket-wall .tile.star { background: var(--red); color: white; }
.ticket-wall .blue, .ticket-wall .sea { background: var(--sea); color: white; }
.ticket-wall .black { background: var(--ink); color: white; }

.stats { background: var(--ink); color: white; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-row div { border-left: 3px solid var(--yellow); padding: 8px 12px; }
.stat-row b { display: block; font-size: 2rem; line-height: 1; }
.stat-row span { color: #dbe4ec; font-weight: 700; }

.section-head { margin-bottom: 24px; }
.section-head h2, .split h2, .prose h2, .prose-grid h2, .side-panel h2 { margin: 0 0 14px; line-height: 1.05; }
.game-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.game-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 3px solid var(--ink);
  background: var(--paper-2);
  box-shadow: 8px 8px 0 var(--ink);
}
.game-card.wide { grid-template-columns: 230px 1fr; }
.game-card h2, .game-card h3 { margin: 0 0 8px; font-size: 1.55rem; line-height: 1.08; }
.game-card p { margin: 0 0 18px; color: var(--muted); }
.game-mark {
  min-height: 170px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--sea);
  border: 3px solid var(--ink);
}
.game-mark span { display: grid; place-items: center; background: white; border: 2px solid var(--ink); font-size: 2rem; font-weight: 900; }
.game-mark.cards { background: var(--red); }
.tag-row { margin-top: 4px; }
.tag-row span { border: 2px solid var(--ink); padding: 3px 8px; background: white; font-weight: 800; font-size: .84rem; }

.split-band { background: var(--paper-2); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.feature-grid, .prose-grid { display: grid; gap: 14px; }
.feature-grid article, .prose-grid article, .side-panel, .machine-panel, .contact-form {
  border: 3px solid var(--ink);
  background: white;
  padding: 20px;
  box-shadow: 6px 6px 0 var(--ink);
}
.feature-grid h3 { margin: 0 0 6px; }
.feature-grid p, .prose-grid p, .prose p, .side-panel p { color: var(--muted); }
.page-hero { background: var(--paper-2); border-bottom: 3px solid var(--ink); }
.prose { max-width: 840px; }
.prose a, .prose-grid a { color: var(--sea-dark); font-weight: 900; }

.game-stage { padding: 64px 0 78px; background: var(--paper); }
.play-grid { align-items: start; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); }
.machine-panel { padding: 28px 32px 34px; }
.machine-panel h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 58px); line-height: .98; }
.machine-panel > p { color: var(--muted); }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 22px; }
.reel-window {
  height: clamp(116px, 18vw, 160px);
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--paper-2);
}
.reel-track { display: grid; grid-auto-rows: clamp(116px, 18vw, 160px); }
.reel-symbol { display: grid; place-items: center; font-weight: 900; font-size: clamp(1.15rem, 3vw, 2.4rem); color: var(--ink); }
.reel-symbol[data-symbol="seven"], .reel-symbol[data-symbol="star"] { color: var(--red); font-size: clamp(2rem, 6vw, 4.5rem); }
.game-message { min-height: 28px; margin: 18px 0 20px; font-weight: 900; }
.machine-panel .control-row { margin-top: 16px; row-gap: 16px; padding-bottom: 5px; }
.machine-panel .control-row + .control-row { margin-top: 18px; }
.machine-panel .choice-row { margin: 20px 0 18px; row-gap: 16px; padding-bottom: 5px; }
.meter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.meter-grid div { border: 2px solid var(--ink); background: var(--paper-2); padding: 12px; }
.meter-grid span { display: block; color: var(--muted); font-size: .86rem; font-weight: 800; }
.meter-grid b { font-size: 1.8rem; }
.paytable, .history-list { display: grid; gap: 7px; }
.pay-row, .history-row, .score-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px solid #e5dcc8;
  padding: 8px 0;
  font-weight: 800;
}
.pay-row small { color: var(--muted); }
.win-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px 16px;
  font-weight: 900;
}
.win-toast b, .win-toast span { display: block; }

.card-table { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; margin: 28px 0 20px; }
.playing-card {
  min-height: 250px;
  display: grid;
  place-items: center;
  position: relative;
  background: white;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.playing-card b { font-size: clamp(3.5rem, 9vw, 6.5rem); line-height: 1; }
.playing-card span { font-size: 2rem; font-weight: 900; }
.playing-card i { position: absolute; left: 12px; top: 10px; white-space: pre-line; font-style: normal; font-weight: 900; }
.playing-card.is-red { color: var(--red); }
.playing-card.is-back {
  color: white;
  background:
    linear-gradient(45deg, rgba(255,255,255,.12) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.12) 75%),
    var(--sea);
  background-size: 20px 20px;
}
.versus { font-weight: 900; color: var(--red); }
.choice-row .button { flex: 1 1 120px; }
.score-line { flex-wrap: wrap; margin-bottom: 20px; }
.card-history { display: flex; flex-wrap: wrap; gap: 8px; }
.card-history span { min-width: 34px; min-height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); font-weight: 900; }
.card-history .win { background: var(--sea); color: white; }
.card-history .lose { background: var(--red); color: white; }

.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 900; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 2px solid var(--ink);
  background: white;
  padding: 11px 12px;
}
.form-status { min-height: 24px; margin: 0; font-weight: 900; color: var(--sea-dark); }
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, .62);
}
.age-panel {
  max-width: 520px;
  border: 3px solid var(--ink);
  background: var(--paper-2);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 24px;
}
.age-panel h2 { margin: 0 0 10px; font-size: 2rem; line-height: 1.05; }
.cookie-strip {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 3px solid var(--ink);
  background: var(--paper-2);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 12px;
}
.cookie-strip p { margin: 0; }
.site-footer { background: var(--ink); color: white; padding: 42px 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .6fr 1.1fr; gap: 24px; }
.footer-brand { color: white; }
.site-footer p { color: #d7dee7; }
.site-footer nav { display: grid; gap: 8px; align-content: start; }
.site-footer a { color: white; font-weight: 900; }

@media (max-width: 880px) {
  .menu-button { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    background: var(--paper-2);
    border: 3px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    padding: 8px;
  }
  .site-nav.is-open { display: grid; }
  .site-nav a { width: 100%; }
  .hero { min-height: auto; }
  .hero-grid, .split, .contact-grid, .play-grid, .game-list, .footer-grid { grid-template-columns: 1fr; }
  .game-card, .game-card.wide { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .ticket-wall { transform: none; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 1120px); }
  .band { padding: 48px 0; }
  .hero-copy h1 { font-size: 42px; }
  .page-hero h1 { font-size: 36px; }
  .ticket-wall { grid-template-columns: repeat(2, 1fr); }
  .stat-row, .meter-grid, .card-table { grid-template-columns: 1fr; }
  .versus { text-align: center; }
  .playing-card { min-height: 190px; }
  .cookie-strip { align-items: stretch; flex-direction: column; }
}
