/* Diário dos BNs — Laboratório Antigo: camada HTML sobre a cena 3D (cartões, trilho, painel, carregamento). */
:root { --ol-ink: #f2e6cc; --ol-ink-soft: #d8c7a4; --ol-brass: #d2a457; --ol-brass-deep: #8a6228; --ol-bg: #0d0906; --ol-card: rgba(16, 11, 7, 0.9); --ol-line: rgba(210, 164, 87, 0.45); --ol-scale: 1; }
html.ol-page, .ol-body { background: var(--ol-bg); color: var(--ol-ink); }
.ol-body { margin: 0; overflow-x: clip; }
#ol-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; background: #0d0906; }
.ol-body .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: linear-gradient(180deg, rgba(10, 7, 4, 0.86), rgba(10, 7, 4, 0.55)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid rgba(210, 164, 87, 0.18); }
.ol-main { position: relative; z-index: 5; pointer-events: none; }
.ol-ch { pointer-events: none; }
.ol-card.is-in, .ol-card:focus-within { pointer-events: auto; }
.ol-nogl .ol-main, .ol-reading .ol-main, .ol-nogl .ol-ch, .ol-reading .ol-ch, .ol-nogl .ol-card, .ol-reading .ol-card { pointer-events: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- capítulos de rolagem ---------- */
.ol-ch { min-height: calc(var(--len, 150) * 1vh); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 1px; }
.ol-card { position: sticky; bottom: clamp(0.8rem, 3vh, 1.6rem); margin: 0 0 0 clamp(0.75rem, 2.4vw, 2rem); width: min(22.5rem, calc(100vw - 5rem)); max-height: calc(100vh - 8.4rem); max-height: calc(100svh - 8.4rem); overflow: auto; overscroll-behavior: contain;
  box-sizing: border-box; padding: 1rem 1.15rem 1.1rem; background: var(--ol-card); color: var(--ol-ink); border: 1px solid var(--ol-line); border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 230, 180, 0.07); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  font-size: calc(1rem * var(--ol-scale)); line-height: 1.55; opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.ol-card.is-in { opacity: 1; transform: none; }
.ol-card:not(.is-in) { pointer-events: none; }
.ol-card:focus-within { opacity: 1; transform: none; pointer-events: auto; }
.ol-card--ghost { background: none; border: 0; box-shadow: none; backdrop-filter: none; padding: 0; height: 1px; }
.ol-card--wide { width: min(62rem, calc(100vw - 5rem)); }
.ol-card--wide .ol-portal { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.ol-card h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: calc(1.55rem * var(--ol-scale)); line-height: 1.15; margin: 0.2rem 0 0.55rem; color: #fbf1dc; letter-spacing: 0; font-variation-settings: "SOFT" 0, "WONK" 0; }
.ol-card h2 em { font-style: normal; color: inherit; }
.ol-card h3 { font-family: "DM Sans", system-ui, sans-serif; font-weight: 700; font-size: calc(1.05rem * var(--ol-scale)); margin: 0.1rem 0 0.35rem; color: #f6e8c8; }
.ol-card p { margin: 0 0 0.6rem; }
.ol-kicker { font: 700 calc(0.78rem * var(--ol-scale))/1.3 "DM Sans", system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ol-brass); margin: 0 !important; }
.ol-small { font-size: calc(0.9rem * var(--ol-scale)); color: var(--ol-ink-soft); }
/* bloco fora de foco na bancada das telas: escondido da vista, mas lido por leitores de tela */
.ol-block.is-muted { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; border: 0; }
.ol-block.is-muted:focus-within, .ol-reading .ol-block.is-muted, .ol-nogl .ol-block.is-muted { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.ol-block.is-muted + .ol-block { margin-top: 0.6rem; }
.ol-key { font-weight: 700; white-space: nowrap; }
.ol-key::before { content: ""; display: inline-block; width: 0.9em; height: 3px; margin: 0 0.3em 0.22em 0; border-radius: 2px; background: currentColor; vertical-align: middle; }
.ol-key--v { color: #ff7a5c; } .ol-key--vx { color: #7ccfff; } .ol-key--vy { color: #8fe89b; }
.ol-block { border-top: 1px solid rgba(210, 164, 87, 0.22); padding-top: 0.6rem; margin-top: 0.6rem; }
.ol-block--plain { border-top: 0; padding-top: 0; margin-top: 0.45rem; }
.ol-controls { display: grid; gap: 0.45rem; margin: 0.4rem 0 0.5rem; }
.ol-controls label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.15rem 0.6rem; font-size: calc(0.95rem * var(--ol-scale)); }
.ol-controls input[type="range"] { grid-column: 1 / -1; accent-color: var(--ol-brass); width: 100%; }
.ol-controls output { font-family: "JetBrains Mono", monospace; font-weight: 600; color: #ffd58a; font-size: calc(0.95rem * var(--ol-scale)); grid-row: 1; grid-column: 2; }
.ol-readout { font-family: "JetBrains Mono", monospace; font-size: calc(0.9rem * var(--ol-scale)); color: var(--ol-ink); }
.ol-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.3rem 0 0.4rem; }
.ol-counts div { border: 1px solid rgba(210, 164, 87, 0.35); border-radius: 4px; padding: 0.35rem 0.5rem; text-align: center; }
.ol-counts dt { font-size: calc(0.8rem * var(--ol-scale)); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ol-ink-soft); }
.ol-counts dd { margin: 0; font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: calc(1.5rem * var(--ol-scale)); color: #ffc070; }
/* totais da comunidade: número grande e claro, nome em cima, sem quebrar palavras */
#ol-counts div { min-width: 0; border-color: rgba(210, 164, 87, 0.45); border-radius: 6px; padding: 0.45rem 0.3rem 0.4rem; background: rgba(255, 200, 120, 0.06); }
#ol-counts dt { font-size: calc(0.74rem * var(--ol-scale)); font-weight: 700; letter-spacing: 0.02em; color: #f3e2c0; }
#ol-counts dd { margin-top: 0.1rem; font-weight: 700; font-size: calc(2.15rem * var(--ol-scale)); line-height: 1.1; font-variant-numeric: tabular-nums; color: #ffd690; text-shadow: 0 0 14px rgba(255, 150, 60, 0.35); overflow-wrap: anywhere; }
.ol-contrast #ol-counts dd { color: #fff; text-shadow: none; }
.ol-counts--launch dt { text-transform: none; letter-spacing: 0; font-size: calc(0.84rem * var(--ol-scale)); white-space: nowrap; }
.ol-counts--launch dd { font-size: calc(1.15rem * var(--ol-scale)); color: #fff1d2; white-space: nowrap; }
.ol-live { font-family: "DM Sans", system-ui, sans-serif; font-size: calc(0.95rem * var(--ol-scale)); color: var(--ol-ink); }
.ol-live.is-live { color: #ff8a6a; }
.ol-live.is-live::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: #ff4a2a; margin-right: 0.45em; box-shadow: 0 0 10px #ff4a2a; animation: ol-pulse 1.4s ease-in-out infinite; }
@keyframes ol-pulse { 50% { opacity: 0.35; } }
.ol-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 2.5rem; padding: 0.5rem 0.95rem; border-radius: 4px; border: 1px solid var(--ol-line); background: rgba(40, 28, 16, 0.85); color: var(--ol-ink); font: 600 calc(0.95rem * var(--ol-scale)) / 1.2 "DM Sans", system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.ol-btn:hover { background: rgba(70, 48, 22, 0.95); border-color: var(--ol-brass); }
.ol-btn--primary { background: linear-gradient(180deg, #d9ad60, #a77a33); color: #1d1207; border-color: #e8c27b; text-transform: uppercase; letter-spacing: 0.06em; }
.ol-btn--primary:hover { background: linear-gradient(180deg, #ecc277, #b8893d); }
.ol-btn:focus-visible, .ol-rail button:focus-visible, .ol-icon:focus-visible, .ol-portal a:focus-visible, .ol-links a:focus-visible, .ol-news a:focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; }
.ol-choice { display: grid; gap: 0.55rem; margin-top: 0.5rem; }
.ol-choice .ol-btn { flex-direction: column; align-items: flex-start; text-align: left; padding: 0.7rem 0.9rem; }
.ol-choice .ol-btn span { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: calc(0.9rem * var(--ol-scale)); line-height: 1.4; }
.ol-links, .ol-actions { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; margin-top: 0.5rem; }
.ol-links a { color: #e8bd6a; text-decoration: none; font-weight: 600; font-size: calc(0.95rem * var(--ol-scale)); }
.ol-links a:hover { text-decoration: underline; }
.ol-news { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.ol-news a { display: block; color: var(--ol-ink); text-decoration: none; padding: 0.4rem 0.6rem; border-left: 3px solid var(--ol-brass); background: rgba(255, 230, 180, 0.05); font-size: calc(0.95rem * var(--ol-scale)); font-weight: 600; }
.ol-news a span { color: var(--ol-ink-soft); font-weight: 400; font-size: calc(0.86rem * var(--ol-scale)); }
.ol-news a span::before { content: " · "; }
.ol-portal { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.45rem; margin: 0.8rem 0; }
.ol-portal a { display: block; padding: 0.55rem 0.7rem; border: 1px solid rgba(210, 164, 87, 0.3); border-radius: 4px; text-decoration: none; color: var(--ol-ink); background: rgba(255, 230, 180, 0.03); }
.ol-portal a:hover { border-color: var(--ol-brass); }
.ol-portal b { display: block; font-family: "DM Sans", system-ui, sans-serif; font-size: calc(1rem * var(--ol-scale)); }
.ol-portal span { font-size: calc(0.86rem * var(--ol-scale)); color: var(--ol-ink-soft); }

/* ---------- interface fixa ---------- */
.ol-hud { position: fixed; inset: 0; pointer-events: none; z-index: 12; }
.ol-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(210, 164, 87, 0.12); z-index: 40; }
.ol-progress span { display: block; height: 100%; background: linear-gradient(90deg, #8a6228, #e8c27b); transform-origin: left; transform: scaleX(0); }
.ol-rail { position: absolute; right: clamp(0.4rem, 1.5vw, 1.2rem); top: 54%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.2rem; pointer-events: auto; }
.ol-rail button { position: relative; width: 1.9rem; height: 1.6rem; border: 0; background: none; cursor: pointer; padding: 0; }
.ol-rail button::before { content: ""; position: absolute; right: 0.6rem; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; border: 1px solid rgba(232, 194, 123, 0.7); background: rgba(13, 9, 6, 0.6); transition: transform 0.25s, background 0.25s; }
.ol-rail button[aria-current="step"]::before { background: #e8c27b; transform: scale(1.35); box-shadow: 0 0 10px rgba(232, 194, 123, 0.7); }
.ol-rail span { position: absolute; right: 2rem; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 600 0.85rem/1 "DM Sans", sans-serif; letter-spacing: 0.05em; color: var(--ol-ink); background: rgba(13, 9, 6, 0.82); border: 1px solid var(--ol-line); padding: 0.3rem 0.5rem; border-radius: 3px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.ol-rail button:hover span, .ol-rail button:focus-visible span { opacity: 1; }
.ol-scroll-hint { position: absolute; left: 50%; bottom: clamp(1.2rem, 5vh, 2.6rem); transform: translateX(-50%); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; font: 600 0.72rem/1 "JetBrains Mono", monospace; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(242, 230, 204, 0.82); text-shadow: 0 2px 10px #000; transition: opacity 0.6s; }
.ol-scroll-hint i { width: 14px; height: 14px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: ol-arrow 1.8s ease-in-out infinite; }
@keyframes ol-arrow { 0%, 100% { transform: translateY(-3px) rotate(45deg); opacity: 0.5; } 50% { transform: translateY(5px) rotate(45deg); opacity: 1; } }
.ol-scroll-hint.is-hidden { opacity: 0; }
.ol-dock { position: fixed; right: clamp(0.6rem, 2vw, 1.4rem); top: 5.1rem; z-index: 25; display: flex; gap: 0.35rem; }
.ol-icon { display: inline-flex; align-items: center; gap: 0.35rem; height: 2.4rem; padding: 0 0.7rem; border-radius: 999px; border: 1px solid var(--ol-line); background: rgba(13, 9, 6, 0.85); color: var(--ol-ink); font: 600 0.85rem/1 "DM Sans", sans-serif; cursor: pointer; backdrop-filter: blur(6px); }
.ol-icon svg { width: 1.05rem; height: 1.05rem; }
.ol-icon[aria-pressed="true"] { border-color: var(--ol-brass); color: #ffe2a8; }
.ol-stepper { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 24; display: none; gap: 0.5rem; }
.ol-steps .ol-stepper { display: flex; }
.ol-tooltip { position: fixed; left: 0; top: 0; z-index: 26; pointer-events: none; padding: 0.35rem 0.6rem; font: 600 0.9rem/1.2 "DM Sans", sans-serif; color: #1d1207; background: #e8c27b; border-radius: 3px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
.ol-live-frame { position: fixed; left: 0; top: 0; z-index: 4; transform-origin: 0 0; pointer-events: auto; background: #000; }
.ol-live-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ol-crt-frame { position: fixed; left: 0; top: 0; z-index: 4; transform-origin: 0 0; pointer-events: none; visibility: hidden; border-radius: 22px; max-width: none !important; max-height: none !important; }

/* ---------- painel de acessibilidade ---------- */
.ol-settings { position: fixed; right: clamp(0.6rem, 2vw, 1.4rem); top: 8.2rem; z-index: 35; width: min(23rem, calc(100vw - 1.2rem)); max-height: calc(100vh - 9.5rem); overflow: auto; box-sizing: border-box; padding: 1rem 1.1rem; background: rgba(16, 11, 7, 0.96); border: 1px solid var(--ol-line); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); color: var(--ol-ink); font-size: calc(0.88rem * var(--ol-scale)); }
.ol-settings-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.ol-settings h2 { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; margin: 0; }
.ol-settings fieldset { border: 1px solid rgba(210, 164, 87, 0.25); border-radius: 4px; margin: 0 0 0.6rem; padding: 0.5rem 0.7rem 0.6rem; display: grid; gap: 0.4rem; }
.ol-settings legend { color: var(--ol-brass); font: 600 0.7rem/1 "JetBrains Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; padding: 0 0.3rem; }
.ol-settings label { display: grid; gap: 0.25rem; }
.ol-settings .ol-check { display: flex; gap: 0.5rem; align-items: flex-start; }
.ol-settings select, .ol-settings input[type="range"] { accent-color: var(--ol-brass); width: 100%; }
.ol-settings select { background: #1c140c; color: var(--ol-ink); border: 1px solid var(--ol-line); border-radius: 3px; padding: 0.35rem; }
.ol-close { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--ol-line); background: none; color: var(--ol-ink); font-size: 1.3rem; cursor: pointer; }

/* ---------- carregamento ---------- */
.ol-loader { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; background: radial-gradient(circle at 50% 40%, #1d140b, #070503 70%); color: var(--ol-ink); transition: opacity 0.9s ease, visibility 0.9s; }
.ol-loader.is-done { opacity: 0; visibility: hidden; }
.ol-loader-gauge { position: relative; width: 9rem; height: 4.8rem; border-radius: 9rem 9rem 0 0; border: 3px solid #b88a3e; border-bottom-width: 4px; background: radial-gradient(circle at 50% 100%, #2a1d10 0, #f0dfb8 1px, #e7d3a5 60%, #c9a868 100%); overflow: hidden; box-shadow: inset 0 0 18px rgba(80, 50, 15, 0.6), 0 0 30px rgba(232, 194, 123, 0.15); }
.ol-loader-gauge::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #3a250f; }
.ol-needle { position: absolute; left: 50%; bottom: 0; width: 2px; height: 4.2rem; margin-left: -1px; background: #5a1a0c; transform-origin: 50% 100%; transform: rotate(-80deg); transition: transform 0.5s cubic-bezier(.4, 1.6, .5, 1); }
.ol-loader-title { font-family: Fraunces, Georgia, serif; font-style: italic; font-size: 1.15rem; margin: 0.4rem 0 0; }
.ol-loader-step { font: 500 0.75rem/1 "JetBrains Mono", monospace; letter-spacing: 0.1em; color: var(--ol-ink-soft); margin: 0; }
.ol-loader-bar { width: min(16rem, 70vw); height: 3px; background: rgba(210, 164, 87, 0.18); }
.ol-loader-bar span { display: block; height: 100%; width: 0; background: #e8c27b; transition: width 0.4s; }
.ol-loader-skip { margin-top: 0.8rem; color: var(--ol-ink-soft); font-size: 0.8rem; }

/* ---------- alternativas: sem WebGL e modo de leitura ---------- */
.ol-fallback { position: relative; z-index: 6; margin: 5.5rem auto 0; width: min(46rem, calc(100vw - 2rem)); padding: 0.8rem 1rem; border: 1px solid var(--ol-line); border-radius: 6px; background: rgba(40, 28, 16, 0.9); }
.ol-fallback-art { position: relative; z-index: 5; margin: 5.5rem auto 0; width: min(60rem, calc(100vw - 2rem)); }
.ol-fallback-art canvas { width: 100%; height: auto; display: block; border: 14px solid #3b2412; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.ol-nogl #ol-canvas, .ol-reading #ol-canvas, .ol-nogl .ol-hud, .ol-reading .ol-hud, .ol-nogl .ol-live-frame, .ol-reading .ol-live-frame, .ol-nogl .ol-crt-frame, .ol-reading .ol-crt-frame { display: none; }
.ol-nogl .ol-ch, .ol-reading .ol-ch { min-height: 0; padding: 0.6rem 0; }
.ol-nogl .ol-card, .ol-reading .ol-card { position: static; opacity: 1; transform: none; margin: 0 auto; width: min(46rem, calc(100vw - 2rem)); max-height: none; }
.ol-nogl .ol-card--ghost .sr-only, .ol-reading .ol-card--ghost .sr-only { position: static !important; width: auto; height: auto; clip: auto; white-space: normal; }
.ol-nogl .ol-card--ghost, .ol-reading .ol-card--ghost { height: auto; padding: 1rem 1.2rem; background: var(--ol-card); border: 1px solid var(--ol-line); }
.ol-nogl .ol-card--ghost h1, .ol-reading .ol-card--ghost h1 { font-family: Fraunces, Georgia, serif; font-size: 1.9rem; margin: 0 0 0.4rem; }
.ol-reading .ol-main { padding-top: 5rem; }

/* ---------- contraste alto ---------- */
.ol-contrast { --ol-card: rgba(0, 0, 0, 0.96); --ol-ink: #ffffff; --ol-ink-soft: #f2f2f2; --ol-line: #ffd27a; --ol-brass: #ffd27a; }
.ol-contrast .ol-card { border-width: 2px; backdrop-filter: none; }
.ol-contrast .ol-btn { border-width: 2px; }
.ol-contrast .ol-btn--primary { background: #ffd27a; color: #000; }

@media (max-width: 760px) {
  .ol-card { margin: 0 auto; width: calc(100vw - 1.4rem); max-height: 44vh; max-height: 44svh; padding: 0.85rem 0.95rem 0.95rem; font-size: calc(0.97rem * var(--ol-scale)); }
  .ol-card h2 { font-size: calc(1.3rem * var(--ol-scale)); }
  .ol-hint { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* última parte: o cartão com todos os atalhos rola junto com a página, sem barra interna */
  .ol-ch--final .ol-card { position: relative; max-height: none; overflow: visible; }
  .ol-rail { display: none; }
  .ol-scroll-hint { white-space: nowrap; letter-spacing: 0.22em; }
  .ol-icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ol-icon { padding: 0 0.65rem; }
  .ol-settings { top: 7.6rem; }
  .ol-dock { top: 4.6rem; }
  .ol-ch { padding-bottom: 3.6rem; }
}
@media (max-width: 760px) and (max-height: 780px) {
  .ol-card { max-height: 48vh; max-height: 48svh; font-size: calc(0.93rem * var(--ol-scale)); padding: 0.75rem 0.9rem 0.85rem; }
  .ol-controls { gap: 0.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ol-card { transition: none; }
  .ol-scroll-hint i { animation: none; }
}

.ol-leaving #ol-canvas { transition: filter 0.6s ease, opacity 0.6s ease; filter: brightness(1.6) blur(2px); opacity: 0.2; }

.ol-nogl [data-toggle-pause], .ol-nogl [data-toggle-sound], .ol-reading [data-toggle-pause] { display: none; }

/* ---------- central dos laboratórios virtuais (lista, mapa e atalho permanente) ---------- */
/* o rodapé da central não fica embaixo do botão "Acessibilidade" do site (fixo no canto inferior direito) */
.ol-hub { --hub-pad: clamp(0.5rem, 3vw, 2rem); --hub-pad-b: max(var(--hub-pad), 5.25rem); position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--hub-pad) var(--hub-pad) var(--hub-pad-b); background: rgba(8, 5, 3, 0.74); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s ease; }
.ol-hub.is-in { opacity: 1; }
.ol-hub[hidden] { display: none; }
.ol-hub-open { overflow: hidden; }
.ol-hub-panel { box-sizing: border-box; width: min(68rem, 100%); max-height: calc(100vh - var(--hub-pad) - var(--hub-pad-b)); max-height: calc(100svh - var(--hub-pad) - var(--hub-pad-b)); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 0.9rem; padding: clamp(1rem, 2.4vw, 1.6rem); background: #17100a; color: var(--ol-ink); border: 1px solid var(--ol-line); border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); font: 400 1rem/1.5 "DM Sans", system-ui, sans-serif; }
.ol-hub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.ol-hub-head h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; margin: 0.2rem 0 0.35rem; color: #fbf1dc; }
.ol-hub-head h2:focus { outline: none; box-shadow: none; }
.ol-hub-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0.15rem 0.2rem 0.2rem 0; }
.ol-hub-sub { margin: 0; max-width: 46rem; color: var(--ol-ink-soft); }
.ol-hub-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; border-bottom: 1px solid rgba(210, 164, 87, 0.3); }
.ol-hub-tabs [role="tab"] { font: 600 1rem/1 "DM Sans", system-ui, sans-serif; color: var(--ol-ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.75rem 0.95rem; cursor: pointer; }
.ol-hub-tabs [role="tab"][aria-selected="true"] { color: #ffe2a8; border-bottom-color: #e8c27b; }
.ol-hub-tabs [role="tab"]:focus-visible, .ol-lab-card:focus-visible, .ol-map-station:focus-visible, .ol-map-part:focus-visible, .ol-hub-check input:focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; }
.ol-lab-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.75rem; }
.ol-lab-card { box-sizing: border-box; height: 100%; display: grid; grid-template-columns: 4.6rem 1fr; grid-template-rows: 1fr auto; gap: 0.3rem 0.9rem; padding: 0.85rem 0.95rem; border: 1px solid rgba(210, 164, 87, 0.38); border-radius: 8px; background: rgba(255, 230, 180, 0.04); color: var(--ol-ink); text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.ol-lab-card:hover { border-color: #e8c27b; background: rgba(255, 230, 180, 0.09); transform: translateY(-2px); }
.ol-lab-art { grid-row: 1 / 3; display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; background: #0e0a06; border: 1px solid rgba(210, 164, 87, 0.28); }
.ol-lab-art svg, .ol-map-icon svg { width: 82%; height: auto; fill: none; stroke: #f2e6cc; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ol-lab-art svg .secondary, .ol-map-icon svg .secondary { stroke: #e8b45e; }
.ol-lab-text { display: grid; gap: 0.15rem; align-content: start; }
.ol-lab-text b { font: 700 1.1rem/1.25 "DM Sans", system-ui, sans-serif; color: #fbf1dc; }
.ol-lab-cat { font: 700 0.8rem/1.2 "DM Sans", system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: #e0b462; }
.ol-lab-desc { font-size: 0.93rem; line-height: 1.45; color: var(--ol-ink-soft); }
.ol-lab-go { grid-column: 2; font: 700 0.95rem/1.2 "DM Sans", system-ui, sans-serif; color: #ffd58a; }
.ol-hub-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 0.8rem; padding-top: 0.8rem; border-top: 1px solid rgba(210, 164, 87, 0.22); }
.ol-hub-check { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ol-ink-soft); cursor: pointer; }
.ol-hub-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ol-brass); }
.ol-map-route { list-style: none; margin: 0.5rem 0 0.7rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ol-map-part { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.75rem 0.35rem 0.35rem; border: 1px solid rgba(210, 164, 87, 0.3); border-radius: 999px; background: rgba(255, 230, 180, 0.04); color: var(--ol-ink); font: 600 0.92rem/1.2 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.ol-map-part:hover { border-color: #e8c27b; }
.ol-map-num { display: inline-grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: rgba(210, 164, 87, 0.22); font-size: 0.8rem; }
.ol-map-part.is-labs { border-color: #e8c27b; background: rgba(232, 194, 123, 0.16); color: #ffe2a8; }
.ol-map-part.is-here { box-shadow: 0 0 0 2px #7fd1ff; }
.ol-map-part.is-here::after { content: "você está aqui"; margin-left: 0.15rem; font-size: 0.78rem; color: #9bdcff; }
.ol-map-room { position: relative; display: flex; align-items: flex-start; padding: 2.7rem 0.45rem 3.1rem; min-height: clamp(16rem, 36vh, 22rem); border: 2px solid rgba(210, 164, 87, 0.55); border-radius: 8px; background: repeating-linear-gradient(90deg, rgba(255, 230, 180, 0.035) 0 1px, transparent 1px 2.4rem), #120c07; }
.ol-map-wall { position: absolute; left: 6%; right: 6%; top: 0.6rem; padding: 0.3rem; text-align: center; font: 600 0.78rem/1.2 "DM Sans", system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ol-ink-soft); border: 1px dashed rgba(210, 164, 87, 0.38); border-radius: 4px; }
.ol-map-door { position: absolute; bottom: 0.55rem; font-size: 0.84rem; color: var(--ol-ink-soft); }
.ol-map-door--in { left: 0.75rem; } .ol-map-door--out { right: 0.75rem; }
.ol-map-area { flex: 1 1 var(--w); min-width: 0; box-sizing: border-box; margin: 0 0.18rem; padding: 0.55rem 0.35rem 0.6rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.3rem, 1fr)); align-content: start; justify-items: center; gap: 0.7rem 0.25rem; border: 1px dashed rgba(210, 164, 87, 0.42); border-radius: 6px; background: rgba(255, 230, 180, 0.03); }
.ol-map-area.is-here { border: 2px solid #7fd1ff; background: rgba(127, 209, 255, 0.07); }
.ol-map-area-name, .ol-map-note, .ol-map-area .ol-map-here { grid-column: 1 / -1; text-align: center; }
.ol-map-area .ol-map-here { white-space: normal; line-height: 1.25; }
.ol-map-area-name { font: 700 0.82rem/1.2 "DM Sans", system-ui, sans-serif; letter-spacing: 0.05em; text-transform: uppercase; color: #ffe2a8; }
.ol-map-note { font-size: 0.86rem; line-height: 1.35; color: var(--ol-ink-soft); }
.ol-map-station { position: relative; width: 100%; max-width: 7.6rem; display: grid; justify-items: center; gap: 0.35rem; text-decoration: none; color: var(--ol-ink); }
.ol-map-icon { display: grid; place-items: center; width: 3.3rem; height: 3.3rem; border-radius: 50%; background: #0e0a06; border: 2px solid #c9a052; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); transition: transform 0.2s, border-color 0.2s; }
.ol-map-name { max-width: 100%; padding: 0.18rem 0.4rem; border-radius: 4px; background: rgba(13, 9, 6, 0.88); font: 700 0.88rem/1.2 "DM Sans", system-ui, sans-serif; text-align: center; overflow-wrap: anywhere; }
.ol-map-station:hover .ol-map-icon { transform: scale(1.08); border-color: #ffe2a8; }
.ol-map-here { font: 700 0.84rem/1 "DM Sans", system-ui, sans-serif; color: #9bdcff; white-space: nowrap; }
.ol-map-here::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.4rem; border-radius: 50%; background: #7fd1ff; box-shadow: 0 0 0 4px rgba(127, 209, 255, 0.25); }
.ol-icon--labs { border-color: #e8c27b; color: #ffe2a8; }
.ol-contrast .ol-hub-panel { background: #000; border-width: 2px; }
.ol-contrast .ol-lab-card, .ol-contrast .ol-map-part { border-width: 2px; }
@media (max-width: 760px) {
  .ol-hub { padding: 0; place-items: stretch; }
  .ol-hub-panel { width: 100%; max-height: 100vh; max-height: 100svh; border-radius: 0; gap: 0.7rem; }
  .ol-lab-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .ol-lab-card { grid-template-columns: 3.4rem 1fr; padding: 0.65rem 0.75rem; }
  .ol-lab-desc { display: none; }
  .ol-map-room { display: grid; gap: 0.5rem; padding: 2.8rem 0.7rem 2.6rem; min-height: 0; }
  .ol-map-area { margin: 0; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); justify-items: stretch; }
  .ol-map-station { max-width: none; grid-template-columns: 3rem 1fr; justify-items: start; align-items: center; gap: 0.7rem; }
  .ol-map-icon { width: 3rem; height: 3rem; }
  .ol-map-name { text-align: left; }
  .ol-map-door--out { display: none; }
  .ol-hub-foot .ol-btn { width: 100%; }
  .ol-hub-foot { padding-right: 3.9rem; }
}
@media (min-width: 721px) and (max-width: 760px) { .ol-hub-foot { padding-right: 11rem; } }
@media (prefers-reduced-motion: reduce) { .ol-hub, .ol-lab-card, .ol-map-icon { transition: none; } }

/* ---------- rótulos presos às estações 3D (laboratório de Física) ---------- */
.ol-ch[data-ch="5"] .ol-card { z-index: 6; }
.ol-lab-tags { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.ol-lab-tags.is-on { opacity: 1; }
.ol-lab-tag { --lift: 0px; position: absolute; left: 0; top: 0; pointer-events: auto; text-decoration: none; color: #fbf1dc; will-change: transform; display: grid; justify-items: center; gap: 0.08rem; padding: 0.34rem 0.72rem 0.38rem; border: 1px solid rgba(232, 194, 123, 0.78); border-radius: 6px; background: rgba(13, 9, 6, 0.88); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); white-space: nowrap; translate: -50% calc(-100% - 9px - var(--lift)); transition: background 0.18s, color 0.18s, border-color 0.18s; }
.ol-lab-tags:not(.is-on) .ol-lab-tag { pointer-events: none; }
.ol-lab-tag::after { content: ""; position: absolute; left: calc(50% + var(--px, 0px)); top: 100%; width: 1px; height: calc(9px + var(--lift)); background: rgba(232, 194, 123, 0.78); }
.ol-lab-tag b { font: 700 0.98rem/1.15 "DM Sans", system-ui, sans-serif; }
.ol-lab-tag span { font: 700 0.72rem/1.1 "DM Sans", system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #e8b45e; }
.ol-lab-tag span::after { content: " →"; }
.ol-lab-tag:hover, .ol-lab-tag.is-hot { background: #e8c27b; color: #1d1207; border-color: #ffe2a8; }
.ol-lab-tag:hover span, .ol-lab-tag.is-hot span { color: #4a2d08; }
.ol-lab-tags.is-compact .ol-lab-tag { padding: 0.24rem 0.5rem 0.26rem; }
.ol-lab-tags.is-compact .ol-lab-tag span { display: none; }
.ol-lab-tags.is-compact .ol-lab-tag b { font-size: 0.84rem; }
.ol-lab-tags.is-stagger .ol-lab-tag.is-up { --lift: 2.1rem; }
.ol-contrast .ol-lab-tag { background: #000; border-width: 2px; }
@media (prefers-reduced-motion: reduce) { .ol-lab-tags, .ol-lab-tag { transition: none; } }
/* celular: as listas de laboratórios dos cartões viram etiquetas curtas (só o nome) para o cartão caber sem rolagem interna */
@media (max-width: 760px) {
  .ol-labs-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .ol-labs-list a { display: inline-block; padding: 0.42rem 0.65rem; border: 1px solid rgba(210, 164, 87, 0.45); border-left-width: 3px; border-radius: 4px; }
  .ol-labs-list a span { display: none; }
}
