/* 盒組頁（第 3 步）：最上面大卡＋五角能力值，中間「盒組履歷」（生命週期條與價格線共用一條時間軸），最下面資料夾分頁。整頁只有一條捲軸。 */
body.sp { overflow-x: hidden; overflow-y: auto; height: auto; min-height: 100%; background: radial-gradient(1200px 700px at 50% -10%, #17305a 0%, var(--bg) 60%) fixed, var(--bg); color: var(--ink); font-family: var(--font); }
.sp-top { position: sticky; background: rgba(10, 18, 34, .88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(176,208,255,.08); }
.sp-back { text-decoration: none; color: var(--mint); font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 10px; background: rgba(111,214,196,.1); }
.sp-main { max-width: 1240px; margin: 0 auto; padding: 24px 24px 120px; }

/* ── 最上面：大卡｜名稱與能力值 ── */
.sp-hero { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 40px; align-items: start; }
.sp-cardcol { position: sticky; top: 72px; }
.flip { perspective: 1800px; cursor: pointer; }
.flipper { position: relative; transition: transform .7s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; aspect-ratio: var(--ar, .8); }
.flip.flipped .flipper { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; overflow: hidden; }
.face-front { box-shadow: 0 28px 60px rgba(0,0,0,.55); }
.face-front .cf-box { position: absolute; inset: 0; width: 100%; }
.face-front .cf-frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
.face-back { transform: rotateY(180deg); padding: 28px 26px; display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(circle at 20% 10%, rgba(111,214,196,.18), transparent 45%), radial-gradient(circle at 90% 90%, rgba(255,138,118,.16), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 10px, transparent 10px 20px), #10213f;
  border: 1px solid rgba(176,208,255,.2); box-shadow: 0 28px 60px rgba(0,0,0,.55); }
.face-back .bk-no { font: 900 44px/1 var(--font); color: var(--mint); letter-spacing: .02em; }
.face-back h3 { margin: 0; font-size: 20px; }
.face-back ul { margin: 0; padding-left: 1.1em; font-size: 14.5px; line-height: 1.6; color: #d7e2f3; }
.face-back .bk-foot { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.flip-hint { position: absolute; right: 12px; bottom: 12px; z-index: 4; padding: 5px 10px; border-radius: 999px; background: rgba(8,14,28,.8); font-size: 12px; color: var(--muted); pointer-events: none; }
.sp-cardtools { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.sp-cardtools .tb-seg { background: rgba(255,255,255,.06); }
.sp-btn { height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid rgba(176,208,255,.22); background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.sp-btn:hover { background: rgba(255,255,255,.06); }
.sp-btn.primary { background: var(--mint); color: #062520; border-color: transparent; font-weight: 700; }
.sp-btn[aria-pressed="true"] { background: rgba(111,214,196,.16); border-color: var(--mint); color: var(--mint); }

.sp-info { min-width: 0; }
.sp-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sp-series { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 8px; background: var(--c, #1b2a44); color: var(--t, #fff); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.sp-series::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--a, var(--mint)); }
.sp-status { padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.07); color: #d7e2f3; }
.sp-status.pre { background: rgba(143,182,255,.18); color: var(--sky); }
.sp-status.sale { background: rgba(111,214,196,.15); color: var(--mint); }
.sp-status.retiring { background: rgba(255,138,118,.16); color: var(--coral); }
.sp-num { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-info h1 { margin: 14px 0 4px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: .01em; }
.sp-en { margin: 0; color: var(--muted); font-size: 15px; }
.sp-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0; }
.sp-fact { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(176,208,255,.1); }
.sp-fact small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.sp-fact b { font-size: 19px; font-variant-numeric: tabular-nums; }
.sp-fact b em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.sp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.sp-radar { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(176,208,255,.1); }
.sp-radar svg { width: 100%; height: auto; overflow: visible; }
.sp-radar .lbl { fill: #cfdaee; font-size: 13px; font-weight: 600; }
.sp-radar .val { fill: var(--mint); font-size: 12px; font-weight: 700; }
.sp-radar .grid { fill: none; stroke: rgba(176,208,255,.16); }
.sp-radar .shape { fill: rgba(111,214,196,.22); stroke: var(--mint); stroke-width: 2; }
.sp-score { text-align: left; }
.sp-score .big { font: 900 54px/1 var(--font); color: #fff; font-variant-numeric: tabular-nums; }
.sp-score .big small { font-size: 18px; color: var(--muted); font-weight: 600; }
.sp-score p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.sp-score .stars { color: var(--coral); letter-spacing: 2px; font-size: 18px; }

/* ── 盒組履歷 ── */
.sp-section { margin-top: 56px; }
.sp-section > h2 { font-size: 22px; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sp-section > h2 small { flex: 1 1 260px; }
.sp-section > h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.sp-history { margin-top: 18px; display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
.sp-chart { padding: 18px 18px 10px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(176,208,255,.1); min-width: 0; }
.sp-chart svg { display: block; width: 100%; }
.sp-chart text { font-family: var(--font); }
.sp-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sp-legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.sp-side { display: flex; flex-direction: column; gap: 12px; }
.sp-box { padding: 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(176,208,255,.1); }
.sp-box small { color: var(--muted); font-size: 12.5px; display: block; }
.sp-box .now { font: 900 38px/1.1 var(--font); color: var(--mint); margin-top: 4px; }
.sp-box .now.none { font-size: 18px; color: var(--muted); font-weight: 600; }
.sp-box p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.sp-shop { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: #fff; color: #222; font-weight: 800; text-decoration: none; font-size: 15px; }
.sp-shop span { color: #e4002b; }

/* ── 資料夾分頁 ── */
.sp-folder { margin-top: 18px; }
.sp-tabs { display: flex; gap: 4px; padding-left: 14px; position: relative; z-index: 1; overflow-x: auto; scrollbar-width: none; }
.sp-tabs button { border: 1px solid rgba(176,208,255,.16); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 10px 20px 12px; background: #13213d; color: var(--muted); cursor: pointer; font-size: 14.5px; font-weight: 600; margin-bottom: -1px; white-space: nowrap; }
.sp-tabs button[aria-selected="true"] { background: #182c50; color: var(--ink); padding-top: 13px; }
.sp-tabs button em { font-style: normal; font-size: 12px; margin-left: 6px; color: var(--mint); }
.sp-panel { border: 1px solid rgba(176,208,255,.16); border-radius: 0 16px 16px 16px; background: #182c50; padding: 22px 24px; min-height: 220px; }
.sp-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; margin: 0; }
.sp-specs div { padding: 11px 0; border-bottom: 1px dashed rgba(176,208,255,.14); display: flex; justify-content: space-between; gap: 12px; }
.sp-specs dt { color: var(--muted); font-size: 13.5px; white-space: nowrap; flex: none; } .sp-specs dd { margin: 0; text-align: right; font-weight: 600; }
.sp-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.sp-fig { border-radius: 12px; background: rgba(255,255,255,.05); padding: 10px; text-align: center; border: 1px solid rgba(176,208,255,.12); }
.sp-fig.ult { border-color: rgba(255,138,118,.6); box-shadow: 0 0 0 1px rgba(255,138,118,.25), 0 0 18px rgba(255,138,118,.18); }
.sp-fig.exc { border-color: rgba(111,214,196,.55); }
.sp-fig img { width: 100%; aspect-ratio: 3/4; object-fit: contain; background: #fff; border-radius: 8px; }
.sp-fig b { display: block; font-size: 13.5px; margin-top: 8px; } .sp-fig small { color: var(--muted); font-size: 12px; }
.sp-fig .tier { display: inline-block; margin-top: 6px; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.07); }
.sp-fig.ult .tier { background: rgba(255,138,118,.2); color: var(--coral); } .sp-fig.exc .tier { background: rgba(111,214,196,.18); color: var(--mint); }
.sp-sticker { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
.sp-sticker .big { font: 900 48px/1 var(--font); } .sp-sticker .big small { font-size: 16px; color: var(--muted); }
.sp-sources { columns: 2 320px; gap: 24px; margin: 0; padding-left: 1.1em; font-size: 14px; line-height: 1.9; }
.sp-sources a { color: var(--sky); } .sp-sources small { color: var(--muted); }
.sp-note { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.sp-legal { margin-top: 48px; color: var(--faint); font-size: 12px; line-height: 1.7; }

/* 手機的底部固定按鈕 */
.sp-dock { display: none; }

@media (max-width: 900px) {
  .sp-main { padding: 14px 14px 110px; }
  .sp-hero { grid-template-columns: 1fr; gap: 22px; }
  .sp-cardcol { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
  .sp-facts { grid-template-columns: repeat(2, 1fr); }
  .sp-radar { grid-template-columns: 1fr; }
  .sp-radar svg { max-width: 320px; margin: 0 auto; }
  .sp-history { grid-template-columns: 1fr; }
  .sp-actions { display: none; }
  .sp-top .al-brand small { display: none; }
  .sp-dock { display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; gap: 8px; padding: 8px; border-radius: 18px;
    background: rgba(14,26,50,.94); backdrop-filter: blur(10px); border: 1px solid rgba(176,208,255,.18); box-shadow: 0 12px 34px rgba(0,0,0,.5); }
  .sp-dock .sp-btn { flex: 1; justify-content: center; height: 44px; }
  .sp-sticker { grid-template-columns: 1fr; }
  .sp-panel { padding: 16px; }
}

.sp-top nav { margin-left: auto; }
/* 頁首主選單：只有手機寬才收進 ⚙（11/19 巡檢：摺疊 832 寬選單整個不見、也沒有替代按鈕）；摺疊機照樣顯示，字距縮一點 */
@media (max-width: 640px) { .sp-top nav { display: none; } }
@media (max-width: 900px) { .sp-top .nv .nv-top, .sp-top .nv .nv-btn { padding: 8px 8px; } }
.sp-top .sp-back { margin-left: 8px; }

.sp-box .now.up { color: var(--coral); }

/* 評價分頁 */
.ev { line-height: 1.75; font-size: 14.5px; }
.ev p { margin: 6px 0; }
.ev-sum { display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(111,214,196,.08); border: 1px solid rgba(111,214,196,.25); }
.ev-sum .ev-total { grid-row: span 3; } .ev-sum .ev-total b { font: 900 44px/1 var(--font); } .ev-sum .ev-total small { display: block; color: var(--muted); font-size: 12px; }
.ev-h { font-size: 17px; margin: 26px 0 6px; }
.ev-axis { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(176,208,255,.14); background: rgba(255,255,255,.03); }
.ev-axis h4, .ev-crit h5 { margin: 0 0 4px; display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.ev-axis h4 span, .ev-crit h5 span { color: var(--mint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-crit { margin: 10px 0 0; padding-left: 1.2em; }
.ev-crit > li { padding: 10px 0; border-top: 1px dashed rgba(176,208,255,.16); }
.ev-crit h5 { font-size: 15px; }
.ev details { margin-top: 6px; } .ev summary { cursor: pointer; color: var(--sky); font-size: 13.5px; }
.ev details ol, .ev details ul { padding-left: 1.2em; font-size: 13.5px; }
.ev-ledger { padding-left: 1.2em; } .ev-ledger li.plus::marker { content: "＋ "; color: var(--mint); } .ev-ledger li.minus::marker { content: "－ "; color: var(--coral); }
.ev-feat { padding-left: 1.2em; }
.ev a { color: var(--sky); }
/* 人偶分頁直接用正式站的人偶分析樣式，外層不再加框 */
.sp-panel .tll-minifigure-analysis { margin: -6px; }

/* ── 圖卡模式（使用者 11/17）：圖卡佔滿整個畫面，往下才是盒組資料；卡牌模式維持原本排法 ── */
body.sp-cardmode .sp-main { max-width: none; padding-top: 0; }
body.sp-cardmode .sp-section, body.sp-cardmode .sp-legal { max-width: 1192px; margin-left: auto; margin-right: auto; }
.sp-full { height: calc(100vh - var(--hdr, 60px)); height: calc(100dvh - var(--hdr, 60px)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px 0 12px; box-sizing: border-box; overflow: hidden; }
/* 圖卡寬度由程式依「剩下的高度、寬度」算好（--cw），整組（圖卡＋工具列）在畫面正中間 */
.sp-full-card { flex: none; width: var(--cw, min(100%, 420px)); }
.sp-full .flip { width: 100%; cursor: default; }
body.sp-cardmode .sp-dock { display: none !important; }
.sp-full .flip.hot { cursor: pointer; }
.sp-full .sp-cardtools { margin: 0; justify-content: center; }
.sp-full .sp-more { text-decoration: none; }
body.sp-cardmode #data { scroll-margin-top: calc(var(--hdr, 60px) + 10px); }
body.sp-cardmode [id^="ev-"] { scroll-margin-top: calc(var(--hdr, 60px) + 14px); }
.sp-jumped { animation: sp-jumped 1.8s ease-out; border-radius: 12px; }
@keyframes sp-jumped { 0%, 30% { box-shadow: 0 0 0 3px var(--mint), 0 0 26px rgba(111,214,196,.55); background-color: rgba(111,214,196,.12); } 100% { box-shadow: 0 0 0 0 transparent; } }
.sp-totop { position: fixed; right: 16px; bottom: 16px; z-index: 45; padding: 10px 16px; border-radius: 999px; background: rgba(14,26,50,.94); border: 1px solid rgba(111,214,196,.45); color: var(--mint); text-decoration: none; font-size: 14px; font-weight: 700; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.sp-totop[hidden] { display: none; }
@media (max-width: 900px) {
  body.sp-cardmode .sp-main { padding: 0 10px 40px; }
  .sp-full { padding: 8px 0 10px; gap: 8px; }
  .sp-full .sp-cardtools .sp-btn { padding: 0 10px; }
}
.sp-full .sp-acts { display: contents; }
.sp-btn[data-go-compare][hidden] { display: none !important; }   /* 卡牌那排的 .sp-btn{display:flex} 不要蓋掉 hidden */

/* 收藏列：用正式站的收藏程式和樣式（vendor/collection.css），這裡只調位置；底下一行「更多功能請下載 App」 */
.sp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp-article { display: contents; }
.sp-collect { margin: 16px 0 4px; }
.sp-collect .tll-collect-bar { margin: 0 0 6px; }
.sp-collect .tll-collect-summary { color: var(--muted); }
.sp-collect .tll-collect-page { color: var(--mint); }
.sp-appnote { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.sp-appnote b { color: var(--ink); font-weight: 700; }
.sp-appnote a { color: var(--mint); text-decoration: none; font-weight: 700; white-space: nowrap; }
@media (max-width: 700px) { .sp-full { height: auto; justify-content: flex-start; } .sp-collect-below { margin: 4px 0 0; } }
.sp-full .sp-collect { margin: 0; text-align: center; }
.sp-full .sp-collect .tll-collect-bar { justify-content: center; margin: 0 0 2px; }
.sp-full .sp-appnote { font-size: 12px; }
.sp-full .sp-collect .tll-collect-bar > * { min-height: 38px; }
.sp-collect-below { margin: 4px 0 18px; text-align: center; }
.sp-collect-below .tll-collect-bar { justify-content: center; }

/* 人偶分頁：本盒小陳列框＋右邊那隻的人偶卡（卡片本身用正式站的 tll-minifigure-card，一模一樣） */
.sp-figwrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 18px; align-items: start; margin: 6px 0 16px; }
.sp-figcase .fg-frame { padding: 12px; }
.sp-figcount { margin: 10px 0 0; color: var(--muted); font-size: 14px; } .sp-figcount b { color: var(--ink); font-size: 17px; }
.sp-fighint { margin-top: 4px; } .sp-fighint a { color: var(--mint); text-decoration: none; font-weight: 700; }
.sp-figid .tll-minifigure-grid { display: block; }
.sp-figid .tll-minifigure-grid > .tll-minifigure-card { display: none; }
.sp-figid .tll-minifigure-grid > .tll-minifigure-card.on { display: block; }
@media (max-width: 760px) { .sp-figwrap { grid-template-columns: 1fr; } }

/* 人偶卡和舊版一樣寬，不被欄寬拉長（使用者 11/18：「人偶框沒有做好 都往下移了」） */
.sp-figwrap { grid-template-columns: minmax(0, 1fr) 260px; }
.sp-figid .tll-minifigure-grid > .tll-minifigure-card.on { width: 100%; max-width: 236px; margin: 0 auto; }
@media (max-width: 760px) { .sp-figwrap { grid-template-columns: 1fr; } }
/* 收藏列旁的「完整功能請到 App」 */
.sp-appchip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 9px; border: 1px dashed rgba(111,214,196,.55); color: var(--mint); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sp-appchip:hover { background: rgba(111,214,196,.1); }
/* 圖卡／卡牌開關 */
.sp-switch { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(176,208,255,.22); background: rgba(255,255,255,.05); color: var(--muted); font: 700 14px/1 var(--font); cursor: pointer; }
.sp-switch i { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #2b3d5e; box-shadow: inset 0 0 0 1px rgba(176,208,255,.25); transition: background .2s; }
.sp-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.35); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.sp-switch[aria-checked="true"] i { background: var(--mint); }
.sp-switch[aria-checked="true"] i::after { transform: translateX(20px); }
.sp-switch .on-l { color: var(--ink); } .sp-switch[aria-checked="true"] .on-l { color: var(--muted); }
.sp-switch[aria-checked="true"] .on-r { color: var(--ink); }

/* ── 立體卡牌：拖著轉、點一下翻面；背面是卡背（Codex 設計、使用者的吉祥物） ── */
.flip.card3d { perspective: 1600px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.flip.card3d:active { cursor: grabbing; }
.flip.card3d .flipper { transition: none; will-change: transform; }
.flip.card3d .face { border-radius: 22px; }
.face-cardback { padding: 0 !important; background: none !important; box-shadow: 0 28px 60px rgba(0,0,0,.55); }
.face-cardback img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; pointer-events: none; }
/* 卡片厚度：正面後面墊一層深色，轉到側面時看得到邊 */
.flip.card3d .face-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); pointer-events: none; }
/* 反光：跟著角度在卡面上滑過 */
.cb-sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent calc(var(--sheen, 50%) - 22%), rgba(255,255,255,.16) var(--sheen, 50%), transparent calc(var(--sheen, 50%) + 22%)); }
.face-cardback .cb-sheen { transform: none; }
.cb-sheen-front { backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(1px); }
.flip.card3d.show-back .cb-sheen-front { opacity: 0; }
/* 背對螢幕的那一面直接藏起來、動畫先停（使用者 11/22：手機上雙五星卡牌翻到背面抽到彩蛋後一直亂閃，電腦不會）。
 * 原本只靠 backface-visibility 藏背面那一面；正面的彩虹框、背面的彩蛋都是一直在動的圖層，Android 手機的 GPU 常常不理會
 * 「背對就不畫」，兩面輪流畫出來就會閃。data-hide 由 set2.js 設：拖著轉時照當下角度（側立時切換，看不出差別）；點一下翻面的動畫中兩面都留著，轉完才藏。 */
.flip.card3d[data-hide="front"] .face-front, .flip.card3d[data-hide="back"] .face-cardback { visibility: hidden; }
.flip.card3d[data-hide="front"] .face-front *, .flip.card3d[data-hide="back"] .face-cardback * { animation-play-state: paused !important; }
/* 圖卡模式的評價／貼紙五星特效框（使用者 11/22：先說「框背擋住了」，拿掉後又說「圖卡也沒有特效框了」）：
 * 外框（card-anim.js 的 ca-ring-wrap）照圖卡本身的大小與圓角畫在外圍一圈（圖卡 1080×1350 滿版，外框量的就是這個卡面）。
 * 原本漏出來的原因：外框和卡面在同一個深度，有的顯示卡會把外框的光畫在卡面四角和下緣上面。
 * 圖卡模式的正、背面各往前推 1px，外框永遠在卡片後面，只露出外圍那一圈。 */
.flip:not(.card3d) .face-front { transform: translateZ(1px); }
.flip:not(.card3d) .face-back { transform: rotateY(180deg) translateZ(1px); }
/* 卡片厚度（使用者 11/22）：正面往前、背面往後各推半個厚度，中間疊 10 層不會動的圓角片（set2.js cardEdges），--th＝卡寬的 1.75% */
/* 每一層只留外圈 2px（中間挖空）：整片的話，Chrome 翻到背面時會把卡邊層畫在卡背上面，卡背整片不見（使用者 11/22「卡背不見了」，11390）；
 * 只留一圈時頂多蓋到卡背最外 2px，側面看一樣是實心的邊 */
.flip.card3d .card-edge { position: absolute; inset: 0; border-radius: 22px; pointer-events: none; background: var(--edge, linear-gradient(180deg, #f4f6f9, #cfd6e0));
  box-sizing: border-box; padding: 2px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transform: translateZ(calc((var(--i) / var(--edges, 9) - .5) * (var(--th, 6px) - 2px))); }   /* 最外兩層離卡面各 1px：和卡面同一平面時，顯示卡會把卡邊畫在卡面上（使用者 11/22「卡背不見了」，11390 背面整片彩虹） */
.flip.card3d .face-front { transform: translateZ(calc(var(--th, 6px) / 2)); }
.flip.card3d .face-back { transform: rotateY(180deg) translateZ(calc(var(--th, 6px) / 2)); }
.flip.card3d .cb-sheen-front { transform: translateZ(calc(var(--th, 6px) / 2 + 1px)); }
/* 邊的顏色跟卡種：一般、貼紙五星白邊；評價五星金邊；雙五星彩虹邊；抽到彩蛋金邊（都不會動） */
.flip.card3d[data-edge="collector"], .flip.card3d.egg-on { --edge: linear-gradient(180deg, #fff1b8, #d9a93a 45%, #a8741c); }
.flip.card3d[data-edge="dual"]:not(.egg-on) { --edge: linear-gradient(180deg, #94eeff, #b7a1ff 33%, #ffe3a1 66%, #fda9d8); }
/* 卡背小圖選擇 */
.sp-cbpick { display: inline-flex; gap: 6px; align-items: center; }
.sp-cbpick button { width: 30px; height: 44px; padding: 0; border-radius: 6px; border: 2px solid transparent; background: none; cursor: pointer; overflow: hidden; }
.sp-cbpick button[aria-pressed="true"] { border-color: var(--mint); }
.sp-cbpick img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 正式站收藏列的顏色變數：深色底用金色（原本是深紅，深色底上看不到） */
.tll-library, .fg { --tll-bright: #ffd85a; --tll-dim: #aeb9cd; }
html.theme-light .tll-library, html.theme-light .fg { --tll-bright: #8a5a00; --tll-dim: #5a6a84; }
html.theme-light .tll-library .tll-collect-bar .tll-collect-toggle:not(.is-collected) { background: #ffd85a; color: #3b2a00; }
.sp-figwrap { grid-template-columns: minmax(0, 520px) 260px; justify-content: center; }
@media (max-width: 760px) { .sp-figwrap { grid-template-columns: 1fr; } }

/* 卡背：等級版圖＋會動的彩蛋疊在同一格 */
.face-cardback .cb-egg { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.face-cardback .cb-egg[hidden], .face-cardback .cb-img[hidden] { display: none; }

/* ── 字都要看得清楚（使用者 11/18）──
 * 卡牌照視窗高度放大：一屏放得下整張卡的前提下越大越好（最多 620px 寬），大螢幕上小字就不會只有 8px。
 * 摺疊機展開（900px 以下）改成單欄，卡可以到 560px 寬。 */
.sp-hero { grid-template-columns: minmax(300px, min(620px, max(440px, calc((100vh - 200px) * .6667)))) 1fr; }
@media (max-width: 900px) {
  .sp-hero { grid-template-columns: 1fr; gap: 22px; }
  .sp-cardcol { position: static; max-width: min(560px, calc((100vh - 150px) * .6667), 100%); margin: 0 auto; width: 100%; }
}
@media (max-width: 760px) { .sp-cardcol { max-width: 100%; } }
.sp-legal { margin: 8px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

/* 外掛沒有那張人偶圖：剪影（TLLV2.figHtml） */
.tll-fig-sil { display: block; width: 62%; height: auto; max-height: 92%; margin: auto; color: #9db0cc; }
/* 外掛頁尾已經有完整法律聲明（footer.tll-v2-footer）時，頁面自己那一行就不重複（卡片下方的產品圖版權說明 #cardLegal 照留） */
body:has(footer.tll-v2-footer) .sp-legal:not(#cardLegal) { display: none; }
/* 外掛伺服器先寫好的盒組文字（section.tll-v2-seo，搜尋引擎看的）：留在盒組資料下面，照網站的樣子 */
.tll-v2-seo { max-width: 1192px; margin: 40px auto 0; padding: 18px 22px; border: 1px solid rgba(176,208,255,.12); border-radius: 16px; background: rgba(255,255,255,.025); color: var(--muted); opacity: 1; }
.tll-v2-seo h1, .tll-v2-seo h2 { color: var(--ink); }
.tll-v2-seo a { color: var(--sky); }
.tll-v2-footer { color: var(--muted); }
@media (max-width: 900px) { .tll-v2-seo { margin: 28px 10px 0; padding: 14px; } }
html.theme-light .tll-v2-seo { background: #fff; border-color: #dfe6f0; }

/* 手機版卡片縮小一點，讓外圍的特效框整圈露出來（使用者 11/22：「圖卡庫的框還是一樣在手機排版被擋掉了 整個圖卡要縮小一點」）：
 * 圖卡、卡牌都一樣，左右各留 16px（外框寬度＋光暈）；電腦版不動 */
@media (max-width: 600px) {
  #flip { width: calc(100% - 32px) !important; margin-left: auto !important; margin-right: auto !important; }
}
