/* The card's material, silhouette and gem carry rarity; the rules stay on parchment. */
.duel-view .hs-card{
  --frame:#969c95;--frame-light:#e4e5d8;--frame-dark:#424b49;--frame-glow:#a9b3a800;--nameplate:#333f3d;--gem:#bdc6bb;
  isolation:isolate;border:4px solid var(--frame);border-radius:19px 19px 12px 12px;
  background:radial-gradient(ellipse at 25% 18%,#fff7df80,transparent 52%),repeating-linear-gradient(120deg,#57412606 0 1px,transparent 1px 5px),linear-gradient(135deg,#e5d7b8,#f0e5cc 45%,#caba98);
  box-shadow:0 4px 0 var(--frame-dark),0 9px 17px #0006,0 0 17px var(--frame-glow),inset 0 0 0 2px var(--frame-light),inset 0 0 0 5px var(--frame-dark),inset 0 0 18px #4b342d35;
  padding:9px 9px 34px;transition:transform .18s,box-shadow .18s;filter:none;
}
.duel-view .hs-card:before{content:'';position:absolute;inset:5px;border:1px solid color-mix(in srgb,var(--frame) 65%,transparent);border-radius:11px 11px 6px 6px;pointer-events:none;z-index:1}
.duel-view .hs-card:after{content:none}
.duel-view .hs-rarity-rare{--frame:#458fca;--frame-light:#c1eaff;--frame-dark:#1a3f60;--frame-glow:#57bbff28;--nameplate:#1d3e56;--gem:#53bdff;border-radius:15px 15px 8px 8px}
.duel-view .hs-rarity-epic{--frame:#a778d0;--frame-light:#f0d6ff;--frame-dark:#4c285f;--frame-glow:#ba73ff35;--nameplate:#4c2c60;--gem:#d18bff;border-radius:25px 25px 12px 12px;border-style:double;border-width:5px}
.duel-view .hs-rarity-legendary{--frame:#d9a84f;--frame-light:#fff2b6;--frame-dark:#76512a;--frame-glow:#f3b34245;--nameplate:#644420;--gem:#ffc351;border-radius:28px 28px 13px 13px;border-width:5px}
.duel-view .hs-rarity-legendary:after{content:'';position:absolute;top:-12px;left:50%;right:auto;width:50px;height:18px;transform:translateX(-50%);background:linear-gradient(110deg,#745025,#ffeab0 45%,#c58f38 65%,#ffeab0);clip-path:polygon(0 100%,8% 30%,25% 65%,36% 5%,50% 45%,64% 5%,75% 65%,92% 30%,100% 100%);filter:drop-shadow(0 1px 1px #291b10);z-index:3}
.duel-view .hs-card-art{position:relative;border:3px solid var(--frame-dark);border-radius:22px 22px 6px 6px;box-shadow:0 1px 0 var(--frame-light),0 0 0 1px var(--frame);flex-shrink:0;background:#1a282b}
.duel-view .hs-card-art:after{content:none}
.duel-view .hs-rarity-epic .hs-card-art{border-radius:35% 35% 7px 7px;border-color:#573775}
.duel-view .hs-rarity-legendary .hs-card-art{border-radius:40% 40% 6px 6px;border-color:#a97c34;box-shadow:0 1px 0 #fff1bc,0 0 0 1px #765327}
.duel-view .hs-card-name{width:calc(100% + 12px);position:relative;margin:7px -6px 0;padding:7px 5px;min-height:38px;display:flex;align-items:center;justify-content:center;border:1px solid var(--frame);border-radius:3px 3px 7px 7px;background:linear-gradient(110deg,var(--frame-dark),var(--nameplate) 45%,var(--frame-dark));box-shadow:0 2px 3px #0004,inset 0 1px 0 #ffffff28;color:#fff1d3;font:700 14px/1.2 Georgia,serif;text-shadow:0 1px 2px #0009;z-index:2}
.duel-view .hs-card-type{font-size:7px;letter-spacing:.65px;margin:9px 0 5px;color:#655b48;line-height:1.5}
.duel-view .hs-card-text{align-self:stretch;position:relative;color:#2e291f;font-family:"Segoe UI Variable Text","Segoe UI",system-ui,Arial,sans-serif;font-weight:500;font-kerning:normal;letter-spacing:.005em;text-rendering:optimizeLegibility;border-top:1px solid #7a634630;padding:9px 3px 7px;line-height:1.45;font-size:10px;background:radial-gradient(ellipse at 50% 0,#fff9e450,transparent 70%)}
.hs-card-ornaments{position:absolute;inset:0;z-index:3;pointer-events:none}
.hs-card-ornaments>i{position:absolute;width:7px;height:7px;border:1px solid var(--frame-dark);border-radius:50%;background:radial-gradient(circle at 30% 20%,var(--frame-light),var(--frame) 45%,var(--frame-dark));box-shadow:0 1px 2px #0007}
.hs-card-ornaments>i:nth-child(1){left:24px;top:-1px}.hs-card-ornaments>i:nth-child(2){right:24px;top:-1px}.hs-card-ornaments>i:nth-child(3){left:24px;bottom:-1px}.hs-card-ornaments>i:nth-child(4){right:24px;bottom:-1px}
.hs-rarity-rare .hs-card-ornaments>i{width:13px;height:13px;border-radius:1px;clip-path:polygon(0 0,100% 0,100% 25%,25% 25%,25% 100%,0 100%)}
.hs-rarity-rare .hs-card-ornaments>i:nth-child(2){transform:rotate(90deg)}.hs-rarity-rare .hs-card-ornaments>i:nth-child(3){transform:rotate(-90deg)}.hs-rarity-rare .hs-card-ornaments>i:nth-child(4){transform:rotate(180deg)}
.hs-rarity-epic .hs-card-ornaments>i{width:15px;height:19px;border-radius:70% 5% 70% 5%;border:2px double var(--frame-light);background:linear-gradient(135deg,var(--frame-light),var(--frame),var(--frame-dark))}
.hs-rarity-epic .hs-card-ornaments>i:nth-child(2),.hs-rarity-epic .hs-card-ornaments>i:nth-child(3){transform:rotate(90deg)}
.hs-rarity-legendary .hs-card-ornaments>i{width:20px;height:23px;border:2px solid #f4d185;border-radius:90% 5% 75% 5%;background:repeating-linear-gradient(135deg,#ffe8a8 0 2px,#a47633 3px 5px,#efc36d 6px 8px);box-shadow:0 1px 3px #2b1e12}
.hs-rarity-legendary .hs-card-ornaments>i:nth-child(2),.hs-rarity-legendary .hs-card-ornaments>i:nth-child(3){transform:rotate(90deg)}
.hs-card-emblem{position:absolute;top:-8px;right:-8px;z-index:5;display:grid;place-items:center;width:25px;height:25px;padding:4px;border:2px solid var(--frame-light);border-radius:50%;background:linear-gradient(140deg,var(--frame-light),var(--frame-dark) 50%,var(--frame));box-shadow:0 2px 4px #0008}
.hs-card-gem{display:block;width:100%;height:100%;border-radius:50%;background:conic-gradient(from 25deg,#fff8ed,var(--gem) 14%,var(--frame-dark) 35%,var(--gem) 58%,#fff5ef 65%,var(--gem) 80%,var(--frame-dark));box-shadow:inset 0 0 0 1px #ffffff77}
.hs-rarity-rare .hs-card-emblem{border-radius:4px;transform:rotate(45deg);width:24px;height:24px}.hs-rarity-rare .hs-card-gem{border-radius:1px}
.hs-rarity-epic .hs-card-emblem{width:30px;height:30px;border-radius:8px;clip-path:polygon(25% 0,75% 0,100% 25%,100% 75%,75% 100%,25% 100%,0 75%,0 25%)}
.hs-rarity-epic .hs-card-gem{border-radius:2px;clip-path:polygon(50% 0,100% 30%,85% 100%,15% 100%,0 30%)}
.hs-rarity-legendary .hs-card-emblem{width:33px;height:33px;padding:6px;border-radius:50%;background:repeating-conic-gradient(#f3d692 0 12deg,#8b6028 14deg 25deg);border-color:#ffe0a0;box-shadow:0 2px 4px #0008,0 0 8px #f2ad4755}
.hs-rarity-legendary .hs-card-gem{border-radius:2px;clip-path:polygon(50% 0,65% 30%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 30%)}
.duel-view .hs-card>.hs-cost{border:2px solid #d3edff;border-radius:10px 15px 10px 15px;background:conic-gradient(from 15deg,#b3e7ff,#3985b5 20%,#19446d 43%,#64bae8 64%,#244f7c 85%,#b3e7ff);box-shadow:0 2px 5px #0008,inset 0 0 0 2px #193b6599;color:#fff;font-weight:700;text-shadow:0 2px 2px #163153;z-index:6}
.duel-view .hs-card>.hs-atk,.duel-view .hs-card>.hs-hp{border:2px solid #fff0ca;box-shadow:0 3px 4px #0007,inset 0 0 0 2px #2c241766;text-shadow:0 2px 2px #0009;bottom:-8px;z-index:5}
.duel-view .hs-card>.hs-atk{background:linear-gradient(135deg,#ffe592,#c28d33 50%,#755020);border-radius:10px 10px 12px 12px;transform:rotate(-4deg)}
.duel-view .hs-card>.hs-hp{background:linear-gradient(135deg,#ffc3a9,#b94740 55%,#67262c);border-radius:10px 10px 16px 16px;transform:rotate(4deg)}
.duel-view .hs-card>.hs-durability{background:linear-gradient(135deg,#d0e4df,#6d9690 55%,#3b555c);border-radius:7px}
.duel-view .hs-card>.hs-spell-mark{bottom:4px;color:var(--frame-dark);font-size:20px;text-shadow:0 1px #fff9}
.duel-view .hs-card>.hs-card-badge{border:1px solid color-mix(in srgb,var(--frame-light) 65%,transparent);border-radius:3px;background:var(--nameplate);color:#fff2d4;font-size:8px;padding:3px 6px;letter-spacing:.4px;bottom:6px;z-index:4}
.duel-view .hs-in-deck .hs-card-badge{background:#345345;border-color:#a5bd9977;color:#e1efd5}
.duel-view .hs-card-locked .hs-card-badge,.duel-view .hs-collection-missing .hs-card-badge{background:#494d49;border-color:#9da296;color:#e2ded0}
.duel-view .hs-collection-missing .hs-card-art,.duel-view .hs-card-locked .hs-card-art{filter:saturate(.65);opacity:.8}
.duel-view .hs-card:hover:not(:disabled),.duel-view .hs-library-entry:hover .hs-card{box-shadow:0 5px 0 var(--frame-dark),0 14px 22px #0008,0 0 24px var(--frame-glow),inset 0 0 0 2px var(--frame-light),inset 0 0 0 5px var(--frame-dark)}
.duel-view .hs-card.hs-selected{outline:3px solid #86e2c3;outline-offset:4px;box-shadow:0 0 23px #6ed9b55c,inset 0 0 0 2px var(--frame-light),inset 0 0 0 5px var(--frame-dark)}
.duel-view .hs-card:focus-visible{outline:3px solid #f9e6ac;outline-offset:5px}
.duel-view .hs-library-entry .hs-card{min-height:338px;padding:9px 9px 34px;border-width:4px;border-radius:19px 19px 12px 12px}
.duel-view .hs-library-entry .hs-rarity-rare{border-radius:15px 15px 8px 8px}.duel-view .hs-library-entry .hs-rarity-epic{border-width:5px;border-radius:25px 25px 12px 12px}.duel-view .hs-library-entry .hs-rarity-legendary{border-width:5px;border-radius:28px 28px 13px 13px}
.duel-view .hs-library-entry .hs-card-name{font-size:15px;min-height:43px;padding:7px 5px;margin-top:7px}
.duel-view .hs-library-entry .hs-card-text{font-size:10px;min-height:66px;padding:9px 3px 7px}
.duel-view .hs-library-entry .hs-card-art{height:134px;border-width:3px}
.duel-view .hs-forge-entry .hs-card{min-height:310px;padding-bottom:34px}
.duel-view .hs-compact{padding:7px 7px 27px;border-width:3px;border-radius:14px 14px 8px 8px}
.duel-view .hs-compact .hs-card-name{font-size:12px;min-height:28px;padding:5px 3px;margin-top:5px;width:calc(100% + 8px)}
.duel-view .hs-compact .hs-card-art{border-width:2px;border-radius:18px 18px 4px 4px}
.duel-view .hs-compact .hs-card-type{font-size:6px;letter-spacing:.3px;margin:6px 0 3px}
.duel-view .hs-compact .hs-card-text{font-size:9px;padding:4px 1px 3px;line-height:1.3}
.duel-view .hs-compact .hs-card-emblem{width:20px;height:20px;padding:3px;top:-5px;right:-5px}
.duel-view .hs-compact .hs-card-ornaments>i{width:9px;height:10px;border-width:1px}
.duel-view .hs-compact.hs-rarity-legendary:after{width:34px;height:12px;top:-8px}
/* Pack cards must remain inside their fixed reveal faces. */
.duel-view .hs-unseal-front>.hs-card{min-height:0;height:100%;padding:6px 6px 27px;border-width:3px;border-radius:12px;overflow:visible}
.duel-view .hs-unseal-front .hs-card-name{font-size:12px;min-height:32px;padding:5px 3px;margin-top:5px;width:calc(100% + 8px)}
.duel-view .hs-unseal-front .hs-card-type{font-size:6px;margin:5px 0 3px;letter-spacing:.3px}
.duel-view .hs-unseal-front .hs-card-text{font-size:9px;padding:4px 1px 3px;line-height:1.3}
.duel-view .hs-unseal-front .hs-card-art{border-width:2px}
.duel-view .hs-unseal-front .hs-card-emblem{width:20px;height:20px;padding:3px;top:-4px;right:-4px}
.duel-view .hs-unseal-front>.hs-card>.hs-cost{box-sizing:border-box;width:44px;height:30px;top:-8px;left:-8px;gap:3px;padding:2px 3px;font-size:19px;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.duel-view .hs-unseal-front>.hs-card>.hs-cost>.hs-supply-icon{width:11px;height:14px;flex-shrink:0}
.duel-view .hs-unseal-front>.hs-card>.hs-card-faction{--plate-rim:2px;--plate-end:8px;bottom:-1.5px;max-width:calc(100% - 64px);min-height:18px;padding:3px 9px;font-size:7px;line-height:1.15;letter-spacing:0}
.duel-view .hs-unseal-front .hs-card-ornaments>i{width:9px;height:10px;border-width:1px}
.duel-view .hs-unseal-front .hs-card-badge{font-size:7px;padding:2px 4px}
@media(max-width:760px){.duel-view .hs-library-entry .hs-card{min-height:327px;padding:8px 7px 32px}.duel-view .hs-library-entry .hs-card-art{height:116px}.duel-view .hs-library-entry .hs-card-name{font-size:13px;min-height:43px}.duel-view .hs-library-entry .hs-card-type{font-size:6px;letter-spacing:.3px}.duel-view .hs-library-entry .hs-card-text{font-size:10px;line-height:1.4}.duel-view .hs-card-emblem{width:23px;height:23px}.duel-view .hs-forge-entry .hs-card{min-height:287px}.duel-view .hs-forge-entry .hs-card-name{font-size:13px}}
@media(max-width:950px){.duel-view .hs-unseal-front .hs-card-name{font-size:11px;min-height:30px}.duel-view .hs-unseal-front .hs-card-text{font-size:8px;line-height:1.25}.duel-view .hs-unseal-front .hs-card-type{font-size:5px}}
@media(max-width:350px){.duel-view .hs-unseal-front .hs-card-name{font-size:10px}.duel-view .hs-unseal-front .hs-card-text{font-size:7px}}
@media(prefers-reduced-motion:reduce){.duel-view .hs-card{transition:none}}

/* Consulta centrada: conservar el material, los adornos y la gema de cada rareza. */
body:has(.hs-card-inspection){overflow:hidden}
.duel-view .hs-card-inspection{--detail-art-height:clamp(240px,calc(100dvh - 370px),460px);padding:20px 24px;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--inspection-glow) 9%,#080f13) 0%,#050b10f5 70%);backdrop-filter:blur(12px);overscroll-behavior:contain}
.duel-view .hs-card-inspection>section{width:100%;max-width:600px;max-height:calc(100dvh - 40px);padding:0;border:0;background:none;box-shadow:none;overflow:auto;text-align:center;scrollbar-width:thin;scrollbar-color:#bca56a66 transparent}
.hs-inspection-stage{display:grid;place-items:center;min-height:0;padding:22px 20px 24px}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card{width:clamp(280px,calc(var(--detail-art-height) * 2 / 3 + 36px),350px);max-width:100%;min-height:0;padding:10px 10px 42px;border-width:6px;cursor:default;transition:none;transform:none;text-align:center;filter:none;opacity:1}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-art{height:auto;max-height:var(--detail-art-height);border-width:3px;border-radius:12px 12px 5px 5px;filter:none;opacity:1}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-art img{display:block;height:auto;max-height:calc(var(--detail-art-height) - 6px);object-fit:contain;object-position:center;filter:none;opacity:1}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-rarity-epic .hs-card-art,.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-rarity-legendary .hs-card-art{border-radius:12px 12px 5px 5px}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-name{flex:0 0 auto;font-size:20px;min-height:40px;padding:7px 6px;margin-top:8px;width:calc(100% + 12px)}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-type{flex:0 0 auto;font-size:9px;letter-spacing:.6px;margin:7px 0 3px}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-text{flex:0 0 auto;font-size:13px;line-height:1.45;padding:8px 4px 6px;min-height:0;max-height:none;overflow:visible;-webkit-line-clamp:unset}
.duel-view .hs-card-inspection .hs-cost{width:56px;height:56px;font-size:36px;top:-15px;left:-15px;border-width:3px}
.duel-view .hs-card-inspection .hs-atk,.duel-view .hs-card-inspection .hs-hp{min-width:53px;height:53px;font-size:32px;border-width:3px;bottom:-13px}
.duel-view .hs-card-inspection .hs-atk{left:-13px}.duel-view .hs-card-inspection .hs-hp{right:-13px}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-emblem{width:43px;height:43px;top:-13px;right:-13px;padding:7px;border-width:3px}
.duel-view .hs-card-inspection .hs-rarity-epic .hs-card-emblem{width:49px;height:49px}
.duel-view .hs-card-inspection .hs-rarity-legendary .hs-card-emblem{width:53px;height:53px;padding:10px}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-ornaments>i{width:13px;height:13px}
.duel-view .hs-card-inspection .hs-rarity-rare .hs-card-ornaments>i{width:21px;height:21px}
.duel-view .hs-card-inspection .hs-rarity-epic .hs-card-ornaments>i{width:25px;height:31px}
.duel-view .hs-card-inspection .hs-rarity-legendary .hs-card-ornaments>i{width:31px;height:37px}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-ornaments>i:nth-child(odd){left:39px}.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-ornaments>i:nth-child(even){right:39px}
.duel-view .hs-card-inspection .hs-rarity-legendary:after{width:85px;height:28px;top:-20px}
.duel-view .hs-card-inspection .hs-spell-mark{font-size:30px;bottom:7px}
.duel-view .hs-card-inspection .hs-close{position:fixed;top:20px;right:24px;width:43px;height:43px;display:grid;place-items:center;border:1px solid #cfbb8566;border-radius:50%;background:#172328;color:#f4ead4;padding:0;font-size:28px;line-height:1;z-index:2}
.duel-view .hs-card-inspection .hs-close:hover{border-color:#f4d98e;background:#35453e}
.hs-inspection-caption{font:19px/1.5 Georgia,serif;color:#f0e1c4;margin:0 0 15px}
.hs-inspection-caption>span{display:block;font:11px/1.7 'Segoe UI',Arial,sans-serif;color:#acaea2;margin-top:4px}
.hs-card-inspection:has(.hs-inspection-stage>.hs-card) .hs-inspection-caption{display:none}
.hs-inspection-views{display:inline-flex;gap:3px;padding:4px;border:1px solid #b2a27844;background:#111c20;border-radius:6px}
.hs-inspection-views>button{padding:9px 15px;background:none;border:1px solid transparent;border-radius:3px;font-size:12px;color:#b9b9a9}
.hs-inspection-views>button[aria-pressed=true]{color:#fff0c3;border-color:#bca56a88;background:#8e743327}
.hs-inspection-art{height:480px;width:auto;max-width:100%;object-fit:contain;box-shadow:0 12px 45px #0009;border-radius:4px}
.duel-view .hs-card-inspection.has-flavor>section{max-width:1400px;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,430px) minmax(0,1fr);align-items:center;gap:32px;text-align:left}
.hs-card-inspection.has-flavor .hs-inspection-card-column{grid-column:2}
.hs-card-inspection.has-flavor .hs-inspection-lore{grid-column:3}
.hs-inspection-card-column{min-width:0;text-align:center}
.hs-inspection-lore{padding:24px 12px 24px 0;min-width:0;overflow-wrap:anywhere;user-select:text}
.hs-inspection-lore h2{margin:0 0 22px;font:25px/1.3 Georgia,serif;color:#eeddbb}
.hs-inspection-lore blockquote{margin:0;padding:22px 0 0;border-top:1px solid #c4b18455}
.hs-inspection-lore blockquote p{margin:0;font:italic 22px/1.65 Georgia,serif;color:#c9c9bb;white-space:pre-line}
@media(max-width:960px){.duel-view .hs-card-inspection.has-flavor>section{display:block;max-width:600px}.hs-inspection-lore{padding:24px 18px}.hs-inspection-lore h2{font-size:20px;margin-bottom:14px}.hs-inspection-lore blockquote{padding-top:16px}.hs-inspection-lore blockquote p{font-size:18px}}
@media(max-height:740px){.hs-inspection-stage{padding-top:22px;padding-bottom:22px}.hs-inspection-art{height:min(415px,calc(100dvh - 200px))}.hs-inspection-caption{font-size:17px;margin-bottom:12px}}
@media(max-width:480px){.duel-view .hs-card-inspection{--detail-art-height:clamp(240px,calc(100dvh - 350px),430px);padding:54px 14px 16px;align-items:flex-start}.duel-view .hs-card-inspection>section{max-width:100%;max-height:calc(100dvh - 70px)}.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card{width:min(310px,calc(100vw - 68px));padding:9px 9px 42px}.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-name{font-size:18px;min-height:38px}.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-text{font-size:12px}.duel-view .hs-card-inspection .hs-close{top:10px;right:12px}.hs-inspection-stage{padding:22px 12px 24px}.hs-inspection-art{height:min(430px,calc(100dvh - 230px))}.hs-inspection-caption{font-size:16px}.hs-inspection-views>button{font-size:11px;padding:9px 12px}}

/* The dark inset and faceted bevel continue the lower frame, as in the reference. */
.duel-view .hs-card-faction,.duel-view .hs-unit-faction{
  --plate-rim:3px;--plate-end:12px;
  position:absolute;left:50%;right:auto;bottom:-2px;transform:translate(-50%,50%);z-index:4;isolation:isolate;
  display:flex;align-items:center;justify-content:center;width:max-content;max-width:calc(100% - 90px);min-height:23px;padding:4px 17px;
  border:0;background:none;box-shadow:none;color:#f6ead4;font:600 9px/1.2 Georgia,serif;text-align:center;text-wrap:balance;letter-spacing:.15px;
  text-shadow:0 1px 1px #171814,0 -1px 0 #3a3026;pointer-events:none
}
.duel-view .hs-card-faction:before,.duel-view .hs-unit-faction:before{
  content:'';position:absolute;inset:0;z-index:-1;
  border:solid transparent;border-width:var(--plate-rim) var(--plate-end);
  border-image: url('assets/ui/faction-plaque-inset-02.png') 28 100 fill / var(--plate-rim) var(--plate-end) / 0 stretch;
  filter:drop-shadow(0 1px 1px #10151266);pointer-events:none
}
.hs-faction-name{display:block;max-width:100%}.hs-faction-short{display:none}
.duel-view .hs-card:has(>.hs-card-faction)>.hs-card-badge{position:static;flex:0 0 auto;max-width:100%;margin-top:4px;border-radius:10px;font-size:8px;font-weight:500;padding:2px 7px;letter-spacing:.2px}
.duel-view .hs-card:has(>.hs-card-faction)>.hs-spell-mark{display:none}
.duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-faction{--plate-rim:4px;--plate-end:15px;bottom:-3px;max-width:calc(100% - 128px);min-height:30px;padding:6px 20px;font-size:11.5px}
#app .hs-diagonal .hs-hand .hs-card:has(>.hs-card-faction){padding-bottom:23px}
#app .hs-diagonal .hs-hand .hs-card-faction{--plate-rim:2px;--plate-end:7px;bottom:-1.5px;max-width:calc(100% - 54px);min-height:16px;padding:2px 9px;font:600 clamp(6px,calc(var(--duel-card-width) * .07),8px)/1.1 'Segoe UI',Arial,sans-serif;letter-spacing:0}
#app .hs-diagonal .hs-hand .hs-faction-name,.duel-view .hs-unit-faction .hs-faction-name{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#app .hs-diagonal .hs-hand .hs-faction-short,.duel-view .hs-unit-faction .hs-faction-short{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Deployed units keep the plate under their name and above combat values. */
.duel-view .hs-unit:has(>.hs-unit-faction):after{content:'';position:absolute;inset:auto 0 0;height:70px;background:linear-gradient(transparent,#142129e8 65%);border-radius:0 0 6px 6px;pointer-events:none}
.duel-view .hs-diagonal .hs-unit:has(>.hs-unit-faction) .hs-unit-name{bottom:47px;z-index:3;background:none}
.duel-view .hs-unit-faction{--plate-rim:2px;--plate-end:7px;bottom:28px;transform:translateX(-50%);max-width:calc(100% - 28px);min-height:16px;padding:2px 9px;font:600 clamp(6px,calc(var(--unit-card-width,100px) * .075),9px)/1.1 'Segoe UI',Arial,sans-serif;letter-spacing:0}
@media(max-width:700px){
  #app .hs-diagonal .hs-hand .hs-card-faction{--plate-rim:1.5px;--plate-end:5px;max-width:calc(100% - 46px);min-height:13px;padding:1px 6px}
  .duel-view .hs-diagonal .hs-unit:has(>.hs-unit-faction) .hs-unit-name{bottom:38px}
  .duel-view .hs-unit-faction{--plate-rim:1.5px;--plate-end:5px;bottom:22px;max-width:calc(100% - 16px);min-height:13px;padding:1px 6px}
  .duel-view .hs-unit:has(>.hs-unit-faction):after{height:54px}
}
@media(max-width:480px){
  .duel-view :is(.hs-card-inspection,.hs-unit-peek) .hs-card-faction{max-width:calc(100% - 120px);min-height:28px;padding-inline:16px;font-size:11px}
}

/* BEGIN inspection tilt: scoped to the enlarged-card viewer. */
.duel-view .hs-card-inspection .hs-inspection-tilt-stage>.hs-card{transform:none;transform-origin:center;transition:transform .22s cubic-bezier(.22,.75,.25,1);touch-action:none;user-select:none;cursor:grab}
.duel-view .hs-card-inspection .hs-inspection-tilt-stage>.hs-card.hs-is-tilting{transform:perspective(1200px) rotateX(var(--inspection-tilt-x,0deg)) rotateY(var(--inspection-tilt-y,0deg));transition:none;cursor:grabbing}
.hs-inspection-tilt-hint{margin:-6px 0 12px;color:#a6b3ac;font:11px/1.4 'Segoe UI',Arial,sans-serif;letter-spacing:.1px}
@media(prefers-reduced-motion:reduce){.duel-view .hs-card-inspection .hs-inspection-tilt-stage>.hs-card{transform:none;transition:none;touch-action:auto;user-select:auto;cursor:default}.hs-inspection-tilt-hint{display:none}}
/* END inspection tilt */
