/* ===== card-craft.css · 极简耐看精工收藏卡材质系统（N ~ SP） ===== */
@property --craft-holo{syntax:'<angle>';initial-value:135deg;inherits:false}
@keyframes craft-holo-drift{to{--craft-holo:495deg}}

/* 基础精工卡身 */
.card-shell .pokemon-card{
  position:relative;
  border:4.5px solid transparent!important;
  border-radius:15px!important;
  padding:6px 6px 5px!important;
  overflow:hidden;
  color:var(--c-ink,#2c2620);
}
.card-shell .pokemon-card:after{display:none!important}

/* 1) 棉纸纤维噪点 + 微斜织纹 */
.card-texture{
  position:absolute;inset:0;z-index:0;pointer-events:none;border-radius:11px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23f)' opacity='0.065'/%3E%3C/svg%3E"),
    repeating-linear-gradient(45deg,var(--c-weave,rgba(124,110,90,.036)) 0 1px,transparent 1px 9px),
    repeating-linear-gradient(-45deg,var(--c-weave,rgba(124,110,90,.036)) 0 1px,transparent 1px 9px);
}

/* 2) 双层极细内刻框（克制无四角杂标） */
.card-inner-frame{
  position:absolute;inset:3.5px;z-index:6;pointer-events:none;
  border-radius:9px;
  border:1px solid var(--c-line-out,rgba(154,142,122,.54));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42),inset 0 -1px 0 rgba(0,0,0,.08);
}
.card-inner-frame:after{
  content:'';position:absolute;inset:2.5px;border-radius:6.5px;
  border:.5px solid var(--c-line-in,rgba(166,154,134,.30));
}

