* { box-sizing: border-box; }

body { margin: 0; background: #fffaf0; color: #30251d; font-family: Arial, Helvetica, sans-serif; }
.rules-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px max(5%, calc((100% - 900px) / 2)); background: #ffd414; font-weight: 700; }
.rules-header a, .rules-footer a, .rules-main a:not(.registration a) { color: #81251c; }
.rules-main { max-width: 900px; min-height: 60vh; margin: 0 auto; padding: 40px 20px; }
h1 { margin: 0; color: #9c2c20; font-size: clamp(32px, 5vw, 48px); }
#rules-message { line-height: 1.5; }
#rules-message:empty { display: none; }
.registration { margin: 24px 0; }
.registration[hidden] { display: none; }
.registration a { display: inline-flex; gap: 24px; padding: 14px 22px; border-radius: 4px; background: #ba2c1e; color: #fff; font-weight: 700; text-decoration: none; }
.registration a:hover { background: #8d1c14; }
.rule-page { display: block; margin-top: 20px; border: 1px solid #ead8b7; background: #fff; }
.rule-page img { display: block; width: 100%; height: auto; }
a:focus-visible { outline: 3px solid #6b2118; outline-offset: 3px; }
.rules-footer { padding: 20px 5%; background: #fff1d2; font-size: 14px; }

@media (max-width: 600px) {
  .rules-header { padding: 16px; font-size: 14px; }
  .rules-main { padding: 28px 16px; }
}
