/* ═══════════════════════════════════════════════════════
   OPCG Card Database — ANI-BOX Dark Theme v2
   ═══════════════════════════════════════════════════════ */

:root {
    --ab-bg:       #0b0e1a;
    --ab-s:        #141926;
    --ab-s2:       #1c2235;
    --ab-s3:       #232b40;
    --ab-b:        #252d42;
    --ab-b2:       #1e2740;
    --ab-ac:       #7c3aed;
    --ab-acG:      rgba(124,58,237,.3);
    --ab-ac2:      #a78bfa;
    --ab-tx:       #e2e8f0;
    --ab-tm:       #8892a4;
    --ab-td:       #4a5568;
    --ab-rd:       #ef4444;
    --ab-gn:       #22c55e;
    --ab-bl:       #3b82f6;
    --ab-yw:       #eab308;
    --ab-pu:       #a855f7;
    --ab-t:        .15s ease;
    --ab-r:        10px;
}

/* ── Filter bar ─────────────────────────────────────────── */
.opcg-filters {
    background: var(--ab-s);
    border: 1px solid var(--ab-b);
    border-radius: var(--ab-r);
    padding: 20px 22px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.opcg-filter-top {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ab-b);
}

/* ── Search wrap — mirrors Series selector exactly ── */
.opcg-search-wrap { position: relative; width: 100%; }

/* Trigger button */
.opcg-search-trigger {
    width: 100%; height: 38px;
    border: 1px solid var(--ab-b);
    border-radius: 8px;
    background: var(--ab-s2);
    padding: 0 13px;
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--ab-tm);
    cursor: pointer; text-align: left;
    transition: border-color var(--ab-t), background var(--ab-t), color var(--ab-t);
}
.opcg-search-trigger:hover,
.opcg-search-trigger.open {
    border-color: rgba(124,58,237,.35);
    background: var(--ab-s3);
    color: var(--ab-tx);
}
.opcg-search-trigger.open {
    border-color: var(--ab-ac);
    box-shadow: 0 0 0 2px var(--ab-acG);
}
.opcg-search-trigger:hover svg,
.opcg-search-trigger.open svg { stroke: var(--ab-ac2); }
#opcg-search-placeholder {
    flex: 1; font-weight: 400; color: var(--ab-td);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Chip state (has typed value) */
.opcg-search-chip {
    display: none; width: 100%; height: 38px;
    border-radius: 8px; background: var(--ab-ac);
    padding: 0 0 0 13px; align-items: center; gap: 8px;
    box-shadow: 0 0 0 1px rgba(124,58,237,.5);
    overflow: hidden; cursor: pointer;
}
.opcg-search-wrap[data-selected="1"] .opcg-search-trigger { display: none; }
.opcg-search-wrap[data-selected="1"] .opcg-search-chip   { display: flex; }
.opcg-search-chip-label {
    flex: 1; font-size: 13px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Dropdown panel */
.opcg-search-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--ab-s2);
    border: 1px solid var(--ab-ac);
    border-radius: 10px; z-index: 1000;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    overflow: hidden;
    animation: opcgDropIn .15s ease;
}
.opcg-search-input-wrap {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ab-b);
}
.opcg-search-input-wrap svg { flex-shrink: 0; pointer-events: none; transition: stroke var(--ab-t); }
.opcg-search-input-wrap:focus-within svg { stroke: var(--ab-ac2); }
.opcg-search-input-wrap input {
    flex: 1; border: none; outline: none;
    background: transparent;
    font-size: 13px; font-weight: 600;
    color: var(--ab-tx); padding: 0; min-width: 0;
}
.opcg-search-input-wrap input::placeholder { color: var(--ab-td); font-weight: 400; }

/* Series trigger — same height */
.opcg-series-trigger { height: 38px; padding: 0 13px; }

/* Filter rows */
.opcg-filter-row {
    display: flex;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--ab-b2);
}
.opcg-filter-row:last-of-type { border-bottom: none; padding-bottom: 0; }

.opcg-row-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ab-td);
    white-space: nowrap;
    min-width: 80px;
    padding-right: 16px;
    border-right: 1px solid var(--ab-b2);
    flex-shrink: 0;
}

.opcg-row-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-left: 16px;
    flex: 1;
}

/* Pills */
.opcg-pill {
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: var(--ab-s3);
    color: var(--ab-tm);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: all var(--ab-t);
    user-select: none;
}
.opcg-pill:hover { color: var(--ab-tx); }
.opcg-pill.active { background: var(--ab-ac); color: #fff; box-shadow: 0 0 0 1px rgba(124,58,237,.5); }

.opcg-pill.opcg-type-leader.active    { background: var(--ab-rd); box-shadow: 0 0 0 1px rgba(239,68,68,.4); }
.opcg-pill.opcg-type-character.active { background: var(--ab-bl); box-shadow: 0 0 0 1px rgba(59,130,246,.4); }
.opcg-pill.opcg-type-event.active     { background: var(--ab-pu); box-shadow: 0 0 0 1px rgba(168,85,247,.4); }
.opcg-pill.opcg-type-stage.active     { background: var(--ab-gn); box-shadow: 0 0 0 1px rgba(34,197,94,.4); }
.opcg-pill.opcg-block.active          { background: var(--ab-ac); }

.opcg-color-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color, #555);
    display: inline-block;
    flex-shrink: 0;
}
.opcg-block-icon-img {
    width: 12px;
    height: 12px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}
