#analytics-card {
    position: fixed;
    z-index: 10;
    left: 12px;
    bottom: 12px;
    box-sizing: border-box;
    width: min(340px, calc(100% - 24px));
    padding: 15px;
    border: 1px solid #e9e9eb;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 30px #1d1d1f29, 0 2px 6px #1d1d1f0d;
    color: #1d1d1f;
    font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#analytics-card.analytics-inline {
    position: relative;
    bottom: auto;
    margin-block: 12px;
}

#analytics-card.analytics-obscures-control { visibility: hidden; }
#analytics-card h2 {
    margin: 0;
    padding-right: 36px;
    font: 700 16px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: normal;
}
#analytics-card p { margin: 7px 0 12px; color: #45454b; }
#analytics-card button { font: inherit; cursor: pointer; }
#analytics-card .analytics-close {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #55555b;
    font-size: 23px;
}
#analytics-card .analytics-close:hover { background: #f5f5f7; }
#analytics-card .analytics-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#analytics-card [data-choice] {
    min-width: 85px;
    min-height: 36px;
    border: 1px solid #d9d9dd;
    border-radius: 9px;
    background: #e9e9ed;
    color: #1d1d1f;
    font-weight: 600;
}
#analytics-card [data-choice="allow"] {
    border-color: #0066cc;
    background: #0066cc;
    color: #fff;
}
#analytics-card a {
    color: #0066cc;
    text-decoration: underline;
    text-underline-offset: 2px;
}
#analytics-choices {
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}
#analytics-card :focus-visible, #analytics-choices:focus-visible, #visitor-analytics:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}
@media (max-width: 520px), (pointer: coarse) {
    #analytics-card [data-choice] { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
    #analytics-card [data-choice="allow"] { transition: box-shadow .2s ease, transform .2s ease; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    #analytics-card [data-choice="allow"]:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px #0000000d;
    }
}
