/* ===== Desafios das missões (ch-*) — tema "Memórias": página de papel, topo verde com onda, pista como figurinha ===== */
#game .ch-modal { padding: clamp(10px, 2.2vw, 28px); background: rgba(0, 52, 24, .5); backdrop-filter: blur(6px) saturate(1.05); }
#game .ch-card {
  --ch-pad: clamp(18px, 2.4vw, 34px);
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1040px, 100%); max-height: min(760px, calc(100dvh - 2 * clamp(10px, 2.2vw, 28px)));
  border: 3px solid var(--tinta); border-radius: 28px; color: var(--tinta); overflow: hidden;
  background: var(--papel) var(--onda-papel) 0 0 / 80px 36px;
  box-shadow: 0 8px 0 var(--tinta), 0 34px 70px rgba(0, 24, 10, .5);
  animation: ch-in .38s cubic-bezier(.2, .9, .25, 1.15) both;
}
@keyframes ch-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
#game .ch-modal.closing .ch-card { animation: ch-out .2s ease forwards; }
@keyframes ch-out { to { opacity: 0; transform: translateY(16px) scale(.97); } }

/* topo verde: missão, etapas e fechar; a borda de baixo é uma onda */
#game .ch-head { position: relative; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px var(--ch-pad) 24px; background: var(--verde); color: var(--branco); border: 0; }
#game .ch-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 12px; background: var(--borda-onda); background-size: 40px 12px; pointer-events: none; }
#game .ch-kicker { font: 800 1.12rem/1.15 var(--display); letter-spacing: -.01em; text-transform: none; color: var(--branco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#game .ch-steps { display: flex; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; }
#game .ch-steps li { display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; color: rgba(255, 255, 255, .72); font: 800 .8rem/1 var(--sans); white-space: nowrap; transition: color .25s, background .25s; }
#game .ch-steps li + li::before { content: ''; width: 14px; height: 3px; margin: 0 2px 0 -6px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
#game .ch-step-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .55); font: 800 .78rem/1 var(--display); }
#game .ch-step-dot svg { width: 14px; height: 14px; }
#game .ch-steps li.is-current { color: var(--tinta); background: var(--amarelo); box-shadow: 0 0 0 2.5px var(--tinta); }
#game .ch-steps li.is-current .ch-step-dot { border-color: var(--tinta); background: var(--branco); color: var(--tinta); }
#game .ch-steps li.is-done { color: var(--branco); }
#game .ch-steps li.is-done .ch-step-dot { border-color: var(--amarelo); background: var(--amarelo); color: var(--verde-3); }
#game .ch-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 3px solid var(--tinta); background: var(--branco); color: var(--tinta);
  box-shadow: 0 3px 0 var(--tinta); transform: translateY(-3px); cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s; }
#game .ch-close svg { width: 18px; height: 18px; }
#game .ch-close:hover, #game .ch-close:focus-visible { background: var(--amarelo); transform: translateY(-5px); box-shadow: 0 5px 0 var(--tinta); outline: none; }

/* corpo: pista (figurinha) + conteúdo */
#game .ch-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); padding: calc(var(--ch-pad) - 2px) var(--ch-pad) var(--ch-pad); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(0, 128, 58, .45) transparent; }
#game .ch-card.has-media .ch-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
#game .ch-media { position: relative; margin: 6px 4px 0; padding: 9px 9px 40px; border-radius: 16px; background: var(--branco); transform: rotate(-2.5deg);
  box-shadow: 0 0 0 2.5px var(--tinta), 0 6px 0 2.5px var(--tinta), 0 20px 34px rgba(0, 24, 10, .25); }
#game .ch-media[hidden] { display: none; }
#game .ch-media img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 9px; border: 0; box-shadow: none; background: var(--verde-claro); }
#game .ch-media::after { content: ''; position: absolute; inset: 9px 9px 40px; border-radius: 9px; background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .38) 46%, transparent 58%); pointer-events: none; mix-blend-mode: screen; }
#game .ch-media-tag { position: absolute; z-index: 2; top: -12px; left: -10px; padding: 6px 12px; border-radius: 9px; background: var(--amarelo); border: 2.5px solid var(--tinta); color: var(--tinta);
  font: 900 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-4deg); box-shadow: 0 2px 0 var(--tinta); backdrop-filter: none; }
#game .ch-media figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; color: var(--verde-3); font: 800 .78rem/1.2 var(--sans); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#game .ch-main { min-width: 0; }
#game .ch-pane { display: none; }
#game .ch-card[data-step="facts"] .ch-pane-facts,
#game .ch-card[data-step="question"] .ch-pane-question,
#game .ch-card[data-step="feedback"] .ch-pane-result { display: block; }
#game .ch-card.step-anim .ch-main > .ch-pane { animation: ch-step .36s cubic-bezier(.2, .9, .25, 1.1) both; }
@keyframes ch-step { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* etapa de abertura (cartaz / peça / prato): imagem maior + texto */
#game .ch-card[data-step="poster"] .ch-pane-poster { display: block; }
#game .ch-card[data-step="poster"].has-media .ch-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
#game .ch-card[data-step="poster"] .ch-media { width: fit-content; max-width: 100%; justify-self: center; transform: rotate(-3deg); }
#game .ch-card[data-step="poster"] .ch-media img { max-height: calc(min(760px, 100dvh) - 320px); width: auto; max-width: 100%; margin: 0 auto; }
#game .ch-intro-k { display: inline-block; margin-bottom: 14px; padding: 6px 13px; border-radius: 9px; background: var(--verde); border: 2.5px solid var(--tinta); color: var(--amarelo);
  font: 900 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-2deg); box-shadow: 0 2px 0 var(--tinta); }
#game .ch-intro-t { margin: 0; font: 700 1.1rem/1.65 var(--sans); color: var(--tinta); max-width: 46ch; }

