/* Escape del Tiempo · estilos */
:root {
  --tinta: #3b2416;
  --fondo: #241a3f;
  --fondo2: #3a2a63;
  --oro: #ffc531;
  --oro2: #e8801a;
  --lila: #8b6cff;
  --teal: #1fb5a8;
  --papel: #fff7e3;
  --rojo: #e8352d;
  --verde: #2fb25a;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Baloo 2", system-ui, sans-serif;
  color: var(--tinta);
  background: radial-gradient(120% 90% at 50% 0%, #4a3480 0%, var(--fondo) 60%, #140e26 100%);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- juego */
#app {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "hud" "escena" "panel";
}
.hud {
  grid-area: hud;
  display: flex; align-items: center; gap: 8px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px;
  color: #fff;
}
.hud-btn {
  flex: 0 0 auto; width: 46px; height: 46px; border: 0; border-radius: 16px;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 22px;
  display: grid; place-items: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.hud-btn svg { width: 22px; height: 22px; }
.hud-btn:active { transform: translateY(2px); }
.hud-btn.pista { background: linear-gradient(180deg, #ffd65a, #f2a81d); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(255, 210, 60, 0.6); animation: latido 2.6s ease-in-out infinite; }
.hud-titulo { flex: 1 1 auto; min-width: 0; margin: 0; font: 400 19px/1.05 "Lilita One", sans-serif; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-titulo small { display: block; font: 700 12px/1.2 "Baloo 2", sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.hud-luces { display: flex; gap: 2px; padding: 3px 6px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.hud-luces img { width: 30px; height: 30px; display: block; }
@media (max-width: 430px) { .hud { gap: 6px; } .hud-luces { padding: 3px 4px; } .hud-luces img { width: 22px; height: 22px; } .hud-titulo { font-size: 17px; } }
.hud.historia .hud-luces, .hud.historia #bLupa, .hud.historia #bPista { visibility: hidden; }

.escena { grid-area: escena; position: relative; display: grid; place-items: center; min-height: 0; padding: 0 6px; }
#cv { display: block; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.12); touch-action: none; }
.toast {
  position: absolute; left: 50%; top: 10px; transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 30px); width: max-content; text-align: center;
  padding: 7px 16px; border-radius: 18px; background: #fff; font-weight: 800; font-size: 16px; line-height: 1.2;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2); transition: opacity 0.25s, transform 0.25s;
}
.toast.ve { opacity: 1; transform: translate(-50%, 0); }

.panel {
  grid-area: panel; display: flex; flex-direction: column; gap: 6px;
  padding: 6px 8px calc(8px + var(--safe-b));
}
.dlg {
  position: relative; min-height: 76px; display: flex; align-items: center; gap: 10px;
  padding: 8px 44px 8px 8px; border-radius: 20px; background: var(--papel);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); cursor: default;
}
.dlg:empty { visibility: hidden; }
.dlg.espera { padding-bottom: 18px; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 0 0 3px var(--oro); }
.dlg .cara { width: 60px; height: 60px; flex: 0 0 auto; border-radius: 50%; background: #f3e2bf; border: 3px solid var(--tinta); object-fit: cover; }
.dlg.q-c .cara { background: #cfe6ff; }
.dlg.q-a .cara { background: #d9f0d4; }
.dlg .txt { min-width: 0; }
.dlg .txt b { display: block; font: 400 15px/1 "Lilita One", sans-serif; color: #8a4719; margin-bottom: 2px; }
.dlg.q-c .txt b { color: #2c7be0; }
.dlg.q-a .txt b { color: #3a8a3a; }
.dlg.q-n { background: #2b2148; color: #fff; }
.dlg.q-n p { font-style: italic; }
.dlg p { margin: 0; font-size: 17px; line-height: 1.22; font-weight: 600; }
.dlg p b { color: #b8231f; }
.dlg-voz { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, 0.06); font-size: 17px; }
.dlg-sig { position: absolute; right: 12px; bottom: 2px; padding: 0 6px; border-radius: 8px; background: var(--papel); font-size: 12px; font-weight: 800; opacity: 0.6; animation: parpadeo 1.2s infinite; }
.dlg.q-n .dlg-voz { background: rgba(255, 255, 255, 0.12); }

.mochila { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; min-height: 72px; align-items: stretch; }
.mochila::-webkit-scrollbar { display: none; }
.slot {
  flex: 0 0 auto; width: 70px; height: 70px; border: 0; border-radius: 18px; padding: 4px;
  background: rgba(255, 255, 255, 0.92); display: grid; place-items: center; position: relative;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 3px 0 rgba(0, 0, 0, 0.25); transition: transform 0.12s;
}
.slot img { width: 52px; height: 52px; object-fit: contain; pointer-events: none; }
.slot span { position: absolute; left: 0; right: 0; bottom: 1px; font-size: 9.5px; font-weight: 800; line-height: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; opacity: 0.75; }
.slot.perro { background: linear-gradient(180deg, #e6f2ff, #bcd9ff); }
.slot.perro img { width: 58px; height: 58px; border-radius: 50%; }
.slot.sel { transform: translateY(-4px); box-shadow: 0 0 0 4px var(--oro), 0 6px 14px rgba(255, 197, 49, 0.6); }
.slot.nuevo { animation: nuevo 0.7s cubic-bezier(0.2, 1.6, 0.4, 1); }
.mochila-vacia { margin: 0; align-self: center; color: rgba(255, 255, 255, 0.75); font-size: 13px; line-height: 1.2; font-weight: 600; max-width: 520px; }

@media (min-aspect-ratio: 5/4) {
  #app {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 32vw);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "hud hud" "escena panel";
  }
  .panel { padding: 6px 12px 12px 4px; justify-content: flex-start; }
  .dlg { min-height: 120px; align-items: flex-start; flex-direction: column; padding: 12px 44px 22px 12px; }
  .dlg .cara { width: 72px; height: 72px; }
  .dlg p { font-size: 18px; }
  .mochila { flex-wrap: wrap; overflow: visible; align-content: flex-start; }
  .slot { width: 78px; height: 78px; }
  .slot img { width: 58px; height: 58px; }
}

/* ---------------------------------------------------------------- menús */
.menu { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.menu-in { max-width: 760px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(24px + var(--safe-b)); color: #fff; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 22px; padding: 13px 18px; margin: 0;
  font: 400 22px/1.1 "Lilita One", sans-serif; letter-spacing: 0.3px; color: var(--tinta);
  background: #fff; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.1s;
}
.btn:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 1px 0 rgba(0, 0, 0, 0.25); }
.btn.oro { background: linear-gradient(180deg, #ffe07a, var(--oro)); font-size: 26px; padding: 16px; }
.btn.lila { background: linear-gradient(180deg, #b8a6ff, var(--lila)); color: #fff; }
.btn.teal { background: linear-gradient(180deg, #6ee0d4, var(--teal)); color: #fff; }
.btn.alt { background: rgba(255, 255, 255, 0.9); }
.btns { display: grid; gap: 10px; margin-top: 14px; }
.btns .fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btns .fila .btn { font-size: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 800; font-size: 15px; }
button.pill { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.mini { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

.escena-portada {
  position: relative; aspect-ratio: 1 / 0.78; border-radius: 26px; overflow: hidden;
  background-size: cover; background-position: center 64%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.escena-portada .logo { position: absolute; left: 50%; top: 3%; width: 88%; transform: translateX(-50%); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4)); animation: flota 4s ease-in-out infinite; }
.escena-portada .p-miguel { position: absolute; left: 6%; bottom: 2%; height: 56%; }
.escena-portada .p-perro { position: absolute; right: 5%; bottom: 3%; height: 31%; transform: scaleX(-1); animation: brinco 1.8s ease-in-out infinite; }
.escena-portada .p-reloj { position: absolute; left: 50%; bottom: 10%; height: 34%; transform: translateX(-50%); animation: gira 9s linear infinite; filter: drop-shadow(0 0 18px rgba(255, 220, 120, 0.7)); }
.lema { text-align: center; font-size: 18px; font-weight: 700; margin: 14px 4px 0; line-height: 1.25; }

.nivel { text-align: center; display: grid; gap: 12px; max-width: 520px; margin: 0 auto; padding-top: 10px; }
.nivel h2, .era h2, .diario h2, .fin-sala h2 { font: 400 30px/1.05 "Lilita One", sans-serif; margin: 0; letter-spacing: 0.3px; }
.nivel p { margin: 0; font-size: 17px; line-height: 1.3; }
.tarjeta { display: grid; grid-template-columns: 90px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left; gap: 0 12px; border: 0; padding: 10px 14px; border-radius: 22px; background: #fff; color: var(--tinta); font-family: inherit; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15), 0 4px 0 rgba(0, 0, 0, 0.25); }
.tarjeta img { grid-row: span 2; width: 90px; height: 80px; object-fit: contain; }
.tarjeta b { font: 400 26px/1 "Lilita One", sans-serif; }
.tarjeta span { font-weight: 700; opacity: 0.75; }
.tarjeta.sel { box-shadow: 0 0 0 4px var(--oro), 0 4px 0 rgba(0, 0, 0, 0.25); }
.ajustes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.reto-img { width: 160px; margin: 0 auto; animation: gira 12s linear infinite; }

.mapa-top, .era-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mapa-top img { width: 52px; height: 52px; }
.mapa-top span { font-size: 17px; }
.mapa-lienzo { position: relative; width: 100%; aspect-ratio: 1; background-size: cover; border-radius: 26px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.medallon {
  position: absolute; transform: translate(-50%, -50%); width: 34%; border: 0; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--tinta);
}
.medallon > img:first-child { width: 50%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.35)); transition: transform 0.15s; }
.medallon:hover > img:first-child { transform: scale(1.06); }
.medallon b { font: 400 clamp(14px, 3.4vw, 22px)/1 "Lilita One", sans-serif; background: #fff; padding: 3px 10px; border-radius: 12px; margin-top: -8px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); white-space: nowrap; }
.medallon small { white-space: nowrap; font-size: clamp(10px, 2.3vw, 14px); font-weight: 800; margin-top: 2px; line-height: 1.1; background: rgba(255, 247, 227, 0.85); padding: 1px 6px; border-radius: 8px; }
.medallon .eng { position: absolute; right: 12%; top: 0; width: 26%; animation: gira 6s linear infinite; }
.medallon.cerrada > img:first-child { filter: grayscale(1) brightness(0.8); opacity: 0.7; }
.medallon.no { animation: tiembla 0.4s; }

.era-top { color: #fff; }
.era-top img { width: 74px; height: 74px; flex: 0 0 auto; }
.era-top p { margin: 2px 0 0; font-weight: 700; opacity: 0.85; line-height: 1.2; }
.salas { display: grid; gap: 12px; }
.sala-card {
  display: grid; grid-template-columns: 120px 1fr auto; grid-template-rows: auto auto auto; align-items: center; gap: 0 12px; text-align: left;
  border: 0; padding: 8px; border-radius: 22px; background: #fff; color: var(--tinta); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12), 0 4px 0 rgba(0, 0, 0, 0.25), inset 6px 0 0 var(--color);
}
.sala-card > img { grid-row: span 3; width: 120px; height: 120px; border-radius: 16px; object-fit: cover; }
.sala-card .n { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--tinta); opacity: 0.7; }
.sala-card b { font: 400 22px/1.05 "Lilita One", sans-serif; }
.sala-card .est img { width: 30px; height: 30px; }
.sala-card .jugar { grid-column: 3; grid-row: 1 / span 3; padding: 10px 14px; border-radius: 16px; background: var(--oro); font: 400 18px/1 "Lilita One", sans-serif; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
@media (max-width: 420px) {
  .sala-card { grid-template-columns: 84px 1fr auto; gap: 0 10px; }
  .sala-card > img { width: 84px; height: 84px; border-radius: 12px; }
  .sala-card b { font-size: 19px; }
  .sala-card .est { white-space: nowrap; }
  .sala-card .est img { width: 22px; height: 22px; }
  .sala-card .jugar { padding: 8px 10px; font-size: 16px; }
}
.era-eng { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 17px; text-align: center; }
.era-eng img { width: 48px; animation: gira 6s linear infinite; }

.diario h3 { margin: 18px 0 6px; font: 400 22px/1 "Lilita One", sans-serif; }
.docs { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-mini { border: 0; padding: 8px 14px; border-radius: 14px; background: var(--papel); font-weight: 800; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.doc-mini.bloq { background: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.7); box-shadow: none; }

/* ---------------------------------------------------------------- capas */
.over, .puzle, .doc {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 14px;
  background: rgba(14, 8, 30, 0.72); overflow-y: auto; animation: aparece 0.2s;
}
.puzle { z-index: 30; }
.doc { z-index: 40; }
.over-in { width: 100%; max-width: 520px; }
.fin-sala {
  background: var(--papel); border-radius: 28px; padding: 22px 18px 18px; text-align: center;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.4); animation: salta 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.fin-sala .sub { margin: 4px 0 0; font-weight: 800; opacity: 0.7; }
.fin-sala .est { display: flex; justify-content: center; gap: 6px; margin: 10px 0; }
.fin-sala .est img { width: 72px; height: 72px; animation: salta 0.5s both cubic-bezier(0.2, 1.6, 0.4, 1); }
.fin-sala .datos { font-weight: 700; margin: 4px 0; }
.fin-sala .aprendido, .fin-sala .consejo { margin: 8px 0; line-height: 1.3; }
.fin-sala .consejo { font-size: 14px; opacity: 0.75; }
.fin-sala .btns.col .btn { font-size: 19px; }
.fin-sala.engranaje .eng-gira { width: 120px; animation: gira 4s linear infinite; margin-top: 10px; }
.fin-sala.engranaje .reloj { display: block; width: 200px; margin: 6px auto; }
.fin-sala.diploma { border: 10px double #c9902a; }
.fin-sala.diploma h2 { font-size: 38px; color: #a5661a; }
.fin-sala.diploma input { font: 400 26px "Lilita One", sans-serif; text-align: center; width: 100%; border: 0; border-bottom: 3px dashed #c9902a; background: transparent; padding: 6px; color: var(--tinta); }
.fin-sala.diploma .firmas { display: flex; justify-content: center; gap: 14px; }
.fin-sala.diploma .firmas img { width: 90px; height: 90px; }

/* documento */
.doc-card {
  position: relative; width: 100%; max-width: 560px; padding: 44px 40px 26px; background-size: 100% 100%; background-repeat: no-repeat;
  color: #3b2416; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5)); animation: salta 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.doc-card h2 { margin: 0 0 10px; font: 400 25px/1.1 "Lilita One", sans-serif; color: #7a3d1c; padding-right: 26px; }
.doc-card p { margin: 0 0 9px; font-size: 18px; line-height: 1.36; font-weight: 600; }
.doc-card p b { color: #b8231f; }
.doc-card.papel-5 h2 { font-family: Georgia, serif; font-weight: 700; color: #222; }
.doc-x { position: absolute; right: 22px; top: 22px; width: 40px; height: 40px; border: 0; border-radius: 14px; background: rgba(0, 0, 0, 0.1); font-size: 20px; }
.doc-pie { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.doc-pie button { border: 0; border-radius: 16px; padding: 9px 16px; font-weight: 800; background: rgba(0, 0, 0, 0.08); }
.doc-pie .doc-ok { background: var(--oro); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); font-size: 17px; }

/* ---------------------------------------------------------------- candados */
.pz-card {
  position: relative; width: 100%; max-width: 580px; background: var(--papel); border-radius: 26px; padding: 12px 14px 14px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3), 0 0 0 4px #c9902a; animation: salta 0.35s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.pz-card.tiembla { animation: tiembla 0.4s; }
.pz-card.abierto { box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3), 0 0 0 4px var(--verde), 0 0 40px 10px rgba(80, 220, 120, 0.6); }
.pz-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 44px; }
.pz-card h2 { margin: 0; font: 400 22px/1.1 "Lilita One", sans-serif; color: #7a3d1c; }
.pz-ico { font-size: 22px; }
.pz-reto { font-weight: 800; font-size: 15px; }
.pz-x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 14px; background: rgba(0, 0, 0, 0.08); font-size: 20px; }
.pz-enun { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 8px 0; }
.leer { border: 0; background: rgba(0, 0, 0, 0.06); border-radius: 10px; padding: 1px 6px; font-size: 15px; vertical-align: middle; }
.pz-cuerpo { margin-top: 6px; }
.pz-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; min-height: 36px; }
.pz-aviso { font-weight: 800; color: #b8231f; opacity: 0; }
.pz-aviso.ve { animation: aviso 2.6s; }
.pz-pista { border: 0; border-radius: 14px; padding: 7px 14px; background: linear-gradient(180deg, #ffe07a, #f2a81d); font-weight: 800; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); margin-left: auto; }
.pz-pistatxt { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 8px 10px; border-radius: 16px; background: #dcebff; font-weight: 700; line-height: 1.25; }
.pz-pistatxt img { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; }
.comprobar { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 18px; padding: 12px; font: 400 21px/1 "Lilita One", sans-serif; background: linear-gradient(180deg, #7ee07c, var(--verde)); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2); }
.comprobar:disabled { background: #e6dfcf; color: #6f6250; }

/* vistas de cerca */
.pz-cerca:empty { display: none; }
.pz-cerca { margin: 8px 0 0; }
.cerca-pared { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 12px; border-radius: 18px; background: radial-gradient(circle at 30% 30%, #b08a68, #6b4a35); }
.cerca-pared .ico { width: 64px; height: 48px; }
.cerca-pared.animales-granja .ico { width: 46px; height: 37px; }
.cerca-pared .giro { transform: scaleX(-1); }
.cerca-corrales { display: flex; gap: 6px; justify-content: center; }
.corral { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px; border-radius: 12px; background: #c9e39a; border: 4px solid #8a5a2a; }
.corral .ico { width: 46px; height: 37px; }
@media (max-width: 420px) { .corral { padding: 4px; border-width: 3px; } .corral .ico { width: 34px; height: 27px; } }
.cerca-hueso { display: grid; gap: 8px; padding: 12px; border-radius: 40px; background: #f4ead2; border: 4px solid #c9b48a; }
.marcas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.marcas .grupo { position: relative; display: flex; gap: 6px; padding: 0 2px; }
.marcas .grupo i { display: block; width: 5px; height: 38px; border-radius: 3px; background: #6b4a2b; }
.marcas .grupo.cinco::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 5px; border-radius: 3px; background: #6b4a2b; transform: rotate(-24deg); }
.cerca-papiro { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 10px; border-radius: 10px; background: #f0dca8; }
.cerca-papiro .glifo { width: 50px; height: 50px; }
.cerca-piedra { text-align: center; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, #e6dccb, #cdbf9e); }
.cerca-piedra b { font: 400 52px/1 Georgia, "Times New Roman", serif; letter-spacing: 6px; color: #4a3c2a; }
.cerca-bloques { display: grid; gap: 3px; justify-items: center; padding: 10px; }
.cerca-bloques .fila { display: flex; gap: 3px; }
.cerca-bloques i, .cerca-pisos i { display: block; width: 40px; height: 28px; border-radius: 4px; background: #d9b45f; border: 3px solid #8a6a3a; }
.cerca-pisos { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 8px; }
.cerca-pisos .piso { display: grid; gap: 2px; }
.cerca-pisos i { width: 22px; height: 22px; }
.cerca-arcos { padding: 10px; border-radius: 14px; background: #cfe9fb; }
.cerca-arcos .fila { display: flex; justify-content: center; }
.cerca-arcos i { display: block; height: 48px; flex: 0 0 auto; background: radial-gradient(circle at 50% 100%, transparent 44%, #cdbf9e 46%); border: 3px solid #8a7a5a; border-top-width: 6px; }
.cerca-arcos .arriba i { width: 44px; }
.cerca-arcos .abajo i { width: 61.6px; height: 70px; }
.cerca-neuronas { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 8px; background: #fffdf6; border-radius: 12px; }
.cerca-neuronas .ico { width: 90px; height: 90px; }

/* código */
.digitos { display: flex; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.digitos span { width: 54px; height: 64px; border-radius: 14px; background: #2a1f4a; color: #ffe37a; font: 400 40px/64px "Lilita One", sans-serif; text-align: center; box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.4); }
.digitos span.lleno { animation: pop 0.2s; }
.codigo.piedra .digitos span { background: #6b5a4c; color: #fff; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 360px; margin: 0 auto; }
.teclado button { border: 0; border-radius: 16px; height: 54px; font: 400 26px/1 "Lilita One", sans-serif; background: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 2px 0 rgba(0, 0, 0, 0.2); }
.teclado button:active { transform: translateY(2px); }
.teclado .ok { background: linear-gradient(180deg, #7ee07c, var(--verde)); color: #fff; font-size: 22px; }
.teclado .borra { background: #ffd6d0; }

/* opciones */
.pregunta { font-size: 19px; line-height: 1.28; font-weight: 800; margin: 4px 0 10px; }
.paso { margin: 0; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.6; }
.ops { display: grid; gap: 8px; }
.op { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 16px; padding: 10px 12px; background: #fff; font-weight: 700; font-size: 17px; line-height: 1.2; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 2px 0 rgba(0, 0, 0, 0.18); }
.op b { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #efe3c6; font-family: "Lilita One", sans-serif; font-weight: 400; }
.op.bien, .ops button.bien { background: #c8f3c4; box-shadow: 0 0 0 3px var(--verde); }
.op.mal, .ops button.mal { background: #ffd6d0; opacity: 0.6; animation: tiembla 0.35s; }
.espejo { display: inline-block; transform: scaleX(-1); font: 400 26px/1 Georgia, serif; letter-spacing: 3px; }

/* ordenar */
.ordenar .puestos { list-style: none; margin: 0 0 10px; padding: 8px; display: grid; gap: 6px; border-radius: 16px; background: rgba(0, 0, 0, 0.06); min-height: 50px; }
.ordenar.palabras .puestos { display: flex; flex-wrap: wrap; }
.ordenar .puestos button, .ordenar .libres button { width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 9px 12px; font-weight: 800; font-size: 16px; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); display: flex; gap: 8px; align-items: center; }
.ordenar .puestos button { background: #fff1c2; }
.ordenar .puestos button.fijo { background: #c8f3c4; }
.ordenar .puestos b { width: 26px; height: 26px; border-radius: 50%; background: var(--oro); display: grid; place-items: center; flex: 0 0 auto; }
.ordenar .hueco { padding: 9px 12px; border-radius: 14px; border: 3px dashed #c9b48a; font-weight: 700; opacity: 0.7; display: flex; gap: 8px; align-items: center; }
.ordenar .hueco b { width: 26px; height: 26px; border-radius: 50%; background: #e9dcc0; display: grid; place-items: center; }
.ordenar .libres { display: grid; gap: 6px; }
.ordenar.palabras .libres { display: flex; flex-wrap: wrap; }
.ordenar.palabras button { width: auto; }

/* parejas */
.parejas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.parejas .col { display: grid; gap: 8px; align-content: start; }
.parejas button { border: 0; border-radius: 14px; padding: 10px 8px; min-height: 52px; font-weight: 800; font-size: 15.5px; line-height: 1.15; background: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 2px 0 rgba(0, 0, 0, 0.18); }
.parejas button.sel { box-shadow: 0 0 0 4px var(--oro); background: #fff6d2; }
.parejas button.mal { background: #ffd6d0; animation: tiembla 0.35s; }
.parejas button.hecho { color: #fff; box-shadow: none; }
.parejas .c1 { background: #2fb25a; } .parejas .c2 { background: #2a8fb8; } .parejas .c3 { background: #8b6cff; } .parejas .c4 { background: #e8801a; } .parejas .c5 { background: #e2458f; }

/* palabra */
.huecos, .letras { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.huecos { margin-bottom: 12px; }
.huecos button { width: 42px; height: 50px; border: 0; border-bottom: 4px solid #8a5a2a; border-radius: 8px 8px 4px 4px; background: rgba(0, 0, 0, 0.05); font: 400 28px/1 "Lilita One", sans-serif; }
.huecos button.lleno { background: #fff1c2; }
.letras button { width: 48px; height: 52px; border: 0; border-radius: 14px; background: #fff; font: 400 28px/1 "Lilita One", sans-serif; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 2px 0 rgba(0, 0, 0, 0.2); }
.letras button:disabled { opacity: 0.25; }
.glifos-msg { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 8px; border-radius: 12px; background: #f0dca8; margin-bottom: 8px; }
.glifos-msg .glifo { width: 56px; height: 56px; }
@media (max-width: 420px) { .glifos-msg .glifo { width: 44px; height: 44px; } }
.glifos-tabla { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 10px; }
.glifos-tabla span { display: flex; flex-direction: column; align-items: center; padding: 2px; border-radius: 10px; background: rgba(240, 220, 168, 0.6); }
.glifos-tabla .glifo { width: 40px; height: 40px; max-width: 100%; }
.glifos-tabla span { min-width: 0; }
.glifos-tabla b { font: 400 18px/1 "Lilita One", sans-serif; }

/* suma */
.suma .cosas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.suma .cosas button { width: 82px; height: 82px; border: 0; display: grid; place-items: center; align-content: center; gap: 0; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 3px 0 rgba(0, 0, 0, 0.25); transition: transform 0.12s; }
.suma .cosas b { font: 400 28px/1 "Lilita One", sans-serif; }
.suma .cosas small { font-weight: 800; font-size: 11px; line-height: 1; }
.suma.piedras .cosas button { border-radius: 40% 46% 38% 50%; background: #857a68; color: #fff; }
.suma.monedas .cosas button { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1a8, #e3a63c 60%, #a5661a); }
.suma .cosas button.sel { transform: translateY(-6px) scale(1.05); box-shadow: 0 0 0 4px var(--verde), 0 8px 10px rgba(0, 0, 0, 0.25); }
.total { text-align: center; font-size: 19px; font-weight: 700; margin: 12px 0 0; }

/* reloj */
.reloj { text-align: center; }
.reloj canvas { width: min(230px, 60vw); height: auto; }
.digital { margin: 2px 0 8px; font: 400 32px/1 "Lilita One", sans-serif; }
.reloj .botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 340px; margin: 0 auto; }
.reloj .botones button { border: 0; border-radius: 14px; padding: 11px; font-weight: 800; font-size: 17px; background: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 2px 0 rgba(0, 0, 0, 0.2); }

/* cuadrícula */
.cuadricula { display: grid; grid-template-columns: 28px repeat(var(--c), 1fr); gap: 4px; max-width: 400px; margin: 0 auto; }
.cuadricula > b { display: grid; place-items: center; font: 400 20px/1 "Lilita One", sans-serif; color: #7a3d1c; }
.cuadricula button { aspect-ratio: 1; border: 0; border-radius: 8px; padding: 0; background: #9fd2f2; display: grid; place-items: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12); }
.cuadricula.cuadro button { background: #e9dcc0; }
.cuadricula button.sel { box-shadow: 0 0 0 4px #e8352d; background: #fff6d2; }
.cuadricula .marca { width: 92%; }
.marca-e { font-size: 30px; line-height: 1; }

/* secuencia */
.serie { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 14px; }
.serie > span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 0, 0, 0.05); }
.serie .falta { border: 3px dashed #e8801a; font: 400 30px/1 "Lilita One", sans-serif; color: #e8801a; animation: latido 1.4s infinite; }
.serie .falta.bien { border-color: var(--verde); animation: none; }
.simb { width: 52px; height: 52px; }
.num { font: 400 26px/1 "Lilita One", sans-serif; }
.secuencia .ops { grid-template-columns: repeat(4, 1fr); }
.secuencia .ops button { border: 0; border-radius: 16px; padding: 8px 4px; background: #fff; display: grid; place-items: center; min-height: 70px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 2px 0 rgba(0, 0, 0, 0.2); }

/* ---------------------------------------------------------------- animaciones */
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes parpadeo { 50% { opacity: 0.2; } }
@keyframes nuevo { 0% { transform: scale(0.3) rotate(-20deg); } 100% { transform: scale(1); } }
@keyframes flota { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
@keyframes brinco { 0%, 100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-10px); } }
@keyframes gira { to { rotate: 360deg; } }
@keyframes aparece { from { opacity: 0; } }
@keyframes salta { from { transform: scale(0.6); opacity: 0; } }
@keyframes tiembla { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes pop { 50% { transform: scale(1.15); } }
@keyframes aviso { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }

/* el diploma, al imprimir */
@media print {
  body { background: #fff; }
  #app, #menu, .puzle, .doc, .fin-sala .btns { display: none !important; }
  .over { position: static; background: none; padding: 0; }
  .fin-sala { box-shadow: none; animation: none; }
}
