/* pdx-card.css — Fusion cards as holographic Pokémon TCG cards + card FX.
   Type-gradient frame · art window · ability · attack rows · holo tilt/foil/glare. */

/* ── Grid (portrait TCG cards) ─────────────────────────────────────────── */
.fgrid { display: grid; gap: calc(var(--u)*3);
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); align-content: start;
  transition: opacity .26s ease, transform .26s ease; perspective: 1400px; }
.fgrid[data-filtering="true"] { opacity: 0; transform: scale(.97); }

/* ── Card frame (type-gradient border) ─────────────────────────────────── */
.tcg { position: relative; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
  border-radius: 16px; padding: 7px; overflow: hidden; isolation: isolate;
  background:
    linear-gradient(150deg, color-mix(in oklab, var(--t1) 92%, #fff 8%), var(--t1) 38%, var(--t2) 78%, color-mix(in oklab, var(--t2) 80%, #000));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(0,0,0,.25),
    0 14px 34px -18px #000, 0 2px 6px -2px rgba(0,0,0,.5);
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.tcg.holo-on.tilting { transition: box-shadow .2s; }
.tcg:hover { box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(0,0,0,.25),
    0 22px 48px -20px color-mix(in oklab, var(--t1) 60%, #000), 0 0 24px -6px color-mix(in oklab, var(--t1) 55%, transparent); }
.tcg:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--glow); }
/* corner sheen on the frame */
.tcg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 6;
  background: linear-gradient(135deg, rgba(255,255,255,.35), transparent 32%); mix-blend-mode: screen; opacity: .5; }

/* ── Holo foil + glare (pointer-tracked) ───────────────────────────────── */
.tcg-foil, .tcg-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .3s ease; z-index: 7; }
.tcg.holo-on:hover .tcg-foil { opacity: .55; }
.tcg.holo-on:hover .tcg-glare { opacity: 1; }
.tcg-foil {
  background-image:
    repeating-linear-gradient(110deg,
      hsl(0 95% 62% / .55) 0%, hsl(48 95% 62% / .55) 9%, hsl(120 90% 60% / .55) 18%,
      hsl(190 95% 62% / .55) 27%, hsl(265 95% 66% / .55) 36%, hsl(325 95% 64% / .55) 45%, hsl(0 95% 62% / .55) 54%),
    repeating-linear-gradient(60deg, rgba(255,255,255,.16) 0 6px, transparent 6px 14px);
  background-size: 220% 220%, 180% 180%;
  background-position: var(--mx, 50%) var(--my, 50%), var(--mx, 50%) var(--my, 50%);
  mix-blend-mode: color-dodge; filter: saturate(1.25) contrast(1.05); }
.tcg-glare { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255,255,255,.55), rgba(255,255,255,.08) 32%, transparent 55%); mix-blend-mode: overlay; }
@media (prefers-reduced-motion: reduce) { .tcg { transition: box-shadow .2s; } }

/* ── Inner body ────────────────────────────────────────────────────────── */
.tcg-inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 6px;
  border-radius: 10px; padding: 8px 9px 9px; height: 100%;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--t1) 16%, #0b1110) 0%, #0a0f0e 26%, #080c0b 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 0 18px rgba(0,0,0,.6); }

