﻿/* ============================================================
   Learn Page — Blindside Chess
   ============================================================ */

.learn-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem 5rem;
}

/* ── Hero ── */
.learn-hero {
    margin-bottom: 2rem;
}

    .learn-hero h1 {
        font-family: 'Cinzel', serif;
        font-size: clamp(2.2rem, 4.5vw, 3.2rem);
        font-weight: 900;
        color: #ffe8a0;
        letter-spacing: -0.02em;
        line-height: 1;
        text-shadow: 0 0 18px rgba(213, 166, 66, 0.2);
        margin-bottom: 0.4rem;
    }

.learn-hero__subtitle {
    font-size: 1rem;
    color: rgba(247, 234, 208, 0.5);
    letter-spacing: 0.02em;
}

/* ── Tabs ── */
.learn-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(213, 166, 66, 0.25);
    border-radius: 8px;
    overflow: hidden;
    max-width: 480px;
}

.learn-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.2rem;
    border: none;
    background: rgba(10, 9, 8, 0.8);
    color: rgba(247, 234, 208, 0.5);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 160ms ease;
}

    .learn-tab + .learn-tab {
        border-left: 1px solid rgba(213, 166, 66, 0.15);
    }

    .learn-tab:hover {
        color: rgba(247, 234, 208, 0.75);
        background: rgba(213, 166, 66, 0.06);
    }

/*    .learn-tab:focus {
        outline: none;
    }

    .learn-tab.learn-tab--active:focus*/
    .learn-tab.learn-tab--active {
        color: #120d07;
        background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.55), transparent 40%), linear-gradient(135deg, #ffe8a0 0%, #d6a745 45%, #8f5f1d 100%);
        box-shadow: 0 0 14px rgba(213, 166, 66, 0.3);
    }

.learn-tab__icon {
    font-size: 0.85rem;
}

/* ── Main content: 3-column layout ── */
.learn-content {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

/* ── Piece selector ── */
.learn-piece-selector {
    border: 1px solid rgba(213, 166, 66, 0.28);
    border-radius: 8px;
    background: rgba(10, 9, 8, 0.92);
    overflow: hidden;
}

.learn-piece-selector__header {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(213, 166, 66, 0.18);
    background: rgba(213, 166, 66, 0.04);
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d5a642;
}

.learn-piece-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: transparent;
    color: rgba(247, 234, 208, 0.65);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 140ms ease;
    text-align: left;
}

    .learn-piece-btn:hover {
        background: rgba(213, 166, 66, 0.06);
        color: rgba(247, 234, 208, 0.85);
    }

    .learn-piece-btn.learn-piece-btn--active {
        color: #120d07;
        background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.4), transparent 50%), linear-gradient(135deg, #ffe8a0 0%, #d6a745 45%, #8f5f1d 100%);
        box-shadow: 0 2px 8px rgba(213, 166, 66, 0.2);
    }

.learn-piece-btn__icon {
    font-size: 1.15rem;
    width: 28px;
    text-align: center;
}

.learn-piece-btn__name {
    flex: 1;
}

