/* Southern Spin List — shared stylesheet
   Tokens first, then base, layout, components, game stages, pages. */

:root {
  --mint: #e9f3ed;
  --mint-deep: #d8e9df;
  --paper: #fbfdfc;
  --teal: #0b5348;
  --teal-dark: #073b33;
  --ink: #13221d;
  --ink-soft: #3c4f48;
  --pink: #d97a93;
  --line: rgba(19, 34, 29, 0.18);
  --line-strong: rgba(19, 34, 29, 0.5);

  /* per-game accents */
  --sea: #2e7d6b;
  --sand: #c9b48c;
  --gem: #7b5ea7;
  --gem-deep: #57407e;
  --sakura: #d96f8f;
  --night: #1d2b4a;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;
  --space-8: 104px;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-press: 4px 4px 0 var(--teal-dark);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--mint);
  padding-bottom: 52px; /* room for the fixed age bar */
  -webkit-font-smoothing: antialiased;
}

/* very subtle fine-grain noise over the base colour */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 var(--space-3); font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 1000; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--space-3); }
ul, ol { margin: 0 0 var(--space-3); padding-left: 1.4em; }
li { margin-bottom: var(--space-2); }

a { color: var(--teal); font-weight: 800; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* links carry a small arrow suffix, sitewide */
a:not(.btn):not(.u-plain)::after { content: " \2192"; font-weight: 800; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- layout ---------- */
.container { max-width: 1120px; margin-inline: auto; padding-inline: var(--space-4); }
.container--narrow { max-width: 780px; }
.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-6); }

/* small-caps section labels (sitewide) */
.kicker {
  display: block;
  font-variant: all-small-caps;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--teal);
  margin-bottom: var(--space-2);
}

/* short centred accent rule between sections */
.rule {
  border: 0;
  width: 64px;
  height: 5px;
  border-radius: 3px;
  background: var(--teal);
  margin: 0 auto var(--space-5);
}

/* ---------- buttons: chunky press-down with hard offset shadow ---------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 900;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--teal-dark);
  background: var(--teal);
  color: var(--mint);
  cursor: pointer;
  box-shadow: var(--shadow-press);
  transition: transform 90ms ease, box-shadow 90ms ease;
  text-align: center;
}
.btn:hover { text-decoration: none; background: var(--teal-dark); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--teal-dark); }
.btn--ghost { background: var(--paper); color: var(--teal); }
.btn--ghost:hover { background: var(--mint-deep); }
.btn--small { padding: 8px 16px; font-size: 0.92rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-press); }

/* ---------- badges: flat solid-fill pills ---------- */
.badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--mint);
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge--sea { background: var(--sea); }
.badge--gem { background: var(--gem); }
.badge--sakura { background: var(--sakura); }
.badge--ink { background: var(--ink); }

/* ---------- masthead ---------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--mint); }
.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-3);
  flex-wrap: wrap;
}
.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 1000;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.masthead__brand:hover { text-decoration: none; }
.masthead__brand svg { flex: none; }
.masthead__nav {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
}
.masthead__nav a { color: var(--ink); font-weight: 800; font-size: 0.98rem; }
.masthead__nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }

/* coin chip */
.coinchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 999px;
  padding: 5px 14px 5px 8px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coinchip__disc {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal);
  display: inline-grid; place-items: center;
  color: var(--mint); font-size: 0.65rem; font-weight: 1000;
  flex: none;
}
.coinchip__label { font-variant: all-small-caps; letter-spacing: 0.06em; font-weight: 800; color: var(--ink-soft); }

/* compact sticky bar, appears after scrolling past the hero */
.compactbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  transition: transform 220ms ease;
}
@media (prefers-reduced-motion: reduce) { .compactbar { transition: none; } }
.compactbar.is-visible { transform: translateY(0); }
.compactbar__inner {
  display: flex; align-items: center; gap: var(--space-4);
  padding-block: 8px;
}
.compactbar__inner .masthead__nav a { font-size: 0.9rem; }
.compactbar .masthead__brand { font-size: 1.05rem; }
.compactbar .masthead__brand svg { width: 24px; height: 24px; }