.opcg-color-dot-sm {
    width: 7px; height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 3px;
}
.opcg-card-color {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.opcg-tag-color {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

/* Bottom row */
.opcg-filter-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.opcg-chk-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ab-tm);
    cursor: pointer;
    user-select: none;
}
.opcg-chk-label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--ab-ac);
    cursor: pointer;
}
.opcg-filter-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.opcg-result-count {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    background: rgba(245,158,11,.12);
    border: 1px solid rgba(245,158,11,.3);
    border-radius: 8px;
    padding: 4px 12px;
}
.opcg-btn-reset {
    border: 1px solid var(--ab-b);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--ab-tm);
    transition: all var(--ab-t);
}
.opcg-btn-reset:hover { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #f87171; }
.opcg-btn-search {
    background: var(--ab-ac);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: .02em;
    box-shadow: 0 2px 12px var(--ab-acG);
    transition: background var(--ab-t);
}
 to{transform:scale(1) translateY(0);opacity:1} }
.opcg-btn-search:hover { background: #6d28d9; }

/* ── Cards wrap ─────────────────────────────────────────── */
.opcg-cards-wrap { position: relative; }

.opcg-cards-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(var(--cols, 5), 1fr);
}
.opcg-cols-2 { --cols: 2; }
.opcg-cols-3 { --cols: 3; }
.opcg-cols-4 { --cols: 4; }
.opcg-cols-5 { --cols: 5; }
.opcg-cols-6 { --cols: 6; }

/* ── Single card ────────────────────────────────────────── */
.opcg-card {
    background: var(--ab-s);
    border-radius: var(--ab-r);
    border: 1px solid var(--ab-b);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--ab-t), box-shadow var(--ab-t), border-color var(--ab-t);
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.opcg-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0,0,0,.5), 0 0 0 1px var(--ab-ac);
    border-color: var(--ab-ac);
    z-index: 2;
}
.opcg-card:focus-visible { outline: 2px solid var(--ab-ac2); outline-offset: 2px; }

