/* =====================================================================================================
   The subject lab (materias.mjs): every subject speaks for itself. Colors are tokens so the light room, the night
   room and the color-blind palettes all hold; text on a drawing always sits on its own solid background.
   ===================================================================================================== */
.lab { max-width: var(--largura); }
.lab-cabeca { display: grid; gap: 10px; max-width: 46em; }
.lab-materias { list-style: none; padding: 0; margin: 26px 0 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.lab-materias button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 18px 8px 10px; border-radius: 999px; border: 1.5px solid var(--linha-forte); background: var(--folha); color: var(--tinta); font-weight: 700; cursor: pointer; transition: transform .15s, border-color .2s, background .2s; }
.lab-materias button:hover { transform: translateY(-2px); border-color: var(--caneta); }
.lab-materias button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.lab-materias .lab-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--caneta-claro); color: var(--caneta-forte); font: 700 .95rem var(--titulo); }
.lab-materias button[aria-pressed="true"] .lab-ic { background: var(--marca-texto); color: #17191e; }
.lab-mesa { position: relative; border-radius: 26px; padding: clamp(14px, 2.4vw, 28px); background: var(--folha); border: 1px solid var(--linha); box-shadow: var(--sombra-forte); overflow: hidden; }
.lab-mesa::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: radial-gradient(circle, var(--linha-forte) 1px, transparent 1.4px) 0 0 / 22px 22px; mask-image: linear-gradient(transparent, #000 40%); }
.lab-palco { position: relative; min-height: 300px; display: grid; gap: 14px; }
.lab-svg { width: 100%; height: auto; max-height: 62vh; display: block; overflow: visible; touch-action: manipulation; }
.lab-info { position: relative; min-height: 3.2em; margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: var(--papel); border: 1px solid var(--linha); color: var(--tinta); font-size: 1.02rem; }
.lab-info::before { content: "✎ "; color: var(--caneta); font-weight: 700; }
.lab-tocavel { cursor: pointer; outline: none; }
.lab-tocavel:focus-visible > * { stroke: var(--caneta) !important; stroke-width: 4px !important; }
.lab-eq { font: 700 30px var(--mao); fill: var(--tinta); transition: fill .3s; }
.lab-eq.reagiu { fill: var(--caneta); }
.lab-num { font: 700 26px var(--texto); fill: var(--tinta); font-variant-numeric: tabular-nums; }
.lab-acao { justify-self: start; }
.lab-nota { margin-top: 14px; }

/* química */
.lab-bancada { fill: var(--mesa); } .lab-bancada-borda { fill: var(--madeira); }
.q-vidro { fill: color-mix(in srgb, var(--folha) 55%, transparent); stroke: var(--suave); stroke-width: 3; }
.q-boca { fill: var(--suave); } .q-tampa { fill: var(--suave); }
.q-cor { stroke: rgb(0 0 0 / .12); }
.q-rotulo { font: 700 14px var(--texto); fill: #1d2433; paint-order: stroke; stroke: rgb(255 255 255 / .85); stroke-width: 4px; }
.q-liquido { transition: fill .6s; }
.q-bolha { fill: rgb(255 255 255 / .75); }
.q-frasco { transition: transform .25s; transform-box: fill-box; }
.q-frasco:hover > rect:first-child { stroke: var(--caneta); }
.q-frasco.despejando { animation: despejar .9s ease-in-out; }
@keyframes despejar { 40%, 60% { translate: 0 -40px; rotate: 0; } }
.q-espuma { fill: #fffbe6; stroke: #e8dca0; animation: espuma 1.6s ease-out both; animation-delay: calc(var(--i, 0) * 60ms); }
.q-espuma[data-i="1"] { animation-delay: .1s; } .q-espuma[data-i="2"] { animation-delay: .2s; } .q-espuma[data-i="3"] { animation-delay: .3s; } .q-espuma[data-i="4"] { animation-delay: .4s; } .q-espuma[data-i="5"] { animation-delay: .5s; }
@keyframes espuma { from { translate: 0 30px; opacity: 0; } 30% { opacity: 1; } to { translate: 0 -110px; opacity: .2; } }
.q-gota { fill: #7cc6ff; animation: gota 1.4s ease-in both; }
.q-gota[data-i="1"], .q-cristal[data-i="1"] { animation-delay: .12s; } .q-gota[data-i="2"], .q-cristal[data-i="2"] { animation-delay: .24s; } .q-gota[data-i="3"], .q-cristal[data-i="3"] { animation-delay: .36s; } .q-gota[data-i="4"], .q-cristal[data-i="4"] { animation-delay: .48s; } .q-gota[data-i="5"], .q-cristal[data-i="5"] { animation-delay: .6s; }
@keyframes gota { from { translate: 0 -60px; opacity: 0; } 40% { opacity: 1; } to { translate: 0 140px; opacity: 0; } }
.q-cristal { fill: #fff; stroke: #9aa7b4; stroke-width: 2; animation: cristal .8s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes cristal { from { scale: 0; rotate: 45deg; } to { scale: 1; rotate: 0deg; } }

/* física */
.f-ceu { fill: url(#f-ceu); }
.f-estrela { fill: #fff8e0; opacity: .7; }
.f-morro { fill: #3b4a6b; opacity: .75; } .f-morro-2 { fill: #2f5a3a; opacity: .9; }
.f-grama { fill: url(#f-grama-g); }
.f-folha-grama { fill: none; stroke: #6cb85a; stroke-width: 2; stroke-linecap: round; opacity: .8; }
.f-sombra { fill: rgb(0 0 0 / .28); }
.f-casca { fill: none; stroke: rgb(40 22 10 / .45); stroke-width: 2.5; stroke-linecap: round; }
.f-copa { stroke: rgb(20 50 25 / .25); stroke-width: 1; }
.f-folhinha { fill: #8fd57a; opacity: .35; }
.f-reflexo { fill: #fff; opacity: .55; }
.f-folha-maca { fill: #4c9a3f; }
.f-rastro { fill: #e0362b; opacity: .35; animation: f-rastro .9s ease-out forwards; }
@keyframes f-rastro { to { opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: center; } }
.f-casaco { fill: #3a2f52; } .f-livro { fill: #c9a96e; } .f-rosto { fill: #e8c4a0; } .f-peruca { fill: #efe9dc; }
.f-maca circle:not(.f-rastro) { stroke: #7a140d; stroke-width: 1.5; }
.f-cabo { stroke: #5b3a1e; stroke-width: 3; fill: none; stroke-linecap: round; }
.f-maca:hover { filter: brightness(1.15) drop-shadow(0 0 6px #ffb199); }

.f-balao { font: 700 46px var(--mao); fill: #ffe9a8; paint-order: stroke; stroke: #1d2a4d; stroke-width: 6px; }
.f-lua-disco { fill: #e8e3cf; stroke: #b8b29a; stroke-width: 2; } .f-cratera { fill: #cfc8ad; }
.f-orbita { fill: none; stroke: #c9c6e8; stroke-width: 2; stroke-dasharray: 4 9; opacity: .6; }
.f-formula { font: 700 34px var(--mao); fill: #fff3c4; paint-order: stroke; stroke: rgb(29 42 77 / .85); stroke-width: 6px; }
.f-formula.entrando { animation: entrar .5s ease-out both; }
@keyframes entrar { from { opacity: 0; translate: -14px 0; } }
.f-leitura text { fill: #ffffff; paint-order: stroke; stroke: rgb(29 42 77 / .9); stroke-width: 6px; }

/* idiomas */
.i-mar { fill: color-mix(in srgb, #3b82c4 70%, var(--folha)); }
.i-continente { fill: color-mix(in srgb, #58a86a 85%, var(--folha)); }
.i-linha { fill: none; stroke: rgb(255 255 255 / .35); stroke-width: 1.5; }
.i-bolha { fill: var(--papel); stroke: var(--linha-forte); stroke-width: 2; }
.i-texto { font: 700 24px var(--texto); fill: var(--tinta); }
.i-palavra { animation: flutuar 5s ease-in-out infinite; }
.i-palavra[data-i="1"] { animation-delay: -1s; } .i-palavra[data-i="2"] { animation-delay: -2s; } .i-palavra[data-i="3"] { animation-delay: -3s; } .i-palavra[data-i="4"] { animation-delay: -4s; } .i-palavra[data-i="5"] { animation-delay: -2.5s; }
@keyframes flutuar { 50% { translate: 0 -8px; } }
.i-palavra:hover .i-bolha, .i-palavra.ativa .i-bolha { fill: var(--marca-texto); stroke: #b88c12; }
.i-palavra.ativa .i-texto, .i-palavra:hover .i-texto { fill: #17191e; }

/* história */
.h-linha { display: flex; gap: 14px; overflow-x: auto; padding: 40px 6px 22px; scroll-snap-type: x proximity; cursor: grab; position: relative; scrollbar-width: thin; }
.h-linha::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; background: var(--linha-forte); border-radius: 2px; min-width: 1500px; }
.h-marco { position: relative; flex: 0 0 auto; width: 158px; display: grid; justify-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 18px; border: 1.5px solid var(--linha); background: var(--papel); color: var(--tinta); cursor: pointer; scroll-snap-align: center; transition: transform .2s, border-color .2s, box-shadow .2s; }
.h-marco:hover { transform: translateY(-4px); }
.h-marco.ativo { border-color: var(--caneta); box-shadow: 0 10px 24px -12px var(--caneta); transform: translateY(-6px); }
.h-icone { width: 92px; height: 74px; }
.h-ano { font: 700 1.5rem var(--mao); color: var(--caneta-forte); }
.h-nome { font-size: .86rem; font-weight: 600; text-align: center; line-height: 1.25; }
.h-pedra { fill: #d9b679; stroke: #8c6b33; stroke-width: 2; } .h-traco { fill: none; stroke: var(--tinta); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.h-madeira { fill: #a0683a; } .h-papel { fill: #fffdf5; stroke: #bbb; } .h-vela { fill: #fffdf5; stroke: #999; } .h-cruz { stroke: #c8372d; stroke-width: 3; }
.h-agua { fill: none; stroke: #3b82c4; stroke-width: 3; } .h-azul { fill: #1f3a8a; } .h-vermelho { fill: #c8372d; } .h-verde { fill: #2f8f4f; } .h-amarelo { fill: #f5c542; }
.h-luz { fill: #ffe27a; stroke: #b88c12; stroke-width: 2; } .h-lua { fill: #e8e3cf; stroke: #b8b29a; stroke-width: 2; } .h-mar { fill: #8fc3ef; }
.h-linha .h-marco:nth-child(odd) { margin-top: 26px; }

/* finanças */
.fi-caixa { display: grid; gap: 14px; }
.fi-abas { display: flex; gap: 8px; flex-wrap: wrap; }
.fi-aba { min-height: 42px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--linha-forte); background: var(--papel); color: var(--tinta); font-weight: 700; cursor: pointer; }
.fi-aba[aria-pressed="true"] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.fi-corpo { display: grid; gap: 12px; }
.fi-controles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 22px; }
.fi-campo { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.fi-campo strong { color: var(--caneta-forte); }
.fi-campo input { width: 100%; accent-color: var(--caneta); min-height: 32px; }
.fi-guardado { fill: var(--caneta); } .fi-juros { fill: var(--marca-texto); }
.fi-moeda circle { fill: #f5c542; stroke: #b88c12; stroke-width: 2; }
.fi-resultado { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 1rem; }
.fi-resultado strong { font-size: 1.2rem; }
.fi-leg::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.fi-leg-g::before { background: var(--caneta); } .fi-leg-j::before { background: var(--marca-texto); }
.fi-formula { font-size: 1.4rem; color: var(--suave); }
.fi-grade { stroke: var(--linha); stroke-width: 1; }
.fi-linha { fill: none; stroke: #e0912b; stroke-width: 4; stroke-linejoin: round; }
.fi-linha-poupanca { fill: none; stroke: var(--caneta); stroke-width: 3; stroke-dasharray: 8 6; }
.fi-bitcoin circle { fill: #f7931a; stroke: #b86a0b; stroke-width: 2; } .fi-bitcoin text { font: 700 24px var(--texto); fill: #fff; }

/* biologia */
.b-niveis { display: flex; flex-wrap: wrap; gap: 6px; }
.b-nivel { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--linha-forte); background: var(--papel); color: var(--tinta); font-weight: 700; cursor: pointer; }
.b-nivel[aria-pressed="true"] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.b-area .lab-svg { max-height: 56vh; }
@keyframes bater { 0%, 100% { scale: 1; } 12% { scale: 1.12; } 24% { scale: .98; } 36% { scale: 1.07; } }
.b-membrana { fill: color-mix(in srgb, #f7d8a8 55%, var(--folha)); stroke: #c9905a; stroke-width: 6; }
.b-nucleo { fill: #9b7fd1; stroke: #6a4fa3; stroke-width: 4; } .b-nucleolo { fill: #5b3c99; }
.b-mito { fill: #f08a6a; stroke: #b2502f; stroke-width: 3; } .b-crista { fill: none; stroke: #b2502f; stroke-width: 2; }
.b-ribo { fill: #3b6fd1; }
.b-parte { transition: filter .2s; } .b-parte:hover, .b-parte.ativo { filter: drop-shadow(0 0 8px var(--marca-texto)); }
.b-degrau { stroke: var(--suave); stroke-width: 4; } .b-fita1 { fill: var(--caneta); } .b-fita2 { fill: #e0912b; }
.b-base { font: 700 18px var(--texto); fill: var(--tinta); }
.b-pele-corte { fill: color-mix(in srgb, #e8b48f 70%, var(--folha)); }
.b-fio { fill: #4a3426; } .b-bulbo { fill: #6b4a33; } .b-escama { fill: none; stroke: #8a6a52; stroke-width: 2; }
.b-rotulo { font: 700 20px var(--mao); fill: var(--tinta); }

/* matemática */
.m-quad { stroke-width: 2.5; transition: d .15s; }
.m-qa { fill: color-mix(in srgb, var(--caneta) 22%, transparent); stroke: var(--caneta); }
.m-qb { fill: color-mix(in srgb, #e0912b 25%, transparent); stroke: #c47616; }
.m-qc { fill: color-mix(in srgb, var(--marca-texto) 35%, transparent); stroke: #b88c12; }
.m-tri { fill: var(--folha); stroke: var(--tinta); stroke-width: 4; stroke-linejoin: round; }
.m-reto { fill: none; stroke: var(--tinta); stroke-width: 2.5; }
.m-area { font: 700 30px var(--mao); fill: var(--tinta); }
.m-alca { fill: var(--caneta); stroke: var(--folha); stroke-width: 4; cursor: grab; touch-action: none; }
.m-alca:focus-visible { stroke: var(--marca-texto); outline: none; }

/* música */
.mu-pauta { stroke: var(--suave); stroke-width: 2; }
.mu-clave { font: 96px serif; fill: var(--tinta); }
.mu-cabeca { fill: var(--tinta); } .mu-haste { stroke: var(--tinta); stroke-width: 3; }
.mu-nome { font: 700 20px var(--mao); fill: var(--caneta); }
.mu-nota { animation: entrar .35s ease-out both; }
.mu-branca rect { fill: #fffdf8; stroke: #9a9a9a; stroke-width: 2; transition: fill .1s; }
.mu-branca.tocando rect, .mu-branca:hover rect { fill: #fdf3cf; }
.mu-rotulo { font: 700 16px var(--texto); fill: #3b3b40; }
.mu-preta rect { fill: #24262c; } .mu-preta.tocando rect, .mu-preta:hover rect { fill: #4a5072; }

/* programação */
.p-caixa { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.p-editor, .p-terminal { margin: 0; border-radius: 16px; padding: 16px 0; font: 500 1rem/1.7 ui-monospace, "Cascadia Code", Consolas, monospace; min-height: 200px; }
.p-editor { background: #1e2230; color: #e6e9f2; }
.p-terminal { background: #0f1117; color: #9ff0b5; padding: 16px 18px; white-space: pre-wrap; }
.p-linha { display: grid; grid-template-columns: 42px 1fr; padding: 0 14px 0 0; transition: background .15s; }
.p-linha.ativa { background: rgb(245 197 66 / .2); box-shadow: inset 3px 0 #f5c542; }
.p-num { text-align: right; padding-right: 14px; color: #6b7390; }
.p-kw { color: #c792ea; } .p-str { color: #c3e88d; } .p-fn { color: #82aaff; } .p-numero { color: #f78c6c; font-weight: 800; } .p-var { color: #ffcb6b; } .p-com { color: #7f8aa8; font-style: italic; }
.p-controles { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) { .p-caixa { grid-template-columns: 1fr; } }

/* the subject icons on the buttons: tiny drawings, each one alive on hover */
.lab-materias button:hover .lab-ic { animation: pulinho .5s; }
@keyframes pulinho { 40% { transform: translateY(-4px) rotate(-8deg); } }
.lab-materias .lab-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* the body as a 3D medical render (dark viewer in both themes: it is a "scanner", not the page) */
.b-corpo { border-radius: 14px; background: #0b0f1a; }
.b-chao { fill: #8fb8ff; opacity: .12; }
.b-silhueta { stroke: #fff4e6; stroke-opacity: .55; stroke-width: 1.6; }
.b-pele3d { filter: drop-shadow(0 0 10px rgb(150 190 255 / .25)); }
.b-osso { fill: none; stroke: #f3efe6; stroke-opacity: .32; stroke-width: 2.4; stroke-linecap: round; }
.b-osso rect { fill: #f3efe6; fill-opacity: .25; stroke: none; }
.b-cranio { stroke-opacity: .4; }
.b-orgao { cursor: pointer; transition: opacity .5s; }
.b-forma { stroke: rgb(0 0 0 / .35); stroke-width: 1.2; }
.b-intestino .b-forma { fill: none; stroke: url(#b-g-intestino); stroke-width: 13; stroke-linecap: round; }
.b-intestino .b-reflexo { fill: none; stroke: rgb(255 255 255 / .25); stroke-width: 4; stroke-linecap: round; }
.b-reflexo { pointer-events: none; mix-blend-mode: screen; }
.b-detalhe { fill: none; stroke: rgb(70 10 20 / .55); stroke-width: 1.4; stroke-linecap: round; opacity: 0; transition: opacity .6s .5s; pointer-events: none; }
.b-pulmoes .b-detalhe { stroke: rgb(120 30 40 / .6); }
.b-orgao:hover .b-forma, .b-orgao:focus-visible .b-forma { filter: brightness(1.18) drop-shadow(0 0 8px rgb(255 220 150 / .8)); }
.b-corpo.perto .b-orgao:not(.ativo) { opacity: .18; }
.b-corpo.perto .b-pele3d, .b-corpo.perto .b-osso { opacity: .35; transition: opacity .6s; }
.b-corpo.perto .b-orgao.ativo .b-detalhe { opacity: 1; }
.b-corpo.perto .b-orgao.ativo .b-forma { filter: drop-shadow(0 0 4px rgb(255 230 190 / .6)); }
.b-coracao { transform-box: fill-box; transform-origin: center; animation: bater 1s ease-in-out infinite; }
.b-voltar { position: absolute; top: 12px; left: 12px; margin: 0; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid #ffffff55; background: #0b0f1acc; color: #fff; font: 700 .9rem var(--texto); cursor: pointer; z-index: 2; }
.b-area { position: relative; }

/* real 3D stage (lab3d.mjs) */
.lab3d { position: relative; border-radius: 14px; overflow: hidden; background: #0c1019; touch-action: pan-y; }
.lab3d canvas { display: block; width: 100%; height: auto; cursor: grab; outline: none; }
.lab3d canvas:active { cursor: grabbing; }
.lab3d canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--lapis); }
.lab3d-eq { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); margin: 0; padding: 8px 18px; border-radius: 999px; background: rgb(12 16 25 / .72); color: #fff; font: 700 clamp(1rem, .8rem + .9vw, 1.5rem) var(--mao); backdrop-filter: blur(6px); white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.lab3d-eq.reagiu { background: rgb(245 197 66 / .92); color: #1d2433; }
.lab3d-eq:empty { display: none; }
.lab3d-leitura { top: auto; bottom: 14px; font: 700 clamp(.9rem, .8rem + .4vw, 1.15rem) ui-monospace, Consolas, monospace; }
.lab3d-formulas { top: 14px; font-size: clamp(.85rem, .75rem + .5vw, 1.15rem); white-space: normal; text-align: center; }

/* the body as a real render: glowing points, a camera that dives in, the organ's close-up comes forward */
.b-foto { position: relative; overflow: hidden; border-radius: 14px; background: #0d2244; aspect-ratio: 1664 / 928; }
.b-foto-camera { position: absolute; inset: 0; transition: transform .9s cubic-bezier(.6, 0, .25, 1); will-change: transform; }
.b-foto-corpo { width: 100%; height: 100%; display: block; object-fit: cover; }
.b-ponto { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #fff; background: rgb(255 214 120 / .55); box-shadow: 0 0 0 4px rgb(255 214 120 / .25), 0 0 16px #ffd678; cursor: pointer; padding: 0; transition: transform .2s; }
.b-ponto:hover, .b-ponto:focus-visible { transform: scale(1.35); outline: none; }
.b-foto-camera.mergulho .b-ponto { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-versao="simples"]) .b-ponto { animation: b-pulsa 2.4s ease-in-out infinite; } }
@keyframes b-pulsa { 0%, 100% { box-shadow: 0 0 0 4px rgb(255 214 120 / .25), 0 0 16px #ffd678; } 50% { box-shadow: 0 0 0 10px rgb(255 214 120 / 0), 0 0 22px #ffd678; } }
.b-foto-orgao { position: absolute; inset: 0; margin: 0; background: #0d2244; opacity: 0; transform: scale(.94); transition: opacity .45s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.b-foto-orgao.visivel { opacity: 1; transform: none; }
.b-foto-orgao img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translateX(-19%) scale(.94); -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 62%, transparent 100%); }
.b-foto-orgao figcaption { position: absolute; right: 0; top: 0; bottom: 0; width: min(42%, 420px); padding: 24px 28px; align-content: center; background: linear-gradient(90deg, transparent, rgb(6 16 36 / .82) 30%); color: #eaf1ff; display: grid; gap: 8px; font-size: clamp(.95rem, .8rem + .5vw, 1.2rem); line-height: 1.5; }
.b-foto-orgao figcaption strong { font: 700 clamp(1.4rem, 1rem + 1.6vw, 2.4rem) var(--titulo); color: #fff; }
@media (max-width: 640px) { .b-foto-orgao figcaption { top: auto; width: 100%; padding: 14px 16px; background: linear-gradient(transparent, rgb(6 16 36 / .9) 30%); } .b-foto-orgao img { transform: translateY(-8%) scale(.9); } }
.lab3d-botoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lab3d-botoes button { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--linha-forte); background: var(--papel); color: var(--tinta); font: 700 .95rem var(--texto); cursor: pointer; }
.lab3d-botoes button:hover, .lab3d-botoes button:focus-visible { border-color: var(--caneta); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--caneta) 30%, transparent); }

/* code panel and sliders that live with the 3D scenes */
.lab3d-codigo { position: absolute; left: 14px; top: 14px; margin: 0; padding: 12px 16px; border-radius: 12px; background: rgb(255 253 246 / .92); border: 1.5px solid #1d2654; color: #1d2654; font: 600 clamp(.8rem, .7rem + .4vw, 1rem)/1.7 ui-monospace, Consolas, monospace; pointer-events: none; box-shadow: 3px 4px 0 rgb(29 38 84 / .25); }
.lab3d-codigo .l { display: block; padding: 0 6px; border-radius: 6px; }
.lab3d-codigo .l.ativa { background: #f5c542; }
.lab3d-codigo i { font-style: normal; opacity: .45; margin-right: 12px; }
.lab3d-codigo .k { color: #b0306a; } .lab3d-codigo .f { color: #3158c9; } .lab3d-codigo .c { color: #6b7280; } .lab3d-codigo b { color: #c4622a; }
.lab3d-controles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 22px; margin-top: 12px; }
.lab3d-controles label { display: grid; gap: 4px; font-size: .9rem; color: var(--tinta); }
.lab3d-controles strong { color: var(--caneta); }
.lab3d-controles input { accent-color: var(--caneta); width: 100%; }
/* the recipe book under the bottles: index-card chips; a discovered recipe is ticked */
.lab3d-receitas { padding-top: 10px; border-top: 1.5px dashed color-mix(in srgb, var(--caderno-tinta) 30%, transparent); }
.lab3d-receitas::before { content: attr(aria-label); width: 100%; font: 700 1.3rem/1 var(--mao); color: var(--tinta); }
.lab3d-receitas button { font-family: var(--mao); font-size: 1.15rem; background: var(--papel-ficha, #fffdf6); color: var(--caderno-tinta); border-style: dashed; }
.lab3d-receitas button.feita { border-style: solid; border-color: #2f7a52; color: #2f7a52; }
/* the focused organ view: a card on the right of the stage, in the notebook's hand */
.lab3d-foco { position: absolute; right: 14px; top: 14px; bottom: 14px; width: min(300px, 44%); overflow: auto; padding: 18px 18px 16px; background: var(--papel-ficha, #fffdf6); color: var(--caderno-tinta); border-radius: 4px; box-shadow: var(--sombra-papel); rotate: .6deg; z-index: 2; }
.lab3d-foco h3 { font-size: 2.1rem; line-height: 1; margin: 0 0 8px; }
.lab3d-foco p { margin: 0 0 10px; }
.lab3d-foco ul { margin: 0 0 14px; padding-left: 1.1em; } .lab3d-foco li { margin: 4px 0; }
.lab3d-foco li::marker { color: #d9483b; }
.lab3d-foco-volta { font: 700 .9rem var(--texto); background: #2544a8; color: #fff; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
@media (max-width: 640px) { .lab3d-foco { position: static; width: auto; margin-top: 10px; rotate: none; } }
.lab3d-legenda { top: auto; bottom: 14px; width: min(250px, 40%); }
.lab3d-legenda h3 { font-size: 1.6rem; }
.lab3d-legenda p { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-weight: 700; }
.lab3d-legenda .base { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #1d2654; }
.lab3d-legenda .dica { font-weight: 400; font-size: .9rem; display: block; margin-top: 8px; }
