/* The Agent File (js/stackdraft.js "the Agent File"): layout around the art session's pieces (css/cosmetics.css, cz-*):
   the hero ID card, the Agent tag, the Patch Board and its aura, the numbers, the mains in their frames, Edit, and the
   reveal screen (sealed dossiers opened one by one). The Ops look and the art's rules: hard edges, no glows; rarity
   speaks through material and motion, louder the rarer it is. Colours are the ladder's (bone, brass, gunmetal, red). */
body.pl { --af-std: #f4f1ea; --af-rare: #3d8bf0; --af-epic: #a46bff; --af-leg: #F0144A; --af-tf: #f4f1ea; }
/* each rarity's colour comes from the art's tokens (css/cosmetics.css .cz-r-<rarity> sets --cz-c); these are fallbacks */
.pl .r-standard { --ac: var(--cz-c, var(--af-std)); }
.pl .r-rare { --ac: var(--cz-c, var(--af-rare)); }
.pl .r-epic { --ac: var(--cz-c, var(--af-epic)); }
.pl .r-legendary { --ac: var(--cz-c, var(--af-leg)); }
.pl .r-topfrag { --ac: var(--cz-c, var(--af-tf)); }

/* the panel: one column that never grows past the screen */
.pl .df-lboard.af { align-self: stretch; align-content: start; overflow-y: auto; scrollbar-width: thin; max-height: 100%; padding-bottom: 4cqh;
  grid-template-columns: minmax(0, 1fr); justify-items: stretch; grid-auto-rows: max-content; }
.pl .df-lboard.af > * { min-width: 0; max-width: 100%; }
/* desktop: a fixed-height scroll box like Stats, so scrolled cards stay below the tab row (max-height plus the top padding let it ride up under it) */
.pl .df-draft.ops > .df-lboard.af { height: 100%; box-sizing: border-box; }
@container (max-aspect-ratio: 6 / 5) { .pl .df-draft.ops > .df-lboard.af { height: auto; } }
.pl .df-lboard.af > .df-lbtitle, .pl .df-lboard.af > .df-lbhead { justify-self: start; }
.pl .af .df-lbtitle span { color: var(--red); }
.pl .af .df-lbtitle { line-height: 0.98; }
.pl .af-empty, .pl .af-hint { margin: 0; font: 600 min(2.1cqh, 3.4cqw) / 1.35 var(--body, inherit); color: var(--muted); }
.pl .af-hint { font-size: min(1.8cqh, 3cqw); }
.pl .af-go { box-shadow: inset 0 0 0 2px var(--red) !important; background: var(--red); color: #fff; }
.pl .af-barbtns { display: inline-flex; gap: 1.4cqh; }
.pl [data-agent] { cursor: pointer; }
.pl [data-agent]:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }

/* the File tab and its pip */
.pl .ops-filetab { position: relative; }
.pl .ops-tabs i.af-tabpip, .pl .af-tabpip { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin-left: 0.5em; padding: 0 0.3em; font: 800 0.72em/1 var(--hud); font-style: normal; color: #fff; background: var(--red); animation: afPip 1.6s steps(2, jump-none) infinite; }
.pl .af-tabpip[hidden] { display: none; }
@keyframes afPip { 50% { transform: scale(1.18); } }

/* the hero: the art's ID card at the panel's width */
.pl .af-hero { width: 100%; max-width: 110cqh; }

/* three columns */
.pl .af-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.4cqh; width: 100%; max-width: 110cqh; }
.pl .af-cols > section { display: grid; align-content: start; gap: 1.2cqh; min-width: 0; padding: 1.8cqh; background: rgba(10, 10, 11, 0.72); box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.12); }
/* the Patch Board (the art's velcro board), each patch in its aura */
.pl .af-board6 { gap: 1.4cqh; padding: 2cqh; }
.pl .af-pin { cursor: pointer; animation: afPinIn 0.42s calc(var(--i, 0) * 70ms) cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.pl .af-pin:hover .cz-patch { transform: translateY(-3px) rotate(-2deg); }
.pl .af-pin .cz-patch { transition: transform 0.15s; }
.pl .cz-pin.cz-empty[data-file-edit] { cursor: pointer; }
@keyframes afPinIn { from { opacity: 0; transform: scale(1.35) rotate(7deg); } }
.pl .af-pindet { display: grid; gap: 0.4cqh; padding: 1.2cqh 1.4cqh; box-shadow: inset 3px 0 0 var(--cz-c, var(--bone)); background: rgba(244, 241, 234, 0.04); }
.pl .af-pindet b { font: 800 min(2.4cqh, 3.8cqw) / 1 var(--display); text-transform: uppercase; color: var(--bone); }
.pl .af-pindet small { font: 700 min(1.5cqh, 2.5cqw) / 1.2 var(--hud); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cz-c, var(--bone)); }
.pl .af-pindet span { font-size: min(1.7cqh, 2.8cqw); color: var(--muted); }

