:root {
    --bg-dark: #121212;
    --bg-card: #1E1E1E;
    --bg-header: #1E1E1E;
    --purple-accent: #8A2BE2;
    --gold: #FFD700;
    --text-light: #E0E0E0;
    --text-white: #FFFFFF;
    --gold-dark: #EFBF04;
    --bg-content: #1E1E1E;
    --link-color: #B0ABC7;
    --border-color: #333333;
    --text-muted: #999999;
    --success-color: #6bff8f;
    --error-color: #ff6b6b;
    --initial-header-height: 16px;
    --scrolled-header-height: 60px;

    --bg-surface: #2a2a2a;
    --font-display: "Cinzel", serif;
    --shadow-header: 0 4px 10px rgba(0, 0, 0, 0.5);
    --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-modal: 0 4px 20px rgba(0, 0, 0, 0.6);

    /* Printed-rarity-symbol colors - rare reuses --gold, they're the same color */
    --rarity-common: #a8a8a8;
    --rarity-uncommon: #9fc4d6;
    --rarity-mythic: #ff7a33;
}

/* --- Dark-themed scrollbars, site-wide --- */

html {
    scrollbar-color: var(--purple-accent) var(--bg-dark);
    scrollbar-width: thin;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--purple-accent);
    border-radius: 6px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--gold);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Georgia', serif;
    line-height: 1.6;
    margin: 0;
    padding-top: var(--initial-header-height);
    overflow-x: hidden;
}

#site-header {
    background-color: var(--bg-header);
    font-family: var(--font-display);
    position: fixed;
    top: 0;
    width: 100%;
    height: 128px;
    box-shadow: var(--shadow-header);
    transition: height 0.3s ease;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.site-logo {
    color: var(--gold);
    font-size: 2rem;
    font-weight: bold;
    transition: font-size 0.3s ease, text-shadow 0.3s ease;
    text-decoration: none;
    text-shadow: 0 0 0 rgba(255, 215, 0, 0);
}

.site-logo:hover {
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 15px;
    font-size: 1rem;
    transition: font-size 0.3s ease, color 0.3s ease;
}

.main-nav li a:hover,
.main-nav li a.active {
    color: var(--gold);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-light);
    transition: background-color 0.2s;
}

.nav-toggle:hover span {
    background-color: var(--link-color);
}

#site-header.scrolled {
    height: 60px;
}

#site-header.scrolled .site-logo {
    font-size: 1.3rem;
}

#site-header.scrolled .main-nav li a {
    font-size: 0.9rem;
    padding: 5px 10px;
}

@media (max-width: 600px) {
    .site-logo {
        font-size: 1.5rem;
    }
    #site-header.scrolled .site-logo {
        font-size: 1.1rem;
    }
    .nav-toggle {
        display: flex;
    }
    .header-container {
        position: relative;
    }
    .main-nav ul {
        flex-direction: column;
        display: none;
    }
    .main-nav.open ul {
        display: flex;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: var(--bg-header);
        box-shadow: var(--shadow-header);
        padding: 10px 0;
    }
    .main-nav.open li a {
        padding: 12px 20px;
    }
    #site-header.scrolled .header-container {
        padding: 0 10px;
    }
    body {
        padding-top: 80px;
    }
    .breadcrumb-nav {
        display: none;
    }
}

.post-container {
    max-width: 1280px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--bg-content);
    border-radius: 10px;
    box-shadow: var(--shadow-panel);
}

