/* Aula Contigo — demo app */
body { min-height: 100dvh; background: var(--cream) radial-gradient(120% 60% at 100% 0%, var(--aqua-soft), transparent 60%); }
main { outline: none; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgb(248 243 230 / .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__word { font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand__word .script { font-size: 1.6rem; margin-left: 1px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who__face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--paper); border: 2px solid var(--line); flex: none; }
.who__face svg { width: 100%; height: 100%; transform: translateY(6px) scale(1.25); }
.who__txt { display: grid; line-height: 1.2; min-width: 0; }
.who__txt b { font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__txt small { font-size: .75rem; color: var(--ink-mut); }
@media (max-width: 640px) {
  .top:has(.who:not([hidden])) .brand__word { display: none; }
  .who__swap span { display: none; }
  .who__swap { padding: 7px 10px; }
}
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; flex: none;
  transition: background-color 140ms var(--ease-snap);
}
.icon-btn:hover { background: var(--sage-soft); }
.icon-btn[aria-pressed="false"] { color: var(--ink-mut); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100;
  max-width: min(480px, calc(100% - 32px)); padding: 12px 18px 13px; border-radius: 16px;
  background: var(--ink); color: var(--cream); font-weight: 700; box-shadow: var(--shadow-3);
  animation: rise 300ms var(--ease-out);
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

.linkish { background: none; border: 0; padding: 6px 4px; color: var(--leaf-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.muted { color: var(--ink-mut); }
.small { font-size: .875rem; }
.chip {
  display: inline-flex; align-items: center; padding: 7px 14px 8px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--paper); font-weight: 700; font-size: .9375rem;
  cursor: pointer; transition: background-color 140ms var(--ease-snap), border-color 140ms var(--ease-snap);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip--static { cursor: default; background: var(--sage-soft); border-color: transparent; font-size: .875rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 2px 9px 3px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: color-mix(in srgb, var(--tag) 45%, var(--paper)); color: var(--ink); }
.tag--oa { --tag: var(--lilac); }

/* ---------- Entry ---------- */
.entry { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) 20px 64px; }
.entry__head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.02; margin: 8px 0 12px; }
.entry__head p:not(.overline) { color: var(--ink-mut); max-width: 56ch; font-size: 1.125rem; }
.case-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.case-pick > span { font-weight: 800; margin-right: 4px; }
.case-line { margin-top: 12px; color: var(--ink-mut); max-width: 70ch; }
.case-line b { color: var(--ink); }
.roles { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 760px) { .roles { grid-template-columns: 1fr 1fr; } }
.role {
  display: grid; grid-template-columns: 96px 1fr 24px; align-items: center; gap: 16px;
  padding: 12px 18px 12px 12px; border-radius: 28px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper); box-shadow: var(--shadow-1);
  transition: transform 90ms var(--ease-snap), box-shadow 180ms var(--ease-out), border-color 140ms var(--ease-snap);
}
.role:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.role:active { transform: scale(.99); }
.role__art { width: 96px; height: 96px; border-radius: 22px; overflow: hidden; display: block; }
.role__art svg { width: 100%; height: 100%; transform: translateY(8px); }
.role--estudiante .role__art { background: var(--mustard-soft); }
.role--familia .role__art { background: #efe6f8; }
.role--cuidador .role__art { background: var(--aqua-soft); }
.role--docente .role__art { background: var(--coral-soft); }
.role__txt { display: grid; gap: 2px; }
.role__txt small { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--coral-ink); }
.role__txt b { font-size: 1.25rem; line-height: 1.2; }
.role__txt span { color: var(--ink-mut); font-size: .9375rem; line-height: 1.45; }
.role__go { width: 22px; height: 22px; color: var(--ink-mut); }
.entry__foot { margin-top: 28px; display: flex; gap: 10px; align-items: center; color: var(--ink-mut); }

/* ---------- Kid screens ---------- */
.kid { max-width: 640px; margin: 0 auto; padding: 24px 18px 56px; }
.guide { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: end; margin-bottom: 22px; }
.guide--small { grid-template-columns: 84px 1fr; }
.guide__avatar { position: relative; width: 132px; height: 150px; border-radius: 24px; overflow: hidden; background: var(--cream-2); border: 3px solid var(--paper); box-shadow: var(--shadow-2); }
.guide--small .guide__avatar { width: 84px; height: 98px; border-radius: 18px; }
.guide__avatar svg { width: 100%; height: 100%; }
/* Teacher clips are cropped by the generator: the framed card hides the cut. */
.guide__poster, .guide__avatar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.guide__avatar video { opacity: 0; transition: opacity 160ms; }
.guide__avatar.is-talking video, .guide__avatar.is-playing video { opacity: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px) rotate(-1deg); } }

