.rules-page {
  --ink: #2f261c;
  --muted: #6e5c48;
  --gold: #d4a017;
  --cream: #fff8ee;
  background:
    radial-gradient(900px 380px at 0% 0%, rgba(255, 200, 120, 0.28), transparent 50%),
    linear-gradient(180deg, #fff4e6 0%, #fffdf8 40%, #f7efe2 100%);
  color: var(--ink);
}

.rules-hero {
  position: relative;
  overflow: hidden;
  min-height: min(48vh, 420px);
  display: grid;
  place-items: end center;
  border-radius: 0 0 28px 28px;
  background: #ead4a8;
}

.rules-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rules-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40, 24, 8, 0.05) 0%, rgba(40, 24, 8, 0.62) 100%);
}

.rules-hero-inner {
  position: relative;
  z-index: 1;
  width: min(840px, calc(100% - 32px));
  padding: 0 0 32px;
  color: #fffaf2;
  text-align: center;
}

.rules-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.28;
}

.rules-wrap {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.rules-kicker {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 233, 168, 0.22);
  border: 1px solid rgba(255, 228, 160, 0.45);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.rules-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.rules-toc a {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(212, 160, 23, 0.28);
  color: #5a3a10;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.rules-callout {
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff4d6;
  border-left: 5px solid var(--gold);
}

.rules-callout strong { display: block; margin-bottom: 6px; font-size: 1.02rem; }
.rules-callout p { margin: 0; line-height: 1.75; color: #5a3a10; }

.rules-repeat {
  margin: 18px 0 28px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #7a4a08;
}

.rules-chapter { margin: 0 0 48px; }
.rules-chapter h2 {
  margin: 0 0 14px;
  font-size: clamp(1.28rem, 2.4vw, 1.75rem);
  font-weight: 900;
}

.rules-prose p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #3a2e22;
}

.rules-figure {
  margin: 18px 0 22px;
  border-radius: 20px;
  overflow: hidden;
  background: #efe4cf;
  box-shadow: 0 16px 36px rgba(80, 50, 20, 0.12);
}

.rules-figure img { display: block; width: 100%; height: auto; }
.rules-figure figcaption {
  padding: 10px 14px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  background: #fffaf2;
}

.rules-steps {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
}

.rules-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(80, 50, 20, 0.06);
}

.rules-step b {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f3c84a, #d4a017);
  color: #3d2800;
}

.rules-step p { margin: 0; font-size: 0.98rem; line-height: 1.65; color: var(--muted); }
.rules-step strong { color: var(--ink); }

.rules-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.rules-card {
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(212, 160, 23, 0.22);
}

.rules-card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 800; }
.rules-card p { margin: 0; font-size: 0.92rem; line-height: 1.7; color: var(--muted); }

.rules-mark {
  background: linear-gradient(180deg, transparent 55%, #ffe08a 55%);
  font-weight: 800;
}

.rules-table-wrap {
  overflow: auto;
  border-radius: 16px;
  margin: 16px 0 8px;
  box-shadow: 0 8px 20px rgba(80, 50, 20, 0.08);
}

.rules-table {
  width: 100%;
  min-width: 520px;
  margin: 0;
  background: #fff;
}

.rules-table th {
  background: #3d2a14;
  color: #fffaf2;
  font-size: 0.82rem;
  padding: 10px 12px;
}

.rules-table td {
  padding: 10px 12px;
  font-size: 0.9rem;
  border-top: 1px solid #f0e6d4;
}

.rules-table tr.is-hot td { background: #fff6d8; font-weight: 700; }

.mono-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 240px;
  margin: 12px auto;
}

.mono-grid span {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #e8d7b4;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6a5438;
}

.mono-grid span.is-c {
  background: #f3c84a;
  color: #3d2800;
}

.rules-cheat {
  margin: 8px 0 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed rgba(212, 160, 23, 0.55);
}

.rules-cheat ul { margin: 8px 0 0; padding-left: 1.15rem; }
.rules-cheat li { margin: 0 0 6px; line-height: 1.6; }

.rules-source {
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

.rules-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.rules-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none !important;
}

.rules-btn-gold {
  background: linear-gradient(180deg, #f3c84a, #d4a017);
  color: #3d2800 !important;
}

.rules-btn-soft {
  background: #fff;
  color: #5a3a10 !important;
  border: 1px solid rgba(212, 160, 23, 0.4);
}

@media (max-width: 720px) {
  .rules-grid2 { grid-template-columns: 1fr; }
  .rules-hero { min-height: 38vh; }
}