@media (max-width: 768px) {
    .post-container {
        margin: 10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .post-container {
        margin: 0;
        padding: 10px;
        border-radius: 0;
    }
}

.hero-banner {
    max-width: 1280px;
    margin: 20px auto;
    padding: 90px 20px;
    background-color: #1e1e1e;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: var(--shadow-panel);
    text-align: center;
    transition: background-image 0.4s ease;
}

.hero-title {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 3rem;
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .hero-banner {
        margin: 10px;
        padding: 60px 20px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
}

.post-banner {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 20px 0;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.post-title {
    color: var(--gold);
    font-size: 2.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 30px;
    font-style: italic;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

/* --- Shared accordion disclosure-triangle marker (Updates / content sections) --- */
.deck-updates-title,
.content-section-title {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
}

.deck-updates-title::-webkit-details-marker,
.content-section-title::-webkit-details-marker {
    display: none;
}

.deck-updates-title::before,
.content-section-title::before {
    content: "\25B8";
    display: inline-block;
    transition: transform 0.15s ease;
}

.deck-updates[open] > .deck-updates-title::before,
.content-section[open] > .content-section-title::before {
    transform: rotate(90deg);
}

.deck-updates {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.deck-updates-title {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 14px;
    gap: 8px;
}

.deck-updates-title::before {
    font-size: 0.8em;
}

.deck-updates:not([open]) {
    padding-bottom: 0;
    border-bottom: none;
}

.deck-updates:not([open]) .deck-updates-title {
    margin-bottom: 0;
}

.deck-updates-show-all {
    display: block;
    margin-top: 10px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--link-color);
    border-bottom: 1px dashed var(--link-color);
    cursor: pointer;
}

.deck-updates-show-all:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.deck-update {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    padding: 12px 0;
}

.deck-update[hidden] {
    display: none;
}

.deck-update + .deck-update {
    border-top: 1px solid var(--border-color);
}

.deck-update-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.deck-update-changes {
    margin: 0;
    padding-left: 18px;
    color: var(--text-light);
}

.deck-update-changes li {
    margin-bottom: 6px;
}

.deck-update-changes li:last-child {
    margin-bottom: 0;
}

@media (max-width: 560px) {
    .deck-update {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.post-content {
    font-family: "Merriweather", serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

.post-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.post-content h2,
.post-content h3 {
    color: var(--text-white);
    margin-top: 30px;
    margin-bottom: 10px;
}

.content-section {
    margin: 0;
}

.content-section-title {
    color: var(--text-white);
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 10px;
    gap: 10px;
}

.content-section-title::before {
    font-size: 0.7em;
    color: var(--gold);
}

.content-accordion-toggle-all {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    background: rgba(30, 30, 30, 0.92);
    color: var(--link-color);
    border: none;
    border-bottom: 1px dashed var(--link-color);
    border-radius: 4px;
    padding: 9px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    transition: color 0.2s, border-color 0.2s;
}

.content-accordion-toggle-all:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

@media (max-width: 480px) {
    .content-accordion-toggle-all {
        bottom: 16px;
        right: 16px;
        padding: 8px 12px;
        font-size: 0.78rem;
    }
}

.content-section:not([open]) .content-section-title {
    margin-bottom: 0;
}

.post-content a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--link-color);
    transition: color 0.3s;
}

.post-content a:hover {
    color: var(--gold);
    border-bottom: 1px dashed var(--gold);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.post-content pre {
    background-color: var(--bg-dark);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    color: var(--text-light);
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

.post-content blockquote {
    background-color: var(--bg-surface);
    border-left: 5px solid var(--link-color);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    position: relative;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.post-content blockquote p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* --- Content cards: floatable boxes for post-content, e.g.
   <div class="content-card content-card--w33 content-card--right">...</div>
   Width: content-card--w33 / --w50 / --w100 - these are the desktop (>1024px)
   widths. A 33% card doesn't have room to breathe below that, so it steps up
   to 50% on tablet (641-1024px), then every card goes full-width and
   unfloated on phones (<=640px) - a 50% or 100% card is already at (or past)
   its tablet size, so only --w33 needs the tablet step.
   Align: --left / --right (float, text wraps around) / --center (block,
   centered, always starts its own row). Drop <div class="content-clear">
   </div> after a floated card (or a pair of them) so whatever comes next
   starts on a fresh line instead of still wrapping alongside. */
.content-card {
    box-sizing: border-box;
    width: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.content-card p {
    margin: 0 0 10px;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.content-card--w33 { width: 33%; }
/* Subtracting the full 24px margin (not half) here is deliberate: a --left
   card's margin-right and a --right card's margin-left are each already
   24px, so two of these side by side land at exactly 100% instead of
   overflowing and wrapping - see --left/--right below. */
.content-card--w50 { width: calc(50% - 24px); }
.content-card--w100 { width: 100%; }

.content-card--left {
    float: left;
    margin-right: 24px;
}

.content-card--right {
    float: right;
    margin-left: 24px;
}

.content-card--center {
    float: none;
    clear: both;
    margin-left: auto;
    margin-right: auto;
}

.content-clear {
    clear: both;
}

@media (max-width: 1024px) {
    .content-card--w33 {
        width: calc(50% - 24px);
    }
}

@media (max-width: 640px) {
    .content-card {
        width: 100% !important;
        float: none !important;
        margin-left: 0;
        margin-right: 0;
    }
}

main {
    padding-top: 128px;
}

.breadcrumb-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 999;
    height: 40%;
    display: flex;
    align-items: center;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-list li {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.breadcrumb-list a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-list a:hover {
    color: var(--gold);
}

.breadcrumb-list li + li::before {
    content: '\203A';
    color: var(--text-light);
    padding: 0 8px;
    font-size: 1.1rem;
    line-height: 1;
}

.breadcrumb-list li[aria-current="page"] {
    color: var(--gold);
    font-weight: bold;
    cursor: default;
}

#site-header.scrolled .breadcrumb-nav {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* --- mtg-card hover links (Scryfall-backed, site-wide) --- */

.mtg-card {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--link-color);
    cursor: pointer;
    transition: color 0.3s;
}

.mtg-card:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.mtg-card-popup {
    position: absolute;
    z-index: 2000;
    display: none;
    pointer-events: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-modal);
}

.mtg-card-popup img {
    display: block;
    width: 223px;
    height: auto;
}

/* --- mtg-deck-banner (Scryfall art_crop, signature card) --- */

.mtg-deck-banner {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 0 20px 0;
    background-color: var(--bg-surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.mtg-deck-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

/* --- mtg-decklist (Scryfall-backed decklist widget) --- */

.mtg-decklist {
    margin-top: 20px;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.mtg-decklist-loading,
.loading-text {
    color: var(--text-light);
    font-style: italic;
    animation: pulse-loading 1.5s ease-in-out infinite;
}

.mtg-decklist-error {
    color: var(--error-color);
    font-style: italic;
}

.mtg-decklist-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.mtg-decklist-copy {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--link-color);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.mtg-decklist-copy:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.mtg-decklist-name {
    text-align: center;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.mtg-decklist-columns {
    column-count: 3;
    column-gap: 20px;
}

.mtg-decklist-category {
    break-inside: avoid;
    margin-bottom: 15px;
}

.mtg-decklist-category-type {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.mtg-decklist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.mtg-decklist-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foil-badge {
    color: var(--gold);
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

.mtg-decklist-row-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mtg-decklist-row-cost {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.mtg-decklist-row-rarity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.rarity-common { color: var(--rarity-common); border: 1px solid var(--rarity-common); }
.rarity-uncommon { color: var(--rarity-uncommon); border: 1px solid var(--rarity-uncommon); }
.rarity-rare { color: var(--gold); border: 1px solid var(--gold); }
.rarity-mythic { color: var(--rarity-mythic); border: 1px solid var(--rarity-mythic); }
.rarity-special,
.rarity-bonus { color: var(--rarity-mythic); border: 1px solid var(--rarity-mythic); }

img.mana-symbol {
    width: 1em;
    height: 1em;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 650px) {
    .mtg-decklist-columns {
        column-count: 2;
    }
}

@media (max-width: 450px) {
    .mtg-decklist-columns {
        column-count: 1;
    }
}

/* --- Listing cards (news / decks) --- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-tile {
    display: block;
    background-color: var(--bg-surface);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    text-decoration: none;
    color: var(--text-light);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card-tile:hover {
    border-color: var(--gold);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 28px rgba(255, 215, 0, 0.35), 0 0 0 1px rgba(255, 215, 0, 0.4);
}

.card-tile h3 {
    color: var(--gold);
    margin: 0 0 8px 0;
    font-family: var(--font-display);
}

.card-type-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 8px;
}

.card-tile .card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.color-pips {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.commander-name {
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: bold;
    font-style: normal;
}

.card-tile .card-excerpt {
    margin-top: 10px;
    font-size: 0.95rem;
}

/* --- Wishlist --- */

.wishlist-toolbar {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.wishlist-toolbar input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: var(--text-white);
    font-size: 1rem;
}

.wishlist-toolbar input[type="text"]:focus {
    outline: none;
    border-color: var(--gold);
}

.wishlist-toolbar .btn {
    border-radius: 0 6px 6px 0;
}

.btn {
    background-color: var(--purple-accent);
    color: var(--text-white);
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #6f22b8;
}

.btn-danger {
    background-color: #b02a2a;
}

.btn-danger:hover {
    background-color: #8f2222;
}

.btn-gold {
    background-color: var(--gold);
    color: #1a1400;
    font-weight: bold;
}

.btn-gold:hover {
    background-color: var(--gold-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

/* Icon-only buttons (e.g. per-row remove) - ghost by default so they don't
   outweigh the row's actual data, only turning solid-looking on hover. */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

.icon-btn-danger:hover {
    border-color: var(--error-color);
    color: var(--error-color);
    background-color: rgba(255, 107, 107, 0.1);
}

.search-results {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-results li {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.search-result-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results li:hover {
    background-color: var(--bg-surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: normal;
}

.data-table tbody tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:hover td {
    background-color: rgba(255, 215, 0, 0.07);
}

.data-table tfoot td {
    border-bottom: none;
    border-top: 2px solid var(--gold);
    padding-top: 14px;
    font-weight: bold;
    color: var(--text-white);
}

.wishlist-total-label {
    text-align: right;
    color: var(--gold);
    font-family: var(--font-display);
}

.data-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.data-table th[data-sort]:hover {
    color: var(--link-color);
}

.sort-indicator {
    display: inline-block;
    width: 0.8em;
    font-size: 0.75em;
}

.wishlist-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .wishlist-controls {
        gap: 16px 10px;
        margin-bottom: 20px;
    }
}

.wishlist-actions {
    position: relative;
}

.actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.actions-toggle:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Collapsed into a dropdown at every width, not just mobile - these
   (Refresh/Bulk Upload/Export) are used far less often than adding or
   removing a single card, so they shouldn't compete for attention above
   the table by default. */
.wishlist-actions-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 200px;
    background-color: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow-panel);
    z-index: 500;
}

.wishlist-actions-panel.open {
    display: flex;
}

.wishlist-actions-panel .btn {
    width: 100%;
}

.wishlist-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wishlist-switcher-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

#wishlist-select {
    padding: 8px 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-white);
    font-size: 0.95rem;
}

.wishlist-filter input[type="text"] {
    width: 360px;
    padding: 10px 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-white);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qty-stepper button {
    background-color: var(--bg-surface);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    line-height: 1;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
}

.qty-stepper button:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.auth-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: var(--bg-surface);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.status-msg {
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 1.2em;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.status-msg.fade-out {
    opacity: 0;
}

.status-msg.error {
    color: var(--error-color);
}

.status-msg.success {
    color: var(--success-color);
}

.price-delta-up {
    color: var(--success-color);
}

.price-delta-down {
    color: var(--error-color);
}

/* --- Trades --- */

.foil-checkbox,
.select-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}

.select-col {
    width: 1%;
}

.binder-selected-total {
    text-align: right;
    color: var(--link-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.trades-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.trade-column-title {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0 0 12px 0;
}

/* --- Footer --- */

#site-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
    margin-top: 40px;
    padding: 30px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer-container a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--link-color);
    transition: color 0.3s;
}

.footer-container a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Bulk upload modal --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}

.modal {
    background-color: var(--bg-content);
    border-radius: 10px;
    box-shadow: var(--shadow-modal);
    padding: 20px;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-title {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: 0 0 15px 0;
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
}

.dropzone p {
    margin: 0;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--link-color);
    color: var(--text-light);
}

.modal-table-wrap {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-table-wrap .data-table {
    margin-top: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
