:root {
    --gold: #c9a84c;
    --gold-text: #f0e6cc;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15vh;
    background: #121212 url('img/login-archway.png') center top / contain no-repeat;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 300;
}

nav .logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-family: Georgia, "Times New Roman", serif; font-size: 16px; color: var(--gold-text); letter-spacing: 1px; }
.logo-rule { width: 30px; height: 1px; background: var(--gold); margin: 3px 0; }
.logo-subtitle { font-size: 9px; letter-spacing: 3px; color: #888; font-weight: 300; text-transform: uppercase; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: #999; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--gold-text); }

main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
h1 { font-size: 24px; margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; color: var(--gold-text); }
h2 { font-size: 18px; margin-bottom: 16px; }

.stats { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-card { flex: 1; padding: 20px; background: rgba(30, 30, 30, 0.3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-radius: 8px; text-align: center; border: 1px solid rgba(201, 168, 76, 0.15); }
.stat-value { font-size: 32px; font-weight: 700; }
.stat-label { font-size: 13px; color: #999; text-transform: uppercase; margin-top: 4px; }
.last-update { color: #999; margin-bottom: 24px; }

.btn { display: inline-block; padding: 10px 24px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--gold); color: #121212; }
.btn-primary:hover { background: #d4b35a; }

.summary-bar { display: flex; gap: 0; border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.summary-bar .section { flex: 1; padding: 16px; text-align: center; }
.summary-bar .section-count { font-size: 28px; font-weight: 700; }
.summary-bar .section-label { font-size: 12px; text-transform: uppercase; color: #999; }
.summary-bar .remove { background: #2a1a1a; }
.summary-bar .remove .section-count { color: #ff6b6b; }
.summary-bar .swap-in { background: #1a2a1a; }
.summary-bar .swap-in .section-count { color: #51cf66; }
.summary-bar .buy { background: #1a1a2a; }
.summary-bar .buy .section-count { color: #74c0fc; }

.card-section { margin-bottom: 32px; }
.card-section h2 { text-transform: uppercase; font-size: 14px; margin-bottom: 12px; }
.card-section.remove h2 { color: #ff6b6b; }
.card-section.swap-in h2 { color: #51cf66; }
.card-section.buy h2 { color: #74c0fc; }

.card-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; background: transparent; border-radius: 6px; margin-bottom: 6px; cursor: pointer; border-bottom: 1px solid #222;
}
.card-row:hover { background: rgba(30, 30, 30, 0.3); }
.card-name { font-weight: 600; }
.card-set { color: #666; font-size: 12px; margin-left: 8px; }
.card-price { font-size: 13px; }
.card-row.remove { border-left: 3px solid #ff6b6b; }
.card-row.swap-in { border-left: 3px solid #51cf66; }
.card-row.buy { border-left: 3px solid #74c0fc; }

.toggle-btn { padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; }
.toggle-btn.keep { background: #2a4a2a; color: #51cf66; }
.toggle-btn.sell { background: #4a2a2a; color: #ff6b6b; }

.buy-total { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: #1a1a2a; border-radius: 6px; margin-top: 12px; }
.buy-total .label { font-weight: 600; color: #74c0fc; }
.buy-total .amount { font-weight: 700; font-size: 18px; color: #74c0fc; }

.card-table { width: 100%; border-collapse: collapse; }
.card-table.fixed-cols { table-layout: fixed; }
.card-table th { text-align: left; padding: 8px 16px; border-bottom: 2px solid rgba(201, 168, 76, 0.3); font-size: 12px; text-transform: uppercase; color: #888; cursor: pointer; }
.card-table th a { color: #888; text-decoration: none; }
.card-table th a:hover { color: var(--gold-text); }
.card-table th:hover { color: var(--gold-text); }
.card-table.fixed-cols th:nth-child(1) { width: 35%; }
.card-table.fixed-cols th:nth-child(2) { width: 10%; }
.card-table.fixed-cols th:nth-child(3) { width: 40%; }
.card-table.fixed-cols th:nth-child(4) { width: 15%; text-align: right; }
.card-table td { padding: 8px 16px; border-bottom: 1px solid #222; }
.card-table.fixed-cols td:last-child { text-align: right; }
.card-table tbody tr:hover { background: rgba(30, 30, 30, 0.3); border-left: 2px solid var(--gold); }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #1e1e1e; border-radius: 12px; padding: 24px; max-width: 700px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal h2 { margin-bottom: 16px; }

.printing-option { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px; cursor: pointer; margin-bottom: 6px; }
.printing-option:hover { background: rgba(30, 30, 30, 0.3); }
.printing-option.selected { background: #1a2a1a; border: 1px solid #51cf66; }
.printing-option img { width: 60px; border-radius: 4px; }
.printing-option .details { flex: 1; }

.badge { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.badge.reserved { background: #4a3a1a; color: #ffd43b; }
.badge.foil { background: #1a3a4a; color: #74c0fc; }
.badge.old-border { background: #3a1a4a; color: #da77f2; }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: transparent; border-radius: 6px; text-decoration: none; color: #e0e0e0; border-bottom: 1px solid #222; }
.history-item:hover { background: rgba(30, 30, 30, 0.3); border-color: rgba(201, 168, 76, 0.25); }

.loading { text-align: center; padding: 48px; color: #999; }

.search-container { position: relative; margin-bottom: 24px; }
.search-input { width: 100%; padding: 10px 16px; background: #1e1e1e; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; font-size: 14px; }
.search-input:focus { outline: none; border-color: var(--gold); }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: #1e1e1e; border: 1px solid #333; border-top: none; border-radius: 0 0 6px 6px; max-height: 300px; overflow-y: auto; z-index: 100; display: none; }
.search-results.active { display: block; }
.search-result-item { padding: 8px 16px; cursor: pointer; font-size: 14px; }
.search-result-item:hover, .search-result-item.highlighted { background: #2a2a2a; outline: 1px solid #555; }

.list-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-refresh-prices {
    padding: 5px 14px;
    background: #333;
    color: var(--gold-text);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.btn-refresh-prices:hover { background: #444; }
.btn-refresh-prices:disabled { opacity: 0.5; cursor: default; }

.btn-remove-card {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 10px;
    background: #3a1a1a;
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-remove-card:hover { background: #4a2020; }

.list-page { min-height: calc(100vh - 50px); }
.list-page-cube { background: url('img/cube-case.png') center calc(50% + 100px) / auto 85vh no-repeat fixed; }
.list-page-binder { background: url('img/binder-page.png') center calc(50% + 100px) / auto 85vh no-repeat fixed; }
.list-page-history { background: url('img/history-tome.png') center calc(50% + 100px) / auto 85vh no-repeat fixed; }
.list-page-history-detail { background: url('img/history-tome-open.png') center calc(50% + 100px) / auto 85vh no-repeat fixed; }
.list-page-playtest { background: url('img/playtest-table.png') center calc(50% + 100px) / auto 85vh no-repeat fixed; }
.list-page-deckbuilder { background: url('img/deckbuilder-study.png') center calc(50% + 100px) / auto 85vh no-repeat fixed; }
.list-page-cube::before, .list-page-binder::before, .list-page-history::before, .list-page-history-detail::before, .list-page-playtest::before, .list-page-deckbuilder::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(18, 18, 18, 0.82);
    pointer-events: none;
    z-index: 0;
}
.list-page > * { position: relative; z-index: 1; }
.list-page > .search-container { z-index: 10; }
.dashboard .page-bg-img { top: 0; opacity: 0.10; }
.dashboard-art { display: block; margin: 0 auto; max-width: 500px; width: 100%; opacity: 0.10; }
.dashboard-content { margin-top: -330px; position: relative; z-index: 1; }

.draft-pack {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.draft-card {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    position: relative;
}
.draft-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}
.draft-card img {
    width: 100%;
    display: block;
    border-radius: 6px;
}
.draft-card-placeholder {
    padding: 20px 8px;
    text-align: center;
    background: #1e1e1e;
    color: #999;
    font-size: 12px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draft-card-best { border-color: var(--gold); }

.draft-card-dfc { -webkit-perspective: 600px; perspective: 600px; }
.draft-card-flip {
    position: relative;
    width: 100%;
    transition: -webkit-transform 0.5s, transform 0.5s;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}
.draft-card-dfc:hover .draft-card-flip { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); }
.draft-card-front, .draft-card-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.draft-card-front { display: block; }
.draft-card-back {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}
.draft-card-front img, .draft-card-back img {
    width: 100%;
    display: block;
    border-radius: 6px;
}

.draft-score-best {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--gold);
    color: #121212;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.draft-tip {
    margin-left: 12px;
    font-size: 12px;
    color: var(--gold-text);
    font-style: italic;
    opacity: 0.85;
}

.btn-scores {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 12px;
    background: #333;
    color: var(--gold-text);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    vertical-align: middle;
}
.btn-scores:hover { background: #444; }

.btn-autobuild {
    display: inline-block;
    margin-left: 12px;
    padding: 6px 16px;
    background: var(--gold);
    color: #121212;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-autobuild:hover { background: #d4b35a; }
.btn-autobuild:disabled { opacity: 0.5; cursor: default; }

.draft-pool-groups {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
}
.draft-pool-column {
    width: 105px;
    flex-shrink: 0;
    overflow: visible;
}
.draft-pool-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
    font-weight: 600;
}

/* ── Overlapping card stack ───────────────────────────────── */
.draft-pool-card {
    position: relative;
    z-index: 1;
    width: 105px;
    height: 37px;
    overflow: visible;
    transition: transform 0.15s ease;
}
.draft-pool-card:last-child {
    height: auto;
}
.draft-pool-card img {
    width: 105px;
    border-radius: 4px;
    display: block;
    pointer-events: none;
}
/* Hover: pop card to readable size */
.draft-pool-card:hover {
    z-index: 200;
    transform: scale(1.9);
    transform-origin: top center;
}
.draft-pool-card:hover img {
    transform: none;
}
/* Left columns: expand rightward */
.draft-pool-column:first-child .draft-pool-card:hover,
.draft-pool-column:nth-child(2) .draft-pool-card:hover {
    transform-origin: top left;
}
/* Right columns: expand leftward */
.draft-pool-column:last-child .draft-pool-card:hover,
.draft-pool-column:nth-last-child(2) .draft-pool-card:hover {
    transform-origin: top right;
}

/* ── CMC row layout (deckbuilder) ─────────────────────────── */
.draft-cmc-row {
    display: flex;
    gap: 6px;
    overflow: visible;
    margin-bottom: 12px;
}
.draft-cmc-pile {
    width: 105px;
    flex-shrink: 0;
    overflow: visible;
}
.draft-cmc-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
    font-weight: 600;
    text-align: center;
}
.draft-cmc-count {
    color: #888;
    font-weight: 400;
}
/* ── Deck layout (lands | divider | spells) ───────────────── */
.deck-layout {
    display: flex;
    gap: 0;
    overflow: visible;
    margin-bottom: 20px;
}
.deck-lands-column {
    width: 105px;
    flex-shrink: 0;
    overflow: visible;
}
.deck-lands-column .draft-pool-card:hover {
    transform-origin: top left;
}
.deck-divider {
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), rgba(201, 168, 76, 0.1));
    margin: 0 10px;
    flex-shrink: 0;
    align-self: stretch;
    border-radius: 1px;
}
.deck-spells-area {
    flex: 1;
    overflow: visible;
}
.deck-row-label {
    font-size: 13px;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 2px;
}
/* ── Empty deck drop zone ────────────────────────────────── */
.deck-empty-zone {
    padding: 32px 24px;
    border: 2px dashed rgba(201, 168, 76, 0.2);
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* ── Deck legality indicator ─────────────────────────────── */
.deck-count {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    vertical-align: middle;
}
.deck-count-warning {
    color: var(--gold);
}

/* ── Draft header ─────────────────────────────────────────── */
.draft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
}
.draft-header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.draft-header-left h1 { margin-bottom: 0; }

/* ── Mini basics bar ─────────────────────────────────────── */
.basics-bar {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 200;
}
.basics-mini-card {
    width: 56px;
    height: 78px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid rgba(201, 168, 76, 0.3);
    overflow: visible;
    position: relative;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.basics-mini-card:hover {
    transform: scale(1.08);
    border-color: var(--gold);
}
.basics-mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    border-radius: 3px;
}
.basics-mini-card .mini-count {
    position: absolute;
    bottom: 2px;
    right: 3px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    pointer-events: none;
}
.basics-mini-card-active {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}
.basics-mini-card-drop-target {
    transform: scale(1.15);
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.5);
}

/* ── Basics popover ──────────────────────────────────────── */
.basics-popover {
    position: fixed;
    background: #2a2a2a;
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 12px 16px;
    z-index: 10000;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8), 0 0 12px rgba(201, 168, 76, 0.15);
}
.basics-popover-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-text);
    margin-bottom: 8px;
}
.basics-popover-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.basics-popover-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    background: #333;
    color: var(--gold-text);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.basics-popover-btn:hover {
    background: #444;
    border-color: var(--gold);
}
.basics-popover-input {
    width: 44px;
    text-align: center;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    padding: 4px;
    -moz-appearance: textfield;
}
.basics-popover-input::-webkit-outer-spin-button,
.basics-popover-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.basics-popover-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* ── Card swap animation ─────────────────────────────────── */
@keyframes slide-to-sideboard {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(40px); opacity: 0; }
}
@keyframes slide-to-maindeck {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-40px); opacity: 0; }
}
.deck-card-slide-out {
    animation: slide-to-sideboard 0.2s ease-out forwards;
    pointer-events: none;
}
.deck-card-slide-in {
    animation: slide-to-maindeck 0.2s ease-out forwards;
    pointer-events: none;
}

/* ── Drag feedback ───────────────────────────────────────── */
.draft-pool-card-dragging {
    opacity: 0.2;
}
.deck-drop-zone-active {
    box-shadow: inset 0 0 20px rgba(201, 168, 76, 0.15);
    border-radius: 8px;
    outline: 2px dashed rgba(201, 168, 76, 0.4);
    outline-offset: 4px;
    transition: box-shadow 0.15s, outline-color 0.15s;
}
.draft-pool-card[draggable="true"] {
    cursor: grab;
}
.draft-pool-card[draggable="true"]:active {
    cursor: grabbing;
}

.draft-basic-card {
    position: relative;
    transition: transform 0.15s ease;
}
.draft-basic-card:hover {
    transform: scale(1.9);
    transform-origin: top left;
    z-index: 200;
}
.draft-basic-card:hover img {
    transform: none;
}
.basic-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    pointer-events: none;
}

/* ── Foil overlays ────────────────────────────────────────── */

.foil-overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: inherit;
    pointer-events: none;
}
/* In the overlapping pool stack, the container is only 37px tall but the
   card image overflows it. Size the overlay to match the full card face. */
.draft-pool-card > .foil-overlay {
    right: auto;
    bottom: auto;
    width: 105px;
    aspect-ratio: 745 / 1040;
    border-radius: 4px;
}

/* Traditional foil: rainbow holographic shimmer */
.draft-card-foil > .foil-overlay {
    background: linear-gradient(
        135deg,
        transparent 15%,
        rgba(255, 180, 80, 0.18) 25%,
        rgba(80, 200, 255, 0.18) 35%,
        rgba(200, 80, 255, 0.18) 45%,
        rgba(80, 255, 160, 0.18) 55%,
        rgba(255, 100, 120, 0.18) 65%,
        transparent 75%
    );
    background-size: 250% 250%;
    mix-blend-mode: color-dodge;
    animation: foil-shimmer 4s ease-in-out infinite;
}

@keyframes foil-shimmer {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* Etched foil: subtle metallic frame sheen */
.draft-card-etched > .foil-overlay {
    background: linear-gradient(
        160deg,
        transparent 20%,
        rgba(200, 200, 220, 0.15) 35%,
        rgba(170, 180, 210, 0.2) 50%,
        rgba(200, 200, 220, 0.15) 65%,
        transparent 80%
    );
    background-size: 200% 200%;
    mix-blend-mode: overlay;
    animation: etched-shimmer 5s ease-in-out infinite;
}

@keyframes etched-shimmer {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* Glossy finish: clean gloss sweep */
.draft-card-glossy > .foil-overlay {
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.12) 45%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 70%
    );
    background-size: 300% 100%;
    animation: glossy-sweep 3s ease-in-out infinite;
}

@keyframes glossy-sweep {
    0%   { background-position: 100% 0; }
    50%  { background-position: 0% 0; }
    100% { background-position: 100% 0; }
}

/* Tokens page */
.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.token-card { background: #1a1a1a; border-radius: 8px; border: 1px solid #2a2a2a; }
.token-card:not(.draft-card-dfc) { overflow: hidden; }
.token-image { width: 100%; display: block; border-radius: 8px 8px 0 0; }
.token-card.draft-card-dfc .token-image { border-radius: 8px; }
.token-card.draft-card-dfc .draft-card-flip { cursor: pointer; }
.token-card.draft-card-dfc .draft-card-back .token-image { border-radius: 8px; }
.token-image-placeholder { width: 100%; aspect-ratio: 488/680; background: #2a2a2a; display: flex; align-items: center; justify-content: center; color: #666; font-size: 14px; }
.token-info { padding: 10px 12px; }
.token-creators { display: flex; flex-wrap: wrap; gap: 4px; }
.token-creator { font-size: 12px; color: #aaa; background: #252525; padding: 2px 8px; border-radius: 4px; }

/* Inline printing actions */
.printing-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px; flex-shrink: 0; }
.count-controls { display: flex; align-items: center; gap: 4px; }
.btn-count { width: 28px; height: 28px; border-radius: 4px; border: 1px solid #444; background: #2a2a2a; color: #ddd; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.btn-count:hover { background: #3a3a3a; border-color: #666; }
.count-badge { min-width: 20px; text-align: center; font-size: 14px; font-weight: 600; color: #ddd; }

/* Analytics page */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
}

.chart-card h3 {
    color: #c9a84c;
    margin: 0 0 16px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-card canvas {
    max-height: 280px;
}
.printing-option .btn-move-card, .printing-option .btn-remove-card { font-size: 11px; padding: 4px 10px; white-space: nowrap; }

/* Winchester Draft */
.winchester-piles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
    position: relative;
    z-index: 50;
}

.winchester-pile {
    background: #222;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
    min-height: 200px;
}

.winchester-pile:hover {
    border-color: #c9a84c;
    transform: translateY(-2px);
}

.winchester-pile.best-pick {
    border-color: #c9a84c;
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.3);
}

.winchester-pile-label {
    color: #c9a84c;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-align: center;
}

.winchester-pile-cards {
    position: relative;
}

.winchester-pile-card {
    position: relative;
    transition: transform 0.2s, z-index 0s;
}

.winchester-pile-card:not(:first-child) {
    margin-top: -65%;
}

.winchester-pile-card:hover {
    transform: scale(1.4);
    z-index: 100;
    position: relative;
}

.winchester-pile-card img {
    width: 100%;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.winchester-pile-empty {
    color: #555;
    text-align: center;
    padding: 40px 0;
    font-style: italic;
}

.winchester-tip {
    background: #2a3a2a;
    border: 1px solid #3a5a3a;
    border-radius: 8px;
    padding: 12px 16px;
    color: #ccc;
    margin-top: 12px;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.winchester-pool {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 12px 0;
}

.winchester-pool-card img {
    width: 100%;
    border-radius: 6px;
    display: block;
}

@media (max-width: 768px) {
    .winchester-piles {
        grid-template-columns: repeat(2, 1fr);
    }
}
