/* =====================================================================
   Bill's Archive: TCG Pocket pages in the site layout (20 Oct 2026)
   Hero, contents bar, main column + ad rail copied from the set-page-v2
   output (stellar-crown.html) so Pocket pages match the TCG set pages.
   Pages keep their own inline CSS for the card grid, packs, lightbox etc.
   The left rail comes from /ba-sidebar.js, the footer CSS from ba-shared.css.
   ===================================================================== */
:root{--sidebar-width:300px;--set-accent:var(--set,#9b6dff);
  --set-gradient:linear-gradient(125deg,color-mix(in srgb,var(--set,#9b6dff) 70%,#06060b) 0%,color-mix(in srgb,var(--set,#9b6dff) 30%,#0a0a0f) 52%,#0a0a0f 100%)}
body{line-height:1.65;overflow-x:clip}
[id]{scroll-margin-top:var(--anchor-offset,4.5rem)}

/* ── HERO ─────────────────────────────────────────────────────────── */
.set-hero { position: relative; overflow: hidden; z-index: 2; border-bottom: 1px solid rgba(255,255,255,0.08); }
.set-hero-bg { position: absolute; inset: 0; background: var(--set-gradient); }
.set-hero-bg::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 70% 80% at 15% 100%, rgba(0,0,0,0.55) 0%, transparent 65%),
                radial-gradient(ellipse 40% 90% at 95% 0%, rgba(155,109,255,0.18) 0%, transparent 60%); }
.set-hero-in { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 1.25rem 2rem 1.5rem;
    display: grid; grid-template-columns: 150px minmax(0, 1fr) 190px 150px; grid-template-areas: "prev main chase next";
    gap: 1.5rem; align-items: center; }
.set-hero-adj { display: contents; }
.set-hero-main { grid-area: main; min-width: 0; }
.set-kicker { font-family: 'DM Sans', sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 0.6rem; }
.set-logo { display: block; height: 84px; width: auto; max-width: 320px; object-fit: contain; margin-bottom: 0.75rem;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.45)); }
.set-hero h1 { font-family: 'DM Sans', sans-serif; font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 800;
    line-height: 1.08; letter-spacing: -0.02em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.4); margin-bottom: 0.35rem; }
.set-sub { font-size: 0.78rem; color: rgba(255,255,255,0.72); margin-bottom: 0.9rem; max-width: 60ch; }
.set-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.set-facts li, .set-facts li > a { display: flex; flex-direction: column; justify-content: center; min-height: 52px;
    background: rgba(0,0,0,0.34); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 0.4rem 0.8rem; text-decoration: none; }