.opcg-color-แดง    { border-top: 3px solid var(--ab-rd); }
.opcg-color-เขียว  { border-top: 3px solid var(--ab-gn); }
.opcg-color-ฟ้า    { border-top: 3px solid var(--ab-bl); }
.opcg-color-ม่วง   { border-top: 3px solid var(--ab-pu); }
.opcg-color-ดำ     { border-top: 3px solid #475569; }
.opcg-color-เหลือง { border-top: 3px solid var(--ab-yw); }

.opcg-card-image-wrap {
    aspect-ratio: 5 / 7;
    overflow: hidden;
    position: relative;
    background: var(--ab-s2);
    flex-shrink: 0;
}
.opcg-card-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.opcg-card:hover .opcg-card-image-wrap img { transform: scale(1.06); }
.opcg-card-no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: var(--ab-td);
}
.opcg-card-rarity {
    position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    background: rgba(11,14,26,.75);
    backdrop-filter: blur(4px);
    color: var(--ab-ac2);
    border: 1px solid var(--ab-ac);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 9px; font-weight: 800;
}
.opcg-card-leader-badge {
    position: absolute; top: 6px; left: 6px;
    background: var(--ab-rd); color: #fff;
    border-radius: 4px; padding: 2px 7px;
    font-size: 9px; font-weight: 800; text-transform: uppercase;
}
.opcg-card-info {
    padding: 8px 9px 9px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.opcg-card-name {
    font-weight: 700; font-size: 12px;
    color: var(--ab-tx); line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.opcg-card-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px; color: var(--ab-tm);
}
.opcg-card-id { font-family: monospace; font-size: 9px; color: var(--ab-td); }
.opcg-card-stats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 1px; }
.opcg-card-stats span {
    font-size: 9px; font-weight: 700;
    border-radius: 3px; padding: 1px 5px;
    display: inline-flex; align-items: center; gap: 2px;
}
.opcg-stat-power   { background: rgba(22,163,74,.18);  color: #4ade80; border: 1px solid rgba(22,163,74,.3); }
.opcg-stat-counter { background: rgba(29,78,216,.2);   color: #60a5fa; border: 1px solid rgba(29,78,216,.3); }
.opcg-stat-cost    { background: rgba(190,18,60,.18);  color: #f87171; border: 1px solid rgba(190,18,60,.3); }
.opcg-stat-life    { background: rgba(220,38,38,.18);  color: #f87171; border: 1px solid rgba(220,38,38,.3); }

/* ── Loading / empty ────────────────────────────────────── */
.opcg-loading {
    text-align: center;
    padding: 48px;
    font-size: 14px;
    color: var(--ab-tm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.opcg-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(245,158,11,.2);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: opcg-spin .7s linear infinite;
}
.opcg-load-more-indicator {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--ab-tm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.opcg-load-more-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245,158,11,.25);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: opcg-spin .7s linear infinite;
    flex-shrink: 0;
}
.opcg-no-results { grid-column: 1/-1; text-align: center; padding: 48px; color: var(--ab-td); font-size: 15px; }

/* ── Pagination ─────────────────────────────────────────── */
.opcg-pagination { margin-top: 24px; display: flex; justify-content: center; }
.opcg-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.opcg-page-btn {
    width: 36px; height: 36px;
    border-radius: 6px;
    border: 1px solid var(--ab-b);
    background: var(--ab-s2);
    color: var(--ab-tm);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all var(--ab-t);
}
.opcg-page-btn:hover  { border-color: var(--ab-ac); color: var(--ab-ac2); background: rgba(124,58,237,.12); }
.opcg-page-btn.active { background: var(--ab-ac); color: #fff; border-color: var(--ab-ac); box-shadow: 0 2px 10px var(--ab-acG); }

/* ── Modal ──────────────────────────────────────────────── */
.opcg-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(5,7,14,.88);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: opcgFadeIn .15s ease;
}
@keyframes opcgFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes opcg-spin { to { transform: rotate(360deg); } }
.opcg-modal-content {
    background: var(--ab-s);
    border: 1px solid var(--ab-b);
    border-radius: 14px;
    max-width: 820px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(124,58,237,.2);
    animation: opcgSlideUp .2s ease;
}
@keyframes opcgSlideUp { from { transform: translateY(24px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.opcg-modal-content::-webkit-scrollbar { width: 5px; }
.opcg-modal-content::-webkit-scrollbar-track { background: var(--ab-s2); }
.opcg-modal-content::-webkit-scrollbar-thumb { background: var(--ab-b); border-radius: 3px; }
.opcg-modal-close {
    position: sticky; top: 12px; float: right;
    margin: 12px 12px 0 0;
    background: var(--ab-s3); border: 1px solid var(--ab-b);
    border-radius: 50%; width: 32px; height: 32px;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--ab-tm); transition: all var(--ab-t); z-index: 1;
}
.opcg-modal-close:hover { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.4); color: #f87171; }
.opcg-modal-body { padding: 20px 24px 24px; clear: both; }
.opcg-modal-inner { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.opcg-modal-img img { width: 100%; border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,.6); display: block; }
.opcg-modal-no-img {
    width: 100%; aspect-ratio: 5/7; background: var(--ab-s2);
    border-radius: 10px; border: 1px solid var(--ab-b);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--ab-td);
}
.opcg-modal-details { display: flex; flex-direction: column; gap: 10px; }
.opcg-modal-title { font-size: 20px; font-weight: 800; color: var(--ab-tx); margin: 0; line-height: 1.25; }
.opcg-modal-id { font-family: monospace; font-size: 12px; color: var(--ab-ac2); letter-spacing: .04em; }
.opcg-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.opcg-modal-tag {
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    background: var(--ab-s3); color: var(--ab-tm); border: 1px solid var(--ab-b);
}
.opcg-tag-leader    { background: rgba(239,68,68,.15);  color: #f87171;  border-color: rgba(239,68,68,.3); }
.opcg-tag-character { background: rgba(59,130,246,.15); color: #60a5fa;  border-color: rgba(59,130,246,.3); }
.opcg-tag-event     { background: rgba(168,85,247,.15); color: #c084fc;  border-color: rgba(168,85,247,.3); }
.opcg-tag-stage     { background: rgba(34,197,94,.15);  color: #4ade80;  border-color: rgba(34,197,94,.3); }
.opcg-tag-rarity    { background: rgba(234,179,8,.12);  color: #facc15;  border-color: rgba(234,179,8,.25); }
.opcg-modal-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.opcg-modal-stat { background: var(--ab-s2); border: 1px solid var(--ab-b2); border-radius: 8px; padding: 9px 12px; }
.opcg-modal-stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--ab-td); font-weight: 700; margin-bottom: 3px; }
.opcg-modal-stat-value { font-size: 15px; font-weight: 800; color: var(--ab-tx); }
.opcg-modal-ability { background: var(--ab-s2); border: 1px solid var(--ab-b2); border-radius: 8px; padding: 11px 13px; }
.opcg-modal-ability-label { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--ab-td); font-weight: 700; margin-bottom: 6px; }
.opcg-modal-ability-text { font-size: 12px; line-height: 1.75; color: #cbd5e1; white-space: pre-wrap; }
.opcg-modal-trigger { background: rgba(234,179,8,.06); border: 1px solid rgba(234,179,8,.2); border-left: 3px solid #eab308; border-radius: 8px; padding: 11px 13px; }
.opcg-modal-series { font-size: 11px; color: var(--ab-td); padding-top: 6px; border-top: 1px solid var(--ab-b2); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1200px) { .opcg-cards-grid { --cols: 4; } }
@media (max-width: 960px)  { .opcg-cards-grid { --cols: 3; } }
@media (max-width: 768px) {
    .opcg-cards-grid { --cols: 2; }
    .opcg-filter-top { grid-template-columns: 1fr; }
    .opcg-filter-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .opcg-row-label { border-right: none; padding-right: 0; border-bottom: 1px solid var(--ab-b2); padding-bottom: 6px; width: 100%; }
    .opcg-row-pills { padding-left: 0; }
    .opcg-filter-bottom { flex-direction: column; align-items: flex-start; }
    .opcg-modal-inner { grid-template-columns: 1fr; }
    .opcg-modal-img { max-width: 240px; margin: 0 auto; }
}
@media (max-width: 480px) { .opcg-cards-grid { --cols: 2; } }

/* ── Series chip selector ───────────────────────────────────── */
.opcg-series-wrap {
    position: relative;
    flex: 1;
}

/* Trigger button (inactive state) */
.opcg-series-trigger {
    width: 100%;
    border: 1px solid var(--ab-b);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ab-tm);
    background: var(--ab-s2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color var(--ab-t), color var(--ab-t);
    text-align: left;
}
.opcg-series-trigger:hover,
.opcg-series-trigger.open {
    border-color: var(--ab-ac);
    color: var(--ab-tx);
}

/* Selected chip */
.opcg-series-chip {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--ab-ac);
    border-radius: 8px;
    padding: 0 0 0 14px;
    width: 100%;
    min-height: 40px;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(124,58,237,.5);
    overflow: hidden;
}
.opcg-chip-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 10px 0;
}
.opcg-chip-remove {
    flex-shrink: 0;
    background: rgba(0,0,0,.25);
    border: none;
    border-left: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.85);
    cursor: pointer;
    padding: 0 14px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ab-t);
}
.opcg-chip-remove:hover { background: rgba(220,38,38,.5); color: #fff; }

/* Dropdown panel */
.opcg-series-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--ab-s2);
    border: 1px solid var(--ab-ac);
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    overflow: hidden;
    animation: opcgDropIn .15s ease;
}
@keyframes opcgDropIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: translateY(0) } }

.opcg-series-search-wrap {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ab-b);
}
.opcg-series-search-wrap input {
    width: 100%;
    border: 1px solid var(--ab-b);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ab-tx);
    background: var(--ab-s2);
    transition: border-color var(--ab-t), box-shadow var(--ab-t);
}
.opcg-series-search-wrap input::placeholder { color: var(--ab-td); font-weight: 400; }
.opcg-series-search-wrap input:focus {
    border-color: var(--ab-ac);
    outline: none;
    box-shadow: 0 0 0 2px var(--ab-acG);
}

