:root {
  --felt: #1f4d3a;
  --felt-deep: #143a2a;
  --paper: #f3e9d2;
  --paper-soft: #ede1c4;
  --ink: #1a1612;
  --ink-soft: #4a3f33;
  --red: #b1262d;
  --red-deep: #7a1a1f;
  --gold: #b08a3e;
  --rule: rgba(26, 22, 18, 0.35);
  --serif-display: "Playfair Display", "Hoefler Text", "Iowan Old Style", Georgia, serif;
  --serif-body: "Crimson Pro", "Iowan Old Style", "Hoefler Text", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--serif-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

a { color: inherit; }

/* ========== Hero (felt table) ========== */

.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 50% 110%, rgba(0, 0, 0, 0.45), transparent 60%),
    radial-gradient(900px 500px at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--felt);
  color: var(--paper);
  padding: 64px 24px 88px;
  text-align: center;
  overflow: hidden;
  border-bottom: 6px double rgba(243, 233, 210, 0.18);
}

/* subtle felt noise via repeating gradients */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.04) 0 2px, transparent 2px 5px);
  pointer-events: none;
}

.back {
  position: absolute;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 14px;
  color: rgba(243, 233, 210, 0.75);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(243, 233, 210, 0.25);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  z-index: 2;
}
.back:hover {
  color: var(--paper);
  border-color: var(--gold);
  background: rgba(176, 138, 62, 0.12);
}

.hero__ornament {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 22px;
  margin-bottom: 14px;
  letter-spacing: 0.1em;
  opacity: 0.92;
}
.suit { line-height: 1; }
.suit--red { color: var(--red); text-shadow: 0 0 10px rgba(177, 38, 45, 0.4); }
.suit--black { color: #0e0c0a; text-shadow: 0 0 10px rgba(0, 0, 0, 0.6); }

.hero__title {
  position: relative;
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.95;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.hero__title span {
  display: block;
  font-weight: 400;
  font-style: italic;
  font-size: 0.36em;
  letter-spacing: 0.16em;
  color: rgba(243, 233, 210, 0.7);
  margin-bottom: 4px;
}
.hero__title em {
  font-style: italic;
  background: linear-gradient(180deg, #fff5d8 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 30px rgba(176, 138, 62, 0.3);
}

.hero__lede {
  position: relative;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(243, 233, 210, 0.85);
  max-width: 38ch;
  margin: 0 auto 44px;
  line-height: 1.5;
}

/* 2x2 of face-down cards, slightly fanned */
.hand {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}
.card-back {
  width: 70px;
  height: 100px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 235, 200, 0.1) 6px 7px),
    repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255, 235, 200, 0.1) 6px 7px),
    radial-gradient(circle at 50% 50%, var(--red) 0%, var(--red-deep) 100%);
  border: 3px solid var(--paper);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.3),
    inset 0 0 0 4px rgba(177, 38, 45, 0.6);
}
.card-back:nth-child(1) { transform: rotate(-4deg); }
.card-back:nth-child(2) { transform: rotate(3deg); }
.card-back:nth-child(3) { transform: rotate(2deg); }
.card-back:nth-child(4) { transform: rotate(-2deg); }

@media (max-width: 480px) {
  .card-back { width: 58px; height: 84px; }
  .hero { padding: 56px 20px 64px; }
}

/* ========== Paper section ========== */

.paper {
  position: relative;
  max-width: 760px;
  margin: -28px auto 0;
  padding: 56px 32px 48px;
  background: var(--paper);
  background-image:
    radial-gradient(rgba(74, 63, 51, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(74, 63, 51, 0.04) 1px, transparent 1px);
  background-size: 12px 12px, 24px 24px;
  background-position: 0 0, 6px 6px;
  border: 1px solid rgba(74, 63, 51, 0.18);
  border-top: none;
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.35),
    inset 0 0 80px rgba(176, 138, 62, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 34px);
  color: var(--ink);
  margin: 0 0 28px;
  text-align: center;
  justify-content: center;
  letter-spacing: 0.02em;
}
.rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  position: relative;
  max-width: 140px;
}
.rule::before {
  content: "";
  position: absolute;
  top: -2px;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.rule--left::before { right: 0; }
.rule--right::before { left: 0; }

.rule-block {
  margin: 0 0 28px;
}
.rule-block h3 {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.dingbat {
  font-size: 16px;
  color: var(--ink);
  transform: translateY(-1px);
}
.dingbat--red { color: var(--red); }

.rule-block p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.rule-block p:last-child { margin-bottom: 0; }

.rule-block ul {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 6px 0 10px;
  padding-left: 22px;
}
.rule-block ul li { margin-bottom: 6px; }
.rule-block strong { color: var(--ink); }
.rule-block em { color: var(--ink-soft); }

.rules + .cheat { margin-top: 56px; }

/* ========== Scorecards ========== */

.cheat__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 640px) {
  .cheat__grid { grid-template-columns: 1fr; }
}

.scorecard {
  margin: 0;
  background: var(--paper-soft);
  border: 1px solid rgba(74, 63, 51, 0.35);
  outline: 3px double rgba(74, 63, 51, 0.35);
  outline-offset: 4px;
  padding: 18px 18px 14px;
  box-shadow: 0 2px 0 rgba(74, 63, 51, 0.1);
}
.scorecard figcaption {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.scorecard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.scorecard th {
  text-align: left;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  padding: 6px 8px;
  border-bottom: 2px solid var(--ink);
}
.scorecard th:last-child { text-align: right; }
.scorecard td {
  padding: 9px 8px;
  border-bottom: 1px dashed rgba(74, 63, 51, 0.3);
  color: var(--ink);
}
.scorecard tbody tr:last-child td { border-bottom: none; }
.scorecard td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.scorecard td em { font-style: italic; color: var(--ink-soft); }
.scorecard .ink-red { color: var(--red); }

/* ========== Footer ornament ========== */

.paper__foot {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(74, 63, 51, 0.18);
  opacity: 0.7;
}

@media (max-width: 480px) {
  .paper { padding: 40px 22px 36px; }
  .rule-block p, .rule-block ul { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .back, .card-back { transition: none; }
}
