/* Additive drag feedback; click-to-move retains the same layout and targets. */
.draft-draggable { cursor: grab; }
.draft-draggable:active { cursor: grabbing; }
.draft-drop-valid { outline: 2px solid #6366f1; outline-offset: 3px; }
.draft-drop-invalid { opacity: 0.4; }

/* Draft presentation only. No hit-area, pointer-event or gameplay timing changes. */
:is(.draft-stage, .card-presentation) { --draft-ease: cubic-bezier(.2,.75,.25,1); }
:is(.draft-stage, .card-presentation) [data-card-quality] {
    --card-accent: 100,116,139;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-image: linear-gradient(125deg, rgba(var(--card-accent),.10), transparent 65%);
    box-shadow: 0 7px 18px -12px #000, inset 0 1px 0 #ffffff09;
    transition: transform 180ms var(--draft-ease), border-color 180ms, box-shadow 180ms, opacity 180ms;
}
:is(.draft-stage, .card-presentation) [data-card-quality="high"] { --card-accent: 96,165,250; }
:is(.draft-stage, .card-presentation) [data-card-quality="elite"] { --card-accent: 167,139,250; }
:is(.draft-stage, .card-presentation) [data-card-quality="superstar"],
:is(.draft-stage, .card-presentation) [data-card-quality="superstar-plus"],
:is(.draft-stage, .card-presentation) [data-card-quality="legend"] {
    --card-accent: 251,191,36;
    border-color: #d4a84f;
    background-image: linear-gradient(125deg, #a8792529, #151a2b 65%, #a8792514);
    box-shadow: 0 10px 24px -16px #fbbf2470, inset 0 1px 0 #fff2;
}
:is(.draft-stage, .card-presentation) [data-card-quality="superstar-plus"] { border-color: #f4cd70; }
:is(.draft-stage, .card-presentation) [data-card-quality="legend"] {
    --card-accent: 244,220,164;
    border-color: #f4dca4;
    box-shadow: 0 10px 26px -14px #fbbf2480, inset 0 0 0 1px #f4dca422;
}
:is(.draft-stage, .card-presentation) [data-card-quality]:not([data-card-quality="normal"]) .draft-ovr {
    color: rgb(var(--card-accent));
    text-shadow: 0 2px 14px rgba(var(--card-accent),.16);
}
:is(.draft-stage, .card-presentation) [data-card-surface="preview"] {
    border-radius: 6px;
    padding-inline: 8px;
    border-left: 2px solid rgba(var(--card-accent),.65);
}
:is(.draft-stage, .card-presentation) [data-card-quality="high"], :is(.draft-stage, .card-presentation) [data-card-quality="elite"] {
    border-left-color: rgb(var(--card-accent));
}
:is(.draft-stage, .card-presentation) [data-card-quality^="superstar"]::after,
:is(.draft-stage, .card-presentation) [data-card-quality="legend"]::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, #fff0 40%, #ffe6a622 50%, transparent 60%);
    transform: translateX(-120%);
    animation: draft-sheen 7s ease-in-out infinite;
}
:is(.draft-stage, .card-presentation) [data-card-surface="lineup"]::after { animation-iteration-count: 1; }
:is(.draft-stage, .card-presentation) [data-card-enter="true"] {
    animation: draft-card-arrive 280ms var(--draft-ease) var(--reveal-delay) backwards;
}
:is(.draft-stage, .card-presentation) [data-card-enter="true"][data-card-quality^="superstar"],
:is(.draft-stage, .card-presentation) [data-card-enter="true"][data-card-quality="legend"] {
    animation-name: draft-star-arrive;
    animation-duration: 380ms;
}
:is(.draft-stage, .card-presentation) [data-card-selected="true"] {
    border-color: #fb923c;
    outline: 2px solid #fb923c;
    outline-offset: 2px;
    box-shadow: 0 8px 24px -12px #fb923c80;
}
:is(.draft-stage, .card-presentation) :has(> [data-card-selected="true"]) > [data-card-selected="false"] { opacity: .72; }
:is(.draft-stage, .card-presentation) .draft-drop-valid {
    outline: 2px solid #818cf8;
    outline-offset: 3px;
    box-shadow: inset 0 0 22px #6366f118;
    background-color: #6366f10d;
}
:is(.draft-stage, .card-presentation) .draft-drop-invalid { opacity: .35; }
:is(.draft-stage, .card-presentation) [data-lineup-slot] { transition: opacity 160ms, outline-color 160ms, background-color 160ms; }
:is(.draft-stage, .card-presentation) [data-card-quality]:active { transform: scale(.985); }
:is(.draft-stage, .card-presentation) button {
    transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}
:is(.draft-stage, .card-presentation) button:active:not(:disabled) { transform: translateY(1px) scale(.98); }
:is(.draft-stage, .card-presentation) button:disabled { filter: saturate(.45); }
:is(.draft-stage, .card-presentation) button:focus-visible, :is(.draft-stage, .card-presentation) [draggable]:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 4px;
}
.draft-reels > div { min-width: 0; flex: 1; overflow: hidden; }
.draft-reels { width: 100%; }
:is(.draft-stage, .card-presentation):has(#btn-spin-trigger:disabled:not(.hidden)) .draft-reels > div {
    animation: draft-reel-pulse 280ms ease-in-out infinite alternate;
}
:is(.draft-stage, .card-presentation):has(#modifier-spin-panel:not(.hidden)) .draft-reels > div {
    animation: draft-reel-land 320ms ease-out;
}
@media (hover: hover) {
    :is(.draft-stage, .card-presentation) [data-card-quality]:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(var(--card-accent),.45); }
    :is(.draft-stage, .card-presentation) button:hover:not(:disabled) { filter: brightness(1.12); }
}
@keyframes draft-card-arrive {
    from { opacity: .35; transform: translateY(7px) scale(.985); }
    to { opacity: 1; transform: none; }
}
@keyframes draft-star-arrive {
    0% { opacity: .4; transform: translateY(8px) scale(.95); }
    65% { transform: scale(1.012); }
    100% { opacity: 1; transform: none; }
}
@keyframes draft-sheen {
    0%, 8% { transform: translateX(-120%); }
    24%, 100% { transform: translateX(120%); }
}
@keyframes draft-reel-pulse { from { opacity: .65; } to { opacity: 1; } }
@keyframes draft-reel-land {
    from { transform: translateY(-3px); filter: brightness(1.4); }
    to { transform: none; filter: brightness(1); }
}
@media (max-width: 480px) {
    :is(.draft-stage, .card-presentation) .draft-reels { gap: 6px; }
    :is(.draft-stage, .card-presentation) .draft-reels > div { padding-inline: 8px; }
    :is(.draft-stage, .card-presentation) [data-card-surface="lineup"] { padding: 10px; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
    :is(.draft-stage, .card-presentation) [data-card-quality], :is(.draft-stage, .card-presentation) [data-card-quality]::after,
    :is(.draft-stage, .card-presentation) .draft-reels > div, :is(.draft-stage, .card-presentation) button, :is(.draft-stage, .card-presentation) [data-lineup-slot] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    :is(.draft-stage, .card-presentation) [data-card-quality]::after { display: none; }
    :is(.draft-stage, .card-presentation) .animate-pulse { animation: none !important; }
}

/* Shared persistent identities override generic elite gold in every card surface. */
:is(.draft-stage, .card-presentation) [data-card-variant="poty"] { --card-accent: 192,132,252; }
:is(.draft-stage, .card-presentation) [data-card-variant="gold"] { --card-accent: 251,191,36; }
:is(.draft-stage, .card-presentation) [data-card-variant="grass"] { --card-accent: 74,222,128; }
:is(.draft-stage, .card-presentation) [data-card-variant="fergus"] { --card-accent: 251,113,163; }
:is(.draft-stage, .card-presentation) [data-card-variant]:not([data-card-variant="standard"]) {
    border-color: rgb(var(--card-accent));
    background-image: linear-gradient(125deg, rgba(var(--card-accent),.17), #151a2b 65%, rgba(var(--card-accent),.06));
    box-shadow: 0 10px 24px -16px rgba(var(--card-accent),.5), inset 0 1px 0 #fff2;
}
:is(.draft-stage, .card-presentation) [data-card-quality]::after {
    background: linear-gradient(110deg, transparent 30%, transparent 40%, rgba(var(--card-accent),.16) 50%, transparent 60%);
}
:is(.draft-stage, .card-presentation) [data-card-surface="history"] { transform: none; }
:is(.draft-stage, .card-presentation) [data-card-selected="true"] { outline-color: #fb923c; }

/* =========================================================================
   ACHIEVEMENTS / TROPHY CABINET
   ========================================================================= */

.achievement-card {
    background: rgba(17, 24, 39, 0.55);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.achievement-unlocked {
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 10px 30px -24px rgba(245,158,11,0.55);
}

.achievement-locked {
    border-color: rgba(55, 65, 81, 0.6);
    opacity: 0.72;
    filter: saturate(0.45);
}

.achievement-prestige.achievement-unlocked {
    position: relative;
    overflow: hidden;
    border-color: rgba(251, 191, 36, 0.62);
    background:
        linear-gradient(
            135deg,
            rgba(120, 79, 16, 0.18),
            rgba(17, 24, 39, 0.88) 55%,
            rgba(251, 191, 36, 0.08)
        );
    box-shadow:
        0 0 24px -14px rgba(251, 191, 36, 0.75),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.achievement-prestige.achievement-unlocked::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            110deg,
            transparent 30%,
            rgba(255,255,255,0.08) 48%,
            transparent 65%
        );
    transform: translateX(-130%);
    animation: achievement-prestige-sheen 6s ease-in-out infinite;
}

.achievement-master-banner {
    box-shadow:
        0 0 32px -15px rgba(251, 191, 36, 0.8),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.achievement-toast {
    animation: achievement-toast-enter 320ms cubic-bezier(.2,.8,.2,1);
}

.achievement-toast-prestige {
    box-shadow: 0 0 35px -10px rgba(251,191,36,0.72);
}

.achievement-toast-leave {
    animation: achievement-toast-exit 320ms ease forwards;
}

@media (hover: hover) {
    .achievement-unlocked:hover {
        transform: translateY(-2px);
        border-color: rgba(245, 158, 11, 0.5);
    }

    .achievement-prestige.achievement-unlocked:hover {
        border-color: rgba(251, 191, 36, 0.9);
    }
}

@keyframes achievement-toast-enter {
    from {
        opacity: 0;
        transform: translateX(25px) scale(.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes achievement-toast-exit {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: translateX(25px) scale(.97);
    }
}

@keyframes achievement-prestige-sheen {
    0%, 12% {
        transform: translateX(-130%);
    }

    32%, 100% {
        transform: translateX(130%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .achievement-card,
    .achievement-toast,
    .achievement-prestige::after {
        animation: none !important;
        transition: none !important;
    }
}



/* =========================================================================
   DRAFT HISTORY / VAULT
   ========================================================================= */

.draft-history-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(55, 65, 81, .72);
    border-radius: 18px;
    padding: 20px;
    background:
        radial-gradient(circle at 8% 0%, rgba(59, 130, 246, .09), transparent 32%),
        linear-gradient(145deg, rgba(17, 24, 39, .78), rgba(3, 7, 18, .68));
    box-shadow: 0 22px 55px -42px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.025);
}

.draft-history-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(55,65,81,.55);
}

.draft-history-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .16em;
    color: #f87171;
}

.draft-history-kicker span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 14px rgba(239,68,68,.45);
}

.draft-history-heading h3 {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #f3f4f6;
}

.draft-history-heading p {
    margin-top: 3px;
    font-size: 11px;
    color: #6b7280;
}

.draft-history-top-five {
    flex: 0 0 auto;
    border: 1px solid rgba(75,85,99,.6);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .14em;
    color: #6b7280;
    background: rgba(3,7,18,.38);
}

.draft-history-divisions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.draft-history-division {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(55,65,81,.55);
    border-radius: 14px;
    background: rgba(3,7,18,.34);
}

.draft-history-division-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    padding: 0 2px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
    color: #9ca3af;
}

.draft-history-division-head > div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.draft-history-division-head > span {
    font-size: 8px;
    color: #4b5563;
}

.draft-history-division-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
}

.division-one .draft-history-division-dot {
    background: #60a5fa;
    box-shadow: 0 0 11px rgba(96,165,250,.5);
}

.division-two .draft-history-division-dot {
    background: #fbbf24;
    box-shadow: 0 0 11px rgba(251,191,36,.42);
}

.draft-history-run-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.draft-run-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 68px auto;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 11px 11px 11px 9px;
    border: 1px solid rgba(55,65,81,.6);
    border-radius: 12px;
    background:
        linear-gradient(105deg, rgba(31,41,55,.48), rgba(17,24,39,.24));
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.draft-run-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(75,85,99,.45);
    background: rgba(3,7,18,.5);
    font-size: 15px;
    font-weight: 900;
    color: #9ca3af;
}

