/* ===== 卡面 v3：框色表示層次（普通古銅／菁英銀藍／英雄金／戰術紫），兵種以圖示表示 ===== */
.ycard{--tc:#b99a62;border-color:#8c7048;background:linear-gradient(160deg,#2b2a24,#14171a 72%);box-shadow:inset 0 0 0 1px #0009,0 3px 10px #0007}
.ycard .yc-top{background:linear-gradient(color-mix(in srgb,var(--f) 34%,#2d3126),#1b2019);border-color:color-mix(in srgb,var(--f) 60%,#3a3f33)}
.ycard.elite{--tc:#a9c8ee;border-color:#9fc2ea;background:linear-gradient(160deg,#232d3a,#12161c 72%);box-shadow:inset 0 0 0 1px #0009,inset 0 0 0 3px #3b5675,0 0 10px #7fb0e855}
.ycard.hero{--tc:#f0c458;border-color:#f0c458;background:linear-gradient(160deg,#3a2f17,#17140d 72%);box-shadow:inset 0 0 0 1px #0009,inset 0 0 0 3px #8a6620,0 0 16px #ffd36a77}
.ycard.tactic{--tc:#b79bff;border-color:#8b6cc4;background:linear-gradient(160deg,#2c2244,#14111f 72%);box-shadow:inset 0 0 0 1px #0009,inset 0 0 0 3px #4a3a78,0 3px 10px #0007}
.ycard.tactic .yc-top{background:linear-gradient(#41336a,#241c3d);border-color:#7a62b4}
.ycard.tactic .yc-art{border-color:#7a62b4}
.ycard.tactic .yc-stats{background:linear-gradient(#2a2145,#171229);justify-content:center}
.yc-badges{position:absolute;right:2cqw;bottom:2cqw;display:flex;align-items:flex-end;gap:1.5cqw}
.yc-class,.yc-kw{display:flex;align-items:center;justify-content:center;border-radius:50%;background:#0b110be0;color:var(--tc);border:1.5px solid var(--tc)}
.yc-class{width:20cqw;height:20cqw}.yc-class .yc-glyph{width:13cqw;height:13cqw}
.yc-kw{width:14cqw;height:14cqw;color:#e6dfc6;border-color:#8c917e}.yc-kw .yc-glyph{width:9cqw;height:9cqw}
.yc-glyph{display:block}
.yc-art .yc-glyph{position:static!important;inset:auto!important;flex:none;width:auto;height:auto}
.yc-art .yc-class .yc-glyph{width:13cqw!important;height:13cqw!important}
.yc-art .yc-kw .yc-glyph{width:9cqw!important;height:9cqw!important}

/* ===== 牌組三層入口 ===== */
#presetPicker{margin:0 0 18px;padding:14px;border:1px solid #5e614955;border-radius:8px;background:#161d17}
.pp-tabs{display:flex;gap:6px;margin-bottom:8px}
.pp-tabs button{flex:1;padding:9px 6px;font:600 14.5px system-ui;color:#c9cdbb;background:#1d261d;border:1px solid #4b5240;border-radius:5px;cursor:pointer}
.pp-tabs button.active{background:#2b3524;border-color:var(--gold);color:var(--gold)}
.pp-note{font-size:14px;color:var(--muted);margin:0 2px 8px}
.pp-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}.pp-list:empty{display:none}
.pp-item{display:flex;align-items:center;gap:10px;text-align:left;padding:8px 10px;color:#e4e2d7;background:#1b231c;border:1px solid #444b3b;border-left:3px solid var(--f,#6a6f55);border-radius:5px;cursor:pointer}
.pp-item.on{border-color:var(--gold);border-left-color:var(--f,var(--gold));background:#28321f}
.pp-crest{flex:none;width:28px;height:28px;color:var(--f);display:flex;align-items:center;justify-content:center}.pp-crest svg{width:26px!important;height:26px!important;position:static!important}
.pp-txt{display:flex;flex-direction:column;min-width:0}.pp-txt b{font-size:14.5px}.pp-txt small{font-size:12.5px;color:var(--muted);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:700px){#presetPicker{padding:10px}.pp-list{grid-template-columns:1fr 1fr}.pp-txt small{display:none}}

/* ===== 標題：燙金 ===== */
.gold-foil,header .brand small,#overlay .eyebrow{background:linear-gradient(180deg,#fff3c4 0%,#e3c26e 38%,#9a6f2b 62%,#f0d68f 100%);-webkit-background-clip:text;background-clip:text;color:transparent!important;font-family:Cinzel,'Trajan Pro',Georgia,serif;font-weight:700;letter-spacing:.3em;text-shadow:none;filter:drop-shadow(0 1px 0 #0009)}
header .brand small{font-size:12px}
#overlay .eyebrow{font-size:14.5px}

img.faction-crest{object-fit:contain;filter:drop-shadow(0 1px 2px #000a)!important;-webkit-user-drag:none}
.yc-crest img.faction-crest{width:15cqw!important;height:15cqw!important}

/* ===== 軍旗與徽章 ===== */
.army{position:relative}.army-flag{position:absolute;top:50%;transform:translateY(-50%);height:46px;width:34px;object-fit:contain;filter:drop-shadow(0 1px 3px #000c)}.army.enemy .army-flag{right:-6px}.army.ally .army-flag{left:-6px}
.army-flag[hidden]{display:none}
.tw-start{position:relative}
.tw-emblem{position:absolute;top:6px;right:6px;width:60px;height:60px;object-fit:contain;filter:drop-shadow(0 2px 4px #000b);pointer-events:none}
.tw-emblem.big{position:static;width:120px;height:120px}
.tw-result{display:flex;justify-content:center;align-items:center;gap:6px;margin:6px 0}
.tw-flag{height:46px;width:34px;object-fit:contain;filter:drop-shadow(0 1px 2px #000a);transition:filter .3s}
.tw-flag.lost{filter:grayscale(1) brightness(.55) drop-shadow(0 1px 2px #000a);opacity:.55;transform:rotate(12deg)}
.tw-flag.big{width:60px;height:90px}
.tw-lives{display:flex;gap:2px;align-items:center;letter-spacing:0}
.hud-flags{display:inline-flex;gap:1px;vertical-align:middle}.hud-flags .tw-flag{height:26px;width:20px}
@media(max-width:700px){.tw-emblem{width:52px;height:52px}.tw-emblem.big{width:88px;height:88px}.army-flag{height:40px;width:30px}.tw-flag{height:38px;width:28px}}

/* 英雄格選擇（緊湊版：一排頭像＋當前英雄說明） */
#heroPicker{margin:0 0 14px;padding:10px 12px;border:1px solid #5e614955;border-radius:8px;background:#161d17}
.hp-head{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}.hp-title{font:600 15.5px system-ui;color:var(--gold);letter-spacing:2px}.hp-head small{color:var(--muted);font-size:12.5px}
.hp-row{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.hp-av{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;background:#1b231c;border:1px solid #444b3b;border-radius:6px;color:#cfd4bd;cursor:pointer;min-width:0}
.hp-av.on{border-color:var(--gold);background:#28321f;color:#fff}
.hp-face{width:44px;height:44px;border-radius:50%;overflow:hidden;border:2px solid var(--f);background:#0b120e;display:block}.hp-face svg{width:100%;height:100%;display:block}
.hp-av small{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hp-detail{display:flex;flex-direction:column;gap:2px;margin-top:8px;padding-top:8px;border-top:1px solid #ffffff12;font-size:14px;line-height:1.55;color:#cfd4bd}.hp-detail b{font-size:14.5px}
@media(max-width:700px){.hp-face{width:38px;height:38px}.hp-av small{font-size:12px}}

/* 預設牌組與英雄格並排（桌機），手機直排；避免大片空白 */
#deckPickers{display:flex;flex-wrap:wrap;gap:14px;margin:0 0 16px;align-items:stretch}
#deckPickers>#presetPicker{flex:1 1 440px;margin:0}
#deckPickers>#heroPicker{flex:1 1 380px;margin:0}
.hp-row{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:700px){#deckPickers{gap:10px;margin-bottom:12px}#deckPickers>*{flex-basis:100%!important}}

/* 計分列：金屬徽章貼在軍團名稱旁，不再突出兩側 */
.army-flag{position:static!important;transform:none!important;display:inline-block;vertical-align:middle;width:30px!important;height:30px!important;margin:0 6px 0 0!important;object-fit:contain}
.army.enemy .army-flag{right:auto!important}.army.ally .army-flag{left:auto!important}
@media(max-width:700px){.army-flag{width:26px!important;height:26px!important;margin-right:4px!important}}

/* 計分列：只留徽章與兩顆菱形，省下高度 */
.scorebar .army{flex-direction:row!important;align-items:center;gap:8px!important}
.scorebar .army.ally{flex-direction:row-reverse!important}
body .scorebar .army span{font-size:0!important;line-height:0}
.scorebar .army-flag{width:34px!important;height:34px!important;margin:0!important}
body.in-battle .scorebar .army b{font-size:22px!important}
body .scorebar{min-height:0!important;padding:4px 12px!important}
body.in-battle .scorebar .army span,body .scorebar .army span{font-size:0!important}

/* 戰場上方：隱藏階段標題（平常只剩計時）、戰場名稱列；功能鈕預設摺疊 */
#phase:empty{display:none}
body.in-battle .battlefield-name{display:none!important}
.arena-tools:not(.open)>button:not(#toolsToggle){display:none!important}
#toolsToggle{font-size:17.5px!important;line-height:1;padding:3px 11px!important;letter-spacing:1px}

/* 悖靈卡面：原圖翻轉 180°，蓋上不祥的暗紫遮罩與暗角 */
.ycard.omen .yc-art{position:relative;overflow:hidden}
.ycard.omen .yc-art>svg{transform:rotate(180deg);filter:saturate(.55) contrast(1.15) brightness(.95) hue-rotate(250deg)}
.ycard.omen .yc-art::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 45%,transparent 25%,#12051caa 100%),linear-gradient(180deg,#5b1a5a55,#1a062899);mix-blend-mode:multiply;box-shadow:inset 0 0 22px #a46ae0aa,inset 0 0 6px #e0507a99}
.ycard.omen .yc-top strong{color:#d9b6ff;text-shadow:0 0 8px #8e3fd0aa}
.yc-role{background:currentColor;-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
.yc-art .yc-class .yc-role{width:16cqw!important;height:16cqw!important}
.yc-art .yc-kw .yc-role{width:11cqw!important;height:11cqw!important}

/* ===== 英雄卡：厚金屬框＋雙層描邊＋頂部徽記＋流光 ===== */
.ycard.hero{border:0;padding:7px;gap:4px;border-radius:9px;
 background:linear-gradient(135deg,#fff3c0 0%,#d9a93a 18%,#7b5316 38%,#f2cf6e 55%,#8a5e18 74%,#ffe9a0 100%) border-box;
 box-shadow:0 0 0 1px #2a1a04,inset 0 0 0 1px #fff2b8aa,inset 0 0 0 4px #5a3b0c,0 0 18px #ffd36a99,0 4px 12px #000a}
.ycard.hero::before{content:"";position:absolute;inset:3px;border-radius:7px;border:1px solid #2b1a05;pointer-events:none;box-shadow:inset 0 0 0 1px #f6d57a66}
.ycard.hero .yc-top{background:linear-gradient(#5c4416,#2a1d08);border:1px solid #f0c458;box-shadow:inset 0 0 6px #0009}
.ycard.hero .yc-top strong{color:#ffe9a8;text-shadow:0 0 8px #ffbf3a99,0 1px 1px #000}
.ycard.hero .yc-art{border:2px solid #f6d57a;outline:1px solid #2a1a04;box-shadow:inset 0 0 14px #0009}
.ycard.hero .yc-stats{background:linear-gradient(#3b2a0c,#1d1405);border:1px solid #c9962f;border-radius:3px}
.ycard.hero .yc-art::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,transparent 32%,#ff6b6b30 38%,#ffd36b38 43%,#9bff8f38 48%,#6bf0ff38 53%,#7b8bff38 58%,#e07bff30 63%,transparent 69%);background-size:260% 100%;animation:heroSheen 4.5s ease-in-out infinite}
@keyframes heroSheen{0%,55%{background-position:140% 0}100%{background-position:-60% 0}}
.ycard.elite .yc-art::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,transparent 40%,#e4f0ff38 50%,transparent 60%);background-size:260% 100%;animation:heroSheen 4.5s ease-in-out infinite}
.ycard.elite .yc-art{animation:eliteRim 3.6s ease-in-out infinite}
@keyframes eliteRim{0%,100%{box-shadow:inset 0 0 10px #0009,inset 0 0 0 #8fc0ff00,0 0 3px #7fb0e822}50%{box-shadow:inset 0 0 10px #0009,inset 0 0 14px #8fc0ff77,0 0 9px #9fcaffaa}}
@media(prefers-reduced-motion:reduce){.ycard.hero .yc-art::after,.ycard.elite .yc-art::after,.ycard.elite .yc-art{animation:none}}

/* ===== 菁英卡：鋼藍斜紋框＋銀色描邊（比英雄收斂） ===== */
.ycard.elite{border:0;padding:6px;border-radius:8px;
 background:linear-gradient(135deg,#e6f0fb 0%,#8fb3dc 20%,#34506f 42%,#a9c8ee 60%,#2d435d 80%,#dbe9f8 100%) border-box;
 box-shadow:0 0 0 1px #0c1722,inset 0 0 0 1px #eaf4ffaa,inset 0 0 0 3px #263a52,0 0 10px #7fb0e866,0 3px 10px #0009}
.ycard.elite::before{content:"";position:absolute;inset:2px;border-radius:6px;border:1px solid #0e1a28;pointer-events:none}
.ycard.elite .yc-top{background:linear-gradient(#34506f,#18222f);border:1px solid #a9c8ee;box-shadow:inset 0 0 5px #0009}
.ycard.elite .yc-top strong{color:#e6f2ff;text-shadow:0 1px 1px #000}
.ycard.elite .yc-art{border:2px solid #a9c8ee;outline:1px solid #0e1a28;box-shadow:inset 0 0 10px #0009}
.ycard.elite .yc-stats{background:linear-gradient(#233246,#131a24);border:1px solid #6d90b8;border-radius:3px}

/* ===== 建築卡：木框＋鉚釘 ===== */
.ycard.bld{border:0;padding:6px;border-radius:7px;
 background:
  radial-gradient(circle at 7px 7px,#d9c48c 0 1.6px,#5a4524 2.4px,transparent 3.2px),
  radial-gradient(circle at calc(100% - 7px) 7px,#d9c48c 0 1.6px,#5a4524 2.4px,transparent 3.2px),
  radial-gradient(circle at 7px calc(100% - 7px),#d9c48c 0 1.6px,#5a4524 2.4px,transparent 3.2px),
  radial-gradient(circle at calc(100% - 7px) calc(100% - 7px),#d9c48c 0 1.6px,#5a4524 2.4px,transparent 3.2px),
  repeating-linear-gradient(90deg,#00000014 0 1px,transparent 1px 7px),
  repeating-linear-gradient(0deg,#5a371a 0 5px,#6e4523 5px 9px,#5d3a1c 9px 13px) border-box;
 box-shadow:0 0 0 1px #24140a,inset 0 0 0 1px #a9814f88,inset 0 0 0 3px #3a2412,0 3px 10px #000a}
.ycard.bld .yc-top{background:repeating-linear-gradient(0deg,#6b4423 0 4px,#7a5230 4px 8px);border:1px solid #2e1b0d;box-shadow:inset 0 1px 0 #c9a06a55}
.ycard.bld .yc-top strong{color:#f3e2bf;text-shadow:0 1px 1px #000}
.ycard.bld .yc-art{border:2px solid #2e1b0d;outline:1px solid #a9814f66}
.ycard.bld .yc-stats{background:repeating-linear-gradient(0deg,#5a371a 0 4px,#6b4423 4px 8px);border:1px solid #2e1b0d}

/* ===== 卡框 v3：邊框做舊磨損；文字區塊鋪細碎小花紋（密度依價值：英雄最密） ===== */
:root{--wd-std:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.03 .5%22 numOctaves=%223%22 seed=%225%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.04 0 0 0 0 0.04 0 0 0 0 0.02 0 0 0 9 -4.1%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.75%22/%3E%3C/svg%3E");--wl-std:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.05 .6%22 numOctaves=%223%22 seed=%229%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.85 0 0 0 0 0.76 0 0 0 0 0.56 0 0 0 9 -4.55%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.55%22/%3E%3Cpath d=%22M69 56l10 4 M1 75l24 -4 M83 92l9 -1 M106 68l21 -3 M36 17l17 4 M89 116l15 2 M15 44l20 2 M63 13l13 -3 M42 121l12 4%22 stroke=%22%23e8d6a8%22 stroke-width=%22.7%22 stroke-opacity=%22.55%22 fill=%22none%22 stroke-linecap=%22round%22/%3E%3C/svg%3E");--tp-std:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22%23e6d3a0%22 fill-opacity=%220.2%22%3E%3Cpath d=%22M6 3.4l1.1 1.5L6 6.4 4.9 4.9z%22/%3E%3Ccircle cx=%220.6%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%220.6%22 cy=%2211.4%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%2211.4%22 r=%22.55%22/%3E%3Cpath d=%22M6 8.6l.7.9-.7.9-.7-.9z%22/%3E%3Cpath d=%22M0 6l.8-.6.8.6-.8.6z%22/%3E%3Cpath d=%22M10.4 6l.8-.6.8.6-.8.6z%22/%3E%3C/g%3E%3C/svg%3E");--wd-tactic:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.03 .5%22 numOctaves=%223%22 seed=%225%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.06 0 0 0 0 0.04 0 0 0 0 0.12 0 0 0 9 -4.1%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.75%22/%3E%3C/svg%3E");--wl-tactic:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.05 .6%22 numOctaves=%223%22 seed=%229%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.80 0 0 0 0 0.74 0 0 0 0 1.00 0 0 0 9 -4.55%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.55%22/%3E%3Cpath d=%22M69 56l10 4 M1 75l24 -4 M83 92l9 -1 M106 68l21 -3 M36 17l17 4 M89 116l15 2 M15 44l20 2 M63 13l13 -3 M42 121l12 4%22 stroke=%22%23e4d9ff%22 stroke-width=%22.7%22 stroke-opacity=%22.55%22 fill=%22none%22 stroke-linecap=%22round%22/%3E%3C/svg%3E");--tp-tactic:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22%23d8c8ff%22 fill-opacity=%220.22%22%3E%3Cpath d=%22M6 3.4l1.1 1.5L6 6.4 4.9 4.9z%22/%3E%3Ccircle cx=%220.6%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%220.6%22 cy=%2211.4%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%2211.4%22 r=%22.55%22/%3E%3Cpath d=%22M6 8.6l.7.9-.7.9-.7-.9z%22/%3E%3Cpath d=%22M0 6l.8-.6.8.6-.8.6z%22/%3E%3Cpath d=%22M10.4 6l.8-.6.8.6-.8.6z%22/%3E%3C/g%3E%3C/svg%3E");--wd-ward:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.03 .5%22 numOctaves=%223%22 seed=%225%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.03 0 0 0 0 0.04 0 0 0 0 0.04 0 0 0 9 -4.1%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.75%22/%3E%3C/svg%3E");--wl-ward:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.05 .6%22 numOctaves=%223%22 seed=%229%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.87 0 0 0 0 0.89 0 0 0 0 0.91 0 0 0 9 -4.55%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.55%22/%3E%3Cpath d=%22M69 56l10 4 M1 75l24 -4 M83 92l9 -1 M106 68l21 -3 M36 17l17 4 M89 116l15 2 M15 44l20 2 M63 13l13 -3 M42 121l12 4%22 stroke=%22%23f2f5f7%22 stroke-width=%22.7%22 stroke-opacity=%22.55%22 fill=%22none%22 stroke-linecap=%22round%22/%3E%3C/svg%3E");--tp-ward:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22%23d6dce1%22 fill-opacity=%220.22%22%3E%3Cpath d=%22M6 3.4l1.1 1.5L6 6.4 4.9 4.9z%22/%3E%3Ccircle cx=%220.6%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%220.6%22 cy=%2211.4%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%2211.4%22 r=%22.55%22/%3E%3Cpath d=%22M6 8.6l.7.9-.7.9-.7-.9z%22/%3E%3Cpath d=%22M0 6l.8-.6.8.6-.8.6z%22/%3E%3Cpath d=%22M10.4 6l.8-.6.8.6-.8.6z%22/%3E%3C/g%3E%3C/svg%3E");--wd-elite:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.03 .5%22 numOctaves=%223%22 seed=%225%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.04 0 0 0 0 0.09 0 0 0 0 0.14 0 0 0 9 -4.1%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.75%22/%3E%3C/svg%3E");--wl-elite:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.05 .6%22 numOctaves=%223%22 seed=%229%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.95 0 0 0 0 0.97 0 0 0 0 1.00 0 0 0 9 -4.55%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.55%22/%3E%3Cpath d=%22M69 56l10 4 M1 75l24 -4 M83 92l9 -1 M106 68l21 -3 M36 17l17 4 M89 116l15 2 M15 44l20 2 M63 13l13 -3 M42 121l12 4%22 stroke=%22%23ffffff%22 stroke-width=%22.7%22 stroke-opacity=%22.55%22 fill=%22none%22 stroke-linecap=%22round%22/%3E%3C/svg%3E");--tp-elite:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2210%22 height=%2210%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22%23dcecff%22 fill-opacity=%220.26%22%3E%3Cpath d=%22M6 3.4l1.1 1.5L6 6.4 4.9 4.9z%22/%3E%3Ccircle cx=%220.6%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%220.6%22 cy=%2211.4%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%2211.4%22 r=%22.55%22/%3E%3Cpath d=%22M6 8.6l.7.9-.7.9-.7-.9z%22/%3E%3Cpath d=%22M0 6l.8-.6.8.6-.8.6z%22/%3E%3Cpath d=%22M10.4 6l.8-.6.8.6-.8.6z%22/%3E%3C/g%3E%3C/svg%3E");--wd-hero:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.03 .5%22 numOctaves=%223%22 seed=%225%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.18 0 0 0 0 0.11 0 0 0 0 0.02 0 0 0 9 -4.1%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.75%22/%3E%3C/svg%3E");--wl-hero:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.05 .6%22 numOctaves=%223%22 seed=%229%22/%3E%3CfeColorMatrix values=%220 0 0 0 1.00 0 0 0 0 0.95 0 0 0 0 0.71 0 0 0 9 -4.55%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.55%22/%3E%3Cpath d=%22M69 56l10 4 M1 75l24 -4 M83 92l9 -1 M106 68l21 -3 M36 17l17 4 M89 116l15 2 M15 44l20 2 M63 13l13 -3 M42 121l12 4%22 stroke=%22%23fff8d8%22 stroke-width=%22.7%22 stroke-opacity=%22.55%22 fill=%22none%22 stroke-linecap=%22round%22/%3E%3C/svg%3E");--tp-hero:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%229%22 height=%229%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22%23ffe49a%22 fill-opacity=%220.32%22%3E%3Cpath d=%22M6 3.4l1.1 1.5L6 6.4 4.9 4.9z%22/%3E%3Ccircle cx=%220.6%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%220.6%22 cy=%2211.4%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%2211.4%22 r=%22.55%22/%3E%3Cpath d=%22M6 8.6l.7.9-.7.9-.7-.9z%22/%3E%3Cpath d=%22M0 6l.8-.6.8.6-.8.6z%22/%3E%3Cpath d=%22M10.4 6l.8-.6.8.6-.8.6z%22/%3E%3C/g%3E%3C/svg%3E");--wd-bld:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.03 .5%22 numOctaves=%223%22 seed=%225%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.08 0 0 0 0 0.04 0 0 0 0 0.02 0 0 0 9 -4.1%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.75%22/%3E%3C/svg%3E");--wl-bld:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22150%22 height=%22150%22%3E%3Cfilter id=%22f%22 x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.05 .6%22 numOctaves=%223%22 seed=%229%22/%3E%3CfeColorMatrix values=%220 0 0 0 0.76 0 0 0 0 0.60 0 0 0 0 0.38 0 0 0 9 -4.55%22/%3E%3C/filter%3E%3Crect width=%22150%22 height=%22150%22 filter=%22url(%23f)%22 opacity=%220.55%22/%3E%3Cpath d=%22M69 56l10 4 M1 75l24 -4 M83 92l9 -1 M106 68l21 -3 M36 17l17 4 M89 116l15 2 M15 44l20 2 M63 13l13 -3 M42 121l12 4%22 stroke=%22%23e6cf9d%22 stroke-width=%22.7%22 stroke-opacity=%22.55%22 fill=%22none%22 stroke-linecap=%22round%22/%3E%3C/svg%3E");--tp-bld:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22%23e8d4a2%22 fill-opacity=%220.24%22%3E%3Cpath d=%22M6 3.4l1.1 1.5L6 6.4 4.9 4.9z%22/%3E%3Ccircle cx=%220.6%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%220.6%22 r=%22.55%22/%3E%3Ccircle cx=%220.6%22 cy=%2211.4%22 r=%22.55%22/%3E%3Ccircle cx=%2211.4%22 cy=%2211.4%22 r=%22.55%22/%3E%3Cpath d=%22M6 8.6l.7.9-.7.9-.7-.9z%22/%3E%3Cpath d=%22M0 6l.8-.6.8.6-.8.6z%22/%3E%3Cpath d=%22M10.4 6l.8-.6.8.6-.8.6z%22/%3E%3C/g%3E%3C/svg%3E");}
.ycard{background-image:var(--wl-std),var(--wd-std),linear-gradient(160deg,#2b2a24,#14171a 72%);background-size:150px 150px,150px 150px,auto;background-repeat:repeat,repeat,no-repeat}
.ycard.tactic{background-image:var(--wl-tactic),var(--wd-tactic),linear-gradient(160deg,#2c2244,#14111f 72%);background-size:150px 150px,150px 150px,auto;background-repeat:repeat,repeat,no-repeat}
.ycard.ward{background-image:var(--wl-ward),var(--wd-ward),linear-gradient(160deg,#30343a,#121417 72%);background-size:150px 150px,150px 150px,auto;background-repeat:repeat,repeat,no-repeat}
.ycard.elite{background-image:var(--wl-elite),var(--wd-elite),linear-gradient(135deg,#e6f0fb 0%,#8fb3dc 20%,#34506f 42%,#a9c8ee 60%,#2d435d 80%,#dbe9f8 100%);background-size:150px 150px,150px 150px,auto;background-repeat:repeat,repeat,no-repeat}
.ycard.hero{background-image:var(--wl-hero),var(--wd-hero),linear-gradient(135deg,#fff3c0 0%,#d9a93a 18%,#7b5316 38%,#f2cf6e 55%,#8a5e18 74%,#ffe9a0 100%);background-size:150px 150px,150px 150px,auto;background-repeat:repeat,repeat,no-repeat}
.ycard.bld{background-image:var(--wl-bld),var(--wd-bld),radial-gradient(circle at 8px 8px,#d9c48c 0 1.8px,#5a4524 2.6px,transparent 3.4px),radial-gradient(circle at calc(100% - 8px) 8px,#d9c48c 0 1.8px,#5a4524 2.6px,transparent 3.4px),radial-gradient(circle at 8px calc(100% - 8px),#d9c48c 0 1.8px,#5a4524 2.6px,transparent 3.4px),radial-gradient(circle at calc(100% - 8px) calc(100% - 8px),#d9c48c 0 1.8px,#5a4524 2.6px,transparent 3.4px),repeating-linear-gradient(0deg,#5a371a 0 5px,#6e4523 5px 9px,#5d3a1c 9px 13px);background-size:150px 150px,150px 150px,auto,auto,auto,auto,auto;background-repeat:repeat,repeat,no-repeat,no-repeat,no-repeat,no-repeat,repeat}
.ycard .yc-top{background-image:var(--tp-std),linear-gradient(color-mix(in srgb,var(--f) 34%,#2d3126),#1b2019);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard .yc-stats{background-image:var(--tp-std),linear-gradient(#262a22,#15181a);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard.tactic .yc-top{background-image:var(--tp-tactic),linear-gradient(#41336a,#241c3d);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard.tactic .yc-stats{background-image:var(--tp-tactic),linear-gradient(#2a2145,#171229);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard.ward .yc-top{background-image:var(--tp-ward),linear-gradient(#454a51,#23272c);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard.ward .yc-stats{background-image:var(--tp-ward),linear-gradient(#2d3136,#181b1f);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard.elite .yc-top{background-image:var(--tp-elite),linear-gradient(#34506f,#18222f);background-size:10px 10px,auto;background-repeat:repeat,no-repeat}
.ycard.elite .yc-stats{background-image:var(--tp-elite),linear-gradient(#233246,#131a24);background-size:10px 10px,auto;background-repeat:repeat,no-repeat}
.ycard.hero .yc-top{background-image:var(--tp-hero),linear-gradient(#5c4416,#2a1d08);background-size:9px 9px,auto;background-repeat:repeat,no-repeat}
.ycard.hero .yc-stats{background-image:var(--tp-hero),linear-gradient(#3b2a0c,#1d1405);background-size:9px 9px,auto;background-repeat:repeat,no-repeat}
.ycard.bld .yc-top{background-image:var(--tp-bld),repeating-linear-gradient(0deg,#6b4423 0 4px,#7a5230 4px 8px);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}
.ycard.bld .yc-stats{background-image:var(--tp-bld),repeating-linear-gradient(0deg,#5a371a 0 4px,#6b4423 4px 8px);background-size:12px 12px,auto;background-repeat:repeat,no-repeat}

/* ===== 費用寶晶與類型徽章：多面切割＋金屬邊，不用純色（各卡種配色、降低飽和） ===== */
.ycard .yc-cost{background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#f1f8fb,#aecde0 14%,#5e87a3 26%,#aecde0 40%,#f1f8fb 52%,#5e87a3 66%,#aecde0 80%,#f1f8fb) !important;color:#17303f !important;border:1.5px solid #2c4a60;box-shadow:inset 0 0 0 1px #ffffff55,inset 0 -3px 5px #0000003d,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff66}
.ycard.elite .yc-cost{background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#f6faff,#bcd3ea 14%,#6e8fb3 26%,#bcd3ea 40%,#f6faff 52%,#6e8fb3 66%,#bcd3ea 80%,#f6faff) !important;color:#14263a !important;border:1.5px solid #2a4363;box-shadow:inset 0 0 0 1px #ffffff55,inset 0 -3px 5px #0000003d,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff66}
.ycard.hero .yc-cost{background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#fff6d6,#e8c46a 14%,#9a6d18 26%,#e8c46a 40%,#fff6d6 52%,#9a6d18 66%,#e8c46a 80%,#fff6d6) !important;color:#3a2504 !important;border:1.5px solid #5a3b0c;box-shadow:inset 0 0 0 1px #ffffff55,inset 0 -3px 5px #0000003d,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff66}
.ycard.tactic .yc-cost{background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#f4efff,#bba8ec 14%,#6f58ad 26%,#bba8ec 40%,#f4efff 52%,#6f58ad 66%,#bba8ec 80%,#f4efff) !important;color:#23183f !important;border:1.5px solid #3d2e6b;box-shadow:inset 0 0 0 1px #ffffff55,inset 0 -3px 5px #0000003d,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff66}
.ycard.ward .yc-cost{background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#f0f2f4,#b4bac1 14%,#626971 26%,#b4bac1 40%,#f0f2f4 52%,#626971 66%,#b4bac1 80%,#f0f2f4) !important;color:#1c2024 !important;border:1.5px solid #3a4046;box-shadow:inset 0 0 0 1px #ffffff55,inset 0 -3px 5px #0000003d,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff66}
.ycard.bld .yc-cost{background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#f9ebcd,#d1a766 14%,#7f562a 26%,#d1a766 40%,#f9ebcd 52%,#7f562a 66%,#d1a766 80%,#f9ebcd) !important;color:#2d1a08 !important;border:1.5px solid #4a2f14;box-shadow:inset 0 0 0 1px #ffffff55,inset 0 -3px 5px #0000003d,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff66}
.ycard .yc-class,.ycard .yc-kw{background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 34%,#2a2f29),#0a0e0a 74%);box-shadow:inset 0 0 0 1.5px #000b,inset 0 0 0 2.5px color-mix(in srgb,var(--tc) 38%,transparent),0 1px 3px #000a}
.ycard .yc-eff{letter-spacing:.18em;text-shadow:0 1px 1px #000,0 0 6px color-mix(in srgb,var(--tc) 40%,transparent)}

/* 勢力徽記：放在內框上邊的正中間（名牌列與插畫交界），半圓壓在框線上；卡片窄（對戰手牌）時隱藏，勢力改看旗印條 */
.ycard .yc-top{position:relative;z-index:3}
.ycard .yc-top .yc-crest.on-edge{position:absolute;left:50%;bottom:-6.5cqw;transform:translateX(-50%);width:13cqw;height:13cqw;border-radius:50%;
 background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 30%,#2a2f29),#0a0e0a 76%);
 box-shadow:0 0 0 1.5px color-mix(in srgb,var(--tc) 70%,#1a1a12),0 0 0 2.5px #000b,inset 0 0 0 1px #0009,0 2px 4px #000b;display:flex;align-items:center;justify-content:center;z-index:4}
.ycard .yc-top .yc-crest.on-edge svg,.ycard .yc-top .yc-crest.on-edge .faction-crest,.ycard .yc-top .yc-crest.on-edge img{position:static!important;width:9.5cqw!important;height:9.5cqw!important}
@container (max-width:125px){.ycard .yc-top .yc-crest.on-edge{display:none}}

/* 兵種類型徽章：放在內框下邊正中間（插畫與數值列交界），與上邊的勢力徽記上下對稱；衝鋒小徽章不再顯示 */
.ycard .yc-stats{position:relative;z-index:3}
.ycard .yc-stats .yc-class.on-edge{position:absolute;left:50%;top:-7cqw;transform:translateX(-50%);width:15cqw;height:15cqw;border-radius:50%;z-index:4;
 background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 34%,#2a2f29),#0a0e0a 74%);
 box-shadow:0 0 0 1.5px color-mix(in srgb,var(--tc) 70%,#1a1a12),0 0 0 2.5px #000b,inset 0 0 0 1px #0009,0 2px 4px #000b;display:flex;align-items:center;justify-content:center;border:0}
.ycard .yc-stats .yc-class.on-edge .yc-glyph,.ycard .yc-stats .yc-class.on-edge .yc-role,.ycard .yc-stats .yc-class.on-edge svg{width:10.5cqw!important;height:10.5cqw!important}
.ycard .yc-kw{display:none!important}

/* 丸子排法：勢力徽記（上）與兵種徽章（下）都在內框下邊正中間，上下相貼串成一串；窄卡隱藏勢力徽記 */
.ycard .yc-stats .yc-crest.on-chain{position:absolute;left:50%;top:-18.5cqw;transform:translateX(-50%);width:12.5cqw;height:12.5cqw;border-radius:50%;z-index:4;
 background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 30%,#2a2f29),#0a0e0a 76%);
 box-shadow:0 0 0 1.5px color-mix(in srgb,var(--tc) 70%,#1a1a12),0 0 0 2.5px #000b,inset 0 0 0 1px #0009,0 2px 4px #000b;display:flex;align-items:center;justify-content:center}
.ycard .yc-stats .yc-crest.on-chain svg,.ycard .yc-stats .yc-crest.on-chain .faction-crest,.ycard .yc-stats .yc-crest.on-chain img{position:static!important;width:9cqw!important;height:9cqw!important}
.ycard .yc-stats .yc-class.on-edge{top:-7cqw;width:14cqw;height:14cqw}
@container (max-width:125px){.ycard .yc-stats .yc-crest.on-chain{display:none}}

/* ===== 排法 v4：名牌列＝「勢力壓印＋名字」置中的單一單元；費用球在內框左上；職能徽章在內框右下 ===== */
.ycard .yc-top{justify-content:center}
.ycard .yc-top .yc-nm{display:flex;align-items:center;justify-content:center;gap:2cqw;min-width:0;max-width:calc(100% - 4cqw)}
.ycard .yc-top .yc-nm strong{flex:0 1 auto;min-width:0}
.ycard .yc-flat{display:flex;align-items:center;justify-content:center;flex:none;width:9cqw;height:9cqw;filter:grayscale(.55) sepia(.5) brightness(1.15) contrast(.9) drop-shadow(0 1px 0 #000c);opacity:.95}
.ycard .yc-flat svg,.ycard .yc-flat img,.ycard .yc-flat .faction-crest{width:100%!important;height:100%!important;position:static!important}
.ycard.hero .yc-flat{filter:sepia(.9) saturate(1.4) brightness(1.25) drop-shadow(0 1px 0 #000c)}
.ycard.elite .yc-flat{filter:grayscale(.2) brightness(1.3) hue-rotate(185deg) saturate(.7) drop-shadow(0 1px 0 #000c)}
.ycard.ward .yc-flat{filter:grayscale(.9) brightness(1.3) drop-shadow(0 1px 0 #000c)}
@container (max-width:125px){.ycard .yc-top .yc-flat{display:none}}
.ycard .yc-top .yc-cost{position:absolute;left:2cqw;bottom:-9cqw;z-index:5}
.ycard .yc-stats .yc-class.on-edge{left:auto;right:2.5cqw;top:-11.5cqw;transform:none;width:15cqw;height:15cqw}

/* v4.1：費用球、職能徽章精確對齊插畫的左上角／右下角（距邊各 2cqw）；快捷鍵數字移到右上 */
.ycard .yc-art .yc-cost{position:absolute;left:2cqw;top:2cqw;bottom:auto;z-index:4}
.ycard .yc-art .yc-class.corner{position:absolute;right:2cqw;bottom:2cqw;left:auto;top:auto;transform:none;width:16cqw;height:16cqw;z-index:4;border-radius:50%;
 background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 34%,#2a2f29),#0a0e0a 74%);
 box-shadow:0 0 0 1.5px color-mix(in srgb,var(--tc) 70%,#1a1a12),0 0 0 2.5px #000b,inset 0 0 0 1px #0009,0 2px 4px #000b;display:flex;align-items:center;justify-content:center;border:0}
.ycard .yc-art .yc-class.corner .yc-glyph,.ycard .yc-art .yc-class.corner .yc-role,.ycard .yc-art .yc-class.corner svg{width:11cqw!important;height:11cqw!important}

/* ===== 排法 v5（使用者提案）：名稱列＝左勢力壓印｜中名稱｜右費用球；數值列＝左職能徽章｜右 攻擊（紅）／生命（綠） ===== */
.ycard .yc-top{display:grid;grid-template-columns:11cqw 1fr auto;align-items:center;gap:2cqw;justify-content:stretch}
.ycard .yc-top strong{text-align:center;min-width:0}
.ycard .yc-top .yc-cost{position:static;transform:none;margin:0}
.ycard .yc-top .yc-flat{width:9cqw;height:9cqw}
.ycard .yc-top .yc-flat svg,.ycard .yc-top .yc-flat img,.ycard .yc-top .yc-flat .faction-crest{width:100%!important;height:100%!important;position:static!important}
@container (max-width:125px){.ycard .yc-top .yc-flat{visibility:hidden}}
.ycard .yc-stats{display:flex;align-items:center;justify-content:space-between;gap:3cqw}
.ycard .yc-stats .yc-class.bar{position:static;flex:none;width:13cqw;height:13cqw;transform:none;border-radius:50%;margin:0;
 background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 34%,#2a2f29),#0a0e0a 74%);
 box-shadow:0 0 0 1.5px color-mix(in srgb,var(--tc) 70%,#1a1a12),inset 0 0 0 1px #0009,0 1px 3px #000a;display:flex;align-items:center;justify-content:center;border:0}
.ycard .yc-stats .yc-class.bar .yc-glyph,.ycard .yc-stats .yc-class.bar .yc-role,.ycard .yc-stats .yc-class.bar svg{width:9cqw!important;height:9cqw!important}
.ycard .yc-stats .yc-nums{display:flex;align-items:baseline;gap:1.5cqw;margin-left:auto}
.ycard .yc-stats .yc-sep{color:#b9bfa9;font-style:normal;font-size:.8em;opacity:.8}
.ycard .yc-stats .st-atk{color:#ff6f5e!important;text-shadow:0 1px 0 #000,0 0 6px #ff3b2a55}
.ycard .yc-stats .st-hp{color:#8fe28a!important;text-shadow:0 1px 0 #000,0 0 6px #35d04a55}
.ycard .yc-stats .st-dur{color:#8fd0f0!important}
.ycard .yc-stats .yc-eff{margin:0 auto}
.ycard .yc-stats .yc-sp{width:13cqw;flex:none}

/* ===== v5.1：勢力徽章也做成球（與職能徽章同款深色寶珠）；費用球改中性珍珠象牙色，所有卡種一致 ===== */
.ycard .yc-top{grid-template-columns:14cqw 1fr auto}
.ycard .yc-top .yc-flat{width:13cqw;height:13cqw;border-radius:50%;filter:none;opacity:1;
 background:radial-gradient(circle at 32% 26%,color-mix(in srgb,var(--tc) 34%,#2a2f29),#0a0e0a 74%);
 box-shadow:0 0 0 1.5px color-mix(in srgb,var(--tc) 70%,#1a1a12),inset 0 0 0 1px #0009,0 1px 3px #000a}
.ycard .yc-top .yc-flat svg,.ycard .yc-top .yc-flat img,.ycard .yc-top .yc-flat .faction-crest{width:68%!important;height:68%!important}
.ycard.hero .yc-top .yc-flat,.ycard.elite .yc-top .yc-flat,.ycard.ward .yc-top .yc-flat{filter:none}
.ycard .yc-cost,.ycard.elite .yc-cost,.ycard.hero .yc-cost,.ycard.tactic .yc-cost,.ycard.ward .yc-cost,.ycard.bld .yc-cost{
 background:radial-gradient(circle at 30% 24%,#ffffffd0 0 7%,transparent 24%),conic-gradient(from 25deg,#f7f3e8,#d8d1bc 14%,#9d9680 26%,#d8d1bc 40%,#f7f3e8 52%,#9d9680 66%,#d8d1bc 80%,#f7f3e8) !important;
 color:#2a2518 !important;border:1.5px solid #4a4230;
 box-shadow:inset 0 0 0 1px #ffffff66,inset 0 -3px 5px #0000003a,0 1px 3px #000a,0 0 0 1px #0008 !important;text-shadow:0 1px 0 #ffffff77}

/* ===== v5.2：職能徽章不要球，變成壓印徽記；與「攻擊／生命」合成一個單元，整體在數值列置中 ===== */
.ycard .yc-stats{justify-content:center;gap:3cqw}
.ycard .yc-stats .yc-class.bar{width:auto;height:auto;background:none!important;box-shadow:none!important;border:0;border-radius:0;filter:drop-shadow(0 1px 0 #000c) drop-shadow(0 0 4px color-mix(in srgb,var(--tc) 35%,transparent))}
.ycard .yc-stats .yc-class.bar .yc-glyph,.ycard .yc-stats .yc-class.bar .yc-role,.ycard .yc-stats .yc-class.bar svg{width:11cqw!important;height:11cqw!important}
.ycard .yc-stats .yc-nums{margin-left:0}
.ycard .yc-stats .yc-sp{display:none}
.ycard .yc-stats .yc-eff{margin:0}

/* ===== 護印英魂：石墨鐵灰框（不用戰術紫）。必須壓過 .ycard.tactic，故用 .ycard.tactic.ward ===== */
.ycard.tactic.ward{--tc:#aab2ba;border-color:#8a9199;box-shadow:inset 0 0 0 1px #0009,inset 0 0 0 3px #4b5158,0 3px 10px #0009}
.ycard.tactic.ward .yc-top{border-color:#aab2ba;background-color:#2f3338}
.ycard.tactic.ward .yc-top strong{color:#eef1f4}
.ycard.tactic.ward .yc-art{border-color:#aab2ba}
.ycard.tactic.ward .yc-stats{border-color:#6f767e;background-color:#23272b}
.ycard.tactic.ward .yc-eff{color:#e4e9ee;letter-spacing:.2em}

/* ===== 窄卡（對戰手牌 ≤125px）：名稱列改簡單橫排，不用三欄格線；勢力球隱藏 ===== */
@container (max-width:125px){
 html body .ycard .yc-top{display:flex;align-items:center;gap:1.5cqw;padding:1.5cqw 2cqw}
 html body .ycard .yc-top .yc-flat{display:none}
 html body .ycard .yc-top strong{flex:1 1 auto;min-width:0;text-align:left;letter-spacing:-.04em}
 html body .ycard .yc-top .yc-cost{flex:none;position:static;margin:0}
}

/* ---------- 軍備與構築（新版）：預設牌組並列、英雄在卡池裡、右欄是出戰英雄＋編制 ---------- */
#presetPicker{margin:0 0 14px;padding:10px 12px}
.pp-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.pp-top>b{color:var(--gold);letter-spacing:2px;font-size:15.5px}
.pp-top .pp-tabs{margin-left:auto}.pp-tip{flex:1;color:var(--muted);font-size:14px;min-width:160px}
.pp-fold{padding:4px 12px;font-size:14px;color:#c9cdbb;background:#1d261d;border:1px solid #4b5240;border-radius:5px;cursor:pointer}
.pp-cols{display:grid;grid-template-columns:1fr;gap:12px}
.pp-col h4{margin:0 0 6px;font:600 14.5px system-ui;color:#e4e2d7}.pp-col h4 small{margin-left:8px;color:var(--muted);font-weight:400;font-size:12.5px}
.pp-col .pp-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px}
#presetPicker.folded .pp-cols{display:none}
#presetPicker[data-g] .pp-col{display:none}#presetPicker[data-g="banner"] .pp-col[data-g="banner"],#presetPicker[data-g="theme"] .pp-col[data-g="theme"],#presetPicker[data-g="mix"] .pp-col[data-g="mix"]{display:block}
.pp-item.mix{position:relative}.pp-item.mix::before{content:'';position:absolute;left:-3px;top:-1px;bottom:-1px;width:3px;border-radius:5px 0 0 5px;background:linear-gradient(var(--f),var(--f2))}
.pp-item.mix{border-left-color:transparent}/* 雙旗徽章：兩枚勢力徽章（img）各取一半，拼成一枚 */
.pp-item .pp-crest.half{position:relative;width:34px;height:34px}.pp-item .pp-crest.half img{position:absolute!important;left:1px;top:1px;width:32px!important;height:32px!important;max-width:none}
.pp-item .pp-crest.half img:first-child{clip-path:inset(0 50% 0 0)}.pp-item .pp-crest.half img:last-child{clip-path:inset(0 0 0 50%)}
.pp-item .pp-crest.half::after{content:'';position:absolute;left:50%;top:3px;bottom:3px;width:1px;margin-left:-.5px;background:#0b0f0c;box-shadow:0 0 0 1px #ffffff1f}
.pool-sep{grid-column:1/-1;margin:6px 0 0;padding:4px 2px;border-bottom:1px solid #ffffff14;color:var(--gold);font:600 14px system-ui;letter-spacing:1px}
.collection-card.chosen .chosenmark{color:var(--gold)}
#heroSlotBox{margin:0 0 12px;padding:10px;border:1px solid color-mix(in srgb,var(--f) 50%,#333);border-left:4px solid var(--f);border-radius:6px;background:color-mix(in srgb,var(--f) 8%,#161c16);cursor:pointer}
.hs-head{display:flex;align-items:baseline;gap:8px;margin-bottom:6px}.hs-head b{color:var(--gold);font-size:14px;letter-spacing:1px}.hs-head small{color:var(--muted);font-size:12px}
.hs-body{display:flex;gap:10px}.hs-face{flex:none;width:48px;height:48px;border-radius:50%;overflow:hidden;border:2px solid var(--f);background:#0b120e;display:block}.hs-face svg{width:100%;height:100%;display:block}
.hs-txt{display:flex;flex-direction:column;gap:1px;font-size:12.5px;line-height:1.45;color:#cfd4bd;min-width:0}.hs-txt b{font-size:14.5px}
#cardTip{position:fixed;z-index:1000;width:360px;max-width:92vw;padding:14px 16px;background:#1b221b;border:1px solid var(--gold);border-radius:8px;box-shadow:0 12px 40px #000b;pointer-events:none;display:none;font-size:14.5px}
#cardTip.on{display:block}
#cardTip .unit-directions{display:none}
#cardTip dl{margin:8px 0 0}
.deckslot .slotdesc{display:none}
@media(min-width:1000px){
 #presetPicker .pp-tabs{display:none}
 #presetPicker[data-g] .pp-col{display:block!important}
 #presetPicker.folded .pp-cols{display:none!important}
 .pp-cols{grid-template-columns:1fr 1fr}.pp-col[data-g="mix"]{grid-column:1/-1}.pp-col[data-g="mix"] .pp-list{grid-template-columns:repeat(4,minmax(0,1fr))}
 .pp-col .pp-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .pp-item{padding:4px 8px}.pp-txt small{display:none}.pp-txt b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #deckView .deck-title{margin-bottom:8px;padding:0}
 #deckView .deck-title .eyebrow{display:none}
 #deckView .deck-title h1{font-size:28px;margin:0;line-height:1.2}
 #deckView .deck-title p{margin:2px 0 0;font-size:14px}
 .deck-layout{grid-template-columns:minmax(0,1fr) 430px;gap:20px}
 .deck-sidebar{top:12px;max-height:calc(100vh - 24px);overflow-y:auto;display:flex;flex-direction:column;padding:14px;scrollbar-width:thin}
 #heroSlotBox{order:0}.deck-sidebar>.label{order:1;margin-bottom:8px}
 #draftDeck{order:2;display:block}
 .deckslot{min-height:58px;margin:4px 0;align-items:center;gap:10px;padding:5px 10px}
 .deckslot svg,.deckslot .scene-art{width:46px;height:46px;flex:none;border-radius:3px}
 .deckslot .slottxt{display:flex;flex-direction:column;gap:1px;min-width:0;text-align:left}.deckslot .slottxt b{font-size:14.5px;font-weight:600}
 .deckslot .slotdesc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:#aab29a;font-size:12.5px;line-height:1.4}
 #cardInspect{display:none!important}
 #deckSummary{order:3;margin:10px 0 6px}
 .deck-sidebar>.muted{order:4;font-size:12.5px;margin:8px 0}
 #clearDeck{order:5}
}
@media(min-width:1500px){.deck-layout{grid-template-columns:minmax(0,1fr) 500px}.pp-col .pp-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:999px){.pp-col .pp-list{grid-template-columns:1fr 1fr}.pp-txt small{display:none}#heroSlotBox{margin-bottom:10px}.hs-txt span:nth-of-type(n+3){display:none}}

#simBtn{margin-top:8px}
#simBox{margin-top:8px;font-size:14px;color:#cfd4bd}
.sim-head{padding:8px 4px;color:#e4e2d7}.sim-head b{font-size:22px;color:var(--gold)}.sim-head small{margin-left:6px;color:var(--muted);font-size:12.5px}
.sim-list{display:grid;grid-template-columns:1fr;gap:2px;max-height:260px;overflow:auto;scrollbar-width:thin}
.sim-row{display:flex;justify-content:space-between;padding:3px 8px;background:#ffffff08;border-radius:3px}
.sim-row.good{border-left:3px solid #8fc784}.sim-row.bad{border-left:3px solid #d97a6c}
@media(min-width:1000px){#simBtn{order:6}#simBox{order:7}}

/* 戰術卡面光效：小光點與柔光，依效果採不同形狀、方向與節奏。 */
.ycard.fx-tactic .yc-art{position:relative;overflow:hidden}
.ycard.fx-tactic .yc-art::after{content:"";position:absolute;inset:-10%;pointer-events:none;mix-blend-mode:screen;opacity:.6;
 background:radial-gradient(circle,#fff6d8 0 1.2px,transparent 2px) 0 0/34px 41px,radial-gradient(circle,#ffe29a 0 1px,transparent 1.8px) 17px 20px/47px 37px,linear-gradient(115deg,transparent 40%,#fff4d033 50%,transparent 60%) 0 0/250% 100%;animation:tacticStars 7s linear infinite}
.ycard.fx-embers .yc-art::after{background:radial-gradient(ellipse,#ffd29b 0 .8px,#ff925322 1.6px,transparent 3px) 0 0/31px 47px,radial-gradient(ellipse,#fff2ce 0 .7px,transparent 2px) 13px 21px/53px 61px;animation:tacticEmbers 4.7s linear infinite}
.ycard.fx-fireflies .yc-art::after{background:radial-gradient(circle,#e5ffcf 0 1px,#a8ff9c22 2px,transparent 5px) 0 0/47px 53px,radial-gradient(circle,#fff6b7 0 1px,transparent 4px) 19px 26px/61px 67px;animation:tacticFireflies 8s ease-in-out infinite alternate}
.ycard.fx-frost .yc-art::after{background:linear-gradient(125deg,transparent 47%,#b5efff44 49%,#f3ffff88 50%,transparent 52%) 0 0/59px 71px,radial-gradient(circle,#d9f7ff 0 .7px,transparent 2px) 21px 17px/47px 43px;animation:tacticFrost 11s linear infinite;opacity:.4}
.ycard.fx-summoning .yc-art::after{background:radial-gradient(circle,#f5d9ff 0 1px,#d3b4ff22 2px,transparent 4px) 0 0/43px 57px,radial-gradient(ellipse at 50% 80%,#d4b1ff22,transparent 60%);animation:tacticSummoning 6s ease-in-out infinite alternate}
.ycard.fx-void .yc-art::after{background:radial-gradient(ellipse at 45% 40%,#c16eff33,transparent 60%),radial-gradient(circle,#ecb8ff 0 .8px,transparent 2.4px) 0 0/43px 51px,radial-gradient(circle,#f394c8 0 .7px,transparent 2px) 17px 23px/67px 61px;animation:tacticVoid 9s ease-in-out infinite alternate}
.ycard.fx-ward .yc-art::after{background:linear-gradient(100deg,transparent 36%,#dfedff28 49%,transparent 62%) 0 0/280% 100%,radial-gradient(circle,#e4f4ff 0 1px,transparent 2px) 0 0/53px 59px;animation:tacticWard 10s ease-in-out infinite}
.ycard.fx-ribbons .yc-art::after{background:linear-gradient(135deg,transparent 40%,#fff5d233 49%,transparent 58%) 0 0/300% 100%,radial-gradient(circle,#fff1b9 0 .9px,transparent 2px) 0 0/41px 67px;animation:tacticRibbons 8s ease-in-out infinite}
@keyframes tacticStars{from{background-position:0 0,17px 20px,150% 0}to{background-position:0 -82px,17px -74px,-50% 0}}
@keyframes tacticEmbers{from{background-position:0 0,13px 21px}to{background-position:12px -94px,24px -101px}}
@keyframes tacticFireflies{from{background-position:0 0,19px 26px;opacity:.35}to{background-position:13px -15px,7px 8px;opacity:.75}}
@keyframes tacticFrost{from{background-position:0 0,21px 17px}to{background-position:59px 71px,68px 60px}}
@keyframes tacticSummoning{from{background-position:0 0,0 0;opacity:.35}to{background-position:0 -57px,0 0;opacity:.7}}
@keyframes tacticVoid{from{background-position:0 0,0 0,17px 23px;opacity:.35}to{background-position:0 0,21px 25px,-16px 53px;opacity:.65}}
@keyframes tacticWard{0%,30%{background-position:150% 0,0 0}100%{background-position:-50% 0,0 -59px}}
@keyframes tacticRibbons{from{background-position:150% 0,0 0}to{background-position:-50% 0,41px -67px}}
@media(prefers-reduced-motion:reduce){.ycard.fx-tactic .yc-art::after{animation:none;opacity:.3}}

.rl{display:block}.rl.sk{margin-top:5px;color:var(--muted,#aab29a)}.kw{font-weight:700}

#presetBar{position:fixed;top:0;left:0;right:0;z-index:30;display:none;align-items:center;gap:14px;padding:9px max(20px,calc((100vw - 1500px)/2 + 35px));background:#161d17;border-bottom:1px solid #5e6149;box-shadow:0 4px 14px #0008;cursor:pointer}
#presetBar.show{display:flex}
#presetBar>b{color:var(--gold);letter-spacing:2px;font-size:15.5px;white-space:nowrap}
#presetBar .pb-n{font-weight:700;color:#ece7d2;font-size:15.5px;white-space:nowrap}
#presetBar .pb-d{flex:1;min-width:0;color:var(--muted);font-size:13.5px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:700px){#presetBar{padding:8px 12px;gap:8px;flex-wrap:wrap}#presetBar .pb-d{flex-basis:100%;-webkit-line-clamp:1}}

/* 標題下的類型列：菁英／英雄標籤放在最左，類型靠左，屬性靠右；有沒有標籤列高都一樣，不跑版 */
.card-chips{justify-content:flex-start;gap:8px;min-height:38px}
.card-chips>b:last-child{margin-left:auto}


/* 手機：預設牌組的兩個分頁獨立一排、各占一半，不再和「收合」擠在同一行 */
@media(max-width:999px){#presetPicker .pp-top .pp-tabs{order:3;flex:1 1 100%;margin:4px 0 0}#presetPicker .pp-tabs button{flex:1}}
/* 手機全螢幕（加到主畫面）時，頂端的狀態列（時間、電量）不要蓋住標題 */
@media(max-width:700px){header{padding-top:max(14px,env(safe-area-inset-top,0px))}}

/* 圖鑑卡片下方：第一行勢力（無填滿、只有勢力色外框），第二行【類型】職能 */
.gmeta{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.fac-tag{display:inline-block;padding:1px 11px;border:1px solid var(--f);border-radius:999px;color:var(--f);background:none;font-size:12.5px;font-weight:600;letter-spacing:.06em}
.gtype{font-size:14px}

.hand-heading{display:none}
/* 圓形頭像：iOS Safari 的 overflow:hidden 搭配 SVG（含 clipPath／濾鏡）會裁不掉，頭像跑出圈外；改用 clip-path 與 mask 強制裁成圓形 */
.hs-face,.hp-face,.rs-av,.fb-face,#heroBanner .hb-face,.cu-face,.av-opt .av-face,.scorebar .army-av{isolation:isolate;transform:translateZ(0);-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%);-webkit-mask-image:-webkit-radial-gradient(white,black)}
.hs-face svg,.hp-face svg,.rs-av svg,.fb-face svg,#heroBanner .hb-face svg,.cu-face svg,.av-opt .av-face svg,.scorebar .army-av svg{border-radius:50%}
/* 試煉：開戰前的對峙（上方對手、下方我方；圓形頭像沿用構築頁「出戰英雄」的樣式）與獎勵元件（沿用圖鑑卡框的細節） */
.ar-vs{display:flex;flex-direction:column;gap:6px;margin:10px 0 12px;max-width:520px}
.ar-vs-title{font-size:13px;letter-spacing:.2em;color:var(--gold);text-transform:none}
.ar-side{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--f) 50%,#333);border-left:4px solid var(--f);border-radius:6px;background:color-mix(in srgb,var(--f) 8%,#161c16)}
.ar-ring{flex:none;display:block;width:76px;height:76px;border-radius:50%;overflow:hidden;border:2px solid var(--f);background:#0b120e;box-shadow:0 0 14px color-mix(in srgb,var(--f) 45%,transparent),inset 0 0 8px #000a}.ar-ring svg{width:100%;height:100%;display:block}
.ar-who b{display:block;font-size:19px;color:var(--text)}.ar-who small{color:var(--muted);font-size:13px}
.ar-vs-mark{display:flex;align-items:center;gap:12px;color:var(--gold)}.ar-vs-mark i{flex:1;height:1px;background:linear-gradient(90deg,transparent,#8c7048,transparent)}.ar-vs-mark b{font:700 15px/1 Cinzel,serif;letter-spacing:.3em;text-shadow:0 0 8px #d7b77866}
.ar-tiles{display:flex;gap:14px;flex-wrap:wrap;margin:10px 0 16px}
.ar-tile{--tc:#b99a62;display:flex;flex-direction:column;gap:5px;width:200px;padding:5px;text-align:left;border:2px solid #8c7048;border-radius:8px;color:var(--text);font:inherit;cursor:pointer;overflow:hidden;background-image:var(--wl-std),var(--wd-std),linear-gradient(160deg,#2b2a24,#14171a 72%);background-size:150px 150px,150px 150px,auto;background-repeat:repeat,repeat,no-repeat;box-shadow:inset 0 0 0 1px #0009,0 3px 10px #0007;transition:transform .15s,box-shadow .15s}
.ar-tile:hover,.ar-tile:focus-visible{transform:translateY(-3px);box-shadow:inset 0 0 0 1px #0009,0 0 14px #d7b77888}
.ar-tile.rare{border-color:#9fc2ea;background-image:var(--wl-std),var(--wd-std),linear-gradient(160deg,#232d3a,#12161c 72%);box-shadow:inset 0 0 0 1px #0009,inset 0 0 0 3px #3b5675,0 0 10px #7fb0e855}
.ar-tile-top{display:flex;align-items:center;gap:8px;padding:5px 8px;border:1px solid #8c7048;border-radius:4px;background:linear-gradient(#41381f,#1f1b10)}.ar-tile.rare .ar-tile-top{background:linear-gradient(#2c4260,#16212e);border-color:#9fc2ea}
.ar-tile-top strong{font-size:14px;color:#f2dfa8;letter-spacing:.06em}
.ar-gem{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;font-size:13px;line-height:1;background:radial-gradient(circle at 30% 24%,#ffffffd9 0 7%,transparent 24%),conic-gradient(from 25deg,#f1f8fb,#aecde0 14%,#5e87a3 26%,#aecde0 40%,#f1f8fb 52%,#5e87a3 66%,#aecde0 80%,#f1f8fb);color:#17303f;border:1.5px solid #2c4a60;box-shadow:inset 0 0 0 1px #ffffff55,0 1px 3px #000a}
.ar-tile-art{display:grid;place-items:center;height:96px;margin:0;border:1px solid #8c704877;border-radius:4px;background:radial-gradient(circle at 50% 40%,#2c2a22,#0e1112);box-shadow:inset 0 0 12px #000c}.ar-tile.rare .ar-tile-art{border-color:#9fc2ea77}
.ar-swap{font-size:44px;color:#d7b778;text-shadow:0 0 10px #d7b77855}
.ar-tile-body{display:block;flex:1;padding:8px 10px 10px;border:1px solid #8c704877;border-radius:4px;background:linear-gradient(#181c1d,#0f1213);box-shadow:inset 0 0 8px #000b}.ar-tile.rare .ar-tile-body{border-color:#9fc2ea66}.ar-tile-body b{display:block;font-size:15px;color:var(--gold)}.ar-tile-body em{display:block;margin-top:4px;font-style:normal;font-size:12.5px;line-height:1.5;color:var(--muted)}
@media(max-width:700px){.ar-tile{width:calc(50% - 7px)}.ar-ring{width:64px;height:64px}}
.ar-ring{position:relative;isolation:isolate;overflow:visible;box-sizing:border-box}
.ar-ring>svg{border-radius:50%;overflow:hidden;-webkit-clip-path:circle(50% at 50% 50%);clip-path:circle(50% at 50% 50%)}
/* 手牌區上方：這場套用的旗印（名稱＋效果） */
#bannerStrip:empty{display:none}#bannerStrip .banner-line{margin:2px 0 8px;justify-content:flex-start;font-size:12px;line-height:1.5;gap:2px 12px}#bannerStrip .banner-line span{color:#c9c4ae}

.yc-art>.item-art{display:block;width:100%;height:100%;object-fit:cover}.full-card>.item-art{display:block;width:100%;height:auto;object-fit:cover}

.item-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:20px}.item-card-grid article{min-width:0}.item-card-grid .ginfo{padding:12px}.item-card-grid .ginfo small{color:#c8a6e5}@media(max-width:600px){.item-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}

.ycard.item-tactic .yc-flat{visibility:hidden}

/* 預設牌組詳情：前排／後排／戰術建築／費用／玩法 */
.pp-detail{margin-top:10px;padding:10px 12px;border:1px solid #5a5a40;border-radius:6px;background:#141b15;display:grid;gap:5px}.pp-detail .pd-row{display:grid;grid-template-columns:5.5em minmax(0,1fr);gap:8px;font-size:13.5px;line-height:1.5}.pp-detail .pd-row b{color:var(--gold);font-weight:500}.pp-detail .pd-row span{color:#d5d9c8}
