/* RULES PAGE — rankmember / server 페이지 톤과 맞춤 */

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

.rules-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 36px;
}

.page-header h0 {
    color: #F29FA4;
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 16px;
    letter-spacing: 0.02em;
}

.page-header p {
    color: #B98A8A;
    font-size: 1.1em;
    margin: 0;
}

.rules-card {
    background-color: #fff;
    padding: 28px 32px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(242, 159, 164, 0.08);
    border: 1px solid #fceff0;
}

.rules-card:last-of-type {
    margin-bottom: 32px;
}

.rules-card-title {
    color: #F29FA4;
    font-size: 1.35em;
    font-weight: bold;
    margin: 0 0 20px;
    padding-left: 12px;
    border-left: 4px solid #F29FA4;
    letter-spacing: 0.02em;
    font-family: 'Nexa Bold', 'NanumSquareEB', 'Apple SD Gothic Neo', Arial, sans-serif;
}

.rules-subtitle {
    color: #A17272;
    font-size: 1.05em;
    font-weight: 700;
    margin: 24px 0 14px;
    font-family: 'Nexa Bold', 'NanumSquareEB', 'Apple SD Gothic Neo', Arial, sans-serif;
}

.rules-subtitle:first-of-type {
    margin-top: 0;
}

.rules-card p {
    color: #8a5f5f;
    line-height: 1.75;
    margin: 0 0 14px;
    text-align: left;
    font-size: 0.98em;
}

.rules-card p:last-child {
    margin-bottom: 0;
}

.rules-lead {
    font-size: 1.05em;
    color: #5a3f3f;
}

.rules-motto {
    margin: 12px 0 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fff7f7 0%, #ffe9ec 100%);
    border-radius: 12px;
    border: 1px solid #f5d8dc;
    text-align: center;
    line-height: 1.55;
}

.rules-motto strong {
    color: #A17272;
    font-weight: 800;
}

.rules-ol {
    margin: 0;
    padding-left: 1.35em;
    color: #8a5f5f;
    line-height: 1.75;
    font-size: 0.98em;
}

.rules-ol li {
    margin-bottom: 12px;
    padding-left: 6px;
}

.rules-ol li:last-child {
    margin-bottom: 0;
}

.rules-ol code {
    font-size: 0.9em;
    padding: 2px 8px;
    background: #fff5f6;
    border: 1px solid #f5d8dc;
    border-radius: 6px;
    color: #A17272;
}

/* 디스코드 || 본문 || 구문 강조 */
.rules-code-pipe {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
    padding: 1px 5px;
    margin: 0 1px;
}

/* 디스코드 스포일러 데모: 클릭 전 회색 바로 가림, 클릭 후 표시 */
.rules-spoiler-demo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 8px;
    padding: 10px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #f6f7f9;
    border: 1px solid #e3e5e8;
    border-radius: 8px;
}

.rules-spoiler-demo-label {
    font-size: 0.8em;
    font-weight: 700;
    color: #72767d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rules-spoiler-hint {
    font-size: 0.78em;
    color: #949ba4;
    margin-left: auto;
}

.discord-spoiler {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    background: #b5bac1;
    color: transparent !important;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    outline: none;
}

.discord-spoiler:hover {
    background: #9da3ac;
}

.discord-spoiler:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #F29FA4;
}

.discord-spoiler.is-revealed {
    background: rgba(242, 159, 164, 0.12);
    color: #6d4c4c !important;
    cursor: default;
    border: 1px solid rgba(242, 159, 164, 0.35);
}

.discord-spoiler.is-revealed:hover {
    background: rgba(242, 159, 164, 0.16);
}

.rules-card--notice {
    background: linear-gradient(135deg, #fff7f7 0%, #ffe9ec 100%);
    border-color: #f5d8dc;
}

.rules-card--notice .rules-card-title {
    border-left-color: #e88d92;
}

.rules-card--notice p {
    margin-bottom: 0;
    color: #8a5f5f;
}

.rules-card--notice p + p {
    margin-top: 14px;
}

@media (max-width: 720px) {
    .rules-page {
        padding: 12px;
        margin: 20px auto;
    }

    .page-header h0 {
        font-size: 2em;
    }

    .rules-card {
        padding: 20px 18px;
        border-radius: 14px;
    }

    .rules-card-title {
        font-size: 1.2em;
    }

    .rules-ol {
        padding-left: 1.2em;
        font-size: 0.93em;
    }
}
