:root {
    /* ── Existing battle-page tokens (preserved) ── */
    --ds-bg-a: #173640;
    --ds-bg-b: #2d4d3f;
    --ds-bg-c: #7f6a3a;
    --ds-panel: rgba(18, 24, 30, 0.7);
    --ds-panel-border: rgba(255, 230, 166, 0.24);
    --ds-panel-soft: rgba(255, 255, 255, 0.04);
    --ds-title-a: #f5d690;
    --ds-title-b: #d8ac4d;
    --ds-text-main: #f8f2df;
    --ds-text-soft: #b9c3c9;
    --ds-accent: #ffd27a;
    --ds-accent-2: #6ed3b5;
    --ds-danger: #ff8f74;
    --ds-success: #9ce7a9;
    --ds-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);

    /* ── Dark-fantasy design tokens (Phase 1) ── */

    /* Backgrounds */
    --ds-bg-deep: #0d0f12;
    --ds-bg-primary: #161a1f;
    --ds-bg-secondary: #1c2127;

    /* Gold accents */
    --ds-gold: #c9a84c;
    --ds-gold-light: #e8d48b;
    --ds-gold-dim: #8a7235;

    /* Ember / combat */
    --ds-ember: #e85d3a;
    --ds-crimson: #c0392b;

    /* Rarity colors */
    --ds-rarity-common: #9d9d9d;
    --ds-rarity-uncommon: #1eff00;
    --ds-rarity-rare: #0070dd;
    --ds-rarity-epic: #a335ee;
    --ds-rarity-legendary: #ff8000;

    /* Typography */
    --ds-font-display: Georgia, 'Times New Roman', serif;
    --ds-font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing scale */
    --ds-space-1: 4px;
    --ds-space-2: 8px;
    --ds-space-3: 12px;
    --ds-space-4: 16px;
    --ds-space-5: 20px;
    --ds-space-6: 24px;
    --ds-space-7: 28px;
    --ds-space-8: 32px;
    --ds-space-9: 36px;
    --ds-space-10: 40px;
    --ds-space-11: 44px;
    --ds-space-12: 48px;

    /* Border radius */
    --ds-radius-sm: 4px;
    --ds-radius-md: 8px;
    --ds-radius-lg: 16px;

    /* Shadows */
    --ds-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --ds-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --ds-shadow-gold: 0 0 16px rgba(201, 168, 76, 0.3), 0 0 32px rgba(201, 168, 76, 0.15);

    /* Transitions */
    --ds-transition-fast: 150ms ease;
    --ds-transition-base: 250ms ease;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: var(--ds-font-body);
}

a:link,
a:visited {
    text-decoration: none;
}

a:active {
    text-decoration: underline;
}

/* ──────────────────────────────────────────────────────────────────────────
   Existing utility classes used on non-battle pages
   ────────────────────────────────────────────────────────────────────────── */

.negativeMargin {
    margin-left: -8px;
    margin-right: -8px;
}

.leftChat {
    margin-left: -8px;
}

.rightChat {
    margin-left: 0;
    margin-right: -16px;
}

.whiteGlowHeader {
    text-shadow: 0 0 5px white, 0 0 10px white, 0 0 20px white, 0 0 40px white;
}

.whiteGlowText {
    text-shadow: 0 0 5px white, 0 0 10px white, 0 0 10px white, 0 0 10px white;
}

.softWhiteGlowText {
    text-shadow: 0 0 2px white, 0 0 2px white, 0 0 2px white, 0 0 2px white;
}

.blackGlowHeader {
    text-shadow: 0 0 5px black, 0 0 10px black, 0 0 10px black, 0 0 10px black;
}

.blackGlowText {
    text-shadow: 0 0 5px black, 0 0 10px black, 0 0 10px black, 0 0 10px black;
}

.redGlowHeader {
    text-shadow: 0 0 5px red, 0 0 10px red, 0 0 10px red, 0 0 10px red;
}

.redGlowText {
    text-shadow: 0 0 5px red, 0 0 10px red, 0 0 10px red, 0 0 10px red;
}

.orangeGlowHeader {
    text-shadow: 0 0 5px orange, 0 0 10px orange, 0 0 10px orange, 0 0 10px orange;
}

