/* Inventos: papel de taller amarillo, lienzos SVG y montones de monedas.
   Sin box-shadow; solo se animan transform y opacity. 1rem = 32 px a 1080p (alto útil ≈ 24rem). */
.inventos { background: #FFF3C4; }
.iv-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.iv-titulo { font-size: 2rem; font-weight: var(--tg-w-strong); letter-spacing: -.02em; text-align: center; }
.iv-sub { font-size: 1.2rem; color: var(--tg-muted); text-align: center; }
.iv-quien { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: 1.2rem; font-weight: var(--tg-w-medium); max-width: 100%; overflow: hidden; white-space: nowrap; }
.iv-quien .tg-personaje--linea { width: 1.4rem; height: 1.4rem; vertical-align: -.3rem; }
.iv-papel { background: #fff; border-radius: .8rem; border: .15rem solid #E8C547; box-sizing: border-box; overflow: hidden; flex: none; }
.iv-papel svg { width: 100%; height: 100%; display: block; }

/* Dibujar y nombrar: una fila hasta 4; dos filas de 5 a 8 */
.iv-lienzos { flex: 1; min-height: 0; display: grid; gap: .8rem 1.2rem; align-content: center; justify-content: center; }
.iv-lienzos--1 { grid-template-columns: auto; } .iv-lienzos--2 { grid-template-columns: repeat(2, auto); }
.iv-lienzos--3 { grid-template-columns: repeat(3, auto); } .iv-lienzos--4 { grid-template-columns: repeat(4, auto); }
.iv-lienzos--5, .iv-lienzos--6 { grid-template-columns: repeat(3, auto); }
.iv-lienzos--7, .iv-lienzos--8 { grid-template-columns: repeat(4, auto); }
.iv-lienzo { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.iv-lienzo .iv-papel { width: 18rem; height: 18rem; }
.iv-lienzos--3 .iv-papel { width: 16rem; height: 16rem; }
.iv-lienzos--4 .iv-papel { width: 12.4rem; height: 12.4rem; }
.iv-lienzos--5 .iv-papel, .iv-lienzos--6 .iv-papel, .iv-lienzos--7 .iv-papel, .iv-lienzos--8 .iv-papel { width: 7.8rem; height: 7.8rem; }
.iv-listo { position: absolute; right: -.6rem; top: -.6rem; font-size: 2.2rem; line-height: 1; opacity: 0; transform: scale(.5); transition: opacity .25s, transform .25s; }
.iv-lienzo--listo .iv-listo { opacity: 1; transform: scale(1); }
.iv-lienzo--listo .iv-papel { border-color: var(--tg-online); }

/* Presentación: dibujo grande a la izquierda, ficha del invento a la derecha */
.iv-escenario { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 2rem; }
.iv-papel--grande { width: 22rem; height: 22rem; }
.iv-ficha { width: 28rem; display: flex; flex-direction: column; gap: .8rem; }
.iv-problema { font-size: 1.3rem; line-height: 1.25; background: #fff; border-radius: 1rem; padding: .6rem .9rem; border: .12rem solid #E8C547; }
.iv-nombre { font-size: 2.6rem; font-weight: var(--tg-w-strong); letter-spacing: -.03em; line-height: 1.05; overflow-wrap: anywhere; }
.iv-quien--grande { justify-content: flex-start; font-size: 1.5rem; }
.iv-presenta { font-size: 1.4rem; font-weight: var(--tg-w-strong); color: #8A5A00; }

/* Inversión y resultados: una tarjeta por invento */
.iv-galeria { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: .8rem; padding-bottom: .4rem; }
.iv-tarjeta { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: #fff; border-radius: 1rem; padding: .5rem; border: .12rem solid #E8C547; box-sizing: border-box; }
.iv-tarjeta__nombre { font-size: 1.1rem; font-weight: var(--tg-w-strong); line-height: 1.1; text-align: center; overflow-wrap: anywhere; min-height: 2.4rem;
  display: flex; align-items: center; }
.iv-galeria--a .iv-tarjeta { width: 12.5rem; }
.iv-galeria--a .iv-papel { width: 8rem; height: 8rem; }
.iv-galeria--b { gap: .5rem; }
.iv-galeria--b .iv-tarjeta { width: 6.3rem; padding: .3rem; }
.iv-galeria--b .iv-papel { width: 5.4rem; height: 5.4rem; }
.iv-galeria--b .iv-tarjeta__nombre { font-size: 1rem; height: 3.3rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.iv-galeria--b .iv-quien { font-size: 1rem; }
.iv-galeria--b .iv-quien .cl-ficha { display: none; }
.iv-hecho { font-size: 1.8rem; line-height: 1; min-height: 1.8rem; }
/* Montón: cada moneda tiene su altura fija (bottom, una vez) y cae animando solo transform/opacity */
.iv-monton { display: flex; align-items: flex-end; gap: .4rem; }
.iv-pila { position: relative; width: 3.4rem; height: 6.5rem; }
.iv-casa { font-size: 1.2rem; font-weight: var(--tg-w-medium); color: var(--tg-muted); margin-left: .6rem; letter-spacing: 0; }
.iv-moneda { position: absolute; left: 0; width: 3rem; height: 1.1rem; display: block; }
.iv-moneda i { display: block; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; background: #F5C542; border: .15rem solid #A87A00;
  animation: iv-cae .45s var(--tg-ease) both; }
.iv-moneda--casa i { background: #FFF0B3; border-style: dashed; }
@keyframes iv-cae { from { transform: translateY(-8rem); opacity: 0; } to { transform: none; opacity: 1; } }
.iv-total { font-size: 1.8rem; font-weight: var(--tg-w-strong); line-height: 1; }