.opcg-series-list {
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--ab-b) transparent;
}
.opcg-series-list::-webkit-scrollbar { width: 4px; }
.opcg-series-list::-webkit-scrollbar-thumb { background: var(--ab-b); border-radius: 2px; }

.opcg-series-item {
    padding: 7px 16px;
    font-size: 12px;
    color: var(--ab-tm);
    cursor: pointer;
    transition: background var(--ab-t), color var(--ab-t);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}
.opcg-series-item-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,.04);
    flex-shrink: 0;
}
.opcg-series-item:hover { background: var(--ab-s3); color: var(--ab-tx); }
.opcg-series-item.active { background: rgba(124,58,237,.15); color: var(--ab-ac2); font-weight: 600; }
.opcg-series-item.hidden { display: none; }

/* ── Modal series section ───────────────────────────────────── */
.opcg-modal-series-wrap {
    border-top: 1px solid var(--ab-b2);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.opcg-modal-series-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.opcg-modal-series-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ab-td);
    white-space: nowrap;
    min-width: 58px;
    flex-shrink: 0;
}
.opcg-modal-series-code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--ab-ac2);
    background: rgba(124,58,237,.12);
    border: 1px solid rgba(124,58,237,.25);
    border-radius: 5px;
    padding: 1px 8px;
}
.opcg-modal-series-name {
    font-size: 11px;
    color: var(--ab-tm);
    line-height: 1.4;
}

/* ── Series selector state control (reliable show/hide) ─── */
/* default: trigger visible, chip hidden */
.opcg-series-wrap .opcg-series-trigger { display: flex; }
.opcg-series-wrap .opcg-series-chip    { display: none; }

/* when series is selected */
.opcg-series-wrap[data-selected="1"] .opcg-series-trigger { display: none !important; }
.opcg-series-wrap[data-selected="1"] .opcg-series-chip    { display: flex !important; }