.is-talking .person .mouth-closed { opacity: 0; }
.is-talking .person .mouth-open { animation: talk 260ms steps(2) infinite; }
@keyframes talk { 0% { opacity: 1; } 100% { opacity: .15; } }
.guide__bubble {
  position: relative; padding: 16px 48px 18px 18px; border-radius: 24px 24px 24px 6px;
  background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow-1);
  font-size: 1.1875rem; font-weight: 700; line-height: 1.4; margin-bottom: 26px;
}
.guide__again { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--sage-soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; }

.pick {
  position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center;
  padding: 10px 16px 10px 10px; border-radius: 26px; text-decoration: none; color: var(--ink);
  background: var(--mustard-soft); border: 2px solid var(--mustard); box-shadow: var(--shadow-2);
  transition: transform 90ms var(--ease-snap);
}
.pick:active { transform: scale(.99); }
.pick .thumb { width: 132px; height: 84px; border-radius: 16px; }
.pick__txt { display: grid; gap: 2px; }
.pick__txt b { font-size: 1.1875rem; line-height: 1.25; }
.pick__txt small { color: var(--ink-2); font-weight: 600; }
.pick__badge { position: absolute; top: -12px; left: 18px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px 4px 9px; border-radius: 999px; background: var(--ink); color: var(--mustard); font-weight: 800; font-size: .8125rem; }
.pick__badge .icon { width: 15px; height: 15px; fill: var(--mustard); stroke: none; }

.kid__h { font-size: 1.375rem; margin: 30px 0 12px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: grid; gap: 8px; padding: 8px 8px 14px; border-radius: 24px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform 90ms var(--ease-snap), box-shadow 180ms var(--ease-out);
}
.tile:hover { box-shadow: var(--shadow-2); }
.tile:active { transform: scale(.985); }
.tile .thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 18px; }
.tile > span { display: grid; padding: 0 8px; line-height: 1.25; }
.tile b { font-size: 1.125rem; }
.tile small { color: var(--ink-mut); font-weight: 600; }
.kid__link { display: inline-block; margin-top: 22px; font-weight: 700; }
.kid__note { margin-top: 22px; font-size: .875rem; color: var(--ink-mut); text-align: center; }
.btn--big { min-height: 60px; padding: 14px 32px 15px; font-size: 1.125rem; }

.interests { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 22px; }
.interest {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px;
  border-radius: 22px; border: 2px solid var(--line); background: var(--paper); cursor: pointer;
  font-weight: 800; font-size: 1.0625rem;
  transition: border-color 140ms var(--ease-snap), background-color 140ms var(--ease-snap), transform 90ms var(--ease-snap);
}
.interest svg:first-child { width: 64px; height: 64px; }
.interest:active { transform: scale(.97); }
.interest[aria-pressed="true"] { border-color: var(--leaf); background: var(--sage-soft); }
.interest__ok { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--leaf); color: var(--paper); opacity: 0; stroke-width: 2.4; }
.interest[aria-pressed="true"] .interest__ok { opacity: 1; }
.kid > .btn--big { display: flex; width: 100%; }

