/* ============================================================
   EmoLab Creativo — Hoja de estilos compartida
   Estética flat, limpia, sin gradientes ni sombras decorativas.
   ============================================================ */

/* Tipografías: Fredoka (títulos, divertida y redondeada) +
   Nunito (textos, redonda y muy legible para primaria) */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;500;600;700&display=swap');

:root {
  /* Marca */
  --color-emo: #D4537E;
  --color-lab: #7F77DD;
  --color-creativo: #1D9E75;

  /* Módulos */
  --mod-quesiento: #D4537E;
  --mod-explorar: #7F77DD;
  --mod-crear: #1D9E75;
  --mod-autoeval: #378ADD;

  /* Azul de marca (banda hero): botones y títulos */
  --azul: #4f1bb7;
  --azul-dark: #3f1494;

  /* Neutros */
  --bg: #e4d9f1;
  --surface: #FFFFFF;
  --ink: #2A2A30;
  --ink-soft: #61616B;
  --line: #E6E6EB;
  --line-strong: #D5D5DC;

  /* Forma */
  --radius-card: 16px;
  --radius-pill: 99px;
  --font-title: "Fredoka", system-ui, sans-serif;            /* títulos: divertida */
  --font-main: "Nunito", system-ui, -apple-system, sans-serif; /* textos: redonda y clara */
}

* { box-sizing: border-box; }

/* Base más grande para que todo (en rem) crezca de forma proporcional */
html { font-size: 19px; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body { font-size: 1.08rem; }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600; margin: 0 0 .4em; line-height: 1.2;
  letter-spacing: .01em; color: var(--azul);
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 .8em; }
a { color: inherit; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 18px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 60px; padding: 4px 0 0;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; height: 168px; overflow: hidden; }
.logo-img { height: 225px; width: auto; display: block; }
.topbar .spacer { flex: 1; }
.logo-junta { height: 78px; width: auto; display: block; flex: none; }

/* Botón de icono (pantalla completa) — flotante abajo a la derecha */
.iconbtn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--ink-soft);
  border-radius: var(--radius-pill); padding: 9px 16px; cursor: pointer;
  font-family: var(--font-title); font-weight: 600; font-size: .98rem;
  transition: border-color .15s, background .15s, transform .1s;
}
.iconbtn:hover { border-color: var(--ink-soft); color: var(--ink); }
.iconbtn:active { transform: scale(.96); }
.iconbtn .ico { font-size: 1.2rem; line-height: 1; }

.fab-full {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  background: var(--surface);
}

/* Pestaña lateral "VOLVER" (estilo tab.css con raíces curvas) */
.volver-tab {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%) translateZ(0);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  height: 135px; width: 48px;
  background-color: #0099FF; color: #fff; text-decoration: none;
  border-radius: 0 18px 18px 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px; font-weight: 700; text-transform: uppercase;
  writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: 2px;
  transition: width 0.2s ease-out;
}
.volver-tab:hover { width: 58px; }
/* Raíces que unen la pestaña con los bordes (máscaras SVG) */
.volver-tab::before, .volver-tab::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 20px;
  background-color: #0099FF; pointer-events: none;
}
.volver-tab::before {
  bottom: 100%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 20 L0 0 Q 0 20 20 20 Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 20 L0 0 Q 0 20 20 20 Z' fill='black'/%3E%3C/svg%3E");
}
.volver-tab::after {
  top: 100%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0 L0 20 Q 0 0 20 0 Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 0 L0 20 Q 0 0 20 0 Z' fill='black'/%3E%3C/svg%3E");
}

.xp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 7px 15px; font-size: 1rem; color: var(--ink-soft);
  background: var(--bg);
}
.xp-pill b { color: var(--ink); font-weight: 700; }

.avatar {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  background: var(--color-lab); color: #fff;
  display: grid; place-items: center; font-size: 1rem; font-weight: 600;
}

