/* Policy Modal Styles (Parchment RPG Style) */
.policy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.policy-modal-overlay.active {
    display: flex;
}

.policy-modal-container {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    animation: modal-journal-open 0.4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

@keyframes modal-journal-open {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.policy-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #4a3520;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.policy-modal-close:hover {
    transform: rotate(90deg);
    color: #8b0000;
}

.policy-modal-body {
    padding: 20px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8b6914 rgba(0, 0, 0, 0.1);
}

.policy-modal-body::-webkit-scrollbar {
    width: 8px;
}

.policy-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.policy-modal-body::-webkit-scrollbar-thumb {
    background: #8b6914;
    border-radius: 4px;
}

/* Policy Content Typing Style */
.policy-content-ink {
    color: #2f1e0d;
    font-family: 'Inter', -apple-system, sans-serif;
}

.policy-content-ink h2 {
    margin: 24px 0 16px;
    font-size: 22px;
    border-bottom: 2px solid rgba(139, 105, 20, 0.3);
    padding-bottom: 8px;
}

.policy-content-ink h3 {
    margin: 20px 0 12px;
    font-size: 18px;
}

.policy-content-ink p {
    margin-bottom: 12px;
    line-height: 1.7;
}

.policy-content-ink ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.policy-content-ink li {
    margin-bottom: 8px;
}

.policy-highlight {
    color: #8b0000;
    font-weight: bold;
}

/* Join Page Checkbox Adjustment */
.join-checkbox-group-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(139, 105, 20, 0.2);
}

.join-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 0 !important;
}

.join-checkbox-label {
    font-size: 13px;
    color: #4a3520;
    cursor: pointer;
}

.join-policy-link {
    color: #8b6914;
    text-decoration: underline;
    font-weight: bold;
    margin-left: 4px;
}

.join-policy-link:hover {
    color: #5d460d;
}