.orangeGlowText {
    text-shadow: 0 0 5px orange, 0 0 10px orange, 0 0 10px orange, 0 0 10px orange;
}

.blueGlowHeader {
    text-shadow: 0 0 5px rgb(10, 10, 184), 0 0 10px rgb(10, 10, 184), 0 0 10px rgb(10, 10, 184), 0 0 10px rgb(10, 10, 184);
}

.blueGlowText {
    text-shadow: 0 0 5px rgb(10, 10, 184), 0 0 10px rgb(10, 10, 184), 0 0 10px rgb(10, 10, 184), 0 0 10px rgb(10, 10, 184);
}

.greenGlowHeader {
    text-shadow: 0 0 5px rgb(2, 75, 2), 0 0 10px rgb(2, 75, 2), 0 0 10px rgb(2, 75, 2), 0 0 10px rgb(2, 75, 2);
}

.greenGlowText {
    text-shadow: 0 0 5px rgb(2, 75, 2), 0 0 10px rgb(2, 75, 2), 0 0 10px rgb(2, 75, 2), 0 0 10px rgb(2, 75, 2);
}

.blueDragon {
    width: 69% !important;
    margin: auto;
}

.ammit {
    width: 57% !important;
    margin: auto;
}

.malphite {
    width: 68% !important;
    margin: auto;
}

#privacyPolicyModalButton:hover,
#gameRulesModalButton:hover,
#chatRulesModalButton:hover {
    text-decoration: underline !important;
    cursor: pointer !important;
}

.flex-container {
    display: flex;
    justify-content: space-evenly;
}

.alignCenter {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ──────────────────────────────────────────────────────────────────────────
   .ds scoped Bootstrap visual overrides (Task 6)
   Only apply when elements use .ds-* classes explicitly.
   These do NOT restyle existing Bootstrap elements — they are new classes.
   ────────────────────────────────────────────────────────────────────────── */

.ds .ds-btn {
    font-family: var(--ds-font-body);
    font-weight: 600;
    border: 1px solid var(--ds-gold-dim);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-2) var(--ds-space-4);
    cursor: pointer;
    transition: transform var(--ds-transition-fast),
                box-shadow var(--ds-transition-fast),
                background var(--ds-transition-fast);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.ds .ds-btn:hover {
    transform: translateY(-1px);
}

.ds .ds-btn:active {
    transform: translateY(0);
}

.ds .ds-btn-primary {
    background: linear-gradient(135deg, var(--ds-gold), var(--ds-gold-light));
    color: var(--ds-bg-deep);
    border-color: var(--ds-gold);
}

.ds .ds-btn-primary:hover {
    box-shadow: var(--ds-shadow-gold);
}

.ds .ds-panel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid var(--ds-gold-dim);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(46, 52, 58, 0.98), rgba(28, 32, 37, 0.98));
    color: var(--ds-text-main);
    font-family: var(--ds-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform var(--ds-transition-fast),
                box-shadow var(--ds-transition-fast),
                border-color var(--ds-transition-fast),
                color var(--ds-transition-fast),
                background var(--ds-transition-fast);
}

.ds .ds-panel-btn:hover {
    transform: translateY(-1px);
    border-color: var(--ds-gold);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.ds .ds-panel-btn:active {
    transform: translateY(0);
}

.ds .ds-panel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ds .ds-panel-btn--primary {
    background: linear-gradient(135deg, var(--ds-gold), var(--ds-gold-light));
    color: var(--ds-bg-deep);
    border-color: var(--ds-gold);
}

.ds .ds-panel-btn--primary:hover {
    box-shadow: var(--ds-shadow-gold);
}

.ds .ds-panel-btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ds-text-main);
    border-color: rgba(255, 255, 255, 0.14);
}

.ds .ds-panel-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ds .ds-panel-btn--ghost {
    background: transparent;
    color: var(--ds-gold);
    border-color: transparent;
}

.ds .ds-panel-btn--ghost:hover {
    background: rgba(201, 168, 76, 0.12);
}

.ds .ds-panel-btn--destructive {
    background: linear-gradient(180deg, rgba(93, 31, 31, 0.98), rgba(63, 18, 18, 0.98));
    color: var(--ds-danger);
    border-color: rgba(255, 143, 116, 0.45);
}