.draft-run-main {
    min-width: 0;
}

.draft-run-record {
    font-size: 19px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.035em;
    color: #e5e7eb;
}

.draft-run-badge {
    display: inline-flex;
    margin-top: 5px;
    border-radius: 999px;
    padding: 3px 6px;
    font-size: 7px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .12em;
    color: #9ca3af;
    background: rgba(75,85,99,.16);
    border: 1px solid rgba(75,85,99,.3);
}

.draft-run-date {
    margin-top: 5px;
    font-size: 9px;
    color: #6b7280;
}

.draft-run-ovr {
    text-align: center;
}

.draft-run-ovr span {
    display: block;
    margin-bottom: 2px;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #4b5563;
}

.draft-run-ovr strong {
    font-size: 20px;
    line-height: 1;
    font-weight: 950;
    color: #818cf8;
}

.draft-run-view {
    min-width: 72px;
    border: 1px solid rgba(99,102,241,.28);
    border-radius: 8px;
    padding: 8px 9px;
    background: rgba(79,70,229,.08);
    color: #a5b4fc;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .08em;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.draft-run-view:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.draft-run-card.is-invincible {
    border-color: rgba(245,158,11,.38);
    background:
        radial-gradient(circle at 0% 50%, rgba(245,158,11,.12), transparent 35%),
        linear-gradient(105deg, rgba(69,45,8,.24), rgba(17,24,39,.34));
    box-shadow: inset 0 1px 0 rgba(251,191,36,.06);
}

