:root {
  --ink: #f5e8c7;
  --muted: #cbbd9e;
  --gold: #d5aa5b;
  --gold-light: #f0d18a;
  --felt: #14392b;
  --felt-dark: #0a241b;
  --wine: #6f2638;
  --wood: #3a2115;
  --shadow: rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  background:
    radial-gradient(circle at 50% -20%, rgba(218, 159, 76, .22), transparent 38%),
    repeating-linear-gradient(90deg, transparent 0 90px, rgba(0,0,0,.07) 91px 94px),
    linear-gradient(120deg, #24130c, #4b2919 48%, #25140d);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.wood-frame {
  width: min(1180px, calc(100% - 28px));
  margin: 28px auto;
  padding: clamp(10px, 2vw, 22px);
  border: 1px solid #7a4c2a;
  border-radius: 36px;
  background: linear-gradient(145deg, #6a4024, #2c170e 45%, #53311e);
  box-shadow: 0 25px 70px rgba(0,0,0,.5), inset 0 0 0 3px #251109, inset 0 0 28px #120905;
}

.table {
  min-height: calc(100vh - 100px);
  padding: clamp(28px, 5vw, 68px);
  border: 2px solid #b07c3b;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(66, 125, 87, .28), transparent 34%),
    repeating-radial-gradient(circle at 20% 10%, transparent 0 5px, rgba(255,255,255,.012) 6px 7px),
    linear-gradient(135deg, var(--felt), var(--felt-dark));
  box-shadow: inset 0 0 80px rgba(0,0,0,.7);
}

.masthead { display: flex; align-items: center; gap: 24px; max-width: 850px; }
.crest {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 94px; height: 110px;
  color: #302010; font-size: 54px; font-weight: 700;
  background: linear-gradient(145deg, var(--gold-light), #9a6d2c);
  clip-path: polygon(50% 0, 92% 17%, 84% 78%, 50% 100%, 16% 78%, 8% 17%);
  filter: drop-shadow(0 8px 6px var(--shadow));
}

.eyebrow { margin: 0 0 8px; color: var(--gold); font: 700 11px/1.2 Arial, sans-serif; letter-spacing: .22em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--gold-light); font-size: clamp(36px, 7vw, 74px); line-height: .95; text-shadow: 0 4px 0 #513512; }
.subtitle { margin: 0; color: var(--muted); font-size: clamp(15px, 2vw, 19px); }

.notice {
  display: flex; align-items: center; gap: 12px;
  margin: 42px 0 55px; padding: 14px 18px;
  border: 1px solid rgba(213,170,91,.35); border-radius: 8px;
  background: rgba(2,18,12,.48);
}
.notice p { margin: 0; color: var(--muted); font-size: 14px; }
.notice strong { color: var(--ink); }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: #7ece88; box-shadow: 0 0 12px #7ece88; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
h2 { margin-bottom: 0; color: var(--ink); font-size: clamp(27px, 4vw, 42px); }
.table-count { margin: 0; color: var(--muted); font-style: italic; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.game-card {
  overflow: hidden;
  border: 1px solid rgba(213,170,91,.42); border-radius: 10px;
  background: #eadbb8; color: #322719;
  box-shadow: 0 13px 24px rgba(0,0,0,.28);
  transform: rotate(.35deg); transition: transform .2s ease, box-shadow .2s ease;
}
.game-card:nth-child(2) { transform: rotate(-.45deg); }
.game-card:hover { transform: translateY(-6px) rotate(0); box-shadow: 0 20px 32px rgba(0,0,0,.42); }
.card-art { display: grid; place-items: center; height: 130px; color: #f5dfaa; font-size: 68px; text-shadow: 0 4px 10px rgba(0,0,0,.5); }
.dice { background: radial-gradient(circle, #9f3b43, #491622); }
.cards { background: radial-gradient(circle, #986f35, #4b3018); }
.map { background: radial-gradient(circle, #3f6a5a, #163d31); }
.card-copy { padding: 20px; }
.tag-row { display: flex; justify-content: space-between; align-items: center; color: #75654d; font: 12px Arial, sans-serif; }
.tag { padding: 5px 8px; border-radius: 20px; color: #fff2d4; background: var(--wine); }
h3 { margin: 17px 0 8px; font-size: 24px; }
.card-copy p { min-height: 64px; color: #655640; line-height: 1.6; font-size: 14px; }
button { font: inherit; }
.card-copy button {
  width: 100%; padding: 11px 14px;
  border: 1px solid #8b6a36; border-radius: 4px;
  color: #f9e9c1; background: linear-gradient(#664226, #3a2415);
  cursor: pointer;
}
.card-copy button:hover { color: #fff; background: linear-gradient(#815731, #4a2e1a); }

footer { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 58px; color: #9f8f70; text-align: center; font-size: 12px; letter-spacing: .08em; }
footer p { margin: 0; }

dialog {
  width: min(480px, calc(100% - 32px)); padding: 34px;
  border: 1px solid var(--gold); border-radius: 10px;
  color: var(--ink); background: linear-gradient(145deg, #173c2e, #091e17);
  box-shadow: 0 24px 70px #000;
}
dialog::backdrop { background: rgba(6, 9, 7, .76); backdrop-filter: blur(3px); }
dialog > p:last-child { margin: 16px 0 0; color: var(--muted); line-height: 1.7; }
.dialog-close { position: absolute; top: 10px; right: 14px; border: 0; color: var(--muted); background: none; font-size: 30px; cursor: pointer; }

@media (max-width: 780px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-card { display: grid; grid-template-columns: 120px 1fr; transform: none !important; }
  .card-art { height: 100%; min-height: 210px; }
  .masthead { align-items: flex-start; }
  .crest { width: 65px; height: 78px; font-size: 38px; }
}

@media (max-width: 520px) {
  .wood-frame { width: 100%; margin: 0; padding: 7px; border-radius: 0; }
  .table { min-height: 100vh; padding: 28px 19px; border-radius: 12px; }
  .masthead { display: block; }
  .crest { margin-bottom: 20px; }
  .notice { margin: 28px 0 40px; }
  .section-heading { align-items: flex-start; }
  .game-card { display: block; }
  .card-art { min-height: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