.ds .ds-panel-btn--destructive:hover {
    box-shadow: 0 0 0 1px rgba(255, 143, 116, 0.2), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.ds .ds-panel-btn--premium {
    background: linear-gradient(135deg, rgba(33, 45, 60, 0.98), rgba(17, 22, 30, 0.98));
    color: var(--ds-accent);
    border-color: rgba(255, 210, 122, 0.52);
}

.ds .ds-panel-btn--premium:hover {
    box-shadow: 0 0 16px rgba(255, 210, 122, 0.18);
}

.ds .ds-panel-btn--compact {
    min-height: 26px;
    padding: 2px 8px;
    font-size: 0.8rem;
}

.ds .ds-btn-secondary {
    background: var(--ds-bg-secondary);
    color: var(--ds-text-main);
    border-color: rgba(255, 255, 255, 0.12);
}

.ds .ds-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ds-gold-dim);
}

.ds .ds-btn-ghost {
    background: transparent;
    color: var(--ds-gold);
    border-color: transparent;
}

.ds .ds-btn-ghost:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--ds-gold-dim);
}

.ds .ds-input {
    font-family: var(--ds-font-body);
    background: var(--ds-bg-deep);
    color: var(--ds-text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-2) var(--ds-space-3);
    transition: border-color var(--ds-transition-fast),
                box-shadow var(--ds-transition-fast);
}

.ds .ds-input:focus {
    outline: none;
    border-color: var(--ds-gold-dim);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2);
}

.ds .ds-input::placeholder {
    color: var(--ds-text-soft);
    opacity: 0.6;
}

.ds .ds-modal-content {
    background: var(--ds-bg-primary);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-md);
    color: var(--ds-text-main);
}

.ds .ds-alert {
    background: var(--ds-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-3) var(--ds-space-4);
    color: var(--ds-text-main);
}

.ds .ds-alert-warning {
    border-color: var(--ds-gold-dim);
    background: rgba(201, 168, 76, 0.08);
}

.ds .ds-alert-danger {
    border-color: var(--ds-crimson);
    background: rgba(192, 57, 43, 0.08);
}

.ds .ds-alert-success {
    border-color: var(--ds-success);
    background: rgba(156, 231, 169, 0.08);
}

.ds .ds-panel-title {
    font-family: var(--ds-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ds-gold);
    margin-bottom: var(--ds-space-6);
    letter-spacing: 0.03em;
}

.ds .ds-panel-subtitle {
    margin: 0 0 var(--ds-space-2);
    color: var(--ds-text-soft);
    font-size: 0.92rem;
    line-height: 1.65;
}

.ds-recovery {
    min-height: 100vh;
    color: var(--ds-text-main);
    font-family: var(--ds-font-body);
    background:
        radial-gradient(ellipse 70% 50% at 20% 20%, rgba(201, 168, 76, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 45% at 80% 30%, rgba(232, 93, 58, 0.06), transparent 50%),
        linear-gradient(180deg, #0d0f12 0%, #11151a 55%, #0d0f12 100%);
    overflow-x: hidden;
}

.ds-recovery-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px 16px;
}

.ds-recovery-shell::before,
.ds-recovery-shell::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(14px);
    opacity: 0.8;
    pointer-events: none;
}

.ds-recovery-shell::before {
    top: 12%;
    left: 10%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.18), transparent 70%);
}

.ds-recovery-shell::after {
    right: 8%;
    bottom: 14%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(232, 93, 58, 0.14), transparent 72%);
}

.ds-recovery-card {
    width: min(100%, 920px);
    padding: clamp(24px, 4vw, 40px);
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(18, 24, 30, 0.96), rgba(10, 12, 15, 0.88)),
        var(--ds-panel);
}

.ds-recovery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(24px, 4vw, 40px);
    align-items: center;
}

.ds-recovery-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--ds-space-4);
    color: var(--ds-gold-light);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
}

.ds-recovery-mark::before {
    content: '';
    width: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ds-gold-light));
}

.ds-recovery-title {
    font-family: var(--ds-font-display);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.08;
    margin: 0 0 var(--ds-space-4);
    color: var(--ds-text-main);
}