/* header */
.tcg-head { display: flex; align-items: flex-end; gap: 6px; }
.tcg-head-main { flex: 1 1 auto; min-width: 0; }
.tcg-stage { font-family: var(--font-display); font-size: 8px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: color-mix(in oklab, var(--t1) 60%, var(--ink-2)); line-height: 1; }
.tcg-name { font-family: var(--font-display); font-size: 16px; font-weight: 800; line-height: 1.02;
  letter-spacing: -.015em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.tcg-hp { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.tcg-hp .hp-k { font-family: var(--font-display); font-size: 8px; font-weight: 800; color: var(--ink-3); letter-spacing: .04em; }
.tcg-hp .hp-v { font-family: var(--font-mono); font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.6); }

/* energy pips */
.energy { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.pip { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(closest-side at 34% 30%, color-mix(in oklab, var(--tc) 55%, #fff), var(--tc) 62%, color-mix(in oklab, var(--tc) 70%, #000));
  box-shadow: inset 0 -1px 1.5px rgba(0,0,0,.45), inset 0 1px 1px rgba(255,255,255,.5), 0 0 0 1px rgba(0,0,0,.25); position: relative; }
.pip::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: rgba(255,255,255,.55); }
.pip.sm { width: 11px; height: 11px; }

/* art window */
.tcg-art { position: relative; border-radius: 7px; overflow: hidden; aspect-ratio: 16/11;
  background:
    radial-gradient(120% 90% at 50% 14%, color-mix(in oklab, var(--t1) 24%, transparent), transparent 62%),
    linear-gradient(180deg, #10201d, #0a1413);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), inset 0 0 0 3px color-mix(in oklab, var(--t1) 30%, #000), inset 0 2px 12px rgba(0,0,0,.6);
  display: grid; place-items: center; }
.tcg-art .spr { width: 90%; height: 98%; background: transparent; border: 0; }
.tcg-art .spr img { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
/* holo shimmer confined to the art on hover */
.tcg-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 3;
  background:
    repeating-linear-gradient(105deg, hsl(0 90% 62%/.4) 0%, hsl(60 90% 62%/.4) 14%, hsl(150 90% 60%/.4) 28%, hsl(220 90% 64%/.4) 42%, hsl(300 90% 66%/.4) 56%);
  background-size: 200% 200%; background-position: var(--mx,50%) var(--my,50%); mix-blend-mode: color-dodge; }
.tcg.holo-on:hover .tcg-art::after { opacity: .5; }
.tcg-dex { position: absolute; bottom: 4px; left: 6px; z-index: 4; font-family: var(--font-mono); font-size: 8.5px;
  font-weight: 700; color: rgba(255,255,255,.7); text-shadow: 0 1px 2px #000; letter-spacing: .03em; }
.tcg-seen { position: absolute; top: 5px; right: 6px; z-index: 4; width: 13px; height: 13px; border-radius: 50%; opacity: 0; transition: opacity .25s;
  background: linear-gradient(180deg,#f24b4b 0 50%,#f7f7f7 50% 100%); box-shadow: inset 0 0 0 1.4px rgba(0,0,0,.6), 0 0 8px rgba(242,75,75,.7); }
.tcg-seen::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 30%; height: 30%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.4px #1c1c1c; }
.tcg.seen .tcg-seen { opacity: 1; }

/* flavor strip */
.tcg-flavor { font-size: 9px; font-style: italic; color: var(--ink-3); line-height: 1.2;
  padding: 3px 5px; border-radius: 4px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcg-flavor b { color: color-mix(in oklab, var(--t1) 55%, var(--ink-2)); font-weight: 700; font-style: normal; }

/* ability + attacks panel */
.tcg-panel { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.tcg-ability { display: flex; align-items: center; gap: 6px; padding: 3px 5px; border-radius: 5px;
  background: color-mix(in oklab, var(--rc) 12%, rgba(255,255,255,.03)); border: 1px solid color-mix(in oklab, var(--rc) 26%, transparent); }
.ab-tag { font-family: var(--font-display); font-size: 7.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  color: var(--rc-ink, #06100c); background: var(--rc); padding: 2px 4px; border-radius: 3px; line-height: 1; flex: 0 0 auto; }
.ab-name { flex: 1 1 auto; min-width: 0; font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tcg-attacks { display: flex; flex-direction: column; }
.attack { display: flex; align-items: center; gap: 7px; padding: 4px 3px; border-top: 1px solid rgba(255,255,255,.07); }
.attack:first-child { border-top: 0; }
.attack .energy { width: 28px; justify-content: flex-start; }
.atk-name { flex: 1 1 auto; font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attack.sig .atk-name { font-weight: 700; }
.atk-mark { flex: 0 0 auto; font-size: 10px; color: var(--glow); text-shadow: 0 0 6px var(--glow); }

/* footer */
.tcg-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px;
  padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.tcg-bst { display: inline-flex; align-items: baseline; gap: 4px; }
.tcg-bst .k { font-family: var(--font-display); font-size: 8px; font-weight: 800; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; }
.tcg-bst .v { font-family: var(--font-mono); font-size: 13px; font-weight: 800; color: var(--ink); }

/* ── Scan-in reveal (Pokédex registration) — content stays visible ─────── */
.fc-scan { position: absolute; left: 0; right: 0; height: 46%; top: -50%; pointer-events: none; z-index: 5; border-radius: inherit;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--glow) 55%, transparent) 60%, color-mix(in oklab, var(--glow) 80%, #fff) 78%, transparent);
  opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .fc-scan { animation: scanline 1s ease both; animation-delay: var(--scan-delay, 0s); }
}
@keyframes scanline { 0% { top: -50%; opacity: 0; } 12% { opacity: .9; } 88% { opacity: .9; } 100% { top: 104%; opacity: 0; } }

/* ── Idle sprite bob (loaded sprites only) ─────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .tcg-art .spr img.loaded { animation: bob calc(3.4s / var(--motion, 1)) ease-in-out infinite; }
  .tcg:hover .tcg-art .spr img.loaded { animation-duration: calc(1.7s / var(--motion, 1)); }
}
@keyframes bob { 0%, 100% { transform: translateY(2%); } 50% { transform: translateY(-7%); } }

/* ── Capture-release burst (detail open) ───────────────────────────────── */
.dh-spr { position: relative; }
.dh-burst { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .dh-burst::before, .dh-burst::after { content: ""; position: absolute; left: 50%; top: 48%; transform: translate(-50%,-50%); border-radius: 50%; }
  .dh-burst::before { width: 16px; height: 16px; background: #fff; box-shadow: 0 0 34px 14px #fff, 0 0 60px 24px color-mix(in oklab, var(--rc) 70%, transparent);
    animation: burstFlash calc(.55s * var(--motion, 1)) cubic-bezier(.2,.7,.3,1) forwards; }
  .dh-burst::after { width: 28px; height: 28px; border: 2.5px solid var(--rc);
    animation: burstRing calc(.62s * var(--motion, 1)) cubic-bezier(.2,.7,.3,1) forwards; }
}
@keyframes burstFlash { 0% { opacity: .95; transform: translate(-50%,-50%) scale(.2); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(3.4); } }
@keyframes burstRing { 0% { opacity: .85; transform: translate(-50%,-50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(6.5); } }

@media (max-width: 720px) {
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
  .tcg-name { font-size: 14px; }
}

/* ══ Fusion full-view (split: sprite hero | dossier) ════════════════════ */
.fv-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(8px, 2vw, 30px);
  background: color-mix(in oklab, #000 80%, transparent); -webkit-backdrop-filter: blur(11px); backdrop-filter: blur(11px); }

.fv { width: min(1240px, 100%); height: min(92vh, 880px); display: flex; border-radius: 20px; overflow: hidden; position: relative;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--case-edge), inset 0 0 0 6px color-mix(in oklab, var(--rc) 22%, #06100c), 0 50px 110px -34px #000; }
@media (prefers-reduced-motion: no-preference) { .fv { animation: fvpop .4s cubic-bezier(.2,.9,.3,1); } }
@keyframes fvpop { from { transform: scale(.96) translateY(14px); } to { transform: none; } }

/* hero */
.fv-hero { position: relative; flex: 0 0 47%; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background:
    radial-gradient(78% 58% at 50% 40%, color-mix(in oklab, var(--t1) 30%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in oklab, var(--t1) 16%, #07100e), #060b0a 72%);
  border-right: 1px solid var(--line); }
.fv-hero-glow { position: absolute; left: 50%; top: 44%; width: 74%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--t1) 55%, transparent), transparent 62%); filter: blur(26px); z-index: 0; }
@media (prefers-reduced-motion: no-preference) { .fv-hero-glow { animation: glowpulse calc(5s / var(--motion,1)) ease-in-out infinite; } }
@keyframes glowpulse { 0%,100% { opacity: .5; transform: translate(-50%,-50%) scale(.95); } 50% { opacity: .85; transform: translate(-50%,-50%) scale(1.06); } }
.fv-sheen { position: absolute; inset: 0; pointer-events: none; opacity: .14; mix-blend-mode: color-dodge; z-index: 1;
  background: repeating-linear-gradient(110deg, hsl(0 90% 60%/.5) 0, hsl(55 90% 60%/.5) 12%, hsl(160 90% 60%/.5) 24%, hsl(220 90% 64%/.5) 36%, hsl(300 90% 66%/.5) 48%);
  background-size: 220% 220%; }
@media (prefers-reduced-motion: no-preference) { .fv-sheen { animation: sheenmove calc(9s / var(--motion,1)) linear infinite; } }
@keyframes sheenmove { 0% { background-position: 0% 0%; } 100% { background-position: 220% 220%; } }

.fv-sprite { position: relative; width: min(62%, 360px); aspect-ratio: 1; z-index: 2; display: grid; place-items: center; margin-bottom: 8%; }
.fv-sprite .spr { width: 100%; height: 100%; background: transparent; border: 0; }
.fv-sprite .spr img { width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; filter: drop-shadow(0 18px 26px rgba(0,0,0,.6)); }
@media (prefers-reduced-motion: no-preference) {
  .fv-sprite { animation: heroPop calc(.6s * var(--motion,1)) cubic-bezier(.2,1.1,.4,1); }
  .fv-sprite .spr img.loaded { animation: heroFloat calc(4.6s / var(--motion,1)) ease-in-out infinite; }
}
@keyframes heroPop { 0% { opacity: .3; transform: scale(.7) translateY(22px); } 60% { transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes heroFloat { 0%,100% { transform: translateY(2.5%); } 50% { transform: translateY(-4%); } }
.fv-burst { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
@media (prefers-reduced-motion: no-preference) {
  .fv-burst::before, .fv-burst::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); border-radius: 50%; }
  .fv-burst::before { width: 26px; height: 26px; background: #fff; box-shadow: 0 0 50px 22px #fff, 0 0 90px 36px color-mix(in oklab, var(--rc) 70%, transparent);
    animation: burstFlash calc(.6s * var(--motion,1)) cubic-bezier(.2,.7,.3,1) forwards; }
  .fv-burst::after { width: 40px; height: 40px; border: 3px solid var(--rc); animation: burstRing calc(.68s * var(--motion,1)) cubic-bezier(.2,.7,.3,1) forwards; }
}

.fv-id { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: clamp(16px, 2.4vw, 30px);
  background: linear-gradient(0deg, color-mix(in oklab, #000 86%, transparent) 30%, transparent); }
.fv-dex { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--rc); letter-spacing: .06em;
  text-shadow: 0 0 12px color-mix(in oklab, var(--rc) 60%, transparent); }
.fv-name { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; line-height: .96;
  letter-spacing: -.02em; margin: 4px 0 7px; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.fv-parents { font-size: 15px; color: var(--ink-2); } .fv-parents b { color: var(--ink); font-weight: 600; }
.fv-types { margin-top: 12px; }

.fv-close { position: absolute; top: 14px; right: 14px; z-index: 6; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in oklab, #000 40%, var(--s2)); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.fv-close:hover { background: var(--s3); transform: rotate(90deg); }
.fv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 40px; height: 66px; border-radius: 13px;
  border: 1px solid var(--line); background: color-mix(in oklab, #000 38%, var(--s2)); color: var(--ink-2);
  font-size: 26px; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: .15s; }
.fv-nav.prev { left: 12px; } .fv-nav.next { right: 12px; }
.fv-nav:hover { color: var(--rc); border-color: color-mix(in oklab, var(--rc) 60%, transparent); background: var(--s3); }
.fv-counter { position: absolute; top: 16px; left: 16px; z-index: 5; font-size: 11.5px; color: var(--ink-2);
  background: color-mix(in oklab, #000 45%, transparent); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }

/* dossier */
.fv-dossier { flex: 1 1 auto; overflow-y: auto; padding: clamp(20px, 2.4vw, 34px); }
.fv-dossier .d-role { margin-top: 0; }
.fv-dossier .d-block:first-child { margin-top: 0; }

@media (max-width: 860px) {
  .fv { flex-direction: column; width: 100%; height: min(94vh, 100%); }
  .fv-hero { flex: 0 0 42vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .fv-sprite { width: min(46%, 230px); margin-bottom: 14%; }
  .fv-name { font-size: clamp(24px, 7vw, 34px); }
  .fv-nav { width: 34px; height: 54px; }
}

/* ══ Categorized landing (rails) ════════════════════════════════════════ */
.showcase { display: flex; flex-direction: column; gap: calc(var(--u)*5); max-width: 1180px; margin: 0 auto; }
.show-label { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .04em; color: var(--ink-2);
  display: flex; align-items: center; gap: 10px; margin-top: calc(var(--u)*5); text-transform: uppercase; }
.showcase > .show-label:first-child { margin-top: 0; }
.show-label .mono { font-size: 11px; color: var(--glow); background: color-mix(in oklab, var(--glow) 14%, var(--s2));
  border: 1px solid color-mix(in oklab, var(--glow) 30%, transparent); border-radius: 5px; padding: 2px 6px; letter-spacing: 0; }
.show-label-sub { color: var(--ink-3); font-weight: 600; font-size: 12px; letter-spacing: 0; text-transform: none; }

.rail-sec { display: flex; flex-direction: column; gap: calc(var(--u)*2.5); }
.rail-head { display: flex; align-items: center; gap: 10px; padding-left: 11px; border-left: 3px solid var(--rc); min-height: 26px; }
.rail-num { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--rc); letter-spacing: .06em; }
.rail-glyph { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--rc);
  color: #06100c; font-weight: 800; font-size: 12px; flex: 0 0 auto; box-shadow: 0 0 12px color-mix(in oklab, var(--rc) calc(40% * var(--motion)), transparent); }
.rail-titles { display: flex; align-items: baseline; gap: 8px; flex: 1 1 auto; min-width: 0; }
.rail-title { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin: 0; white-space: nowrap; }
.rail-sub { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.rail-all { appearance: none; border: 0; background: transparent; color: var(--rc); cursor: pointer; font: inherit;
  font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 7px; white-space: nowrap; flex: 0 0 auto; transition: .14s; }
.rail-all:hover { background: color-mix(in oklab, var(--rc) 15%, transparent); }

.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scroll-behavior: smooth; }
.rail-item { flex: 0 0 158px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 7px; }
.rail-item .tcg { width: 158px; }
@media (prefers-reduced-motion: no-preference) { .rail-item { animation: railIn .42s ease both; animation-delay: calc(var(--i) * 40ms); } }
@keyframes railIn { from { opacity: .25; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.rail-cap { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-2); padding: 0 4px; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; }
.rail-cap svg { color: var(--glow); flex: 0 0 auto; }
.rail-empty { color: var(--ink-3); font-size: 13px; padding: 16px 4px; }

.type-row { display: flex; flex-wrap: wrap; gap: 6px; }
.type-pill { appearance: none; cursor: pointer; height: 27px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 11px;
  letter-spacing: .02em; color: color-mix(in oklab, var(--tc) 75%, #fff); background: color-mix(in oklab, var(--tc) 16%, var(--s2));
  border: 1px solid color-mix(in oklab, var(--tc) 40%, transparent); transition: .14s; }
.type-pill:hover { background: color-mix(in oklab, var(--tc) 28%, var(--s2)); color: #fff; }
.type-pill.on { background: var(--tc); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.45);
  box-shadow: 0 0 15px color-mix(in oklab, var(--tc) calc(45% * var(--motion)), transparent); }

.browse-back { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; height: 38px;
  padding: 0 13px 0 9px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--s2); color: var(--ink-2);
  font: inherit; font-weight: 700; font-size: 12.5px; flex: 0 0 auto; transition: .15s; }
.browse-back:hover { color: var(--ink); border-color: var(--line-strong); background: var(--s3); }
.browse-back svg { transform: rotate(180deg); }

/* category page (opened from a rail) */
.cat-head { display: flex; align-items: center; gap: 12px; padding-bottom: calc(var(--u)*4); margin-bottom: calc(var(--u)*3); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cat-head .rail-glyph { width: 28px; height: 28px; font-size: 14px; }
.cat-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 0; color: var(--rc); }
.cat-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.rail-head.clickable { cursor: pointer; }
.rail-head.clickable:hover .rail-title { color: var(--rc); }
.show-all { margin-left: auto; appearance: none; border: 0; background: transparent; color: var(--glow); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 7px; }
.show-all:hover { background: color-mix(in oklab, var(--glow) 14%, transparent); }