.learn-piece-btn__arrow {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* ── Board area ── */
.learn-board-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.learn-mini-board {
    display: grid;
    grid-template-columns: repeat(var(--board-cols), 52px);
    grid-template-rows: repeat(var(--board-rows), 52px);
    gap: 1px;
    background: rgba(176, 141, 87, 0.4);
    border: 2px solid rgba(176, 141, 87, 0.5);
    border-radius: 4px;
    position: relative;
}

/* Board squares */
.lsq {
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.lsq--light {
    background: #7D6348;
}

.lsq--dark {
    background: #1E1B18;
}

.lsq--fog::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(24, 24, 26, 0.88);
    z-index: 1;
}

.lsq--center {
    box-shadow: inset 0 0 0 2px rgba(213, 166, 66, 0.6);
    z-index: 2;
}

.lsq__piece {
    position: relative;
    z-index: 3;
    font-size: 1.4rem;
    line-height: 1;
    user-select: none;
}

.lsq__piece--specter {
    color: #d5a642;
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 1.2rem;
    opacity: 0.55;
    animation: learnSpecterPulse 1.75s ease-in-out infinite;
}

@keyframes learnSpecterPulse {
    0%, 100% {
        opacity: 0.30;
        filter: brightness(1.1) drop-shadow(0 0 6px rgba(255, 230, 170, 0.35));
    }

    50% {
        opacity: 0.55;
        filter: brightness(1.35) drop-shadow(0 0 16px rgba(255, 230, 170, 0.85));
    }
}

/* Eye icon on squares */
.lsq__eye {
    position: absolute;
    z-index: 4;
    width: 22px;
    height: 14px;
    pointer-events: none;
}

.lsq__eye-outline {
    fill: rgba(5, 5, 7, 0.5);
    stroke: rgba(255, 232, 160, 0.85);
    stroke-width: 1.5;
}
.lsq__eye-outline__blindside {
    opacity: 0.70;
}

.lsq__eye-iris {
    fill: rgba(255, 232, 160, 0.85);
}
.lsq__eye-iris__blindside {
    opacity: 0.70;
}

/* Vision lines SVG overlay */
.learn-vision-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.learn-vision-line {
    stroke: rgba(255, 232, 160, 0.6);
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
    stroke-linecap: round;
    opacity: 0.70;
    filter: drop-shadow(0 0 3px rgba(255, 232, 160, 0.3));
}

/* ── Description panel ── */
.learn-description {
    border: 1px solid rgba(213, 166, 66, 0.28);
    border-radius: 8px;
    background: rgba(10, 9, 8, 0.92);
    padding: 1.5rem;
}

.learn-description__title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffe8a0;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.learn-description__divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #d5a642, transparent);
    margin-bottom: 1rem;
    position: relative;
}

    .learn-description__divider::after {
        content: '◆';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 0.5rem;
        color: #d5a642;
    }

