.rules-main,
.error-main {
  background:
    radial-gradient(circle at 88% 2%, rgba(154, 215, 101, 0.11), transparent 29rem),
    var(--paper-light);
}

.rules-wrap {
  width: min(980px, calc(100% - 56px));
  margin: 0 auto;
  padding: 58px 0 40px;
}

.rules-hero {
  max-width: 740px;
  margin-bottom: 42px;
}

.rules-hero h1,
.error-copy h1 {
  margin: 10px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.rules-hero p,
.error-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.rules-panel {
  overflow: hidden;
  background: rgba(250, 247, 241, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(52, 61, 45, 0.04);
}

.rules-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.46fr);
  gap: 36px;
  align-items: end;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.rules-panel-head h2 {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.rules-panel-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.rule-list {
  margin: 0;
  padding: 0 30px;
  list-style: none;
}

.rule {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.rule:last-child {
  border-bottom: 0;
}

.rule-number {
  display: grid;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--forest);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  place-items: center;
}

.rule h3 {
  margin: 1px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.rule p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.rules-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 22px 30px 30px;
  padding: 18px;
  color: var(--forest);
  background: rgba(184, 215, 127, 0.24);
  border: 1px solid rgba(36, 86, 63, 0.14);
  border-radius: 10px;
}

.rules-note svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rules-note p {
  margin: 0;
  font-size: 0.86rem;
}

.rules-note code {
  background: rgba(255, 255, 255, 0.5);
}

.rules-footer {
  margin-top: 42px;
}

.error-main {
  display: grid;
  min-height: 0;
  place-items: center;
}

.error-copy {
  width: min(680px, calc(100% - 40px));
  text-align: center;
}

.error-code {
  display: block;
  margin-bottom: 8px;
  color: var(--forest-mid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.error-copy p {
  margin-right: auto;
  margin-left: auto;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

@media (max-width: 680px) {
  .rules-wrap {
    width: min(100% - 28px, 980px);
    padding-top: 44px;
  }

  .rules-panel {
    border-radius: 12px;
  }

  .rules-panel-head {
    display: block;
    padding: 22px;
  }

  .rules-panel-head p {
    margin-top: 14px;
  }

  .rule-list {
    padding: 0 22px;
  }

  .rule {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 13px;
    padding: 22px 0;
  }

  .rule-number {
    width: 36px;
    height: 36px;
  }

  .rules-note {
    margin: 18px 22px 22px;
  }
}
