/* Taller del Estilo · estética PiensAprende + tinta */
:root {
  --azul: #046cb3; --azul-2: #0a86d8; --azul-hondo: #034f84; --naranjo: #f49c4c; --naranjo-tinta: #a85a14;
  --bg: #f6f4ef; --bg-1: #f9f7f2; --bg-2: #ebe7de;
  --glass: rgba(255,255,255,.62); --glass-strong: rgba(255,255,255,.86); --solid: #fff;
  --hair: rgba(255,255,255,.75); --line: rgba(22,28,40,.09); --line-2: rgba(22,28,40,.16);
  --text: #15181e; --text-2: #464d5c; --text-3: #6d7484; --accent-text: #035a96;
  --red: #c93b52; --amber: #b9771c; --green: #23875a;
  --green-bg: rgba(35,135,90,.12); --amber-bg: rgba(185,119,28,.13); --red-bg: rgba(201,59,82,.1); --blue-bg: rgba(4,108,179,.1);
  --tinta: #1b1d24; --papel: #fbf9f4;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -14px rgba(16,24,40,.22);
  --shadow-lg: 0 30px 80px -30px rgba(16,24,40,.45);
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-xl: 28px;
  --ease: cubic-bezier(.22,.8,.24,1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --escala: 1;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1218; --bg-1: #121722; --bg-2: #07111c;
  --glass: rgba(30,35,46,.58); --glass-strong: rgba(26,30,39,.92); --solid: #1a1e27;
  --hair: rgba(255,255,255,.08); --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --text: #eef0f4; --text-2: #b8beca; --text-3: #959cab; --accent-text: #6cb8ef; --naranjo-tinta: #f0b45e;
  --red: #f0768a; --amber: #f0b45e; --green: #5fcf98;
  --green-bg: rgba(95,207,152,.13); --amber-bg: rgba(240,180,94,.13); --red-bg: rgba(240,118,138,.12); --blue-bg: rgba(108,184,239,.12);
  --tinta: #eef0f4; --papel: #1a1e27;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 36px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 80px -30px rgba(0,0,0,.8);
  color-scheme: dark;
}
/* Alto contraste */
[data-contraste="alto"] {
  --text: #000; --text-2: #111; --text-3: #2b2b2b; --accent-text: #00427a; --naranjo-tinta: #6d3600;
  --line: rgba(0,0,0,.45); --line-2: rgba(0,0,0,.7); --glass: #fff; --glass-strong: #fff; --hair: #000;
}
[data-theme="dark"][data-contraste="alto"] {
  --text: #fff; --text-2: #f2f2f2; --text-3: #dcdcdc; --accent-text: #9fd3ff; --naranjo-tinta: #ffd08a;
  --line: rgba(255,255,255,.5); --line-2: rgba(255,255,255,.8); --glass: #000; --glass-strong: #000; --hair: #fff; --bg: #000; --bg-1: #000; --bg-2: #000;
}
[data-contraste="alto"] .blob, [data-contraste="alto"] .grain { display: none; }

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--escala)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern","liga","calt"; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--azul-2); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--solid); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.saltar:focus { top: 12px; }

/* ───── Fondo ───── */
.fondo { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(165deg, var(--bg-1), var(--bg) 45%, var(--bg-2)); }
.blob { position: absolute; border-radius: 50%; filter: blur(10px); will-change: transform; }
.b1 { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(4,108,179,.17), transparent 65%); animation: lava1 58s ease-in-out infinite alternate; }
.b2 { width: 54vmax; height: 54vmax; right: -16vmax; top: 20vh; background: radial-gradient(circle, rgba(244,156,76,.2), transparent 65%); animation: lava2 70s ease-in-out infinite alternate; }
.b3 { width: 46vmax; height: 46vmax; left: 20vw; bottom: -22vmax; background: radial-gradient(circle, rgba(10,134,216,.12), transparent 65%); animation: lava3 84s ease-in-out infinite alternate; }
[data-theme="dark"] .b1 { background: radial-gradient(circle, rgba(4,108,179,.3), transparent 65%); }
[data-theme="dark"] .b2 { background: radial-gradient(circle, rgba(244,156,76,.11), transparent 65%); }
@keyframes lava1 { to { transform: translate(22vw, 18vh) scale(1.12); } }
@keyframes lava2 { to { transform: translate(-30vw, -10vh) scale(.92); } }
@keyframes lava3 { to { transform: translate(15vw, -20vh) scale(1.14); } }
.grain { position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: .065; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-theme="dark"] .grain { opacity: .09; mix-blend-mode: overlay; }
/* mancha de tinta decorativa */
.mancha { position: absolute; pointer-events: none; color: var(--azul); opacity: .09; }
[data-theme="dark"] .mancha { opacity: .16; color: var(--azul-2); }

