:root {
  --felt: #0c2e22;
  --felt-deep: #071c15;
  --felt-card: #12382a;
  --gold: #e4c36a;
  --gold-deep: #a67c2d;
  --gold-bright: #fff1c2;
  --cream: #f6f1e4;
  --cream-ink: #3a3224;
  --red: #9d2433;
  --ink: #f4efe2;
  --muted: #d9cba8;
  --line: rgba(228, 195, 106, 0.72);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(228, 195, 106, 0.08), transparent 55%),
    radial-gradient(900px 600px at 100% 100%, rgba(0, 0, 0, 0.35), transparent 50%),
    linear-gradient(180deg, #14543c 0%, var(--felt) 42%, var(--felt-deep) 100%);
  min-height: 100vh;
}

a { color: inherit; }

.shell {
  min-height: 100vh;
  padding: 22px 18px 28px;
}

.frame {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 50px);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 0 0 7px rgba(12, 46, 34, 0.55),
    inset 0 0 0 8px var(--line),
    0 24px 60px rgba(0, 0, 0, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 241, 194, 0.04), transparent 18%),
    linear-gradient(180deg, #164a36 0%, #0e3326 100%);
  padding: 28px 34px 26px;
}

.frame::before,
.frame::after {
  content: "♠ ♦";
  position: absolute;
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--gold);
  opacity: 0.85;
}

.frame::before { top: 10px; left: 16px; }
.frame::after { content: "♣ ♥"; right: 16px; bottom: 10px; }