/* ---------- age bar: slim, pinned to the bottom of the viewport ---------- */
.agebar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: var(--ink);
  color: var(--mint);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 7px var(--space-4);
  text-align: center;
}
.agebar strong { color: #fff; }
.agebar a { color: var(--mint); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- cookie banner ---------- */
.cookiebar {
  position: fixed;
  left: 50%; bottom: 64px;
  transform: translateX(-50%);
  z-index: 65;
  width: min(560px, calc(100vw - 32px));
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-press);
  padding: var(--space-3) var(--space-4);
  font-size: 0.92rem;
}
.cookiebar__actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); flex-wrap: wrap; }
.cookiebar.is-hidden { display: none; }

/* ---------- hero (poster style) ---------- */
.hero { padding-block: var(--space-7) var(--space-6); text-align: center; }
.hero h1 { max-width: 21ch; margin-inline: auto; }
.hero__free {
  display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center;
  margin-top: var(--space-4);
}

/* ---------- game tiles: framed, themed header strip, art on top ---------- */
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(340px, 82vw);
  gap: var(--space-4);
  overflow-x: auto;
  padding: var(--space-2) var(--space-4) var(--space-4);
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
@media (min-width: 1140px) {
  .carousel { grid-auto-columns: 1fr; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
}
.tile {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}
.tile__strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2);
  padding: 10px var(--space-3);
  color: #fff;
  font-weight: 1000;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.tile--bingo .tile__strip { background: #276b5b; }
.tile--blackjack .tile__strip { background: #6a4f93; }
.tile--dice .tile__strip { background: #a84763; }
.tile__strip .badge { background: rgba(0,0,0,0.28); font-size: 0.72rem; }
.tile__art { border-block: 1px solid var(--line); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tile__body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.tile__body p { margin: 0; font-size: 0.98rem; }
.tile__body .btn { margin-top: auto; align-self: flex-start; }

/* staggered fade-in of the games grid */
@media (prefers-reduced-motion: no-preference) {
  .js .tile { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
  .js .tile.is-in { opacity: 1; transform: none; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
caption { text-align: left; padding: var(--space-3) var(--space-3) 0; font-weight: 900; }
th, td { text-align: left; padding: 12px var(--space-3); border-bottom: 1px solid var(--line); }
th { font-variant: all-small-caps; letter-spacing: 0.08em; font-size: 1rem; color: var(--ink-soft); }
tbody tr:last-child td { border-bottom: 0; }
td { font-variant-numeric: tabular-nums; }

/* ---------- prose ---------- */
.prose { max-width: 70ch; }
.prose--center { margin-inline: auto; }
@media (min-width: 860px) {
  .prose--cols { max-width: none; column-count: 2; column-gap: var(--space-6); }
  .prose--cols p { break-inside: avoid-column; }
}
.prose h2 { margin-top: var(--space-6); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-5); }

/* ---------- split feature rows ---------- */
.feature {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}
@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--flip > :first-child { order: 2; }
}
.feature img { border-radius: var(--radius-lg); border: 1px solid var(--line-strong); }

/* ---------- FAQ / myth-fact ---------- */
.mythfact { display: grid; gap: var(--space-4); margin-bottom: var(--space-5); }
@media (min-width: 720px) { .mythfact { grid-template-columns: 1fr 1fr; } }
.mythfact__card { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper); padding: var(--space-4); }
.mythfact__card--fact { border-color: var(--teal); border-width: 1px; background: var(--mint-deep); }
.mythfact__card .badge { margin-bottom: var(--space-2); }
.faq__item { border-bottom: 1px solid var(--line); padding-block: var(--space-4); max-width: 70ch; }
.faq__item:last-child { border-bottom: 0; }
.faq__item h3 { margin-bottom: var(--space-2); }
.faq__item p:last-child { margin-bottom: 0; }

/* ---------- notice / disclaimer ---------- */
.notice {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: var(--space-4) var(--space-5);
}
.notice--tinted { background: var(--mint-deep); }
.notice p:last-child { margin-bottom: 0; }
.disclaimer { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-strong); background: var(--mint-deep); margin-top: var(--space-7); }
.footer__grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-block: var(--space-6);
}
.footer h3 { font-variant: all-small-caps; letter-spacing: 0.1em; font-size: 1.05rem; color: var(--ink-soft); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: var(--space-2); }
.footer a { color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.footer__legal {
  border-top: 1px solid var(--line);
  padding-block: var(--space-4);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer__legal p { margin-bottom: var(--space-2); }

/* ---------- game stage: framed arcade-cabinet styling ---------- */
.cabinet {
  --cab-accent: var(--teal);
  --cab-accent-dark: var(--teal-dark);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius) var(--radius);
  background: var(--cab-accent-dark);
  padding: 10px;
  max-width: 860px;
  margin-inline: auto;
}
.cabinet--bingo { --cab-accent: #276b5b; --cab-accent-dark: #1d5a4c; }
.cabinet--blackjack { --cab-accent: #6a4f93; --cab-accent-dark: #453263; }
.cabinet--dice { --cab-accent: #a84763; --cab-accent-dark: #1d2b4a; }
.cabinet__marquee {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  background: var(--cab-accent);
  color: #fff;
  border-radius: calc(var(--radius-lg) - 8px) calc(var(--radius-lg) - 8px) 6px 6px;
  padding: 12px var(--space-4);
  font-weight: 1000;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.cabinet__marquee .badge { background: rgba(0,0,0,0.3); }
.cabinet__screen {
  background: var(--paper);
  border-radius: 6px;
  margin-top: 8px;
  padding: var(--space-4);
}
.cabinet__panel {
  margin-top: 8px;
  background: var(--cab-accent);
  border-radius: 6px 6px calc(var(--radius) - 8px) calc(var(--radius) - 8px);
  padding: var(--space-3) var(--space-4);
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
}
.cabinet__panel .btn { border-color: rgba(0,0,0,0.35); box-shadow: 4px 4px 0 rgba(0,0,0,0.35); }
.cabinet__panel .btn:active { box-shadow: 0 0 0 rgba(0,0,0,0.35); }

/* shared game widgets */
.gamebar {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.gamebar__coins { display: inline-flex; align-items: center; gap: 8px; }
.betctl { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; }
.betctl select, .betctl input {
  font-family: var(--font); font-weight: 800; font-size: 1rem;
  padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.35);
  background: var(--paper); color: var(--ink);
}
.result {
  min-height: 1.6em;
  font-weight: 900;
  font-size: 1.1rem;
  margin-top: var(--space-3);
  text-align: center;
}
.result--win { color: var(--teal); }
.result--lose { color: #a13d3d; }
.rules { max-width: 860px; margin: var(--space-6) auto 0; }
.rules h2 { font-size: 1.4rem; }
.smallprint { font-size: 0.85rem; color: var(--ink-soft); max-width: 860px; margin: var(--space-4) auto 0; }
.noscript-note {
  max-width: 860px; margin: var(--space-4) auto;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper); padding: var(--space-4); text-align: center; font-weight: 800;
}

/* ---------- bingo ---------- */
.bingo-layout { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .bingo-layout { grid-template-columns: auto 1fr; align-items: start; } }
.bingo-card {
  display: grid; grid-template-columns: repeat(5, 56px); gap: 5px;
  justify-content: center;
  margin-inline: auto;
}
.bingo-card__head {
  display: grid; place-items: center;
  height: 34px; border-radius: 8px;
  background: var(--sea); color: #fff; font-weight: 1000;
}
.bingo-cell {
  display: grid; place-items: center;
  width: 56px; height: 48px;
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.bingo-cell.is-daubed { background: var(--sea); color: #fff; border-color: var(--sea); }
.bingo-cell.is-free { background: var(--sand); color: var(--ink); font-size: 0.7rem; font-variant: all-small-caps; }
.bingo-cell.is-free.is-daubed { background: var(--sea); color: #fff; }
.bingo-call {
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--mint);
  padding: var(--space-3);
}
.bingo-call__now {
  font-size: 2.6rem; font-weight: 1000; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}
.bingo-call__history {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-top: var(--space-2);
  min-height: 30px;
}
.bingo-call__history span {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px;
  font-size: 0.82rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.bingo-meta { margin-top: var(--space-2); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- blackjack ---------- */
.bj-table { display: grid; gap: var(--space-4); }
.bj-hand { min-height: 128px; }
.bj-hand__label { font-variant: all-small-caps; letter-spacing: 0.1em; font-weight: 800; color: var(--ink-soft); margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; }
.bj-hand__value { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 1.05rem; }
.bj-cards { display: flex; flex-wrap: wrap; gap: 8px; min-height: 104px; }
.pcard {
  width: 72px; height: 102px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  display: grid; grid-template-rows: auto 1fr;
  padding: 6px 8px;
  font-weight: 1000;
  position: relative;
  flex: none;
}
.pcard__corner { font-size: 0.95rem; line-height: 1.1; }
.pcard__pip { place-self: center; font-size: 2rem; }
.pcard--red { color: #b8405e; }
.pcard--black { color: var(--ink); }
.pcard--back {
  background: var(--gem-deep);
  background-image: repeating-linear-gradient(45deg, var(--gem) 0 10px, var(--gem-deep) 10px 20px);
  border-color: var(--gem-deep);
}
@media (prefers-reduced-motion: no-preference) {
  .pcard { animation: pcard-in 260ms ease; }
  @keyframes pcard-in { from { opacity: 0; transform: translateY(-8px); } }
}

/* ---------- dice ---------- */
.dice-stage { display: flex; gap: var(--space-4); justify-content: center; padding-block: var(--space-4); }
.die {
  width: 88px; height: 88px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 12px;
  gap: 2px;
}
.die i { border-radius: 50%; }
.die i.on { background: var(--night); }
@media (prefers-reduced-motion: no-preference) {
  .die.is-rolling { animation: die-shake 120ms linear infinite; }
  @keyframes die-shake {
    0% { transform: translate(0,0) rotate(0deg); }
    25% { transform: translate(2px,-2px) rotate(3deg); }
    50% { transform: translate(-2px,2px) rotate(-3deg); }
    75% { transform: translate(2px,2px) rotate(2deg); }
    100% { transform: translate(-2px,-2px) rotate(-2deg); }
  }
}
.dice-bets { display: grid; gap: var(--space-2); grid-template-columns: repeat(3, 1fr); margin-top: var(--space-3); }
.dice-bet {
  font-family: var(--font);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--mint);
  padding: 12px 8px;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: transform 90ms ease;
}
.dice-bet small { display: block; font-weight: 700; color: var(--ink-soft); }
.dice-bet[aria-pressed="true"] { background: var(--night); color: #fff; border-color: var(--night); }
.dice-bet[aria-pressed="true"] small { color: var(--mint); }
.dice-exact { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: var(--space-2); flex-wrap: wrap; font-weight: 800; }
.dice-exact select {
  font-family: var(--font); font-weight: 800; font-size: 1rem;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff;
}
.dice-petal { color: var(--sakura); }

/* ---------- helpers ---------- */
.center { text-align: center; }
.grid-2 { display: grid; gap: var(--space-5); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.band { background: var(--mint-deep); border-block: 1px solid var(--line); }

@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .agebar { padding-block: 8px; }
  .cookiebar { bottom: 88px; }
  .masthead__nav { gap: var(--space-3); }
  .section { padding-block: var(--space-6); }
  .bingo-card { grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 320px; }
  .bingo-cell { width: auto; }
  .compactbar .masthead__nav { display: none; }
}
