/* Driftwood Arcade — tokens + reset */
:root {
  --paper: #e6e8ee;
  --paper-2: #d4d8e2;
  --paper-3: #c7ccd8;
  --header: #2450b8;
  --header-ink: #f4f6fb;
  --cobalt: #2450b8;
  --cobalt-deep: #17357c;
  --coral: #ff5348;
  --coral-deep: #d93a30;
  --ink: #14161c;
  --muted: #4a5160;
  --cream: #f3f4f8;
  --wood: #c4a06a;
  --shadow: 5px 5px 0 #14161c;
  --shadow-sm: 3px 3px 0 #14161c;
  --border: 3px solid #14161c;
  --border-thin: 1px solid #14161c;
  --radius: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --wrap: 1120px;
  --wrap-narrow: 720px;
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --age-h: 40px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(20, 22, 28, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 22, 28, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  min-height: 100vh;
  padding-top: var(--age-h);
}

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

a {
  color: var(--coral);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
}

h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }

p { margin: 0 0 var(--space-3); max-width: 70ch; }

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 32px, var(--wrap-narrow));
}

/* Age bar — pinned top */
.age-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  min-height: var(--age-h);
  background: var(--ink);
  color: var(--cream);
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.age-bar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.age-bar a:hover { color: var(--coral); }

/* Header — cobalt band, two-tone split */
.site-header {
  background: var(--header);
  color: var(--header-ink);
  border-bottom: var(--border);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 40;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--header-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover { text-decoration: none; color: #fff; }

.brand__mark {
  width: 48px;
  height: 48px;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--coral);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.brand__name span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  opacity: 0.85;
}

.nav-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tabs a {
  color: var(--header-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 12px 14px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.nav-tabs a:hover { text-decoration: none; color: #fff; }

.nav-tabs__bar {
  position: absolute;
  left: 0;
  bottom: 6px;
  height: 4px;
  background: var(--coral);
  width: 40px;
  transform: translateX(0);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .nav-tabs__bar {
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

.coin-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  padding: 8px 12px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.coin-chip__dot {
  width: 10px;
  height: 10px;
  background: var(--coral);
  border: 2px solid var(--ink);
  flex-shrink: 0;
}

.coin-chip__label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

.coin-chip__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.menu-toggle {
  display: none;
  background: var(--coral);
  color: #fff;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--coral);
  color: #fff;
  border: var(--border);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 20px;
  cursor: pointer;
  line-height: 1;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  color: #fff;
  background: var(--coral-deep);
}

.btn:active {
  box-shadow: 0 0 0 var(--ink);
  transform: translate(5px, 5px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.btn--ghost:hover { color: var(--ink); background: var(--paper-2); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow);
}

/* Badges with leading dot */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--cream);
  border: var(--border);
  padding: 4px 10px 4px 8px;
}

.badge__dot {
  width: 8px;
  height: 8px;
  background: var(--coral);
  border: 2px solid var(--ink);
}

.kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 8px;
}

.index-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.8;
  color: var(--cobalt);
  letter-spacing: -0.04em;
  display: block;
  margin-bottom: 8px;
}

/* Framed tiles, left-accent, themed header strip */
.tile {
  background: var(--cream);
  border: var(--border);
  box-shadow: var(--shadow);
  border-left: 8px solid var(--coral);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tile__strip {
  padding: 10px 14px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-bottom: var(--border);
  color: #fff;
}

.tile__art {
  border-bottom: var(--border);
  overflow: hidden;
  background: var(--paper-2);
}

.tile__art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.92);
}

.tile__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.tile__body h3 {
  margin: 0;
  font-size: 1.6rem;
}

.tile__body p {
  margin: 0;
  font-size: 1rem;
  flex: 1;
}

/* Imagery: hard-edged framed (wildcard overrides rounded masks) */
.frame {
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--cream);
}

.frame img {
  width: 100%;
  display: block;
  filter: contrast(1.04) saturate(0.9);
}

.frame--offset {
  box-shadow: 10px 10px 0 var(--cobalt);
}

/* Checkmark lists */
.list-check {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.list-check li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 10px;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--coral);
  border-bottom: 3px solid var(--coral);
  transform: rotate(-45deg);
}

/* Checklist signature block */
.checklist {
  background: var(--cream);
  border: var(--border);
  box-shadow: var(--shadow);
  border-left: 8px solid var(--cobalt);
  padding: 24px;
}

