/* ================================================================
   CONSTELLATION PAGE – assets/css/views/constellation.css
   ================================================================ */

/* ── PAGE CONTAINER ── */
.constellation-page {
    position: fixed;
    top: 45px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    z-index: 1;
}

/* ── LAYOUT (aside + main side by side) ── */
.constellation-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* ── ASIDE ── */
.constellation-aside {
    width: 240px;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.92);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1rem;
    gap: 1.5rem;
    z-index: 10;
    overflow-y: auto;
    backdrop-filter: blur(16px);
}

.cs-aside-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.cs-logo {
    width: 56px;
    height: 56px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18) 0%, transparent 70%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fbbf24;
    margin-bottom: 0.25rem;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.12);
}

.cs-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    margin: 0;
}

.cs-subtitle {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.6);
    margin: 0;
}

/* ── NAV ── */
.cs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.cs-nav-item i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cs-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.cs-nav-item.active {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

/* ── ASIDE STATS ── */
.cs-aside-stats {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cs-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cs-stat-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fbbf24;
}

.cs-stat-lbl {
    font-size: 0.65rem;
    color: rgba(148, 163, 184, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── MAIN CONTENT ── */
.constellation-main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    position: relative;
    z-index: 5;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.constellation-main::-webkit-scrollbar {
    width: 6px;
}

.constellation-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* cs-section: full width, no max-width cap */
.cs-section {
    width: 100%;
}

.cs-section-header {
    margin-bottom: 1.75rem;
}

.cs-section-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.3rem;
}

.cs-section-title i {
    color: #fbbf24;
}

.cs-section-desc {
    color: rgba(148, 163, 184, 0.65);
    font-size: 0.9rem;
}

/* ── OVERVIEW HERO ── */
.cs-overview-hero {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(12px);
}

/* ── LEVEL PLANET ── */
.level-planet {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f59e0b, #92400e);
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: floatPlanet 6s ease-in-out infinite;
}

@keyframes floatPlanet {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.level-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.level-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── XP BLOCK ── */
.cs-xp-block {
    flex: 1;
}

.xp-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 8px;
    transition: width 1s ease;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.cs-xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.6);
    margin-top: 0.4rem;
}

/* ── LEADERBOARD BTN ── */
.cs-leaderboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 10px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.cs-leaderboard-btn:hover {
    background: rgba(251, 191, 36, 0.22);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.2);
}

/* ── OVERVIEW CARDS ── */
.cs-overview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.cs-overview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cs-overview-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.cs-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cs-card-icon.production-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.cs-card-icon.game-icon {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

.cs-card-icon.odyssey-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.cs-card-info {
    flex: 1;
}

.cs-card-title {
    display: block;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 600;
    margin-bottom: 3px;
}

.cs-card-count {
    display: block;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.5);
}

.cs-card-count-big {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1;
}

/* ── OVERVIEW 2-COL LAYOUT ── */
.cs-overview-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.cs-overview-left {
    flex: 1;
    min-width: 0;
}

/* ── LEVEL NAME ── */
.cs-level-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ── LEADERBOARD PANEL (inline) ── */
.cs-leaderboard-panel {
    width: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 160px);
    overflow: hidden;
}

.cs-lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cs-lb-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cs-lb-tabs {
    display: flex;
    gap: 4px;
}

.cs-lb-tab {
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(148, 163, 184, 0.6);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-lb-tab.active {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.cs-lb-loading,
.cs-lb-empty {
    text-align: center;
    padding: 1.5rem;
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.8rem;
}

.cs-lb-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    max-height: calc(100vh - 260px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.cs-lb-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.cs-lb-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cs-lb-row.cs-lb-me {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.cs-lb-rank {
    width: 22px;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.6);
}

.cs-lb-name {
    flex: 1;
    font-size: 0.82rem;
    color: #f1f5f9;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-lb-xp {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    flex-shrink: 0;
}

/* ── MINI GRID ── */
.cs-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.875rem;
}

.cs-mini-constellation {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    transition: all 0.2s;
}

.cs-mini-constellation:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.cs-mini-header {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-mini-header i {
    color: #fbbf24;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.cs-mini-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.cs-mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #fbbf24);
    border-radius: 4px;
    transition: width 1s ease;
}

.cs-mini-count {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.5);
}

/* ── EMPTY STATE ── */
.cs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(148, 163, 184, 0.5);
}

/* ── FADE IN ── */
.fade-in {
    animation: csFadeIn 0.35s ease;
}

@keyframes csFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── CONSTELLATION CARDS (production/game sections) ── */
.tiered-trophy-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 1600px) {
    .tiered-trophy-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

.constellation-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.constellation-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.constellation-card.is-triple {
    grid-column: span 3;
    min-height: 480px;
}

@media (max-width: 1200px) {
    .constellation-card.is-triple {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .constellation-card.is-triple {
        grid-column: span 1;
    }
}

.path-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}



.path-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fbbf24;
    flex-shrink: 0;
}

.path-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.path-meta {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.6);
}

/* ── REALM (star chart area) ── */
.path-realm-container {
    position: relative;
    height: 200px;
    margin: 0 auto;
    width: 100%;
    overflow: visible;
    /* Prevent clipping */
}

.stars-connection-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.realm-nodes {
    position: absolute;
    inset: 0;
}

/* ── STAR NODE ── */
.realm-node {
    transform: translate(-50%, -50%);
}

.node-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.node-dot {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: #0f172a;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: rgba(148, 163, 184, 0.6);
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: default;
    position: relative;
    box-shadow: none !important;
}