.feel { text-align: center; }
.faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.facebtn, .likebtn {
  display: grid; justify-items: center; gap: 6px; padding: 12px 4px 12px; border-radius: 22px;
  border: 2px solid var(--line); background: var(--paper); cursor: pointer; font-weight: 800;
  transition: transform 120ms var(--ease-snap), border-color 140ms var(--ease-snap);
}
.facebtn:hover, .likebtn:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.facebtn:active, .likebtn:active { transform: scale(.96); }
.facebtn .face { width: 64px; height: 60px; }
.feel .linkish { margin-top: 14px; }
.likes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.likebtn svg { width: 54px; height: 54px; }
.row-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 420px) { .faces { grid-template-columns: 1fr 1fr; } }

.kid--rest { display: grid; justify-items: center; text-align: left; }
.kid--rest .guide { width: 100%; margin-top: 18px; }
.breath { width: 190px; height: 190px; display: grid; place-items: center; margin-top: 18px; }
.breath span { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fffcf5, var(--aqua)); box-shadow: 0 0 0 18px rgb(182 223 223 / .45), 0 0 0 36px rgb(182 223 223 / .22); animation: breathe 8s var(--ease-out) infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.82); } 45%, 55% { transform: scale(1.12); } }

/* ---------- Playing ---------- */
.playing { max-width: 720px; margin: 0 auto; padding: 18px 18px 56px; }
.playing__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.playing__head small { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--coral-ink); }
.playing__head h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.02em; }
.play-hint { color: var(--ink-mut); text-align: center; margin: 10px 0; font-weight: 600; }
.play-done { display: flex; margin: 16px auto 0; min-width: 200px; }

.mandala__art { width: min(100%, 440px); margin: 0 auto; touch-action: none; cursor: crosshair; filter: drop-shadow(0 6px 12px rgb(61 82 50 / .1)); }
.mandala__art .part { transition: fill 120ms var(--ease-snap); }
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.swatch { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--paper); background: var(--c); box-shadow: 0 0 0 1.5px var(--line-strong); cursor: pointer; transition: transform 120ms var(--ease-snap); }
.swatch[aria-checked="true"] { transform: scale(1.15); box-shadow: 0 0 0 3px var(--ink); }

.memory__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; perspective: 800px; }
.card { aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; }
.card__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 380ms var(--ease-out); }
.card.is-open .card__inner { transform: rotateY(180deg); }
.card__back, .card__front { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; box-shadow: var(--shadow-1); }
.card__back { background: var(--leaf); border: 3px solid var(--paper); }
.card__back svg { width: 50%; }
.card__front { background: var(--paper); border: 2px solid var(--line-strong); transform: rotateY(180deg); }
.card__front svg { width: 72%; }
.card.is-matched .card__front { border-color: var(--leaf); background: var(--sage-soft); }
.memory__count { text-align: center; margin-top: 12px; color: var(--ink-mut); }

.story { max-width: 620px; margin: 0 auto; }
.story__page svg { width: 100%; height: auto; border-radius: 24px; box-shadow: var(--shadow-2); }
.story__text { font-size: 1.375rem; font-weight: 800; text-align: center; margin: 18px 0; line-height: 1.35; }
.story__nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.story__dots { display: flex; gap: 6px; }
.story__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.story__dots i.on { background: var(--coral); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slots li { display: grid; gap: 6px; text-align: center; font-weight: 800; font-size: .875rem; }
.slot { aspect-ratio: 16 / 11; padding: 0; border-radius: 14px; overflow: hidden; border: 2px dashed var(--line-strong); background: var(--paper); cursor: pointer; }
.slot.is-next { border-color: var(--coral); background: var(--coral-soft); }
.slot.is-filled { border: 2px solid var(--ink); }
.slot svg, .tray__scene svg { width: 100%; height: 100%; }
.tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.tray__scene { aspect-ratio: 16 / 11; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-2); transition: transform 120ms var(--ease-snap); }
.tray__scene:hover { transform: translateY(-2px) rotate(-1deg); }
.tray__scene.is-used { visibility: hidden; }
.bubble { margin-top: 16px; padding: 16px 18px 18px; border-radius: 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.bubble--ok { background: var(--sage-soft); }
.bubble--try { background: var(--mustard-soft); }
.finals { display: grid; gap: 10px; }
.final { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--paper); text-align: left; font-weight: 800; font-size: 1.0625rem; cursor: pointer; box-shadow: var(--shadow-1); }
.final svg { width: 130px; height: 89px; border-radius: 12px; }
.final__q { width: 130px; height: 89px; border-radius: 12px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-ink); font-family: var(--script); font-size: 3rem; border: 2px dashed var(--coral); }