/* pistas */
#game .ch-title { margin: 2px 0 18px; font: 800 clamp(1.7rem, 2.7vw, 2.3rem)/1.04 var(--display); letter-spacing: -.025em; color: var(--tinta); text-wrap: balance; }
#game .ch-facts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
#game .ch-fact { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; border-radius: 16px; background: var(--branco); border: 2.5px solid var(--tinta); box-shadow: 0 3px 0 var(--tinta); }
#game .ch-fact-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--amarelo); color: var(--tinta); border: 2.5px solid var(--tinta); font: 800 1rem/1 var(--display); box-shadow: none; }
#game .ch-fact-n svg { width: 19px; height: 19px; }
#game .ch-fact-t { margin: 0; font: 700 1.03rem/1.55 var(--sans); color: var(--tinta); }
#game .ch-fact-k { display: block; margin-bottom: 3px; font: 900 .68rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
#game .ch-fact.is-alerta { background: #fff1d6; }
#game .ch-fact.is-alerta .ch-fact-n { background: #ffb020; color: var(--tinta); }
#game .ch-fact.is-alerta .ch-fact-k { color: #a35a00; }
#game .ch-fact.is-fonte { background: var(--verde-claro); }
#game .ch-fact.is-fonte .ch-fact-n { background: var(--verde); color: var(--amarelo); }
#game .ch-fact.is-fonte .ch-fact-k { color: var(--verde-2); }
/* placas de bronze do chafariz (o bronze continua: é o material real) */
#game .ch-facts.is-plaques { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#game .ch-plaque { position: relative; padding: 16px 18px 17px; border-radius: 12px; color: #2b1a08;
  background: radial-gradient(circle at 10px 10px, #6b4a1c 0 2.4px, transparent 3px), radial-gradient(circle at calc(100% - 10px) 10px, #6b4a1c 0 2.4px, transparent 3px),
    radial-gradient(circle at 10px calc(100% - 10px), #6b4a1c 0 2.4px, transparent 3px), radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), #6b4a1c 0 2.4px, transparent 3px),
    linear-gradient(160deg, #f1d391 0%, #d4a85a 42%, #b8873c 100%);
  border: 2.5px solid var(--tinta); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(90, 58, 18, .35), 0 4px 0 var(--tinta); }
#game .ch-plaque-n { display: inline-block; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1.5px solid rgba(80, 50, 14, .45); font: 800 .72rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: #5a3a10; }
#game .ch-plaque-t { margin: 0; font: 800 1rem/1.45 var(--sans); }
/* post viral (desinformação) */
#game .ch-post { padding: 14px 16px 12px; border-radius: 18px 18px 18px 6px; background: #dcf8c6; color: #17240f; border: 2.5px solid var(--tinta); box-shadow: 0 4px 0 var(--tinta); }
#game .ch-post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
#game .ch-post-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ffe2d8; color: #c0392b; border: 2px solid var(--tinta); }
#game .ch-post-avatar svg { width: 16px; height: 16px; }
#game .ch-post-who { font: 900 .86rem/1.1 var(--sans); color: #1f5d16; }
#game .ch-post-time { margin-left: auto; font: 700 .76rem/1 var(--sans); color: #5c6b53; font-variant-numeric: tabular-nums; }
#game .ch-post-t { margin: 0; font: 700 1.02rem/1.5 var(--sans); }
#game .ch-post-tag { display: block; margin-top: 8px; font: italic 700 .74rem/1 var(--sans); color: #5c6b53; }

/* desafio */
#game .ch-question { margin: 2px 0 20px; font: 800 clamp(1.4rem, 2.3vw, 1.85rem)/1.14 var(--display); letter-spacing: -.02em; color: var(--tinta); text-wrap: balance; }
#game .ch-options { display: grid; gap: 13px; }
#game .ch-opt { display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 9px 16px 9px 10px; border-radius: 18px;
  border: 3px solid var(--tinta); background: var(--branco); color: var(--tinta); text-align: left; cursor: pointer; box-shadow: 0 5px 0 var(--tinta); transform: translateY(-5px);
  font: 800 1.06rem/1.3 var(--sans); transition: transform .12s ease, box-shadow .12s ease, background .15s; }
#game .ch-opt-key { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--amarelo); border: 3px solid var(--tinta); font: 800 1.15rem/1 var(--display); color: var(--tinta); }
#game .ch-opt-mark { display: grid; place-items: center; width: 28px; height: 28px; }
#game .ch-opt-mark svg { width: 24px; height: 24px; }
@media (hover: hover) { #game .ch-opt:not(:disabled):hover { background: var(--verde-claro); transform: translateY(-7px); box-shadow: 0 7px 0 var(--tinta); } }
#game .ch-opt:focus-visible { background: var(--verde-claro); transform: translateY(-7px); box-shadow: 0 7px 0 var(--tinta); outline: none; }
#game .ch-opt:not(:disabled):active { transform: translateY(0); box-shadow: 0 0 0 var(--tinta); }
#game .ch-opt:disabled { cursor: default; }
#game .ch-opt.is-wrong { transform: none; box-shadow: none; background: #efece2; border-color: rgba(10, 58, 34, .35); color: rgba(10, 58, 34, .5); }
#game .ch-opt.is-wrong .ch-opt-t { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(10, 58, 34, .45); }
#game .ch-opt.is-wrong .ch-opt-key { background: #e2ddcd; border-color: rgba(10, 58, 34, .35); color: rgba(10, 58, 34, .5); }
#game .ch-opt.is-wrong .ch-opt-mark { color: #b5462c; }
#game .ch-opt.is-right { background: var(--verde); color: var(--branco); animation: ch-pop .5s cubic-bezier(.2, .9, .25, 1.4); }
#game .ch-opt.is-right .ch-opt-key { background: var(--amarelo); color: var(--tinta); }
#game .ch-opt.is-right .ch-opt-mark { color: var(--amarelo); }
@keyframes ch-pop { 40% { transform: translateY(-5px) scale(1.035); } }
#game .ch-hint { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; margin: 16px 0 0; padding: 13px 15px; border-radius: 16px; border: 2.5px dashed var(--amarelo-3); background: var(--papel-2);
  font: 700 .98rem/1.5 var(--sans); color: var(--tinta); animation: ch-step .3s ease both; }
#game .ch-hint[hidden] { display: none; }
#game .ch-hint strong { color: var(--verde-2); }
#game .ch-hint-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--amarelo); border: 2.5px solid var(--tinta); color: var(--tinta); }
#game .ch-hint-ico svg { width: 19px; height: 19px; }
#game .ch-keys { margin: 18px 0 0; font: 700 .84rem/1.4 var(--sans); color: rgba(10, 58, 34, .6); }
#game .ch-keys kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin: 0 2px; padding: 0 5px; border-radius: 7px; background: var(--branco) !important; border: 2px solid var(--tinta);
  box-shadow: 0 2px 0 var(--tinta) !important; font: 800 .76rem/1 var(--display); color: var(--tinta); }
@media (hover: none), (pointer: coarse) { #game .ch-keys { display: none; } }
#game .ch-card.shake { animation: ch-shake .42s ease; }
@keyframes ch-shake { 15%, 55% { transform: translateX(-7px); } 35%, 75% { transform: translateX(7px); } }

/* descoberta: a memória recuperada vira figurinha, com o carimbo do órgão oficial */
#game .ch-card[data-step="feedback"] .ch-media { transform: rotate(-4deg); animation: ch-figura .7s cubic-bezier(.2, .9, .25, 1.35) both; }
#game .ch-card[data-step="feedback"] .ch-media-tag { background: var(--verde); color: var(--amarelo); }
@keyframes ch-figura { 0% { transform: scale(.55) rotate(-16deg); opacity: 0; } 70% { transform: scale(1) rotate(-2deg); opacity: 1; } 100% { transform: rotate(-4deg); } }
#game .ch-win { display: inline-flex; align-items: center; gap: 9px; padding: 6px 15px 6px 6px; border-radius: 12px; background: var(--amarelo); border: 3px solid var(--tinta); color: var(--tinta);
  font: 900 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; transform: rotate(-2deg); box-shadow: 0 3px 0 var(--tinta); }