.checklist h2,
.checklist h3 { margin-top: 0; }

.checklist ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ck;
}

.checklist ol li {
  counter-increment: ck;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper-3);
}

.checklist ol li:last-child { border-bottom: 0; }

.checklist ol li::before {
  content: counter(ck, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--coral);
  line-height: 1.1;
}

/* Sections + curved transitions */
.band {
  position: relative;
  padding: var(--space-7) 0;
}

.band--tint {
  background: color-mix(in srgb, var(--paper-2) 88%, var(--cobalt) 12%);
}

.band--cobalt {
  background: var(--cobalt);
  color: var(--header-ink);
}

.band--cobalt h1,
.band--cobalt h2,
.band--cobalt .kicker { color: #fff; }

.band--coral {
  background: var(--coral);
  color: #fff;
}

.wave {
  display: block;
  width: 100%;
  height: 36px;
  color: var(--paper-2);
}

.wave--paper { color: var(--paper); }
.wave--tint { color: #d9dce8; }
.wave--cobalt { color: var(--cobalt); }
.wave--flip { transform: scaleY(-1); }

.free-strip {
  background: var(--cream);
  border-bottom: var(--border);
  padding: 14px 0;
  font-size: 0.98rem;
}

.free-strip strong {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.disclaimer {
  background: var(--ink);
  color: var(--cream);
  padding: var(--space-6) 0;
  font-size: 0.95rem;
}

.disclaimer a { color: #fff; text-decoration: underline; }
.disclaimer p { max-width: 80ch; }

.faq-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 800px) {
  .faq-grid { grid-template-columns: 1fr 1fr; }
}

.faq-block h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

/* Footer compact single row */
.site-footer {
  background: var(--header);
  color: var(--header-ink);
  border-top: var(--border);
  padding: 18px 0;
}

.site-footer__row {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.site-footer .brand__mark { width: 36px; height: 36px; }

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  flex: 1;
}

.site-footer__note {
  opacity: 0.85;
  max-width: 42ch;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 90;
  max-width: 560px;
  background: var(--cream);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.cookie-banner p {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

/* Game chrome */
.game-stage {
  background: var(--cream);
  border: var(--border);
  box-shadow: var(--shadow);
  border-left: 8px solid var(--accent, var(--coral));
}

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: var(--border);
  background: var(--paper);
}

.bet-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-control label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.bet-control select,
.bet-control input {
  font: inherit;
  border: var(--border);
  background: #fff;
  padding: 8px 10px;
}

.result-live {
  min-height: 1.5em;
  font-weight: 600;
  padding: 12px 16px;
  border-top: var(--border);
  background: var(--paper);
}

.rules-panel {
  border: var(--border);
  background: var(--cream);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 8px solid var(--cobalt);
}

.coin-note {
  font-size: 0.9rem;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--coral);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus { left: 8px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border: var(--border);
  font-variant-numeric: tabular-nums;
}

th, td {
  border: 1px solid var(--ink);
  padding: 10px 12px;
  text-align: left;
}

th {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper-2);
}

.this-that {
  display: grid;
  gap: 0;
  border: var(--border);
  box-shadow: var(--shadow);
}

@media (min-width: 700px) {
  .this-that { grid-template-columns: 1fr 1fr; }
}

.this-that > div {
  padding: 20px;
  background: var(--cream);
}

.this-that > div:last-child {
  background: var(--paper-2);
  border-top: var(--border);
}

@media (min-width: 700px) {
  .this-that > div:last-child {
    border-top: 0;
    border-left: var(--border);
  }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav-tabs {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cobalt-deep);
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: var(--border);
  }
  .nav-tabs.is-open { display: flex; }
  .nav-tabs__bar { display: none; }
  .site-header__inner { flex-wrap: wrap; }
  .coin-chip { margin-left: auto; }
}

@media (max-width: 520px) {
  .brand__name { display: none; }
  body { font-size: 16px; }
}

.tile-strip-west { background: #6b3a1e; }
.tile-strip-egypt { background: #8a6a12; }
.tile-strip-north { background: #2450b8; }
.tile-strip-steam { background: #4a3728; }

.noscript-note {
  padding: 16px;
  border: var(--border);
  background: #fff3cd;
  margin: 16px;
}