.ds-recovery-copy {
    margin: 0 0 var(--ds-space-4);
    color: var(--ds-text-soft);
    line-height: 1.75;
    max-width: 52ch;
}

.ds-recovery-steps {
    display: grid;
    gap: var(--ds-space-3);
    margin-top: var(--ds-space-5);
}

.ds-recovery-step {
    display: flex;
    gap: var(--ds-space-3);
    align-items: flex-start;
    padding: var(--ds-space-3);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 230, 166, 0.08);
}

.ds-recovery-step-badge {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(201, 168, 76, 0.14);
    color: var(--ds-gold-light);
    font-weight: 700;
    font-size: 0.78rem;
}

.ds-recovery-step-title {
    margin: 0 0 2px;
    font-family: var(--ds-font-display);
    font-size: 0.95rem;
    color: var(--ds-text-main);
}

.ds-recovery-step-copy {
    margin: 0;
    color: var(--ds-text-soft);
    font-size: 0.92rem;
    line-height: 1.6;
}

.ds-recovery-panel {
    padding: clamp(22px, 3vw, 28px);
}

.ds-recovery-form {
    display: grid;
    gap: var(--ds-space-4);
}

.ds-recovery-label {
    display: block;
    margin-bottom: var(--ds-space-1);
    color: var(--ds-text-soft);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ds-recovery .ds-input {
    width: 100%;
    padding: var(--ds-space-3) var(--ds-space-4);
}

.ds-recovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-3);
    align-items: center;
    margin-top: var(--ds-space-2);
}

.ds-recovery-link {
    color: var(--ds-gold);
    font-weight: 600;
}

.ds-recovery-link:hover {
    color: var(--ds-gold-light);
    text-decoration: underline;
}

.ds-recovery-note {
    margin: var(--ds-space-4) 0 0;
    color: var(--ds-text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.ds-recovery-hero-logo {
    display: block;
    width: min(220px, 70%);
    height: auto;
    margin: 0 0 var(--ds-space-4);
    filter: drop-shadow(0 4px 20px rgba(201, 168, 76, 0.18));
}

.ds-recovery-meta {
    margin-top: var(--ds-space-5);
    padding-top: var(--ds-space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--ds-text-soft);
    font-size: 0.86rem;
    line-height: 1.6;
}

.ds-recovery-meta strong {
    color: var(--ds-text-main);
}

.ds .ds-list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--ds-text-main);
    padding: var(--ds-space-2) var(--ds-space-3);
    transition: background var(--ds-transition-fast);
}

.ds .ds-list-group-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ──────────────────────────────────────────────────────────────────────────
   Reusable component classes (Task 8)
   ────────────────────────────────────────────────────────────────────────── */

/* Glassmorphism panel */
.ds .ds-panel {
    background: linear-gradient(
        170deg,
        rgba(22, 26, 31, 0.85),
        rgba(13, 15, 18, 0.78)
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-md);
    padding: var(--ds-space-4);
    position: relative;
    overflow: hidden;
}

.ds .ds-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ds-gold-dim), transparent);
    opacity: 0.5;
    pointer-events: none;
}

/* Badge base */
.ds .ds-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--ds-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* Rarity badge variants */
.ds .ds-badge-common {
    background: rgba(157, 157, 157, 0.15);
    color: var(--ds-rarity-common);
    border: 1px solid rgba(157, 157, 157, 0.3);
}

.ds .ds-badge-uncommon {
    background: rgba(30, 255, 0, 0.1);
    color: var(--ds-rarity-uncommon);
    border: 1px solid rgba(30, 255, 0, 0.25);
}

.ds .ds-badge-rare {
    background: rgba(0, 112, 221, 0.12);
    color: var(--ds-rarity-rare);
    border: 1px solid rgba(0, 112, 221, 0.3);
}

.ds .ds-badge-epic {
    background: rgba(163, 53, 238, 0.12);
    color: var(--ds-rarity-epic);
    border: 1px solid rgba(163, 53, 238, 0.3);
}

.ds .ds-badge-legendary {
    background: rgba(255, 128, 0, 0.12);
    color: var(--ds-rarity-legendary);
    border: 1px solid rgba(255, 128, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 128, 0, 0.15);
}

