*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f0f13;
    --surface: #1a1a24;
    --surface2: #22223a;
    --surface3: #1e1a2e;
    --accent: #c084fc;
    --accent2: #f472b6;
    --text: #e8e8f0;
    --muted: #888899;
    --border: #3d3d58;
    --radius: 10px;
    --shadow-accent: rgba(192, 132, 252, 0.15);
}

/* ── Light theme ── */
:root[data-theme="light"] {
    --bg: #f2f2f7;
    --surface: #ffffff;
    --surface2: #e8e8ed;
    --surface3: #d1d1d6;
    --accent: #7c3aed;
    --accent2: #db2777;
    --text: #1c1c1e;
    --muted: #6c6c70;
    --border: #c7c7cc;
    --shadow-accent: rgba(124, 58, 237, 0.12);
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f2f2f7;
        --surface: #ffffff;
        --surface2: #e8e8ed;
        --surface3: #d1d1d6;
        --accent: #7c3aed;
        --accent2: #db2777;
        --text: #1c1c1e;
        --muted: #6c6c70;
        --border: #c7c7cc;
        --shadow-accent: rgba(124, 58, 237, 0.12);
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ── Header ── */
.site-header {
    background: rgba(15, 15, 19, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
:root[data-theme="light"] .site-header { background: rgba(242, 242, 247, 0.85); }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .site-header { background: rgba(242, 242, 247, 0.85); }
}

.site-nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.site-nav a { font-size: .9rem; color: var(--muted); font-weight: 600; transition: color .15s; }
.site-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; margin-left: .75rem; }

/* ── Theme toggle pill ── */
.theme-toggle {
    position: relative;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    width: 54px; height: 28px;
    cursor: pointer;
    padding: 0 6px;
    display: flex; align-items: center; justify-content: space-between;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color .2s;
}
.theme-toggle:hover { border-color: var(--accent); }
.t-icon { font-size: 13px; line-height: 1; position: relative; z-index: 1; transition: opacity .25s; user-select: none; }
.t-sun  { opacity: .35; }
.t-moon { opacity: 1; color: var(--accent); }
.t-thumb {
    position: absolute;
    width: 22px; height: 22px;
    background: var(--accent);
    border-radius: 50%;
    left: 3px;
    transform: translateX(26px);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    opacity: .22;
}
:root[data-theme="light"] .t-sun  { opacity: 1; color: #f59e0b; }
:root[data-theme="light"] .t-moon { opacity: .35; color: var(--muted); }
:root[data-theme="light"] .t-thumb { transform: translateX(0); background: #f59e0b; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .t-sun  { opacity: 1; color: #f59e0b; }
    :root:not([data-theme="dark"]) .t-moon { opacity: .35; color: var(--muted); }
    :root:not([data-theme="dark"]) .t-thumb { transform: translateX(0); background: #f59e0b; }
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Main ── */
main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); transition: color .15s; }
.breadcrumb a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -60%);
    width: 700px; height: 350px;
    background: radial-gradient(ellipse, rgba(192,132,252,0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
:root[data-theme="light"] .hero::before { background: radial-gradient(ellipse, rgba(124,58,237,0.07) 0%, transparent 70%); }
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .hero::before{background:radial-gradient(ellipse,rgba(124,58,237,0.07) 0%,transparent 70%);}}
.hero h1, .hero p, .hero-stats, .hero-actions { position: relative; z-index: 1; }
.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}
.hero p { color: var(--muted); font-size: 1.05rem; }

/* Hero random button */
.hero-actions {
    margin-top: 1rem;
}
.random-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: 1px solid #5a5a80;
    background: transparent;
    color: #b8b0f0;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    letter-spacing: 0.02em;
}
.random-btn:hover { border-color: var(--accent); color: var(--accent); }
:root[data-theme="light"] .random-btn { border-color: var(--border); color: var(--muted); }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .random-btn { border-color: var(--border); color: var(--muted); }
}
.random-btn:disabled { opacity: 0.5; cursor: default; }

/* Hero stats bar */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.hero-stat-val {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-stat-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Series grid (index) ── */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem;
    margin-top: 2.5rem;
}
.series-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.1rem 1.1rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.18s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
}
.series-card::after {
    content: '→';
    position: absolute;
    right: 1rem; top: 50%;
    transform: translateY(-50%) translateX(6px);
    color: var(--accent);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.18s, transform 0.18s;
}
.series-card:hover {
    border-left-color: var(--accent2);
    transform: translateY(-2px);
    box-shadow: 0 4px 24px var(--shadow-accent);
}
.series-card:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.series-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.series-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }

/* ── Set covers grid (series page) ── */
.set-covers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.set-cover-card { display: block; border-radius: var(--radius); overflow: hidden; }
.set-cover {
    position: relative;
    aspect-ratio: 63/88;
    background: var(--surface2);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s;
}
.set-cover-card:hover .set-cover { transform: translateY(-3px); }
.set-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-cover-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--surface2), var(--surface3));
}
.set-cover-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(8,6,15,0.92) 50%);
    padding: 1.5rem 0.6rem 0.6rem;
}
.set-cover-code { font-weight: 700; font-size: 0.8rem; color: #fff; }
.set-cover-count { font-size: 0.7rem; color: rgba(192,132,252,0.9); margin-top: 0.1rem; }

/* ── Sets grid (series page) ── */
.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.set-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.18s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
}
.set-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--shadow-accent);
}
.set-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.set-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.set-card:hover .set-card-img img { transform: scale(1.04); }
.set-card-placeholder {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--muted);
    padding: 1rem;
    text-align: center;
}
.set-card-info {
    padding: 0.6rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.set-code { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.set-series { font-size: 0.78rem; color: var(--muted); }
.set-count { font-size: 0.75rem; color: var(--accent); font-weight: 600; }

/* ── Series description ── */
.series-description {
    margin-top: 0.85rem;
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.65;
    max-width: 70ch;
}

/* ── Set header ── */
.set-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.set-header-info { flex: 1; min-width: 0; }
.set-header h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.set-header .set-series { color: var(--muted); margin-top: 0.3rem; font-size: 0.9rem; }
.set-header .set-count { color: var(--accent); font-size: 0.9rem; margin-top: 0.2rem; font-weight: 600; }

/* Booster box image */
.set-box-img {
    flex-shrink: 0;
    width: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    order: -1;
}
.set-box-img img { width: 100%; display: block; }
@media (max-width: 560px) {
    .set-header { flex-direction: column; }
    .set-box-img { width: 100%; max-width: 220px; order: 0; }
}

/* Buy button */
.buy-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.buy-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: .85rem;
    transition: opacity .15s, transform .12s;
    text-decoration: none;
}
.buy-btn:hover { opacity: .85; transform: translateY(-1px); color: #fff; }
.buy-btn-ali { background: #e52929; color: #fff; }
.buy-btn-ebay { background: #0064d2; color: #fff; }
.buy-btn-amz { background: #ff9900; color: #111; }

/* ── Wishlist page ── */
.wl-header-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; }
.wl-empty {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 3rem 0;
    text-align: center;
}
.wl-grid { position: relative; }
.wl-item { position: relative; }
.wl-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s, background .15s;
    z-index: 2;
}
.wl-item:hover .wl-remove { opacity: 1; }
.wl-remove:hover { background: #e52929; }

/* ── Characters index: alphabet bar reuses .rarity-filter style ── */
.char-alpha { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1.25rem 0 1rem; }
.char-alpha .rf-btn { padding: 0.25rem 0.6rem; font-size: 0.75rem; min-width: 32px; text-align: center; }

/* ── Characters index grid ── */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
    margin-top: 2rem;
}
.char-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}
.char-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.char-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.char-count { font-size: 0.75rem; color: var(--accent); font-weight: 700; }

/* ── Rarity filter bar ── */
.rarity-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 1rem;
}
.rf-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    letter-spacing: 0.03em;
}
.rf-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.rf-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Cards grid (set page) ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.card-thumb {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.18s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
}
.card-thumb:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px var(--shadow-accent);
}
.card-thumb img { width: 100%; aspect-ratio: 63/88; object-fit: cover; display: block; }
.card-meta {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--surface2);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.card-num-rar { color: var(--accent); font-weight: 600; }

/* ── Card character info ── */
.card-setcode { font-size: 0.85rem; color: var(--muted); margin: -0.15rem 0 0.5rem; letter-spacing: 0.02em; }
.card-anime-sub { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.4rem; }
.card-character { font-size: 1.05rem; margin-bottom: 0.35rem; }
.card-anime { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.card-rarity { margin-bottom: 0.75rem; }
.card-find { margin-bottom: 1rem; }
.card-find-label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 0.5rem; }

/* ── Card detail ── */
.card-detail {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 700px) { .card-detail { grid-template-columns: 1fr; } }

.card-image img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.card-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.card-num { color: var(--muted); font-weight: 400; }