.learn-description__intro {
    color: rgba(247, 234, 208, 0.7);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.learn-description__points {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.learn-point {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(247, 234, 208, 0.6);
    line-height: 1.45;
}

.learn-point__diamond {
    color: #d5a642;
    font-size: 0.65rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.learn-special-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-left: 2px solid rgba(213, 166, 66, 0.4);
    background: rgba(213, 166, 66, 0.04);
    border-radius: 0 6px 6px 0;
    color: #d5a642;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.45;
}

/* ── Bottom bar: Quick Rule + Legend ── */
.learn-bottom-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.learn-quick-rule {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(213, 166, 66, 0.28);
    border-radius: 8px;
    background: rgba(10, 9, 8, 0.92);
}

.learn-quick-rule__icon {
    font-size: 1.6rem;
    color: #d5a642;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(213, 166, 66, 0.25);
    background: rgba(213, 166, 66, 0.06);
}

.learn-quick-rule__label {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d5a642;
    margin-bottom: 0.2rem;
}

.learn-quick-rule__text {
    color: rgba(247, 234, 208, 0.65);
    font-size: 0.85rem;
    line-height: 1.45;
}

/* Legend */
.learn-legend {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(213, 166, 66, 0.28);
    border-radius: 8px;
    background: rgba(10, 9, 8, 0.92);
}

.learn-legend__label {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d5a642;
    margin-bottom: 0.6rem;
}

.learn-legend__items {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.learn-legend__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .learn-legend__item strong {
        display: block;
        font-size: 0.7rem;
        font-weight: 700;
        color: rgba(247, 234, 208, 0.8);
        letter-spacing: 0.03em;
    }

    .learn-legend__item span {
        font-size: 0.65rem;
        color: rgba(247, 234, 208, 0.4);
    }

.learn-legend__eye {
    width: 28px;
    height: 18px;
    flex-shrink: 0;
}

.learn-legend__swatch {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.learn-legend__swatch--line {
    color: rgba(255, 232, 160, 0.7);
    font-size: 0.7rem;
    letter-spacing: 2px;
    border: 1px dashed rgba(255, 232, 160, 0.5);
    background: rgba(10, 9, 8, 0.8);
}

.learn-legend__swatch--fog {
    background: rgba(24, 24, 26, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.learn-legend__swatch--known {
    background: #7D6348;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.learn-legend__swatch--specter {
    background: #1E1B18;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d5a642;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    animation: learnSpecterPulse 1.75s ease-in-out infinite;
}

.learn-legend__swatch--selected {
    background: rgba(213, 166, 66, 0.12);
    border: 2px solid rgba(213, 166, 66, 0.6);
    font-size: 0.9rem;
}

/* ── Blindside supplementary cards ── */
.learn-supplementary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.learn-supp-card {
    padding: 1.2rem;
    border: 1px solid rgba(213, 166, 66, 0.2);
    border-radius: 10px;
    background: rgba(10, 9, 8, 0.85);
    transition: border-color 200ms ease;
}

    .learn-supp-card:hover {
        border-color: rgba(213, 166, 66, 0.35);
    }

.learn-supp-card__icon {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    display: block;
}

.learn-supp-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 900;
    color: #ffe8a0;
    letter-spacing: 0.05em;
    margin-bottom: 0.45rem;
}

.learn-supp-card p {
    color: rgba(247, 234, 208, 0.5);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* ── King callout ── */
.learn-king-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(213, 166, 66, 0.4);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(213, 166, 66, 0.08), rgba(213, 166, 66, 0.02));
}

.learn-king-callout__icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.learn-king-callout__title {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 900;
    color: #ffe8a0;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.learn-king-callout__text {
    color: rgba(247, 234, 208, 0.55);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* ── CTA ── */
.learn-cta {
    text-align: center;
    padding: 3rem 2rem;
    border: 1px solid rgba(213, 166, 66, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(213, 166, 66, 0.06), rgba(213, 166, 66, 0.02));
}

    .learn-cta h2 {
        font-family: 'Cinzel', serif;
        font-size: 1.6rem;
        font-weight: 900;
        color: #ffe8a0;
        margin-bottom: 0.6rem;
    }

    .learn-cta p {
        color: rgba(247, 234, 208, 0.5);
        font-size: 0.92rem;
        margin-bottom: 1.5rem;
        max-width: 42ch;
        margin-left: auto;
        margin-right: auto;
    }

.learn-cta__buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.learn-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 160ms ease;
}

.learn-cta__btn--primary {
    color: #130e08;
    background: radial-gradient(circle at 40% 0%, rgba(255, 255, 255, 0.58), transparent 42%), linear-gradient(135deg, #ffe8a0 0%, #d6a745 45%, #8f5f1d 100%);
    box-shadow: 0 0 22px rgba(213, 166, 66, 0.3);
}

    .learn-cta__btn--primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 0 32px rgba(213, 166, 66, 0.45);
    }

.learn-cta__btn--secondary {
    color: #ffe8a0;
    border: 1px solid rgba(213, 166, 66, 0.4);
    background: rgba(5, 5, 6, 0.4);
}

    .learn-cta__btn--secondary:hover {
        background: rgba(213, 166, 66, 0.1);
    }

/* ═══ Endgame Rules Panel (shared, both tabs) ═══ */
.learn-endgame-panel {
    margin: 2.5rem 0;
    padding: 1.75rem 2rem;
    border: 1px solid rgba(255, 232, 160, 0.28);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 232, 160, 0.04) 0%, rgba(5, 5, 7, 0) 60%), rgba(12, 11, 14, 0.6);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
}

.learn-endgame-panel__header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.learn-endgame-panel__icon {
    font-size: 2rem;
    line-height: 1;
    color: rgba(255, 232, 160, 0.9);
    flex-shrink: 0;
}

.learn-endgame-panel__title {
    margin: 0;
    font-size: 1.35rem;
    color: rgba(255, 232, 160, 0.95);
    letter-spacing: 0.01em;
}

.learn-endgame-panel__subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: rgba(220, 210, 190, 0.6);
}

.learn-endgame-panel__divider {
    height: 1px;
    margin: 1.1rem 0;
    background: linear-gradient(90deg, rgba(255, 232, 160, 0.35) 0%, rgba(255, 232, 160, 0.05) 100%);
}

.learn-endgame-panel__intro {
    margin: 0 0 1.4rem;
    color: rgba(225, 218, 205, 0.82);
    line-height: 1.55;
}

.learn-endgame-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 760px) {
    .learn-endgame-grid {
        grid-template-columns: 1fr;
    }
}

