.rules-page {
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(185, 138, 60, 0.14), transparent 70%),
    #14120f;
}

.rules-topbar-note {
  margin: 0 0 0 auto;
  color: #cfc2ab;
  font-size: 0.78rem;
}

.rules-main {
  display: grid;
  align-content: start;
  gap: clamp(0.9rem, 2.5vw, 1.5rem);
  box-sizing: border-box;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.rules-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #3c362c;
  border-radius: 12px;
  background: #1d1a15;
}

.rules-toc a {
  color: #f0c26b;
  font-size: 0.82rem;
  text-decoration: none;
}

.rules-toc a:hover {
  text-decoration: underline;
}

.rules-panel {
  display: grid;
  gap: 0.6rem;
  padding: clamp(0.9rem, 2.5vw, 1.4rem);
  border: 1px solid #4a4337;
  border-radius: 14px;
  background: linear-gradient(160deg, #221e18, #191612);
  scroll-margin-top: 0.8rem;
}

.rules-panel h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #f7e7b8;
}

.rules-hint {
  margin: 0;
  color: #cfc2ab;
  font-size: 0.85rem;
  line-height: 1.65;
}

.rules-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.15rem;
  color: #d9cdb8;
  font-size: 0.88rem;
  line-height: 1.65;
}

.rules-list strong {
  color: #f7e7b8;
}

.rules-panel code {
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: #14120f;
  color: #f0c26b;
  font-size: 0.85em;
}

.rules-table-wrap {
  overflow-x: auto;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  line-height: 1.55;
}

.rules-table th,
.rules-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #3c362c;
  text-align: left;
  vertical-align: top;
}

.rules-table thead th {
  color: #f0c26b;
  font-weight: 600;
  white-space: nowrap;
}

.rules-table tbody th {
  color: #f7e7b8;
  font-weight: 600;
  white-space: nowrap;
}

.rules-table td {
  color: #d9cdb8;
}

.rules-related {
  margin: 0;
  color: #cfc2ab;
  font-size: 0.82rem;
  line-height: 1.65;
}

.rules-related a {
  color: #f0c26b;
}