.set-facts li > a { padding: 0; }
.set-facts li.fact-jp { padding: 0; border: 0; background: none; backdrop-filter: none; }
.set-facts li.fact-jp > a { padding: 0.4rem 0.8rem; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0.35rem 0.6rem; border-color: rgba(255,225,77,0.35); }
.set-facts li.fact-jp > a:hover { border-color: var(--accent-electric); }
.set-facts li.fact-jp img { height: 30px; width: auto; max-width: 100%; min-width: 0; object-fit: contain; object-position: left center; }
.set-facts li.fact-jp > a > span { display: flex; flex-direction: column; }
.set-facts small { font-family: 'DM Sans', sans-serif; font-size: .75rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.62); }
.set-facts b { font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 700; color: #fff; line-height: 1.2; }
.set-facts i { font-style: normal; font-size: .75rem; color: rgba(255,255,255,0.6); }
.set-chase { grid-area: chase; margin: 0; text-align: center; }
.set-chase .ct-img { width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,0.55); }
.set-chase figcaption { margin-top: 0.5rem; display: flex; flex-direction: column; line-height: 1.3; }
.set-chase small { font-family: 'DM Sans', sans-serif; font-size: .75rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.62); }
.set-chase b { font-family: 'DM Sans', sans-serif; font-size: 0.85rem; color: #fff; }
.set-chase span { font-size: .75rem; color: rgba(255,255,255,0.7); }
.set-chase em { font-style: normal; font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 0.8rem; color: var(--accent-electric); }
.set-adj { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; text-decoration: none;
    padding: 0.75rem 0.6rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; background: rgba(0,0,0,0.3);
    transition: border-color 0.2s, background 0.2s; }
.set-adj:hover { border-color: var(--accent-electric); background: rgba(0,0,0,0.5); }
.set-adj.prev { grid-area: prev; } .set-adj.next { grid-area: next; }
.set-adj img { width: 60px; height: 84px; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.set-adj > span { display: flex; flex-direction: column; line-height: 1.25; }
.set-adj small { font-family: 'DM Sans', sans-serif; font-size: .75rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.62); }
.set-adj.prev small::before { content: '← '; } .set-adj.next small::after { content: ' →'; }
.set-adj b { font-family: 'DM Sans', sans-serif; font-size: 0.86rem; color: #fff; }
.set-adj em { font-style: normal; font-size: .75rem; color: rgba(255,255,255,0.6); }
.set-adj-empty { border: 0; background: none; }

/* ── CONTENTS BAR (site-wide component) ───────────────────────────── */
.toc-bar {
    position: sticky; top: 0; z-index: 90;
    background: rgba(8,8,14,0.88);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-bottom: 1px solid var(--border-color, #2a2a3a);
}
.toc-bar-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.5rem 2rem;
}
.toc-bar-label {
    font-family: 'DM Sans', sans-serif;
    font-size: .75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--set-accent, #9b6dff);
    flex-shrink: 0;
}
.toc-bar-links {
    display: flex; gap: 0.3rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 2.5rem;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
}
.toc-bar-links::-webkit-scrollbar { display: none; }
.toc-bar-links a {
    flex-shrink: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted, #9898aa);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.toc-bar-links a:hover { color: var(--text-primary, #fff); background: rgba(255,255,255,0.06); }
.toc-bar-links a.active {
    color: #fff;
    background: rgba(155,109,255,0.16);
    background: color-mix(in srgb, var(--set-accent, #9b6dff) 16%, transparent);
    border-color: rgba(155,109,255,0.45);
    border-color: color-mix(in srgb, var(--set-accent, #9b6dff) 45%, transparent);
}


.toc-bar-logo { display: flex; align-items: center; flex-shrink: 0; margin-right: 0.25rem; padding-right: 0.85rem; border-right: 1px solid var(--border-color); }
.toc-bar-logo img { display: block; height: 28px; width: auto; max-width: 120px; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
@media (max-width: 768px) { .toc-bar-logo img { height: 24px; max-width: 96px; } .toc-bar-logo { padding-right: 0.6rem; } }

/* ── MAIN / AD RAIL ───────────────────────────────────────────────── */
.main-wrapper { max-width: 1400px; margin: 0 auto; padding: 2.25rem 3rem 3rem;
    padding-right: calc(6rem + var(--sidebar-width)); position: relative; }
.sidebar { position: absolute; top: 3rem; bottom: 3rem; right: 3rem; width: var(--sidebar-width); }
.sidebar-ad-reserve { display: block; width: 100%; max-width: 300px; margin: 1.5rem auto 0; min-height: 280px; }
.sidebar :is(iframe, ins, .adsbygoogle) { max-width: 100%; box-sizing: border-box; }

@media (max-width: 1180px) {
    .main-wrapper { padding: 2rem 2rem 3rem; }
    .sidebar { display: none; }
}
@media (max-width: 1100px) {
    .set-hero-in { grid-template-columns: minmax(0, 1fr) 190px; grid-template-areas: "main chase" "adj adj"; gap: 1.25rem; }
    .set-hero-adj { display: grid; grid-area: adj; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .set-adj.prev, .set-adj.next { grid-area: auto; }
    .set-adj { flex-direction: row; text-align: left; justify-content: flex-start; }
    .set-adj.next { flex-direction: row-reverse; text-align: right; }
    .set-adj-empty { display: none; }
    .set-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; }
    .set-facts li.fact-jp { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .set-hero-in { padding: 1rem 1rem 1.25rem; grid-template-columns: minmax(0, 1fr) 150px; gap: 0.9rem; }
    .set-logo { height: 60px; max-width: 240px; }
    .set-hero h1 { font-size: 1.35rem; }
    .set-facts li, .set-facts li > a { min-height: 44px; padding: 0.3rem 0.6rem; }
    .set-facts li.fact-jp > a { padding: 0.3rem 0.6rem; }
    .set-facts li.fact-jp img { height: 24px; }
    .set-facts { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.4rem; }
    .set-adj { padding: 0.5rem; gap: 0.5rem; min-width: 0; }
    .set-adj > span { min-width: 0; }
    .set-adj small { font-size: .75rem; white-space: nowrap; }
    .set-adj b { font-size: 0.78rem; }
    .set-adj img { width: 40px; height: 56px; }
    .toc-bar-inner { padding: 0.45rem 1rem; gap: 0.6rem; }
    .toc-bar-label { display: none; }
    .main-wrapper { padding: 1.5rem 1rem 2rem; }
    .sidebar { display: none; }
    .site-footer { padding: 2.5rem 1.5rem 0; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
    .set-hero-in { grid-template-columns: minmax(0, 1fr) 112px; }
    .set-hero-adj { grid-template-columns: 1fr; }
    .set-adj.next { flex-direction: row; text-align: left; }
    .footer-top { grid-template-columns: 1fr; }
}

/* ── POCKET ADJUSTMENTS ───────────────────────────────────────────── */
.set-hero-in.no-chase{grid-template-columns:150px minmax(0,1fr) 150px;grid-template-areas:"prev main next"}
.set-adj img.adj-logo{width:100px;height:46px;object-fit:contain;border-radius:0;box-shadow:none;filter:drop-shadow(0 2px 6px rgba(0,0,0,.5))}
.set-chase .ct-img{display:block;cursor:zoom-in}
.set-chase .ct-img img{display:block;width:100%;height:auto}
.main-wrapper .sec{margin:0 0 2.6rem}
.main-wrapper .sec h2,.main-wrapper h2{font-family:'DM Sans',sans-serif;font-size:clamp(1.35rem,2.4vw,1.75rem);font-weight:800;letter-spacing:-0.02em;color:#fff;margin:0 0 .9rem;padding-bottom:.5rem;display:block;border-bottom:2px solid transparent;border-image:linear-gradient(90deg,var(--set-accent),var(--accent-fire,#ff7a4a),transparent) 1}
.main-wrapper .sec h2::before{display:none}
.main-wrapper .intro{font-size:.92rem;margin:0 0 2.2rem;max-width:72ch}
.main-wrapper .tools{margin:0 0 1.4rem}
.main-wrapper .setnav{margin-top:1rem}
@media (max-width:1100px){.set-hero-in.no-chase{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "adj"}}
@media (max-width:768px){.set-hero-in.no-chase{grid-template-columns:minmax(0,1fr)}.set-adj img.adj-logo{width:64px;height:30px}
  html body .set-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.set-facts li{min-width:0}.set-facts small{letter-spacing:.05em;line-height:1.25}.set-facts b{overflow-wrap:anywhere}}
@media (max-width:480px){.set-hero-in.no-chase{grid-template-columns:minmax(0,1fr)}}