/* ───── Barra superior ───── */
.top { position: sticky; top: 0; z-index: 30; padding: max(12px, env(safe-area-inset-top)) 14px 0; }
.top-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 18px; }
.marca { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 12px; text-decoration: none; color: inherit; }
.marca-ico { width: 38px; height: 38px; flex: none; transition: transform .3s var(--ease); }
.marca:active .marca-ico { transform: scale(.9) rotate(-8deg); }
.marca-txt { font: 700 1.12rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.marca-txt small { display: block; font: 600 .66rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 12px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.nav a svg { width: 19px; height: 19px; }
.nav a:hover { background: var(--blue-bg); color: var(--accent-text); }
.nav a[aria-current="page"] { background: var(--solid); color: var(--accent-text); box-shadow: var(--shadow); }
.ico-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--solid); cursor: pointer; color: var(--text-2); }
.ico-btn svg { width: 20px; height: 20px; }
.ico-btn:hover { color: var(--accent-text); }

/* Barra inferior móvil */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .top-in { padding-right: 8px; }
  .acciones-top { margin-left: auto; }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); border-radius: 20px; padding: 6px; justify-content: space-around; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px; border-radius: 14px; text-decoration: none; color: var(--text-3); font-size: .7rem; font-weight: 600; min-height: 48px; justify-content: center; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--accent-text); background: var(--solid); box-shadow: var(--shadow); }
}
.acciones-top { display: flex; gap: 6px; }

