/* Theme picker + lightbox for the LIVE site (copied from shared/common.css, lightbox fixed for phones). */
.tp { position: fixed; right: 16px; bottom: 16px; z-index: 9999; font: 500 11px/1.2 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--tp-fg, var(--fg)); }
.tp-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--tp-bg, var(--bg)); border: 1px solid color-mix(in srgb, var(--tp-fg, var(--fg)) 25%, transparent); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.tp-toggle::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: conic-gradient(var(--bg) 0 50%, var(--fg) 0 75%, var(--accent, var(--fg)) 0); border: 1px solid currentColor; }
.tp-panel { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); padding: 14px; border-radius: 14px; background: var(--tp-bg, var(--bg)); border: 1px solid color-mix(in srgb, var(--tp-fg, var(--fg)) 20%, transparent); box-shadow: 0 16px 48px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none; transition: .25s cubic-bezier(.2,.7,.2,1); }
.tp[data-open="true"] .tp-panel { opacity: 1; transform: none; pointer-events: auto; }
.tp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tp-swatch { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; }
.tp-swatch:hover, .tp-swatch[aria-pressed="true"] { background: color-mix(in srgb, var(--tp-fg, var(--fg)) 10%, transparent); }
.tp-swatch i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 0 50%, var(--b) 50% 75%, var(--c) 75%); border: 1px solid color-mix(in srgb, var(--tp-fg, var(--fg)) 30%, transparent); }
.tp-swatch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-versions { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--tp-fg, var(--fg)) 15%, transparent); }
.tp-versions span { margin-right: auto; opacity: .6; }
.tp-versions a { color: inherit; text-decoration: none; min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; padding: 0 4px; }
.tp-versions a:hover { background: color-mix(in srgb, var(--tp-fg, var(--fg)) 10%, transparent); }
.tp-versions a[aria-current] { background: var(--tp-fg, var(--fg)); color: var(--tp-bg, var(--bg)); }

.lb { position: fixed; inset: 0; z-index: 9000; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); display: grid; place-items: center; opacity: 0; transition: opacity .3s; color: var(--fg); }
.lb.on { opacity: 1; }
.lb img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lb button { all: unset; cursor: pointer; position: absolute; font-size: 22px; padding: 16px; color: inherit; }
.lb .lb-x { top: 8px; right: 8px; font-size: 32px; }
.lb .lb-p { left: 8px; top: 50%; transform: translateY(-50%); }
.lb .lb-n { right: 8px; top: 50%; transform: translateY(-50%); }
.lb .lb-p, .lb .lb-n, .lb .lb-x { width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--bg) 80%, transparent); z-index: 2; }
.lb img { touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; transition: opacity .2s; }
body:has(.lb) .tp { display: none; }
@media (max-width: 720px) {
  .lb img { max-width: 100vw; max-height: 78vh; }
  .lb .lb-p, .lb .lb-n { top: auto; bottom: 10px; transform: none; }
  .lb .lb-p { left: 16px; } .lb .lb-n { right: 16px; }
  .lb-c { bottom: 26px; }
}
.lb-c { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font: 12px/1 system-ui, sans-serif; letter-spacing: .1em; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } * { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