.draft-run-card.is-invincible .draft-run-record,
.draft-run-card.is-invincible .draft-run-ovr strong {
    color: #fbbf24;
}

.draft-run-card.is-invincible .draft-run-badge {
    color: #fbbf24;
    border-color: rgba(245,158,11,.32);
    background: rgba(245,158,11,.08);
}

.draft-run-card.is-elite {
    border-color: rgba(148,163,184,.32);
    background:
        radial-gradient(circle at 0% 50%, rgba(148,163,184,.08), transparent 35%),
        linear-gradient(105deg, rgba(51,65,85,.24), rgba(17,24,39,.34));
}

.draft-run-card.is-elite .draft-run-record {
    color: #cbd5e1;
}

.draft-run-card.is-elite .draft-run-badge {
    color: #cbd5e1;
    border-color: rgba(148,163,184,.28);
}

.draft-run-card.is-strong .draft-run-record {
    color: #86efac;
}

.draft-history-empty {
    padding: 24px 14px;
    border: 1px dashed rgba(75,85,99,.5);
    border-radius: 11px;
    text-align: center;
    font-size: 10px;
    font-style: italic;
    color: #4b5563;
}

.draft-run-dialog {
    box-shadow: 0 35px 90px -35px rgba(0,0,0,.95);
}