/* ───── Layout ───── */
main { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 36px 40px 110px; outline: none; }
@media (max-width: 760px) { main { padding: 22px 16px 120px; } }
.vista { animation: entra .45s var(--ease); }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } }
.glass { background: var(--glass); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--hair); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.35); }
[data-theme="dark"] .glass { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); }
.tarjeta { border-radius: 24px; padding: 28px; position: relative; }
@media (max-width: 760px) { .tarjeta { padding: 20px; border-radius: 20px; } }
.seccion { margin-top: 56px; }
@media (max-width: 760px) { .seccion { margin-top: 42px; } }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ───── Tipografía ───── */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--naranjo-tinta); }
.eyebrow svg { width: 16px; height: 16px; }
h1, .h1 { font: 800 clamp(2.3rem, 5.4vw, 4.2rem)/1.04 var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -.025em; margin: 14px 0 16px; text-wrap: balance; }
h1 em, .h1 em { font-style: italic; font-weight: 650; color: var(--azul); position: relative; white-space: nowrap; }
[data-theme="dark"] h1 em { color: var(--accent-text); }
h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.08em; height: .28em; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 13 C40 4 80 18 120 9 S180 6 198 11' stroke='%23f49c4c' stroke-width='6' fill='none' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform-origin: left; animation: trazo 1s .3s var(--ease) both; }
@keyframes trazo { from { transform: scaleX(0); } }
h2 { font: 650 1.65rem/1.2 var(--serif); margin: 0 0 6px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
h2 svg { width: 24px; height: 24px; color: var(--azul); flex: none; }
h3 { font: 650 1.2rem/1.3 var(--serif); margin: 0 0 6px; }
.lede { font-size: 1.12rem; line-height: 1.65; color: var(--text-2); max-width: 60ch; text-wrap: pretty; margin: 0; }
.sub { color: var(--text-2); margin: 0 0 22px; max-width: 64ch; }
.mini { font-size: .86rem; color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.it { font-family: var(--serif); font-style: italic; }

/* ───── Botones ───── */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line-2); background: var(--solid); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: scale(.97); }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); } }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.prim { min-height: 52px; border-radius: 16px; border: 0; color: #fff; padding: 0 22px;
  background: linear-gradient(135deg, var(--azul-2), var(--azul) 45%, var(--azul-hondo));
  box-shadow: 0 14px 30px -12px rgba(4,108,179,.65), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.prim::before { content: ""; position: absolute; right: -20%; top: -60%; width: 70%; height: 160%; background: radial-gradient(circle, rgba(244,156,76,.45), transparent 60%); pointer-events: none; }
.btn.prim::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.36), transparent); transform: skewX(-18deg); pointer-events: none; }
@media (hover: hover) { .btn.prim:hover::after { animation: brillo .85s var(--ease); } }
@keyframes brillo { to { left: 130%; } }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-text); }
.btn.ghost:hover { background: var(--blue-bg); box-shadow: none; }
.btn.chico { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.btn.naranjo { background: linear-gradient(135deg, #f7b06c, var(--naranjo) 50%, #e0802e); color: #2a1503; border: 0; box-shadow: 0 12px 26px -12px rgba(224,128,46,.7); }
.btn.peligro { color: var(--red); }
.onda { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; pointer-events: none; animation: onda .6s var(--ease) forwards; }
.btn.prim .onda, .btn.naranjo .onda { background: #fff; opacity: .35; }
@keyframes onda { to { transform: scale(1); opacity: 0; } }

/* ───── Piezas ───── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--blue-bg); color: var(--accent-text); }
.chip.ok { background: var(--green-bg); color: var(--green); }
.chip.pend { background: var(--amber-bg); color: var(--amber); }
.chip.gris { background: var(--line); color: var(--text-3); }
.chip svg { width: 14px; height: 14px; }
.barra { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--azul), var(--azul-2), var(--naranjo)); transition: width .8s var(--ease); }
.nota { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--blue-bg); color: var(--text-2); font-size: .94rem; }
.nota svg { width: 20px; height: 20px; flex: none; color: var(--accent-text); margin-top: 2px; }
.nota.ambar { background: var(--amber-bg); }
.nota.ambar svg { color: var(--amber); }
label.campo { display: block; font-size: .86rem; font-weight: 600; color: var(--text-2); margin: 16px 0 6px; }
textarea, input[type="text"] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--solid); font-size: 1rem; resize: vertical; }
textarea { min-height: 84px; line-height: 1.5; }
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--azul-2); box-shadow: 0 0 0 4px rgba(10,134,216,.16); }
.lista-limpia { list-style: none; padding: 0; margin: 0; }
.pasos { counter-reset: p; list-style: none; padding: 0; margin: 10px 0 0; }
.pasos li { counter-increment: p; position: relative; padding: 10px 0 10px 44px; border-top: 1px dashed var(--line-2); }
.pasos li:first-child { border-top: 0; }
.pasos li::before { content: counter(p); position: absolute; left: 0; top: 9px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .9rem/1 var(--serif); color: var(--azul); background: var(--blue-bg); }
.etiqueta { font: 700 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }

/* ───── Hero de inicio ───── */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 26px; } }

/* ───── Sello de rango ───── */
.sello { --c1: var(--azul-2); --c2: var(--azul-hondo); width: 150px; height: 150px; flex: none; position: relative; display: grid; place-items: center; text-align: center; }
.sello svg.borde { position: absolute; inset: 0; width: 100%; height: 100%; }
.sello .s-in { position: relative; z-index: 1; color: #fff; padding: 0 12px; }
.sello .s-num { font: 600 .7rem/1 var(--sans); letter-spacing: .2em; opacity: .85; }
.sello .s-it { font: italic 700 calc(1.4rem * var(--k, 1))/1.05 var(--serif); margin: 4px 0 2px; white-space: nowrap; }
.sello .s-es { font: 500 .72rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.sello.actual { --c1: #f7b06c; --c2: #d4711f; }
.sello.actual .s-in { color: #2a1503; }
.sello.bloqueado { --c1: var(--line-2); --c2: var(--line-2); }
.sello.bloqueado .s-in { color: var(--text-3); }
.sello.chico { width: 96px; height: 96px; }
.sello.chico .s-it { font-size: calc(1rem * var(--k, 1)); }
.sello.chico .s-es { font-size: .6rem; }
.sello.grande { width: 200px; height: 200px; }
.sello.grande .s-it { font-size: calc(1.9rem * var(--k, 1)); }
.estampa { animation: estampa .7s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes estampa { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }
.salpica { position: absolute; inset: -30%; pointer-events: none; animation: salpica .8s .25s var(--ease) both; }
@keyframes salpica { from { transform: scale(.4); opacity: 0; } 40% { opacity: .5; } to { transform: scale(1); opacity: 0; } }

/* Tarjeta de rango actual */
.rango-hoy { display: flex; gap: 24px; align-items: center; }
@media (max-width: 520px) { .rango-hoy { flex-direction: column; text-align: center; } .rango-hoy .fila { justify-content: center; } }

/* Ruta */
.ruta { display: grid; gap: 16px; }
.ruta-item { display: flex; gap: 20px; align-items: center; text-decoration: none; color: inherit; transition: transform .25s var(--ease); }
a.ruta-item:hover { transform: translateY(-3px); }
.ruta-item .info { flex: 1; min-width: 0; }
.ruta-item h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ruta-item h3 .tr { font: 500 .95rem var(--sans); color: var(--text-3); }
@media (max-width: 520px) { .ruta-item { gap: 14px; } .ruta-item .sello.chico { width: 80px; height: 80px; } .ruta-item .sello.chico .s-it { font-size: calc(.86rem * var(--k, 1)); } }

/* Retos */
.reto-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .25s var(--ease); }
.reto-card:hover { transform: translateY(-3px); }
.reto-card .n { font: 800 2.2rem/1 var(--serif); color: var(--azul); opacity: .25; }
.reto-card h3 { margin: 0; }

/* Obra */
.obra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .obra { grid-template-columns: 1fr; } }
.marco { border-radius: 18px; overflow: hidden; background: var(--papel); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; padding: 0; width: 100%; }
.marco img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #e9e4d8; }
.credito { font-size: .8rem; color: var(--text-3); margin-top: 10px; line-height: 1.45; }
.ficha-obra details { border-top: 1px solid var(--line); padding: 4px 0; }
.ficha-obra details:first-of-type { border-top: 0; }
.ficha-obra summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 0; font: 650 1.08rem var(--serif); }
.ficha-obra summary::-webkit-details-marker { display: none; }
.ficha-obra summary .dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-bg); color: var(--accent-text); flex: none; }
.ficha-obra summary .dot svg { width: 16px; height: 16px; }
.ficha-obra summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .25s; }
.ficha-obra details[open] summary::after { transform: rotate(-135deg); }
.lectura { margin: 0 0 10px; color: var(--text-2); }
.lectura-de { font-size: .75rem; color: var(--naranjo-tinta); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* Pauta */
.pauta-dim { margin-top: 28px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; }
.item p { margin: 0; }
.item details { margin-top: 6px; font-size: .9rem; color: var(--text-2); }
.item summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: .86rem; }
.ejemplos { display: grid; gap: 8px; margin-top: 8px; }
.ejemplos div { padding: 10px 12px; border-radius: 12px; }
.ejemplos .si { background: var(--green-bg); }
.ejemplos .no { background: var(--red-bg); }
.ejemplos b { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.ejemplos .si b { color: var(--green); }
.ejemplos .no b { color: var(--red); }
.toggle { min-width: 128px; min-height: 44px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: transparent; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; transition: all .2s var(--ease); }
.toggle svg { width: 18px; height: 18px; }
.toggle[aria-pressed="true"] { border: 1.5px solid var(--green); background: var(--green-bg); color: var(--green); }
.toggle:active { transform: scale(.95); }
@media (max-width: 560px) { .item { grid-template-columns: 1fr; } .toggle { width: 100%; } }
.pegajoso { position: sticky; bottom: 84px; z-index: 5; margin-top: 24px; }
@media (min-width: 761px) { .pegajoso { bottom: 16px; } }

/* Foto entregable */
.foto-zona { margin-top: 16px; border: 1.5px dashed var(--line-2); border-radius: 18px; padding: 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.foto-zona img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }

/* Logros */
.logro { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 20px; }
.logro .ic { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, rgba(244,156,76,.25), rgba(4,108,179,.2)); color: var(--accent-text); }
.logro .ic svg { width: 26px; height: 26px; }
.logro.no { opacity: .55; filter: grayscale(1); }
.logro h3 { font-size: 1.02rem; margin: 0; }
.logro p { margin: 2px 0 0; font-size: .86rem; color: var(--text-2); }

/* Galería */
.app-card { display: flex; flex-direction: column; gap: 12px; }
.app-card .app-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font: 800 1.5rem var(--serif); color: #fff; }
.app-card p { margin: 0; color: var(--text-2); flex: 1; }

/* Avisos */
.avisos { position: fixed; z-index: 80; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: grid; gap: 10px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.aviso { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 18px; pointer-events: auto; animation: aviso .42s var(--ease); background: var(--glass-strong); backdrop-filter: blur(20px); border: 1px solid var(--hair); box-shadow: var(--shadow-lg); }
.aviso .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--blue-bg); color: var(--accent-text); }
.aviso.ok .ic { background: var(--green-bg); color: var(--green); }
.aviso.alerta .ic { background: var(--amber-bg); color: var(--amber); }
.aviso.error .ic { background: var(--red-bg); color: var(--red); }
.aviso .ic svg { width: 18px; height: 18px; }
.aviso b { display: block; font-size: .95rem; }
.aviso span { font-size: .86rem; color: var(--text-2); }
.aviso.fuera { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes aviso { from { opacity: 0; transform: translateY(-14px) scale(.97); } }

/* Modal / hoja */
.velo { position: fixed; inset: 0; z-index: 60; background: rgba(8,12,20,.45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 28px; padding: 28px; background: var(--glass-strong); backdrop-filter: blur(24px); border: 1px solid var(--hair); box-shadow: var(--shadow-lg); animation: pop .35s var(--ease); position: relative; }
.modal.ancho { width: min(980px, 100%); padding: 14px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@media (max-width: 560px) {
  .velo { place-items: end center; padding: 0; }
  .modal { border-radius: 26px 26px 0 0; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); max-height: 90vh; animation: hoja .38s var(--ease); }
  @keyframes hoja { from { transform: translateY(100%); } }
}
.cerrar { position: absolute; top: 12px; right: 12px; }
.resultado { text-align: center; }
.resultado .sello { margin: 10px auto 18px; }
.pct { font: 800 3rem/1 var(--serif); color: var(--azul); }
[data-theme="dark"] .pct { color: var(--accent-text); }
.donar { margin-top: 22px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); font-size: .92rem; color: var(--text-2); }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--line); gap: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--text-2); min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--solid); color: var(--accent-text); box-shadow: var(--shadow); }

