/* Honessi collector redesign: full portrait, engraved foil, compact story panel.
   Fixed 630 × 880 artwork coordinates scale together on every viewport. */
:is(#characterGallery,#artefactGallery).ag-deck {
 background:radial-gradient(ellipse at 50% 42%,color-mix(in srgb,var(--deck-accent) 10%,#101014),#07090e 65%,#030407);
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-face {
 border-radius:22px;background:#090c12;box-shadow:0 0 0 1px #e8dab2,inset 0 0 0 5px #17191d,inset 0 0 0 7px #c0a673;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::before {
 content:'';position:absolute;inset:7px;z-index:9;padding:5px;border:0;border-radius:16px;
 background:linear-gradient(118deg,#5d4d2e,#e8d3a0 12%,#f8efcb 19%,#90b8b9 26%,#d7b7da 34%,#e7c78c 43%,#675137 53%,#c9a86a 62%,#d4e6d6 72%,#d2bfe0 81%,#f5e2ac 92%,#7c6240);
 background-size:260% 180%;background-position:var(--foil-x,50%) var(--foil-y,50%);
 -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;
 box-shadow:none;pointer-events:none;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::after {
 content:'';position:absolute;inset:16px;z-index:8;border-radius:10px;opacity:.35;
 background:linear-gradient(115deg,transparent 30%,#fff0c555 47%,transparent 60%);background-size:300% 100%;background-position:var(--foil-x,50%) 0;
 mask-image:linear-gradient(#000 0%,#000 65%,transparent 72%);mix-blend-mode:screen;animation:none;pointer-events:none;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-masthead,
:is(#characterGallery,#artefactGallery).ag-deck .ag-identity-crest {display:none}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-art {
 inset:16px 16px auto!important;width:598px;height:630px;border:0;border-radius:10px 10px 0 0;box-shadow:none;
 background:radial-gradient(ellipse at 55% 30%,color-mix(in srgb,var(--card-accent) 45%,#263438),#101a21 51%,#070e15 85%);
 overflow:hidden;z-index:1;
}
/* The print geometry is behind the portrait, never a mark applied to its body. */
:is(#characterGallery,#artefactGallery).ag-deck .ag-etched-field {
 display:block;position:absolute;inset:50px 22px 10px;z-index:0;opacity:.55;pointer-events:none;
 color:var(--card-accent);background:repeating-linear-gradient(115deg,transparent 0 5px,#e3d4a310 5px 6px);
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-etched-field svg {width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:.7;overflow:visible}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-art img {
 inset:48px 0 auto!important;width:598px;height:auto;max-width:none;max-height:none;object-fit:contain;object-position:center top;
 filter:drop-shadow(0 8px 15px #0009);translate:0 0!important;transform-origin:center top;z-index:1;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-art::after {
 content:'';display:block;position:absolute;inset:auto 0 0;height:125px;z-index:3;
 background:linear-gradient(transparent,#090d14 90%);pointer-events:none;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-edition {
 inset:29px 38px auto;width:auto;height:28px;display:flex;align-items:center;gap:10px;z-index:5;
 font:600 15px/24px Arial,sans-serif;letter-spacing:2.6px;color:#eadbb6;text-shadow:0 1px 3px #000;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-edition::after {content:'';height:1px;flex:1;background:linear-gradient(90deg,#d8bd8499,transparent)}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-state {display:none}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption {
 inset:591px 33px auto;width:564px;height:60px;box-sizing:border-box;margin:0;padding:0 8px;z-index:5;
 display:flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;text-transform:none;
 color:#f2e4bf;font:700 44px/56px Georgia,'Times New Roman',serif;letter-spacing:-1px;text-shadow:0 2px 2px #000;
 background:linear-gradient(90deg,#0b1219,#1b252b 50%,#0b1219);
 border:0;border-block:1px solid #bfa477;box-shadow:0 3px 12px #0008;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption::before,
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption::after {content:'';position:absolute;top:23px;width:8px;height:8px;border:1px solid #d6bd89;transform:rotate(45deg);background:#121d23}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption::before{left:-5px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption::after{right:-5px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption.ag-long-name{font-size:34px;letter-spacing:-.6px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-copy {
 inset:664px 43px auto;width:544px;height:155px;box-sizing:border-box;margin:0;padding:0;
 display:flex;flex-direction:column;justify-content:flex-start;gap:10px;border:0;border-radius:0;box-shadow:none;
 background:none;z-index:4;overflow:visible;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-copy::before{display:none}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-copy>*{position:static;inset:auto;width:100%;max-width:100%;flex:0 0 auto}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-role {
 margin:0;padding:0;border:0;text-align:center;color:var(--card-accent);font:600 20px/25px Arial,sans-serif;letter-spacing:.5px;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-description {
 margin:0;padding:0;text-align:left;color:#e3e4e3;font:400 23px/29px Arial,sans-serif;letter-spacing:0;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-footer {
 inset:830px 36px auto;height:28px;display:flex;justify-content:space-between;align-items:center;gap:15px;
 padding-top:6px;border-top:1px solid #c4a57455;color:#d8c8a1;z-index:5;font:500 15px/20px Arial,sans-serif;letter-spacing:.5px;
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-footer a{font:inherit;min-height:27px;color:inherit;display:flex;align-items:center;text-decoration:none}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-footer a:hover{color:#fff5d7;text-decoration:underline;text-underline-offset:4px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-footer .ag-signature{font:500 15px/20px Arial,sans-serif;letter-spacing:.2px;color:#b8b9b5}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-footer .ag-signature svg{display:none}
/* Engraved rainbow diffraction: bright at the edges, restrained over faces. */
:is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil {
 inset:0;z-index:2;opacity:.60!important;mix-blend-mode:screen;
 background-image:repeating-linear-gradient(112deg,transparent 0%,#8ddddd66 12%,#a4b5ff55 19%,#e4a6d877 27%,#edc98077 34%,#97dec266 42%,transparent 51%);
 background-size:270% 180%;background-position:var(--foil-x,50%) var(--foil-y,50%);
 -webkit-mask-image:radial-gradient(ellipse 32% 31% at 52% 34%,transparent 45%,#0002 75%,#000 100%);
 mask-image:radial-gradient(ellipse 32% 31% at 52% 34%,transparent 45%,#0002 75%,#000 100%);
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil::before {
 content:'';inset:0;opacity:.55;mask-image:none;background:repeating-linear-gradient(36deg,#e6d9a855 0 1px,transparent 1px 5px),repeating-linear-gradient(126deg,#c7c8ee33 0 1px,transparent 1px 5px);
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil::after {
 content:'';inset:-25%;opacity:.8;animation:none;transform:translateX(var(--foil-sweep,0%));
 background:linear-gradient(112deg,transparent 30%,#bbddf511 42%,#fff4ce88 49%,#dfb3df44 54%,transparent 65%);
}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card:not([data-position=active]) .ag-holo-foil{opacity:.22!important}
/* Original comic objects stay complete within a generous engraved display field. */
#artefactGallery.ag-deck .ag-source-art>svg {
 inset:80px 20px auto;width:558px;height:480px;z-index:1;filter:drop-shadow(0 10px 18px #0008);
}
#artefactGallery.ag-deck .ag-source-art .ag-etched-field svg {position:static;width:100%;height:100%;filter:none}
#artefactGallery.ag-deck .ag-source-art .ag-holo-foil{opacity:.42!important;mask-image:linear-gradient(90deg,#000,transparent 23%,transparent 77%,#000)}
#artefactGallery.ag-deck .ag-card-art img{visibility:hidden}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card:focus-visible{outline:2px solid #f1d498;outline-offset:6px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-footer a:focus-visible{outline:2px solid #f1d498;outline-offset:3px}
@media(prefers-reduced-motion:reduce){
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::before{background-position:48% 35%}
 :is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil{opacity:.25!important}
}
/* The global hidden contract must win after all layout declarations. */
:is(#artefactGallery,#characterGallery).ag-deck[hidden],:is(#artefactGallery,#characterGallery).ag-deck [hidden]{display:none!important}
@media(max-width:450px){
 body.gallery-open>nav.hx-unified-nav .hx-pyramid-symbol{display:none!important}
 body.gallery-open>nav.hx-unified-nav button small{font-size:10px!important;white-space:nowrap}
}

/* Compact dossier fields replace synopsis copy; every value is on the card. */
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-art{height:538px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption{top:522px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-copy{top:596px;height:220px;gap:12px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;margin:0}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat{min-width:0;padding-top:7px;border-top:1px solid #bfa47755}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat-wide{grid-column:1/-1}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat dt{color:#bfa477;font:600 13px/17px Arial,sans-serif;letter-spacing:1.5px;text-transform:uppercase}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat dd{margin:3px 0 0;color:#f0eee5;font:500 22px/26px Arial,sans-serif;letter-spacing:0}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat-wide dd{font-size:20px;line-height:25px}
#artefactGallery.ag-deck .ag-card-art img{visibility:visible;inset:55px 30px auto!important;width:538px;height:450px;object-fit:contain;filter:none}
#artefactGallery.ag-deck .ag-card-art::after{height:40px}
#artefactGallery.ag-deck .ag-card-copy{gap:19px}
#artefactGallery.ag-deck .ag-stat-grid{row-gap:20px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat{display:block!important;align-items:initial;justify-content:initial}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat dt,
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat dd{display:block;position:static;width:auto;text-align:left;float:none}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat-wide dd{font-size:19px;line-height:24px}
:is(#characterGallery,#artefactGallery).ag-deck .ag-stat{padding:7px 0 0;border-bottom:0}

/* Touch devices use a static print finish, avoiding animated masked GPU layers. */
@media (pointer:coarse),(max-width:700px),(prefers-reduced-motion:reduce){
 :is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil,
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::after{display:none!important}
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::before{background:none!important;-webkit-mask:none!important;mask:none!important;padding:0;border:3px solid #cbb580}
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card-art img{filter:none!important}
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card-face{transform:scale(var(--card-scale))!important;will-change:auto!important}
}

/* Repeated navigation taps should not trigger browser double-tap magnification. */
body.gallery-open > nav button,:is(#characterGallery,#artefactGallery) button,:is(#characterGallery,#artefactGallery) a{touch-action:manipulation}

/* Only the selected card floats; fitting the printed face remains independent. */
@keyframes collector-hover {0%,100%{translate:0 2px}50%{translate:0 -4px}}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card[data-position=active]{animation:collector-hover 7s ease-in-out infinite}
@keyframes mobile-foil-pass {0%,100%{transform:translateX(-32%)}50%{transform:translateX(32%)}}
/* One moving translucent film, with no blur, masks or blend surfaces on phones. */
@media(pointer:coarse),(max-width:700px){
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card[data-position=active] .ag-holo-foil{
  display:block!important;opacity:1!important;mix-blend-mode:normal;-webkit-mask:none;mask:none;
  background:linear-gradient(115deg,#77dfff16,transparent 28%,transparent 65%,#e8b7ff20);background-size:100% 100%;
 }
 :is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil::before{display:none}
 :is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil::after{
  display:block;inset:0 -35%;opacity:1;-webkit-mask:none;mask:none;mix-blend-mode:normal;
  background:linear-gradient(112deg,transparent 18%,#71e6ff12 31%,#92f7df32 39%,#ffeca342 45%,#fff6e84d 49%,#e3acff38 54%,#96b7ff28 60%,transparent 72%);
  animation:mobile-foil-pass 9s ease-in-out infinite;will-change:transform;
 }
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::before{
  border-image:linear-gradient(120deg,#d7bd80,#f7edc8 18%,#9be0df 30%,#dbb4ee 46%,#f6d895 63%,#a3cde6 78%,#e4c486) 1;
 }
}
:is(#characterGallery,#artefactGallery).ag-paused .ag-card,
:is(#characterGallery,#artefactGallery).ag-document-hidden .ag-card,
:is(#characterGallery,#artefactGallery).ag-document-hidden .ag-holo-foil::after{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){
 :is(#characterGallery,#artefactGallery).ag-deck .ag-card{animation:none!important;translate:0 0}
 :is(#characterGallery,#artefactGallery).ag-deck .ag-holo-foil::after{animation:none!important;transform:none!important;will-change:auto}
}

/* 217: Separate art from names. Safari must never composite foil over type. */
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-face{isolation:isolate;transform-style:flat}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-art{height:498px;contain:paint;transform-style:flat}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption{top:522px;height:62px;line-height:52px;padding:4px 12px;isolation:isolate;transform:translateZ(0);z-index:10;white-space:normal;text-wrap:balance;overflow:visible;background:#101920}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-caption.ag-long-name{font-size:32px;line-height:36px}
#artefactGallery.ag-deck .ag-card-art img{height:436px;inset:55px 30px auto!important}
#characterGallery.ag-deck .ag-card-art img[src*="guardian-217"]{inset:48px 0 auto!important;width:598px;height:450px;object-fit:contain}
/* Keep all six navigation labels readable at iPhone widths. */
@media(max-width:450px){
 body.gallery-open>nav.hx-unified-nav{padding-inline:4px!important;gap:0!important}
 body.gallery-open>nav.hx-unified-nav button{min-width:0!important;padding-inline:2px!important;flex:1 1 0!important;overflow:visible!important}
 body.gallery-open>nav.hx-unified-nav button small{font-size:9px!important;letter-spacing:0!important}
}

/* 218: Bio-security hologram. Scan is clipped to the art, away from names. */
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::after{display:none!important}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card-face::before{background:none!important;padding:0;border:3px solid #b9c7b7;border-image:linear-gradient(180deg,#d5be88,#83d6ce 48%,#d5be88) 1;-webkit-mask:none!important;mask:none!important}
:is(#characterGallery,#artefactGallery).ag-deck .ag-bioscan{position:absolute;inset:0;z-index:4;overflow:hidden;pointer-events:none;color:#8ff6df;opacity:0}
:is(#characterGallery,#artefactGallery).ag-deck .ag-card[data-position=active] .ag-bioscan{opacity:1}
.ag-bioscan .ag-scan-target{position:absolute;inset:0;width:100%;height:100%;stroke:currentColor;stroke-width:1.4;opacity:.65}
.ag-bioscan .ag-scan-ticks{opacity:.55;stroke-width:1}
.ag-bioscan .ag-scan-print{opacity:.7;stroke-width:1.1}
.ag-bioscan .ag-scan-beam{position:absolute;top:65px;left:30px;right:30px;height:42px;border-bottom:2px solid #baffed;background:linear-gradient(180deg,transparent,#48e8c808 35%,#48e8c83d);box-shadow:0 4px 8px -5px #b5ffef;transform:translateY(0);opacity:0}
.ag-bioscan .ag-scan-readout{position:absolute;left:48px;right:48px;bottom:10px;display:flex;align-items:center;gap:8px;height:24px;padding:0 8px;color:#b5f7e8;background:#061a20d9;border-top:1px solid #75d4c166;font:500 11px/18px monospace;letter-spacing:1.2px}
.ag-scan-readout i{width:4px;height:4px;border-radius:50%;background:#9af8df}
.ag-scan-readout b{margin-left:auto;font:inherit}
.ag-scan-readout .ag-scan-lock{position:absolute;right:8px;opacity:0}
.ag-card[data-position=active] .ag-scan-beam{animation:bio-scan-pass 7s ease-in-out infinite}
.ag-card[data-position=active] .ag-scan-search{animation:bio-scan-search 7s step-end infinite}
.ag-card[data-position=active] .ag-scan-lock{animation:bio-scan-lock 7s step-end infinite}
@keyframes bio-scan-pass{0%,4%{transform:translateY(0);opacity:0}9%{opacity:.8}72%{transform:translateY(350px);opacity:.8}78%,100%{transform:translateY(350px);opacity:0}}
@keyframes bio-scan-search{0%,74%{opacity:1}75%,100%{opacity:0}}
@keyframes bio-scan-lock{0%,74%{opacity:0}75%,100%{opacity:1}}
:is(#characterGallery,#artefactGallery):is(.ag-paused,.ag-document-hidden) .ag-bioscan *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){
 :is(#characterGallery,#artefactGallery) .ag-bioscan *{animation:none!important}
 .ag-bioscan .ag-scan-beam,.ag-bioscan .ag-scan-search{display:none}
 .ag-bioscan .ag-scan-lock{opacity:1}
}
