#measurement-consent, #measurement-consent * { box-sizing: border-box; }
.measurement-preferences {
    position: fixed; left: 1rem; bottom: .65rem; z-index: 1040;
    border: 1px solid #8993a7; border-radius: 8px; padding: .4rem .7rem;
    color: #202838; background: #fff; font: 500 .8rem/1.4 system-ui, sans-serif;
}
.measurement-panel {
    position: fixed; left: 1rem; bottom: 3.5rem; z-index: 1060;
    width: min(480px, calc(100vw - 2rem)); max-height: calc(100dvh - 5rem); overflow-y: auto;
    padding: 1.25rem; border: 1px solid #8993a7; border-radius: 14px;
    background: #fff; color: #202838; box-shadow: 0 8px 36px #11182726;
    font: 400 .95rem/1.55 system-ui, sans-serif;
}
.measurement-panel[hidden] { display: none; }
.measurement-panel h2 { margin: 0 0 .6rem; color: inherit; font: 650 1.1rem/1.4 system-ui, sans-serif; }
.measurement-panel h2:focus { outline: none; }
.measurement-panel p { margin: 0 0 1rem; }
.measurement-panel label { display: flex; align-items: flex-start; gap: .5rem; margin: .75rem 0; cursor: pointer; }
.measurement-panel input { margin-top: .35rem; accent-color: #4234a6; width: 1rem; height: 1rem; flex: 0 0 auto; }
.measurement-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.measurement-actions button {
    flex: 1 1 auto; min-height: 44px; padding: .5rem .75rem;
    border: 1px solid #6f668f; border-radius: 8px; background: #f7f5ff; color: #30235f; font: inherit;
}
#measurement-consent button { cursor: pointer; }
#measurement-consent button:focus-visible, #measurement-consent input:focus-visible {
    outline: 3px solid #6652d9; outline-offset: 3px;
}
@media (prefers-color-scheme: dark) {
    .measurement-panel, .measurement-preferences { background: #202332; color: #f5f4fa; border-color: #858ba0; }
    .measurement-actions button { background: #33304c; color: #f5f4fa; border-color: #9e94c5; }
}