.video__frame { aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow-2); }
.video__frame iframe { width: 100%; height: 100%; border: 0; }
.video__frame--empty { aspect-ratio: auto; display: grid; grid-template-columns: minmax(0, 1.1fr) 1fr; align-items: center; gap: 18px; padding: 18px 24px; color: var(--cream); background: var(--ink-2); }
.video__loop { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--cream-2); }
.offline { padding: 24px; border-radius: 22px; background: var(--paper); border: 1.5px dashed var(--line-strong); display: grid; gap: 10px; text-align: center; }

/* ---------- Pages (family, caregiver, teacher) ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) 20px 72px; }
.page__head { margin-bottom: 20px; }
.page__head h1 { font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.028em; line-height: 1.05; margin: 6px 0 8px; }
.page__head p:not(.overline) { color: var(--ink-mut); font-size: 1.0625rem; }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: 26px; padding: 20px 22px 24px; box-shadow: var(--shadow-1); margin-bottom: 16px; }
.panel h2 { font-size: 1.3125rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel h3 { font-size: 1rem; margin: 18px 0 8px; }
.panel--note { background: var(--mustard-soft); border-color: transparent; }
.mt { margin-top: 22px; }
.cols { display: grid; gap: 16px; }
.cols > .panel { margin-bottom: 0; }
.cols { margin-bottom: 16px; }
@media (min-width: 880px) { .cols { grid-template-columns: 1.15fr 1fr; } }
.quote { font-size: 1.0625rem; font-style: italic; margin-bottom: 10px; }

.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.act-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.act-row:first-child { border-top: 0; }
.act-row__face .face { width: 44px; height: 42px; }
.act-row__txt { display: grid; gap: 2px; line-height: 1.35; }
.act-row__txt small { color: var(--ink-mut); }
.act-row__ev { font-style: italic; }
.act-row time { font-size: .8125rem; color: var(--ink-mut); white-space: nowrap; }
.noface { display: grid; place-items: center; width: 44px; height: 42px; color: var(--ink-mut); }
.empty { color: var(--ink-mut); padding: 12px 0; }

.profile-form, .obs-form, .huella-form, .pub-form { display: grid; gap: 12px; margin-top: 12px; }
.profile-form label, .huella-form label, .pub-form label { display: grid; gap: 4px; font-weight: 800; font-size: .9375rem; }
textarea, input:not([type="checkbox"]), select {
  width: 100%; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line-strong);
  background: var(--cream); line-height: 1.45; font-weight: 400;
  transition: border-color 140ms var(--ease-snap), background-color 140ms var(--ease-snap);
}
textarea:focus, input:focus, select:focus { background: var(--paper); border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgb(92 143 90 / .2); }
.profile-form .btn, .obs-form .btn, .huella-form .btn, .pub-form > .btn { justify-self: start; }
@media (min-width: 760px) { .profile-form { grid-template-columns: 1fr 1fr; } .profile-form .btn { grid-column: 1 / -1; } }
.row2 { display: grid; gap: 12px; }
.row3 { display: grid; gap: 12px; }
@media (min-width: 700px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.check { display: flex !important; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; font-weight: 700 !important; }
.check input { width: 20px; height: 20px; accent-color: var(--leaf); }

.video-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.vcard { display: grid; gap: 8px; align-content: start; }
.vcard .thumb { width: 100%; height: auto; border-radius: 16px; }
.vcard ol { margin: 0; padding-left: 20px; color: var(--ink-mut); font-size: .9375rem; }

.disp { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.disp__btn { display: grid; gap: 2px; text-align: left; padding: 14px 16px 16px; border-radius: 20px; border: 2px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color 140ms var(--ease-snap), background-color 140ms var(--ease-snap); }
.disp__btn b { font-size: 1.0625rem; }
.disp__btn small { color: var(--ink-mut); line-height: 1.35; }
.disp__btn:hover { border-color: var(--line-strong); }
.disp__btn.is-on { border-color: var(--leaf); background: var(--sage-soft); }
.sugg { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; }
.sugg .thumb { width: 160px; height: 100px; border-radius: 16px; }
.sugg h3 { margin: 0 0 4px; font-size: 1.1875rem; }
.why { margin-top: 6px; font-size: .9375rem; }
@media (max-width: 520px) { .sugg { grid-template-columns: 1fr; } .sugg .thumb { width: 100%; height: auto; } }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.offline-tip { margin: 14px 0; padding: 10px 14px 12px; border-radius: 14px; background: var(--aqua-soft); font-size: .9375rem; }
.obs-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.obs-list li { padding: 10px 14px; border-radius: 14px; background: var(--cream); display: flex; justify-content: space-between; gap: 12px; }
.obs-list time { font-size: .8125rem; color: var(--ink-mut); white-space: nowrap; }

/* Teacher */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding: 5px; border-radius: 999px; background: var(--cream-2); width: fit-content; max-width: 100%; }
.tabs a { padding: 8px 16px 9px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 800; font-size: .9375rem; }
.tabs a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.folders { display: grid; gap: 18px; margin-top: 22px; }
@media (min-width: 760px) { .folders { grid-template-columns: 1fr 1fr; } }
.folder {
  position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start;
  padding: 26px 18px 18px 14px; border-radius: 6px 24px 24px 24px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow-1); margin-top: 14px;
  transition: box-shadow 180ms var(--ease-out), transform 90ms var(--ease-snap);
}
.folder:hover { box-shadow: var(--shadow-2); }
.folder:active { transform: scale(.995); }
.folder__tab { position: absolute; top: -16px; left: -1.5px; padding: 3px 18px 5px; border-radius: 12px 14px 0 0; background: var(--tab); font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; }
.folder__face { width: 92px; height: 92px; border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--tab) 35%, var(--paper)); }
.folder__face svg { width: 100%; height: 100%; transform: translateY(8px); }
.folder__body { display: grid; gap: 4px; }
.folder__body > b { font-size: 1.25rem; }
.folder__nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .875rem; color: var(--ink-mut); margin-top: 4px; }
.folder__nums b { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.strip { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0; }
.strip .face { width: 26px; height: 24px; }

.folder-bar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.fhead { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; padding: 18px 22px 20px 18px; border-radius: 6px 26px 26px 26px; background: color-mix(in srgb, var(--tab) 28%, var(--paper)); margin-bottom: 16px; border: 1.5px solid var(--line); }
.fhead__face { width: 110px; height: 110px; border-radius: 26px; background: var(--paper); overflow: hidden; }
.fhead__face svg { width: 100%; height: 100%; transform: translateY(8px); }
.fhead h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.025em; margin: 4px 0 6px; }
@media (max-width: 560px) { .fhead { grid-template-columns: 72px 1fr; } .fhead__face { width: 72px; height: 72px; border-radius: 18px; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats > div { display: grid; padding: 16px 18px 18px; border-radius: 22px; background: var(--paper); border: 1.5px solid var(--line); line-height: 1.3; }
.stats b { font-size: 1.75rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stats > div:last-child b { font-size: 1.1875rem; padding: 6px 0 3px; }
.stats span { font-weight: 800; font-size: .9375rem; }
.stats small { color: var(--ink-mut); font-size: .8125rem; }
.emo { display: grid; gap: 8px; margin: 14px 0; }
.emo__row { display: grid; grid-template-columns: 40px 90px 1fr 40px; gap: 10px; align-items: center; }
.emo__face .face { width: 40px; height: 38px; }
.emo__label { font-weight: 800; }
.emo__bar, .bars__bar { height: 12px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.emo__bar i, .bars__bar i { display: block; height: 100%; border-radius: inherit; background: var(--leaf); }
.emo__row:nth-child(1) .emo__bar i { background: var(--mustard); }
.emo__row:nth-child(2) .emo__bar i { background: var(--sky); }
.emo__row:nth-child(3) .emo__bar i { background: var(--lilac); }
.emo__row:nth-child(4) .emo__bar i { background: var(--sage); }
.emo__n { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.strip-wrap { display: grid; gap: 4px; margin: 6px 0 10px; }
.strip-wrap small { color: var(--ink-mut); font-size: .8125rem; }
.dl { margin: 0; display: grid; gap: 8px; }
.dl > div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.dl dt { font-weight: 800; font-size: .875rem; color: var(--ink-2); }
.dl dd { margin: 0; line-height: 1.45; }
@media (max-width: 520px) { .dl > div { grid-template-columns: 1fr; gap: 2px; } }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 1fr 120px 28px; gap: 10px; align-items: center; font-size: .9375rem; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.recs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--cream); }
.recs li > div { display: grid; line-height: 1.35; }
.recs small { color: var(--ink-mut); }
.huellas { display: grid; gap: 12px; margin-top: 12px; }
.huella { padding: 14px 16px 16px; border-radius: 20px; background: var(--cream); }
.huella__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.huella__head time { margin-left: auto; font-size: .8125rem; color: var(--ink-mut); }
.coh { margin-top: 10px; }
.coh summary, .new-huella > summary { cursor: pointer; font-weight: 800; color: var(--leaf-dark); }
.new-huella { margin-top: 16px; }
.new-huella > summary { list-style: none; display: inline-flex; color: var(--ink); }
.new-huella > summary::-webkit-details-marker { display: none; }
.formula { display: grid; gap: 8px; margin-top: 10px; }
.formula > div { padding: 12px 14px 14px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line); }
.formula small { display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--coral-ink); margin-bottom: 2px; }
.formula p { font-size: .9375rem; line-height: 1.45; }
.formula__op { justify-self: center; font-family: var(--script); font-size: 1.6rem; line-height: 1; color: var(--orange); }
@media (min-width: 860px) { .formula { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; } .formula__op { align-self: center; } }

.timeline { list-style: none; margin: 10px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 8px 0; }
.tl__dot { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; }
.tl__dot:empty::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px var(--paper); }
.tl--pausa .tl__dot::before { background: var(--coral) !important; }
.tl--disposicion .tl__dot::before, .tl--observacion .tl__dot::before { background: var(--sky) !important; }
.tl--descanso .tl__dot::before { background: var(--lilac) !important; }
.tl__dot .face { width: 32px; height: 30px; }
.tl b { font-size: .9375rem; }
.tl p { font-size: .9375rem; color: var(--ink-2); line-height: 1.4; }
.tl small { color: var(--ink-mut); font-size: .8125rem; }
.print-note { display: none; }