.node-dot i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

.realm-node.unlocked .node-dot {
    background: #0f172a;
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: none !important;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
}

.realm-node.unlocked .node-wrapper:hover .node-dot {
    filter: drop-shadow(0 0 13px rgba(251, 191, 36, 0.7));
}

.realm-node.current .node-dot,
.realm-node.next .node-dot {
    border-color: rgba(96, 165, 250, 0.7);
    color: #60a5fa;
    box-shadow: none !important;
    animation: pulseStar 2s ease-in-out infinite;
}

@keyframes pulseStar {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.35));
    }

    50% {
        filter: drop-shadow(0 0 13px rgba(96, 165, 250, 0.7));
    }
}

.node-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    max-width: 120px;
    line-height: 1.2;
    white-space: normal;
    z-index: 10;
    position: relative;
}

.realm-node.unlocked .node-label {
    color: rgba(251, 191, 36, 0.85);
}

/* ── STAR HOVER TOOLTIP ── */
.node-wrapper:hover .node-dot {
    transform: scale(1.15);
}

.node-wrapper[data-desc]::after {
    content: attr(data-desc);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 10px;
    white-space: normal;
    max-width: 300px;
    min-width: 160px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    line-height: 1.5;
}

.node-wrapper[data-desc]:hover::after {
    opacity: 1;
}


/* ── FOOTER ── */
.path-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem 1.25rem;
    margin-top: 0.5rem;
    gap: 1rem;
}

.path-footer.success {
    color: #fbbf24;
}

.next-challenge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.7);
    overflow: hidden;
}

.next-challenge .label {
    color: rgba(148, 163, 184, 0.5);
    flex-shrink: 0;
}

.next-challenge .value {
    color: #f1f5f9;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xp-reward {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 3px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ── SPECTR'OHM COULEUR — Galaxie Chromatique (violet) ── */
.theme-game_spectrohm_color .path-icon {
    background: rgba(167, 139, 250, 0.18);
    border-color: rgba(167, 139, 250, 0.3);
    color: #a78bfa;
}
.theme-game_spectrohm_color .xp-reward {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
}

/* ── SPECTR'OHM SON — Galaxie Sonique (cyan) ── */
.theme-game_spectrohm_sound .path-icon {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.3);
    color: #22d3ee;
}
.theme-game_spectrohm_sound .xp-reward {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.1);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .constellation-main {
        padding: 1.25rem;
    }
}

@media (max-width: 900px) {
    .constellation-aside {
        width: 200px;
    }

    .cs-overview-cards {
        grid-template-columns: 1fr;
    }

    .constellation-main {
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    .constellation-aside {
        display: none;
    }

    .constellation-main {
        padding: 1rem;
    }
}

/* ── LEVEL NAME ROW (name + info btn) ── */
.cs-level-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cs-info-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(148, 163, 184, 0.7);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.cs-info-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ── LEVEL INFO MODAL ── */
.cs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 440px;
    max-width: calc(100vw - 2rem);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.cs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-weight: 700;
    font-size: 0.95rem;
    color: #fbbf24;
}

.cs-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(148, 163, 184, 0.7);
    font-size: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cs-modal-body {
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cs-modal-desc {
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.6);
    line-height: 1.5;
}

.cs-level-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-level-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.cs-level-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cs-level-row.cs-level-passed {
    opacity: 0.5;
}

