/* 3D badge (see badge3d.js). Same build as the landing gate's badge. */
.b3 { position: relative; display: grid; place-items: center; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.b3.is-dragging { cursor: grabbing; }
.b3__shadow { position: absolute; left: 50%; bottom: -10%; width: 70%; height: 16%; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(0,0,0,.22), transparent 70%); filter: blur(10px); pointer-events: none; }
.b3__stage { position: relative; width: 100%; height: 100%; perspective: 1200px; perspective-origin: 50% 48%; }
/* Only the rig and the stack hold the 3D scene; the layers in it are flat leaves (the face clips with
   overflow: hidden, which flattens anyway). */
.b3__rig, .b3__stack { transform-style: preserve-3d; }
.b3__rig { width: 100%; height: 100%; will-change: transform; }
.b3__stack { position: relative; width: 100%; height: 100%; }
.b3__face, .b3__wall { position: absolute; pointer-events: none; }
.b3__face { inset: 0; }
/* Rim walls face outward and hide their backs, so only the ones turned toward you draw (badge3d.js). */
.b3__wall { background: var(--b3-edge); box-shadow: 0 0 0 1px var(--b3-edge); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.b3__face { border-radius: 21.74%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.b3__face > svg, .b3__face > img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* The sheen: its own composited layer, 3x the face (so it still covers the face when rotated), with a
   fixed left-to-right gradient. badge3d.js moves it by transform only (rotate, then translateX); nothing
   repaints per frame. Stops are the old ones (relative to the face's gradient line) scaled to 3x. */
.b3__gleam, .b3__gleam::after { position: absolute; pointer-events: none; }
.b3__gleam { inset: -100%; will-change: transform; transform: rotate(28deg) translateX(-3.6%);
  background: linear-gradient(90deg, transparent 0%, transparent 40.1%, rgba(255,255,255,.03) 45.5%, rgba(255,255,255,.10) 48.65%, rgba(255,255,255,.38) 50%, rgba(255,255,255,.08) 51.8%, transparent 56.3%, transparent 100%); mix-blend-mode: soft-light; opacity: .8; }
.b3__gleam::after { content: ""; inset: 0; background: linear-gradient(90deg, transparent 0%, transparent 47.75%, rgba(255,255,255,.22) 50%, transparent 52.25%, transparent 100%); mix-blend-mode: overlay; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .b3__gleam { will-change: auto; } }
/* A picture sits on pure black, so a transparent one does not show the graphite rim colour through it.
   The popup badge keeps its cream tile. A faint plain-white streak keeps a gleam visible on the black. */
.b3:not(.pf-pop-badge) .b3__face:has(> img:not(.b3-default)) { background: var(--b3-edge); } /* rim colour, so the photo's anti-aliased rounded edge shows no dark hairline */
.b3:not(.pf-pop-badge) .b3__face:has(> img:not(.b3-default)) .b3__gleam { mix-blend-mode: screen; opacity: .3; }
.b3:not(.pf-pop-badge) .b3__face:has(> img:not(.b3-default)) .b3__gleam::after { mix-blend-mode: screen; opacity: .25; }
/* The default cream face (logo.svg has an 8/200 transparent margin): scaled to fill, like the / page's badge. */
.b3__face img.b3-default { transform: scale(1.087); }
/* Popup badge (mountPopBadge): logo.svg has an 8/200 transparent margin around the tile, so it is
   scaled to fill the face, like the / page's badge. */
.pf-pop-badge { width: 64px; height: 64px; margin: 2px auto 14px; }
.pf-pop-badge .b3__shadow { bottom: -14%; filter: blur(4px); }
.pf-pop-badge .b3__face img { transform: scale(1.087); }
/* Popup badge: no drag, so a normal cursor and normal touch scrolling. */
.b3.b3--float { cursor: default; touch-action: auto; }
