.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(540px, 100%); padding: 22px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.modal h2 { margin: 0 42px 10px 0; }
.modal [data-modal-body] { color: var(--muted); line-height: 1.6; }
.modal-close { float: right; width: 34px; height: 34px; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.modal-actions[hidden] { display: none; }
.modal-actions button { min-height: 40px; padding: 0 16px; color: var(--text); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.modal-actions .primary { border-color: var(--color-primary); color: #ffffff; background: var(--color-primary); font-weight: 700; }
.modal-actions .danger { border-color: rgba(251, 113, 133, .35); color: #ffffff; background: #9f1239; }
.cookie-consent { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: min(620px, calc(100% - 36px)); display: grid; gap: 14px; padding: 18px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.cookie-consent p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cookie-prefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 2px; }
.cookie-prefs[hidden] { display: none; }
.cookie-prefs label { display: flex; gap: 8px; align-items: center; min-height: 40px; padding: 0 10px; color: var(--muted); background: var(--bg-card-soft); border: 1px solid var(--line); border-radius: var(--radius-md); }
.cookie-prefs input { width: 16px; height: 16px; accent-color: var(--brand); }

[data-theme="light"] .modal-backdrop { background: rgba(17, 24, 39, .42); }
[data-theme="light"] .modal,
[data-theme="light"] .cookie-consent { box-shadow: var(--shadow); }

@media (max-width: 720px) {
    .cookie-actions { justify-content: stretch; }
    .cookie-actions .pill { flex: 1 1 160px; }
    .cookie-prefs { grid-template-columns: 1fr; }
}