.cs-level-row.cs-level-current {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

.cs-lr-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-level-current .cs-lr-badge {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.cs-level-passed .cs-lr-badge {
    opacity: 0.6;
    border: none;
    box-shadow: none;
}

/* ── MODAL BADGE THEMES ── */
.cs-lr-badge.lvl-1 {
    background: radial-gradient(circle at 35% 35%, #f8fafc, #94a3b8);
    color: #0f172a;
    border: none;
    box-shadow: 0 0 10px rgba(248, 250, 252, 0.3);
}

.cs-lr-badge.lvl-2 {
    background: radial-gradient(circle at 35% 35%, #f472b6, #7e22ce);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-3 {
    background: radial-gradient(circle at 35% 35%, #a8a29e, #44403c);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(168, 162, 158, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-4 {
    background: radial-gradient(circle at 25% 25%, #67e8f9, #0891b2);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-5 {
    background: radial-gradient(circle at 35% 35%, #f97316, #9a3412);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-6 {
    background: radial-gradient(circle at 35% 35%, #fde047, #b45309);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-7 {
    background: radial-gradient(circle at 35% 35%, #fb7185, #be123c, #4c0519);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-8 {
    background: radial-gradient(circle at 50% 50%, #000000 30%, #1e1b4b 70%, #312e81);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(49, 46, 129, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cs-lr-badge.lvl-9 {
    background: radial-gradient(circle at 35% 35%, #3b82f6, #1d4ed8, #1e3a8a);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cs-lr-badge.lvl-10 {
    background: conic-gradient(from 0deg at 50% 50%, #c026d3, #2563eb, #06b6d4, #c026d3);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(192, 38, 211, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Dim locked badges so themes are less bright but still visible */
.cs-level-row:not(.cs-level-current):not(.cs-level-passed) .cs-lr-badge {
    opacity: 0.25;
}

.cs-lr-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cs-lr-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.cs-lr-xp {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.5);
}

.cs-lr-status {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── 10 COSMIC LEVEL THEMES ── */

/* 1. Étoile Filante (Blanc/Gris clair) */
.level-planet.lvl-theme-1 {
    background: radial-gradient(circle at 35% 35%, #f8fafc, #94a3b8);
    box-shadow: 0 0 20px rgba(248, 250, 252, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 2. Nébuleuse (Rose/Violet pastel) */
.level-planet.lvl-theme-2 {
    background: radial-gradient(circle at 35% 35%, #f472b6, #7e22ce);
    box-shadow: 0 0 25px rgba(244, 114, 182, 0.4), inset 0 0 12px rgba(0, 0, 0, 0.3);
}

/* 3. Astéroïde (Gris foncé/Marron) */
.level-planet.lvl-theme-3 {
    background: radial-gradient(circle at 35% 35%, #a8a29e, #44403c);
    box-shadow: 0 0 20px rgba(168, 162, 158, 0.2), inset 0 0 16px rgba(0, 0, 0, 0.4);
    /* Irregular shape illusion */
    border-radius: 46% 54% 50% 50% / 48% 52% 48% 52%;
}

/* 4. Comète (Bleu cyan glacé) */
.level-planet.lvl-theme-4 {
    background: radial-gradient(circle at 25% 25%, #67e8f9, #0891b2);
    box-shadow: 0 0 30px rgba(103, 232, 249, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.3);
}

/* 5. Planète (Orange/Terre cuite - l'existant) */
.level-planet.lvl-theme-5 {
    background: radial-gradient(circle at 35% 35%, #f97316, #9a3412);
    box-shadow: 0 0 35px rgba(249, 115, 22, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.3);
}

/* 6. Système Solaire (Jaune/Or flamboyant) */
.level-planet.lvl-theme-6 {
    background: radial-gradient(circle at 35% 35%, #fde047, #b45309);
    box-shadow: 0 0 45px rgba(253, 224, 71, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 7. Supernova (Rouge/Orange explosif) */
.level-planet.lvl-theme-7 {
    background: radial-gradient(circle at 35% 35%, #fb7185, #be123c, #4c0519);
    box-shadow: 0 0 55px rgba(251, 113, 133, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.4);
    animation: floatPlanet 4s ease-in-out infinite, pulseSupernova 3s ease-in-out infinite alternate;
}

@keyframes pulseSupernova {
    from {
        filter: brightness(1) drop-shadow(0 0 0 rgba(251, 113, 133, 0));
    }

    to {
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(251, 113, 133, 0.5));
    }
}

/* 8. Trou Noir (Noir profond avec halo violet sombre) */
.level-planet.lvl-theme-8 {
    background: radial-gradient(circle at 50% 50%, #000000 30%, #1e1b4b 70%, #312e81);
    box-shadow: 0 0 40px rgba(49, 46, 129, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.9);
    animation: floatPlanet 8s ease-in-out infinite;
}

/* 9. Constellation (Bleu profond étoilé) */
.level-planet.lvl-theme-9 {
    background: radial-gradient(circle at 35% 35%, #3b82f6, #1d4ed8, #1e3a8a);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.5);
}

/* 10. Galaxie (Magique Multi-couleurs cosmos) */
.level-planet.lvl-theme-10 {
    background: conic-gradient(from 0deg at 50% 50%, #c026d3, #2563eb, #06b6d4, #c026d3);
    box-shadow: 0 0 60px rgba(192, 38, 211, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: rotateGalaxy 10s linear infinite, floatPlanet 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.level-planet.lvl-theme-10 .level-number,
.level-planet.lvl-theme-10 .level-label {
    /* Stop inner rotation so text stays upright */
    animation: counterRotateGalaxy 10s linear infinite;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.level-planet.lvl-theme-10::after {
    /* Inner dark circle to make text readable */
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

@keyframes rotateGalaxy {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes counterRotateGalaxy {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* ================================================================
   CONSTELLATION V2 ADDITIONS
   ================================================================ */
.constellation-page.v2-development-mode {
    background-color: #0b0f19 !important;
    flex-direction: column !important;
}
.v2-development-mode .constellation-layout {
    height: 0;
    flex-grow: 1;
}
.v2-dev-banner {
    background: linear-gradient(90deg, #5b21b6 0%, #1e1b4b 100%);
    border-bottom: 1px solid #7c3aed;
    color: #e9d5ff;
    padding: 8px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}
.v2-dev-banner i {
    font-size: 16px;
    color: #a78bfa;
}
.cs-editor-controls {
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 16px;
}
.editor-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b949e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.editor-btn {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #c9d1d9;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-btn:hover {
    background: rgba(255,255,255,0.08);
}
.editor-btn.active {
    background: #7c3aed;
    border-color: #a78bfa;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}
.tool-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: #8b949e;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.tool-btn.active {
    background: #4c1d95;
    border-color: #6d28d9;
    color: #ffffff;
}
.curve-handle-dot {
    fill: #a78bfa;
    stroke: #ffffff;
    stroke-width: 1.5;
    cursor: move;
    transition: r 0.2s;
}
.curve-handle-dot:hover {
    r: 8;
}
.constellation-star.wiring-target .node-dot {
    border-color: #a78bfa !important;
    box-shadow: none !important;
    filter: drop-shadow(0 0 10px #a78bfa) !important;
    animation: pulse-wiring 1.5s infinite;
}
@keyframes pulse-wiring {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.node-wrapper {
    cursor: pointer;
}
.node-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 14px;
    border-radius: 8px;
    width: 220px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
    z-index: 100;
}
.node-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 22px;
}
.node-wrapper:hover .node-tooltip,
.node-wrapper:focus-within .node-tooltip,
.node-wrapper.tooltip-open .node-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
    pointer-events: auto;
}
.realm-node:hover,
.realm-node:focus-within,
.realm-node:has(.tooltip-open) {
    z-index: 80 !important;
}
.tooltip-title {
    font-weight: bold;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 4px;
}
.tooltip-desc {
    color: #94a3b8;
    font-size: 11px;
    margin-bottom: 8px;
    line-height: 1.3;
}
.tooltip-xp {
    color: #fbbf24;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 6px;
}
.tooltip-action-btn {
    width: 100%;
    background: #7c3aed;
    color: #ffffff;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.tooltip-action-btn:hover {
    background: #6d28d9;
}
.tooltip-unlocked-badge {
    font-size: 11px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}

/* V2 keeps V1's visual language; administration only appears on demand. */
.constellation-v2-page .cs-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.v2-version-badge,
.v2-preview-chip,
.v2-editing-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.v2-version-badge {
    margin-top: 8px;
    padding: 5px 9px;
    color: #f9d976;
    background: rgba(218, 165, 32, .08);
    border: 1px solid rgba(218, 165, 32, .25);
}

.v2-preview-chip,
.v2-editing-chip {
    flex: 0 0 auto;
    padding: 7px 10px;
    color: #94a3b8;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .08);
}

.v2-editing-chip {
    color: #ddd6fe;
    background: rgba(124, 58, 237, .16);
    border-color: rgba(167, 139, 250, .38);
}

.v2-studio-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(218, 165, 32, .22);
    border-radius: 8px;
    color: #d7dae0;
    background: rgba(218, 165, 32, .055);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.v2-studio-toggle:hover,
.v2-studio-toggle.active {
    color: #f9d976;
    background: rgba(218, 165, 32, .11);
    border-color: rgba(218, 165, 32, .42);
}

.v2-status-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.v2-status-content {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.v2-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #8b949e;
    font-size: 12px;
}

.v2-status-row strong {
    color: #f0f2f5;
    font-size: 14px;
}

.v2-status-action {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 4px;
    padding: 9px 12px;
    border: 1px solid rgba(218, 165, 32, .28);
    border-radius: 7px;
    color: #f9d976;
    background: rgba(218, 165, 32, .08);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.v2-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(167, 139, 250, .24);
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(76, 29, 149, .16), rgba(15, 23, 42, .72));
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

.v2-editor-intro {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 250px;
    min-width: 220px;
    color: #f0f2f5;
    font-size: 12px;
}

.v2-editor-intro strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.v2-editor-intro strong i {
    color: #c4b5fd;
    font-size: 18px;
}

.v2-editor-intro span,
.v2-editor-group label {
    display: block;
    color: #8b949e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.v2-editor-group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}

.v2-editor-group select {
    min-width: 96px;
    padding: 7px 28px 7px 9px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    color: #d7dae0;
    background: #111827;
    font: inherit;
    font-size: 11px;
}

.v2-editor-tools {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.v2-editor-tools .tool-btn {
    min-width: 90px;
    padding: 7px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.v2-history-tools {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, .1);
}

.v2-history-tools .tool-btn {
    min-width: 76px;
    padding: 7px 9px;
    white-space: nowrap;
}

.v2-history-tools .tool-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.v2-layout-saving {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 10px;
    white-space: nowrap;
}

.v2-wire-state {
    margin-left: auto;
    color: #c4b5fd;
    font-size: 11px;
}

.v2-card-edit-hint {
    margin-left: auto;
    color: #a78bfa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.grid-overlay-svg {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (max-width: 920px) {
    .v2-editor-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .v2-wire-state {
        width: 100%;
        margin-left: 0;
    }

    .v2-editor-intro {
        flex-basis: 100%;
    }
}

@media (max-width: 620px) {
    .constellation-v2-page .cs-section-header {
        display: block;
    }

    .v2-preview-chip,
    .v2-editing-chip {
        margin-top: 10px;
    }

    .v2-editor-group,
    .v2-editor-tools,
    .v2-history-tools {
        width: 100%;
    }

    .v2-editor-tools .tool-btn,
    .v2-history-tools .tool-btn {
        flex: 1;
    }

    .v2-history-tools {
        padding-top: 8px;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .1);
        border-left: 0;
    }
}

/* Constellations V2 — super-admin studio */
.v2-studio {
    max-width: 1500px;
}

.v2-schema-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: 10px;
    color: #fcd34d;
    background: rgba(245, 158, 11, .09);
}

.v2-schema-warning > i { font-size: 22px; }
.v2-schema-warning strong,
.v2-schema-warning span { display: block; }
.v2-schema-warning span { margin-top: 2px; color: #cbd5e1; font-size: 12px; }

.v2-studio-tabs {
    display: flex;
    gap: 5px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 9px;
    background: rgba(255, 255, 255, .03);
}

.v2-studio-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 0;
    border-radius: 6px;
    color: #94a3b8;
    background: transparent;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.v2-studio-tabs button.active {
    color: #fff;
    background: #4c1d95;
    box-shadow: 0 4px 14px rgba(76, 29, 149, .35);
}

.v2-studio-loading,
.v2-user-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 220px;
    color: #94a3b8;
}

.v2-studio-grid {
    display: grid;
    grid-template-columns: minmax(210px, .65fr) minmax(520px, 2fr) minmax(230px, .8fr);
    align-items: start;
    gap: 14px;
}

.v2-v1-sync {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 11px;
    background: linear-gradient(110deg, rgba(14, 116, 144, .12), rgba(76, 29, 149, .08));
}

.v2-v1-sync.ready { border-color: rgba(167, 139, 250, .34); }
.v2-v1-sync-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #67e8f9;
    background: rgba(8, 145, 178, .15);
    font-size: 19px;
}
.v2-v1-sync-copy { min-width: 0; }
.v2-v1-sync-copy strong,
.v2-v1-sync-copy span,
.v2-v1-sync-copy small { display: block; }
.v2-v1-sync-copy strong { color: #e2e8f0; font-size: 12px; }
.v2-v1-sync-copy span { margin-top: 3px; color: #a5b4fc; font-size: 11px; }
.v2-v1-sync-copy small { margin-top: 4px; color: #64748b; font-size: 10px; }
.v2-v1-sync > .v2-panel-actions { flex-wrap: wrap; justify-content: flex-end; }

.v2-studio-panel {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(15, 23, 42, .76);
    box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.v2-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 700;
}

.v2-panel-actions { display: flex; gap: 6px; }

.v2-icon-button,
.v2-danger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
}

.v2-danger-icon { color: #fca5a5; border-color: rgba(239, 68, 68, .22); }

.v2-catalog-list { max-height: 740px; overflow-y: auto; }

.v2-catalog-group + .v2-catalog-group { border-top: 1px solid rgba(255, 255, 255, .08); }
.v2-catalog-group-title {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    color: #94a3b8;
    background: rgba(10, 16, 34, .96);
    box-shadow: 0 1px rgba(255, 255, 255, .05);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.v2-catalog-group-title span { display: inline-flex; align-items: center; gap: 7px; }
.v2-catalog-group-title i { color: #94a3b8; font-size: 13px; }
.v2-catalog-group-title em {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #64748b;
    background: rgba(148, 163, 184, .1);
    font-style: normal;
    text-align: center;
}
.v2-catalog-group.galaxy-production .v2-catalog-group-title i { color: #fbbf24; }
.v2-catalog-group.galaxy-games .v2-catalog-group-title i { color: #a78bfa; }
.v2-catalog-group.galaxy-odyssey .v2-catalog-group-title i { color: #34d399; }
.v2-catalog-group-empty { padding: 10px 12px 12px 32px; color: #475569; font-size: 10px; font-style: italic; }

.v2-catalog-item,
.v2-star-admin-list > button,
.v2-user-list > button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    color: #cbd5e1;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.v2-catalog-item:hover,
.v2-catalog-item.active,
.v2-star-admin-list > button:hover,
.v2-star-admin-list > button.active,
.v2-user-list > button:hover,
.v2-user-list > button.active {
    background: rgba(124, 58, 237, .12);
}

.v2-catalog-item.active { box-shadow: inset 3px 0 #a78bfa; }
.v2-catalog-item > i { width: 20px; color: #f9d976; font-size: 17px; }
.v2-catalog-item > span,
.v2-star-admin-list > button > span,
.v2-user-list > button > span:not(.v2-user-avatar) { flex: 1; min-width: 0; }
.v2-catalog-item strong,
.v2-catalog-item small,
.v2-star-admin-list strong,
.v2-star-admin-list small,
.v2-user-list strong,
.v2-user-list small { display: block; }
.v2-catalog-item strong,
.v2-star-admin-list strong,
.v2-user-list strong { overflow: hidden; color: #e5e7eb; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.v2-catalog-item small,
.v2-star-admin-list small,
.v2-user-list small { margin-top: 3px; overflow: hidden; color: #64748b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.v2-catalog-item em,
.v2-preview-status {
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
}

.status-published { color: #6ee7b7; background: rgba(16, 185, 129, .13); }
.status-draft { color: #fcd34d; background: rgba(245, 158, 11, .13); }
.status-archived { color: #94a3b8; background: rgba(148, 163, 184, .12); }

.v2-editor-form { padding-bottom: 15px; }

.v2-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 15px;
}

.v2-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0; }
.v2-form-grid label { min-width: 0; }
.v2-form-grid label.full { grid-column: 1 / -1; }
.v2-form-grid label > span,
.v2-xp-editor > span {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.v2-form-grid input,
.v2-form-grid select,
.v2-form-grid textarea,
.v2-search-input,
.v2-xp-editor input {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 7px;
    outline: 0;
    color: #e5e7eb;
    background: rgba(2, 6, 23, .55);
    font: inherit;
    font-size: 12px;
}

.v2-form-grid input:focus,
.v2-form-grid select:focus,
.v2-form-grid textarea:focus,
.v2-search-input:focus,
.v2-xp-editor input:focus { border-color: rgba(167, 139, 250, .6); box-shadow: 0 0 0 3px rgba(124, 58, 237, .1); }
.v2-form-grid input:disabled { color: #64748b; cursor: not-allowed; }
.v2-form-grid textarea { resize: vertical; }
.v2-inline-fields { display: grid; grid-template-columns: 75px 1fr; gap: 6px; }

.v2-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding-top: 18px;
}
.v2-toggle-label input { width: 16px; }
.v2-toggle-label span { margin: 0 !important; }

.v2-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 15px 15px;
}

.v2-primary-button,
.v2-publish-button,
.v2-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #fff;
    background: #6d28d9;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.v2-publish-button { color: #d1fae5; border-color: rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .16); }
.v2-secondary-button { color: #cbd5e1; border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .045); }
.v2-primary-button:disabled,
.v2-publish-button:disabled,
.v2-secondary-button:disabled { opacity: .45; cursor: not-allowed; }

.v2-subsection-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 5px 15px 0;
    padding: 15px 0 10px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}
.v2-subsection-title strong,
.v2-subsection-title span { display: block; }
.v2-subsection-title strong { color: #e5e7eb; font-size: 12px; }
.v2-subsection-title span { margin-top: 3px; color: #64748b; font-size: 10px; }

.v2-star-admin-list { margin: 0 15px 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 8px; overflow: hidden; }
.v2-star-admin-list > button > i { color: #fbbf24; }
.v2-star-admin-list > button > em { color: #6ee7b7; font-size: 9px; font-style: normal; }
.v2-star-admin-list > button > em.inactive { color: #64748b; }
.v2-trophy-editor { margin: 0 15px; padding: 0 14px; border: 1px solid rgba(167, 139, 250, .2); border-radius: 9px; background: rgba(76, 29, 149, .07); }
.v2-trophy-editor .v2-panel-title { margin: 0 -14px; }
.v2-trophy-editor .v2-form-footer { padding-right: 0; }

.v2-live-preview { position: sticky; top: 16px; }
.v2-preview-content { padding: 22px 16px; text-align: center; }
.v2-preview-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 10px; border: 1px solid rgba(251, 191, 36, .25); border-radius: 50%; color: #fbbf24; background: radial-gradient(circle, rgba(251, 191, 36, .17), transparent 70%); font-size: 25px; }
.v2-preview-content h3 { margin: 12px 0 6px; color: #f8fafc; font-size: 17px; }
.v2-preview-content p { min-height: 36px; margin: 0; color: #94a3b8; font-size: 11px; line-height: 1.5; }
.v2-preview-content > small { display: block; margin-top: 12px; color: #64748b; }
.v2-preview-stars { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 16px; }
.v2-preview-stars span { color: #fbbf24; filter: drop-shadow(0 0 5px rgba(251, 191, 36, .45)); }
.v2-preview-stars span.inactive { color: #334155; filter: none; }
.v2-empty-compact { padding: 20px 14px; color: #64748b; font-size: 11px; text-align: center; }

.v2-progress-admin { display: grid; grid-template-columns: minmax(240px, .65fr) minmax(500px, 2fr); align-items: start; gap: 14px; }
.v2-progress-import { grid-column: 1 / -1; }
.v2-user-list { max-height: 720px; overflow-y: auto; }
.v2-user-list .v2-search-input { width: calc(100% - 24px); margin: 12px; }
.v2-user-list > button > .v2-user-avatar { display: grid; place-items: center; flex: 0 0 31px; width: 31px; min-width: 31px; max-width: 31px; height: 31px; padding: 0; border-radius: 50%; color: #ddd6fe; background: rgba(124, 58, 237, .2); font-size: 12px; font-weight: 800; }
.v2-user-list > button > em { color: #fbbf24; font-size: 11px; font-style: normal; }
.v2-user-progress-editor { min-height: 400px; }
.v2-user-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.v2-user-progress-head span,
.v2-user-progress-head small { color: #64748b; font-size: 10px; }
.v2-user-progress-head h3 { margin: 2px 0; color: #f8fafc; font-size: 18px; }
.v2-level-badge { text-align: right; }
.v2-level-badge strong,
.v2-level-badge span { display: block; }
.v2-level-badge strong { color: #fbbf24; font-size: 15px; }
.v2-xp-editor { display: block; padding: 15px 18px; }
.v2-xp-editor input { max-width: 220px; }
.v2-xp-editor small { display: block; margin-top: 5px; color: #64748b; font-size: 10px; }
.v2-user-trophies { display: grid; gap: 10px; padding: 0 18px 18px; }
.v2-user-trophies section { border: 1px solid rgba(255, 255, 255, .07); border-radius: 8px; overflow: hidden; }
.v2-user-trophies header { display: flex; align-items: center; gap: 8px; padding: 9px 11px; color: #cbd5e1; background: rgba(255, 255, 255, .035); font-size: 11px; }
.v2-user-trophies header > span { margin-left: auto; color: #64748b; }
.v2-user-trophies label { display: grid; grid-template-columns: 18px 18px 1fr auto; align-items: center; gap: 8px; padding: 9px 11px; border-top: 1px solid rgba(255, 255, 255, .045); color: #64748b; cursor: pointer; }
.v2-user-trophies label.unlocked { color: #fbbf24; background: rgba(251, 191, 36, .035); }
.v2-user-trophies label span strong,
.v2-user-trophies label span small { display: block; }
.v2-user-trophies label span strong { color: #dbe3ed; font-size: 11px; }
.v2-user-trophies label span small { margin-top: 2px; color: #64748b; font-size: 9px; }
.v2-user-trophies label em { color: #64748b; font-size: 9px; font-style: normal; }
.v2-user-placeholder { flex-direction: column; }
.v2-user-placeholder > i { color: #475569; font-size: 38px; }
.v2-user-placeholder strong { color: #cbd5e1; }
.v2-user-placeholder span { color: #64748b; font-size: 11px; }

@media (max-width: 1250px) {
    .v2-studio-grid { grid-template-columns: 220px minmax(480px, 1fr); }
    .v2-live-preview { display: none; }
}

@media (max-width: 850px) {
    .v2-studio-grid,
    .v2-progress-admin { grid-template-columns: 1fr; }
    .v2-catalog-list,
    .v2-user-list { max-height: 320px; }
    .v2-form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .v2-v1-sync { grid-template-columns: auto minmax(0, 1fr); }
    .v2-v1-sync > .v2-panel-actions { grid-column: 1 / -1; justify-content: stretch; }
    .v2-v1-sync > .v2-panel-actions button { flex: 1 1 220px; }
}

@media (max-width: 560px) {
    .v2-studio-tabs { width: 100%; }
    .v2-studio-tabs button { flex: 1; }
    .v2-form-grid,
    .v2-form-grid.three { grid-template-columns: 1fr; }
    .v2-form-grid label.full { grid-column: auto; }
    .v2-subsection-title { align-items: flex-start; flex-direction: column; }
}

/* ================================================================
   CONSTELLATION V2: MISSIONS & OCTETS STYLES
   ================================================================ */
.v2-missions-container {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    padding-bottom: 2rem;
    container-type: inline-size;
}

.octet-mark {
    display: inline-block;
    line-height: 1;
    vertical-align: -.08em;
}

.cs-octet-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: #22d3ee;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.12);
}

.cs-octet-pill > i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    color: #67e8f9;
    background: rgba(6, 182, 212, .16);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .18);
}

.cs-octet-orb {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(34, 211, 238, .28);
    border-radius: 14px;
    color: #22d3ee;
    background: linear-gradient(145deg, rgba(6, 182, 212, .18), rgba(37, 99, 235, .1));
    box-shadow: 0 8px 22px rgba(6, 182, 212, .12);
    font-size: 1.35rem;
}

.cs-stat-octets .cs-stat-val {
    color: #22d3ee;
    font-size: 1.25rem;
}

.v2-daily-chest-card {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 1.75rem;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.75), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 30px rgba(168, 85, 247, 0.15);
    overflow: hidden;
}

.v2-daily-chest-card:before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 50%, rgba(251, 191, 36, 0.15), transparent 40%),
                radial-gradient(circle at 90% 50%, rgba(168, 85, 247, 0.15), transparent 40%);
    pointer-events: none;
}

.v2-chest-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.4);
    font-size: 2.6rem;
    color: #fbbf24;
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.25);
    animation: v2ChestPulse 3s ease-in-out infinite alternate;
}

@keyframes v2ChestPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.05); filter: brightness(1.2) drop-shadow(0 0 12px rgba(251, 191, 36, 0.4)); }
}

.v2-chest-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2-chest-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-chest-desc {
    margin: 0;
    font-size: 0.88rem;
    color: #94a3b8;
}

.v2-chest-rewards {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.v2-reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.v2-reward-badge.xp {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.v2-reward-badge.octets {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #22d3ee;
}

.v2-chest-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.v2-chest-progress-bar {
    flex: 1;
    max-width: 220px;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.v2-chest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #a855f7);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.v2-chest-progress-text {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 600;
}

.v2-quest-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.v2-quest-board {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: 1.25rem;
}

.v2-quest-group {
    min-width: 0;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .11);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(15, 23, 42, .5), rgba(15, 23, 42, .22));
}

.v2-quest-group-daily {
    box-shadow: inset 0 1px 0 rgba(251, 191, 36, .16);
}

.v2-quest-group-weekly {
    box-shadow: inset 0 1px 0 rgba(129, 140, 248, .2);
}

.v2-quest-group-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-quest-group-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.v2-quest-grid {
    display: grid;
    gap: .85rem;
}

.v2-quest-group-daily .v2-quest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v2-quest-group-weekly .v2-quest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v2-quest-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    min-height: 184px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    overflow: hidden;
}

.v2-quest-card:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.v2-quest-card.completed {
    border-color: rgba(251, 191, 36, 0.4);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(251, 191, 36, 0.06));
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
}

.v2-quest-card.claimed {
    opacity: 0.7;
    border-color: rgba(16, 185, 129, 0.3);
}

.v2-quest-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.v2-quest-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.v2-quest-icon.cat-arcade {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.v2-quest-icon.cat-activity {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.v2-quest-icon.cat-work {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.v2-quest-body {
    flex: 1;
    min-width: 0;
}

.v2-quest-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}

.v2-quest-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.v2-quest-category-tag {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.v2-quest-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.35;
}

.v2-quest-progress-wrap {
    margin: 0.75rem 0 1rem;
}

.v2-quest-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.v2-quest-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.v2-quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.v2-quest-card.completed .v2-quest-progress-fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.v2-quest-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.v2-quest-foot > div:last-child {
    flex: 0 0 auto;
}

.v2-reward-badge.octets .octet-mark,
.v2-mission-template-list .octet-mark {
    font-size: .92em;
}

.v2-quest-rewards {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
}

.v2-quest-action-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.v2-quest-action-btn.claimable {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
    animation: v2BtnPulse 2s infinite;
}

.v2-quest-action-btn.claimable:hover {
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.6);
}

.v2-quest-action-btn.claimed {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    cursor: default;
}

.v2-quest-action-btn.in-progress {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    cursor: default;
}

@keyframes v2BtnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.v2-octets-explainer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 14px;
    margin-top: 1rem;
}

.v2-octets-explainer i {
    font-size: 2rem;
    color: #22d3ee;
    flex-shrink: 0;
}

.v2-octets-explainer-copy strong {
    display: block;
    color: #f1f5f9;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.v2-octets-explainer-copy p {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
}

@container (max-width: 1200px) {
    .v2-quest-board {
        grid-template-columns: 1fr;
    }

    .v2-quest-group-daily .v2-quest-grid,
    .v2-quest-group-weekly .v2-quest-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@container (max-width: 1000px) {
    .v2-daily-chest-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .v2-chest-title,
    .v2-chest-rewards,
    .v2-chest-progress {
        justify-content: center;
    }
}

@container (max-width: 700px) {
    .v2-quest-group-daily .v2-quest-grid,
    .v2-quest-group-weekly .v2-quest-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1500px) {
    .v2-quest-board {
        grid-template-columns: 1fr;
    }

    .v2-quest-group-daily .v2-quest-grid,
    .v2-quest-group-weekly .v2-quest-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 900px) {
    .v2-daily-chest-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    .v2-chest-icon-wrapper {
        margin: 0 auto;
    }
    .v2-chest-title, .v2-chest-rewards, .v2-chest-progress {
        justify-content: center;
    }
    .v2-chest-progress-bar {
        max-width: 100%;
    }
    .v2-quest-group-daily .v2-quest-grid,
    .v2-quest-group-weekly .v2-quest-grid {
        grid-template-columns: 1fr;
    }
}

/* Studio Missions */
.v2-mission-studio { display: grid; gap: 14px; }
.v2-mission-migration-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 22px; border: 1px solid rgba(56,189,248,.24); border-radius: 18px; background: linear-gradient(120deg,rgba(14,116,144,.12),rgba(124,58,237,.08)); }
.v2-mission-migration-card > i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #67e8f9; background: rgba(6,182,212,.12); font-size: 24px; }
.v2-mission-migration-card strong,.v2-mission-migration-card span { display: block; }.v2-mission-migration-card span { margin-top: 4px; color: #94a3b8; font-size: .82rem; line-height: 1.45; }
.v2-mission-studio-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(148,163,184,.13); border-radius: 14px; background: rgba(15,23,42,.58); }
.v2-mission-studio-toolbar > span { margin-left: auto; color: #64748b; font-size: .76rem; }
.v2-mission-scope-switch { display: flex; padding: 3px; border-radius: 10px; background: rgba(2,6,23,.65); }
.v2-mission-scope-switch button { padding: 7px 12px; border: 0; border-radius: 8px; color: #718096; background: transparent; font-weight: 800; font-size: .76rem; cursor: pointer; }
.v2-mission-scope-switch button.active { color: #fff; background: linear-gradient(135deg,#2563eb,#7c3aed); box-shadow: 0 5px 14px rgba(79,70,229,.25); }
.v2-mission-studio-grid { display: grid; grid-template-columns: minmax(220px,280px) minmax(520px,1fr) minmax(260px,340px); align-items: start; gap: 14px; }
.v2-mission-template-list { max-height: 720px; overflow: auto; padding: 8px; }
.v2-mission-template-list > button { width: 100%; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid transparent; border-radius: 11px; color: #cbd5e1; background: transparent; text-align: left; cursor: pointer; }
.v2-mission-template-list > button:hover { background: rgba(148,163,184,.06); }.v2-mission-template-list > button.active { border-color: rgba(129,140,248,.35); background: rgba(79,70,229,.13); }.v2-mission-template-list > button.inactive { opacity: .48; }
.v2-mission-template-list > button > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #67e8f9; background: rgba(6,182,212,.1); }.v2-mission-template-list strong,.v2-mission-template-list small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.v2-mission-template-list strong { font-size: .8rem; }.v2-mission-template-list small { margin-top: 2px; color: #64748b; font-size: .66rem; }.v2-mission-template-list em { color: #22d3ee; font-size: .65rem; font-style: normal; white-space: nowrap; }
.v2-mission-editor { padding: 14px; }.v2-mission-preview { position: sticky; top: 18px; padding: 14px; }.v2-mission-preview .v2-quest-card { grid-template-rows: auto auto auto; min-height: 260px; }.v2-mission-preview .v2-quest-card.inactive { filter: grayscale(.6); opacity: .6; }
.v2-mission-engine-note { display: flex; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 10px; color: #94a3b8; background: rgba(59,130,246,.07); font-size: .7rem; line-height: 1.45; }.v2-mission-engine-note i { color: #60a5fa; font-size: 15px; }
@media(max-width:1280px){.v2-mission-studio-grid{grid-template-columns:220px minmax(480px,1fr)}.v2-mission-preview{position:static;grid-column:1/-1}.v2-mission-preview .v2-quest-card{min-height:0}}
@media(max-width:850px){.v2-mission-migration-card{grid-template-columns:1fr}.v2-mission-studio-toolbar{align-items:stretch;flex-direction:column}.v2-mission-studio-toolbar>span{margin-left:0}.v2-mission-studio-grid{grid-template-columns:1fr}.v2-mission-template-list{max-height:280px}.v2-mission-preview{grid-column:auto}}

/* ═══ Mobile : menu des sections replié en volet, contenu pleine largeur ═══ */
.cs-nav-toggle { display: none; }

@media (max-width: 768px) {
    .constellation-layout { flex-direction: column; }

    .constellation-layout .constellation-aside {
        display: flex;
        width: 100%;
        flex-shrink: 0;
        padding: 0.5rem;
        gap: 0.4rem;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .cs-nav-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 0.65rem 0.8rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        color: #f1f5f9;
        font-size: 0.95rem;
        font-weight: 700;
        cursor: pointer;
        text-align: left;
    }
    .cs-nav-toggle__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cs-nav-toggle__stats { font-size: 0.72rem; font-weight: 600; color: #fbbf24; white-space: nowrap; }

    .constellation-aside .cs-aside-header,
    .constellation-aside .cs-nav,
    .constellation-aside .cs-aside-stats,
    .constellation-aside .v2-studio-toggle { display: none; }

    .constellation-aside.is-nav-open .cs-nav { display: flex; }
    .constellation-aside.is-nav-open .v2-studio-toggle { display: flex; }

    .constellation-layout .constellation-main { flex: 1 1 0; min-height: 0; padding: 0.75rem; }
}