.draft-run-dialog::backdrop {
    backdrop-filter: blur(5px);
}

@media (hover: hover) {
    .draft-run-card:hover {
        transform: translateY(-1px);
        border-color: rgba(99,102,241,.4);
        box-shadow: 0 14px 30px -26px rgba(99,102,241,.55);
    }

    .draft-run-card.is-invincible:hover {
        border-color: rgba(245,158,11,.58);
    }

    .draft-run-view:hover:not(:disabled) {
        transform: translateY(-1px);
        border-color: rgba(99,102,241,.5);
        background: rgba(79,70,229,.15);
    }
}

@media (max-width: 900px) {
    .draft-history-divisions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .draft-history-shell {
        padding: 14px;
    }

    .draft-history-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .draft-history-top-five {
        display: none;
    }

    .draft-run-card {
        grid-template-columns: 34px minmax(0, 1fr) 58px;
    }

    .draft-run-view {
        grid-column: 2 / -1;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .draft-run-card,
    .draft-run-view {
        transition: none !important;
        transform: none !important;
    }
}

/* =========================================================================
   DRAFT CHEMISTRY
   ========================================================================= */
.chemistry-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(75, 85, 99, .52);
    border-radius: 12px;
    padding: 12px 13px;
    background:
        radial-gradient(circle at 90% 0%, rgba(255,255,255,.035), transparent 42%),
        linear-gradient(145deg, rgba(17,24,39,.58), rgba(3,7,18,.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 12px 30px -28px rgba(0,0,0,.85);
}

.chemistry-panel-compact { padding: 9px 10px; }

.chemistry-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chemistry-kicker {
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .13em;
    color: #6b7280;
}

.chemistry-signal {
    display: flex;
    align-items: center;
    gap: 3px;
}

.chemistry-signal span {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(107,114,128,.45);
}

.chemistry-track {
    height: 7px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(31,41,55,.95);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.42);
}

.chemistry-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 260ms cubic-bezier(.2,.75,.25,1), background-color 180ms ease;
}