.learn-endgame-rule {
    position: relative;
    padding: 1.25rem 1.25rem 1.25rem 1.25rem;
    border: 1px solid rgba(255, 232, 160, 0.12);
    border-radius: 10px;
    background: rgba(8, 7, 10, 0.55);
}

.learn-endgame-rule__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 232, 160, 0.5);
    color: rgba(255, 232, 160, 0.95);
    font-weight: 700;
    font-size: 0.95rem;
}

.learn-endgame-rule h4 {
    margin: 0 0 0.5rem;
    color: rgba(245, 238, 222, 0.95);
    font-size: 1.05rem;
}

.learn-endgame-rule > p {
    margin: 0 0 0.85rem;
    color: rgba(210, 203, 190, 0.78);
    line-height: 1.5;
    font-size: 0.92rem;
}

.learn-endgame-rule__points {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Reuses your existing .learn-point / .learn-point__diamond, with result-colored variants */
.learn-point__diamond--loss {
    color: rgba(232, 120, 110, 0.9);
}

.learn-point__diamond--draw {
    color: rgba(150, 190, 230, 0.9);
}

.learn-endgame-panel__note {
    margin-top: 1.4rem;
    padding: 0.85rem 1.1rem;
    border-left: 3px solid rgba(255, 232, 160, 0.55);
    background: rgba(255, 232, 160, 0.05);
    border-radius: 0 8px 8px 0;
    color: rgba(230, 222, 205, 0.85);
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 980px) {
    .learn-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .learn-piece-selector {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    .learn-piece-selector__header {
        width: 100%;
    }

    .learn-piece-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .learn-bottom-bar {
        grid-template-columns: 1fr;
    }

    .learn-legend__items {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {

    /* ── Page padding ── */
    .learn-page {
        padding: 1rem 0.75rem 3rem;
    }

    /* ── Hero ── */
    .learn-hero {
        margin-bottom: 1rem;
    }

        .learn-hero h1 {
            font-size: 1.8rem;
        }

    .learn-hero__subtitle {
        font-size: 0.82rem;
    }

    /* ── Tabs: full width ── */
    .learn-tabs {
        max-width: 100%;
    }

    .learn-tab {
        padding: 0.6rem 0.5rem;
        font-size: 0.6rem;
        letter-spacing: 0.06em;
        gap: 0.3rem;
    }

    .learn-tab__icon {
        font-size: 0.7rem;
    }

    /* ── Content: single column ── */
    .learn-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* ── Piece selector: horizontal scroll ── */
    .learn-piece-selector {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow-x: visible;
        justify-items: center;
    }

        .learn-piece-selector::-webkit-scrollbar {
            display: none;
        }

    .learn-piece-selector__header {
        display: none;
    }

    .learn-piece-btn {
        flex-shrink: 0;
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.35rem 0.4rem;
        min-width: 58px;
        max-width: 58px;
        justify-content: center;
        align-items: center;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.13);
        border-right: 1px solid rgba(255, 255, 255, 0.13);
        font-size: 0.55rem;
    }

    .learn-piece-btn__icon {
        font-size: 1.2rem;
        width: auto;
    }

    .learn-piece-btn__arrow {
        display: none;
    }

    /* ── Mini board: smaller squares ── */
    .learn-mini-board {
        grid-template-columns: repeat(var(--board-cols), 42px);
        grid-template-rows: repeat(var(--board-rows), 42px);
    }

    .lsq__piece {
        font-size: 1.1rem;
    }

    .lsq__piece--specter {
        font-size: 0.95rem;
    }

    .lsq__eye {
        width: 17px;
        height: 11px;
    }

    /* ── Description panel ── */
    .learn-description {
        padding: 1rem;
    }

    .learn-description__title {
        font-size: 0.88rem;
    }

    .learn-description__intro {
        font-size: 0.78rem;
    }

    .learn-point {
        font-size: 0.72rem;
    }

    .learn-special-note {
        font-size: 0.72rem;
    }

    /* ── Bottom bar: stack ── */
    .learn-bottom-bar {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .learn-quick-rule {
        padding: 0.75rem 0.85rem;
        gap: 0.65rem;
    }

    .learn-quick-rule__icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .learn-quick-rule__label {
        font-size: 0.55rem;
    }

    .learn-quick-rule__text {
        font-size: 0.75rem;
    }

    /* ── Legend: stack items ── */
    .learn-legend {
        padding: 0.75rem 0.85rem;
    }

    .learn-legend__items {
        flex-direction: column;
        gap: 0.6rem;
    }

    .learn-legend__item strong {
        font-size: 0.62rem;
    }

    .learn-legend__item span {
        font-size: 0.58rem;
    }

    .learn-legend__swatch {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    /* ── Supplementary cards ── */
    .learn-supplementary {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .learn-supp-card {
        padding: 0.85rem;
    }

    .learn-supp-card__icon {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .learn-supp-card h4 {
        font-size: 0.68rem;
    }

    .learn-supp-card p {
        font-size: 0.72rem;
    }

    /* ── King callout ── */
    .learn-king-callout {
        flex-direction: column;
        text-align: center;
        gap: 0.6rem;
        padding: 1rem;
    }

    .learn-king-callout__icon {
        font-size: 1.6rem;
    }

    .learn-king-callout__title {
        font-size: 0.75rem;
    }

    .learn-king-callout__text {
        font-size: 0.72rem;
    }

    /* ── CTA ── */
    .learn-cta {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

        .learn-cta h2 {
            font-size: 1.2rem;
        }

        .learn-cta p {
            font-size: 0.78rem;
            max-width: unset;
        }

    .learn-cta__buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .learn-cta__btn {
        width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.62rem;
    }
}

/* ── Active nav link ── */
.nav-links--active {
    color: #ffe8a0 !important;
    text-shadow: 0 0 12px rgba(213, 166, 66, 0.45);
}

.account-menu {
    position: relative;
}

.account-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0.4rem;
    font: inherit;
    cursor: pointer;
}

    .account-menu__trigger:hover,
    .account-menu__trigger:focus-visible {
        background: rgba(255, 255, 255, 0.08);
    }

.account-menu__avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.account-menu__name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 1000;
    min-width: 190px;
    padding: 0.4rem;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.4);
}

    .account-menu__dropdown a,
    .account-menu__dropdown button {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        width: 100%;
        padding: 0.65rem 0.75rem;
        color: inherit;
        background: transparent;
        border: 0;
        border-radius: 0.35rem;
        font: inherit;
        text-decoration: none;
        text-align: left;
        cursor: pointer;
    }

        .account-menu__dropdown a:hover,
        .account-menu__dropdown button:hover {
            background: rgba(255, 255, 255, 0.09);
        }

.account-menu__divider {
    height: 1px;
    margin: 0.35rem 0;
    background: rgba(255, 255, 255, 0.12);
}

.account-menu__logout {
    color: #ff9a9a !important;
}

























/* ============================================================
   SHARED PANEL BASE — the new panels reuse the endgame-panel look.
   If your existing .learn-endgame-panel already defines these,
   you can @extend / share rather than duplicate.
   ============================================================ */
.learn-escalation-panel,
.learn-ways-panel,
.learn-decay-panel {
    margin: 2.5rem 0;
    padding: 2rem 2.25rem;
    background: linear-gradient(180deg, rgba(20, 18, 14, 0.55), rgba(8, 7, 6, 0.65));
    border: 1px solid rgba(255, 215, 110, 0.18);
    border-radius: 14px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 0, 0, 0.3);
}

.learn-escalation-panel__header,
.learn-ways-panel__header,
.learn-decay-panel__header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.learn-escalation-panel__icon,
.learn-ways-panel__icon,
.learn-decay-panel__icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255, 200, 80, 0.35));
}

.learn-escalation-panel__title,
.learn-ways-panel__title,
.learn-decay-panel__title {
    font-family: "Cinzel", serif;
    font-size: 1.5rem;
    color: #f3d999;
    margin: 0;
    letter-spacing: 0.02em;
}

.learn-escalation-panel__subtitle,
.learn-ways-panel__subtitle,
.learn-decay-panel__subtitle {
    margin: 0.25rem 0 0;
    color: rgba(220, 210, 190, 0.6);
    font-size: 0.9rem;
}

.learn-escalation-panel__intro,
.learn-decay-panel__intro {
    margin: 1.25rem 0 1.5rem;
    color: rgba(225, 216, 198, 0.85);
    line-height: 1.6;
}

/* ============================================================
   ESCALATION — phase timeline
   ============================================================ */
.learn-phase-timeline {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.learn-phase {
    flex: 1 1 0;
    min-width: 200px;
    display: flex;
    gap: 0.85rem;
    padding: 1.1rem;
    background: rgba(255, 240, 180, 0.03);
    border: 1px solid rgba(255, 215, 110, 0.14);
    border-radius: 10px;
}

.learn-phase__num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 110, 0.22), rgba(125, 92, 24, 0.12));
    border: 1px solid rgba(255, 215, 110, 0.4);
    color: #f3d999;
    font-family: "Cinzel", serif;
    font-weight: 600;
}

