/* Torre do Saber — painel e minijogos */
.torre-limite { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; padding: 12px 14px; border-radius: 16px; border: 3px solid var(--ink); background: linear-gradient(90deg, #1f6f5a, #154a3d); box-shadow: 0 4px 0 var(--ink); }
.torre-limite.zero { background: linear-gradient(90deg, #5a2440, #3a1530); }
.torre-limite > .ico { font-size: 34px; flex: none; }
.torre-limite div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.torre-limite b { font: 18px 'Lilita One'; }
.torre-limite small { font-weight: 800; color: #d9f7ee; font-size: 13px; }
.torre-jogos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin-top: 12px; }
.tj-card { display: flex; gap: 12px; align-items: flex-start; border-color: var(--c); }
.tj-ic { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), #140a33 75%); border: 3px solid var(--ink); }
.tj-ic .ico { font-size: 40px; }
.tj-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tj-info h3 { margin: 0; font: 20px 'Lilita One'; color: var(--c); }
.tj-info > small { font-weight: 800; color: var(--muted); }
.tj-difs { display: flex; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
.tj-difs button { flex: 1; font: 13px 'Lilita One'; color: #d9cffb; background: #1a0e40; border: 0; padding: 7px 4px; cursor: pointer; min-height: 40px; }
.tj-difs button + button { border-left: 2px solid var(--ink); }
.tj-difs button.on { background: var(--c); color: var(--ink); }
.tj-difs small { opacity: .8; }
.tj-rec { display: flex; align-items: center; gap: 4px; font-weight: 800; color: #ffe7a3; font-size: 13px; }
.tj-rec .ico { font-size: 18px; flex: none; }
.tj-difs button:focus-visible, .cp-c:focus-visible, .as-b:focus-visible, .te-lugar:focus-visible, .te-p:focus-visible, .lu-p:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* partida */
.tjogo { margin-top: 12px; }
.tj-dica { font-weight: 800; color: var(--muted); margin: 6px 0 10px; }
.tj-dica b { color: #fff; }

/* 1. caça-palavras */
.cp-grade { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; max-width: min(100%, 560px); margin: 0 auto; user-select: none; }
.cp-c { aspect-ratio: 1; font: clamp(14px, 4.4vw, 24px) 'Lilita One'; color: #fff; background: #1a0e40; border: 2px solid var(--ink); border-radius: 8px; cursor: pointer; padding: 0; transition: background .15s, transform .1s; }
.cp-c:hover { background: #2a1a60; }
.cp-c.sel { background: var(--gold); color: var(--ink); transform: scale(1.08); }
.cp-c.ok { background: #22c46a; color: var(--ink); }
.cp-lista { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; justify-content: center; }
.cp-lista li { font: 15px 'Lilita One'; padding: 4px 10px; border-radius: 10px; background: #2a1a60; border: 2px solid var(--ink); }
.cp-lista li.ok { background: #22c46a; color: var(--ink); text-decoration: line-through; }

/* 2. cruzadas */
.cz-grade { display: grid; grid-template-columns: repeat(var(--c), minmax(0, 44px)); gap: 3px; justify-content: center; }
.cz-v { aspect-ratio: 1; }
.cz-c { position: relative; aspect-ratio: 1; display: block; }
.cz-c input { width: 100%; height: 100%; text-align: center; font: clamp(16px, 5vw, 24px) 'Lilita One'; text-transform: uppercase; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 8px; padding: 0; }
.cz-c.on input { background: #fff6c9; }
.cz-c.rev input { background: #d8ccff; }
.cz-c input:focus { outline: none; box-shadow: 0 0 0 3px var(--cyan); }
.cz-c small { position: absolute; top: 1px; left: 4px; font: 10px 'Lilita One'; color: #5a3cc9; pointer-events: none; z-index: 1; }
.cz-dicas { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cz-dicas li { padding: 8px 12px; border-radius: 12px; background: #1a0e40; border: 2px solid var(--ink); font-weight: 800; cursor: pointer; }
.cz-dicas li.on { background: #3a2580; border-color: var(--gold); }
.cz-dicas b { color: var(--gold); }

/* 3. associação */
.as-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.as-col { display: flex; flex-direction: column; gap: 8px; }
.as-col h4 { margin: 0; font: 16px 'Lilita One'; color: var(--gold); text-align: center; }
.as-b { font: 16px 'Lilita One'; color: #fff; background: #1a0e40; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 8px; cursor: pointer; min-height: 48px; box-shadow: 0 3px 0 var(--ink); }
.as-b.sel { background: var(--gold); color: var(--ink); }
.as-b.par { background: var(--pc); color: var(--ink); }

/* 4. quadrado mágico */
.qm { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 72px)) 48px; gap: 6px; justify-content: center; align-items: center; }
.qm-c { aspect-ratio: 1; display: grid; place-items: center; font: clamp(20px, 6vw, 30px) 'Lilita One'; border-radius: 12px; border: 3px solid var(--ink); text-align: center; width: 100%; padding: 0; }
.qm-c.dado { background: #d8ccff; color: var(--ink); }
input.qm-c { background: #fff; color: var(--ink); }
input.qm-c:focus { outline: none; box-shadow: 0 0 0 3px var(--cyan); }
.qm-s { font: 16px 'Lilita One'; color: var(--muted); text-align: center; min-height: 24px; }
.qm-s.ok { color: #4de08a; }
.qm-s.bad { color: #ff4d6d; }

/* 5. lentes */
.ln-svg { width: 100%; max-width: 520px; display: block; margin: 0 auto; background: #0d0626; border-radius: 16px; border: 3px solid var(--ink); }
.ln-p { font-size: 18px; margin: 12px 0 8px; }

/* 6. luneta */
.lu-trilho { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; border-radius: 16px; background: #0d0626; border: 3px solid var(--ink); margin-bottom: 12px; }
.lu-slot { min-width: 70px; min-height: 44px; display: grid; place-items: center; text-align: center; padding: 4px 8px; font: 13px 'Lilita One'; border: 2px dashed #4a3399; border-radius: 10px; color: var(--muted); }
.lu-slot.cheio { border: 2px solid #4de08a; color: #fff; background: #1f3a30; }
.lu-seta { color: var(--muted); font-weight: 900; }
.lu-ceu, .lu-olho { font: 13px 'Lilita One'; color: var(--gold); }
.lu-pecas, .te-pecas { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin-bottom: 10px; }
.lu-p, .te-p { text-align: left; display: flex; flex-direction: column; gap: 2px; color: #fff; background: #1a0e40; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 10px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.lu-p b, .te-p b { font: 15px 'Lilita One'; font-weight: 400; }
.lu-p small, .te-p small { color: var(--muted); font-weight: 700; font-size: 12px; }
.te-p.sel { background: var(--gold); color: var(--ink); }
.te-p.sel small { color: #3a2a10; }
.te-p.usada { opacity: .5; }

/* 7. telescópio */
.te-cena { position: relative; width: 100%; max-width: 560px; aspect-ratio: 5 / 3; margin: 0 auto 14px; background: radial-gradient(circle at 80% 20%, #2a1862, #0d0626 70%); border-radius: 16px; border: 3px solid var(--ink); }
.te-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.te-lugar { position: absolute; transform: translate(-50%, -50%); min-width: 40px; min-height: 40px; max-width: 34%; padding: 4px 8px; border-radius: 20px; font: 12px/1.1 'Lilita One'; color: var(--ink); background: #fff; border: 3px solid var(--ink); cursor: pointer; box-shadow: 0 0 0 4px rgba(255, 200, 61, .5); animation: pulse 1.6s infinite; }
.te-lugar.cheio { background: #4de08a; animation: none; box-shadow: none; }

.tjogo-tela [data-tj="entregar"].pulse { animation: pulse 1.2s infinite; }
@media (max-width: 420px) { .qm { grid-template-columns: repeat(var(--n), minmax(0, 1fr)) 36px; } .as-b { font-size: 14px; } }

.torre-dif { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; padding: 10px 14px; border-radius: 16px; border: 3px solid var(--ink); background: #1a0e40; }
.torre-dif > .ico { font-size: 30px; flex: none; }
.torre-dif div { display: flex; flex-direction: column; }
.torre-dif b { font: 17px 'Lilita One'; }
.torre-dif small { font-weight: 800; color: var(--muted); font-size: 13px; }
.torre-dif.d1 b { color: #4de08a; } .torre-dif.d2 b { color: #ffc83d; } .torre-dif.d3 b { color: #ff7ad9; }
