#legal-links {
    position: fixed;
    left: 12px;
    bottom: 10px;
    z-index: 1200;
    display: flex;
    gap: 6px;
}
#legal-links a {
    background: rgba(255, 255, 255, .9);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: .8rem;
    color: #374151;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
#legal-links a:hover { background: #fff; }

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(17, 24, 39, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay[hidden] { display: none; }
.modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    max-width: 460px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #111827;
}
.modal h2 { margin: 0 0 12px; font-size: 1.3rem; }
.modal h3 { margin: 20px 0 8px; font-size: 1.05rem; }
.modal p { line-height: 1.5; }
.modal .muted { color: #6b7280; }
.modal .small { font-size: .85rem; }
.modal-close {
    position: absolute; top: 10px; right: 12px;
    border: none; background: none; font-size: 1.6rem; line-height: 1;
    color: #9ca3af; cursor: pointer;
}
.modal-close:hover { color: #374151; }

.modal .field { margin-bottom: 12px; }
.modal label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .9rem; }
.modal input, .modal textarea {
    width: 100%; box-sizing: border-box; padding: 9px;
    border: 1px solid #cbd2dc; border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 14px; }
.btn-primary {
    padding: 10px 20px; border: none; border-radius: 8px;
    background: #2563eb; color: #fff; font-weight: 700; cursor: pointer; font-size: 1rem;
}
.btn-primary:hover { filter: brightness(.95); }
.btn-primary:disabled { opacity: .6; cursor: default; }