.learn-phase__body h4 {
    margin: 0 0 0.15rem;
    color: #f0e6d0;
    font-size: 1.02rem;
}

.learn-phase__when {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 215, 110, 0.55);
    margin-bottom: 0.4rem;
}

.learn-phase__body p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: rgba(220, 210, 190, 0.78);
}

.learn-phase__arrow {
    align-self: center;
    color: rgba(255, 215, 110, 0.5);
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* On narrow screens the arrows between stacked phases point down */
@media (max-width: 760px) {
    .learn-phase-timeline {
        flex-direction: column;
    }

    .learn-phase__arrow {
        transform: rotate(90deg);
    }
}

/* ============================================================
   WAYS TO PLAY — variant/modifier cards
   ============================================================ */
.learn-ways-grid,
.learn-decay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.learn-way-card {
    position: relative;
    padding: 1.5rem;
    background: rgba(255, 240, 180, 0.03);
    border: 1px solid rgba(255, 215, 110, 0.14);
    border-radius: 10px;
}

.learn-way-card__tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Variant vs Modifier get distinct tag colors so players learn the difference */
.learn-way-card--variant .learn-way-card__tag {
    color: #cddcff;
    background: rgba(80, 110, 165, 0.22);
    border: 1px solid rgba(105, 135, 200, 0.4);
}

.learn-way-card--modifier .learn-way-card__tag {
    color: #ffd9a8;
    background: rgba(200, 130, 40, 0.18);
    border: 1px solid rgba(230, 160, 70, 0.4);
}

.learn-way-card__icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.3));
}