/* ---------- Banda hero (bajo la cabecera) ---------- */
.hero-band { color: #fff; }
.hero-inner { display: flex; align-items: center; gap: 24px; min-height: 200px; padding: 20px 0; }
.hero-text { flex: 1; min-width: 0; }
.hero-title { color: #fff; font-size: 2.5rem; margin: 0 0 14px; }
.hero-speech { display: flex; }
.hero-speech .bubble {
  position: relative; background: #fff; color: var(--ink);
  border-radius: 16px; padding: 15px 19px; font-size: 1.2rem; line-height: 1.5;
  max-width: 56ch; min-height: 1.5em;
}
.hero-speech .bubble::after {
  content: ""; position: absolute; right: -9px; top: 26px;
  border: 9px solid transparent; border-right: none; border-left-color: #fff;
}
.caret { display: inline-block; margin-left: 1px; color: var(--color-lab); animation: blink 1s step-end infinite; }
.caret.done { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.hero-chars { height: 290px; width: auto; flex: none; display: block; }

/* ---------- Portada (entrada, pide el nombre) ---------- */
.portada-body { background: var(--bg); }
.portada {
  max-width: 1120px; margin: 0 auto; min-height: 100vh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; padding: 18px; color: var(--ink);
}
.portada-img { width: min(1040px, 94%); }
.portada-img img { width: 100%; height: auto; display: block; border-radius: var(--radius-card); }
.portada-welcome { font-size: 1.05rem; font-weight: 400; line-height: 1.4; color: var(--ink-soft); max-width: 66ch; margin: 0; }
.portada-welcome b { color: var(--ink); font-weight: 700; }
.portada-sub { color: var(--azul); font-size: 1.4rem; font-weight: 700; line-height: 1.3; max-width: 42ch; margin: 2px 0; }
.portada-form { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.portada-form input {
  font-family: var(--font-main); font-size: 1.35rem; font-weight: 600;
  padding: 15px 22px; border-radius: var(--radius-pill); border: 2px solid var(--color-lab);
  background: #fff; color: var(--ink); min-width: 260px; text-align: center;
}
.portada-form input:focus { outline: 3px solid var(--color-lab); outline-offset: 2px; }
.portada-form input.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* ---------- Botón volver / back link ---------- */
.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 18px 0 6px; color: var(--ink-soft);
  text-decoration: none; font-size: 1.05rem; font-weight: 600;
}
.backlink:hover { color: var(--ink); }

/* ---------- Page header de módulo ---------- */
.page-head { padding: 14px 0 6px; }
.page-head .eyebrow {
  font-family: var(--font-title);
  font-size: 1rem; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; color: var(--ink-soft); margin-bottom: 4px;
}
.page-head h1 { margin-bottom: .15em; }
.page-head p { color: var(--ink-soft); margin: 0; font-size: 1.12rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-pill); padding: 14px 26px;
  font-family: var(--font-title); font-size: 1.12rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, opacity .15s, transform .1s;
}
.btn:hover { background: var(--bg); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--azul); color: #fff; border-color: var(--azul); }
.btn-primary:hover { background: var(--azul-dark); border-color: var(--azul-dark); }
.btn-accent { color: #fff; border: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 32px; font-size: 1.25rem; }
.btn-sm { padding: 9px 18px; font-size: 1rem; }

/* ---------- Chips de emoción ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 11px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-pill); padding: 11px 20px;
  font-family: inherit; font-size: 1.08rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.chip .emoji { font-size: 1.3rem; }
.chip:hover { border-color: var(--ink-soft); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] {
  border-color: transparent; color: #fff;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: .9rem; font-weight: 700;
  border-radius: var(--radius-pill); padding: 4px 13px;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  background: var(--bg);
}
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Gotita en círculo (icono ilustrativo) ---------- */
.gotita-badge { width: 2.4em; height: 2.4em; object-fit: contain; vertical-align: middle; flex: none; }
h1 .gotita-badge, h2 .gotita-badge, h3 .gotita-badge { margin-right: 12px; vertical-align: -0.7em; }

/* ---------- Personaje "gota" (imágenes PNG) ---------- */
.gota-img { display: block; object-fit: contain; flex: none; }
.gota-img.sm { width: 30px; height: 30px; }
.gota-img.md { width: 84px; height: 84px; }
.gota-img.lg { width: 104px; height: 104px; }

/* ---------- Cards genéricas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 18px;
}

/* ---------- Grid de módulos (home) ---------- */
.modgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0; }
.modcard {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 18px;
  transition: border-color .15s, transform .12s;
}
.modcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.modcard .ico {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 12px;
}
.modcard h3 { margin-bottom: 4px; }
.modcard p { color: var(--ink-soft); font-size: 1.02rem; margin: 0 0 12px; }
.modcard .status { font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 10px; }
.hero h1 { font-size: 2.6rem; margin-bottom: .2em; }
.hero .lead { color: var(--ink-soft); font-size: 1.2rem; max-width: 40ch; }

/* ---------- Barra de progreso ---------- */
.progress { margin: 6px 0; }
.progress .track {
  height: 12px; border-radius: var(--radius-pill);
  background: var(--line); overflow: hidden;
}
.progress .fill { height: 100%; border-radius: var(--radius-pill); transition: width .4s ease; }
.progress .label { font-size: 1rem; font-weight: 600; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Racha (fuegos) ---------- */
.streak { display: flex; align-items: center; gap: 5px; font-size: 1.5rem; }
.streak .off { filter: grayscale(1); opacity: .3; }

/* ---------- Termómetro ---------- */
.thermo-wrap { display: flex; gap: 22px; align-items: stretch; }
.thermo {
  position: relative; width: 56px; min-height: 220px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: var(--bg); cursor: pointer; overflow: hidden; flex: none;
  touch-action: none;
}
.thermo .level {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-pill);
  transition: height .08s linear, background .2s;
}
.thermo-side { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.thermo-value { font-family: var(--font-title); font-size: 3.4rem; font-weight: 600; line-height: 1; }
.thermo-caption { font-size: 1.15rem; font-weight: 600; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Tarjetas flip (Explorar) ---------- */
.cardgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flip {
  perspective: 1000px; background: transparent; border: none; padding: 0;
  height: 340px; cursor: pointer; font-family: inherit;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1.5px solid var(--line); border-radius: var(--radius-card);
  padding: 16px; display: flex; flex-direction: column; text-align: left;
  background: var(--surface); overflow: hidden;
}
.flip-front { align-items: flex-start; justify-content: center; gap: 9px; }
.flip-front .gota-img, .flip-front .big-ico { align-self: center; }
.flip-front .big-ico { font-size: 3.4rem; }
.flip-front .name { font-family: var(--font-title); font-size: 1.35rem; font-weight: 600; }
.flip-recipe {
  font-size: 1.15rem; margin-top: 4px; letter-spacing: .04em;
}
.flip-cta {
  display: inline-flex; align-items: center; gap: 6px; align-self: stretch;
  justify-content: center; margin-top: 10px;
  font-family: var(--font-title); font-size: .95rem; font-weight: 600;
  color: #fff; border-radius: var(--radius-pill); padding: 9px 14px;
}
.flip.is-flipped .flip-cta { opacity: .85; }
.flip-back { transform: rotateY(180deg); }
.flip-back { justify-content: center; gap: 6px; overflow-y: auto; }
.flip-back h3 { font-size: 1.1rem; margin-bottom: 2px; }
.flip-back .desc { font-size: .9rem; line-height: 1.4; color: var(--ink-soft); margin: 0; }
.flip-back .mezcla {
  font-size: .85rem; border-radius: 10px; padding: 6px 9px; margin: 0;
  border: 1px dashed var(--line-strong); color: var(--ink);
}
.flip-back .mezcla b { font-weight: 700; }
.flip-back .tip {
  font-size: .88rem; line-height: 1.4; border-radius: 12px; padding: 8px 10px; margin: 0;
  border: 1px solid var(--line);
}
.flip-back .tip b { font-weight: 700; }
.flip .check {
  position: absolute; top: 10px; right: 12px; font-size: 1.1rem;
}

/* ---------- Filtros (tabs / pills) ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filterbar .chip[aria-pressed="true"] { background: var(--color-lab); border-color: transparent; }

/* ---------- Crear: actividad ---------- */
.emo-banner {
  display: flex; align-items: center; gap: 16px;
  border-radius: var(--radius-card); padding: 18px; border: 1px solid var(--line);
}
.emo-banner .big-ico { font-size: 3.4rem; }
.emo-banner h2 { margin: 0 0 4px; }
.emo-banner p { margin: 0 0 8px; color: var(--ink-soft); font-size: 1.08rem; }

.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.act-card {
  text-align: left; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius-card); padding: 18px; cursor: pointer; font-family: inherit;
  transition: border-color .15s, transform .12s, box-shadow .15s; color: inherit;
  display: flex; flex-direction: column;
}
.act-card:hover { transform: translateY(-3px); }
.act-card.active { border-width: 2px; }
.act-card .ico { font-size: 2.2rem; }
.act-ico-img { width: 54px; height: 54px; object-fit: contain; display: block; }
.act-panel-ico { width: 46px; height: 46px; object-fit: contain; display: block; flex: none; }
.act-card .name { font-family: var(--font-title); font-size: 1.2rem; font-weight: 600; margin: 8px 0 4px; }
.act-card .desc { font-size: 1rem; color: var(--ink-soft); margin: 0 0 12px; }
/* CTA dentro de cada tarjeta de actividad: deja claro que se puede pulsar */
.act-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: auto; align-self: flex-start;
  font-family: var(--font-title); font-size: 1.02rem; font-weight: 600;
  color: #fff; border-radius: var(--radius-pill); padding: 10px 18px;
}

.act-panel { margin-top: 18px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 12px 0; }
.steps li {
  counter-increment: s; position: relative; padding: 13px 0 13px 50px;
  border-bottom: 1px solid var(--line); font-size: 1.1rem;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 11px;
  width: 34px; height: 34px; border-radius: var(--radius-pill);
  display: grid; place-items: center; font-size: 1.05rem; color: #fff; font-weight: 700;
  font-family: var(--font-title); background: var(--step-c, var(--ink));
}
.reflect {
  border-radius: 14px; padding: 16px 18px; margin: 16px 0;
  border: 1px solid var(--line);
}
.reflect .q { font-style: italic; font-size: 1.12rem; }
.foot-note { font-size: 1rem; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Autoevaluación ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin: 16px 0; padding-bottom: 4px; }
.tab {
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-pill); padding: 8px 13px; cursor: pointer;
  font-family: var(--font-title); font-weight: 600; font-size: .85rem;
  display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; flex: none;
}
.tab[aria-selected="true"] { background: var(--mod-autoeval); color: #fff; border-color: transparent; }
.tab .done { color: var(--color-creativo); }
.tab[aria-selected="true"] .done { color: #fff; }

.q-card { margin-top: 8px; }
.options { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.option {
  text-align: left; border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 14px; padding: 16px 18px; cursor: pointer; font-family: inherit;
  font-size: 1.1rem; transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: var(--ink-soft); }
.option:active { transform: scale(.99); }
.option.correct { border-color: var(--color-creativo); background: #EAF7F1; }
.option.wrong { border-color: #C75B3C; background: #FBECE6; }

.feedback {
  border-radius: 14px; padding: 15px 18px; margin-top: 14px;
  border: 1px solid var(--line); font-size: 1.08rem;
}
.feedback.ok { border-color: var(--color-creativo); background: #EAF7F1; }
.feedback.info { border-color: var(--mod-autoeval); background: #E9F2FC; }

/* Drag & drop ordenar */
.sortlist { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.sortlist li {
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 14px; padding: 15px 16px; cursor: grab; font-size: 1.08rem;
  display: flex; align-items: center; gap: 12px;
}
.sortlist li.dragging { opacity: .4; }
.sortlist li.ok { border-color: var(--color-creativo); background: #EAF7F1; }
.sortlist li.no { border-color: #C75B3C; background: #FBECE6; }
.sortlist li .grip { color: var(--ink-soft); cursor: grab; font-size: 1.3rem; }

/* Emparejar */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match .col { display: flex; flex-direction: column; gap: 12px; }
.match .col h4 { font-family: var(--font-title); color: var(--ink-soft); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.match-item {
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 14px; padding: 15px 16px; cursor: pointer; font-family: inherit;
  font-size: 1.05rem; text-align: left; transition: border-color .15s, background .15s;
}
.match-item.sel { border-color: var(--mod-autoeval); background: #E9F2FC; }
.match-item.ok { border-color: var(--color-creativo); background: #EAF7F1; cursor: default; }
.match-item.flash-no { animation: flashNo .5s; }
@keyframes flashNo {
  0%, 100% { border-color: var(--line-strong); background: var(--surface); }
  30%, 70% { border-color: #C75B3C; background: #FBECE6; }
}

/* Likert */
.likert { display: flex; flex-direction: column; gap: 20px; margin: 16px 0; }
.likert .stmt { font-size: 1.12rem; font-weight: 600; margin-bottom: 10px; }
.likert .scale { display: flex; gap: 10px; flex-wrap: wrap; }
.likert .scale .chip[aria-pressed="true"] { background: var(--mod-autoeval); border-color: transparent; }

/* ---------- Resultados ---------- */
.result-xp { font-family: var(--font-title); font-size: 4rem; font-weight: 700; color: var(--mod-autoeval); }
.medals { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; justify-content: center; }

/* Logros del inicio: siempre en una fila (6 columnas) */
.logros-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.logros-grid .medal { width: auto; padding: 12px 8px; }
.logros-grid .medal .m-name { font-size: .82rem; line-height: 1.15; margin-top: 6px; }
.medal {
  border: 1.5px solid var(--line); border-radius: var(--radius-card);
  padding: 16px; text-align: center; width: 150px;
}
.medal.locked { opacity: .35; }
.medal .m-ico { font-size: 2.6rem; }
.medal .m-name { font-family: var(--font-title); font-size: 1.02rem; font-weight: 600; margin-top: 8px; }

/* ---------- Toast XP ---------- */
.toast-zone {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; border-radius: var(--radius-pill);
  padding: 13px 22px; font-size: 1.1rem; font-weight: 700; font-family: var(--font-title);
  animation: toastIn .25s ease, toastOut .3s ease 2.2s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Secciones ---------- */
.section { margin: 26px 0; }
.section > h2 { margin-bottom: 12px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  html { font-size: 18px; }
  .modgrid, .act-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .thermo-wrap { gap: 16px; }
  .logo-img { height: 135px; }
  .logo-junta { height: 54px; }
  .cardgrid { grid-template-columns: 1fr; }
  .iconbtn span:not(.ico) { display: none; } /* botón compacto en móvil */
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 14px; }
  .hero-chars { height: 160px; }
  .hero-title { font-size: 2rem; }
  .hero-speech { justify-content: center; }
  .hero-speech .bubble::after { display: none; }
  .portada-title { font-size: 2.1rem; }
  .logros-grid { grid-template-columns: repeat(3, 1fr); }
}
