:root { --borde: #3a3a3a; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #fff; color: #111; font-family: system-ui, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
#tb { height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 6px; }
.tb-aviso { margin: auto; padding: 24px; font-size: 1.6rem; text-align: center; max-width: 30em; }
.tb-barra { display: flex; gap: 6px; height: clamp(64px, 14vh, 110px); flex: none; }
.tb-boton { flex: none; width: clamp(64px, 11vh, 100px); border: 3px solid var(--borde); border-radius: 12px; background: #f4f4f4; cursor: pointer; padding: 0; }
.tb-boton:active { background: #ddd; }
.tb-ic { font-size: clamp(1.8rem, 5vh, 3rem); line-height: 1; }
.tb-play { background: #c8e6c9; } .tb-vaciar { background: #ffcdd2; }
.tb-frase { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: stretch; overflow-x: auto; border: 3px solid var(--borde); border-radius: 12px; background: #eceff1; padding: 4px; scrollbar-width: none; }
.tb-it { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; padding: 2px 6px; border-radius: 8px; border: 2px solid #555; font-weight: 700; font-size: clamp(.8rem, 2.4vh, 1.3rem); }
.tb-it img { height: 70%; max-height: 80px; width: auto; }
.tb-rejilla { flex: 1; min-height: 0; display: grid; gap: 6px; }
.tb-celda, .tb-vacia { min-width: 0; min-height: 0; }
.tb-celda { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 4px; border: 3px solid var(--borde); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; overflow: hidden; }
.tb-celda:active { filter: brightness(.85); transform: scale(.97); }
.tb-celda img { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; pointer-events: none; }
.tb-sinfoto { flex: 1; display: grid; place-items: center; font-size: 3rem; font-weight: 800; opacity: .5; }
.tb-texto { font-weight: 800; text-transform: uppercase; font-size: clamp(.7rem, 2.3vh, 1.4rem); letter-spacing: -.02em; line-height: 1.05; text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; }
.tb-tam1 .tb-texto { font-size: clamp(.95rem, 3.2vh, 1.9rem); } .tb-tam2 .tb-texto { font-size: clamp(1.1rem, 3.9vh, 2.3rem); }
.tb-persona, .tb-it.tb-persona { background: #fff59d; } .tb-verbo, .tb-it.tb-verbo { background: #c8e6c9; } .tb-nombre, .tb-it.tb-nombre { background: #ffe0b2; }
.tb-adjetivo, .tb-it.tb-adjetivo { background: #bbdefb; } .tb-social, .tb-it.tb-social { background: #f8bbd0; } .tb-otro { background: #fff; }
.tb-carpeta { background: #d1c4e9; border-radius: 4px 22px 12px 12px; } .tb-juego { background: #b2dfdb; }
.tb-marcada { outline: 6px solid #e53935; }
.tb-salta img, .tb-salta .tb-sinfoto { animation: tb-salta 0.6s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes tb-salta { 0% { transform: scale(1); } 35% { transform: translateY(-6%) scale(1.12) rotate(-4deg); } 65% { transform: scale(0.96) rotate(3deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tb-salta img, .tb-salta .tb-sinfoto { animation: none; } }
