.rules-page {
    padding-top: 1.75rem;
    padding-bottom: 3.5rem;
}

.rules-stage {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.15rem;
    padding: 2.6rem 1.5rem 1.45rem;
    border-radius: 1.6rem;
    background:
        radial-gradient(ellipse 42% 90% at 100% 0%, rgba(28, 99, 179, 0.2), transparent 62%),
        linear-gradient(155deg, #eef6fd, #fff 68%);
    border: 1px solid rgba(28, 99, 179, 0.12);
}

.rules-stage-copy { max-width: 40rem; }

.rules-stage .section-title {
    font-size: clamp(1.5rem, 3vw, 2.05rem);
    font-weight: 800;
    line-height: 1.4;
}

.rules-lead {
    margin: 0.7rem 0 0;
    color: var(--ink-muted);
    font-size: 0.98rem;
    line-height: 1.9;
}

.rules-stage-mark {
    flex: none;
    display: grid;
    justify-items: center;
    align-content: center;
    width: 5.4rem;
    height: 5.4rem;
    border-radius: 1.35rem;
    background: #fff;
    color: var(--brand);
    box-shadow: 0 12px 28px rgba(28, 99, 179, 0.14);
}

.rules-stage-mark strong {
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 800;
}

.rules-stage-mark span {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 800;
}

.rules-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem 0.9rem;
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
}

.rules-item {
    position: relative;
    min-width: 0;
    scroll-margin-top: 5.5rem;
    padding: 2.85rem 1.2rem 1.2rem;
    border-radius: 1.3rem;
    background: #fff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.05);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.rules-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(28, 99, 179, 0.12);
}

.rules-item:target {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 16px 34px rgba(28, 99, 179, 0.14);
}

.rules-badge {
    position: absolute;
    top: -0.85rem;
    inset-inline-start: 1rem;
    width: 2.55rem;
    height: 2.55rem;
    display: grid;
    place-items: center;
    border-radius: 0.85rem;
    background: var(--brand);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(28, 99, 179, 0.28);
}

.rules-item h2 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
}

.rules-item p,
.rules-points {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.9;
}

.rules-points {
    display: grid;
    gap: 0.4rem;
    padding: 0;
    list-style: none;
}

.rules-points li {
    position: relative;
    padding-inline-start: 0.85rem;
}

.rules-points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.72rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 99px;
    background: var(--brand);
}

[data-theme="dark"] .rules-stage {
    background:
        radial-gradient(ellipse 42% 90% at 100% 0%, rgba(90, 162, 240, 0.2), transparent 62%),
        linear-gradient(155deg, #15283f, #112033 70%);
    border-color: rgba(238, 244, 251, 0.08);
}

.rules-note {
    margin-top: 1.5rem;
    padding: 1.45rem 1.35rem 1.3rem;
    border-radius: 1.3rem;
    background: #fff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.05);
}

.rules-note p {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 2.05;
    text-align: justify;
    text-align-last: start;
}

.rules-note p + p { margin-top: 0.9rem; }

[data-theme="dark"] .rules-stage-mark,
[data-theme="dark"] .rules-item,
[data-theme="dark"] .rules-note {
    background: #14283f;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .rules-stage-mark { color: var(--brand); }

@media (max-width: 767.98px) {
    .rules-stage {
        flex-direction: column;
        align-items: flex-start;
    }

    .rules-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .rules-item { transition: none; }
}
