/* TCG game hub + deck builder (2026-09-27 hub phase 1).
   Shell = app skin variables (--skin-*), works with every skin incl. parchment.
   Set theming (Cuddly Friends) only inside .tcgh-set[data-set] areas. */
html.tcgh-open, html.tcgh-open body { overflow: hidden; overscroll-behavior: none; }
.tcgh {
  --tcgh-surface: color-mix(in srgb, var(--skin-surface, #0f172a) 72%, transparent);
  --tcgh-surface-2: color-mix(in srgb, var(--skin-surface-2, #1e293b) 80%, transparent);
  --tcgh-line: var(--skin-border, rgba(51,65,85,.95));
  --tcgh-accent: var(--skin-accent, #6366f1);
  --tcgh-accent-2: var(--skin-accent-2, #a855f7);
  --tcgh-text: var(--skin-text, #f8fafc);
  --tcgh-muted: var(--skin-muted, #94a3b8);
  --el-fire: #ff7a3d; --el-water: #46a8ff; --el-earth: #c08f4f; --el-wind: #43cfb2;
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  color: var(--tcgh-text); font-family: var(--skin-font, Inter, system-ui, sans-serif);
  background:
    radial-gradient(1100px 620px at 50% 18%, var(--skin-hero-glow, rgba(99,102,241,.2)), transparent 62%),
    radial-gradient(700px 500px at 100% 100%, color-mix(in srgb, var(--tcgh-accent-2) 16%, transparent), transparent 70%),
    linear-gradient(180deg, var(--skin-bg-2, #0b1224), var(--skin-bg, #020617));
  overflow: hidden;
}
.tcgh[hidden] { display: none; }
.tcgh-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tcgh-bg i { position: absolute; inset: -20%; opacity: .55;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, color-mix(in srgb, var(--tcgh-text) 70%, transparent) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 14%, color-mix(in srgb, var(--tcgh-accent) 80%, transparent) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 64% 72%, color-mix(in srgb, var(--tcgh-text) 55%, transparent) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 30% 84%, color-mix(in srgb, var(--tcgh-accent-2) 80%, transparent) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 58%, color-mix(in srgb, var(--tcgh-text) 70%, transparent) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 42% 10%, color-mix(in srgb, var(--tcgh-text) 50%, transparent) 50%, transparent 51%);
  animation: tcgh-drift 60s linear infinite; }
.tcgh-bg i:nth-child(2) { transform: scale(1.4) rotate(40deg); opacity: .35; animation-duration: 90s; animation-direction: reverse; }
.tcgh-bg i:nth-child(3) { inset: 0; opacity: 1; animation: tcgh-sweep 9s ease-in-out infinite;
  background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--tcgh-accent) 8%, transparent) 50%, transparent 65%); background-size: 250% 100%; }
@keyframes tcgh-drift { to { transform: translateY(-8%) translateX(3%); } }
@keyframes tcgh-sweep { 0%,100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }

/* top bar */
.tcgh-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.tcgh-back { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--skin-font, Inter, sans-serif); color: var(--tcgh-text); background: var(--tcgh-surface);
  border: 1px solid var(--tcgh-line); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .15s, border-color .15s; }
.tcgh-back i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--skin-btn, var(--tcgh-accent)); color: var(--skin-btn-text, #fff); font-size: 13px; }
.tcgh-back:hover { transform: translateX(-2px); border-color: var(--tcgh-accent); }
.tcgh-brand { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; pointer-events: none;
  font: 700 20px/1 var(--skin-display, "Space Grotesk", Inter, sans-serif); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tcgh-brand b { background: linear-gradient(135deg, var(--tcgh-accent), var(--tcgh-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tcgh-crest { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 15px; letter-spacing: 0;
  background: var(--skin-btn, var(--tcgh-accent)); color: var(--skin-btn-text, #fff); box-shadow: 0 0 22px color-mix(in srgb, var(--tcgh-accent) 45%, transparent); }
.tcgh-res { margin-left: auto; display: flex; gap: 8px; }
.tcgh-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; white-space: nowrap;
  background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); backdrop-filter: blur(12px); font-size: 13px; color: var(--tcgh-muted); }
.tcgh-pill i { color: var(--tcgh-accent); }
.tcgh-pill b { color: var(--tcgh-text); font-weight: 700; }

/* sub header (inside screens) */
.tcgh-sub { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 0 max(16px, env(safe-area-inset-left)) 8px; max-width: 1240px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.tcgh-sub[hidden] { display: none; }
.tcgh-up { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; cursor: pointer; font: 600 13px var(--skin-font, Inter, sans-serif);
  color: var(--tcgh-text); background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); }
.tcgh-up:hover { border-color: var(--tcgh-accent); }
.tcgh-sub h2 { margin: 0; font: 700 24px/1.1 var(--skin-display, "Space Grotesk", Inter, sans-serif); letter-spacing: .02em; }
.tcgh-subnote { font-size: 13px; color: var(--tcgh-muted); }

.tcgh-body { position: relative; z-index: 2; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch;
  padding: 6px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.tcgh-screen { display: none; max-width: 1240px; margin: 0 auto; }
.tcgh[data-screen="home"] .tcgh-screen[data-screen="home"],
.tcgh[data-screen="packs"] .tcgh-screen[data-screen="packs"],
.tcgh[data-screen="collection"] .tcgh-screen[data-screen="collection"],
.tcgh[data-screen="decks"] .tcgh-screen[data-screen="decks"],
.tcgh[data-screen="match"] .tcgh-screen[data-screen="match"] { display: block; animation: tcgh-in .28s ease-out; }
@keyframes tcgh-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tcgh-panel { background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); border-radius: 20px; backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06); }

/* buttons */
.tcgh .cta, .tcgh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border-radius: 13px; border: 0; cursor: pointer;
  font: 700 15px/1 var(--skin-font, Inter, sans-serif); color: var(--skin-btn-text, #fff); background: var(--skin-btn, var(--tcgh-accent));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--tcgh-accent) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s, filter .15s; }
.tcgh-btn:hover:not([disabled]) { transform: translateY(-1px); filter: brightness(1.08); }
.tcgh-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tcgh .cta.ghost, .tcgh-btn.ghost { background: var(--tcgh-surface-2); color: var(--tcgh-text); border: 1px solid var(--tcgh-line); box-shadow: none; }
.tcgh-btn.danger { color: #fca5a5; border-color: rgba(248,113,113,.4); }

/* ---- set zone (Cuddly Friends) ---- */
.tcgh-set[data-set="cuddly_friends"] { --set-a: #ff8fc7; --set-b: #ffd36e; --set-c: #7fd6ff; --set-glow: rgba(255,143,199,.45); --set-font: CuteStitch, var(--skin-font, Inter, sans-serif); }
#tcgh-slot-packs, #tcgh-slot-col { border-radius: 24px; overflow: hidden; color: #eef1f8; border: 1px solid color-mix(in srgb, var(--set-a) 35%, transparent);
  background: radial-gradient(900px 500px at 50% 0%, color-mix(in srgb, var(--set-a) 28%, transparent), transparent 70%),
              radial-gradient(700px 500px at 100% 100%, color-mix(in srgb, var(--set-c) 16%, transparent), transparent 70%), #140d27;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.tcgh .view-tcg { max-width: none; padding: 1rem 1.1rem 2rem; }
.tcgh .view-tcg .tcg-head h2 { display: none; }
.tcgh .view-tcg .tcg-head p { color: rgba(238,241,248,.7); }
#tcgh-slot-col .tcgx-grid { max-width: 60rem; margin: 0 auto; }

/* ---- loading screen ---- */
.tcgh-load { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(900px 600px at 50% 40%, var(--skin-hero-glow, rgba(99,102,241,.25)), transparent 65%), linear-gradient(180deg, var(--skin-bg-2, #0b1224), var(--skin-bg, #020617));
  transition: opacity .3s ease; }
.tcgh-load[hidden] { display: none; }
.tcgh-load.out { opacity: 0; }
.tcgh-load-in { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; text-align: center; }
.tcgh-emblem { position: relative; width: 170px; height: 170px; display: grid; place-items: center; }
.tcgh-emblem .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--tcgh-accent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--tcgh-accent) 45%, transparent), inset 0 0 30px color-mix(in srgb, var(--tcgh-accent) 25%, transparent); animation: tcgh-pulse 1.5s ease-in-out infinite; }
.tcgh-emblem .ring.r2 { inset: 16px; border: 1px dashed color-mix(in srgb, var(--tcgh-accent-2) 80%, transparent); box-shadow: none; animation: tcgh-spin 6s linear infinite; }
.tcgh-emblem .cards { position: relative; width: 100px; height: 100px; }
.tcgh-emblem .cards b { position: absolute; left: 26px; top: 6px; width: 50px; height: 74px; border-radius: 8px; border: 2px solid var(--tcgh-accent);
  background: linear-gradient(160deg, var(--skin-surface-2, #1e293b), var(--skin-surface, #0f172a)); box-shadow: 0 8px 20px rgba(0,0,0,.4); transition: transform .5s; }
.tcgh-emblem .cards b::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--tcgh-accent); font-size: 20px; }
.tcgh-emblem .cards b:nth-child(1) { transform: rotate(-16deg) translateX(-22px); animation: tcgh-fanl 1.5s ease-in-out infinite; }
.tcgh-emblem .cards b:nth-child(3) { transform: rotate(16deg) translateX(22px); animation: tcgh-fanr 1.5s ease-in-out infinite; }
@keyframes tcgh-pulse { 50% { transform: scale(1.04); opacity: .8; } }
@keyframes tcgh-spin { to { transform: rotate(360deg); } }
@keyframes tcgh-fanl { 50% { transform: rotate(-22deg) translateX(-28px); } }
@keyframes tcgh-fanr { 50% { transform: rotate(22deg) translateX(28px); } }
.tcgh-load h1 { margin: 0; font: 800 44px/1 var(--skin-display, "Space Grotesk", Inter, sans-serif); letter-spacing: .14em; text-transform: uppercase; }
.tcgh-load h1 b { background: linear-gradient(135deg, var(--tcgh-accent), var(--tcgh-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tcgh-load .tag { margin: -8px 0 0; font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: var(--tcgh-muted); }
.tcgh-bar { width: min(420px, 78vw); height: 8px; border-radius: 99px; overflow: hidden; background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); }
.tcgh-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--tcgh-accent), var(--tcgh-accent-2)); box-shadow: 0 0 14px var(--tcgh-accent); }
.tcgh-load-st { margin: -6px 0 0; font-size: 13px; color: var(--tcgh-muted); min-height: 1.2em; }
.tcgh-set-chip { display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 7px; border-radius: 999px; background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); text-align: left; }
.tcgh-set-chip img { width: 30px; height: 44px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 14px var(--set-glow); }
.tcgh-set-chip em { display: block; font: 600 10px var(--skin-font, Inter, sans-serif); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--tcgh-muted); }
.tcgh-set-chip b { font: 400 19px/1.1 var(--set-font); color: var(--set-a); letter-spacing: .03em; }
.tcgh-set-chip[data-set="cuddly_friends"] { --set-a: #ff8fc7; --set-glow: rgba(255,143,199,.45); --set-font: CuteStitch, var(--skin-font, Inter, sans-serif); }
.tcgh-tip { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 88vw;
  margin: 0; padding: 10px 18px; border-radius: 14px; font-size: 13px; color: var(--tcgh-muted); background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); }
.tcgh-tip b { color: var(--tcgh-accent); letter-spacing: .15em; text-transform: uppercase; font-size: 11px; margin-right: 8px; }

/* ---- hub home ---- */
.tcgh-home { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }
.tcgh-sets { align-self: center; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 18px; background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); backdrop-filter: blur(12px); max-width: 100%; }
.tcgh-sets-lab { padding: 0 6px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .3em; color: var(--tcgh-muted); }
.tcgh-setcard { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px; border-radius: 13px; min-width: 250px; }
.tcgh-setcard img { width: 38px; height: 56px; object-fit: cover; border-radius: 7px; }
.tcgh-setcard b { display: block; font-weight: 700; }
.tcgh-setcard em { font-style: normal; font-size: 12px; opacity: .8; }
.tcgh-setcard.on { --set-a: #ff8fc7; --set-b: #ffd36e; --set-c: #7fd6ff; color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--set-a) 60%, #2a1036), color-mix(in srgb, var(--set-c) 45%, #10204a));
  border: 2px solid var(--set-b); box-shadow: 0 0 26px rgba(255,143,199,.35); }
.tcgh-setcard.on b { font: 400 22px/1 CuteStitch, var(--skin-font, Inter, sans-serif); letter-spacing: .03em; }
.tcgh-setcard .cur { position: absolute; right: 10px; top: -9px; font: 700 9px var(--skin-font, Inter, sans-serif); font-style: normal; letter-spacing: .2em; text-transform: uppercase;
  color: #3a2300; background: var(--set-b); padding: 3px 7px; border-radius: 6px; }
.tcgh-setcard.lock { min-width: 190px; color: var(--tcgh-muted); border: 1px dashed var(--tcgh-line); }
.tcgh-setcard.lock .q { display: grid; place-items: center; width: 38px; height: 56px; border-radius: 7px; background: var(--tcgh-surface-2); font-size: 16px; }

.tcgh-tiles { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: minmax(300px, 46vh) minmax(170px, 24vh); gap: 18px; }
.tcgh-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 12px; padding: 24px; text-align: left;
  border-radius: 24px; overflow: hidden; cursor: pointer; color: var(--tcgh-text); font: inherit; border: 1px solid var(--tcgh-line);
  background: var(--tcgh-surface); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s; isolation: isolate; }
.tcgh-tile:hover, .tcgh-tile:focus-visible { transform: translateY(-4px); border-color: var(--tcgh-accent); box-shadow: 0 26px 60px rgba(0,0,0,.35), 0 0 0 1px var(--tcgh-accent), 0 0 40px color-mix(in srgb, var(--tcgh-accent) 25%, transparent); outline: none; }
.tcgh-tile > * { position: relative; z-index: 2; }
.tcgh-tile .txt b { display: block; font: 700 34px/1 var(--skin-display, "Space Grotesk", Inter, sans-serif); letter-spacing: .02em; text-shadow: 0 3px 14px rgba(0,0,0,.45); }
.tcgh-tile .txt em { display: block; margin-top: 8px; font-style: normal; font-size: 14px; line-height: 1.4; opacity: .85; max-width: 32ch; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.tcgh-tile .kick { position: absolute; left: 20px; top: 18px; font: 700 11px var(--skin-font, Inter, sans-serif); letter-spacing: .22em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 9px; background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); color: var(--tcgh-muted); }
.tcgh-tile .kick.set { font: 400 16px/1 var(--set-font); letter-spacing: .04em; text-transform: none; color: #fff; background: color-mix(in srgb, var(--set-a) 45%, transparent); border-color: var(--set-b); }
.tcgh-tile .cta { padding: 11px 18px; font-size: 14px; }
.tcgh-tile.t-match { grid-row: 1 / span 2; }
.tcgh-tile.t-match .art { position: absolute; inset: 0; z-index: 0; }
.tcgh-tile.t-match .art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: saturate(.9) brightness(.8); transform: scale(1.02); transition: transform .5s; }
.tcgh-tile.t-match:hover .art img { transform: scale(1.06); }
.tcgh-tile.t-match .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(5,8,20,.55) 60%, rgba(5,8,20,.92) 100%); }
.tcgh-tile.t-match { color: #fff; }
.tcgh-tile.t-match .soon { position: absolute; right: 18px; top: 18px; font: 800 12px var(--skin-font, Inter, sans-serif); letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--tcgh-accent), var(--tcgh-accent-2)); box-shadow: 0 6px 20px color-mix(in srgb, var(--tcgh-accent) 45%, transparent); }
.tcgh-tile.t-match .cta.ghost { background: rgba(10,14,30,.6); color: #fff; border-color: rgba(255,255,255,.25); backdrop-filter: blur(8px); }
.tcgh-tile.t-packs, .tcgh-tile.t-col { color: #fff; border-color: color-mix(in srgb, var(--set-a) 40%, transparent);
  background: radial-gradient(420px 300px at 50% 25%, color-mix(in srgb, var(--set-a) 40%, transparent), transparent 75%), #1a1030; }
.tcgh-tile.t-packs:hover, .tcgh-tile.t-col:hover { border-color: var(--set-b); box-shadow: 0 26px 60px rgba(0,0,0,.35), 0 0 36px var(--set-glow); }
.tcgh-tile .fan { position: absolute !important; left: 50%; top: 45%; width: 0; height: 0; z-index: 1 !important; }
.tcgh-tile .fan img { position: absolute; max-width: none; height: auto; width: 100px; left: -50px; top: -96px; border-radius: 8px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.6)); transition: transform .3s ease; }
.tcgh-tile.t-packs .fan img:nth-child(1) { transform: rotate(-18deg) translate(-72px, 18px); }
.tcgh-tile.t-packs .fan img:nth-child(2) { transform: rotate(-6deg) translate(-24px, -2px); }
.tcgh-tile.t-packs .fan img:nth-child(3) { transform: rotate(6deg) translate(24px, -2px); }
.tcgh-tile.t-packs .fan img:nth-child(4) { transform: rotate(18deg) translate(72px, 18px); }
.tcgh-tile.t-packs:hover .fan img:nth-child(1) { transform: rotate(-24deg) translate(-88px, 12px); }
.tcgh-tile.t-packs:hover .fan img:nth-child(4) { transform: rotate(24deg) translate(88px, 12px); }
.tcgh-tile .fan.cards img { width: 104px; height: 104px; left: -52px; top: -118px; object-fit: cover; border-radius: 14px; border: 3px solid #fff3; }
.tcgh-tile.t-col .fan img:nth-child(1) { transform: rotate(-14deg) translate(-70px, 16px); }
.tcgh-tile.t-col .fan img:nth-child(2) { transform: rotate(14deg) translate(70px, 16px); }
.tcgh-tile.t-col .fan img:nth-child(3) { transform: translateY(-8px) scale(1.12); border-color: var(--set-b); box-shadow: 0 0 30px var(--set-glow); }
.tcgh-tile .meter { width: 100%; max-width: 240px; height: 7px; border-radius: 9px; overflow: hidden; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); }
.tcgh-tile .meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--set-a), var(--set-b)); transition: width .6s; }
.tcgh-tile.t-deck { grid-column: 2 / span 2; flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.tcgh-tile.t-deck .txt { flex: 1 1 260px; }
.tcgh-tile.t-deck .board { position: absolute !important; right: 26px; top: 50%; transform: translateY(-50%) perspective(500px) rotateX(18deg); z-index: 1 !important;
  display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; opacity: .9; }
.tcgh-tile.t-deck .board i { width: 44px; height: 58px; border-radius: 8px; border: 2px dashed color-mix(in srgb, var(--tcgh-accent) 70%, transparent);
  background: color-mix(in srgb, var(--tcgh-accent) 12%, transparent); }
.tcgh-tile.t-deck .board i:nth-child(-n+3) { border-style: solid; background: color-mix(in srgb, var(--tcgh-accent) 26%, transparent); }

/* ---- match placeholder ---- */
.tcgh-npc { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 26px; align-items: stretch; padding: 18px; border-radius: 24px;
  background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.npc-art { border-radius: 18px; overflow: hidden; min-height: 320px; position: relative; }
.npc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.npc-txt { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; }
.npc-txt .kick { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--tcgh-accent); text-transform: uppercase; }
.npc-txt h3 { margin: 0; font: 800 40px/1 var(--skin-display, "Space Grotesk", Inter, sans-serif); }
.npc-txt .npc-deck { margin: -4px 0 0; font: 400 20px/1 CuteStitch, var(--skin-font, sans-serif); color: #ff8fc7; }
.npc-txt p { margin: 0; color: var(--tcgh-muted); line-height: 1.5; max-width: 60ch; }
.npc-lineup { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.npc-lineup .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.npc-lineup .rl { width: 44px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tcgh-muted); }
.npc-lineup .mini { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); font-size: 13px; text-transform: capitalize; }
.npc-lineup .mini img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.npc-lineup .mini i { color: var(--elc); }
.npc-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.el-fire { --elc: var(--el-fire); } .el-water { --elc: var(--el-water); } .el-earth { --elc: var(--el-earth); } .el-wind { --elc: var(--el-wind); } .el-none { --elc: #9ca3af; }

/* ---- deck builder ---- */
.tcgd-loading, .tcgd-empty { padding: 60px 20px; text-align: center; color: var(--tcgh-muted); }
.tcgd-empty i { font-size: 28px; margin-bottom: 10px; color: var(--tcgh-accent); }
.tcgd-empty.small { padding: 30px 10px; }
.tcgd-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.tcgd-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; cursor: pointer; font: 600 13px var(--skin-font, Inter, sans-serif);
  color: var(--tcgh-text); background: var(--tcgh-surface); border: 1px solid var(--tcgh-line); max-width: 220px; }
.tcgd-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcgd-tab.on { border-color: var(--tcgh-accent); box-shadow: 0 0 0 1px var(--tcgh-accent), 0 6px 20px color-mix(in srgb, var(--tcgh-accent) 25%, transparent); }
.tcgd-tab.new { border-style: dashed; color: var(--tcgh-muted); }
.tcgd-tab em { font-style: normal; font-weight: 800; color: #f87171; }
.tcgd-grid { display: grid; grid-template-columns: minmax(330px, 440px) 1fr; gap: 18px; align-items: start; }
.tcgd-editor, .tcgd-poolwrap { padding: 18px; }
.tcgd-editor { position: sticky; top: 0; }
.tcgd-namerow { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.tcgd-name { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tcgh-muted); }
.tcgd-name input { font: 600 16px var(--skin-font, Inter, sans-serif); color: var(--tcgh-text); background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); border-radius: 11px; padding: 10px 12px; outline: none; letter-spacing: 0; text-transform: none; }
.tcgd-name input:focus { border-color: var(--tcgh-accent); }
.tcgd-count { font-size: 14px; color: var(--tcgh-muted); padding-bottom: 10px; white-space: nowrap; }
.tcgd-count b { font-size: 22px; color: var(--tcgh-text); }
.tcgd-count.ok b { color: #4ade80; }
.tcgd-board { padding: 14px; border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--tcgh-accent) 10%, transparent), transparent 60%), var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); }
.tcgd-rowlab { display: flex; align-items: center; gap: 7px; margin: 2px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tcgd-rowlab i { color: var(--tcgh-accent); }
.tcgd-rowlab em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--tcgh-muted); font-size: 12px; margin-left: auto; }
.tcgd-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tcgd-row.back { margin-bottom: 0; }
.tcgd-slot { position: relative; aspect-ratio: 3 / 4; padding: 0; border-radius: 14px; cursor: pointer; font: inherit; color: inherit; overflow: hidden;
  background: color-mix(in srgb, var(--tcgh-accent) 7%, transparent); border: 2px dashed color-mix(in srgb, var(--tcgh-accent) 45%, transparent); transition: transform .15s, border-color .15s, box-shadow .15s; }