#game .ch-win-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--verde); color: var(--amarelo); border: 2px solid var(--tinta); }
#game .ch-win-ico svg { width: 15px; height: 15px; }
#game .ch-subject { margin: 18px 0 8px; font: 800 clamp(1.8rem, 2.9vw, 2.5rem)/1.02 var(--display); letter-spacing: -.03em; color: var(--tinta); text-wrap: balance; }
#game .ch-uf { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font: 900 .84rem/1 var(--sans); color: var(--verde-2); letter-spacing: .06em; }
#game .ch-uf-ico { display: inline-grid; color: var(--verde); }
#game .ch-uf-ico svg { width: 17px; height: 17px; }
#game .ch-seals { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
/* selo como carimbo: contorno duplo verde, levemente torto */
#game .ch-seal { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; border: 2.5px solid var(--verde-3); background: var(--branco);
  box-shadow: inset 0 0 0 3px var(--branco), inset 0 0 0 4.5px var(--verde-3); transform: rotate(-1.5deg); }
#game .ch-seal:nth-child(even) { transform: rotate(1.5deg); }
#game .ch-seal-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--verde); color: var(--amarelo); border: 2px solid var(--tinta); }
#game .ch-seal-ico svg { width: 19px; height: 19px; }
#game .ch-seal-b { display: grid; gap: 2px; }
#game .ch-seal-b strong { font: 800 .92rem/1.1 var(--display); color: var(--verde-3); letter-spacing: .01em; }
#game .ch-seal-b span { font: 800 .74rem/1.25 var(--sans); color: var(--tinta); }
#game .ch-explain { margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--branco); border: 2.5px solid var(--tinta); box-shadow: 0 3px 0 var(--tinta); font: 700 1.02rem/1.62 var(--sans); color: var(--tinta); }

/* rodapé */
#game .ch-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px var(--ch-pad) calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 2.5px dashed rgba(10, 58, 34, .18); background: transparent; }
#game .ch-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 16px; cursor: pointer;
  border: 3px solid var(--tinta); font: 800 1.08rem/1 var(--display); letter-spacing: .005em; box-shadow: 0 5px 0 var(--tinta); transform: translateY(-5px); transition: transform .12s, box-shadow .12s, background .15s; }
#game .ch-btn[hidden] { display: none; }
#game .ch-btn svg { width: 20px; height: 20px; flex: none; }
#game .ch-btn-primary { background: var(--verde); color: var(--amarelo); }
#game .ch-btn-primary::before { content: ''; position: absolute; inset: 3px 3px 52% 3px; border-radius: 11px 11px 22px 22px; background: rgba(255, 255, 255, .16); pointer-events: none; }
#game .ch-btn-primary:hover, #game .ch-btn-primary:focus-visible { background: #00ab41; transform: translateY(-7px); box-shadow: 0 7px 0 var(--tinta), 0 0 0 4px rgba(255, 223, 0, .55); outline: none; }
#game .ch-btn-ghost { margin-right: auto; background: var(--branco); color: var(--tinta); }
#game .ch-btn-ghost:hover, #game .ch-btn-ghost:focus-visible { background: var(--papel-2); transform: translateY(-7px); box-shadow: 0 7px 0 var(--tinta); outline: none; }
#game .ch-btn:active { transform: translateY(0); box-shadow: 0 0 0 var(--tinta); }

/* lista de memórias do painel (número / check) */
#game .missions-list span.mission-like-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--tinta); background: var(--papel-2); font: 800 .74rem/1 var(--display); color: var(--tinta); fill: none; }
#game .missions-list li.done span.mission-like-icon { background: var(--verde); color: var(--amarelo); }
#game .missions-list span.mission-like-icon svg { width: 14px; height: 14px; }

/* joystick só em tela de toque (no computador quem anda são as setas) */
@media (hover: hover) and (pointer: fine) { #game .touch-controls.joy { display: none !important; } }

/* ---------- tablet em pé e celular ---------- */
@media (max-width: 860px) {
  #game .ch-card.has-media .ch-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  #game .ch-steps li:not(.is-current) .ch-step-name { display: none; }
  #game .ch-steps li { padding-right: 4px; }
  #game .ch-steps li.is-current { padding-right: 12px; }
}
@media (max-width: 560px) {
  #game .ch-card.has-media .ch-body { grid-template-columns: minmax(0, 1fr); }
  #game .ch-modal { padding: 8px; align-items: stretch; }
  #game .ch-card { --ch-pad: 16px; max-height: calc(100dvh - 16px); height: calc(100dvh - 16px); border-radius: 22px; box-shadow: 0 5px 0 var(--tinta); }
  #game .ch-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'k x' 's s'; row-gap: 10px; padding-top: 12px; padding-bottom: 20px; }
  #game .ch-kicker { grid-area: k; font-size: 1rem; }
  #game .ch-close { grid-area: x; width: 40px; height: 40px; }
  #game .ch-steps { grid-area: s; justify-content: flex-start; }
  #game .ch-steps li + li::before { width: 8px; }
  #game .ch-media { width: 78%; justify-self: center; padding: 7px 7px 10px; margin-top: 10px; }
  #game .ch-media::after { inset: 7px 7px 10px; }
  #game .ch-card.has-media:not([data-step="poster"]) .ch-media img { aspect-ratio: 16 / 9; object-position: 50% 35%; border-radius: 8px; }
  #game .ch-card:not([data-step="poster"]) .ch-media figcaption { display: none; }
  #game .ch-card[data-step="poster"].has-media .ch-body { grid-template-columns: minmax(0, 1fr); align-items: start; }
  #game .ch-card[data-step="poster"] .ch-media { width: fit-content; padding-bottom: 34px; }
  #game .ch-card[data-step="poster"] .ch-media::after { inset: 7px 7px 34px; }
  #game .ch-card[data-step="poster"] .ch-media img { max-height: 38dvh; }
  #game .ch-intro-t { font-size: .98rem; }
  #game .ch-facts.is-plaques { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #game .ch-fact { padding: 12px 13px; gap: 12px; grid-template-columns: 32px minmax(0, 1fr); }
  #game .ch-fact-n { width: 32px; height: 32px; font-size: .88rem; }
  #game .ch-fact-t, #game .ch-post-t, #game .ch-plaque-t { font-size: .96rem; }
  #game .ch-question { font-size: 1.3rem; margin-bottom: 16px; }
  #game .ch-opt { min-height: 56px; font-size: .98rem; gap: 12px; grid-template-columns: 38px minmax(0, 1fr) 24px; }
  #game .ch-opt-key { width: 38px; height: 38px; border-radius: 11px; }
  #game .ch-subject { font-size: 1.7rem; }
  #game .ch-explain { font-size: .96rem; padding: 13px 14px; }
  #game .ch-foot { gap: 10px; }
  #game .ch-btn { min-height: 48px; padding: 0 18px; font-size: 1rem; }
}
@media (max-height: 560px) and (min-width: 561px) { /* celular deitado */
  #game .ch-card { max-height: calc(100dvh - 12px); }
  #game .ch-head { padding-top: 8px; padding-bottom: 16px; }
  #game .ch-card.has-media .ch-body { grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); }
  #game .ch-media { padding: 6px 6px 10px; }
  #game .ch-media::after { inset: 6px 6px 10px; }
  #game .ch-media figcaption { display: none; }
  #game .ch-card.has-media:not([data-step="poster"]) .ch-media img { aspect-ratio: 4 / 5; }
  #game .ch-card[data-step="poster"] .ch-media img { max-height: calc(100dvh - 200px); }
  #game .ch-body { gap: 18px; padding-top: 12px; padding-bottom: 12px; }
  #game .ch-question, #game .ch-title { margin-bottom: 10px; font-size: 1.15rem; }
  #game .ch-options { gap: 8px; }
  #game .ch-opt { min-height: 46px; padding-top: 4px; padding-bottom: 4px; }
  #game .ch-opt-key { width: 30px; height: 30px; border-radius: 9px; }
  #game .ch-hint { margin-top: 8px; }
  #game .ch-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #game .ch-card, #game .ch-card.step-anim .ch-main > .ch-pane, #game .ch-card.shake, #game .ch-opt.is-right, #game .ch-hint, #game .ch-media { animation: none !important; }
  #game .ch-opt, #game .ch-btn, #game .ch-close { transition: none; }
}

/* fim de jogo: sem controles por cima da tela de vitória */
#game:has(#victoryScreen:not([hidden])) .touch-controls, #game:has(#victoryScreen:not([hidden])) .action-controls { display: none !important; }
#game .victory-content { scrollbar-width: none; }
#game .victory-content::-webkit-scrollbar { display: none; }

/* ---------- vitrine: botão + e apresentação em 1ª pessoa ---------- */
#game .bug-character-stage .pc-card { cursor: default; }
#game .pc-name { display: flex; align-items: center; justify-content: center; gap: 14px; }
#game .pc-more { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 3px solid var(--tinta); background: var(--branco); color: var(--verde-2); cursor: pointer;
  box-shadow: 0 4px 0 var(--tinta); transform: translateY(-4px); transition: transform .12s, background .15s, box-shadow .12s; }