/* ── Rarity badges ── */
.rar-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.rar-ssr { background: #b8960030; color: #fbbf24; border: 1px solid #b8960060; }
.rar-sr  { background: #6b728030; color: #d1d5db; border: 1px solid #6b728060; }
.rar-r   { background: #1e3a5f30; color: #93c5fd; border: 1px solid #1e3a5f60; }
.rar-mr  { background: #7f1d1d30; color: #f87171; border: 1px solid #7f1d1d60; }
.rar-ur  { background: #78350f30; color: #fb923c; border: 1px solid #78350f60; }
.rar-zr  { background: #4c1d9530; color: #c084fc; border: 1px solid #4c1d9560; }
.rar-pr  { background: #71430030; color: #fcd34d; border: 1px solid #71430060; }
.rar-sp  { background: #1e3a5f30; color: #60a5fa; border: 1px solid #1e3a5f60; }
.rar-other { background: #1f2937; color: #9ca3af; border: 1px solid #374151; }
.rar-n   { background: #11182730; color: #9ca3af; border: 1px solid #37415160; }
.rar-sec { background: linear-gradient(135deg,#1e1b4b30,#4c1d9530); color: #e879f9; border: 1px solid #a855f760; }

/* ── Rarity badges — light mode overrides ── */
:root[data-theme="light"] .rar-ssr { background:#fef3c7; color:#92400e; border-color:#fcd34d; }
:root[data-theme="light"] .rar-sr  { background:#f3f4f6; color:#374151; border-color:#9ca3af; }
:root[data-theme="light"] .rar-r   { background:#dbeafe; color:#1e40af; border-color:#93c5fd; }
:root[data-theme="light"] .rar-mr  { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
:root[data-theme="light"] .rar-ur  { background:#ffedd5; color:#92400e; border-color:#fdba74; }
:root[data-theme="light"] .rar-zr  { background:#ede9fe; color:#5b21b6; border-color:#c4b5fd; }
:root[data-theme="light"] .rar-pr  { background:#fef9c3; color:#713f12; border-color:#fde047; }
:root[data-theme="light"] .rar-sp  { background:#dbeafe; color:#1e40af; border-color:#93c5fd; }
:root[data-theme="light"] .rar-other { background:#f9fafb; color:#374151; border-color:#d1d5db; }
:root[data-theme="light"] .rar-n   { background:#f9fafb; color:#6b7280; border-color:#e5e7eb; }
:root[data-theme="light"] .rar-sec { background:#faf5ff; color:#7c3aed; border-color:#ddd6fe; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .rar-ssr  { background:#fef3c7; color:#92400e; border-color:#fcd34d; }
    :root:not([data-theme="dark"]) .rar-sr   { background:#f3f4f6; color:#374151; border-color:#9ca3af; }
    :root:not([data-theme="dark"]) .rar-r    { background:#dbeafe; color:#1e40af; border-color:#93c5fd; }
    :root:not([data-theme="dark"]) .rar-mr   { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
    :root:not([data-theme="dark"]) .rar-ur   { background:#ffedd5; color:#92400e; border-color:#fdba74; }
    :root:not([data-theme="dark"]) .rar-zr   { background:#ede9fe; color:#5b21b6; border-color:#c4b5fd; }
    :root:not([data-theme="dark"]) .rar-pr   { background:#fef9c3; color:#713f12; border-color:#fde047; }
    :root:not([data-theme="dark"]) .rar-sp   { background:#dbeafe; color:#1e40af; border-color:#93c5fd; }
    :root:not([data-theme="dark"]) .rar-other { background:#f9fafb; color:#374151; border-color:#d1d5db; }
    :root:not([data-theme="dark"]) .rar-n   { background:#f9fafb; color:#6b7280; border-color:#e5e7eb; }
    :root:not([data-theme="dark"]) .rar-sec { background:#faf5ff; color:#7c3aed; border-color:#ddd6fe; }
}

/* ── eBay listings ── */
.ebay-listings { margin-top: 1.5rem; }
.ebay-listings h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text); }
.ebay-listings ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.ebay-listings li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color .15s;
}
.ebay-listings li:hover { border-color: var(--accent); }
.ebay-listings li a { color: var(--text); }
.ebay-listings li a:hover { color: var(--accent); }
.ebay-listings li strong { color: #4ade80; }
.no-listings { color: var(--muted); font-size: 0.85rem; }

/* ── Collection tracker (card page) ── */
.col-tracker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    align-items: center;
}
.col-qty-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
}
.col-label { font-size: 0.8rem; color: var(--muted); margin-right: 0.25rem; }
.col-decr, .col-incr {
    background: none; border: none; color: var(--text);
    font-size: 1.25rem; line-height: 1; cursor: pointer;
    width: 26px; height: 26px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.1s, transform 0.1s;
}
.col-decr:hover, .col-incr:hover { background: var(--surface2); }
.col-decr:active, .col-incr:active { transform: scale(0.88); }
.col-decr:disabled { opacity: 0.25; cursor: default; }
.col-count { font-weight: 800; font-size: 1.15rem; min-width: 1.5rem; text-align: center; }
.col-want-btn {
    padding: 0.45rem 1rem;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--muted); border-radius: 8px;
    cursor: pointer; font-size: 0.9rem; font-weight: 600;
    transition: all 0.15s;
}
.col-want-btn:hover { border-color: var(--accent); color: var(--text); }
.col-want-btn:active { transform: scale(0.97); }
.col-want-btn.active { background: rgba(192,132,252,0.12); border-color: var(--accent); color: var(--accent); }

/* Sync */
.col-sync-wrap { margin-top: 1.25rem; font-size: 0.85rem; }
.col-sync-wrap summary { cursor: pointer; color: var(--muted); user-select: none; transition: color .15s; }
.col-sync-wrap summary:hover { color: var(--text); }
.col-sync-box { margin-top: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; }
.col-sync-info { color: var(--muted); margin-bottom: 0.6rem; font-size: 0.8rem; }
.col-sync-info code { color: var(--accent); word-break: break-all; font-size: 0.75rem; }
.col-sync-copy { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 4px; padding: 0.15rem 0.45rem; font-size: 0.72rem; cursor: pointer; margin-left: 0.4rem; vertical-align: middle; transition: border-color .15s, color .15s; }
.col-sync-copy:hover { border-color: var(--accent); color: var(--text); }
.col-sync-btns { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
.col-sync-btn { flex: 1; padding: 0.45rem; border: 1px solid var(--border); background: var(--surface2); color: var(--text); border-radius: 6px; cursor: pointer; font-size: 0.82rem; transition: border-color 0.15s, transform 0.1s; }
.col-sync-btn:hover { border-color: var(--accent); }
.col-sync-btn:active { transform: scale(0.97); }
.col-sync-status { color: var(--muted); min-height: 1.1rem; font-size: 0.8rem; }
.col-sync-section-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .4rem; }
.col-import-label { text-align: center; cursor: pointer; }

/* Set page: collection badges on card thumbnails */
.card-thumb { position: relative; }
.card-thumb.col-have::after,
.card-thumb.col-want::after {
    position: absolute; top: 5px; right: 5px;
    font-size: 0.65rem; font-weight: 800;
    min-width: 18px; height: 18px;
    border-radius: 9px; padding: 0 3px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.card-thumb.col-have::after { content: attr(data-qty); background: #4ade80; color: #052e16; }
.card-thumb.col-want::after { content: '★'; background: var(--accent); color: #1a0533; width: 18px; padding: 0; }

.col-set-stats { margin-top: 0.75rem; }
.col-progress-stat { margin-bottom: 0.4rem; line-height: 1.2; }
.col-progress-owned { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.col-progress-total { font-size: 0.88rem; color: var(--muted); }
.col-progress-pct { font-size: 0.82rem; color: var(--accent); font-weight: 600; }
.col-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    max-width: 360px;
    margin-bottom: 0.3rem;
}
.col-progress-fill {
    height: 100%;
    background: #4ade80;
    border-radius: 4px;
    transition: width .4s ease;
}
.col-progress-label { font-size: 0.78rem; color: var(--muted); }

/* ── Rarity filter separator ── */
.rf-sep {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.25rem;
    vertical-align: middle;
}

/* ── Stats page ── */
.stats-hero { margin-bottom: 2rem; }
.stats-grand { font-size: 1.1rem; color: var(--muted); margin-top: 0.5rem; }
.stats-grand-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.stats-series-list { display: flex; flex-direction: column; gap: 1.5rem; max-width: 680px; }
.stats-sr-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.stats-sr-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
    gap: 1rem;
}
.stats-sr-name { font-weight: 700; font-size: 1rem; color: var(--text); text-decoration: none; }
.stats-sr-name:hover { color: var(--accent); }
.stats-sr-pct { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.stats-sr-pct em { color: var(--accent); font-style: normal; font-weight: 600; }
.stats-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.stats-bar-fill { height: 100%; background: #4ade80; border-radius: 4px; }
.stats-sets-detail summary {
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.stats-sets-detail summary::-webkit-details-marker { display: none; }
.stats-sets-detail summary::before { content: '▸ '; }
.stats-sets-detail[open] summary::before { content: '▾ '; }
.stats-sets-list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.stats-set-row {
    display: grid;
    grid-template-columns: 120px 1fr 70px;
    align-items: center;
    gap: 0.75rem;
}
.stats-set-name { font-size: 0.82rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.stats-set-name:hover { color: var(--accent); }
.stats-set-nums { font-size: 0.75rem; color: var(--muted); text-align: right; }

/* ── Search bar ── */
.search-wrap {
    position: relative;
    max-width: 660px;
    margin: 1.75rem auto 0;
}
.search-wrap::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}
.search-input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 2.9rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 40px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.12);
}
:root[data-theme="light"] .search-input:focus { box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1); }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .search-input:focus { box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1); }
}

/* ── Search results section ── */
.sr-section { margin-top: 2.5rem; }
.sr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.sr-count { font-size: 0.9rem; color: var(--muted); }
.sr-count strong { color: var(--text); font-weight: 700; }
.sr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}
.sr-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.sr-more-wrap {
    text-align: center;
    margin-top: 2rem;
}
.sr-more-btn {
    padding: 0.65rem 2rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 40px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.sr-more-btn:hover { border-color: var(--accent); background: var(--surface2); }

/* ── Card description & related sections ── */
.card-description {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    max-width: 760px;
}
.related-section {
    margin: 2rem 0;
}
.related-section > h2,
.related-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}
.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.related-view-all {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.related-view-all:hover { text-decoration: underline; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}
.related-grid .card-thumb {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.related-grid .card-thumb img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color .15s, transform .15s;
}
.related-grid .card-thumb:hover img {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.related-grid .card-meta {
    font-size: 0.7rem;
    color: var(--muted);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: 5rem;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    /* Rarity filter: horizontal scroll, no wrap */
    .rarity-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .rarity-filter::-webkit-scrollbar { display: none; }
    .rf-btn { flex-shrink: 0; }

    /* Breadcrumb: less margin on mobile */
    .breadcrumb { margin-bottom: 0.75rem; }

    /* Set/character header: remove separator, tighten spacing */
    .set-header {
        border-bottom: none;
        padding-bottom: 0.25rem;
        margin-bottom: 0.5rem;
        gap: 1rem;
    }
    .set-header h1 { font-size: 1.6rem; margin-bottom: 0.1rem; }

    /* Description: demote visually and tighten spacing */
    .card-description { font-size: 0.82rem; margin: 0.75rem 0 1rem; }

    /* Header: logo + toggle on top, nav links below */
    .site-header {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
        gap: 0;
    }
    .logo { flex: 1; }
    .header-actions { order: 2; flex-shrink: 0; margin-left: 0; }
    .site-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        justify-content: center;
        gap: 0.6rem;
        padding-top: 0.5rem;
        margin-top: 0.4rem;
        border-top: 1px solid var(--border);
    }
    .site-nav a { font-size: 0.78rem; }

    /* Hero: less top padding */
    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 2rem; }

    /* Main: tighter horizontal padding */
    main { padding: 1.5rem 0.75rem; }

    /* Set header: center the booster box image */
    .set-box-img { align-self: center; }

    /* Stats: responsive set-row grid */
    .stats-set-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }
    .stats-set-row .stats-bar { grid-column: 1 / -1; }

    /* Character page: card grid 2 cols minimum */
    .char-grid { grid-template-columns: 1fr; }

    /* Buy buttons: wrap cleanly */
    .buy-links { gap: 0.4rem; }
    .buy-btn { font-size: 0.8rem; padding: 0.5rem 0.9rem; }
}

/* ── Cookie banner ─────────────────────────────────────────────────────────── */
#cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; flex-wrap: nowrap;
    background: var(--surface2); border-top: 1px solid var(--border);
    padding: 0.6rem 1.25rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.82rem; color: var(--muted);
}
#cookie-banner p { margin: 0; flex: 1; min-width: 0; }
#cookie-banner a { color: var(--accent); white-space: nowrap; }
#cookie-banner .cb-btns { display:flex; gap:.4rem; flex-shrink:0; }
#cookie-banner button {
    flex-shrink: 0; padding: 0.35rem 1rem;
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.82rem; cursor: pointer;
    white-space: nowrap;
}
#cookie-banner button.cb-accept {
    background: var(--accent); color: #fff;
    border-color: var(--accent);
}
#cookie-banner .cb-text { flex: 1; min-width: 0; }
#cookie-banner .cb-text strong { display: block; margin-bottom: .2rem; color: var(--text); }
#cookie-banner .cb-text p { margin: 0; }

@media (max-width: 480px) {
    #cookie-banner { flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem 1rem; padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); }
    #cookie-banner .cb-btns { flex-direction: column; width: 100%; }
    #cookie-banner button { width: 100%; text-align: center; padding: 0.5rem; }
}

/* ── Mobile action bar (card pages) ───────────────────────────────────────── */
.mob-action-bar { display: none; }
@media (max-width: 700px) {
    .mob-action-bar {
        display: flex; align-items: center; gap: 0.5rem;
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
        background: var(--surface2); border-top: 1px solid var(--border);
        box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
        padding: 0.55rem 1rem;
        padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    }
    .mob-own {
        display: flex; align-items: center; gap: 0.3rem;
        background: var(--surface); border: 1px solid rgba(136,136,153,0.4);
        border-radius: var(--radius); padding: 0.2rem 0.4rem;
    }
    .mob-count { font-weight: 600; min-width: 18px; text-align: center; font-size: 0.9rem; color: var(--text); }
    .mob-btn {
        background: none; border: none; cursor: pointer;
        color: var(--text); font-size: 1rem; padding: 0.15rem 0.35rem;
        border-radius: var(--radius); line-height: 1;
    }
    .mob-btn:disabled { opacity: 0.3; }
    .mob-want {
        flex: 1; border: 1px solid rgba(136,136,153,0.4); border-radius: var(--radius);
        background: var(--surface); color: var(--text);
        font-size: 0.82rem; padding: 0.4rem 0.75rem; text-align: center; cursor: pointer;
    }
    .mob-want.active { background: rgba(192,132,252,.12); border-color: var(--accent); color: var(--accent); }
    .mob-ebay {
        background: #0064d2; color: #fff; border-radius: var(--radius);
        font-size: 0.82rem; padding: 0.45rem 0.75rem;
        text-decoration: none; white-space: nowrap; font-weight: 500;
    }
    main { padding-bottom: 62px; }
}

/* ── Prose (privacy policy) ────────────────────────────────────────────────── */
.prose { max-width: 720px; line-height: 1.75; color: var(--text); }
.prose h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: var(--text); }
.prose h3 { font-size: 1rem; margin: 1.25rem 0 0.35rem; color: var(--muted); }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.5rem; }
.prose a { color: var(--accent); }

/* ── Auth ─────────────────────────────────────────────────────────────────── */
.auth-container { display: flex; align-items: center; gap: .4rem; }
.auth-login-btn {
    background: none; border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--muted); cursor: pointer; font-size: .78rem; font-weight: 600;
    padding: .3rem .65rem; transition: border-color .15s, color .15s; white-space: nowrap;
}
.auth-login-btn:hover { border-color: var(--accent); color: var(--accent); }
.auth-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.auth-name {
    background: none; border: none; padding: 0; cursor: pointer;
    font-size: .78rem; font-weight: 600; color: var(--text);
    max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color .15s;
}
.auth-name:hover { text-decoration-color: var(--accent); color: var(--accent); }
.auth-logout { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .72rem; padding: 0; text-decoration: underline; white-space: nowrap; }
.auth-logout:hover { color: var(--accent); }

/* Auth modal */
.auth-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
}
.auth-modal-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 2rem 1.75rem; max-width: 340px; width: 90%; position: relative; text-align: center;
}
.auth-modal-box h2 { margin: 0 0 .4rem; font-size: 1.2rem; color: var(--text); }
.auth-modal-box p { margin: 0 0 1.5rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.auth-modal-close {
    position: absolute; top: .75rem; right: .9rem;
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: 1.3rem; line-height: 1; padding: .2rem .4rem; border-radius: 4px;
}
.auth-modal-close:hover { color: var(--text); }
.auth-provider-btn {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; padding: .72rem 1rem; border-radius: 10px; cursor: pointer;
    font-size: .9rem; font-weight: 600; margin-bottom: .65rem;
    border: 1.5px solid var(--border); transition: border-color .15s, background .15s;
}
.auth-google { background: var(--surface2); color: var(--text); }
.auth-google:hover { border-color: #4285f4; }
.auth-discord { background: #5865f2; color: #fff; border-color: #5865f2; }
.auth-discord:hover { background: #4752c4; border-color: #4752c4; }

/* Nickname input */
.nickname-input {
    width: 100%; padding: .6rem .85rem; border-radius: 8px;
    border: 1.5px solid var(--border); background: var(--surface2);
    color: var(--text); font-size: .95rem; outline: none;
    transition: border-color .15s; margin-bottom: .5rem;
}
.nickname-input:focus { border-color: var(--accent); }
.nickname-error { color: #f87171; font-size: .78rem; margin-bottom: .75rem; text-align: left; }
.nickname-modal-skip {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: .82rem; text-decoration: underline; padding: .25rem 0; display: block; margin: .25rem auto 0;
}
.nickname-modal-skip:hover { color: var(--text); }

/* ── Share collection ───────────────────────────────────────────────────────── */
.share-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem 0 2.5rem; }
.share-stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.share-stat-label { font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.share-series { margin-bottom: 2.5rem; }
.share-series-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.share-set-row { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.share-set-row:last-child { border-bottom: none; }
.share-set-code { font-size: .85rem; font-weight: 600; color: var(--text); min-width: 110px; text-decoration: none; white-space: nowrap; }
.share-set-code:hover { color: var(--accent); }
.share-progress { flex: 1; height: 5px; background: var(--surface2); border-radius: 3px; overflow: hidden; min-width: 60px; }
.share-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.share-progress-fill.complete { background: #4ade80; }
.share-set-nums { font-size: .78rem; color: var(--muted); min-width: 65px; text-align: right; white-space: nowrap; }
.share-set-nums.complete { color: #4ade80; }
.col-share-link { font-size: .78rem; color: var(--accent); word-break: break-all; margin-top: .5rem; }
.col-sync-btn-active { border-color: var(--accent); color: var(--accent); background: rgba(192,132,252,.1); }
/* ── Featured collections gallery ───────────────────────────────────────────── */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.featured-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: border-color .15s, transform .15s, box-shadow .15s; }
.featured-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px var(--shadow-accent); }
.featured-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--surface2); aspect-ratio: 3/2; overflow: hidden; }
.featured-preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.featured-card:hover .featured-preview img { transform: scale(1.04); }
.featured-preview-empty { background: var(--surface3); }
.featured-info { padding: .85rem 1rem .9rem; flex: 1; display: flex; flex-direction: column; gap: .2rem; }
.featured-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.featured-stats { font-size: .78rem; color: var(--muted); }
.featured-link { font-size: .8rem; color: var(--accent); margin-top: auto; padding-top: .5rem; }

.share-cards-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 3px; margin-top: .75rem; }
.share-cards-gallery .col-card-thumb { border-radius: 5px; }
.share-cards-gallery .col-card-meta { display: none; }
.share-cards-gallery .col-qty-badge { font-size: .6rem; min-width: 16px; height: 16px; }
.share-set-details { margin-bottom: 1.25rem; }
.share-set-details > .col-cards-grid { padding-bottom: .5rem; }
.share-set-summary { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; cursor: pointer; list-style: none; border-bottom: 1px solid var(--border); }
.share-set-summary::-webkit-details-marker { display: none; }
.share-set-summary::before { content: '▸'; color: var(--muted); font-size: .7rem; flex-shrink: 0; transition: transform .15s; }
details[open] > .share-set-summary::before { transform: rotate(90deg); }

/* ── Blur mode ─────────────────────────────────────────────────────────────── */
[data-blur="on"] .card-thumb img,
[data-blur="on"] .col-card-thumb img {
    filter: blur(10px);
    transition: filter 0.2s;
}
[data-blur="on"] .card-image img {
    filter: blur(16px);
    transition: filter 0.2s;
    cursor: zoom-in;
}
[data-blur="on"] .card-image img:hover {
    filter: blur(0);
}

/* ── Blur toggle button ─────────────────────────────────────────────────────── */
.blur-toggle {
    background: var(--accent);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    transition: opacity 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.blur-toggle:hover { opacity: 0.8; }
[data-blur="off"] .blur-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
}
[data-blur="off"] .blur-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

/* ── Enrichment data block (character & set pages) ── */
.enrich-block { margin: .75rem 0 .5rem; }
.enrich-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .35rem;
}
.enrich-item {
    display: inline-flex;
    flex-direction: column;
    background: var(--surface2);
    border-radius: 6px;
    padding: .3rem .55rem;
    min-width: 0;
}
.enrich-label {
    font-size: .62rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.3;
}
.enrich-val {
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

/* ── Hero tagline & primary CTA ─────────────────────────────────────────── */
.hero-tagline { color: var(--muted); font-size: 1.05rem; margin-bottom: 0.5rem; line-height: 1.6; }
.hero-tagline strong { color: var(--text); font-weight: 700; }
.btn-hero-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .15s;
    letter-spacing: 0.01em;
}
.btn-hero-primary:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── Features strip ─────────────────────────────────────────────────────── */
.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2.5rem 0 0;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.home-feature { text-align: center; padding: 0.5rem; }
.home-feature-icon {
    width: 44px; height: 44px;
    background: var(--surface2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--accent);
    transition: background .15s;
}
.home-features:hover .home-feature-icon { background: var(--surface2); }
.home-feature h3 { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.35rem; }
.home-feature p { font-size: 0.78rem; color: var(--muted); margin: 0; line-height: 1.5; }
@media (max-width: 560px) {
    .home-features { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; }
    .home-feature { display: flex; align-items: flex-start; gap: 0.85rem; text-align: left; }
    .home-feature-icon { flex-shrink: 0; margin: 0; }
}

/* ── Series grid with card previews ─────────────────────────────────────── */
.series-preview {
    display: flex;
    height: 110px;
    overflow: hidden;
    background: var(--surface2);
    gap: 2px;
}
.series-preview img {
    flex: 1;
    object-fit: cover;
    object-position: top center;
    min-width: 0;
    transition: transform 0.35s ease;
    display: block;
}
.series-card:hover .series-preview img { transform: scale(1.06); }
.series-info { padding: 0.7rem 1rem; }

/* ── Series grid — hide image previews, text-only cards ─────────────────── */
.series-preview { display: none; }
.series-card .series-info { padding: 1rem 1.1rem; }

/* ── Card slider (marquee) — consolidated ───────────────────────────────── */
html, body { overflow-x: hidden; }

.card-slider {
    position: relative;
    height: 220px;
    overflow: hidden;
    margin: 2rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.slider-track {
    position: absolute;
    left: 0; top: 0;
    display: flex;
    gap: 0.65rem;
    flex-wrap: nowrap;
    width: max-content;
    animation: wc-marquee 36s linear infinite;
}
.slider-track:hover { animation-play-state: paused; }
.slider-item {
    display: block;
    flex-shrink: 0;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
}
.slider-card {
    display: block;
    width: 140px;
    height: 200px;
    object-fit: cover;
    object-position: center top;
}
@keyframes wc-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .slider-track { animation: none; }
    .card-slider { overflow-x: auto; }
}

/* ── Hero CTAs ──────────────────────────────────────────────────────────── */
.hero-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0 0;
}
.btn-primary {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.15s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; }
.btn-secondary {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.btn-secondary:hover { background: var(--surface2); }

/* ── Footer redesign ────────────────────────────────────────────────────── */
footer.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 0;
    text-align: left;
    font-size: inherit;
    color: inherit;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}
.footer-brand .footer-logo {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.6rem;
}
.footer-brand p { font-size: 0.82rem; color: var(--muted); margin: 0; line-height: 1.6; }
.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 0.75rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col ul li a { font-size: 0.85rem; color: var(--text); text-decoration: none; opacity: 0.75; transition: opacity 0.15s; }
.footer-col ul li a:hover { opacity: 1; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}
.footer-bottom p { font-size: 0.75rem; color: var(--muted); margin: 0; }
@media (max-width: 640px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 1.25rem 1.5rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { padding: 1rem 1.25rem; }
}

/* ── GDPR cookie banner (2-button) ──────────────────────────────────────── */
#cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    z-index: 9000;
    box-shadow: 0 -4px 24px rgba(0,0,0,.15);
    flex-wrap: wrap;
}
.cb-text { flex: 1; min-width: 200px; }
.cb-text strong { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
.cb-text p { font-size: 0.78rem; color: var(--muted); margin: 0; line-height: 1.5; }
.cb-text a { color: var(--accent); }
.cb-btns { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.cb-necessary {
    padding: 0.4rem 0.9rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text);
}
.cb-accept {
    padding: 0.4rem 0.9rem;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
}

/* ── CLS fix — auth container ───────────────────────────────────────────── */
.auth-container { min-width: 72px; display: flex; justify-content: flex-end; align-items: center; }
.hero-sub { font-size: 0.82rem; color: var(--muted); margin-top: 1rem; letter-spacing: 0.01em; }
