/* The cookie banner (consent.js): Literess caught with a cookie, after Transept's
   banner (adopted 2026-11-23). Her picture beside a paper card whose tail points at
   her; Accept all (honey, ink label) and Reject all (ink) carry equal weight.
   Reads only tokens.css. On a phone: one card along the bottom, her face small in
   its head, so it never covers a page's main button for long. */
.cookie-banner {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  display: flex; align-items: flex-end; gap: 12px; max-width: 520px;
  color: var(--ink); font: 0.95rem/1.5 var(--sans);
}
.cookie-her { flex: none; width: 120px; height: 120px; margin-bottom: -8px; pointer-events: none; user-select: none; filter: drop-shadow(0 14px 18px rgba(28, 25, 23, 0.28)); }
.cookie-card {
  position: relative; flex: 1; padding: 16px 20px 14px;
  background: radial-gradient(140% 80% at 0% 0%, var(--honey-soft), transparent 60%) var(--paper);
  border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--lift);
}
/* The speech-bubble tail, pointing back at her */
.cookie-card::before {
  content: ''; position: absolute; left: -9px; bottom: 28px; width: 16px; height: 16px;
  background: var(--paper); border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg);
}
.cookie-head { display: flex; align-items: center; gap: 10px; }
.cookie-her-small { display: none; flex: none; width: 48px; height: 48px; pointer-events: none; }
.cookie-title { margin: 0; font: italic 400 1.15rem/1.3 var(--serif); color: var(--ink); }
.cookie-text { margin: 6px 0 0; color: var(--ink-2); }

.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.cookie-actions-one { grid-template-columns: 1fr; }
.cookie-actions button {
  min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-field);
  font: 600 0.92rem/1.2 var(--sans); cursor: pointer; transition: background-color 0.15s;
}
.cookie-accept { background: var(--honey); color: var(--ink); }
.cookie-accept:hover { background: var(--honey-hover); }
.cookie-reject { background: var(--ink); color: var(--paper); }
.cookie-reject:hover { background: var(--ink-hover); }
.cookie-actions button:focus-visible, .cookie-link:focus-visible, .cookie-foot a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.cookie-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 0.82rem; }
.cookie-link { padding: 4px 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-link:hover, .cookie-foot a:hover { color: var(--ink); }
.cookie-foot a { padding: 4px 0; color: var(--ink-2); }

/* Customize: one row per category, a switch at its end */
.cookie-list { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.cookie-list li { border-bottom: 1px solid var(--rule); }
.cookie-list label { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; cursor: pointer; }
.cookie-cat-text { display: flex; flex-direction: column; gap: 2px; }
.cookie-cat { font-weight: 600; color: var(--ink); }
.cookie-cat-desc { font-size: 0.82rem; line-height: 1.4; color: var(--ink-2); }
.cookie-switch {
  appearance: none; flex: none; position: relative; width: 36px; height: 20px; margin: 0;
  border-radius: 999px; background: var(--rule); cursor: pointer; transition: background-color 0.15s;
}
.cookie-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 2px rgba(28, 25, 23, 0.25); transition: transform 0.15s;
}
.cookie-switch:checked { background: var(--honey-ink); }
.cookie-switch:checked::after { transform: translateX(16px); }
.cookie-switch:disabled { opacity: 0.55; cursor: default; }
.cookie-switch:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .cookie-her { animation: cookie-bob 5.5s ease-in-out infinite; }
  @keyframes cookie-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
}

@media (max-width: 560px) {
  .cookie-banner { right: 8px; bottom: 8px; left: 8px; max-width: none; padding-bottom: env(safe-area-inset-bottom); }
  .cookie-her, .cookie-card::before { display: none; }
  .cookie-her-small { display: block; }
  .cookie-card { padding: 12px 14px 10px; }
  .cookie-text { font-size: 0.88rem; line-height: 1.45; }
  .cookie-actions { margin-top: 10px; }
}