/* the aura: hard-edged motion around a patch, louder the rarer it is */
.pl .af-aura { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; isolation: isolate; }
.pl .af-aura > .cz-patch { position: relative; z-index: 1; width: 84% !important; height: auto !important; aspect-ratio: 1; }
.pl .af-aura > svg { position: relative; z-index: 1; width: 66% !important; height: auto !important; }
.pl .af-aura > i { position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: 50%; }
/* Rare: four brass ticks at the corners, tightening on hover */
.pl .af-aura.r-rare > .af-a1 { inset: 4%; border-radius: 0; opacity: 0.85; transition: inset 0.25s ease-out;
  background: linear-gradient(var(--ac), var(--ac)) 0 0 / 10px 2px no-repeat, linear-gradient(var(--ac), var(--ac)) 0 0 / 2px 10px no-repeat,
    linear-gradient(var(--ac), var(--ac)) 100% 0 / 10px 2px no-repeat, linear-gradient(var(--ac), var(--ac)) 100% 0 / 2px 10px no-repeat,
    linear-gradient(var(--ac), var(--ac)) 0 100% / 10px 2px no-repeat, linear-gradient(var(--ac), var(--ac)) 0 100% / 2px 10px no-repeat,
    linear-gradient(var(--ac), var(--ac)) 100% 100% / 10px 2px no-repeat, linear-gradient(var(--ac), var(--ac)) 100% 100% / 2px 10px no-repeat; }