/* ── Modal prev/next nav — floats on overlay, outside the box ── */
.opcg-modal-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    width: 48px; height: 90px;
    background: rgba(11,14,26,.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--ab-b);
    border-radius: 10px;
    color: var(--ab-tm);
    font-size: 36px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--ab-t), color var(--ab-t), border-color var(--ab-t), transform .15s;
    z-index: 10001;
    padding: 0;
    user-select: none;
}
.opcg-modal-prev { left: 16px; }
.opcg-modal-next { right: 16px; }
.opcg-modal-nav:hover {
    background: var(--ab-ac);
    border-color: var(--ab-ac);
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}
.opcg-modal-nav:active { transform: translateY(-50%) scale(.97); }

/* Counter badge: "3 / 17" */
.opcg-modal-counter {
    position: absolute;
    top: 14px; left: 50%;
    transform: translateX(-50%);
    background: rgba(17,21,38,.75);
    backdrop-filter: blur(6px);
    border: 1px solid var(--ab-b);
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 11px; font-weight: 700;
    color: var(--ab-tm);
    letter-spacing: .04em;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

/* Block icon badge in tags row */
.opcg-tag-block {
    background: rgba(99,102,241,.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,.3);
    font-size: 11px;
    display: inline-flex !important;
    align-items: center;
    gap: 3px;
    line-height: 1;
}

/* Mobile: full-width bottom nav bar */
@media (max-width: 780px) {
    .opcg-modal-nav {
        position: fixed;
        top: auto; bottom: 0;
        transform: none;
        width: 50%; height: 56px;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--ab-b);
        background: rgba(11,14,26,.95);
        font-size: 28px;
        backdrop-filter: blur(12px);
        z-index: 100002;
    }
    .opcg-modal-prev { left: 0; border-right: 1px solid var(--ab-b); }
    .opcg-modal-next { right: 0; }
    .opcg-modal-nav:hover,
    .opcg-modal-nav:active { transform: none; background: var(--ab-ac); border-color: var(--ab-ac); }

    /* Overlay: align to top, leave 56px at bottom for nav bar */
    .opcg-modal-overlay {
        align-items: flex-start;
        padding: 8px 0 0 0;
    }
    /* Content: full height minus nav bar, scroll freely */
    .opcg-modal-content {
        margin-bottom: 0;
        border-radius: 14px 14px 0 0;
        max-height: calc(100dvh - 56px);
        padding-bottom: 24px;
    }
    .opcg-modal-counter { top: 8px; font-size: 10px; padding: 2px 10px; }
}

/* ── Modal affiliation ───────────────────────────────────────── */
.opcg-modal-affil {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 10px;
    background: var(--ab-s2);
    border-radius: 6px;
    border-left: 3px solid var(--ab-ac);
    margin-bottom: 10px;
}
.opcg-modal-affil-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ab-ac2);
    white-space: nowrap;
    letter-spacing: .04em;
}
.opcg-modal-affil-label::after { content: ':'; margin-left: 1px; }
.opcg-modal-affil-value {
    font-size: 13px;
    color: var(--ab-tx);
    font-weight: 500;
    line-height: 1.4;
}