/* Progress bar */
.ds .ds-bar {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.ds .ds-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--ds-gold-dim), var(--ds-gold));
    transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ds .ds-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 9999px 9999px 0 0;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   Animation classes (Task 9)
   ────────────────────────────────────────────────────────────────────────── */

@keyframes ds-fade-in-kf {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ds-slide-up-kf {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ds-pulse-glow-kf {
    0%, 100% { box-shadow: 0 0 8px rgba(201, 168, 76, 0.2); }
    50% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.5); }
}

@keyframes ds-ember-float-kf {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.2);
    }
}

@keyframes ds-shimmer-kf {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.ds-fade-in {
    animation: ds-fade-in-kf 400ms ease both;
}

.ds-slide-up {
    animation: ds-slide-up-kf 500ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ds-pulse-glow {
    animation: ds-pulse-glow-kf 2s ease-in-out infinite;
}

.ds-ember-float {
    animation: ds-ember-float-kf 2.5s ease-out both;
}

.ds-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.15) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: ds-shimmer-kf 2s linear infinite;
}

/* ──────────────────────────────────────────────────────────────────────────
   Reduced motion scaffolding (Task 7 + Task 9 disable)
   ────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    /* Disable all ds animation classes */
    .ds-fade-in,
    .ds-slide-up,
    .ds-pulse-glow,
    .ds-ember-float,
    .ds-shimmer {
        animation: none;
    }

    /* Disable the existing panel-rise animation */
    .battle-page .game-panel {
        animation: none;
    }

    /* Disable home page ember animations */
    .ds-home .ds-hero-bg::before,
    .ds-home .ds-hero-bg::after {
        animation: none;
    }

    .ds-home .ds-hero-bg .ds-ember-particle {
        animation: none;
    }

    /* Disable Phase 3 animations */
    .battle-page .ds-rarity-legendary {
        animation: none;
    }

    .ds .ds-bar-fill-hp.ds-bar-low {
        animation: none;
    }

    /* Scaffolding: future animation overrides go here */
    .ds *,
    .ds *::before,
    .ds *::after {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   HOME PAGE — Premium Dark-Fantasy Landing (Phase 2)
   ────────────────────────────────────────────────────────────────────────── */
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 360px;
    width: 100%;
}