.tcgd-slot:hover { border-color: var(--tcgh-accent); }
.tcgd-slot.full { border-style: solid; border-color: transparent; background: none; }
.tcgd-slot.sel { border-color: var(--tcgh-accent) !important; border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tcgh-accent) 45%, transparent), 0 0 24px color-mix(in srgb, var(--tcgh-accent) 40%, transparent); transform: translateY(-2px); }
.tcgd-slot .empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--tcgh-muted); }
.tcgd-slot .empty i { font-size: 20px; color: var(--tcgh-accent); }
.tcgd-slot .empty em { font-style: normal; font-size: 11px; text-transform: capitalize; }
.tcgd-card { position: absolute; inset: 0; display: block; border-radius: 12px; overflow: hidden; background: #111827; border: 2px solid var(--elc, #9ca3af);
  box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); }
.tcgd-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.tcgd-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.8)); pointer-events: none; }
.tcgd-card .el, .tcgd-card .role { position: absolute; top: 5px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; color: #fff; }
.tcgd-card .el { left: 5px; background: var(--elc, #6b7280); box-shadow: 0 0 10px var(--elc, transparent); }
.tcgd-card .role { right: 5px; background: rgba(0,0,0,.6); }
.tcgd-card .star { position: absolute; z-index: 2; top: 31px; left: 5px; width: 24px; text-align: center; color: #ffd36e; font-size: 14px; text-shadow: 0 0 8px #ffb300; }
.tcgd-card .nm { position: absolute; z-index: 2; left: 6px; right: 6px; bottom: 6px; font: 800 12px/1.1 var(--skin-font, Inter, sans-serif); color: #fff; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; text-shadow: 0 1px 3px #000; }
.tcgd-card.uq { border-color: #ffd36e; box-shadow: 0 0 16px rgba(255,211,110,.55), inset 0 0 0 1px rgba(255,255,255,.2); }
.tcgd-card .x { position: absolute; z-index: 3; right: 5px; bottom: 26px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(220,38,38,.9); color: #fff; font-size: 12px; opacity: 0; transition: opacity .15s; }
.tcgd-slot:hover .x, .tcgd-slot.sel .x { opacity: 1; }
@media (hover: none) { .tcgd-card .x { opacity: 1; } }
.tcgd-card .cnt { position: absolute; z-index: 2; right: 5px; bottom: 24px; font: 800 11px var(--skin-font, Inter, sans-serif); color: #fff; background: rgba(0,0,0,.65); padding: 2px 6px; border-radius: 7px; }
.tcgd-card .tag { position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); font: 800 10px var(--skin-font, Inter, sans-serif); letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--skin-btn, var(--tcgh-accent)); padding: 4px 8px; border-radius: 7px; white-space: nowrap; }
.tcgd-info { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-height: 28px; font-size: 13px; color: var(--tcgh-muted); }
.tcgd-info .lab { margin-right: 2px; }
.tcgd-elsum { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-weight: 700; color: var(--tcgh-text);
  background: color-mix(in srgb, var(--elc) 22%, transparent); border: 1px solid color-mix(in srgb, var(--elc) 60%, transparent); }
.tcgd-elsum i { color: var(--elc); }
.tcgd-msg { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); }
.tcgd-msg.ok { border-color: rgba(74,222,128,.5); color: #86efac; }
.tcgd-msg.err { border-color: rgba(248,113,113,.5); color: #fca5a5; }
.tcgd-msg.warn { border-color: rgba(251,191,36,.5); color: #fcd34d; }
.tcgd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tcgd-actions .tcgh-btn { padding: 11px 16px; font-size: 14px; }
.tcgd-poolhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tcgd-poolhead h3 { margin: 0; font: 700 18px var(--skin-display, "Space Grotesk", Inter, sans-serif); }
.tcgd-poolhead span { font-size: 12px; color: var(--tcgh-muted); }
.tcgd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tcgd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; cursor: pointer; font: 600 12px var(--skin-font, Inter, sans-serif);
  color: var(--tcgh-text); background: var(--tcgh-surface-2); border: 1px solid var(--tcgh-line); }
.tcgd-chip i { color: var(--elc, var(--tcgh-accent)); }
.tcgd-chip.on { background: var(--skin-btn, var(--tcgh-accent)); color: var(--skin-btn-text, #fff); border-color: transparent; }
.tcgd-chip.on i { color: inherit; }
.tcgd-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tcgd-pick { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; transition: transform .15s; }
.tcgd-pick:hover { transform: translateY(-3px); }
.tcgd-pick.in .tcgd-card { box-shadow: 0 0 0 3px var(--tcgh-accent), 0 8px 18px rgba(0,0,0,.35); }
.tcgd-pick.in img, .tcgd-pick.blocked img { filter: saturate(.4) brightness(.6); }
.tcgd-pick.blocked { opacity: .55; }

/* ---- responsive ---- */
@media (max-width: 980px) {
  .tcgh-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 250px auto; }
  .tcgh-tile.t-match { grid-row: auto; grid-column: 1 / span 2; }
  .tcgh-tile.t-deck { grid-column: 1 / span 2; min-height: 170px; }
  .tcgd-grid { grid-template-columns: 1fr; }
  .tcgd-editor { position: static; }
  .tcgh-npc { grid-template-columns: 1fr; }
  .npc-art { min-height: 260px; }
}
@media (max-width: 640px) {
  .tcgh-top { min-height: 56px; gap: 8px; }
  .tcgh-back { padding: 6px; }
  .tcgh-back span { display: none; }
  .tcgh-brand { font-size: 15px; gap: 7px; }
  .tcgh-crest { width: 28px; height: 28px; font-size: 12px; }
  .tcgh-pill { padding: 7px 10px; font-size: 12px; }
  .tcgh-pill .lbl, .tcgh-pill.hide-s { display: none; }
  .tcgh-sub h2 { font-size: 20px; }
  .tcgh-sets { align-self: stretch; }
  .tcgh-sets-lab { display: none; }
  .tcgh-setcard { min-width: 0; flex: 1 1 62%; padding-right: 10px; }
  .tcgh-setcard.lock { flex: 1 1 38%; min-width: 0; }
  .tcgh-setcard.on b { font-size: 17px; }
  .tcgh-setcard img, .tcgh-setcard.lock .q { width: 30px; height: 44px; }
  .tcgh-tiles { gap: 12px; grid-template-rows: 250px 220px auto; }
  .tcgh-tile { padding: 16px; border-radius: 20px; gap: 10px; }
  .tcgh-tile .txt b { font-size: 24px; }
  .tcgh-tile .txt em { font-size: 12px; }
  .tcgh-tile.t-packs .txt em, .tcgh-tile.t-col .txt em { display: none; }
  .tcgh-tile .kick { left: 12px; top: 12px; font-size: 10px; padding: 5px 8px; }
  .tcgh-tile .kick.set { font-size: 13px; }
  .tcgh-tile.t-match .soon { right: 12px; top: 12px; font-size: 10px; }
  .tcgh-tile .cta { padding: 9px 12px; font-size: 13px; }
  .tcgh-tile .fan { top: 47%; }
  .tcgh-tile .fan img { width: 60px; left: -30px; top: -58px; }
  .tcgh-tile.t-packs .fan img:nth-child(1) { transform: rotate(-16deg) translate(-36px, 8px); }
  .tcgh-tile.t-packs .fan img:nth-child(2) { transform: rotate(-5deg) translate(-12px, 0); }
  .tcgh-tile.t-packs .fan img:nth-child(3) { transform: rotate(5deg) translate(12px, 0); }
  .tcgh-tile.t-packs .fan img:nth-child(4) { transform: rotate(16deg) translate(36px, 8px); }
  .tcgh-tile .fan.cards { top: 41%; }
  .tcgh-tile .fan.cards img { width: 50px; height: 50px; left: -25px; top: -34px; border-width: 2px; border-radius: 11px; }
  .tcgh-tile.t-col .fan img:nth-child(1) { transform: rotate(-12deg) translate(-40px, 6px); }
  .tcgh-tile.t-col .fan img:nth-child(2) { transform: rotate(12deg) translate(40px, 6px); }
  .tcgh-tile.t-col .fan img:nth-child(3) { transform: translateY(-2px) scale(1.06); }
  .tcgh-tile.t-deck .board { right: 14px; grid-template-columns: repeat(3, 30px); gap: 6px; }
  .tcgh-tile.t-deck .board i { width: 30px; height: 40px; }
  .tcgh-load h1 { font-size: 30px; }
  .tcgd-editor, .tcgd-poolwrap { padding: 12px; border-radius: 16px; }
  .tcgd-board { padding: 10px; }
  .tcgd-row { gap: 8px; }
  .tcgd-pool { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  .tcgd-rowlab em { display: none; }
  .npc-txt h3 { font-size: 32px; }
  .tcgh .view-tcg { padding: .8rem .6rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tcgh-bg i, .tcgh-emblem .ring, .tcgh-emblem .cards b { animation: none !important; }
}

/* 2026-09-27 hubfix ---------------------------------------------------------
   While the booster overlay (#tcgx-ov, opaque fullscreen) is open the hub is
   not painted at all and its animations stop. Before, the hub kept animating
   (drifting star layers, sweep, bobbing 3D packs) with backdrop-filter blur
   panels right under the card flip -> GPU layer churn / flicker on phones. */
html.tcgh-covered .tcgh { visibility: hidden; }
html.tcgh-covered .tcgh *, html.tcgh-covered .tcgh *::before, html.tcgh-covered .tcgh *::after { animation-play-state: paused !important; }
.tcgh-bg i { will-change: auto; }
/* Phones / touch (hub-wide flicker fix): the hub was a fixed fullscreen layer whose background never
   stopped animating (tcgh-sweep animates background-position = full-screen repaint every frame, plus two
   140%-size drifting star layers). Every backdrop-filter panel/tile above it had to re-blur that backdrop
   each frame, so the image tiles on top were re-rastered continuously and mobile GPUs dropped tiles
   (= images flicker). On touch devices: static background, no backdrop blur, no filter/will-change layers. */
@media (max-width: 980px), (hover: none) {
  .tcgh-bg i { animation: none !important; transform: none !important; inset: 0 !important; will-change: auto !important; }
  .tcgh-bg i:nth-child(2), .tcgh-bg i:nth-child(3) { display: none; }
  .tcgh-tile .fan img { filter: none !important; transition: none; }
  .tcgh-tile.t-match .art img { filter: none; transform: none; transition: none; }
  .tcgh-tile.t-match .art::after { background: linear-gradient(180deg, rgba(5,8,20,.1) 25%, rgba(5,8,20,.62) 60%, rgba(5,8,20,.94) 100%); }
  .tcgh-tile { transition: none; box-shadow: 0 10px 26px rgba(0,0,0,.28); }
  .tcgh-tile:hover, .tcgh-tile:focus-visible { transform: none; }
  .tcgh-screen { animation: none !important; }
  .tcgd-pick.in img, .tcgd-pick.blocked img { filter: none; opacity: .45; }
  .tcgh, .tcgh * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  /* pack shelf inside the hub: keep the (compositor-only) bob, drop the 20 per-frame color-dodge sheens */
  .tcgh .tcgx-mini .pk::after { animation: none !important; mix-blend-mode: normal; opacity: .12; background-position: 60% 0; }
  .tcgh .tcgx-mini .pk { animation: none !important; }
  .tcgh .tcgx-pity .bar i { animation: none !important; }
  .tcgh-panel, .tcgh-tile, .tcgh-pill, .tcgh-back { background-color: color-mix(in srgb, var(--skin-surface, #0f172a) 88%, transparent); }
}

/* Deck builder: combined filters */
.tcgd-chips { align-items: center; }
.tcgd-chips .grp { font: 700 10px var(--skin-font, Inter, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--tcgh-muted); margin: 0 2px 0 6px; }
.tcgd-chips .grp:first-child { margin-left: 0; }
.tcgd-chips .brk { flex-basis: 100%; height: 0; }
.tcgd-chip.clear { color: #fca5a5; border-color: rgba(248,113,113,.45); }
.tcgd-chip.clear[hidden] { display: none; }
.tcgd-fsum { font-size: 12px; color: var(--tcgh-muted); margin: 8px 0 0; }

/* Deck builder: slot chooser (sheet on phones, dialog on desktop) */
.tcgd-choose { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(3,6,16,.62); animation: tcgd-fade .16s ease-out; }
.tcgd-choose[hidden] { display: none; }
@keyframes tcgd-fade { from { opacity: 0; } }
@keyframes tcgd-up { from { transform: translateY(24px); opacity: 0; } }
.tcgd-cbox { width: min(460px, 100%); max-height: calc(100% - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 18px; border-radius: 22px;
  background: var(--skin-surface, #0f172a); color: var(--tcgh-text); border: 1px solid var(--tcgh-line); box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: tcgd-up .2s ease-out; }
.tcgd-chead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tcgd-cthumb { position: relative; width: 64px; flex: 0 0 64px; aspect-ratio: 3 / 4; }
.tcgd-chead .tcgd-card .nm, .tcgd-chead .tcgd-card .role, .tcgd-chead .tcgd-card .x { display: none; }
.tcgd-chead h4 { margin: 0; font: 700 19px/1.15 var(--skin-display, "Space Grotesk", Inter, sans-serif); }
.tcgd-chead p { margin: 4px 0 0; font-size: 13px; color: var(--tcgh-muted); }
.tcgd-chead .cx { margin-left: auto; align-self: flex-start; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--tcgh-line); background: var(--tcgh-surface-2); color: var(--tcgh-text); cursor: pointer; }
.tcgd-crow-lab { font: 700 11px var(--skin-font, Inter, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--tcgh-muted); margin: 10px 0 6px; }
.tcgd-crow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tcgd-copt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 8px 6px; border-radius: 14px; cursor: pointer;
  border: 1.5px dashed var(--tcgh-line); background: var(--tcgh-surface-2); color: var(--tcgh-text); font: 600 12px var(--skin-font, Inter, sans-serif); transition: border-color .15s, transform .12s; }
.tcgd-copt:hover:not([disabled]), .tcgd-copt:focus-visible { border-color: var(--tcgh-accent); outline: none; transform: translateY(-1px); }
.tcgd-copt.full { border-style: solid; }
.tcgd-copt img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.tcgd-copt .plus { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1.5px dashed var(--tcgh-line); color: var(--tcgh-muted); }
.tcgd-copt em { font-style: normal; font-size: 10px; color: var(--tcgh-muted); letter-spacing: .04em; }
.tcgd-copt .rep { position: absolute; top: 5px; right: 5px; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, #f59e0b 30%, transparent); color: #fcd34d; }
.tcgd-copt.here .rep { background: color-mix(in srgb, var(--tcgh-accent) 35%, transparent); color: #fff; }
.tcgd-copt[disabled] { opacity: .38; cursor: not-allowed; }
.tcgd-cfoot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.tcgd-cnote { font-size: 12px; color: #fcd34d; margin: 10px 0 0; }
@media (max-width: 640px) {
  .tcgd-choose { align-items: flex-end; padding: 0; }
  .tcgd-cbox { width: 100%; border-radius: 22px 22px 0 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); max-height: 88%; }
  .tcgd-copt { min-height: 84px; }
}

/* Packs / Collection tile art: in the flex flow between the set label and the title,
   sized from the free space, so it never sits under the label or the title (any tile height). */
.tcgh-tile.t-packs .fan, .tcgh-tile.t-col .fan.cards { position: relative !important; left: auto; top: auto; width: 100%; height: auto; flex: 1 1 0; min-height: 0; align-self: stretch; margin: 34px 0 2px; z-index: 1 !important; }
.tcgh-tile.t-packs .fan img { left: 50%; top: 50%; width: auto; height: 86%; max-height: 190px; max-width: none; }
.tcgh-tile.t-packs .fan img:nth-child(1) { transform: translate(-50%, -50%) translateX(-60%) rotate(-15deg) translateY(4%); }
.tcgh-tile.t-packs .fan img:nth-child(2) { transform: translate(-50%, -50%) translateX(-20%) rotate(-5deg); }
.tcgh-tile.t-packs .fan img:nth-child(3) { transform: translate(-50%, -50%) translateX(20%) rotate(5deg); }
.tcgh-tile.t-packs .fan img:nth-child(4) { transform: translate(-50%, -50%) translateX(60%) rotate(15deg) translateY(4%); }
.tcgh-tile.t-packs:hover .fan img:nth-child(1) { transform: translate(-50%, -50%) translateX(-72%) rotate(-20deg) translateY(2%); }
.tcgh-tile.t-packs:hover .fan img:nth-child(4) { transform: translate(-50%, -50%) translateX(72%) rotate(20deg) translateY(2%); }
.tcgh-tile.t-col .fan.cards img { left: 50%; top: 50%; width: auto; height: 76%; max-height: 118px; aspect-ratio: 1; }
.tcgh-tile.t-col .fan.cards img:nth-child(1) { transform: translate(-50%, -50%) translateX(-66%) rotate(-12deg) translateY(6%); }
.tcgh-tile.t-col .fan.cards img:nth-child(2) { transform: translate(-50%, -50%) translateX(66%) rotate(12deg) translateY(6%); }
.tcgh-tile.t-col .fan.cards img:nth-child(3) { transform: translate(-50%, -50%) translateY(-3%) scale(1.1); }
@media (max-width: 640px) {
  .tcgh-tile.t-packs .fan, .tcgh-tile.t-col .fan.cards { margin-top: 26px; }
  .tcgh-tile.t-col .fan.cards img { height: 90%; border-width: 2px; border-radius: 11px; }
}

/* Lean hub everywhere (standing rule 2026-09-27): no glass/blur, no background-position animation,
   at most one very slow transform-only star drift on desktop, paused when covered/hidden. */
.tcgh, .tcgh * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.tcgh-panel, .tcgh-tile, .tcgh-pill, .tcgh-back, .tcgh-sets, .tcgh-set-chip { background-color: color-mix(in srgb, var(--skin-surface, #0f172a) 90%, transparent); }
.tcgh-bg i:nth-child(2), .tcgh-bg i:nth-child(3) { display: none; }
.tcgh-bg i:nth-child(1) { animation-duration: 120s; }
html:not(.tcgh-open) .tcgh-bg i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .tcgh *, .tcgh *::before, .tcgh *::after { animation: none !important; transition-duration: .01ms !important; }
  .tcgd-choose, .tcgd-cbox { animation: none !important; }
}
html.tcgh-idle .tcgh *, html.tcgh-idle .tcgh *::before, html.tcgh-idle .tcgh *::after { animation-play-state: paused !important; }
/* desktop too: pack shelf sheens static (they repainted 20 blend layers every frame); the transform-only bob stays */
.tcgh .tcgx-mini .pk::after { animation: none !important; mix-blend-mode: normal; opacity: .12; background-position: 60% 0; }
.tcgh .tcgx-pity .bar i { animation: none !important; }

/* 2026-09-28 hubdesk: desktop home grid (>= 981px only; tablet/mobile rules above unchanged).
   Matches = tall hero left spanning 2 rows, Packs/Collection/PvP/Decks = 2x2 of equal height on the right. */
@media (min-width: 981px) {
  .tcgh-home { width: 100%; max-width: 1200px; margin: 0 auto; }
  .tcgh-home .tcgh-tiles { grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: repeat(2, clamp(320px, calc(50vh - 60px), 400px)); grid-auto-rows: clamp(220px, 30vh, 300px); }
  .tcgh-tiles > .tcgh-tile.t-match { grid-column: 1; grid-row: 1 / span 2; }
  .tcgh-tiles > .tcgh-tile.t-pvp, .tcgh-tiles > .tcgh-tile.t-deck { grid-column: auto; min-height: 0; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
  .tcgh-tiles > .tcgh-tile.t-pvp .txt, .tcgh-tiles > .tcgh-tile.t-deck .txt { flex: 0 0 auto; }
  .tcgh-tiles > .tcgh-tile.t-pvp .duo img { height: 78%; bottom: auto; top: 6%; }
  .tcgh-tiles > .tcgh-tile.t-pvp .duo img.l { right: 38%; }
  .tcgh-tiles > .tcgh-tile.t-pvp .duo img.r { right: 2%; }
  .tcgh-tiles > .tcgh-tile.t-pvp .duo .vs { right: 44%; top: 38%; font-size: 38px; }
  .tcgh-tiles > .tcgh-tile.t-pvp::before { background: linear-gradient(180deg, transparent 30%, rgba(5,8,20,.6) 58%, rgba(5,8,20,.92) 100%); }
  .tcgh-tiles > .tcgh-tile.t-deck .board { right: 50%; top: 38%; transform: translate(50%, -50%) perspective(500px) rotateX(18deg); grid-template-columns: repeat(3, 52px); gap: 10px; }
  .tcgh-tiles > .tcgh-tile.t-deck .board i { width: 52px; height: 68px; }
}

/* 2026-09-28 pvptext: mobile/tablet PvP tile, keep text clear of the PVP label chip (desktop block above untouched). */
@media (max-width: 980px) {
  .tcgh-tiles > .tcgh-tile.t-pvp { padding-top: 58px; }
}
@media (max-width: 640px) {
  .tcgh-tiles > .tcgh-tile.t-pvp { padding-top: 46px; }
}

/* 2026-09-28 deckcards2: mobile/tablet Decks tile compact; card board right of the heading/description,
   anchored above the "Build a deck" button (desktop block above untouched; replaces deckcards v6 block). */
@media (max-width: 980px) {
  .tcgh-tiles > .tcgh-tile.t-deck { min-height: 180px; }
  .tcgh-tiles > .tcgh-tile.t-deck .txt { max-width: calc(100% - 150px); margin-right: auto; }
  .tcgh-tiles > .tcgh-tile.t-deck .board { top: auto; bottom: 72px; right: 18px; transform: perspective(500px) rotateX(18deg); grid-template-columns: repeat(3, 34px); gap: 7px; }
  .tcgh-tiles > .tcgh-tile.t-deck .board i { width: 34px; height: 44px; }
}
@media (max-width: 640px) {
  .tcgh-tiles > .tcgh-tile.t-deck { min-height: 170px; padding-top: 42px; }
  .tcgh-tiles > .tcgh-tile.t-deck .txt { max-width: calc(100% - 100px); }
  .tcgh-tiles > .tcgh-tile.t-deck .board { bottom: 56px; right: 14px; grid-template-columns: repeat(3, 26px); gap: 5px; }
  .tcgh-tiles > .tcgh-tile.t-deck .board i { width: 26px; height: 34px; }
}

/* 2026-09-28 i18n: DE/EN toggle pill in the hub header (current language highlighted). */
.tcgh-lang { cursor: pointer; font: inherit; color: inherit; gap: 5px; }
.tcgh-lang b { opacity: .45; font-weight: 700; }
.tcgh-lang b.on { opacity: 1; color: var(--tcgh-accent); }
@media (max-width: 640px) { .tcgh-lang { padding: 7px 9px; } .tcgh-lang i { display: none; } }