.pl .af-pin:hover .af-aura.r-rare > .af-a1 { inset: 0; }
/* Epic: two segmented gunmetal rings turning against each other */
.pl .af-aura.r-epic > .af-a1, .pl .af-aura.r-epic > .af-a2 { -webkit-mask: radial-gradient(circle, transparent 64%, #000 64.5% 66%, transparent 66.5%); mask: radial-gradient(circle, transparent 64%, #000 64.5% 66%, transparent 66.5%); }
.pl .af-aura.r-epic > .af-a1 { background: repeating-conic-gradient(var(--ac) 0 14deg, transparent 14deg 30deg); animation: afSpin 26s linear infinite; }
.pl .af-aura.r-epic > .af-a2 { inset: 7%; background: repeating-conic-gradient(var(--bone) 0 3deg, transparent 3deg 45deg); opacity: 0.7; animation: afSpin 18s linear infinite reverse; }
/* Legendary: red ticks in orbit and a red signal sweeping the ring */
.pl .af-aura.r-legendary > .af-a1, .pl .af-aura.r-legendary > .af-a2 { -webkit-mask: radial-gradient(circle, transparent 63%, #000 63.5% 67%, transparent 67.5%); mask: radial-gradient(circle, transparent 63%, #000 63.5% 67%, transparent 67.5%); }
.pl .af-aura.r-legendary > .af-a1 { background: repeating-conic-gradient(var(--ac) 0 5deg, transparent 5deg 40deg); animation: afSpin 14s steps(72) infinite; }
.pl .af-aura.r-legendary > .af-a2 { background: conic-gradient(from 0deg, var(--bone) 0 2deg, rgba(240, 20, 74, 0.55) 2deg 26deg, transparent 26deg); animation: afSpin 3.2s linear infinite; }
/* TOPFRAG: Fragment shards around it, flickering in hard steps, and the Cut marked at the top */
.pl .af-aura.r-topfrag > .af-a1 { inset: -3%; border-radius: 0; background: repeating-conic-gradient(from 7deg, var(--bone) 0 2deg, transparent 2deg 9deg, #2a2d33 9deg 13deg, transparent 13deg 23deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 60.5% 68%, transparent 68.5%); mask: radial-gradient(circle, transparent 60%, #000 60.5% 68%, transparent 68.5%); animation: afShard 2.4s steps(6) infinite; }
.pl .af-aura.r-topfrag > .af-a2 { inset: auto 38% 92% 38%; height: 8%; border-radius: 0; background: var(--red); clip-path: polygon(0 0, 100% 0, 50% 100%); animation: afFault 3s steps(1) infinite; }
@keyframes afSpin { to { transform: rotate(360deg); } }
@keyframes afShard { 0% { transform: rotate(0); opacity: 0.9; } 33% { transform: rotate(9deg); opacity: 0.6; } 66% { transform: rotate(-6deg); opacity: 1; } 100% { transform: rotate(0); opacity: 0.9; } }
@keyframes afFault { 0%, 70% { opacity: 1; } 72% { opacity: 0; } 76% { opacity: 1; } 80% { opacity: 0; } 84% { opacity: 1; } }

/* the numbers, and the Agent tag above them */
.pl .af-tagwrap { display: grid; justify-items: start; max-width: 100%; overflow: hidden; }
.pl .af-num { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 1.2cqh; }
.pl .af-num b { grid-row: span 2; font: 700 min(4.2cqh, 6.4cqw) / 1 var(--hud); color: var(--bone); min-width: 2.2em; }
.pl .af-num b.txt { grid-row: auto; grid-column: 1 / -1; font: 800 min(2.8cqh, 4.4cqw) / 1 var(--display); text-transform: uppercase; }
.pl .af-num small { font: 800 min(1.6cqh, 2.6cqw) / 1.1 var(--hud); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone); }
.pl .af-num em { font: 600 min(1.5cqh, 2.5cqw) / 1.1 var(--body, inherit); font-style: normal; color: var(--muted); }
.pl .af-rec { margin: 0; font: 700 min(1.6cqh, 2.6cqw) / 1.3 var(--hud); letter-spacing: 0.08em; color: var(--muted); }
.pl .af-link { padding: 0; color: var(--bone); text-decoration: underline; text-underline-offset: 3px; font: inherit; }
/* the mains, each in its mastery frame */
.pl .af-mains ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2cqh; margin: 0; padding: 0; list-style: none; }
.pl .af-mains li { display: grid; justify-items: center; gap: 0.5cqh; text-align: center; min-width: 0; }
.pl .af-mains b { font: 800 min(1.9cqh, 3.2cqw) / 1 var(--display); text-transform: uppercase; }
.pl .af-mains small { font: 700 min(1.3cqh, 2.2cqw) / 1 var(--hud); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pl .af-framed { position: relative; display: block; width: var(--fw, 100%); max-width: 100%; aspect-ratio: 0.66; overflow: hidden; background: #111114; }
.pl .af-mains .af-framed { width: 100%; }
.pl .af-framed > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.pl .af-sets { display: flex; flex-wrap: wrap; gap: 0.6cqh 1.4cqh; margin: 0.6cqh 0 0; font: 700 min(1.4cqh, 2.4cqw) / 1 var(--hud); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pl .af-titleart { display: grid; place-items: center; width: 100%; min-height: 3em; container-type: inline-size; }
/* long titles (Nightfall Elite x4, Against the Odds) shrink to fit their tile instead of spilling into the next */
.pl .af-titleart > .cz-title { font-size: min(1em, 5.4cqi); max-width: 100%; }

/* Edit */
.pl .af-pinrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1cqh; width: 100%; max-width: 110cqh; padding: 1.2cqh;
  background: #0d0d0f url("assets/cosmetics/core/velcro.webp") 0 0 / 96px 96px; box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.08); }
.pl .af-slot { display: grid; place-items: center; aspect-ratio: 1; cursor: pointer; transition: transform 0.12s; }
.pl .af-slot .cz-patch { width: 90% !important; height: auto !important; aspect-ratio: 1; }
.pl .af-slot > svg { width: 72% !important; height: auto !important; }
.pl .af-slot .af-framed { width: 60%; }
.pl .af-slot.empty { cursor: default; box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.12); }
.pl .af-slot.empty i { font: 700 min(1.6cqh, 2.6cqw) / 1 var(--hud); font-style: normal; color: rgba(244, 241, 234, 0.25); }
.pl .af-slot:not(.empty):hover { transform: translateY(-2px); }
.pl .af-tabs { display: flex; flex-wrap: wrap; gap: 0.8cqh; width: 100%; max-width: 110cqh; }
.pl .af-tabs button { position: relative; padding: 1cqh 2cqh 0.9cqh; font: 800 min(1.9cqh, 3cqw) / 1 var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.2); transition: color 0.12s, background 0.12s; }
.pl .af-tabs button:hover { color: var(--bone); }
.pl .af-tabs button.on { color: #0a0a0b; background: var(--bone); }
.pl .af-pip { position: absolute; top: -0.7em; right: -0.5em; display: grid; place-items: center; min-width: 1.5em; height: 1.5em; font: 800 0.75em/1 var(--hud); font-style: normal; color: #fff; background: var(--red); }
.pl .af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17cqh, 28cqw), 1fr)); gap: 1.2cqh; width: 100%; max-width: 110cqh; }
.pl .af-g-title, .pl .af-g-plate { grid-template-columns: repeat(auto-fill, minmax(min(26cqh, 42cqw), 1fr)); }
.pl .af-cell { position: relative; display: grid; min-width: 0; }
.pl .af-cell .cz-tile { width: 100%; height: 100%; transition: transform 0.12s; }
.pl .af-cell .cz-tile:hover { transform: translateY(-3px); }
.pl .af-cell.on .cz-tile { box-shadow: inset 0 0 0 2px var(--bone); }
.pl .af-worn { position: absolute; top: 6px; left: 6px; z-index: 3; padding: 0.3em 0.5em; font: 800 min(1.2cqh, 2cqw) / 1 var(--hud); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: #0a0a0b; background: var(--bone); pointer-events: none; }
.pl .af-noframe { display: grid; place-items: center; width: 60%; aspect-ratio: 0.66; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.2); font: 700 1.4em/1 var(--hud); }
.pl .af-trk { display: grid; gap: 0.6cqh; justify-items: start; padding: 1.8cqh; text-align: left; background: rgba(10, 10, 11, 0.8); box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.14); transition: transform 0.12s; }
.pl .af-trk:hover { transform: translateY(-2px); }
.pl .af-trk.on { box-shadow: inset 0 0 0 2px var(--bone); }
.pl .af-trk b { font: 700 min(3.6cqh, 5.6cqw) / 1 var(--hud); color: var(--bone); }
.pl .af-trk small { font: 800 min(1.4cqh, 2.4cqw) / 1.1 var(--hud); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pl .af-priv { display: flex; flex-wrap: wrap; gap: 1.2cqh 3cqh; font: 700 min(1.7cqh, 2.8cqw) / 1.2 var(--hud); color: var(--muted); }
.pl .af-priv label { display: inline-flex; align-items: center; gap: 0.6em; cursor: pointer; }
/* the hit when something lands: a hard stamp (no glow) */
.pl .af-stamp { animation: afStamp 0.34s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes afStamp { 0% { transform: scale(1.35); } 60% { transform: scale(0.94); } 100% { transform: none; } }
.pl .af-nope { animation: afNope 0.3s; }
@keyframes afNope { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.pl .af-guest { display: grid; gap: 1.2cqh; max-width: 70ch; }
.pl .af-guest b { font: 800 min(2.8cqh, 4.4cqw) / 1.05 var(--display); text-transform: uppercase; }
.pl .af-guest span { color: var(--muted); font-size: min(2cqh, 3.3cqw); }
.pl .af-guest button { justify-self: start; }

/* ---------- the reveal: sealed dossiers ---------- */
.pl .af-rvsub { margin: 1.2cqh 0 0; max-width: 70ch; font: 600 min(2cqh, 3.3cqw) / 1.35 var(--body, inherit); color: var(--muted); }
.pl .af-rvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19cqh, 28cqw), 1fr)); gap: 1.6cqh; width: 100%; max-width: 120cqh; }
.pl .af-rv { position: relative; display: grid; align-content: end; justify-items: start; gap: 0.6cqh; aspect-ratio: 0.72; padding: 1.6cqh; overflow: hidden; text-align: left;
  animation: afDeal 0.4s calc(var(--k, 0) * 55ms) cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes afDeal { from { opacity: 0; transform: translateY(18px) rotate(-3deg) scale(0.92); } }
.pl .af-rv.seal { cursor: pointer; color: var(--bone); background: linear-gradient(160deg, #18181c, #0c0c0e 70%); box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.18); transition: transform 0.14s; }
.pl .af-rv.seal:hover { transform: translateY(-4px); }
.pl .af-rv.seal::before { content: ""; position: absolute; inset: 9px; pointer-events: none; opacity: 0.6;
  background: linear-gradient(var(--bone), var(--bone)) 0 0 / 12px 1px no-repeat, linear-gradient(var(--bone), var(--bone)) 0 0 / 1px 12px no-repeat,
    linear-gradient(var(--bone), var(--bone)) 100% 100% / 12px 1px no-repeat, linear-gradient(var(--bone), var(--bone)) 100% 100% / 1px 12px no-repeat; }
.pl .af-sl-band { position: absolute; left: 0; right: 0; top: 36%; height: 13%; background: repeating-linear-gradient(-45deg, rgba(244, 241, 234, 0.06) 0 6px, transparent 6px 12px); box-shadow: inset 0 1px 0 rgba(244, 241, 234, 0.12), inset 0 -1px 0 rgba(244, 241, 234, 0.12); }
.pl .af-sl-k { position: absolute; top: 37.5%; left: 50%; transform: translateX(-50%) rotate(-6deg); padding: 0.25em 0.6em; font: 800 min(1.7cqh, 3cqw) / 1 var(--hud); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ac); box-shadow: inset 0 0 0 2px var(--ac); white-space: nowrap; }
.pl .af-sl-sig { position: absolute; top: 1.6cqh; right: 1.6cqh; display: flex; align-items: end; gap: 3px; height: 16px; }
.pl .af-sl-sig i { width: 4px; background: rgba(244, 241, 234, 0.16); }
.pl .af-sl-sig i:nth-child(1) { height: 30%; } .pl .af-sl-sig i:nth-child(2) { height: 47%; } .pl .af-sl-sig i:nth-child(3) { height: 64%; } .pl .af-sl-sig i:nth-child(4) { height: 82%; } .pl .af-sl-sig i:nth-child(5) { height: 100%; }
.pl .af-sl-sig i.on { background: var(--ac); }
.pl .af-rv.seal b { position: relative; font: 800 min(2.2cqh, 3.6cqw) / 1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.pl .af-rv.seal small { position: relative; font: 700 min(1.3cqh, 2.2cqw) / 1 var(--hud); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pl .af-sl-cut { display: none; }
/* the rarer, the louder: brass catches a sweep, gunmetal latches, red trembles, TOPFRAG is cut and glitches */
.pl .af-rv.seal.r-rare { background: linear-gradient(160deg, #1d1a14, #0d0c0a 70%); }
.pl .af-rv.seal.r-rare::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 42%, rgba(227, 204, 144, 0.22) 47%, transparent 52%); background-size: 260% 100%; animation: afSweep 3.4s steps(28) infinite; }
.pl .af-rv.seal.r-epic { background: linear-gradient(160deg, #22252b, #0e0f11 70%); box-shadow: inset 0 0 0 1px rgba(138, 144, 155, 0.5), inset 0 0 0 5px #0c0c0e, inset 0 0 0 6px rgba(138, 144, 155, 0.35); animation: afDeal 0.4s calc(var(--k, 0) * 55ms) cubic-bezier(0.2, 1.3, 0.4, 1) both, afLatch 2.6s 1s steps(1) infinite; }
.pl .af-rv.seal.r-legendary { background: linear-gradient(160deg, #2a0710, #0d0507 72%); box-shadow: inset 0 0 0 1px var(--ac); animation: afDeal 0.4s calc(var(--k, 0) * 55ms) cubic-bezier(0.2, 1.3, 0.4, 1) both, afTremor 1.8s 0.8s steps(1) infinite; }
.pl .af-rv.seal.r-legendary::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ac); animation: afScan 2.2s linear infinite; }
.pl .af-rv.seal.r-legendary .af-sl-k { background: var(--ac); color: #fff; box-shadow: none; }
.pl .af-rv.seal.r-topfrag { background: repeating-conic-gradient(from 13deg at 68% 30%, #050506 0 11deg, #16171b 11deg 19deg, #050506 19deg 33deg, #2a2c31 33deg 36deg, #050506 36deg 52deg); box-shadow: inset 0 0 0 1px var(--bone);
  clip-path: polygon(0 0, 41% 0, 50% 7%, 59% 0, 100% 0, 100% 100%, 0 100%); animation: afDeal 0.4s calc(var(--k, 0) * 55ms) cubic-bezier(0.2, 1.3, 0.4, 1) both, afGlitch 2.8s 1.2s steps(1) infinite; }
.pl .af-rv.seal.r-topfrag::after { content: ""; position: absolute; left: 20%; top: 18%; width: 70%; height: 2px; background: var(--af-leg); transform: rotate(-24deg); transform-origin: left; animation: afFault 2.2s steps(1) infinite; }
.pl .af-rv.seal.r-topfrag .af-sl-k { background: var(--bone); color: #050506; box-shadow: none; }
@keyframes afSweep { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes afLatch { 0%, 88% { transform: none; } 90% { transform: translateY(-3px); } 93% { transform: translateY(1px); } 96% { transform: none; } }
@keyframes afTremor { 0%, 80% { transform: none; } 82% { transform: translate(-2px, 1px); } 84% { transform: translate(2px, -1px); } 86% { transform: translate(-1px, 0); } 88% { transform: none; } }
@keyframes afScan { from { transform: translateY(0); } to { transform: translateY(32cqh); } }
@keyframes afGlitch { 0%, 84% { transform: none; } 85% { transform: translate(-4px, 0) skewX(-4deg); } 87% { transform: translate(3px, 0); } 89% { transform: translate(-2px, 1px) skewX(3deg); } 91% { transform: none; } }
/* opening: the seal kicks, then the ceremony takes the screen */
.pl .af-rv.seal.opening { animation: afOpen 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) forwards !important; }
@keyframes afOpen { 0% { transform: none; } 30% { transform: scale(0.94) rotate(-2deg); } 100% { transform: scale(1.12); opacity: 0; } }
/* opened: the tile, and a quick way to wear it */
.pl .af-rv.done { padding: 0; align-content: stretch; justify-items: stretch; aspect-ratio: auto; }
.pl .af-rv.done .cz-tile { width: 100%; height: 100%; }
.pl .af-rv.done.fresh { animation: afStamp 0.36s cubic-bezier(0.2, 1.6, 0.4, 1); }
.pl .af-rvq { position: absolute; top: 8px; right: 8px; z-index: 3; padding: 0.45em 0.7em; font: 800 min(1.3cqh, 2.2cqw) / 1 var(--hud); letter-spacing: 0.14em; text-transform: uppercase; color: #0a0a0b; background: var(--bone); }
.pl .af-rvq:disabled { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--bone); }
.af-cerport { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }

@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .pl .af-cols { grid-template-columns: 1fr; }
  .pl .af-pinrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .pl .af-pin, .pl .af-tabpip, .pl .af-rv, .pl .af-rv::after, .pl .af-aura > i, .pl .af-stamp, .pl .af-rv.done.fresh { animation: none !important; }
}

/* frame tiles: an operator under the frame */
.pl .cz-tl-card .af-tlport { z-index: 0; object-fit: cover; object-position: 50% 12%; }
.pl .cz-tl-card > .cz-frame, .pl .cz-tl-card > .cz-frame-line, .pl .cz-tl-card > img:not(.af-tlport) { z-index: 1; }

/* item tiles: a long title (Nightfall Elite, Against the Odds) shrinks to fit its tile; the clear count shows on the card, not the tile */
.pl .af .cz-tl-thumb { container-type: inline-size; }
.pl .af .cz-tl-title { font-size: min(0.9rem, 9cqi); max-width: 100%; }
.pl .af .cz-tl-title .cz-title { letter-spacing: 0.08em; }
.pl .af .cz-tl-title .cz-t-count, .pl .af .cz-tl-title .cz-t-marks { display: none; }
/* the tab row is solid over a scrolled File (as over Stats), so cards don't show through it */
.pl .df-draft.ops:has(> .df-lboard.af) > .ops-tabs { background: #0b0b0d; }