.chemistry-panel[data-chemistry-band="low"] {
    border-color: rgba(239,68,68,.20);
}
.chemistry-panel[data-chemistry-band="low"] .chemistry-fill {
    background: linear-gradient(90deg, #991b1b, #ef4444);
    box-shadow: 0 0 11px rgba(239,68,68,.24);
}
.chemistry-panel[data-chemistry-band="low"] .chemistry-signal span:first-child {
    background: #ef4444;
}

.chemistry-panel[data-chemistry-band="decent"] {
    border-color: rgba(249,115,22,.22);
}
.chemistry-panel[data-chemistry-band="decent"] .chemistry-fill {
    background: linear-gradient(90deg, #c2410c, #fb923c);
    box-shadow: 0 0 12px rgba(249,115,22,.25);
}
.chemistry-panel[data-chemistry-band="decent"] .chemistry-signal span:nth-child(-n+2) {
    background: #fb923c;
}

.chemistry-panel[data-chemistry-band="good"] {
    border-color: rgba(34,197,94,.23);
}
.chemistry-panel[data-chemistry-band="good"] .chemistry-fill {
    background: linear-gradient(90deg, #15803d, #4ade80);
    box-shadow: 0 0 13px rgba(34,197,94,.25);
}
.chemistry-panel[data-chemistry-band="good"] .chemistry-signal span {
    background: #4ade80;
}

.chemistry-note {
    margin-top: 7px;
    font-size: 8px;
    line-height: 1.35;
    color: #6b7280;
}

/* Chemistry is communicated primarily through the bar. Player cards only get
   a restrained connection glow so the formation stays clean. */
.card-presentation .chem-link-light {
    box-shadow: 0 10px 24px -21px rgba(96,165,250,.22), inset 0 1px 0 rgba(255,255,255,.025);
}
.card-presentation .chem-link-medium {
    box-shadow: 0 12px 28px -19px rgba(52,211,153,.30), inset 0 1px 0 rgba(255,255,255,.035);
}
.card-presentation .chem-link-strong {
    box-shadow: 0 14px 32px -18px rgba(74,222,128,.38), inset 0 1px 0 rgba(255,255,255,.045);
}

@media (prefers-reduced-motion: reduce) {
    .chemistry-fill { transition: none !important; }
}