/* 3) 雷达背后的淡雅精灵球罗盘暗印 */
.card-watermark{
  position:absolute;left:50%;top:64%;width:168px;height:168px;
  transform:translate(-50%,-50%);z-index:0;pointer-events:none;
  opacity:var(--c-wm-a,.075);color:var(--c-wm,#7d6f58);
}

/* 卡片正文层位于纹理与暗印之上 */
.card-shell .pokemon-card>*:not(.card-texture):not(.card-inner-frame):not(.card-watermark){position:relative;z-index:2}

/* 4) 画框装裱内凹景窗 */
.scene-mat{
  padding:2px;border-radius:9px;margin-bottom:5px;
  background:var(--c-mat,linear-gradient(145deg,#d8d0c0,#8a8072 55%,#cfc6b4));
  box-shadow:0 1.5px 3px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.52);
}
.scene-mat>.scene-box{
  margin-bottom:0!important;border:0!important;border-radius:7px!important;
  box-shadow:inset 0 2px 7px rgba(0,0,0,.40)!important;
}
.scene-mat>.scene-box:after{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);
}
.scene-mat .scene-id{
  padding:1px 5px;border-radius:3px;
  background:rgba(12,10,20,.46);
  border:.5px solid rgba(255,240,200,.24);
  text-shadow:0 1px 2px rgba(0,0,0,.75);
}

/* 5) 精工标题栏与徽章 */
.card-shell .card-heading{align-items:baseline;padding:2px 6px 1px;gap:6px}
.card-shell .card-heading .rarity-label{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:24px;padding:2px 6px;border-radius:4px;
  font:800 12.5px/1.2 Georgia,serif;letter-spacing:.7px;
  background:var(--c-badge-bg);color:var(--c-badge-fg,#fff)!important;
  -webkit-text-fill-color:var(--c-badge-fg,#fff)!important;
  border:.5px solid var(--c-badge-bd,rgba(255,255,255,.35));
  box-shadow:0 1px 3px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.32);
  transform:translateY(-1px);
}
.card-shell .card-heading h2{
  color:var(--c-ink,#2c2620);
  -webkit-text-fill-color:var(--c-ink,#2c2620);
  letter-spacing:.3px;
}
.card-shell .card-heading .bst{
  color:var(--c-bst,#756b5d);
}
.card-shell .card-heading .bst small{
  color:var(--c-muted,#8b7e6e)!important;
  -webkit-text-fill-color:var(--c-muted,#8b7e6e)!important;
}
.card-shell .card-meta{color:var(--c-muted,#8b7e6e);padding:2px 6px 4px}
.card-shell .type-chip{
  background:var(--c-chip-bg,rgba(255,255,255,.55))!important;
  border-color:var(--c-chip-bd,rgba(154,140,116,.46))!important;
}

/* 6) 渐隐菱形细分隔线（替代生硬虚线） */
.card-rule{
  height:7px;margin:0 6px;display:flex;align-items:center;justify-content:center;
}
.card-rule:before,.card-rule:after{
  content:'';flex:1;height:1px;
  background:linear-gradient(90deg,transparent,var(--c-rule,rgba(156,144,124,.46)));
}
.card-rule:after{
  background:linear-gradient(90deg,var(--c-rule,rgba(156,144,124,.46)),transparent);
}
.card-rule i{
  display:block;width:4px;height:4px;margin:0 7px;transform:rotate(45deg);
  border:.8px solid var(--c-jewel,rgba(138,124,102,.78));
  background:var(--c-jewel-bg,transparent);
}
.card-shell .card-facts{
  border-top:0!important;border-bottom:0!important;
  margin:0 6px!important;padding:3px 0!important;
}
.card-shell .card-facts>div+div{border-left-color:var(--c-rule,rgba(156,144,124,.32))}
.card-shell .card-facts span{color:var(--c-muted,#8b7e6e);font-size:9.5px;letter-spacing:.4px}
.card-shell .card-facts strong{color:var(--c-ink,#2c2620)}
.card-shell .card-intro{color:var(--c-intro,#6e6253)}
.card-shell .official-abilities{color:var(--c-muted,#8b7e6e)}
.card-shell .official-abilities>span{
  display:inline-block;padding:0 5px;border-radius:3px;font-weight:600;
  background:var(--c-chip-bg,rgba(164,148,122,.14));
  border:.5px solid var(--c-chip-bd,rgba(164,148,122,.32));
  color:var(--c-chip-fg,#6b5d4a);
}

/* 7) 底部典藏铭文脚标 */
.card-archive-foot{
  display:flex;align-items:center;justify-content:space-between;
  margin:2px 6px 0;padding:3px 1px 1px;
  border-top:.5px solid var(--c-rule,rgba(156,144,124,.28));
  font:600 6.5px/1 Georgia,serif;letter-spacing:1.8px;
  color:var(--c-foot,rgba(136,120,98,.60));
}

/* ================= 6 档安静高级材质预设 ================= */
/* N · 素雅棉纸 + 拉丝青灰银 */
.card-shell.grade-N .pokemon-card{
  --c-ink:#2c2620;--c-muted:#8b7e6e;--c-intro:#6e6253;
  --c-mat:linear-gradient(145deg,#d8d0c0,#8a8072 55%,#cfc6b4);
  --c-badge-bg:linear-gradient(180deg,#8e8679,#696258);
  --c-bst:#756b5d;
  --c-line-out:rgba(154,142,122,.56);--c-line-in:rgba(166,154,134,.30);
  --c-rule:rgba(156,144,124,.46);--c-jewel:rgba(138,124,102,.78);
  --c-weave:rgba(124,110,90,.036);--c-wm:#7d6f58;--c-wm-a:.075;
  background:
    linear-gradient(162deg,#faf7ef 0%,#f1ecdf 56%,#e8e1d0 100%) padding-box,
    linear-gradient(142deg,#dfd7c7 0%,#a89f90 36%,#7d7569 70%,#cfc6b6 100%) border-box;
  box-shadow:0 2px 0 #7a7165,0 10px 22px rgba(42,34,26,.15),inset 0 1px 0 rgba(255,254,248,.9);
}

/* R · 冷雾宣纸 + 拉丝钴银 */
.card-shell.grade-R .pokemon-card{
  --c-ink:#202a36;--c-muted:#687c94;--c-intro:#4f637a;
  --c-mat:linear-gradient(145deg,#c2ddf5,#4775a6 55%,#a8cef0);
  --c-badge-bg:linear-gradient(150deg,#5e9ed9,#31659e);
  --c-bst:#3871ad;
  --c-line-out:rgba(102,146,194,.52);--c-line-in:rgba(134,174,218,.28);
  --c-rule:rgba(112,152,196,.42);--c-jewel:rgba(74,120,172,.78);
  --c-chip-bg:rgba(236,246,255,.68);--c-chip-bd:rgba(110,154,200,.42);--c-chip-fg:#365c85;
  --c-weave:rgba(72,118,168,.038);--c-wm:#4d78a6;--c-wm-a:.08;
  background:
    linear-gradient(162deg,#f7fbff 0%,#ecf3fa 56%,#e1ebf5 100%) padding-box,
    linear-gradient(142deg,#d1e7fc 0%,#71a5d9 36%,#3f6e9e 70%,#b5d6f5 100%) border-box;
  box-shadow:0 2px 0 #375f8a,0 12px 24px rgba(32,62,102,.17),inset 0 1px 0 rgba(255,255,255,.92);
}

/* SR · 暮紫棉纸 + 紫晶拉丝银 */
.card-shell.grade-SR .pokemon-card{
  --c-ink:#2a2138;--c-muted:#7b6c94;--c-intro:#5f5078;
  --c-mat:linear-gradient(145deg,#dfc7fc,#6d48a3 55%,#c7a6f2);
  --c-badge-bg:linear-gradient(150deg,#9b6ee0,#5b369c);
  --c-bst:#6c44b0;
  --c-line-out:rgba(144,110,196,.52);--c-line-in:rgba(174,144,218,.28);
  --c-rule:rgba(146,116,194,.42);--c-jewel:rgba(116,78,176,.78);
  --c-chip-bg:rgba(248,242,255,.68);--c-chip-bd:rgba(148,114,200,.42);--c-chip-fg:#58388a;
  --c-weave:rgba(118,82,178,.04);--c-wm:#6f4ca6;--c-wm-a:.08;
  background:
    linear-gradient(162deg,#fbf8ff 0%,#f1ebfa 56%,#e7def5 100%) padding-box,
    linear-gradient(142deg,#e5d0ff 0%,#9b70db 36%,#593594 70%,#cfb0fa 100%) border-box;
  box-shadow:0 2px 0 #4d2d82,0 12px 26px rgba(66,38,114,.19),inset 0 1px 0 rgba(255,255,255,.92);
}

/* SSR · 象牙丝棉 + 古金压纹 */
.card-shell.grade-SSR .pokemon-card{
  --c-ink:#2e2416;--c-muted:#8c7654;--c-intro:#6b583d;
  --c-mat:linear-gradient(145deg,#fff0ba,#9c7224 55%,#ebd07f);
  --c-badge-bg:linear-gradient(150deg,#e3b850,#9c6f19);
  --c-bst:#a67218;
  --c-line-out:rgba(196,156,74,.62);--c-line-in:rgba(218,182,102,.34);
  --c-rule:rgba(192,154,78,.50);--c-jewel:rgba(176,130,42,.88);--c-jewel-bg:rgba(235,196,104,.35);
  --c-chip-bg:rgba(255,250,234,.72);--c-chip-bd:rgba(198,160,82,.48);--c-chip-fg:#75531a;
  --c-weave:rgba(186,142,52,.048);--c-wm:#a37a29;--c-wm-a:.09;
  background:
    linear-gradient(162deg,#fffdf5 0%,#f6eedb 56%,#ede0c2 100%) padding-box,
    linear-gradient(138deg,#fff3c7 0%,#dbb04a 34%,#8a5f14 68%,#f5d882 100%) border-box;
  box-shadow:0 2px 0 #754e0f,0 0 16px rgba(212,166,62,.22),0 14px 28px rgba(78,54,16,.20),inset 0 1px 0 rgba(255,252,238,.95);
}

/* UR · 珍珠母贝纸 + 柔和虹彩棱边 */
.card-shell.grade-UR .pokemon-card{
  --c-ink:#272034;--c-muted:#7a6f8c;--c-intro:#5b526e;
  --c-mat:conic-gradient(from var(--craft-holo),#c4a6fa,#8adcf5,#b4f0cf,#fae39c,#f2b4df,#c4a6fa);
  --c-badge-bg:linear-gradient(125deg,#9870eb,#58bfe0 50%,#e08fc8);
  --c-line-out:rgba(168,144,214,.58);--c-line-in:rgba(202,184,235,.36);
  --c-rule:rgba(164,142,208,.46);--c-jewel:rgba(142,106,204,.82);--c-jewel-bg:rgba(214,196,252,.45);
  --c-chip-bg:rgba(255,255,255,.72);--c-chip-bd:rgba(168,144,212,.45);--c-chip-fg:#543d82;
  --c-weave:rgba(140,116,196,.042);--c-wm:#7d62b5;--c-wm-a:.085;
  background:
    linear-gradient(135deg,rgba(182,148,255,.09),rgba(118,214,245,.07) 40%,rgba(255,226,154,.08) 72%,rgba(242,166,220,.10)) padding-box,
    linear-gradient(162deg,#fdfcff 0%,#f5f1fa 56%,#eef1fa 100%) padding-box,
    conic-gradient(from var(--craft-holo),#b694fa,#78d2f2,#a8ecc6,#fae08e,#f0a4d8,#b694fa) border-box!important;
  animation:craft-holo-drift 9s linear infinite;
  box-shadow:0 2px 0 #7357a8,0 0 20px rgba(164,128,240,.22),0 14px 30px rgba(54,38,92,.20),inset 0 1px 0 rgba(255,255,255,.95);
}

/* SP · 黑曜丝绒暗纹 + 古金精工框（呼应黑金精灵球卡背） */
.card-shell.grade-SP .pokemon-card,
.god-slide .card-shell.grade-SP .pokemon-card{
  --c-ink:#f5ebd2;--c-muted:#a89578;--c-intro:#c9ba9e;
  --c-mat:linear-gradient(142deg,#f7df99 0%,#b8882c 38%,#54370c 72%,#ebd07f 100%);
  --c-badge-bg:linear-gradient(140deg,#2b1f15,#573b17 55%,#231619);
  --c-badge-fg:#fae3a2;--c-badge-bd:rgba(226,188,104,.78);
  --c-line-out:rgba(212,174,90,.46);--c-line-in:rgba(230,196,118,.22);
  --c-rule:rgba(212,174,90,.36);--c-jewel:rgba(228,190,104,.82);--c-jewel-bg:rgba(186,44,58,.45);
  --c-chip-bg:rgba(218,178,92,.12);--c-chip-bd:rgba(218,178,92,.38);--c-chip-fg:#ebd398;
  --c-foot:rgba(214,178,102,.52);
  --c-weave:rgba(218,178,92,.042);--c-wm:#d9b055;--c-wm-a:.075;
  background:
    radial-gradient(ellipse at 50% 24%,#241b13 0%,#141012 58%,#0a080a 100%) padding-box,
    linear-gradient(142deg,#f7e09e 0%,#c99632 32%,#664410 64%,#b88524 84%,#f2d482 100%) border-box!important;
  box-shadow:0 2.5px 0 #52370c,0 0 22px rgba(208,162,62,.26),0 0 36px rgba(176,30,46,.16),0 16px 34px rgba(0,0,0,.44),inset 0 1px 0 rgba(255,238,186,.42)!important;
}
.card-shell.grade-SP .card-heading h2{
  color:#f5ebd2!important;-webkit-text-fill-color:#f5ebd2!important;
  text-shadow:0 1px 3px rgba(0,0,0,.65)!important;
}
.card-shell.grade-SP .card-heading .bst{
  background:linear-gradient(130deg,#fff0be 0%,#e0ae48 56%,#d96678 100%);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent;
}
.card-shell.grade-SP .type-chip{
  background:rgba(218,178,92,.14)!important;
  border-color:rgba(226,188,104,.46)!important;
  color:#f5dfa3!important;
}
.card-shell.grade-SP .card-talents{border-top-color:rgba(212,174,90,.30)}
.card-shell.grade-SP .talents-caption,
.card-shell.grade-SP .talents-caption .talents-picked{color:#b8a586}
.card-shell.grade-SP .talent-more{
  background:rgba(214,172,82,.10)!important;
  border-color:rgba(214,172,82,.45)!important;
  color:#f0d799!important;
}
.card-shell.grade-SP .exclusive-seal.sp-seal{
  color:#fae6b0;border:.5px solid rgba(226,188,106,.75);
  background:rgba(20,14,12,.82);
}

/* 图鉴缩略卡同步微质感 */
.dex-card{
  background:linear-gradient(162deg,#faf7ef,#ece5d5);
  box-shadow:0 2px 0 rgba(88,78,66,.22),0 4px 10px rgba(32,24,42,.10),inset 0 1px 0 rgba(255,255,255,.8);
}
.dex-card.grade-SP{
  border-color:#c99632!important;
  background:radial-gradient(ellipse at 50% 24%,#241b13 0%,#141012 62%,#0a080a 100%)!important;
  box-shadow:0 2px 0 #52370c,0 4px 14px rgba(176,128,40,.28),inset 0 0 0 1px rgba(235,200,118,.35)!important;
}
.dex-card.grade-SP .dex-caption h3{color:#f5ebd2!important}
.dex-card.grade-SP .dex-meta{color:#b8a586!important}
.dex-card.grade-SP .dex-favorite{color:#d9b566}
.dex-card.grade-SP .dex-favorite.on{color:#f06578}

/* 训练家人物卡专属角标与三栏排版微调 */
.trainer-seal{
  position:absolute;left:6px;top:6px;z-index:7;
  padding:2px 7px;border-radius:4px;pointer-events:none;
  font:700 9.5px/1.35 var(--sans);letter-spacing:.5px;
  color:#fff7e0;border:.5px solid rgba(235,204,132,.72);
  background:linear-gradient(120deg,rgba(46,35,62,.86),rgba(98,74,40,.84));
  box-shadow:0 1px 4px rgba(18,12,28,.35);
}
.pokemon-card.is-trainer .card-facts>div{min-width:0;padding:0 4px}
.pokemon-card.is-trainer .card-facts strong{
  font-size:11.5px;line-height:1.4;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.scene-box.is-trainer .scene-sprite{
  height:76%;bottom:8%;
  filter:drop-shadow(0 4px 4px rgba(8,6,18,.48));
}

@media (max-width:560px){
  .card-shell.grade-UR .pokemon-card{animation:none!important}
}

/* ===== 横向构图 SP（例：【敲你哇】嘎啦嘎啦×皮卡丘）：按景窗宽度铺满，避免两侧留白显小 ===== */
.scene-box.is-sp-wide .scene-sprite{
  left:48%;top:47%;bottom:auto;
  transform:translate(-50%,-50%);
  width:75%;height:auto;max-width:75%;max-height:none;
  filter:drop-shadow(2px 4px 0 #152d2822);
}
.scene-box.is-sp-wide .scene-sprite.fx-layer{filter:none}

/* ===== 卡面角标改为画框下方独立一行，避免遮挡宝可梦立绘 ===== */
.card-seal-row{
  display:flex;flex-wrap:wrap;align-items:center;gap:5px;
  margin:4px 0 2px;padding:0 2px;line-height:1;
}
.card-seal-row>.exclusive-seal,
.card-seal-row>.costume-seal,
.card-seal-row>.trainer-seal{
  position:static!important;left:auto!important;top:auto!important;z-index:auto;
  max-width:none;white-space:normal;line-height:1.45;
}
.card-seal-row>.sp-seal{max-width:100%!important;white-space:normal;overflow:visible;text-overflow:clip}

/* ===== 立绘四周透明边距偏大的卡（sceneFit:'zoom'）：按高度放大，抵消留白 ===== */
.scene-box.is-sp-zoom .scene-sprite{
  left:50%;top:50%;bottom:auto;
  transform:translate(-50%,-50%);
  height:118%;width:auto;max-width:none;max-height:none;
}
