:root {
    --bg-color: #0b0f19;
    --panel-bg: rgba(20, 25, 40, 0.6);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #0ea5e9;
    --accent-hover: #38bdf8;
    --quantum-color: #ec4899;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--panel-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.control-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 350px;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.lang-selector-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.2rem;
}

.lang-selector {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3px;
    gap: 3px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.45);
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(to right, #38bdf8, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.description {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 400;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.toggle-container {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 0.65rem 0.4rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.action-btn-container {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.action-btn:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

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

.action-btn.reset:hover {
    background: rgba(236, 72, 153, 0.2);
    border-color: var(--quantum-color);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.3);
}

.action-btn.is-paused {
    background: rgba(14, 165, 233, 0.25);
    border-color: var(--accent);
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.info-box {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    padding: 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e2e8f0;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Custom Scrollbar for Control Panel */
.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Seção de Créditos e Autoria */
.credits-box {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.credits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.credits-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--accent);
}

.year-badge {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.authors-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 0;
}

.authors-list li {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.authors-list li::before {
    content: "•";
    color: var(--quantum-color);
    font-weight: bold;
}

.affiliation {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    padding-left: 8px;
    margin: 2px 0;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Seção de Referências Bibliográficas */
.references-box {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.references-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.references-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #38bdf8;
}

.references-list {
    margin: 0;
    padding-left: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.4;
}

.references-list li {
    padding-left: 0.2rem;
    transition: background-color 0.35s ease, outline-color 0.35s ease, padding 0.35s ease;
}

.references-list li.ref-highlight {
    background: rgba(56, 189, 248, 0.16);
    outline: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 6px;
    padding: 4px 6px;
}

.references-list .ref-authors {
    color: #e2e8f0;
    font-weight: 600;
}

.references-list .ref-work {
    color: #cbd5e1;
}

.references-list .ref-doi {
    display: inline-block;
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.66rem;
    word-break: break-all;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.references-list .ref-doi:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* Citações sobrescritas nos textos */
sup.ref-cite {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.45em;
    margin-left: 1px;
    margin-right: 2px;
}

sup.ref-cite a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
    padding: 0 1px;
    border-radius: 3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

sup.ref-cite a:hover {
    color: #ffffff;
    background-color: rgba(56, 189, 248, 0.25);
}

.ai-disclaimer {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #a78bfa;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-disclaimer p {
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.45;
    font-style: italic;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Responsividade simples */
@media (max-width: 768px) {
    .control-panel {
        width: 100%;
        height: auto;
        bottom: 0;
        top: auto;
        border-right: none;
        border-top: 1px solid var(--panel-border);
        padding: 1.5rem;
    }
}

.label {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    opacity: var(--label-fog, 1);
    transition: opacity 0.45s ease;
}

/* Rótulos simples saem de cena enquanto os cards narrativos estão visíveis */
.label.is-muted {
    opacity: 0;
}

.magnet-label {
    font-size: 24px;
    font-weight: 800;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.magnet-n {
    color: #ef4444; /* red */
}

.magnet-s {
    color: #3b82f6; /* blue */
}

/* ==========================================================
   Etiquetas dos feixes na tela detectora (todos os modos)
   Estrutura: .beam-tag (CSS2DObject) > .bt-inner (animação) > .bt-lead + .bt-body
   ========================================================== */
.beam-tag {
    --c: #38bdf8;
    pointer-events: none;
    opacity: var(--label-fog, 1);
}

.bt-inner {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(10px);
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.beam-tag.visible .bt-inner {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(var(--i, 0) * 70ms);
}

/* Haste curta com ponto exatamente na altura do feixe */
.bt-lead {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 1px;
    background: linear-gradient(to right, var(--c), color-mix(in srgb, var(--c) 25%, transparent));
}

.bt-lead::before {
    content: '';
    position: absolute;
    left: -3px;
    top: -2.5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 8px var(--c);
}

.bt-body {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 11px 5px 12px;
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(22, 30, 50, 0.88), rgba(10, 14, 24, 0.84));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.45),
        0 0 14px color-mix(in srgb, var(--c) 16%, transparent);
    white-space: nowrap;
}

.bt-body::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--c);
}

.bt-main {
    font-size: 12.5px;
    font-weight: 700;
    color: color-mix(in srgb, var(--c) 35%, #ffffff);
}

.bt-sub {
    font-size: 10.5px;
    color: #8b9ab0;
    letter-spacing: 0.02em;
}

.bt-main .katex,
.bt-sub .katex {
    font-size: 1.05em;
    line-height: 1;
}

/* Versão compacta (orbitais d e f, com muitos feixes) */
.beam-tag.is-compact .bt-lead { width: 14px; }
.beam-tag.is-compact .bt-body { padding: 2px 8px 2px 9px; border-radius: 6px; }
.beam-tag.is-compact .bt-main { font-size: 11px; }

/* Controles Flutuantes de Câmera e Zoom */
.viewport-controls {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.viewport-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(20, 25, 40, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    user-select: none;
}

.viewport-btn:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: var(--accent);
    color: #38bdf8;
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
    transform: scale(1.08);
}

.viewport-btn:active {
    transform: scale(0.94);
    background: rgba(14, 165, 233, 0.35);
}

/* Painel Flutuante de Atalhos de Navegação */
.nav-help-panel {
    position: absolute;
    bottom: 0;
    right: 52px;
    width: 220px;
    background: rgba(15, 20, 32, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
    z-index: 25;
    animation: fadeInHelp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.nav-help-panel.visible {
    display: flex;
}

@keyframes fadeInHelp {
    from {
        opacity: 0;
        transform: translateX(8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--accent-hover);
}

.nav-help-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.nav-help-close:hover {
    color: #fff;
}

.nav-help-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.nav-help-list li {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #cbd5e1;
    font-size: 0.76rem;
}

.nav-help-list li span {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-align: right;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .viewport-controls {
        bottom: auto;
        top: 16px;
        right: 16px;
    }

    .nav-help-panel {
        bottom: auto;
        top: 0;
        right: 50px;
    }
}

/* ==========================================================
   Modo Apresentação — Cards narrativos ancorados
   Estrutura: .narrative-anchor (CSS2DObject) > .nc-wrap (escala/fade) > .nc-card + .nc-stem
   O CSS2DRenderer escreve o transform inline no elemento externo, por isso
   escala e animações ficam no wrapper interno.
   ========================================================== */
.narrative-anchor {
    --accent: #38bdf8;
    --accent-2: transparent;
    --stem-x: 50%;
    --stem-h: 46px;
    width: 350px;
    pointer-events: none;
    opacity: var(--narrative-fog, 1);
}

.nc-wrap {
    position: relative;
    transform: scale(var(--narrative-scale, 1));
    visibility: visible;
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.6s;
    transition-delay: calc(var(--i, 0) * 90ms);
}

.is-up .nc-wrap {
    padding-bottom: var(--stem-h);
    transform-origin: var(--stem-x) 100%;
}

.is-down .nc-wrap {
    padding-top: var(--stem-h);
    transform-origin: var(--stem-x) 0%;
}

/* Estado oculto: o card "recolhe" em direção ao componente e desativa totalmente cliques/links/interações */
.narrative-anchor.hidden-narrative,
.narrative-anchor.hidden-narrative * {
    pointer-events: none !important;
    cursor: default !important;
}

.narrative-anchor.hidden-narrative .nc-wrap {
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.6s;
    transition-delay: 0s;
}

.is-up.hidden-narrative .nc-wrap {
    transform: translateY(10px) scale(calc(var(--narrative-scale, 1) * 0.94));
}

.is-down.hidden-narrative .nc-wrap {
    transform: translateY(-10px) scale(calc(var(--narrative-scale, 1) * 0.94));
}

/* Haste + ponto de ancoragem */
.nc-stem {
    position: absolute;
    left: var(--stem-x);
    width: 1px;
    height: var(--stem-h);
}

.is-up .nc-stem {
    bottom: 0;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 15%, transparent), var(--accent));
}

.is-down .nc-stem {
    top: 0;
    background: linear-gradient(to top, color-mix(in srgb, var(--accent) 15%, transparent), var(--accent));
}

.nc-stem::after {
    content: '';
    position: absolute;
    left: -3.5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: ncPulse 2.4s ease-out infinite;
}

.is-up .nc-stem::after { bottom: -4px; }
.is-down .nc-stem::after { top: -4px; }

@keyframes ncPulse {
    0%   { box-shadow: 0 0 10px var(--accent), 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
    70%  { box-shadow: 0 0 10px var(--accent), 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 10px var(--accent), 0 0 0 0 transparent; }
}

/* Card */
.nc-card {
    position: relative;
    overflow: hidden;
    padding: 14px 16px 14px 19px;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(22, 30, 50, 0.86), rgba(10, 14, 24, 0.82));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #b8c4d6;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: left;
    white-space: normal;
    pointer-events: auto;
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.nc-card:hover {
    border-color: color-mix(in srgb, var(--accent) 50%, rgba(255, 255, 255, 0.2));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.65),
        0 0 18px color-mix(in srgb, var(--accent) 30%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Card focado em evidência */
.narrative-anchor.is-card-focused {
    z-index: 50 !important;
    opacity: 1 !important;
}

.narrative-anchor.is-card-focused .nc-card {
    background: linear-gradient(160deg, rgba(14, 20, 36, 0.96), rgba(8, 12, 22, 0.94));
    border-color: var(--accent);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.85),
        0 0 28px color-mix(in srgb, var(--accent) 45%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Atenuação sutil dos outros cards durante o foco */
.has-card-focused .narrative-anchor:not(.is-card-focused) {
    opacity: 0.32 !important;
    transition: opacity 0.4s ease;
}

.has-card-focused .narrative-anchor:not(.is-card-focused):hover {
    opacity: 0.8 !important;
}

/* Barra lateral com a cor do componente */
.nc-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-2));
}

/* Brilho sutil no canto superior */
.nc-card::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
    pointer-events: none;
}

.nc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.nc-step {
    padding: 1px 7px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.nc-title {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #f8fafc;
}

.nc-card p {
    margin: 0 0 8px;
}

.nc-card b {
    color: #f1f5f9;
    font-weight: 600;
}

/* Bloco de equações */
.nc-eq {
    margin: 10px 0;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font-size: 11.5px;
    text-align: center;
}

.nc-eq .katex-display {
    margin: 3px 0;
}

/* Frase de fechamento */
.nc-card p.nc-punch {
    margin: 10px 0 0;
    padding-top: 9px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-style: italic;
    font-weight: 600;
    color: color-mix(in srgb, var(--accent) 45%, #f8fafc);
}

/* Lista de previsões (card da tela) */
.nc-list {
    list-style: none;
    margin: 2px 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nc-list li {
    display: grid;
    grid-template-columns: 10px 1fr;
    column-gap: 9px;
    font-size: 12px;
    line-height: 1.4;
}

.nc-list li::before {
    content: '';
    grid-row: 1 / span 2;
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 8px var(--c);
}

.nc-list li span {
    color: #8b9ab0;
}

.nc-list li.is-real::before {
    background: linear-gradient(90deg, #38bdf8 50%, #ec4899 50%);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6), 0 0 8px rgba(236, 72, 153, 0.5);
}

.nc-list li.is-real span {
    color: #e2e8f0;
}

/* Card de Resultado (aparece com a simulação rodando): selo "ao vivo" na pílula */
.is-result .nc-step {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.12em;
}

.is-result .nc-step::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    animation: ncLive 1.6s ease-in-out infinite;
}

@keyframes ncLive {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}