/* ── Attribute badge in card grid ───────────────────────────── */
.opcg-stat-attr {
    font-size: 9px; font-weight: 700;
    border-radius: 3px; padding: 1px 5px;
    display: inline-flex; align-items: center; gap: 3px;
    background: rgba(124,58,237,.15);
    color: var(--ab-ac2);
    border: 1px solid rgba(124,58,237,.25);
}
.opcg-stat-attr img {
    width: 11px; height: 11px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Modal stat value — allow flex for icon + text */
.opcg-modal-stat-value img {
    width: 18px; height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}
.opcg-modal-stat-value span { vertical-align: middle; }

/* ══════════════════════════════════════════════════════════════════════════
   NEW FEATURES: Rarity Pills, Card Actions, Float Buttons, Deck, Compare,
                 Recently Viewed, Series Overview, Infinite Scroll
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Rarity pill colors ─────────────────────────────────────────────────── */
.opcg-rarity-sp  { background: rgba(251,191,36,.15)!important; color:#fbbf24!important; border-color:rgba(251,191,36,.3)!important; }
.opcg-rarity-sec { background: rgba(239,68,68,.15)!important;  color:#ef4444!important; border-color:rgba(239,68,68,.3)!important;  }
.opcg-rarity-l   { background: rgba(168,85,247,.15)!important; color:#a855f7!important; border-color:rgba(168,85,247,.3)!important; }
.opcg-rarity-sr  { background: rgba(251,191,36,.1)!important;  color:#d4a800!important; border-color:rgba(251,191,36,.2)!important; }
.opcg-rarity-r   { background: rgba(59,130,246,.12)!important; color:#3b82f6!important; border-color:rgba(59,130,246,.2)!important; }
.opcg-rarity-p   { background: rgba(255,255,255,.06)!important;color:#94a3b8!important; border-color:rgba(255,255,255,.1)!important; }

/* ── Card action buttons ─────────────────────────────────────────────────── */
.opcg-card-actions {
    display: flex;
    gap: 4px;
    padding: 6px 8px 8px;
    z-index: 5;
}
.opcg-card-actions button {
    flex: 1;
    font-size: 12px;
    padding: 5px 4px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    background: rgba(255,255,255,.06);
    color: #94a3b8;
    cursor: pointer;
    transition: background .15s, color .15s, transform .1s;
}
.opcg-card-actions button:hover { background: rgba(255,255,255,.12); color: #e2e8f0; transform: scale(1.04); }
.opcg-btn-wishlist.active { color: #ef4444!important; background: rgba(239,68,68,.12)!important; }
.opcg-btn-deck.added { background: rgba(34,197,94,.2)!important; color: #4ade80!important; }
.opcg-btn-compare.active { background: rgba(99,102,241,.2)!important; color: #a5b4fc!important; }

/* ── Modal action bar ────────────────────────────────────────────────────── */
.opcg-modal-action-bar {
    display: flex;
    gap: 8px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}
.opcg-mab-btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s, color .15s, border-color .15s;
    text-align: center;
}
.opcg-mab-btn:hover { background: rgba(255,255,255,.1); color: #e2e8f0; }
.opcg-modal-wl.active { background: rgba(239,68,68,.15)!important; color: #ef4444!important; border-color: rgba(239,68,68,.3)!important; }
.opcg-modal-deck-btn:hover { background: rgba(139,92,246,.2)!important; color: #a78bfa!important; border-color: rgba(139,92,246,.3)!important; }
.opcg-modal-cmp-btn.active { background: rgba(99,102,241,.2)!important; color: #a5b4fc!important; border-color: rgba(99,102,241,.3)!important; }

/* ── Floating buttons ─────────────────────────────────────────────────────── */
.opcg-float-buttons {
    position: fixed;
    bottom: 24px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9000;
}
.opcg-float-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.12);
    background: var(--ab-s2, #1e2330);
    color: var(--ab-tm, #94a3b8);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    transition: background .15s, transform .15s, color .15s;
    white-space: nowrap;
}
.opcg-float-btn:hover { background: var(--ab-s3,#252c3d); transform: translateY(-2px); color: #fff; }
.opcg-float-btn.active, .opcg-float-btn.has-items { background: rgba(139,92,246,.2); color: #a78bfa; border-color: rgba(139,92,246,.4); }
.opcg-float-wishlist.active, .opcg-float-wishlist.has-items { background: rgba(239,68,68,.15); color: #ef4444; border-color: rgba(239,68,68,.3); }

/* ── Deck panel ──────────────────────────────────────────────────────────── */
.opcg-deck-panel {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: 340px;
    max-width: 95vw;
    background: var(--ab-s1, #151a24);
    border-left: 1px solid rgba(255,255,255,.08);
    z-index: 9001;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0,0,0,.5);
}
.opcg-deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-weight: 700;
    font-size: 15px;
    color: #e2e8f0;
}
.opcg-deck-close { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 18px; padding: 0; }
.opcg-deck-list { flex: 1; overflow-y: auto; padding: 12px 16px; }
.opcg-deck-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.opcg-deck-thumb { width: 36px; height: 50px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.opcg-deck-thumb-empty { width: 36px; height: 50px; background: rgba(255,255,255,.05); border-radius: 4px; flex-shrink: 0; }
.opcg-deck-name { flex: 1; font-size: 12px; color: #cbd5e1; line-height: 1.4; }
.opcg-deck-name small { color: #64748b; display: block; }
.opcg-deck-qty { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.opcg-deck-qty button { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff; border-radius: 4px; width: 24px; height: 24px; cursor: pointer; font-size: 13px; }
.opcg-deck-qty span { width: 24px; text-align: center; font-size: 14px; font-weight: 700; color: #e2e8f0; }
.opcg-deck-remove { background: rgba(239,68,68,.1)!important; border-color: rgba(239,68,68,.2)!important; font-size: 11px!important; }
.opcg-deck-empty { text-align: center; color: #64748b; padding: 40px 20px; font-size: 13px; line-height: 1.8; }
.opcg-deck-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
}
#opcg-deck-total { flex: 1; font-weight: 700; color: #a78bfa; }
.opcg-deck-export, .opcg-deck-clear {
    padding: 7px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06); color: #cbd5e1; cursor: pointer; font-size: 12px; font-weight: 600;
}
.opcg-deck-export:hover { background: rgba(139,92,246,.2); color: #a78bfa; }
.opcg-deck-clear:hover { background: rgba(239,68,68,.15); color: #ef4444; }

/* ── Compare modal ───────────────────────────────────────────────────────── */
.opcg-compare-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.opcg-compare-content {
    background: var(--ab-s1, #151a24);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}
.opcg-compare-title { font-size: 18px; font-weight: 700; color: #e2e8f0; margin-bottom: 20px; }
#opcg-compare-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 18px; }
.opcg-cmp-cards { display: flex; gap: 16px; margin-bottom: 20px; justify-content: center; flex-wrap: wrap; }
.opcg-cmp-card { text-align: center; min-width: 120px; }
.opcg-cmp-card img { width: 100px; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.opcg-cmp-card-name { font-size: 12px; font-weight: 600; color: #e2e8f0; }
.opcg-cmp-card-id { font-size: 10px; color: #64748b; font-family: monospace; }
.opcg-cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.opcg-cmp-table th { text-align: left; padding: 8px 12px; background: rgba(255,255,255,.04); color: #94a3b8; font-weight: 600; width: 100px; }
.opcg-cmp-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.04); color: #cbd5e1; text-align: center; }
.opcg-cmp-best { color: #4ade80!important; font-weight: 700; }

/* ── Recently viewed ─────────────────────────────────────────────────────── */
.opcg-recently-wrap {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,.07);
}
.opcg-recently-header {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.opcg-recently-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.opcg-recent-item {
    flex-shrink: 0;
    width: 70px;
    cursor: pointer;
    transition: transform .15s;
}
.opcg-recent-item:hover { transform: translateY(-3px); }
.opcg-recent-item img { width: 70px; height: 98px; object-fit: cover; border-radius: 6px; display: block; }
.opcg-recent-no-img { width: 70px; height: 98px; background: rgba(255,255,255,.06); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #64748b; }
.opcg-recent-name { font-size: 9px; color: #64748b; margin-top: 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Series overview shortcode ───────────────────────────────────────────── */
.opcg-series-overview {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, 1fr);
}
.opcg-so-cols-3 { grid-template-columns: repeat(3, 1fr); }
.opcg-so-cols-5 { grid-template-columns: repeat(5, 1fr); }
.opcg-so-cols-6 { grid-template-columns: repeat(6, 1fr); }
.opcg-so-card {
    display: block;
    background: var(--ab-s2, #1e2330);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.opcg-so-card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.4); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.opcg-so-img-wrap { aspect-ratio: 1/1; overflow: hidden; background: rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; padding: 12px; }
.opcg-so-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.opcg-so-no-img { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.04); font-size: 14px; font-weight: 700; color: #475569; letter-spacing: .05em; }
.opcg-so-info { padding: 10px 12px 12px; }
.opcg-so-name { font-size: 11px; color: #e2e8f0; line-height: 1.4; margin-bottom: 4px; }
.opcg-so-count { font-size: 10px; color: #64748b; }

/* ── Infinite scroll sentinel ────────────────────────────────────────────── */
.opcg-scroll-sentinel { height: 1px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .opcg-float-buttons { bottom: 70px; right: 12px; }
    .opcg-float-btn { padding: 8px 12px; font-size: 12px; }
    .opcg-deck-panel { width: 100vw; }
    .opcg-series-overview { grid-template-columns: repeat(2, 1fr)!important; }
    .opcg-compare-content { padding: 16px; }
}

/* ── Cardmarket price block ──────────────────────────────────────────────── */
.opcg-modal-price-wrap {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
}
.opcg-price-header {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}
.opcg-price-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.opcg-price-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 70px;
}
.opcg-price-label {
    font-size: 10px;
    color: #64748b;
}
.opcg-price-val {
    font-size: 16px;
    font-weight: 700;
}
.opcg-price-val.sell  { color: #4ade80; }
.opcg-price-val.trend { color: #a78bfa; }
.opcg-price-val.avg   { color: #94a3b8; font-size: 14px; }
.opcg-price-loading {
    color: #64748b;
    font-size: 12px;
    text-align: center;
    padding: 8px 0;
}
.opcg-price-not-found {
    color: #475569;
    font-size: 11px;
    text-align: center;
    padding: 4px 0;
}
.opcg-cm-link {
    display: inline-block;
    font-size: 11px;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 5px;
    padding: 4px 10px;
    transition: background .15s;
}
.opcg-cm-link:hover { background: rgba(124,58,237,.15); color: #a78bfa; }

/* ── Price badge ─────────────────────────────────────────────────────────── */
.opcg-stat-price {
    background: rgba(250,204,21,.12);
    color: #facc15;
    border: 1px solid rgba(250,204,21,.25);
    font-size: 9px; font-weight: 700;
    border-radius: 3px; padding: 1px 5px;
    display: inline-flex; align-items: center; gap: 2px;
}

/* ── Modal price section ─────────────────────────────────────────────────── */
.opcg-modal-price-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(250,204,21,.06);
    border: 1px solid rgba(250,204,21,.15);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 12px;
}
.opcg-modal-price-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}
.opcg-modal-price-val {
    font-size: 22px;
    font-weight: 800;
    color: #facc15;
    letter-spacing: -.02em;
}
.opcg-modal-price-src {
    font-size: 11px;
    color: #7c3aed;
    text-decoration: none;
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 4px;
    padding: 3px 8px;
}
.opcg-modal-price-src:hover { background: rgba(124,58,237,.15); }
.opcg-modal-price-date {
    font-size: 10px;
    color: #475569;
    margin-left: auto;
}

/* ── Price rows (NM / PSA10) ─────────────────────────────────────────────── */
.opcg-price-row { display:flex; align-items:center; gap:8px; }
.opcg-price-tag {
    font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px;
    background:rgba(255,255,255,.08); color:#94a3b8; flex-shrink:0;
    border:1px solid rgba(255,255,255,.1);
}
.opcg-psa10-tag { background:rgba(250,204,21,.12); color:#facc15; border-color:rgba(250,204,21,.25); }
.opcg-psa10-val { color:#fbbf24!important; font-size:18px!important; }
.opcg-parallel-tag { background:rgba(167,139,250,.15); color:#a78bfa; border-color:rgba(167,139,250,.3); }
.opcg-parallel-val { color:#c4b5fd!important; }
.opcg-price-source { font-size:10px; color:#475569; font-weight:400; }
.opcg-price-note { font-size:10px; color:#64748b; margin-left:4px; }

/* ── Price badge overlay on card image ────────────────────────────────────── */
.opcg-card-image-wrap { position: relative; }

.opcg-card-price-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,.72);
    color: #facc15;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(250,204,21,.3);
    letter-spacing: .01em;
    pointer-events: none;
    z-index: 2;
}

.opcg-price-badge-label {
    font-size: 9px;
    font-weight: 400;
    color: rgba(250,204,21,.7);
    letter-spacing: .02em;
}

/* ── ANIBOX buy button ─────────────────────────────────────────────────────── */
.opcg-modal-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    letter-spacing: .02em;
}
.opcg-modal-buy-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
    color: #0f172a;
    text-decoration: none;
}

/* ── My Collection panel ─────────────────────────────────────────────────── */
.opcg-col-panel {
    margin-top: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 14px;
}
.opcg-col-panel-inner { font-size: 12px; }
.opcg-col-panel input[type="number"] {
    -moz-appearance: textfield;
}
.opcg-col-panel input[type="number"]::-webkit-outer-spin-button,
.opcg-col-panel input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* ── Collection indicator ─────────────────────────────────────────────────── */
.opcg-card-col-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    line-height: 1;
    z-index: 3;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
    cursor: default;
}

/* ── Goto Builder Button ─────────────────────────────────────────────────── */
.opcg-deck-goto-builder {
    display: block; width: 100%; margin-top: 8px;
    padding: 11px 16px; border-radius: 10px;
    background: #f59e0b; color: #000;
    border: none; font-size: 13px; font-weight: 700;
    cursor: pointer; text-align: center;
    transition: background .15s, transform .1s;
    box-shadow: 0 2px 10px rgba(245,158,11,.35);
}
.opcg-deck-goto-builder:hover { background: #f6a821; transform: translateY(-1px); }
.opcg-deck-goto-builder:active { transform: translateY(0); }

/* ── Login button in card modal ──────────────────────────────────────────── */
.opcg-mab-login {
    display: inline-flex !important; align-items: center; gap: 6px;
    background: #f59e0b !important; color: #000 !important;
    font-weight: 700 !important; border-radius: 8px !important;
    padding: 8px 18px !important; text-decoration: none !important;
    font-size: 13px !important; transition: background .15s !important;
    box-shadow: 0 2px 10px rgba(245,158,11,.3) !important;
    border: none !important;
}
.opcg-mab-login:hover { background: #f6a821 !important; color: #000 !important; }

/* ── Collection qty +/- ──────────────────────────────────────────────────── */
.opcg-col-qty-wrap {
    display: flex; align-items: center;
    background: #0f172a; border: 1px solid #334155; border-radius: 50px;
    overflow: hidden; height: 48px;
}
.opcg-col-qty-wrap .opcg-col-qty {
    flex: 1; border: none !important; border-radius: 0 !important;
    background: transparent !important; text-align: center;
    font-size: 18px !important; font-weight: 700 !important;
    color: #f1f5f9 !important; padding: 0 !important; height: 100% !important;
}
.opcg-col-qty-btn {
    width: 48px; height: 48px; flex-shrink: 0;
    background: #1e293b; border: none; color: #f1f5f9;
    font-size: 20px; font-weight: 300; cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; margin: 2px;
}
.opcg-col-qty-btn:hover { background: #334155; }
.opcg-col-qty-btn:active { background: #f59e0b; color: #000; }

/* ── Price input match qty height ────────────────────────────────────────── */
.opcg-col-price-styled {
    height: 48px !important; border-radius: 50px !important;
    background: #0f172a !important; border: 1px solid #334155 !important;
    color: #f1f5f9 !important; padding: 0 20px !important;
    font-size: 18px !important; font-weight: 700 !important;
    width: 100% !important; box-sizing: border-box !important;
    text-align: center !important;
}
.opcg-col-price-styled:focus { border-color: #f59e0b !important; outline: none !important; }