.top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.stage {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.shell.board {
  height: 100vh;
  min-height: 100vh;
  padding: 12px;
  overflow: hidden;
}

.shell.board .frame {
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 22px 18px;
}

.shell.board .stage {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.roulette {
  position: relative;
  width: 100%;
  height: 100%;
}

.roulette .track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.roulette .pockets { position: absolute; inset: 0; }

.roulette .diamonds { position: absolute; inset: 0; pointer-events: none; }

.roulette .diamond {
  position: absolute;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #fff6d2, #e4c36a 42%, #8d6420);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.roulette .ball {
  position: absolute;
  z-index: 3;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 30%, #fff, #f8e7b4 38%, #c9963a 72%, #6e5018);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.roulette .mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(46%, 640px);
  margin: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 64px);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  pointer-events: none;
  background: linear-gradient(180deg, #fff8dc 0%, #f0d78a 32%, #c4923a 58%, #fff1c4 82%, #8d6420 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.28));
}

.roulette .cells {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.roulette .cells .case { cursor: pointer; }

.roulette .cells path {
  fill: rgba(7, 28, 21, 0.72);
  stroke: #e4c36a;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.roulette .cells .case:hover path,
.roulette .cells .case:focus-visible path {
  fill: rgba(228, 195, 106, 0.3);
}

.roulette .cells text {
  fill: #f6e7b4;
  font-family: Cinzel, serif;
  font-size: 22px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.46);
}

.sheet[hidden] { display: none; }

.sheet-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  background: #12382a;
  color: #f4efe2;
  border: 1px solid rgba(228, 195, 106, 0.8);
  box-shadow:
    inset 0 0 0 6px rgba(12, 46, 34, 0.45),
    inset 0 0 0 7px rgba(228, 195, 106, 0.72);
  padding: 22px;
}

.sheet-card.wide {
  width: min(1240px, 100%);
}

.sheet-meta {
  clear: both;
  margin: 0 0 14px;
  text-align: center;
  color: #d9c48a;
  font-size: 14px;
}

.sheet-wait {
  clear: both;
  margin: 12px 0 0;
  text-align: center;
  color: #f4efe2;
}

.sheet-scroll {
  clear: both;
  max-height: min(62vh, 640px);
  overflow: auto;
}

.sheet-card h2 {
  margin: 8px 0 18px;
  text-align: center;
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f0d78a;
}

.sheet-close {
  float: right;
  background: transparent;
  color: #e4c36a;
  border: 1px solid rgba(228, 195, 106, 0.65);
  padding: 6px 12px;
  font-family: "Source Sans 3", sans-serif;
  cursor: pointer;
}

.sheet-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  clear: both;
}

.sheet-card th,
.sheet-card td {
  border: 1px solid rgba(228, 195, 106, 0.45);
  padding: 12px 14px;
  text-align: left;
  height: 42px;
}

.sheet-card th {
  font-family: Cinzel, serif;
  font-weight: 600;
  color: #fff1c2;
  background: #184433;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 13px;
  position: sticky;
  top: 0;
}

.sheet-card td.num,
.sheet-card th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.roulette .pocket {
  position: absolute;
  width: var(--chip, 72px);
  height: var(--chip, 72px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  font-family: Cinzel, serif;
  font-size: calc(var(--chip, 72px) * 0.34);
  font-weight: 700;
  line-height: 1;
  color: #4a3010;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 38%, #fff8dc 0 16%, #f0d48a 34%, #c9963a 55%, #8a6120 74%, #f6e2a8 86%, #6e5018 100%);
  box-shadow:
    inset 0 0 0 3px #fff3c8,
    inset 0 0 0 5px #7c5a1c,
    inset 0 0 0 8px #e7c56a,
    0 8px 14px rgba(0, 0, 0, 0.34);
}

.roulette .pocket::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(#f8e7b4 0 7deg, #a9782c 7deg 14deg);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64% 86%, transparent 88%);
  mask: radial-gradient(circle, transparent 62%, #000 64% 86%, transparent 88%);
  pointer-events: none;
}

.brand {
  font-family: Cinzel, serif;
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.brand span { color: var(--muted); letter-spacing: 0.08em; }

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.who img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  object-fit: cover;
}

.who a.out {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(228, 195, 106, 0.4);
  font-size: 13px;
}

nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 28px;
}

nav.tabs a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(228, 195, 106, 0.28);
  padding: 7px 10px;
  border-radius: 999px;
}

nav.tabs a.active,
nav.tabs a:hover {
  color: var(--felt-deep);
  background: linear-gradient(180deg, #fff6d4, #e0b85a);
  border-color: transparent;
}

.eyebrow {
  text-align: center;
  font-family: Cinzel, serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 13px;
  margin: 8px 0 10px;
}

h1.display {
  margin: 0;
  text-align: center;
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff8dc 0%, #f0d78a 32%, #c4923a 58%, #fff1c4 82%, #8d6420 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.28));
}

.sub {
  text-align: center;
  margin: 14px auto 0;
  max-width: 720px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(20px, 2.4vw, 28px);
  color: #f3ead4;
}

.quote {
  text-align: center;
  margin: 18px auto 0;
  max-width: 760px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--gold-bright);
}

.banner {
  margin: 28px auto 6px;
  max-width: 860px;
  background: var(--cream);
  color: var(--cream-ink);
  text-align: center;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.banner.gold {
  background: linear-gradient(180deg, #f8e7b0, #d7b15a);
}

.banner.red {
  background: var(--red);
  color: #fff8f4;
  border-radius: 4px;
  font-weight: 600;
}

.google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  background: #fff;
  color: #1f1f1f;
  text-decoration: none;
  font-weight: 650;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.google:hover { transform: translateY(-1px); }

.center { text-align: center; }

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

.err {
  max-width: 520px;
  margin: 16px auto 0;
  background: rgba(157, 36, 51, 0.92);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
}

.grid3, .grid5, .steps {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid5 { grid-template-columns: repeat(5, 1fr); }
.steps { grid-template-columns: repeat(4, 1fr); }

.card, .step, .tool, .house {
  border: 1px solid rgba(228, 195, 106, 0.55);
  background: rgba(8, 32, 24, 0.35);
  border-radius: 6px;
  padding: 18px 16px 16px;
  text-align: center;
}

.suit {
  font-family: Cinzel, serif;
  font-size: 42px;
  color: var(--gold-bright);
  line-height: 1;
}

.suit .red { color: #e23b4a; }

.card h2, .step h2, .tool h3, .house h2 {
  font-family: Cinzel, serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  margin: 8px 0 8px;
  color: var(--gold-bright);
}

.card p, .step p, .tool p, .house li, .house p {
  margin: 0;
  color: #f0e7d2;
  font-size: 15px;
  line-height: 1.45;
}

.chip {
  width: 74px;
  height: 74px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Cinzel, serif;
  font-size: 28px;
  color: #5c3b10;
  background:
    radial-gradient(circle at 50% 50%, #fff6d2 0 46%, transparent 47%),
    repeating-conic-gradient(#f4d78a 0 12deg, #c8963b 12deg 24deg);
  box-shadow: inset 0 0 0 6px #f8e7b4, inset 0 0 0 8px #8d6420, 0 8px 16px rgba(0, 0, 0, 0.25);
}

.house ol, .house ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.house li + li { margin-top: 4px; }

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  margin-top: 22px;
  text-align: left;
}

.slot {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(228, 195, 106, 0.25);
}

.slot strong {
  font-family: Cinzel, serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.slot span { color: var(--muted); display: block; font-size: 13px; margin-top: 3px; }

.house-row {
  border: 1px solid rgba(228, 195, 106, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.house-row b { color: var(--gold-bright); }
.house-row em { color: var(--muted); font-style: normal; }

table.mat {
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px;
  margin-top: 12px;
}

table.mat th {
  font-family: Cinzel, serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--gold-bright);
}

table.mat td, table.mat th {
  text-align: center;
  padding: 6px;
}

.token {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-family: Cinzel, serif;
  color: #5c3b10;
  background: radial-gradient(circle at 40% 35%, #fff6d2, #e0b85a 62%, #a67c2d);
  box-shadow: inset 0 0 0 3px rgba(255, 248, 220, 0.7);
}

.foot {
  margin-top: 26px;
  text-align: center;
  color: rgba(243, 234, 212, 0.55);
  font-size: 12px;
}

.tools {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px 22px;
  margin-top: 26px;
  align-items: center;
}

.tool.centerpiece { grid-column: 2; grid-row: 1 / span 2; }

@media (max-width: 980px) {
  .grid3, .grid5, .steps, .split, .tools { grid-template-columns: 1fr; }
  .tool.centerpiece { grid-column: auto; grid-row: auto; }
  .frame { padding: 22px 14px 20px; }
  .slot { grid-template-columns: 1fr; }
  .quote, .sub, .banner { padding-left: 6px; padding-right: 6px; }
}

@media (max-width: 640px) {
  h1.display { font-size: 22px; letter-spacing: 0; line-height: 1.08; }
  .brand { letter-spacing: 0.04em; font-size: 10px; line-height: 1.4; }
  .quote, .sub { font-size: 18px; }
}
