:root {
  --felt: #0c3b28;
  --felt-deep: #071f16;
  --wood: #140b08;
  --wood-mid: #2a1810;
  --cream: #f6ecd0;
  --gold: #e4c15a;
  --chip-red: #c81d25;
  --chip-blue: #1e4db7;
  --ink: #0a0704;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(228, 193, 90, 0.1), transparent 46%),
    repeating-linear-gradient(90deg, #1c100c 0 2px, #120a07 2px 8px),
    var(--wood);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: Bungee, cursive;
  line-height: 0.95;
  margin: 0;
}

.page-tag {
  margin: 0 0 0.6rem;
  font-family: "Permanent Marker", cursive;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.page-tag.dark {
  color: var(--chip-red);
}

/* ---- nav rail ---- */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background:
    linear-gradient(180deg, #3a2216, #1a0e09);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 8px 0 var(--ink);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: Bungee, cursive;
  letter-spacing: 0.04em;
}

.rail-brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: #111;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 3px solid var(--gold);
  background: var(--ink);
  color: var(--cream);
  font-size: 1.4rem;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
}

.nav-links > a:not(.icon-btn) {
  padding: 0.35rem 0.2rem;
}

.nav-links > a:not(.icon-btn):hover {
  color: var(--gold);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-x { background: #111; color: #fff; }
.icon-buy { background: #ff007a; color: #fff; }
.icon-dex { background: #1e4db7; color: #fff; }

/* ---- shared page ---- */
.page {
  position: relative;
  min-height: 100svh;
  background-color: var(--felt-deep);
  background-repeat: no-repeat;
  background-size: cover;
  isolation: isolate;
  border-bottom: 16px solid var(--wood);
  box-shadow: inset 0 -6px 0 var(--gold);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ink-dot,
.page > * {
  position: relative;
  z-index: 1;
}

.ink-dot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(#000 0.8px, transparent 0.8px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

/* ---- hero: player seat / felt apron ---- */
.hero {
  background-image: url("../2.png");
  background-position: center 22%;
  display: flex;
  align-items: flex-end;
}

.hero::before {
  background:
    linear-gradient(180deg, rgba(10, 7, 4, 0.18) 0%, rgba(10, 7, 4, 0.08) 42%, rgba(7, 31, 22, 0.88) 100%);
}

.seat-apron {
  width: 100%;
  padding: 3.4rem 8vw 2.6rem;
  background:
    radial-gradient(120% 90% at 50% 0%, #145c3c, transparent 56%),
    linear-gradient(180deg, #0e4a32 0%, #08261b 100%);
  border-top: 10px solid #0a0704;
  box-shadow: inset 0 10px 0 rgba(228, 193, 90, 0.35);
  clip-path: ellipse(92% 100% at 50% 100%);
  text-align: center;
}

.seat-apron h1 {
  font-size: clamp(3.4rem, 11vw, 8rem);
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--ink);
}

.ticker {
  margin: 0.35rem 0 0.8rem;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.lead {
  max-width: 38rem;
  margin: 0 auto 1.4rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.chip-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.chip {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-family: Bungee, cursive;
  font-size: 0.72rem;
  color: #fff;
  border: 8px dashed rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 5px var(--ink), 4px 4px 0 var(--ink);
}

.chip svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.chip i { font-size: 1.15rem; }
.chip-red { background: radial-gradient(circle at 35% 30%, #ef4450, var(--chip-red) 60%); }
.chip-blue { background: radial-gradient(circle at 35% 30%, #4d7ef0, var(--chip-blue) 60%); }
.chip-gold { background: radial-gradient(circle at 35% 30%, #f3d56e, #b8860b 62%); color: var(--ink); border-color: rgba(10, 7, 4, 0.28); }

/* ---- about: house-rules sidebar ---- */
.about {
  background-image: url("../1.png");
  background-position: center 18%;
  display: flex;
  align-items: stretch;
  padding: 5.5rem 6vw 3rem 0;
}

.about::before {
  background: linear-gradient(90deg, rgba(246, 236, 208, 0.96) 0 34%, rgba(10, 7, 4, 0.08) 58%, rgba(10, 7, 4, 0.35) 100%);
}

.rulebook {
  width: min(460px, 92vw);
  margin: 0;
  padding: 2.2rem 1.8rem 2rem 7vw;
  color: var(--ink);
  background: transparent;
}

.rulebook h2 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin-bottom: 1rem;
}

.rulebook p {
  margin: 0 0 0.85rem;
  font-weight: 700;
  line-height: 1.5;
}

.token-chips {
  list-style: none;
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 0 0;
  margin: 1.1rem 0 0;
  flex-wrap: wrap;
}

.token-chips li {
  width: 92px;
  min-height: 92px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff7dc, var(--gold) 62%);
  border: 7px dashed var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-align: center;
}

.token-chips em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.token-chips strong {
  font-family: Bungee, cursive;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* ---- howtobuy: chip tray ---- */
.buy {
  background-image: url("../3.png");
  background-position: center 16%;
  display: flex;
  align-items: flex-end;
}

.buy::before {
  background:
    linear-gradient(180deg, rgba(10, 7, 4, 0.15) 0%, rgba(10, 7, 4, 0.2) 40%, rgba(7, 20, 14, 0.92) 100%);
}

.tray-wrap {
  width: 100%;
  padding: 2.4rem 6vw 2.6rem;
}

.tray-head {
  text-align: center;
  margin-bottom: 1.2rem;
}

.tray-head h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
}

.chip-tray {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  background: linear-gradient(180deg, #2a1810, #140b08);
  border: 4px solid var(--gold);
  box-shadow: inset 0 0 0 6px var(--ink);
}

.chip-tray li {
  text-align: center;
  padding: 1rem 0.7rem 1.1rem;
  background: var(--felt);
  border: 3px solid var(--ink);
}

.chip-tray .denom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 0.55rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e8e8e8 55%);
  color: var(--ink);
  font-family: Bungee, cursive;
  font-size: 0.85rem;
  border: 5px dashed var(--chip-red);
  box-shadow: 0 0 0 3px var(--ink);
}

.chip-tray li:nth-child(2) .denom { border-color: var(--chip-blue); }
.chip-tray li:nth-child(3) .denom { border-color: var(--gold); }
.chip-tray li:nth-child(4) .denom { border-color: #111; background: radial-gradient(circle at 35% 30%, #f3d56e, #c9a227); }

.chip-tray h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--gold);
}

.chip-tray p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.tray-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.slab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.1rem;
  font-family: Bungee, cursive;
  font-size: 0.78rem;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  color: #fff;
}

.slab svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.slab-red { background: var(--chip-red); }
.slab-ink { background: #111; }
.slab-gold { background: var(--gold); color: var(--ink); }

/* ---- community: center pot ---- */
.community {
  background-image: url("../banner.png");
  background-position: center 48%;
  display: grid;
  place-items: center;
  padding: 6rem 1.2rem 3.4rem;
}

.community::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(7, 31, 22, 0.12), rgba(7, 20, 14, 0.72) 70%);
}

.pot {
  width: min(540px, 92vw);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.6rem 2.4rem;
  background:
    radial-gradient(circle at 50% 40%, #16744a, #08261b 72%);
  border: 14px solid #2a1810;
  box-shadow:
    0 0 0 6px var(--gold),
    0 0 0 12px var(--ink),
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.pot h2 {
  font-size: clamp(2rem, 6vw, 3.3rem);
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 0.7rem;
}

.pot > p {
  max-width: 22rem;
  margin: 0 0 1rem;
  font-weight: 700;
}

.pot-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(280px, 100%);
}

.pot-links .slab {
  justify-content: center;
}

.ca-plaque {
  margin-top: 1rem;
  width: min(340px, 100%);
  padding: 0.55rem 0.65rem;
  background: #f6ecd0;
  color: var(--ink);
  border: 3px solid var(--ink);
  display: grid;
  gap: 0.25rem;
}

.ca-plaque span {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ca-plaque code {
  font-size: 0.68rem;
  word-break: break-all;
  font-weight: 800;
}

.ca-plaque button {
  border: 2px solid var(--ink);
  background: var(--gold);
  font-family: Bungee, cursive;
  font-size: 0.65rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.felt-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1rem;
  background: #0a0704;
  color: var(--gold);
  font-weight: 800;
}

.felt-foot img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0.7rem;
    left: 0.7rem;
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem;
    background: #1a0e09;
    border: 3px solid var(--gold);
  }

  .nav-links.is-open { display: flex; }

  .nav-links .icon-btn { align-self: flex-start; }

  .about {
    padding: 5.2rem 1.1rem 1.4rem;
    align-items: flex-end;
  }

  .about::before {
    background: linear-gradient(180deg, rgba(10, 7, 4, 0.1) 0%, rgba(246, 236, 208, 0.96) 58%);
  }

  .rulebook {
    width: 100%;
    padding: 1.6rem 0.4rem 1.2rem;
  }

  .chip-tray { grid-template-columns: 1fr 1fr; }

  .seat-apron {
    clip-path: none;
    border-radius: 40px 40px 0 0;
  }

  .pot {
    aspect-ratio: auto;
    border-radius: 36px;
    padding: 2rem 1.3rem;
  }
}

@media (max-width: 560px) {
  .chip-tray { grid-template-columns: 1fr; }
  .seat-apron { padding-inline: 1.1rem; }
}