/* Easter eggs */
.tinta-gota { position: fixed; z-index: 90; pointer-events: none; width: 160px; height: 160px; color: var(--tinta); animation: gota 1.4s var(--ease) forwards; }
@keyframes gota { 0% { transform: scale(.2); opacity: .9; } 30% { transform: scale(1.1); } 100% { transform: scale(1.2); opacity: 0; } }
.ola-pasa { position: fixed; z-index: 90; left: -60vw; bottom: 0; width: 60vw; max-width: 700px; pointer-events: none; color: var(--azul); opacity: .5; animation: ola 2.6s var(--ease) forwards; }
@keyframes ola { to { left: 110vw; } }

/* Ficha impresión */
.solo-imprimir { display: none; }
@media print {
  @page { size: letter; margin: 18mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .fondo, .grain, .top, .tabbar, .avisos, .no-imprimir, .velo { display: none !important; }
  main { padding: 0; max-width: none; }
  .glass { background: none; box-shadow: none; border: 1px solid #ccc; backdrop-filter: none; }
  .solo-imprimir { display: block; }
  textarea { border: 0; padding: 0; min-height: 0; resize: none; }
  .vista { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .blob { display: none; }
}
.tema-anim, .tema-anim * { transition: background-color .55s, color .55s, border-color .55s !important; }

/* ───── Tutorial con voz ───── */
.tut { position: fixed; z-index: 45; left: 20px; bottom: 20px; width: min(410px, calc(100vw - 40px)); display: grid; gap: 16px; padding: 22px; border-radius: 26px;
  background: var(--glass-strong); backdrop-filter: blur(28px) saturate(1.7); -webkit-backdrop-filter: blur(28px) saturate(1.7);
  border: 1px solid var(--hair); box-shadow: var(--shadow-lg); animation: tut-in .45s var(--ease) both; max-height: calc(100vh - 40px); overflow-y: auto; }
.tut.out { animation: tut-out .28s ease-in both; }
@keyframes tut-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes tut-out { to { opacity: 0; transform: translateY(16px); } }
.tut-head { display: flex; align-items: center; gap: 12px; }
.tut-head > div { flex: 1; min-width: 0; }
.tut-head b { display: block; font-size: .95rem; }
.tut-head small { display: block; font-size: .8rem; color: var(--text-3); }
.tut .ico-btn { width: 40px; height: 40px; }
.tut .ico-btn:disabled { opacity: .35; pointer-events: none; }
.tut-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; color: #fff; font: 600 1.2rem var(--serif);
  background: linear-gradient(135deg, var(--naranjo), #e0873a 40%, var(--azul)); box-shadow: 0 6px 16px -6px rgba(244,156,76,.7); }
.tut-titulo { font: 600 1.5rem/1.2 var(--serif); letter-spacing: -.01em; margin: 0; }
.tut-texto { margin: 0; max-height: 132px; overflow-y: auto; font-size: .92rem; line-height: 1.65; color: var(--text-2); padding-right: 4px; text-wrap: pretty; }
.tut-barra { height: 8px; border-radius: 99px; background: var(--line); cursor: pointer; overflow: hidden; }
.tut-barra i, .tut-mini i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--azul), var(--azul-2) 70%, var(--naranjo)); }
.tut-tiempos { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tut-controles { display: flex; align-items: center; justify-content: center; gap: 22px; }
.tut-play { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 0; color: #fff; flex: none; cursor: pointer;
  background: linear-gradient(135deg, var(--azul-2), var(--azul) 55%, var(--azul-hondo)); box-shadow: 0 12px 26px -10px rgba(4,108,179,.75), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s; }
.tut-play:active { transform: scale(.94); }
.tut-play svg { width: 24px; height: 24px; }
.tut-caps { display: flex; flex-wrap: wrap; gap: 6px; }
.tut-caps button { border: 1px solid var(--line); background: var(--solid); color: var(--text-2); border-radius: 99px; padding: 5px 12px; font: 500 .8rem var(--sans); cursor: pointer; }
.tut-caps button.on { border-color: var(--azul); background: var(--blue-bg); color: var(--accent-text); font-weight: 600; }
.tut-fin { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--green-bg); font-size: .9rem; }
.tut-fin svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--green); }
.tut-guiar { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--text-2); cursor: pointer; }
.tut-guiar input { width: 18px; height: 18px; accent-color: var(--azul); }
.tut.min { grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; width: min(370px, calc(100vw - 40px)); padding: 10px 12px 10px 10px; border-radius: 22px; }
.tut.min .tut-play { width: 46px; height: 46px; }
.tut.min .tut-play svg { width: 18px; height: 18px; }
.tut-mini-info { display: grid; gap: 7px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.tut-mini-info b { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tut-mini { display: block; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
@media (max-width: 760px) {
  .tut, .tut.min { left: 12px; right: 12px; width: auto; bottom: calc(92px + env(safe-area-inset-bottom)); }
  .tut { padding: 18px; gap: 14px; max-height: 64vh; }
  .tut-texto { max-height: 92px; }
  .tut .tut-caps { display: none; }
}
@media print { .tut { display: none !important; } }
