.analytics-consent {
    position: fixed;
    z-index: 10000;
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    margin: 0 auto;
    max-width: 760px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.55;
}

.analytics-consent[hidden] { display: none; }

.analytics-consent__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.analytics-consent__text {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.analytics-consent__text a {
    color: #0f766e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.analytics-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.analytics-consent__button {
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
}

.analytics-consent__button:hover { background: #f8fafc; }
.analytics-consent__button:focus-visible { outline: 3px solid rgba(20, 184, 166, 0.35); outline-offset: 2px; }
.analytics-consent__button--accept { border-color: #0f766e; background: #0f766e; color: #fff; }
.analytics-consent__button--accept:hover { background: #115e59; }

@media (min-width: 680px) {
    .analytics-consent { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
    .analytics-consent__actions { margin-top: 0; flex-wrap: nowrap; }
}

@media (prefers-color-scheme: dark) {
    .analytics-consent { border-color: rgba(255, 255, 255, 0.16); background: rgba(15, 23, 42, 0.98); color: #f8fafc; }
    .analytics-consent__text { color: #cbd5e1; }
    .analytics-consent__text a { color: #5eead4; }
    .analytics-consent__button { border-color: #475569; background: #1e293b; color: #f8fafc; }
    .analytics-consent__button:hover { background: #334155; }
    .analytics-consent__button--accept { border-color: #14b8a6; background: #0f766e; }
}