.learn-way-card h4 {
    margin: 0 0 0.6rem;
    color: #f0e6d0;
    font-size: 1.1rem;
    font-family: "Cinzel", serif;
}

.learn-way-card p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(222, 213, 196, 0.82);
}

.learn-way-card__note {
    font-size: 0.85rem !important;
    color: rgba(255, 215, 110, 0.72) !important;
    border-left: 2px solid rgba(255, 215, 110, 0.3);
    padding-left: 0.75rem;
    margin-bottom: 0 !important;
}

/* ============================================================
   DECAY — deep-dive cards
   ============================================================ */
.learn-decay-card {
    padding: 1.5rem;
    background: rgba(255, 240, 180, 0.03);
    border: 1px solid rgba(255, 215, 110, 0.14);
    border-radius: 10px;
}

.learn-decay-card__badge {
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 8px;
    background: radial-gradient(circle, rgba(60, 20, 20, 0.5), rgba(20, 8, 8, 0.6));
    border: 1px solid rgba(200, 90, 70, 0.35);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.learn-decay-card h4 {
    margin: 0 0 1rem;
    color: #f0e6d0;
    font-size: 1.08rem;
    font-family: "Cinzel", serif;
    line-height: 1.3;
}

.learn-decay-card__points {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.decay-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(8, 7, 6, 0.5);
    border: 1px solid rgba(255, 215, 110, 0.14);
    border-radius: 12px;
    max-width: 640px;
    margin: 1.5rem auto 0;
}

.decay-demo__stage {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.decay-demo__board {
    display: grid;
    grid-template-columns: repeat(5, 48px);
    grid-template-rows: repeat(3, 48px);
    border: 2px solid rgba(255, 215, 110, 0.25);
    border-radius: 6px;
    overflow: hidden;
}

.decay-cell {
    position: relative;
    background: #b58a5a; /* light square */
    display: grid;
    place-items: center;
}

.decay-cell--dark {
    background: #3a2c20;
}

.decay-cell--decayed {
    background: radial-gradient(circle, #1a0d0d 40%, #2a1414 100%) !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9);
    animation: decay-pulse 2s ease-in-out infinite;
}

@keyframes decay-pulse {
    0%, 100% {
        box-shadow: inset 0 0 12px rgba(0,0,0,0.9);
    }

    50% {
        box-shadow: inset 0 0 18px rgba(120,20,20,0.7);
    }
}

.decay-cell--reclaimed {
    background: radial-gradient(circle, #2a2418 40%, #3a3020 100%) !important;
    box-shadow: inset 0 0 10px rgba(255, 215, 110, 0.35);
}

.decay-cell--highlight {
    box-shadow: inset 0 0 0 3px rgba(255, 215, 110, 0.7);
}

.decay-cell__piece {
    width: 82%;
    height: 82%;
    object-fit: contain;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.decay-cell__piece--falling {
    animation: piece-fall 0.7s ease-in forwards;
}

@keyframes piece-fall {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(20px) scale(0.3);
        opacity: 0;
    }
}

/* Abyss */
.decay-demo__abyss {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.decay-demo__abyss-label {
    font-family: "Cinzel", serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 215, 110, 0.6);
}

.decay-demo__abyss-slots {
    display: flex;
    gap: 0.4rem;
}

.decay-abyss-slot {
    width: 42px;
    height: 42px;
    border: 1px dashed rgba(255, 215, 110, 0.3);
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(20,8,8,0.7), rgba(5,2,2,0.85));
}

.decay-abyss-slot--filled {
    border-style: solid;
    border-color: rgba(200, 90, 70, 0.5);
}

.decay-abyss-slot img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.decay-abyss-slot--entering {
    animation: slot-flash 0.6s ease;
}

@keyframes slot-flash {
    0% {
        box-shadow: 0 0 0 rgba(230,110,90,0);
    }

    50% {
        box-shadow: 0 0 14px rgba(230,110,90,0.8);
    }

    100% {
        box-shadow: 0 0 0 rgba(230,110,90,0);
    }
}

.decay-demo__coffin {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgba(180, 170, 155, 0.5);
    transition: color 0.4s ease;
}

.decay-demo__coffin--active {
    color: rgba(230, 110, 90, 0.9);
}

/* Caption + dots */
.decay-demo__caption {
    min-height: 2.6rem;
    text-align: center;
    color: rgba(230, 220, 200, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 520px;
    animation: caption-fade 0.5s ease;
}

@keyframes caption-fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.decay-demo__dots {
    display: flex;
    gap: 0.4rem;
}

.decay-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 215, 110, 0.2);
    transition: background 0.3s ease;
}

.decay-dot--active {
    background: rgba(255, 215, 110, 0.85);
}