#game .pc-more svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; transition: transform .3s cubic-bezier(.2, .9, .25, 1.2); }
#game .pc-more:hover, #game .pc-more:focus-visible { background: var(--amarelo); color: var(--tinta); transform: translateY(-6px); box-shadow: 0 6px 0 var(--tinta); outline: none; }
#game .pc-more[aria-expanded="true"] { background: var(--amarelo); color: var(--tinta); }
#game .pc-more[aria-expanded="true"] svg { transform: rotate(45deg); }
#game .pc-caption { position: absolute; z-index: 60; left: auto; right: calc(min(46vw, 680px) / 2); top: 12px; width: min(560px, 44vw); transform: translate(50%, -8px); opacity: 0; transition: opacity .3s ease, transform .3s ease; pointer-events: none; text-align: center; }
#game .pc-caption.on { opacity: 1; transform: translate(50%, 0); }
#game .pc-caption-who { display: none; }
#game .pc-caption-t { display: block; padding: 11px 18px; border-radius: 16px; background: var(--branco); border: 3px solid var(--tinta); box-shadow: 0 4px 0 var(--tinta);
  color: var(--tinta); font: 800 1rem/1.42 var(--sans); text-wrap: balance; }
#game .pc-caption-t.in { animation: pc-cap-in .28s ease; }
#game button.pc-go { cursor: pointer; }
@keyframes pc-cap-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  #game .pc-more { width: 38px; height: 38px; }
  #game .pc-caption { right: 50%; top: max(14px, env(safe-area-inset-top)); width: calc(100% - 28px); }
  #game .pc-caption-t { font-size: .94rem; padding: 12px 15px; }
}
@media (prefers-reduced-motion: reduce) { #game .pc-caption, #game .pc-caption-t.in { animation: none; transition: none; } #game .pc-more svg { transition: none; } }

/* abertura: sem controles por cima da fala do personagem */
#game:has(#characterIntro:not([hidden])) .touch-controls, #game:has(#characterIntro:not([hidden])) .action-controls { display: none !important; }
@media (max-width: 560px) { #game #characterIntro { bottom: max(16px, env(safe-area-inset-bottom)); } #game #characterIntro p { font-size: .92rem; line-height: 1.5; } }

/* ---------- sem rolagem: tudo cabe no card ---------- */
/* computador: a figurinha nunca passa da altura útil do card (a inclinação também conta) */
#game .ch-card.has-media:not([data-step="poster"]) .ch-media img { max-height: calc(min(760px, 100dvh - 56px) - 310px); object-position: 50% 30%; }
#game .ch-card[data-step="poster"] .ch-media img { max-height: calc(min(760px, 100dvh - 56px) - 320px); }
#game .ch-body { padding-bottom: calc(var(--ch-pad) + 4px); }
#game .ch-keys { margin-top: 14px; }
@media (max-width: 560px) {
  #game .ch-body { gap: 14px; padding-top: 12px; padding-bottom: 14px; }
  /* pistas e desafio: imagem mais baixa */
  #game .ch-card.has-media:not([data-step="poster"]):not([data-step="feedback"]) .ch-media { width: 72%; margin-top: 8px; }
  #game .ch-card.has-media:not([data-step="poster"]):not([data-step="feedback"]) .ch-media img { aspect-ratio: 16 / 7; }
  #game .ch-card[data-step="poster"] .ch-media img { max-height: 33dvh; }
  #game .ch-title { font-size: 1.45rem; margin-bottom: 12px; }
  #game .ch-facts { gap: 9px; }
  #game .ch-question { font-size: 1.2rem; margin-bottom: 12px; }
  #game .ch-options { gap: 9px; }
  #game .ch-opt { min-height: 50px; padding-top: 6px; padding-bottom: 6px; font-size: .95rem; }
  #game .ch-opt-key { width: 34px; height: 34px; border-radius: 10px; }
  #game .ch-hint { margin-top: 12px; padding: 10px 12px; font-size: .9rem; line-height: 1.42; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  #game .ch-hint-ico { width: 30px; height: 30px; }
  /* descoberta: a figurinha vira miniatura inclinada ao lado do título */
  #game .ch-card[data-step="feedback"] .ch-body { position: relative; display: block; }
  #game .ch-card[data-step="feedback"] .ch-media { position: absolute; z-index: 2; top: 10px; right: 16px; width: 98px; margin: 0; padding: 5px 5px 6px; border-radius: 10px; transform: rotate(5deg); animation: ch-mini .7s cubic-bezier(.2, .9, .25, 1.35) both; }
  #game .ch-card[data-step="feedback"] .ch-media::after { inset: 5px 5px 6px; border-radius: 6px; }
  #game .ch-card[data-step="feedback"] .ch-media img { aspect-ratio: 1; border-radius: 6px; }
  #game .ch-card[data-step="feedback"] .ch-media-tag { display: none; }
  #game .ch-card[data-step="feedback"] .ch-pane-result { padding-right: 0; }
  #game .ch-card[data-step="feedback"] .ch-win, #game .ch-card[data-step="feedback"] .ch-subject, #game .ch-card[data-step="feedback"] .ch-uf { margin-right: 106px; }
  #game .ch-subject { font-size: 1.45rem; margin: 12px 0 6px; }
  #game .ch-uf { margin-bottom: 12px; }
  #game .ch-seals { gap: 8px; margin-bottom: 12px; }
  #game .ch-seal { padding: 6px 11px 6px 6px; }
  #game .ch-seal-ico { width: 28px; height: 28px; }
  #game .ch-seal-b strong { font-size: .84rem; }
  #game .ch-seal-b span { font-size: .7rem; }
  #game .ch-explain { font-size: .9rem; line-height: 1.5; padding: 11px 13px; }
}
@keyframes ch-mini { 0% { transform: scale(.4) rotate(-14deg); opacity: 0; } 70% { transform: scale(1) rotate(7deg); opacity: 1; } 100% { transform: rotate(5deg); } }

/* computador: área de resposta um pouco mais compacta para a dica caber */
@media (min-width: 561px) {
  #game .ch-options { gap: 11px; }
  #game .ch-opt { min-height: 56px; }
  #game .ch-hint { margin-top: 13px; padding: 11px 14px; }
  #game .ch-question { margin-bottom: 16px; }
}

/* telas altas (tablet em pé): o card usa mais altura */
@media (min-height: 900px) and (min-width: 561px) { #game .ch-card { max-height: min(900px, calc(100dvh - 56px)); } }
/* notebooks baixos (até 740px de altura) */
@media (max-height: 740px) and (min-width: 561px) {
  #game .ch-card { --ch-pad: 24px; }
  #game .ch-head { padding-top: 12px; padding-bottom: 20px; }
  #game .ch-body { gap: 32px; }
  #game .ch-title { font-size: 1.75rem; margin-bottom: 14px; }
  #game .ch-fact { padding: 11px 14px; }
  #game .ch-question { font-size: 1.4rem; margin-bottom: 13px; }
  #game .ch-options { gap: 9px; }
  #game .ch-opt { min-height: 50px; }
  #game .ch-opt-key { width: 38px; height: 38px; }
  #game .ch-hint { margin-top: 10px; padding: 9px 12px; font-size: .92rem; }
  #game .ch-keys { margin-top: 10px; }
  #game .ch-subject { font-size: 2rem; margin-top: 14px; }
  #game .ch-seals { margin-bottom: 12px; }
  #game .ch-explain { font-size: .96rem; line-height: 1.52; padding: 12px 15px; }
  #game .ch-foot { padding-top: 10px; padding-bottom: 14px; }
  #game .ch-btn { min-height: 48px; }
}
/* celulares pequenos (até 780px de altura) */
@media (max-width: 560px) and (max-height: 780px) {
  #game .ch-head { padding-top: 10px; padding-bottom: 18px; row-gap: 8px; }
  #game .ch-close { width: 36px; height: 36px; }
  #game .ch-card.has-media:not([data-step="poster"]):not([data-step="feedback"]) .ch-media { width: 62%; }
  #game .ch-card.has-media:not([data-step="poster"]):not([data-step="feedback"]) .ch-media img { aspect-ratio: 16 / 6; }
  #game .ch-card[data-step="poster"] .ch-media img { max-height: 30dvh; }
  #game .ch-title { font-size: 1.3rem; margin-bottom: 10px; }
  #game .ch-fact { padding: 9px 11px; gap: 10px; grid-template-columns: 28px minmax(0, 1fr); }
  #game .ch-fact-n { width: 28px; height: 28px; font-size: .8rem; }
  #game .ch-fact-t, #game .ch-post-t { font-size: .9rem; line-height: 1.45; }
  #game .ch-facts.is-plaques { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #game .ch-plaque { padding: 10px 10px 11px; }
  #game .ch-plaque-n { font-size: .62rem; margin-bottom: 4px; }
  #game .ch-plaque-t { font-size: .84rem; line-height: 1.38; }
  #game .ch-question { font-size: 1.1rem; margin-bottom: 10px; }
  #game .ch-options { gap: 8px; }
  #game .ch-opt { min-height: 44px; font-size: .9rem; padding-top: 4px; padding-bottom: 4px; }
  #game .ch-opt-key { width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; }
  #game .ch-hint { margin-top: 9px; padding: 8px 10px; font-size: .84rem; }
  #game .ch-explain { font-size: .86rem; line-height: 1.45; }
  #game .ch-btn { min-height: 44px; }
}
@media (max-width: 560px) { #game .ch-win { white-space: nowrap; font-size: .68rem; letter-spacing: .06em; padding-right: 11px; } }

/* =========================================================================================
   Brincadeiras das missões (jogos.js): versos, luneta, festa, quebra-cabeça e raspadinha
   ========================================================================================= */
#game .ch-card[data-step="jogo"] .ch-pane-game { display: block; }
#game .ch-card[data-step="jogo"] .ch-body { grid-template-columns: minmax(0, 1fr); }
#game .jg-instrucao { margin: 0 0 14px; max-width: none; font-size: 1rem; line-height: 1.5; }
#game .jg-box { position: relative; }
#game .jg-status { min-height: 1.4em; margin: 12px 0 0; font: 800 .92rem/1.4 var(--sans); color: var(--verde-2); text-align: center; }
#game .jg-status:empty { visibility: hidden; }
#game .ch-pane-game .ch-hint { margin-top: 8px; }
.jg-ghost { position: fixed; z-index: 400; pointer-events: none; margin: 0; opacity: .92; box-shadow: 0 18px 30px rgba(0, 24, 10, .35) !important; }
#game .is-dragging { opacity: .35; }
#game .jg-alvo-on { outline: 4px solid var(--amarelo) !important; outline-offset: 2px; }
@keyframes jg-treme { 15%, 55% { transform: translateX(-6px) rotate(-2deg); } 35%, 75% { transform: translateX(6px) rotate(2deg); } }
#game .jg-treme { animation: jg-treme .42s ease; }

/* 1. versos na ordem */
#game .jg-ordem { display: grid; gap: 8px; margin: 0 auto; padding: 0; list-style: none; max-width: 640px; }
#game .jg-ordem li { display: block; }
#game .jg-verso, .jg-ghost.jg-verso { display: grid; grid-template-columns: 36px minmax(0, 1fr) 26px; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 14px 6px 7px;
  border: 2.5px solid #0a3a22; border-radius: 14px; background: #fff; color: #0a3a22; text-align: left; cursor: grab; touch-action: none;
  box-shadow: 0 3px 0 #0a3a22; transform: translateY(-3px); font: 700 1.06rem/1.3 'Bricolage Grotesque', 'Nunito', sans-serif; letter-spacing: -.005em; transition: background .15s, transform .12s, box-shadow .12s; }
#game .jg-verso-n, .jg-ghost .jg-verso-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #fff3c4; border: 2px solid #0a3a22; font: 800 .9rem/1 'Bricolage Grotesque', sans-serif; }
#game .jg-verso-ico, .jg-ghost .jg-verso-ico { display: grid; place-items: center; color: rgba(10, 58, 34, .45); }
#game .jg-verso-ico svg, .jg-ghost .jg-verso-ico svg { width: 22px; height: 22px; }
@media (hover: hover) { #game .jg-verso:not(:disabled):hover { background: var(--verde-claro); } }
#game .jg-verso:focus-visible { outline: none; box-shadow: 0 3px 0 var(--tinta), 0 0 0 4px rgba(255, 223, 0, .7); }
#game .jg-verso.is-sel { background: var(--amarelo); transform: translateY(-6px); box-shadow: 0 6px 0 var(--tinta); }
#game .jg-verso.is-fixo { cursor: default; background: var(--papel-2); transform: none; box-shadow: none; border-style: dashed; }
#game .jg-verso.is-certo { cursor: default; background: var(--verde-claro); border-color: var(--verde-2); transform: none; box-shadow: none; }
#game .jg-verso.is-certo .jg-verso-n { background: var(--verde); color: var(--amarelo); }
#game .jg-verso.is-certo .jg-verso-ico, #game .jg-verso.is-fixo .jg-verso-ico { color: var(--verde-2); }
#game .jg-verso:disabled { opacity: 1; }
#game .jg-ordem.is-pronta .jg-verso { animation: jg-brilho .6s ease both; }
#game .jg-ordem.is-pronta li:nth-child(2) .jg-verso, #game .jg-ordem.is-pronta li:nth-child(4) .jg-verso, #game .jg-ordem.is-pronta li:nth-child(6) .jg-verso { background: #fff3c4; border-color: #b9770e; }
@keyframes jg-brilho { 50% { transform: scale(1.02); } }
#game .jg-conferir { display: flex; margin: 16px auto 0; }

/* 2. luneta */
#game .jg-luneta { position: relative; width: 100%; height: clamp(170px, calc(min(760px, 100dvh - 56px) - 420px), 400px); margin: 0 auto; overflow: hidden; border-radius: 16px;
  border: 3px solid var(--tinta); box-shadow: 0 4px 0 var(--tinta); background: #20352a; cursor: crosshair; touch-action: none; user-select: none; }
#game .jg-luneta:focus-visible { outline: none; box-shadow: 0 4px 0 var(--tinta), 0 0 0 4px rgba(255, 223, 0, .7); }
#game .jg-lun-cena { position: absolute; left: 0; top: 0; will-change: transform; }
#game .jg-lun-fundo, #game .jg-lun-nitida { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
#game .jg-lun-fundo { filter: blur(9px) brightness(.5) saturate(.6); transform: scale(1.04); }
#game .jg-lun-lente { position: absolute; left: 0; top: 0; border-radius: 50%; pointer-events: none; border: 5px solid #b5803e;
  box-shadow: 0 0 0 3px var(--tinta), 0 0 0 9px rgba(0, 0, 0, .35), inset 0 0 22px rgba(0, 0, 0, .45); transition: border-color .2s; }
#game .jg-lun-lente.is-quase { border-color: var(--amarelo); animation: jg-mira .5s ease-in-out infinite alternate; }
@keyframes jg-mira { to { box-shadow: 0 0 0 3px var(--tinta), 0 0 0 14px rgba(255, 223, 0, .35), inset 0 0 22px rgba(0, 0, 0, .45); } }
#game .jg-lun-marca { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -100%); color: var(--verde); filter: drop-shadow(0 2px 0 var(--tinta)); animation: jg-cai .45s cubic-bezier(.2, .9, .25, 1.4) both; }
#game .jg-lun-marca svg { width: 100%; height: 100%; }
#game .jg-lun-marca b { position: absolute; top: 5px; left: 0; right: 0; text-align: center; font: 800 .8rem/1 var(--display); color: var(--verde-3); }
@keyframes jg-cai { from { transform: translate(-50%, -160%); opacity: 0; } }
#game .jg-lun-dica { position: absolute; width: 90px; height: 90px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 223, 0, .55), transparent 70%); animation: jg-pisca 1.3s ease-in-out 2; pointer-events: none; }
@keyframes jg-pisca { 50% { opacity: .2; transform: translate(-50%, -50%) scale(1.3); } }
#game .jg-luneta.is-pronta .jg-lun-fundo { filter: none; transform: none; transition: filter .8s, transform .8s; }
#game .jg-luneta.is-pronta .jg-lun-lente { opacity: 0; transition: opacity .5s; }
#game .jg-lun-pistas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
#game .jg-lun-pistas li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; padding: 9px 11px; border-radius: 13px; background: var(--branco); border: 2.5px solid var(--tinta); box-shadow: 0 3px 0 var(--tinta); font: 700 .88rem/1.35 var(--sans); }
#game .jg-lun-pistas li.is-vazia { background: transparent; border-style: dashed; border-color: rgba(10, 58, 34, .35); box-shadow: none; color: rgba(10, 58, 34, .45); }
#game .jg-lun-pistas li.is-nova { animation: ch-step .35s ease both; }
#game .jg-lun-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--amarelo); border: 2px solid var(--tinta); font: 800 .82rem/1 var(--display); color: var(--tinta); }
#game .jg-lun-pistas li.is-vazia .jg-lun-n { background: transparent; border-color: rgba(10, 58, 34, .35); color: rgba(10, 58, 34, .45); }

/* 3. arrume a festa */
#game .jg-bandeja { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; min-height: 40px; }
#game .jg-item, .jg-ghost.jg-item { display: grid; justify-items: center; gap: 4px; padding: 7px 5px 8px; border: 2.5px solid #0a3a22; border-radius: 14px; background: #fff; color: #0a3a22;
  cursor: grab; touch-action: none; box-shadow: 0 3px 0 #0a3a22; transform: translateY(-3px); font: 800 .8rem/1.15 'Nunito', sans-serif; text-align: center; transition: background .15s, transform .12s, box-shadow .12s; }
#game .jg-item img, .jg-ghost.jg-item img { width: 100%; max-width: 92px; aspect-ratio: 1; object-fit: contain; pointer-events: none; }
@media (hover: hover) { #game .jg-item:hover { background: var(--verde-claro); } }
#game .jg-item:focus-visible { outline: none; box-shadow: 0 3px 0 var(--tinta), 0 0 0 4px rgba(255, 223, 0, .7); }
#game .jg-item.is-sel { background: var(--amarelo); transform: translateY(-7px) rotate(-2deg); box-shadow: 0 7px 0 var(--tinta); }
#game .jg-cestos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
#game .jg-cesto { display: grid; align-content: start; gap: 2px; min-height: 118px; padding: 12px 14px; border-radius: 18px; border: 3px dashed var(--tinta); cursor: pointer; text-align: left; color: var(--tinta); transition: background .15s, transform .15s; }
#game .jg-cesto.is-sim { background: var(--verde-claro); border-color: var(--verde-2); }
#game .jg-cesto.is-nao { background: #fff1d6; border-color: #b9770e; }
#game .jg-cesto strong { font: 800 1.08rem/1.15 var(--display); }
#game .jg-cesto-sub { font: 800 .74rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
#game .jg-cesto-itens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (hover: hover) { #game .jg-cesto:hover { transform: translateY(-2px); } }
#game .jg-cesto:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255, 223, 0, .7); }
#game .jg-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--branco); border: 2px solid var(--tinta); font: 800 .76rem/1 var(--sans); }
#game .jg-chip img { width: 26px; height: 26px; object-fit: contain; }
#game .jg-box.is-pronta .jg-cesto.is-sim { background: #c9f0cf; }

/* 4. quebra-cabeça */
#game .jg-puzzle { --lado: min(100%, calc(min(760px, 100dvh - 56px) - 360px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: var(--lado); aspect-ratio: 1; margin: 0 auto;
  padding: 4px; border-radius: 16px; background: var(--tinta); box-shadow: 0 4px 0 var(--tinta); transition: gap .5s; }
#game .jg-peca { position: relative; border: 0; border-radius: 8px; cursor: grab; touch-action: none; background-repeat: no-repeat; transition: transform .12s, filter .15s, border-radius .4s; }
#game .jg-peca::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); pointer-events: none; }
@media (hover: hover) { #game .jg-peca:hover { filter: brightness(1.08); } }
#game .jg-peca:focus-visible { outline: none; box-shadow: inset 0 0 0 4px var(--amarelo); }
#game .jg-peca.is-sel { transform: scale(.92); box-shadow: inset 0 0 0 5px var(--amarelo), 0 0 0 3px var(--amarelo); z-index: 2; }
#game .jg-peca.is-certa::after { box-shadow: inset 0 0 0 3px rgba(0, 156, 59, .85); }
#game .jg-puzzle.is-pronta { gap: 0; }
#game .jg-puzzle.is-pronta .jg-peca { border-radius: 0; }
#game .jg-puzzle.is-pronta .jg-peca::after { box-shadow: none; }
.jg-ghost.jg-peca { border-radius: 8px; background-repeat: no-repeat; }

/* 5. raspadinha */
#game .jg-raspa { width: min(620px, 100%); margin: 0 auto; padding: 12px; border-radius: 20px; background-color: var(--amarelo); background-image: var(--onda); background-size: 80px 36px; background-blend-mode: soft-light;
  border: 3px solid var(--tinta); box-shadow: 0 5px 0 var(--tinta); display: grid; gap: 10px; transform: rotate(-.6deg); }
#game .jg-raspa-topo { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 6px; }
#game .jg-raspa-topo span { font: 900 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--verde-3); }
#game .jg-raspa-topo b { font: 800 1.05rem/1 var(--display); color: var(--tinta); }
#game .jg-raspa-zona { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 66px; padding: 10px 14px; border-radius: 14px;
  background: var(--branco); border: 2.5px solid var(--tinta); overflow: hidden; }
#game .jg-raspa-zona:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--verde); }
#game .jg-raspa-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--verde); color: var(--amarelo); border: 2px solid var(--tinta); font: 800 .9rem/1 var(--display); }
#game .jg-raspa-t { margin: 0; font: 700 1rem/1.4 var(--sans); color: var(--tinta); }
#game .jg-raspa-tinta { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; touch-action: none; border-radius: 12px; }
#game .jg-raspa-zona.is-revelada { animation: jg-brilho .5s ease; }
#game .jg-raspa-zona.is-revelada .jg-raspa-tinta { pointer-events: none; }

@media (max-width: 860px) {
  #game .jg-bandeja { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #game .jg-instrucao { font-size: .9rem; margin-bottom: 10px; }
  #game .jg-verso { min-height: 42px; padding: 5px 10px 5px 6px; gap: 9px; grid-template-columns: 30px minmax(0, 1fr) 20px; font-size: .95rem; }
  #game .jg-verso-n { width: 28px; height: 28px; }
  #game .jg-luneta { height: 36dvh; }
  #game .jg-lun-pistas { grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }
  #game .jg-lun-pistas li { padding: 6px 9px; font-size: .82rem; }
  #game .jg-lun-pistas li.is-vazia { display: none; }
  #game .jg-bandeja { gap: 8px; }
  #game .jg-item { font-size: .74rem; padding: 5px 4px 6px; }
  #game .jg-item img { max-width: 64px; }
  #game .jg-cestos { gap: 8px; margin-top: 12px; }
  #game .jg-cesto { min-height: 92px; padding: 9px 10px; }
  #game .jg-cesto strong { font-size: .95rem; }
  #game .jg-puzzle { --lado: min(100%, 46dvh); }
  #game .jg-raspa-zona { min-height: 58px; padding: 8px 11px; }
  #game .jg-raspa-t { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  #game .jg-treme, #game .jg-lun-lente.is-quase, #game .jg-lun-marca, #game .jg-lun-dica, #game .jg-ordem.is-pronta .jg-verso, #game .jg-raspa-zona.is-revelada { animation: none !important; }
}

/* brincadeiras: quando a dica aparece, a instrução (já lida) sai de cena para tudo caber sem rolagem */
#game .ch-pane-game:has(.ch-hint:not([hidden])) .jg-instrucao { display: none; }
@media (min-width: 561px) { #game .jg-verso { min-height: 44px; } #game .jg-ordem { gap: 7px; } #game .jg-conferir { margin-top: 12px; } }

/* ---------- celular deitado (pouca altura): brincadeiras e descoberta compactas, sem rolagem ---------- */
@media (max-height: 560px) and (min-width: 561px) {
  #game .ch-card[data-step="jogo"] .jg-instrucao { display: none; }
  #game .ch-card[data-step="jogo"] .ch-body { padding-top: 10px; padding-bottom: 8px; }
  #game .jg-status { margin-top: 6px; font-size: .8rem; min-height: 1.2em; }
  #game .ch-pane-game .ch-hint { margin-top: 4px; padding: 6px 10px; font-size: .8rem; line-height: 1.35; }
  #game .jg-ordem { gap: 4px; max-width: 560px; }
  #game .jg-verso { min-height: 30px; padding: 2px 10px 2px 4px; font-size: .86rem; grid-template-columns: 26px minmax(0, 1fr) 18px; gap: 8px; border-width: 2px; }
  #game .jg-verso-n { width: 24px; height: 24px; border-radius: 7px; font-size: .74rem; }
  #game .jg-verso-ico svg { width: 16px; height: 16px; }
  #game .jg-conferir { margin-top: 8px; min-height: 38px; }
  #game .jg-luneta { height: calc(100dvh - 190px); }
  #game .jg-lun-pistas { margin-top: 6px; gap: 6px; }
  #game .jg-lun-pistas li { padding: 4px 7px; font-size: .74rem; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; }
  #game .jg-lun-n { width: 22px; height: 22px; font-size: .7rem; }
  #game .jg-bandeja { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  #game .jg-item { padding: 3px 3px 4px; font-size: .66rem; }
  #game .jg-item img { max-width: 52px; }
  #game .jg-cestos { margin-top: 8px; gap: 8px; }
  #game .jg-cesto { min-height: 70px; padding: 6px 10px; }
  #game .jg-cesto strong { font-size: .86rem; }
  #game .jg-puzzle { --lado: calc(100dvh - 180px); }
  #game .jg-raspa { padding: 8px; gap: 6px; }
  #game .jg-raspa-zona { min-height: 44px; padding: 5px 10px; }
  #game .jg-raspa-t { font-size: .84rem; line-height: 1.3; }
  /* descoberta */
  #game .ch-subject { font-size: 1.25rem; margin: 8px 0 4px; }
  #game .ch-uf { margin-bottom: 8px; }
  #game .ch-win { font-size: .64rem; }
  #game .ch-seals { gap: 6px; margin-bottom: 8px; }
  #game .ch-seal { padding: 4px 9px 4px 4px; }
  #game .ch-seal-ico { width: 24px; height: 24px; }
  #game .ch-seal-b strong { font-size: .76rem; }
  #game .ch-seal-b span { font-size: .64rem; }
  #game .ch-explain { font-size: .8rem; line-height: 1.42; padding: 8px 11px; }
}
@media (max-height: 560px) and (min-width: 561px) {
  #game .ch-card.has-media .ch-media { width: fit-content; max-width: 100%; justify-self: center; margin-top: 4px; }
  #game .ch-card.has-media:not([data-step="poster"]) .ch-media img, #game .ch-card.has-media .ch-media img { height: calc(100dvh - 232px); max-height: none; width: auto; max-width: none; aspect-ratio: 4 / 5; }
  #game .ch-card.has-media .ch-body { grid-template-columns: auto minmax(0, 1fr); }
  #game .ch-question { font-size: 1rem; margin-bottom: 8px; }
  #game .ch-options { gap: 6px; }
  #game .ch-opt { min-height: 36px; padding-top: 3px; padding-bottom: 3px; font-size: .86rem; }
  #game .ch-opt-key { width: 26px; height: 26px; font-size: .8rem; }
  #game .ch-hint { margin-top: 6px; padding: 6px 10px; font-size: .8rem; line-height: 1.35; }
  #game .ch-keys { display: none; }
  #game .ch-card[data-step="jogo"] .jg-cesto-sub { display: none; }
}
@media (max-height: 560px) and (min-width: 561px) {
  /* brincadeiras em duas colunas: o jogo à esquerda, progresso e dica à direita */
  #game .ch-card[data-step="jogo"] .ch-pane-game { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; align-items: start; }
  #game .ch-card[data-step="jogo"] .jg-box { grid-column: 1; grid-row: 1 / 3; }
  #game .ch-card[data-step="jogo"] .jg-status { grid-column: 2; grid-row: 1; text-align: left; margin-top: 0; }
  #game .ch-card[data-step="jogo"] #gameHint { grid-column: 2; grid-row: 2; margin-top: 6px; }
  #game .jg-verso { min-height: 28px; }
  #game .jg-ordem { gap: 3px; }
  #game .jg-conferir { margin-top: 6px; }
  #game .jg-luneta { height: calc(100dvh - 236px); }
  #game .jg-bandeja { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #game .jg-item img { max-width: 40px; }
  /* descoberta: a etiqueta repete o que o topo já diz */
  #game .ch-card[data-step="feedback"] .ch-win { display: none; }
  #game .ch-card[data-step="feedback"] .ch-subject { margin-top: 2px; }
}
@media (max-height: 560px) and (min-width: 561px) {
  #game .ch-card[data-step="jogo"] .ch-pane-game { grid-template-rows: auto auto 1fr; }
  #game .ch-card[data-step="jogo"] .jg-box { grid-row: 1 / 4; }
  #game .ch-card[data-step="jogo"] #gameHint { grid-row: 3; }
  /* luneta: as pistas vão para a coluna da direita */
  #game .ch-card[data-step="jogo"] .jg-box[data-jogo="luneta"] { display: contents; }
  #game .ch-card[data-step="jogo"] .jg-luneta { grid-column: 1; grid-row: 1 / 4; height: calc(100dvh - 190px); }
  #game .ch-card[data-step="jogo"] .jg-lun-pistas { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; margin-top: 4px; gap: 4px; }
  #game .ch-card[data-step="jogo"] .jg-lun-pistas li.is-vazia { display: none; }
  /* pergunta e descoberta um pouco mais compactas */
  #game .ch-opt { min-height: 32px; font-size: .8rem; }
  #game .ch-question { font-size: .94rem; margin-bottom: 6px; }
  #game .ch-hint { font-size: .74rem; padding: 5px 9px; }
  #game .ch-hint-ico { width: 24px; height: 24px; }
  #game .ch-explain { font-size: .76rem; line-height: 1.36; padding: 7px 10px; }
  #game .ch-subject { font-size: 1.15rem; }
  #game .ch-seals { margin-bottom: 6px; }
}
@media (max-height: 560px) and (min-width: 561px) {
  #game .ch-card[data-step="question"]:has(#challengeFeedback:not([hidden])) .ch-foot { display: none; }
}
/* Sudeste no celular deitado: cartaz e pistas compactos */
@media (max-height: 560px) and (min-width: 561px) {
  #game .ch-title { font-size: 1.08rem; margin: 0 0 6px; }
  #game .ch-facts { gap: 5px; }
  #game .ch-fact { padding: 5px 9px; gap: 8px; grid-template-columns: 24px minmax(0, 1fr); border-width: 2px; box-shadow: 0 2px 0 var(--tinta); }
  #game .ch-fact-n { width: 24px; height: 24px; font-size: .74rem; border-width: 2px; }
  #game .ch-fact-n svg { width: 14px; height: 14px; }
  #game .ch-fact-t, #game .ch-post-t, #game .ch-plaque-t { font-size: .78rem; line-height: 1.35; }
  #game .ch-fact-k { font-size: .58rem; margin-bottom: 1px; }
  #game .ch-facts.is-plaques { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  #game .ch-plaque { padding: 7px 8px 8px; }
  #game .ch-plaque-n { font-size: .58rem; margin-bottom: 3px; padding-bottom: 2px; }
  #game .ch-post { padding: 6px 10px; }
  #game .ch-post-head { margin-bottom: 3px; }
  #game .ch-post-avatar { width: 22px; height: 22px; }
  #game .ch-post-tag { margin-top: 3px; font-size: .64rem; }
  #game .ch-intro-k { margin-bottom: 6px; font-size: .58rem; padding: 4px 9px; }
  #game .ch-pane-poster .ch-title { font-size: 1.15rem; }
  #game .ch-intro-t { font-size: .8rem; line-height: 1.45; }
  #game .ch-card[data-step="poster"].has-media .ch-media img { height: calc(100dvh - 236px); }
  #game .ch-facts.is-feed .ch-fact-t, #game .ch-facts.is-feed .ch-post-t { font-size: .74rem; line-height: 1.3; }
  #game .ch-facts.is-feed .ch-fact { padding: 4px 8px; }
}
@media (max-height: 560px) and (min-width: 561px) {
  #game .ch-body { padding-top: 6px; padding-bottom: 6px; }
  #game .ch-pane-facts:has(.is-feed) .ch-title { font-size: .98rem; margin-bottom: 4px; }
  #game .ch-facts.is-feed { gap: 4px; }
}

/* brincadeiras: sem seleção de texto nem arrasto nativo do navegador (que cria cópias fantasmas) */
#game .jg-box, #game .jg-box *, .jg-ghost, .jg-ghost * { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