.ds-toast {
    pointer-events: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--ds-radius-md, 8px);
    background: rgba(22, 26, 31, 0.95);
    border: 1px solid var(--ds-panel-border, rgba(255, 230, 166, 0.24));
    border-left: 4px solid var(--ds-gold, #c9a84c);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--ds-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.4));
    color: var(--ds-text-main, #f8f2df);
    font-family: var(--ds-font-body, 'Inter', sans-serif);
    font-size: 0.88em;
    position: relative;
    overflow: hidden;
    animation: ds-toast-slide-in 300ms ease forwards;
    opacity: 0;
    transform: translateX(100%);
}

.ds-toast.ds-toast-exit {
    animation: ds-toast-slide-out 200ms ease forwards;
}

@keyframes ds-toast-slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ds-toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.ds-toast-icon {
    font-size: 1.3em;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.ds-toast-content {
    flex: 1;
    min-width: 0;
}

.ds-toast-title {
    font-family: var(--ds-font-display, 'Cinzel', serif);
    font-weight: 600;
    font-size: 0.92em;
    margin-bottom: 2px;
    color: var(--ds-gold-light, #e8d48b);
}

.ds-toast-message {
    font-size: 0.85em;
    color: var(--ds-text-soft, #b9c3c9);
    line-height: 1.35;
}

.ds-toast-close {
    pointer-events: auto;
    background: none;
    border: none;
    color: var(--ds-text-soft, #b9c3c9);
    cursor: pointer;
    font-size: 1.1em;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--ds-transition-fast, 150ms ease);
    flex-shrink: 0;
}

.ds-toast-close:hover {
    opacity: 1;
}

.ds-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ds-gold, #c9a84c);
    border-radius: 0 0 0 var(--ds-radius-md, 8px);
    animation: ds-toast-progress-shrink 5s linear forwards;
    width: 100%;
}

@keyframes ds-toast-progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

.ds-toast-loot {
    border-left-color: var(--ds-gold, #c9a84c);
}

.ds-toast-loot .ds-toast-icon { color: var(--ds-gold, #c9a84c); }

.ds-toast-quest {
    border-left-color: var(--ds-gold, #c9a84c);
}

.ds-toast-quest .ds-toast-icon { color: var(--ds-success, #9ce7a9); }

.ds-toast-levelup {
    border-left-color: var(--ds-gold-light, #e8d48b);
    background: linear-gradient(135deg, rgba(22, 26, 31, 0.95), rgba(201, 168, 76, 0.1));
}

.ds-toast-levelup .ds-toast-icon { color: var(--ds-gold-light, #e8d48b); }
.ds-toast-levelup .ds-toast-progress { background: var(--ds-gold-light, #e8d48b); }

.ds-toast-pvp {
    border-left-color: var(--ds-ember, #e85d3a);
}

.ds-toast-pvp .ds-toast-icon { color: var(--ds-ember, #e85d3a); }
.ds-toast-pvp .ds-toast-progress { background: var(--ds-ember, #e85d3a); }

.ds-toast-guild {
    border-left-color: var(--ds-accent-2, #6ed3b5);
}

.ds-toast-guild .ds-toast-icon { color: var(--ds-accent-2, #6ed3b5); }
.ds-toast-guild .ds-toast-progress { background: var(--ds-accent-2, #6ed3b5); }

.ds-toast-market {
    border-left-color: var(--ds-gold, #c9a84c);
}

.ds-toast-market .ds-toast-icon { color: var(--ds-gold, #c9a84c); }

@media (prefers-reduced-motion: reduce) {
    .ds-toast {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .ds-toast.ds-toast-exit {
        animation: none;
        display: none;
    }
    .ds-toast-progress {
        animation: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ds-toast-container {
        right: 8px;
        left: 8px;
        max-width: none;
    }
}

/* ── Notification Bell & History Panel (Phase 4) ── */

.ds-notif-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--ds-text-soft, #b9c3c9);
    cursor: pointer;
    padding: 4px 8px;
    vertical-align: middle;
    transition: color var(--ds-transition-fast, 150ms ease);
}

.ds-notif-bell:hover {
    color: var(--ds-gold, #c9a84c);
}

.ds-notif-badge {
    position: absolute;
    top: -2px;
    right: 0;
    background: var(--ds-ember, #e85d3a);
    color: #fff;
    font-size: 0.65em;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
}

.ds-notif-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 100vw;
    height: 100vh;
    background: rgba(13, 15, 18, 0.97);
    border-left: 1px solid var(--ds-panel-border, rgba(255, 230, 166, 0.24));
    z-index: 10001;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ds-notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ds-panel-border, rgba(255, 230, 166, 0.24));
}

.ds-notif-panel-title {
    font-family: var(--ds-font-display, 'Cinzel', serif);
    font-size: 1em;
    color: var(--ds-gold-light, #e8d48b);
    font-weight: 600;
}

.ds-notif-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.ds-notif-item {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--ds-gold-dim, #8a7235);
}

.ds-notif-item-title {
    font-family: var(--ds-font-display, 'Cinzel', serif);
    font-size: 0.85em;
    color: var(--ds-gold-light, #e8d48b);
    font-weight: 600;
    margin-bottom: 2px;
}

.ds-notif-item-message {
    font-size: 0.82em;
    color: var(--ds-text-soft, #b9c3c9);
    line-height: 1.3;
}

.ds-notif-item-time {
    font-size: 0.72em;
    color: rgba(185, 195, 201, 0.5);
    margin-top: 4px;
}

.ds-notif-empty {
    text-align: center;
    color: var(--ds-text-soft, #b9c3c9);
    padding: 40px 20px;
    font-size: 0.9em;
}

/* Type-specific left borders for history items */
.ds-notif-item.ds-toast-loot { border-left-color: var(--ds-gold, #c9a84c); }
.ds-notif-item.ds-toast-quest { border-left-color: var(--ds-success, #9ce7a9); }
.ds-notif-item.ds-toast-levelup { border-left-color: var(--ds-gold-light, #e8d48b); }
.ds-notif-item.ds-toast-pvp { border-left-color: var(--ds-ember, #e85d3a); }
.ds-notif-item.ds-toast-guild { border-left-color: var(--ds-accent-2, #6ed3b5); }
.ds-notif-item.ds-toast-market { border-left-color: var(--ds-gold, #c9a84c); }

/* ── Onboarding Tour (Phase 4) ── */

.ds-onboarding-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10001;
}

.ds-onboarding-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    z-index: 10003;
    background: var(--ds-bg-primary, #161a1f);
    border: 2px solid var(--ds-gold, #c9a84c);
    border-radius: var(--ds-radius-lg, 16px);
    padding: 32px 36px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: var(--ds-shadow-gold, 0 0 16px rgba(201, 168, 76, 0.3), 0 0 32px rgba(201, 168, 76, 0.15));
    animation: ds-onboarding-fade-in 400ms ease forwards;
    opacity: 0;
}

@keyframes ds-onboarding-fade-in {
    to { opacity: 1; }
}

.ds-onboarding-title {
    font-family: var(--ds-font-display, 'Cinzel', serif);
    font-size: 1.4em;
    font-weight: 700;
    color: var(--ds-gold-light, #e8d48b);
    margin: 0 0 12px 0;
}

.ds-onboarding-body {
    color: var(--ds-text-soft, #b9c3c9);
    font-size: 0.92em;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.ds-onboarding-btn {
    background: linear-gradient(135deg, var(--ds-gold-dim, #8a7235), var(--ds-gold, #c9a84c));
    color: var(--ds-bg-deep, #0d0f12);
    font-family: var(--ds-font-display, 'Cinzel', serif);
    font-weight: 700;
    font-size: 0.95em;
    border: none;
    border-radius: var(--ds-radius-md, 8px);
    padding: 10px 28px;
    cursor: pointer;
    transition: box-shadow var(--ds-transition-base, 250ms ease), transform var(--ds-transition-fast, 150ms ease);
}

.ds-onboarding-btn:hover {
    box-shadow: var(--ds-shadow-gold);
    transform: translateY(-1px);
}

.ds-onboarding-step-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.75em;
    color: var(--ds-text-soft, #b9c3c9);
    opacity: 0.6;
}

.ds-onboarding-tooltip {
    position: fixed;
    z-index: 10003;
    box-sizing: border-box;
    background: var(--ds-bg-primary, #161a1f);
    border: 2px solid var(--ds-gold, #c9a84c);
    border-radius: var(--ds-radius-md, 8px);
    padding: 16px 20px;
    max-width: 340px;
    width: 90%;
    box-shadow: var(--ds-shadow-gold);
    animation: ds-onboarding-fade-in 300ms ease forwards;
    opacity: 0;
}

.ds-help-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0 8px;
    border: 1px solid rgba(255, 214, 134, 0.36);
    border-radius: 999px;
    background: rgba(255, 214, 134, 0.1);
    color: var(--ds-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.7;
    cursor: help;
}

.ds-onboarding-tooltip-text {
    color: var(--ds-text-main, #f8f2df);
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.ds-onboarding-highlight {
    box-shadow: 0 0 0 4px var(--ds-gold, #c9a84c), 0 0 16px rgba(201, 168, 76, 0.4) !important;
    border-radius: var(--ds-radius-md, 8px);
    animation: ds-onboarding-pulse 2s ease-in-out infinite;
}

@keyframes ds-onboarding-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--ds-gold, #c9a84c), 0 0 16px rgba(201, 168, 76, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px var(--ds-gold-light, #e8d48b), 0 0 24px rgba(201, 168, 76, 0.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-onboarding-card {
        animation: none;
        opacity: 1;
    }
    .ds-onboarding-tooltip {
        animation: none;
        opacity: 1;
    }
    .ds-onboarding-highlight {
        animation: none;
        box-shadow: 0 0 0 4px var(--ds-gold, #c9a84c) !important;
    }
}

@media (max-width: 480px) {
    .ds-onboarding-card {
        padding: 20px 24px;
    }
    .ds-onboarding-tooltip {
        left: 5%;
        right: 5%;
        width: auto;
        max-width: none;
    }
}
