/* Extracted from views/layouts/_age-gate.ejs (2026-12-02) */
  .lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
  /* Site-wide (lives here because this partial is on every page): no sideways page scroll/bounce on iOS Safari.
     clip (not hidden) so position:sticky keeps working; inner scrollers (.ae-chips etc.) are unaffected. */
  html, body { overflow-x: clip; overscroll-behavior-x: none; }
  @supports not (overflow-x: clip) { body { overflow-x: hidden; } }

  /* ---- shared Liquid Glass tokens + layers (also used by the cookie toast in footer.ejs) ---- */
  :root {
    /* site palette: crimson accent (ux.css --ae-red / dark.css --d-gold), wine-tinted dark surfaces, Montserrat */
    --lg-font: Montserrat, system-ui, sans-serif;
    --lg-tint: rgba(255,255,255,.64); --lg-fg: #141414; --lg-sub: #5f5a5a; --lg-hair: rgba(0,0,0,.09);
    --lg-btn: rgba(255,255,255,.62); --lg-btn-hover: rgba(255,255,255,.88); --lg-btn-line: rgba(0,0,0,.08);
    --lg-prim: rgba(225,29,49,.92); --lg-prim-hover: rgba(196,20,42,.95); --lg-prim-fg: #fff; --lg-prim-glow: rgba(225,29,49,.45);
    --lg-accent: #e11d31; --lg-ring: rgba(0,0,0,.08);
    --lg-dim: rgba(20,8,10,.45); --lg-link: #c21a2a;
    --lg-ok: #1f8a4c; --lg-ok-line: rgba(31,138,76,.6); --lg-ok-glow: rgba(31,138,76,.16);
  }
  html.theme-dark {
    --lg-tint: rgba(27,17,19,.66); --lg-fg: #f3f0f0; --lg-sub: #b3a9ab; --lg-hair: rgba(255,255,255,.08);
    --lg-btn: rgba(50,29,34,.62); --lg-btn-hover: rgba(66,36,43,.8); --lg-btn-line: rgba(74,35,41,.9);
    --lg-prim: rgba(225,29,49,.9); --lg-prim-hover: rgba(242,51,71,.94); --lg-prim-fg: #fff; --lg-prim-glow: rgba(225,29,49,.5);
    --lg-accent: #ff4d5e; --lg-ring: rgba(74,35,41,.95);
    --lg-dim: rgba(8,4,5,.66); --lg-link: #ff8a93;
    --lg-ok: #5fd38d; --lg-ok-line: rgba(95,211,141,.55); --lg-ok-glow: rgba(95,211,141,.14);
  }
  .lg-bg, .lg-rim, .lg-shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
  .lg-bg { background: var(--lg-tint); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); }
  .lg-rim {
    -webkit-backdrop-filter: blur(4px) saturate(220%) brightness(1.1);
    backdrop-filter: blur(4px) saturate(220%) brightness(1.1);
    backdrop-filter: url(#lg-refract) blur(2px) saturate(220%) brightness(1.1);
    -webkit-mask: linear-gradient(to right, #000, transparent 20px, transparent calc(100% - 20px), #000), linear-gradient(to bottom, #000, transparent 20px, transparent calc(100% - 20px), #000);
    mask: linear-gradient(to right, #000, transparent 20px, transparent calc(100% - 20px), #000), linear-gradient(to bottom, #000, transparent 20px, transparent calc(100% - 20px), #000);
  }
  html.lg-lite .lg-rim { backdrop-filter: blur(4px) saturate(220%) brightness(1.1); }
  .lg-shine {
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 38%);
    box-shadow: inset 0 0 0 1px var(--lg-ring), inset 0 1.5px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(255,255,255,.08), 0 24px 60px -18px rgba(0,0,0,.55);
  }
  /* cursor spotlight, same approach as the ELIT model card (ux.css .mcard.is-vip): px coords, plain radial, shown on hover */
  .lg-shine::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--lg-mx, 50%) var(--lg-my, 0%), rgba(255,255,255,.16), transparent 60%);
  }
  @media (hover: hover) { #js-over18:hover .lg-shine::before, .ae-cookie-toast:hover .lg-shine::before { opacity: 1; } }
  .lg-btn {
    position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 0 18px;
    border: 0; border-radius: 999px; cursor: pointer; text-decoration: none !important; text-align: center;
    font: 600 16px/1.2 var(--lg-font); letter-spacing: -.01em; color: var(--lg-fg) !important; background: var(--lg-btn);
    -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
    box-shadow: inset 0 0 0 1px var(--lg-btn-line), inset 0 1px 0 rgba(255,255,255,.28), 0 4px 14px -6px rgba(0,0,0,.25);
    transition: transform .25s cubic-bezier(.34,1.6,.64,1), background .2s;
    -webkit-tap-highlight-color: transparent;
  }
  .lg-btn:hover { background: var(--lg-btn-hover); }
  .lg-btn:active { transform: scale(.95); }
  /* no outline ring: the gate auto-focuses Enter on open, so a ring showed as a double border. Focus = brighter fill instead. */
  .lg-btn:focus, .lg-btn:focus-visible { outline: none; }
  .lg-btn:focus-visible { background: var(--lg-btn-hover); }
  .lg-btn--prim:focus-visible { background: var(--lg-prim-hover); }
  .lg-btn--prim { background: var(--lg-prim); color: var(--lg-prim-fg) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 6px rgba(90,0,12,.3), 0 10px 26px -10px var(--lg-prim-glow); }
  .lg-btn--prim:hover { background: var(--lg-prim-hover); }
  /* "I'm 18+, Enter" / "Accept all" = the cookie toast's Accept: clear glass, thin green edge, check icon */
  .lg-btn--ok { gap: 8px; background: transparent; color: var(--lg-ok) !important; box-shadow: inset 0 0 0 1.5px var(--lg-ok-line), inset 0 1px 0 rgba(255,255,255,.18), 0 8px 22px -10px var(--lg-ok-glow); }
  .lg-btn--ok:hover, .lg-btn--ok:focus-visible { background: var(--lg-ok-glow); }
  @media (prefers-reduced-transparency: reduce) {
    :root { --lg-tint: rgba(255,255,255,.97); }
    html.theme-dark { --lg-tint: rgba(27,17,19,.97); }
  }

  /* ---- gate: overlay ---- */
  html #js-over18-overlay.lg-gate {
    position: fixed; inset: 0; z-index: 10001 !important; padding: 0 !important; /* above the mobile dock + cookie toast */
    background: var(--lg-dim) !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important; /* a filter here would hide the page from the glass */
  }
  #js-over18-overlay .lg-veil { position: absolute; inset: 0; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: lgFade .3s ease both; }

  /* ---- gate: card ---- */
  html #js-over18.lg-card {
    position: absolute; top: 50%; left: 50%; translate: -50% -50%; margin: 0;
    width: min(360px, calc(100vw - 24px)) !important; max-width: none; max-height: calc(100dvh - 24px); overflow: visible !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 34px;
    font-family: var(--lg-font); color: var(--lg-fg); text-align: center;
    animation: lgPop .5s cubic-bezier(.34,1.45,.64,1) both;
  }
  #js-over18 .lg-in { position: relative; z-index: 1; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border-radius: inherit; padding: 26px 20px 18px; scrollbar-width: none; }
  #js-over18 .lg-in::-webkit-scrollbar { display: none; }
  #js-over18 .lg-pane { display: flex; flex-direction: column; gap: 14px; }
  #js-over18 .lg-pane[hidden] { display: none; }
  #js-over18 .lg-head { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  #js-over18 .lg-logo { height: 28px; width: auto; margin: 2px 0 6px; }
  html.theme-dark #js-over18 .lg-logo { filter: brightness(0) invert(1); }
  #js-over18 .lg-title { margin: 0; font: 700 20px/1.25 var(--lg-font); letter-spacing: -.01em; color: var(--lg-fg); text-transform: none; text-wrap: balance; }
  #js-over18 .lg-text { margin: -6px 0 0; font: 400 14.5px/1.4 var(--lg-font); color: var(--lg-sub); }
  #js-over18 .lg-actions { display: grid; gap: 8px; }
  #js-over18 .lg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #js-over18 .lg-row .lg-btn { font-size: 14.5px; font-weight: 500; padding: 0 10px; white-space: nowrap; }
  #js-over18 .lg-fine { margin: 0; font: 400 12px/1.4 var(--lg-font); color: var(--lg-sub); }
  #js-over18 .lg-fine a, #js-over18 .lg-details a { color: var(--lg-link); text-decoration: underline; text-underline-offset: 2px; }
  #js-over18 .lg-details { text-align: left; }
  #js-over18 .lg-details summary { cursor: pointer; list-style: none; text-align: center; font: 500 12.5px var(--lg-font); color: var(--lg-sub); padding: 2px 0; }
  #js-over18 .lg-details summary::-webkit-details-marker { display: none; }
  #js-over18 .lg-details summary::after { content: "›"; display: inline-block; margin-left: 5px; transition: transform .2s; }
  #js-over18 .lg-details[open] summary::after { transform: rotate(90deg); }
  #js-over18 .lg-details__body { margin-top: 10px; padding: 12px 14px; border-radius: 18px; background: var(--lg-btn); font: 400 12px/1.5 var(--lg-font); color: var(--lg-sub); }
  #js-over18 .lg-details__body p { margin: 0 0 8px; color: inherit; line-height: inherit; }
  #js-over18 .lg-details__body p:last-child { margin-bottom: 0; }
  #js-over18 .lg-details__body strong { color: var(--lg-fg); }

  /* ---- gate: cookie settings (iOS grouped list + switches) ---- */
  #js-over18 .lg-list { border-radius: 18px; overflow: hidden; background: var(--lg-btn); box-shadow: inset 0 0 0 1px var(--lg-btn-line); text-align: left; }
  #js-over18 .lg-item { padding: 11px 14px; }
  #js-over18 .lg-item + .lg-item { box-shadow: inset 0 .5px 0 var(--lg-hair); }
  #js-over18 .lg-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; margin: 0; }
  #js-over18 .lg-item__name { display: block; font: 500 15px/1.3 var(--lg-font); color: var(--lg-fg); }
  #js-over18 .lg-item__desc { display: block; margin-top: 2px; font: 400 12px/1.35 var(--lg-font); color: var(--lg-sub); }
  #js-over18 .cookie-lock-msg { margin-top: 0; max-height: 0; overflow: hidden; color: #d9534f; transition: opacity .2s, transform .2s, max-height .2s, margin .2s; }
  #js-over18 .cookie-locked .cookie-lock-msg { max-height: 60px; margin-top: 6px; }
  .lg-switch { -webkit-appearance: none; appearance: none; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 31px; position: relative; cursor: pointer; transition: background .25s; border: 0; }
  .lg-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .3s cubic-bezier(.34,1.5,.64,1), width .2s; }
  .lg-switch:active::after { width: 33px; }
  /* doubled class + !important: dark.css forces a background on every input */
  html .lg-switch.lg-switch { background: rgba(120,120,128,.32) !important; border: 0 !important; }
  html .lg-switch.lg-switch:checked { background: var(--lg-accent) !important; }
  .lg-switch:checked::after { transform: translateX(20px); }
  .lg-switch:checked:active::after { transform: translateX(14px); }
  .lg-switch:disabled { opacity: .55; cursor: not-allowed; }
  .lg-switch:focus, .lg-switch:focus-visible { outline: none; }
  .lg-switch:focus-visible::after { box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.15); }

  @keyframes lgPop { from { scale: .86; } to { scale: 1; } }
  @keyframes lgFade { from { opacity: 0; } to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    html #js-over18.lg-card, #js-over18-overlay .lg-veil { animation: none; }
    .lg-btn, .lg-switch::after { transition: none; }
  }