.lib-tools { display: grid; gap: 10px; margin-bottom: 8px; }
@media (min-width: 760px) { .lib-tools { grid-template-columns: 1.6fr 1fr 1fr; } }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-mut); }
.search input { padding-left: 42px; min-height: 48px; border-radius: 999px; background: var(--paper); }
.lib-grid { display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 8px; }
.lcard { display: grid; gap: 4px; align-content: start; text-align: left; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); }
.lcard__thumb { position: relative; display: block; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 6px; transition: box-shadow 180ms var(--ease-out), transform 120ms var(--ease-snap); }
.lcard:hover .lcard__thumb { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.lcard__thumb .thumb { width: 100%; height: auto; }
.lcard__min { position: absolute; left: 8px; bottom: 8px; padding: 1px 8px 2px; border-radius: 6px; background: rgb(31 70 54 / .85); color: var(--cream); font-size: .75rem; font-weight: 800; }
.lcard b { font-size: 1.0625rem; line-height: 1.3; }
.lcard small { color: var(--ink-mut); font-size: .8125rem; }
.lcard__tags { display: flex; gap: 4px; margin-top: 2px; }

.detail { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 28px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-3); }
.detail::backdrop { background: rgb(31 70 54 / .45); }
.detail__inner { position: relative; padding: 18px 22px 24px; display: grid; gap: 8px; }
.detail__inner > .thumb { width: 100%; height: auto; border-radius: 18px; }
.detail__inner h2 { font-size: 1.625rem; letter-spacing: -0.02em; }
.detail__inner h3 { font-size: 1rem; margin-top: 10px; }
.detail__close { position: absolute; top: 26px; right: 30px; font-size: 1.5rem; line-height: 1; }
.detail__actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 8px; }
.detail__actions label { display: grid; gap: 4px; font-weight: 800; font-size: .875rem; min-width: 160px; }

