.tos-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0000008c;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: var(--font-family);
}

.tos-checkbox {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.tos-accept:focus {
    outline: none;
}

.tos-accept {
    border-radius: 8px;
    border: 1px solid #b6bac3;
    color: #a2a8b3;
    background: #edeef1;
    padding: 9.5px 30px;
    font-weight: 500;
    font-size: 14px;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.tos-accept:enabled {
    background: #2c9bf4;
    border-color: #3873c5;
    color: white;
}

.tos-overlay.active {
    display: flex;
}

.tos-consent-label-link {
    text-decoration: underline;
    cursor: pointer;
    color: #2196f3;
    font-size: 0.91rem;
}

.promo-link:focus {
    outline: none;
}

.tos-modal {
    background: #f8f9fa;
    max-width: 600px;
    width: calc(100% - 32px);
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #b6c6f680;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tos-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.tos-updated {
    font-size: 0.875rem;
    color: #7c8392;
    font-weight: 300;
    margin: 0;
}

.tos-consent-label-info {
    font-size: 0.875rem;
    font-weight: 500;
    color: #5b616e;
}

.tos-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    background: white;
    padding: 9px;
    border-radius: 6px;
}

.tos-body p,
.tos-body ul,
.tos-body ol,
.tos-body h2,
.tos-body h3,
.tos-body h4 {
    margin: 0 0 12px;
}

.tos-body p {
    color: #5b616e;
    font-weight: 300;
}

.tos-body h3 {
    color: #1e1f20;
    font-weight: 500;
    font-size: 14px;
}

.tos-body h2 {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 20px;
}

.tos-body h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 16px;
}

.tos-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 12px;
}

.tos-body ul {
    padding-left: 18px;
    list-style: disc;
}

.tos-body ol {
    padding-left: 18px;
    list-style: decimal;
}

.tos-body li {
    margin: 6px 0;
}

.tos-body a {
    color: #2563eb;
    text-decoration: underline;
}

.tos-body a:hover {
    text-decoration: none;
}

.tos-body b,
.tos-body strong {
    font-weight: 700;
}

.tos-consent {
    margin-top: 32px;
}

.tos-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.tos-consent input[type='checkbox'] {
    margin-top: 3px;
    accent-color: #2196f3;
}

.tos-consent input[type='checkbox']:focus-visible {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

.tos-actions {
    margin-top: 34px;
    text-align: right;
}

.tos-actions button[disabled],
.tos-actions button[aria-disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
}

.tos-icon {
    width: 37px;
    height: 44px;
}

.tos-consent-label-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tos-title {
    color: #1e1f20;
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 5px;
}

@media (max-width: 640px) {
    .tos-modal {
        width: min(600px, 100% - 24px);
        height: auto;
        max-height: clamp(320px, 72dvh, 624px);
        border-radius: 12px;
        padding: 16px 18px;
    }

    .tos-body {
        flex: 0 1 auto;
        max-height: 52dvh;
        overflow-y: auto;
    }

    .tos-header {
        margin-bottom: 16px;
    }
    .tos-actions {
        margin-top: 24px;
    }
}
