:root {
  --paper: #f5efe3;
  --paper-strong: #efe4d1;
  --ink: #21201d;
  --muted: #5f5a51;
  --accent: #cc5a2f;
  --accent-dark: #973d1f;
  --accent-soft: #f1c6a6;
  --panel: #fffaf2;
  --panel-edge: rgba(33, 32, 29, 0.12);
  --board-bg: #d9c9ac;
  --empty: #f7f1e5;
  --filled: #d26538;
  --filled-deep: #9a3c22;
  --valid: rgba(30, 126, 98, 0.28);
  --invalid: rgba(178, 46, 26, 0.22);
  --shadow: 0 18px 46px rgba(67, 42, 18, 0.12);
  --radius: 24px;
  --mono: "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 38%),
    linear-gradient(180deg, #f3eadb 0%, #f7f3eb 45%, #f1e7d7 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.site-header,
.site-footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 12px 0 6px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.brand-row,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.top-nav a,
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
}

.top-nav a:hover,
.footer-nav a:hover,
.related-grid a:hover {
  color: var(--accent-dark);
}

.text-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.hero {
  padding: 0 0 8px;
}

.hero-copy,
.panel-card,
.game-card,
.content-card,
.faq-card,
.site-footer,
.simple-page {
  background: rgba(255, 250, 242, 0.86);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 16px 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

h1,
h2 {
  margin: 0 0 14px;
  line-height: 1.06;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
}

.hero-intro,
.section-note,
.content-card p,
.faq-card p,
.simple-page p,
.simple-page li {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions,
.hero-points,
.related-grid,
.faq-list,
.game-meta,
.game-layout,
.content-grid {
  display: grid;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: #fff8f0;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(33, 32, 29, 0.18);
}

.related-grid a {
  background: var(--paper);
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(33, 32, 29, 0.1);
}

.panel-card,
.game-card {
  padding: 22px;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(241, 226, 200, 0.9)),
    var(--panel);
}

.panel-card ul,
.content-card ul,
.simple-page ul {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.game-shell {
  padding: 0 0 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.iframe-panel {
  padding: 18px;
  background: var(--panel);
  border-radius: 22px;
  border: 1px solid rgba(33, 32, 29, 0.08);
}

.iframe-shell {
  position: relative;
  width: min(100%, 420px);
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  height: clamp(480px, 58vh, 620px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #111;
}

.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #f7efe2;
  background:
    radial-gradient(circle at top, rgba(210, 101, 56, 0.35), transparent 38%),
    linear-gradient(180deg, #1d1512, #120e0d);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.iframe-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.quick-facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 10px 0 0;
}

.quick-facts li {
  background: var(--paper);
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(33, 32, 29, 0.1);
  text-align: center;
  font-weight: 700;
}

.embed-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 8px 0 22px;
}

.content-card {
  padding: 24px;
}

.related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-group + .related-group {
  margin-top: 16px;
}

.related-group h3 {
  margin: 0 0 10px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.related-grid a {
  text-decoration: none;
  font-weight: 700;
}

.link-grid a {
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(33, 32, 29, 0.1);
}

.faq-section {
  padding-bottom: 28px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 0 0 22px;
}

.feature-card {
  background: rgba(255, 250, 242, 0.86);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.faq-card {
  padding: 26px;
}

.faq-list {
  gap: 12px;
}

details {
  border: 1px solid rgba(33, 32, 29, 0.1);
  border-radius: 18px;
  background: var(--paper);
  padding: 14px 16px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin: 10px 0 0;
}

.site-footer {
  padding: 24px 26px;
  margin-bottom: 32px;
}

.footer-brand {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-copy p:last-child {
  margin: 0;
  color: var(--muted);
}

.simple-page-wrap {
  width: min(860px, calc(100% - 32px));
  margin: 32px auto;
}

.simple-page {
  padding: 36px;
}

.simple-page .back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 960px) {
  .content-grid,
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .related-grid,
  .link-grid,
  .quick-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  main,
  .simple-page-wrap {
    width: min(100%, calc(100% - 12px));
  }

  .site-header {
    padding: 8px 0 4px;
  }

  .breadcrumb,
  .top-nav {
    display: none;
  }

  .brand-row,
  .site-footer,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-meta {
    grid-template-columns: 1fr;
  }

  .game-card,
  .hero-copy,
  .panel-card,
  .content-card,
  .faq-card,
  .simple-page {
    padding: 14px;
  }

  .iframe-panel {
    padding: 12px;
  }

  .section-head {
    gap: 10px;
  }

  .section-head .button-secondary {
    width: 100%;
  }

  .iframe-shell {
    width: 100%;
    max-width: none;
    height: clamp(540px, 74vh, 720px);
  }

  .quick-facts li {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.1rem;
  }

  .hero-copy {
    padding: 12px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.75rem;
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .game-card {
    padding: 12px;
  }

  .iframe-panel {
    padding: 10px;
  }

  .iframe-shell {
    border-radius: 18px;
    height: min(78vh, 720px);
  }
}
