#analytics-consent[hidden], #analytics-preferences[hidden] { display: none !important; }
#analytics-consent { position: fixed; z-index: 10000; bottom: 1rem; left: 1rem; width: min(28rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; box-sizing: border-box; padding: 1.4rem; background: #fffdf8; color: #23281f; border: 1px solid #d9d8ce; border-radius: .5rem; box-shadow: 0 6px 30px #0002; font: 400 15px/1.5 system-ui, sans-serif; text-align: left; }
#analytics-consent h2 { font: 600 18px/1.3 system-ui, sans-serif; margin: 0 0 .65rem; color: inherit; letter-spacing: normal; text-transform: none; }
#analytics-consent p { font: inherit; margin: 0 0 1rem; color: inherit; }
#analytics-consent > div { display: flex; gap: .7rem; }
#analytics-consent button { flex: 1; min-height: 44px; padding: .65rem .9rem; background: #23281f; color: #fffdf8; border: 1px solid #23281f; border-radius: .25rem; font: 600 15px/1.3 system-ui, sans-serif; cursor: pointer; letter-spacing: normal; text-transform: none; }
#analytics-consent button:hover { background: #3e4935; border-color: #3e4935; }
#analytics-consent button[data-analytics-choice="denied"] { background: #fffdf8; color: #23281f; border-color: #8a9081; }
#analytics-consent button[data-analytics-choice="denied"]:hover { background: #e2e3d8; border-color: #737a69; }
#analytics-consent button:focus-visible, #analytics-preferences:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#analytics-consent button:focus-visible { outline-color: #23281f; }
#analytics-preferences { display: block; margin: 1rem auto; padding: .5rem; min-height: 44px; background: transparent; color: inherit; border: 0; font: 400 13px/1.5 system-ui, sans-serif; text-decoration: underline; cursor: pointer; letter-spacing: normal; text-transform: none; }

#analytics-consent details { margin: -.35rem 0 1rem; font: inherit; color: inherit; border: 0; padding: 0; }
#analytics-consent summary { cursor: pointer; font: inherit; font-size: 13px; color: inherit; text-decoration: underline; padding: .35rem 0; }
#analytics-consent details p { font-size: 13px; margin: .5rem 0; }
#analytics-consent a { color: inherit; text-decoration: underline; }
#analytics-consent summary:focus-visible, #analytics-consent a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Vivant: a stamped card on yellow paper, with the same pills as the wine filters. */
[data-theme="vivant"] {
  #analytics-consent { bottom: 1.25rem; left: 1.25rem; padding: 1.5rem 1.5rem 1.35rem; background: var(--sun); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--tomato); font: 400 .9375rem/1.55 var(--text); transform: rotate(-1deg); transform-origin: 0 100%; animation: v-consent-in .5s var(--ease) both; }
  #analytics-consent h2 { width: fit-content; margin: 0 0 .8rem; padding-bottom: 8px; background: var(--squiggle) left bottom / 24px 6px repeat-x; font: 700 1.375rem/1.1 var(--display); letter-spacing: -.02em; }
  #analytics-consent summary, #analytics-consent details p { font: 500 .8125rem/1.5 var(--display); }
  #analytics-consent details p { font-family: var(--text); }
  #analytics-consent summary { width: fit-content; color: var(--tomato); text-underline-offset: 4px; }
  #analytics-consent > div { gap: 10px; }
  #analytics-consent button { min-height: 48px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 .9375rem/1 var(--display); }
  #analytics-consent button:hover { background: var(--tomato); border-color: var(--tomato); }
  #analytics-consent button[data-analytics-choice="denied"] { background: transparent; color: var(--ink); border-color: var(--ink); }
  #analytics-consent button[data-analytics-choice="denied"]:hover { background: var(--paper); border-color: var(--ink); }
  #analytics-consent :focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; }
  .footer-attribution #analytics-preferences { display: inline; min-height: 0; margin: 0; padding: 0; font: inherit; text-underline-offset: 3px; }
  .footer-attribution #analytics-preferences::before { content: '·'; display: inline-block; margin: 0 .3em; text-decoration: none; }
  @media (max-width: 740px) {
    #analytics-consent { bottom: .75rem; left: .75rem; width: calc(100vw - 1.5rem - 6px); max-height: calc(100dvh - 1.5rem); transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    #analytics-consent { animation: none; }
  }
}
@keyframes v-consent-in { from { opacity: 0; transform: translateY(24px) rotate(2deg); } }
