/* ─── Glossário do café (glossario.js) ───────────────────────────────────────
   Gaveta escura, no mesmo tom do bloco dos coados (#111 / creme #e2c9a6).
   ───────────────────────────────────────────────────────────────────────── */

/* Termo clicável na ficha do café */
.g-termo {
  display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline dotted #e2c9a6; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.g-q {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 4px;
  border-radius: 50%; background: #e2c9a6; color: #111; font: 800 .62rem/1 var(--f-texto, sans-serif); vertical-align: 2px;
}
.g-termo:focus-visible, .g-gaveta button:focus-visible, .g-no:focus-visible { outline: 2px solid #e2c9a6; outline-offset: 2px; }

/* Chamada "Entenda o café" no fim dos coados e na ficha */
.g-entenda {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; width: calc(100% - 28px); margin: 14px 14px 0;
  padding: 12px 14px; text-align: left; cursor: pointer; background: transparent; color: #f7f5f1; border: 1px solid #e2c9a6;
}
.g-entenda span { font-weight: 800; font-size: .98rem; }
.g-entenda small { grid-row: 2; color: #a8a29a; font-size: .78rem; }
.g-entenda em { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 1.3rem; color: #e2c9a6; }
.m-cm .g-entenda { width: 100%; margin: 16px 0 0; }

/* Gaveta */
.g-gaveta { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: flex-end; justify-content: center; }
.g-gaveta[hidden] { display: none; }
.g-fundo { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.g-caixa {
  position: relative; width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; overscroll-behavior: contain;
  background: #111; color: #f7f5f1; border-top: 1px solid #3a3a3a; animation: g-sobe .28s ease-out;
}
@media (min-width: 640px) { .g-gaveta { align-items: center; } .g-caixa { border: 1px solid #3a3a3a; } }
@keyframes g-sobe { from { transform: translateY(40px); opacity: 0; } }
body.g-travado { overflow: hidden; }

.g-barra { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 8px; padding: 10px; background: linear-gradient(#111 70%, rgba(17,17,17,0)); }
.g-barra button {
  font: 600 .72rem/1 var(--f-texto, sans-serif); letter-spacing: .06em; text-transform: uppercase; padding: 10px 12px; min-height: 40px;
  background: #111; color: #f7f5f1; border: 1px solid #5a5651; cursor: pointer;
}
.g-barra .g-fechar { margin-left: auto; }
.g-barra button[hidden] { display: none; }

.g-pagina { padding: 0 16px 28px; opacity: 0; transform: translateX(14px); transition: opacity .25s ease, transform .25s ease; }
.g-pagina.g-entrou { opacity: 1; transform: none; }
.g-tipo, .g-rot { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #a8a29a; font-weight: 600; margin: 0 0 6px; }
.g-titulo { font: 900 clamp(1.8rem, 8.5vw, 2.4rem)/1 var(--f-titulo, sans-serif); font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; margin: 0 0 14px; outline: none; }
.g-curto { font: italic 500 1.12rem/1.45 var(--f-texto, sans-serif); color: #e2c9a6; margin: 16px 0 0; }

/* Blocos */
.g-pais, .g-xicara, .g-hoje, .g-continue, .g-fatos { margin-top: 18px; padding-top: 14px; border-top: 1px solid #3a3a3a; }
.g-pais > div, .g-continue > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-x { color: #a8a29a; font-size: 1.1rem; }
.g-chip {
  padding: 9px 12px; min-height: 40px; border: 1px solid #5a5651; background: transparent; color: #f7f5f1;
  font: 600 .88rem/1.1 var(--f-texto, sans-serif); cursor: pointer; transition: border-color .15s, background .15s;
}
.g-chip:hover, .g-chip:active { border-color: #e2c9a6; background: #1d1b19; }
.g-fatos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 0; }
.g-fatos dt { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: #a8a29a; font-weight: 600; }
.g-fatos dd { margin: 3px 0 0; font-weight: 600; font-size: .95rem; }

.g-med { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: .92rem; }
.g-med-pts { display: flex; gap: 5px; }
.g-med-pts i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #5a5651; transition: background .3s, border-color .3s; }
.g-entrou .g-med-pts i.g-cheio { background: #e2c9a6; border-color: #e2c9a6; }
.g-nota { font-size: .78rem; color: #a8a29a; font-style: italic; margin: 8px 0 0; }

.g-link-arvore { display: block; margin-top: 16px; padding: 0; background: none; border: 0; color: #e2c9a6; font: 700 .92rem var(--f-texto, sans-serif); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }

.g-mais { margin-top: 18px; border-top: 1px solid #3a3a3a; }
.g-mais summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.g-mais summary::-webkit-details-marker { display: none; }
.g-mais summary::after { content: "+"; font-size: 1.4rem; color: #e2c9a6; transition: transform .2s; }
.g-mais[open] summary::after { transform: rotate(45deg); }
.g-mais p { margin: 0 0 6px; line-height: 1.6; color: #d8d2c9; }
.g-elo { display: inline; padding: 0; border: 0; background: none; color: #e2c9a6; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.g-cafe {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; margin-top: 8px; padding: 12px;
  background: #1d1b19; color: #f7f5f1; border: 1px solid #3a3a3a; cursor: pointer;
}
.g-cafe b { font-size: 1rem; }
.g-cafe span { grid-row: 2; font-size: .82rem; font-style: italic; color: #e2c9a6; }
.g-cafe em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: #e2c9a6; font-size: 1.2rem; }

/* Índice */
.g-grupo { margin-top: 22px; }
.g-grupo h3 { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: #a8a29a; font-weight: 600; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid #3a3a3a; }
.g-cartoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-cartao { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; background: #1d1b19; color: #f7f5f1; border: 1px solid #3a3a3a; cursor: pointer; }
.g-cartao b { font-size: .98rem; }
.g-cartao span { font-size: .78rem; line-height: 1.35; color: #a8a29a; }
.g-destaque { display: block; width: 100%; padding: 8px 8px 12px; background: #1d1b19; border: 1px solid #3a3a3a; color: #f7f5f1; cursor: pointer; text-align: left; }
.g-destaque .g-viz { margin: 0; }
.g-destaque-rot { display: block; padding: 4px 6px 0; font-weight: 800; color: #e2c9a6; }

/* Ilustrações */
.g-viz { margin: 4px 0 0; }
.g-viz svg { display: block; width: 100%; height: auto; }
.g-viz-leg { min-height: 3em; margin: 10px 0 0; font-size: .92rem; line-height: 1.5; color: #d8d2c9; }
.g-viz-leg b { color: #f7f5f1; }
.g-viz-dica { margin: 6px 0 0; font-size: .74rem; color: #8f8a83; letter-spacing: .04em; }

/* fruto em corte */
.g-modos, .g-passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); border: 1px solid #5a5651; margin-bottom: 10px; }
.g-modos button, .g-passos button {
  padding: 10px 4px; min-height: 42px; background: transparent; color: #d8d2c9; border: 0; border-left: 1px solid #5a5651;
  font: 600 .8rem/1.1 var(--f-texto, sans-serif); cursor: pointer; transition: background .2s, color .2s;
}
.g-modos button:first-child, .g-passos button:first-child { border-left: 0; }
.g-modos button[aria-pressed="true"], .g-passos button[aria-pressed="true"] { background: #e2c9a6; color: #111; }
.g-fruto svg { max-width: 300px; margin: 0 auto; }
.g-fruto [data-c] { transition: opacity .5s ease, transform .5s ease; transform-origin: 120px 105px; }
.g-fruto ellipse[data-c="casca"] { fill: #b8352a; }
.g-fruto ellipse[data-c="polpa"] { fill: #e9a28c; }
.g-fruto ellipse[data-c="mucilagem"] { fill: #f3d9a4; }
.g-fruto [data-c="pergaminho"] ellipse { fill: #efe7d6; stroke: #cfc5ae; stroke-width: 1.5; }
.g-fruto [data-c="grao"] path { fill: #a9b98a; }
.g-fruto [data-c="grao"] .g-sulco { fill: none; stroke: #7d8e60; stroke-width: 2; stroke-linecap: round; }
.g-fruto .g-saiu { opacity: 0; transform: scale(1.12); }
.g-fruto.g-foco svg [data-c]:not(.g-ativa):not(.g-saiu) { opacity: .25; }
.g-camadas { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.g-camadas button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; min-height: 36px; background: transparent; color: #f7f5f1; border: 1px solid #3a3a3a; font: 600 .78rem var(--f-texto, sans-serif); cursor: pointer; }
.g-camadas button.g-ativa { border-color: #e2c9a6; }
.g-camadas i { width: 12px; height: 12px; border-radius: 50%; }
.g-bolhas { opacity: 0; transition: opacity .4s; }
.g-com-bolhas .g-bolhas, .g-ferm .g-bolhas { opacity: 1; }
.g-bolha { fill: none; stroke: #e2c9a6; stroke-width: 1.4; animation: g-bolha 3s ease-in infinite; }
@keyframes g-bolha { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-170px); opacity: 0; } }

/* tanque de fermentação */
.g-ferm svg { max-width: 300px; margin: 0 auto; }
.g-tanque { fill: #1d1b19; stroke: #a8a29a; stroke-width: 2; }
.g-tampa { fill: none; stroke: #a8a29a; stroke-width: 2.5; stroke-linecap: round; }
.g-liquido { fill: #3b2a1f; transition: fill .6s; }
.g-ferm-fruto { fill: #b8352a; stroke: #111; stroke-width: 1.5; transition: fill .6s; }
.g-termo-tanque path, .g-termo-tanque circle { stroke: #a8a29a; stroke-width: 6; stroke-linecap: round; fill: #a8a29a; }
.g-termo-tanque .g-termo-nivel { stroke: #e2c9a6; transition: d .6s; }
.g-ferm .g-bolha { animation-duration: 3.4s; }
.g-ferm[data-nivel="0"] .g-bolha:nth-child(n+6) { display: none; }
.g-ferm[data-nivel="1"] .g-bolha:nth-child(n+11) { display: none; }
.g-ferm[data-nivel="2"] .g-bolha { animation-duration: 2s; }
.g-ferm[data-nivel="1"] .g-liquido { fill: #4a2a22; }
.g-ferm[data-nivel="2"] .g-liquido { fill: #5a1f2a; }
.g-ferm[data-nivel="2"] .g-ferm-fruto { fill: #7a2030; }
.g-ferm-rot { display: block; margin-top: 10px; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #a8a29a; font-weight: 600; }
.g-range { width: 100%; margin: 10px 0 0; accent-color: #e2c9a6; height: 32px; }

/* Swiss Water */
.g-swiss-num { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.g-swiss-num b { font: italic 900 2.2rem/1 var(--f-texto, sans-serif); color: #e2c9a6; }
.g-swiss-num span { color: #d8d2c9; }
.g-swiss svg path, .g-swiss svg ellipse, .g-swiss svg circle { stroke-width: 2; }
.g-sw > path:first-child { fill: none; stroke: #a8a29a; }
.g-agua { fill: #3c5a6b; stroke: none; }
.g-gr { fill: #a9b98a; stroke: none; }
.g-carvao { fill: #2b2b2b; stroke: #5a5651; }
.g-cafeina { fill: #e2c9a6; stroke: none; }
.g-seta { fill: none; stroke: #5a5651; stroke-linecap: round; }
.g-sw { opacity: .3; transition: opacity .4s; }
.g-swiss[data-passo="0"] .g-sw0, .g-swiss[data-passo="1"] .g-sw1, .g-swiss[data-passo="2"] .g-sw2 { opacity: 1; }
.g-swiss[data-passo="2"] .g-sai { animation: g-sai 1.6s ease-in infinite; }
@keyframes g-sai { to { transform: translateY(-40px); opacity: 0; } }
.g-passos button span { display: inline-block; margin-right: 6px; font-weight: 900; }

/* ramo com frutos */
.g-ramo svg { max-width: 320px; margin: 0 auto; }
.g-galho { fill: none; stroke: #8a6a45; stroke-width: 4; stroke-linecap: round; }
.g-folha { fill: #3f5a2b; }
.g-vermelho .g-cerejas circle { fill: #b8352a; }
.g-amarelo .g-cerejas circle { fill: #e8b923; }
.g-cerejas circle { stroke: #111; stroke-width: 1.5; animation: g-pop .5s ease-out backwards; }
.g-cerejas circle:nth-child(2) { animation-delay: .06s; } .g-cerejas circle:nth-child(3) { animation-delay: .12s; }
.g-cerejas circle:nth-child(4) { animation-delay: .18s; } .g-cerejas circle:nth-child(5) { animation-delay: .24s; }
.g-cerejas circle:nth-child(6) { animation-delay: .3s; } .g-cerejas circle:nth-child(7) { animation-delay: .36s; }
@keyframes g-pop { from { r: 0; } }

/* árvore da família */
.g-linhas path { fill: none; stroke: #5a5651; stroke-width: 1.5; }
.g-linhas .g-tracejado { stroke-dasharray: 4 4; }
.g-no { cursor: pointer; }
.g-no rect { fill: #111; stroke: #8f8a83; stroke-width: 1.2; transition: fill .2s, stroke .2s; }
.g-no text { fill: #f7f5f1; font: 600 10.5px var(--f-texto, sans-serif); text-anchor: middle; pointer-events: none; }
.g-no:hover rect { stroke: #e2c9a6; }
.g-no-outra rect { stroke-dasharray: 3 3; }
.g-no-hoje rect { stroke: #e2c9a6; stroke-width: 1.8; }
.g-no-aqui rect { fill: #e2c9a6; stroke: #e2c9a6; }
.g-no-aqui text { fill: #111; }
.g-ponto { fill: #e2c9a6; stroke: #111; stroke-width: 2; }
.g-arvore-leg { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; font-size: .74rem; color: #a8a29a; }
.g-arvore-leg span { display: inline-flex; align-items: center; gap: 6px; }
.g-arvore-leg i { width: 12px; height: 12px; border-radius: 50%; }
.g-leg-hoje { background: #e2c9a6; border: 2px solid #111; outline: 1px solid #e2c9a6; }
.g-leg-aqui { background: #e2c9a6; border-radius: 6px !important; width: 20px !important; }

@media (prefers-reduced-motion: reduce) {
  .g-caixa, .g-bolha, .g-cerejas circle, .g-sai { animation: none !important; }
  .g-pagina, .g-fruto [data-c] { transition: none; }
}

/* ═════════ Perfil sensorial ═════════ */
/* bolinhas no bloco do café, na página */
.g-pmini { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin: 10px 14px 0; padding-top: 6px; }
.g-pmini-l {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0;
  background: none; border: 0; border-bottom: 1px solid #3a3a3a; color: #f7f5f1; cursor: pointer; font: 600 .78rem var(--f-texto, sans-serif);
}
.g-pmini-l > span:first-child { text-decoration: underline dotted #8f8a83; text-underline-offset: 3px; }
.g-pmini .g-med-pts { gap: 3px; }
.g-pmini .g-med-pts i { width: 9px; height: 9px; border-width: 1.2px; }
.g-pmini .g-med-pts i.g-cheio, .g-perfil-bloco .g-med-pts i.g-cheio { background: #e2c9a6; border-color: #e2c9a6; }

/* desenho de 4 pontas */
.g-perfil-bloco { margin-top: 16px; padding-top: 14px; border-top: 1px solid #3a3a3a; }
.g-perfil-topo { display: flex; align-items: center; justify-content: space-between; }
.g-q-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #5a5651; background: transparent; color: #e2c9a6; font-weight: 800; cursor: pointer; }
.g-radar { display: block; width: 100%; max-width: 300px; margin: 4px auto 0; overflow: visible; }
.g-rad-grade { fill: none; stroke: #2e2c2a; stroke-width: 1; }
.g-rad-borda { stroke: #5a5651; }
.g-rad-eixo { stroke: #2e2c2a; stroke-width: 1; }
.g-rad-forma { fill: rgba(226, 201, 166, .28); stroke: #e2c9a6; stroke-width: 2; stroke-linejoin: round; animation: g-cresce .6s cubic-bezier(.2, .9, .3, 1.2) backwards; }
@keyframes g-cresce { from { transform: scale(0); } }
.g-rad-pt { fill: #e2c9a6; }
.g-rad-rot { fill: #f7f5f1; font: 600 11.5px var(--f-texto, sans-serif); cursor: pointer; text-decoration: underline dotted; }
.g-rad-val { fill: #e2c9a6; font-weight: 900; }
.g-radar-mini { max-width: 110px; }
.g-radar-mini .g-rad-forma { stroke-width: 1.5; }
.g-entenda-roda { border-color: #5a5651; }
.m-cm .g-entenda-roda { margin-top: 12px; }

/* comparação dos cafés */
.g-perfis-grade { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.g-perfil-cafe { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; background: #1d1b19; border: 1px solid #3a3a3a; color: #f7f5f1; cursor: pointer; text-align: center; }
.g-perfil-cafe b { font-size: .9rem; }
.g-perfil-cafe span { font-size: .72rem; color: #a8a29a; letter-spacing: .08em; }

/* ═════════ Roda de sabores ═════════ */
.g-roda svg { display: block; width: 100%; max-width: 380px; margin: 0 auto; overflow: visible; -webkit-tap-highlight-color: transparent; }
.g-seg { fill: #232120; stroke: #111; stroke-width: 1.2; cursor: pointer; transition: opacity .25s ease, stroke .2s ease; }
.g-seg:focus, .g-roda-famtxt:focus { outline: none; }
.g-seg:focus-visible { stroke: #f7f5f1; stroke-width: 2.5; }
.g-seg:not(.g-tem):hover { fill: #2e2b29; }
/* com algo escolhido, o resto recua e o escolhido ganha contorno claro */
.g-com-sel .g-seg.g-tem:not(.g-sel) { opacity: .4; }
.g-seg.g-sel { opacity: 1; stroke: #f7f5f1; stroke-width: 2.5; }
.g-seg.g-sel:not(.g-tem) { fill: #3a3633; }
.g-roda-txt { fill: #6b6560; font: 600 9.6px var(--f-texto, sans-serif); text-anchor: middle; pointer-events: none; }
.g-roda-txt.g-tem { fill: #111; font-weight: 800; }
.g-roda-famtxt { fill: #6b6560; font: 800 10px var(--f-texto, sans-serif); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: opacity .25s; }
.g-com-sel .g-roda-famtxt.g-tem:not(.g-sel) { opacity: .5; }
.g-roda-centro { fill: #111; stroke: #3a3a3a; stroke-width: 1; }
.g-roda-centro-txt {
  display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 2px; text-align: center;
  color: #f7f5f1; font: 800 8.4px/1.15 var(--f-texto, sans-serif); text-transform: uppercase; letter-spacing: .06em;
}
.g-roda-leg { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; font-size: .74rem; color: #a8a29a; }
.g-roda-leg i { width: 26px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #d0503f 0 25%, #d58fb8 25% 50%, #e0aa45 50% 75%, #a8714d 75%); }
.g-roda-painel:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px solid #3a3a3a; }
.g-roda-d { margin: 4px 0 0; color: #d8d2c9; line-height: 1.5; }
.g-roda-notas { font: italic 500 1.05rem/1.4 var(--f-texto, sans-serif); color: #e2c9a6; }
.g-roda-lista { margin-top: 14px; }
.g-roda-todos { margin-top: 12px; }

/* índice: roda e perfis lado a lado */
.g-destaques { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.g-destaques .g-destaque { display: flex; flex-direction: column; justify-content: space-between; }
.g-destaques .g-perfis-grade { gap: 4px; }
.g-destaques .g-perfil-cafe { padding: 4px 2px; }
.g-destaques .g-perfil-cafe b { font-size: .66rem; }
.g-destaques .g-perfil-cafe span, .g-destaques .g-perfis > .g-rot, .g-destaques .g-perfis > .g-nota { display: none; }
.g-destaques .g-roda-txt, .g-destaques .g-roda-famtxt, .g-destaques .g-roda-leg, .g-destaques .g-roda-centro-txt { display: none; }
.g-destaques .g-viz-dica { display: none; }

@media (prefers-reduced-motion: reduce) { .g-rad-forma { animation: none; } }