.formula-set { margin: 6px 0 0; padding: 14px 16px 16px; border-radius: 20px; border: 2px dashed var(--orange); display: grid; gap: 10px; }
.formula-set legend { padding: 0 8px; font-weight: 900; color: var(--coral-ink); }
.formula-field.is-missing textarea { border-color: var(--coral); background: var(--coral-soft); }
.form-error { padding: 12px 16px; border-radius: 14px; background: var(--coral-soft); color: var(--coral-ink); font-weight: 800; }

/* Print: the physical folders for the stand */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .notice, .top, .folder-bar, .new-huella, .recs .btn, .toast { display: none !important; }
  .panel, .stats > div, .fhead { box-shadow: none; break-inside: avoid; }
  .page { padding: 0; max-width: none; }
  .print-note { display: block; margin-top: 12px; font-size: .8rem; color: var(--ink-mut); }
  details.coh { display: block; }
  details.coh > summary { display: none; }
}

/* Teacher avatars are images: while the voice speaks, the avatar «talks» with a soft bounce */
.who__face .person--img, .role__art .person--img, .folder__face .person--img { transform: none; }
.role__art .person--img { padding-top: 6px; }
.is-talking .person--img { animation: talk-img 340ms ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes talk-img { from { transform: translateY(0) scale(1, 1); } to { transform: translateY(-3px) scale(1.012, .99); } }

/* ---------- Guided tour + «Explorar más» ---------- */
.tourcard { display: grid; gap: 16px; align-items: center; margin-top: 24px; padding: 22px; border-radius: 26px; background: var(--mustard-soft); border: 1.5px solid var(--line); box-shadow: var(--shadow-1); }
@media (min-width: 760px) { .tourcard { grid-template-columns: 1fr auto; padding: 26px 30px; } }
.tourcard small { color: var(--coral-ink); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .75rem; }
.tourcard b { display: block; font-size: 1.375rem; letter-spacing: -0.02em; margin: 4px 0 8px; }
.tourcard ol { margin: 0; padding-left: 1.2em; color: var(--ink-mut); display: grid; gap: 2px; }
.explore { margin-top: 28px; }
.explore > summary { cursor: pointer; font-weight: 800; font-size: 1.0625rem; padding: 10px 0; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.explore > summary::-webkit-details-marker { display: none; }
.explore > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sage-soft); color: var(--ink); font-weight: 800; }
.explore[open] > summary::before { content: "–"; }
.explore > summary small { color: var(--ink-mut); font-weight: 600; }
.tour { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 auto 14px; max-width: 1040px; padding: 10px 16px; border-radius: 0 0 18px 18px; background: var(--paper); border: 1.5px solid var(--line); border-top: 0; box-shadow: var(--shadow-1); }
.tour__dots { display: flex; gap: 5px; }
.tour__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.tour__dots i.on { background: var(--leaf); }
.tour__txt { display: grid; flex: 1 1 200px; line-height: 1.25; }
.tour__txt small { color: var(--ink-mut); font-size: .75rem; font-weight: 700; }
.tour__out { margin-left: auto; }

/* ---------- In-page confirm dialog ---------- */
.ask { width: min(92vw, 420px); padding: 26px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-2); }
.ask::backdrop { background: rgb(31 70 54 / .42); }
.ask h2 { margin: 0 0 8px; font-size: 1.375rem; letter-spacing: -0.02em; }
.ask p { margin: 0 0 20px; color: var(--ink-mut); }
.ask__btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
