/* LO-E · shell immersive: una sola pantalla, HUD sobre el juego y sin scroll. */
:root {
  --loe-safe-top: env(safe-area-inset-top, 0px);
  --loe-safe-right: env(safe-area-inset-right, 0px);
  --loe-safe-bottom: env(safe-area-inset-bottom, 0px);
  --loe-safe-left: env(safe-area-inset-left, 0px);
  --loe-top-h: clamp(58px, 8.5vh, 84px);
  --loe-bottom-h: clamp(82px, 13vh, 116px);
  --loe-edge: clamp(10px, 1.8vw, 24px);
}

html.loe-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
  background: #050816;
}

html.loe-shell body {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

html.loe-shell body,
html.loe-shell button,
html.loe-shell input,
html.loe-shell .game,
html.loe-shell .stage,
html.loe-shell .notice,
html.loe-shell .notice-card {
  overscroll-behavior: none;
}

html.loe-shell button,
html.loe-shell input {
  font-family: "DM Mono", ui-monospace, monospace;
}

html.loe-shell .loe-fullscreen {
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 11px !important;
  z-index: 40 !important;
}

html.loe-shell .loe-fallback-fullscreen,
html.loe-shell .mobile-game:fullscreen,
html.loe-shell .mobile-game:-webkit-full-screen {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

/* ---------- Portada: launcher compacto, sin lista desplazable ---------- */
body.loe-page-index {
  background: #090b1a !important;
}

body.loe-page-index .wrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: calc(10px + var(--loe-safe-top)) calc(14px + var(--loe-safe-right)) calc(10px + var(--loe-safe-bottom)) calc(14px + var(--loe-safe-left)) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: clamp(8px, 1.6vh, 18px) !important;
  overflow: hidden !important;
}

body.loe-page-index .top {
  min-height: 34px;
  flex: 0 0 auto;
}

body.loe-page-index .logo,
body.loe-page-index .mark-img {
  height: 34px;
}

body.loe-page-index .by {
  margin-left: auto;
  margin-right: 8px;
  font-size: clamp(.54rem, 1.2vw, .68rem);
  line-height: 1.15;
}

body.loe-page-index .top .loe-fullscreen {
  position: static !important;
  display: inline-flex !important;
  flex: 0 0 auto;
}

body.loe-page-index .itch-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9px;
  color: #f7f7ff;
  background: rgba(255,255,255,.06);
  font: 700 .62rem "DM Mono", monospace;
  text-decoration: none;
  white-space: nowrap;
}
body.loe-page-index .itch-link:hover,
body.loe-page-index .itch-link:focus-visible {
  border-color: #b7ff3c;
  color: #b7ff3c;
  outline: none;
}

body.loe-page-index .hero {
  min-height: 0;
  padding: clamp(4px, 1.2vh, 18px) 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .62fr);
  align-items: end;
  gap: clamp(12px, 3vw, 42px);
}

body.loe-page-index .eyebrow {
  margin-bottom: 7px;
  font-size: clamp(.54rem, 1.3vw, .7rem);
}

body.loe-page-index .hero h1 {
  max-width: 760px;
  font-size: clamp(2.25rem, 7.5vw, 6rem);
  line-height: .86;
}

body.loe-page-index .hero p:not(.eyebrow) {
  max-width: 480px;
  margin: 12px 0 0;
  font-size: clamp(.78rem, 1.5vw, 1rem);
  line-height: 1.35;
}

body.loe-page-index .hero .loe-install {
  margin: 8px 0 0;
}
body.loe-page-index .free-games-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 8px 0 0 8px;
  color: #b7ff3c;
  font: 700 .68rem "DM Mono", monospace;
  text-decoration: none;
}
body.loe-page-index .free-games-link:hover,
body.loe-page-index .free-games-link:focus-visible {
  color: #fff;
  outline: none;
}

body.loe-page-index .games {
  min-height: 0 !important;
  height: 100%;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(7px, 1.3vw, 16px) !important;
}

body.loe-page-index .card {
  min-width: 0;
  min-height: 0 !important;
  height: 100%;
  padding: clamp(10px, 1.6vw, 24px) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  border-radius: 17px !important;
  overflow: hidden;
}

body.loe-page-index .card.object3d {
  grid-column: auto;
}

body.loe-page-index .card .number {
  flex: 0 0 auto;
  font-size: clamp(.5rem, 1vw, .65rem);
  line-height: 1.1;
}

body.loe-page-index .card h2 {
  margin: 0;
  max-width: none;
  position: static;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(1rem, 2.2vw, 1.65rem);
  line-height: .94;
}

body.loe-page-index .card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  font-size: clamp(.64rem, 1.15vw, .82rem);
  line-height: 1.28;
}

body.loe-page-index .card .play {
  position: static;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
  margin-top: auto;
  font-size: clamp(.58rem, 1.1vw, .7rem);
}


body.loe-page-index .card.favorito::after {
  background: radial-gradient(circle at 42% 40%, #ffd166 0 8%, #ff3b47 9% 20%, #1a1c26 21% 34%, transparent 35%);
}

body.loe-page-index .card.blob::after {
  background: radial-gradient(circle at 45% 45%, #b7ff3c 0 12%, #55e6ff 13% 27%, #9a7cff 28% 42%, transparent 43%);
}


body.loe-page-index .card::after {
  width: 130px;
  height: 130px;
  right: -38px;
  bottom: -42px;
  opacity: .65;
}

body.loe-page-index .footer {
  min-height: 14px;
  margin: 0;
  font-size: .55rem;
  line-height: 1;
}

/* ---------- Quiz: pregunta y respuestas dentro del viewport ---------- */
body.loe-page-quiz .page {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.loe-page-quiz .site-header {
  position: fixed !important;
  z-index: 25;
  top: calc(8px + var(--loe-safe-top)) !important;
  left: calc(14px + var(--loe-safe-left)) !important;
  right: calc(14px + var(--loe-safe-right)) !important;
  margin: 0 !important;
  pointer-events: none;
}

body.loe-page-quiz .brand-img {
  height: 29px;
}

body.loe-page-quiz .studio {
  display: none;
}

body.loe-page-quiz .game-card {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
}

body.loe-page-quiz .game-top {
  position: absolute !important;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  min-height: 0;
  height: calc(88px + var(--loe-safe-top));
  padding: calc(40px + var(--loe-safe-top)) clamp(14px, 3vw, 34px) 8px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr);
  align-items: end;
  gap: 16px;
  border: 0 !important;
  background: linear-gradient(180deg, rgba(8, 12, 35, .98), rgba(8, 12, 35, .72) 70%, transparent) !important;
}

body.loe-page-quiz .game-top .eyebrow,
body.loe-page-quiz .game-top .intro {
  display: none !important;
}

body.loe-page-quiz .game-top h1 {
  font-size: clamp(1.2rem, 3.8vw, 2.25rem);
  line-height: .95;
}

body.loe-page-quiz .status {
  width: 100%;
  margin: 0 !important;
  gap: 8px;
}

body.loe-page-quiz #progress-text {
  font-size: .65rem;
}

body.loe-page-quiz .progress-track {
  height: 6px;
}

body.loe-page-quiz .game-top .loe-fullscreen-inline {
  position: absolute !important;
  top: calc(8px + var(--loe-safe-top));
  right: calc(14px + var(--loe-safe-right));
  width: 42px;
  overflow: hidden;
  white-space: nowrap;
  color: transparent !important;
  font-size: 0 !important;
}

body.loe-page-quiz .game-top .loe-fullscreen-inline::before {
  content: "⛶";
  color: #f7f7ff;
  font-size: 1rem;
}

body.loe-page-quiz .boot,
body.loe-page-quiz .quiz-body,
body.loe-page-quiz .results {
  position: absolute !important;
  z-index: 8;
  inset: calc(88px + var(--loe-safe-top)) clamp(10px, 3vw, 34px) calc(12px + var(--loe-safe-bottom)) !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

body.loe-page-quiz .boot {
  display: grid !important;
  place-items: center;
}

body.loe-page-quiz .boot > div,
body.loe-page-quiz .quiz-body,
body.loe-page-quiz .results {
  max-width: 820px;
  width: 100%;
  margin: auto;
}

body.loe-page-quiz .boot-copy {
  font-size: clamp(.58rem, 1.4vw, .72rem);
}

body.loe-page-quiz .boot-button,
body.loe-page-quiz .next,
body.loe-page-quiz .skip,
body.loe-page-quiz .option {
  font-family: "DM Mono", ui-monospace, monospace;
}

body.loe-page-quiz .quiz-body {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 1.5vh, 15px);
  text-align: center;
}

body.loe-page-quiz .topic {
  color: var(--cyan);
  font-size: clamp(.58rem, 1.4vw, .72rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.loe-page-quiz .question {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 3.4vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

body.loe-page-quiz .options {
  width: min(760px, 100%);
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
}

body.loe-page-quiz .option {
  min-height: clamp(48px, 8vh, 72px);
  padding: 9px 12px !important;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-size: clamp(.65rem, 1.35vw, .82rem);
  line-height: 1.18;
}

body.loe-page-quiz .option .letter {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: .7rem;
}

body.loe-page-quiz .feedback {
  min-height: 1.25em;
  max-width: 700px;
  font-size: clamp(.62rem, 1.35vw, .78rem);
  line-height: 1.25;
}

body.loe-page-quiz .feedback:empty {
  display: none !important;
}

body.loe-page-quiz .next,
body.loe-page-quiz .skip {
  min-height: 38px;
  padding: 8px 14px !important;
  font-size: .68rem;
}

body.loe-page-quiz .results {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

body.loe-page-quiz .results .result-orb {
  width: clamp(84px, 18vw, 150px);
  height: clamp(84px, 18vw, 150px);
}

body.loe-page-quiz .results h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.5rem);
}

body.loe-page-quiz .results p {
  max-width: 540px;
  margin: 0;
  font-size: clamp(.72rem, 1.5vw, .9rem);
}

body.loe-page-quiz .footer {
  display: none !important;
}

/* Estado real del quiz: los paneles se muestran sólo cuando la lógica los activa. */
body.loe-page-quiz .boot {
  display: none !important;
}
body.loe-page-quiz .boot.show {
  display: grid !important;
}
body.loe-page-quiz .quiz-body {
  display: none !important;
}
body.loe-page-quiz .quiz-body[style*="display: block"] {
  display: flex !important;
}
body.loe-page-quiz .results {
  display: none !important;
}
body.loe-page-quiz .results.show {
  display: flex !important;
}

/* ---------- Escondite 2D/3D: canvas a pantalla completa, HUD en bordes ---------- */
body.loe-page-escondite-objeto .page,
body.loe-page-escondite-objeto-3d .page {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.loe-page-escondite-objeto .top,
body.loe-page-escondite-objeto-3d .top,
body.loe-page-escondite-objeto .intro,
body.loe-page-escondite-objeto-3d .intro,
body.loe-page-escondite-objeto .footer,
body.loe-page-escondite-objeto-3d .footer,
body.loe-page-escondite-objeto .below,
body.loe-page-escondite-objeto-3d .below {
  display: none !important;
}

body.loe-page-escondite-objeto .game,
body.loe-page-escondite-objeto-3d .game {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
}

body.loe-page-escondite-objeto .game-head,
body.loe-page-escondite-objeto-3d .game-head {
  position: absolute !important;
  z-index: 12;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--loe-top-h) + var(--loe-safe-top));
  min-height: 0;
  padding: calc(9px + var(--loe-safe-top)) var(--loe-edge) 7px !important;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 0 !important;
  background: linear-gradient(180deg, rgba(5, 10, 29, .96), rgba(5, 10, 29, .68) 72%, transparent) !important;
  pointer-events: none;
}

body.loe-page-escondite-objeto .game-head h2,
body.loe-page-escondite-objeto-3d .game-head h2 {
  margin: 0;
  font-size: clamp(.85rem, 2.2vw, 1.25rem);
  line-height: 1;
}

/* Deja hueco al botón fijo de menú. */
body.loe-page-escondite-objeto .game-head,
body.loe-page-escondite-objeto-3d .game-head {
  padding-left: calc(86px + var(--loe-safe-left)) !important;
}

body.loe-page-escondite-objeto .game-head p,
body.loe-page-escondite-objeto-3d .game-head p {
  display: none !important;
}

body.loe-page-escondite-objeto .stats,
body.loe-page-escondite-objeto-3d .stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 58vw;
}

body.loe-page-escondite-objeto .stat,
body.loe-page-escondite-objeto-3d .stat {
  min-width: 52px;
  padding: 5px 7px !important;
  border-radius: 8px;
  background: rgba(5, 10, 29, .64);
  text-align: right;
}

body.loe-page-escondite-objeto .stat span,
body.loe-page-escondite-objeto-3d .stat span {
  display: block;
  font-size: .48rem;
  line-height: 1;
}

body.loe-page-escondite-objeto .stat b,
body.loe-page-escondite-objeto-3d .stat b {
  display: block;
  margin-top: 3px;
  font-size: clamp(.65rem, 1.5vw, .82rem);
  line-height: 1;
}

body.loe-page-escondite-objeto .stage,
body.loe-page-escondite-objeto-3d .stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: #07152f;
}

body.loe-page-escondite-objeto .stage canvas,
body.loe-page-escondite-objeto-3d .stage canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block;
  object-fit: cover;
  touch-action: none;
}

body.loe-page-escondite-objeto .stage-tag,
body.loe-page-escondite-objeto-3d .stage-hud {
  top: calc(var(--loe-top-h) + var(--loe-safe-top) + 4px) !important;
  left: var(--loe-edge) !important;
  right: var(--loe-edge) !important;
  z-index: 9 !important;
}

body.loe-page-escondite-objeto .stage-hud {
  pointer-events: none;
}

body.loe-page-escondite-objeto .overlay,
body.loe-page-escondite-objeto-3d .overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 30;
  display: grid !important;
  place-items: center;
  padding: calc(96px + var(--loe-safe-top)) 14px calc(100px + var(--loe-safe-bottom)) !important;
  overflow: hidden !important;
  background: rgba(3, 8, 24, .55) !important;
}

body.loe-page-escondite-objeto .overlay.hidden,
body.loe-page-escondite-objeto-3d .overlay.hidden {
  display: none !important;
}

body.loe-page-escondite-objeto .overlay-card,
body.loe-page-escondite-objeto-3d .overlay-card {
  width: min(620px, 100%);
  max-height: 100%;
  padding: clamp(15px, 3vw, 28px) !important;
  overflow: hidden;
  border-radius: 18px;
}

body.loe-page-escondite-objeto .overlay-card h3,
body.loe-page-escondite-objeto-3d .overlay-card h3 {
  margin: 5px 0 10px;
  font-size: clamp(1.35rem, 4.8vw, 2.5rem);
  line-height: .98;
}

body.loe-page-escondite-objeto .overlay-card p,
body.loe-page-escondite-objeto-3d .overlay-card p {
  margin: 0 0 14px;
  font-size: clamp(.68rem, 1.6vw, .86rem);
  line-height: 1.35;
}

body.loe-page-escondite-objeto .button-row,
body.loe-page-escondite-objeto-3d .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.loe-page-escondite-objeto .button-row button,
body.loe-page-escondite-objeto-3d .button-row button {
  min-height: 40px;
  padding: 8px 12px !important;
  font-size: .66rem;
}

body.loe-page-escondite-objeto .mobile-controls,
body.loe-page-escondite-objeto-3d .mobile-controls {
  position: absolute !important;
  z-index: 18 !important;
  left: 0;
  right: 0;
  bottom: 0;
  inset: auto 0 0 !important;
  min-height: var(--loe-bottom-h);
  padding: 8px calc(10px + var(--loe-safe-right)) calc(9px + var(--loe-safe-bottom)) calc(10px + var(--loe-safe-left)) !important;
  background: linear-gradient(transparent, rgba(3, 8, 24, .92) 42%) !important;
}

body.loe-page-escondite-objeto .mobile-controls[hidden],
body.loe-page-escondite-objeto-3d .mobile-controls[hidden] {
  display: none !important;
}

body.loe-page-escondite-objeto .game > .button-row,
body.loe-page-escondite-objeto-3d .game > .button-row {
  position: absolute !important;
  z-index: 17;
  left: 50% !important;
  right: auto !important;
  bottom: calc(10px + var(--loe-safe-bottom)) !important;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 6px !important;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(4, 9, 26, .78);
}

body.loe-page-escondite-objeto .game > .button-row button,
body.loe-page-escondite-objeto-3d .game > .button-row button {
  min-height: 34px;
  padding: 6px 9px !important;
  font-size: .58rem;
}

body.loe-page-escondite-objeto .crosshair {
  z-index: 10;
}

body.loe-page-escondite-objeto #toast,
body.loe-page-escondite-objeto-3d #toast {
  bottom: calc(var(--loe-bottom-h) + var(--loe-safe-bottom) + 10px) !important;
}

@media (pointer: coarse), (max-width: 760px) {
  body.loe-page-escondite-objeto .game > .button-row,
  body.loe-page-escondite-objeto-3d .game > .button-row {
    display: none !important;
  }
}

/* ---------- Stickman: arena completa, HUD compacto y acciones abajo ---------- */
body.loe-page-stickman-ia .wrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.loe-page-stickman-ia .top {
  position: fixed !important;
  z-index: 20;
  top: calc(8px + var(--loe-safe-top)) !important;
  left: calc(12px + var(--loe-safe-left)) !important;
  right: calc(12px + var(--loe-safe-right)) !important;
  height: 30px;
  margin: 0 !important;
  pointer-events: none;
}

body.loe-page-stickman-ia .top span {
  font-size: .62rem;
}

body.loe-page-stickman-ia .top a {
  pointer-events: auto;
  font-size: .62rem;
}

body.loe-page-stickman-ia .wrap > h1,
body.loe-page-stickman-ia .wrap > .help,
body.loe-page-stickman-ia .panel,
body.loe-page-stickman-ia .stickman-stage + .row + .row {
  display: none !important;
}

body.loe-page-stickman-ia .hud {
  position: fixed !important;
  z-index: 19;
  top: calc(43px + var(--loe-safe-top)) !important;
  left: calc(10px + var(--loe-safe-left)) !important;
  right: calc(10px + var(--loe-safe-right)) !important;
  max-height: 48px;
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  pointer-events: none;
}

body.loe-page-stickman-ia .pill {
  padding: 4px 6px !important;
  border-radius: 7px;
  font-size: .55rem;
  line-height: 1;
}

body.loe-page-stickman-ia .pill b {
  font-size: .62rem;
}

body.loe-page-stickman-ia .stickman-stage {
  position: fixed !important;
  z-index: 0;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
}

body.loe-page-stickman-ia .stickman-stage::after {
  content: "+";
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  color: #fff;
  font: 12px/16px monospace;
  text-align: center;
  pointer-events: none;
  opacity: .8;
}

body.loe-page-stickman-ia .stickman-stage canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
  border: 0 !important;
  border-radius: 0 !important;
}

body.loe-page-stickman-ia .stickman-stage .loe-fullscreen-inline {
  position: fixed !important;
  z-index: 30;
  top: calc(7px + var(--loe-safe-top)) !important;
  right: calc(10px + var(--loe-safe-right)) !important;
  display: inline-flex !important;
}

body.loe-page-stickman-ia .stickman-stage + .row {
  position: fixed !important;
  z-index: 20;
  left: calc(8px + var(--loe-safe-left)) !important;
  right: calc(8px + var(--loe-safe-right)) !important;
  bottom: calc(8px + var(--loe-safe-bottom)) !important;
  min-height: 48px;
  margin: 0 !important;
  padding: 6px !important;
  display: flex !important;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  background: rgba(7, 10, 28, .9);
}

body.loe-page-stickman-ia .stickman-stage + .row button,
body.loe-page-stickman-ia .stickman-stage + .row input {
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px !important;
  font-size: .57rem;
  white-space: nowrap;
}

body.loe-page-stickman-ia .stickman-stage + .row input {
  display: none;
}

body.loe-page-stickman-ia #touch {
  position: fixed !important;
  z-index: 21;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: var(--loe-bottom-h);
  padding: 7px calc(10px + var(--loe-safe-right)) calc(8px + var(--loe-safe-bottom)) calc(10px + var(--loe-safe-left)) !important;
  background: linear-gradient(transparent, rgba(4, 7, 20, .92) 45%);
}

body.loe-page-stickman-ia #toast,
body.loe-page-stickman-ia #subs {
  bottom: calc(var(--loe-bottom-h) + var(--loe-safe-bottom) + 10px) !important;
}

@media (pointer: coarse), (max-width: 760px) {
  body.loe-page-stickman-ia .stickman-stage + .row {
    display: none !important;
  }
  body.loe-page-stickman-ia .hud {
    justify-content: flex-start;
  }
  body.loe-page-stickman-ia .pill:nth-child(n+7) {
    display: none;
  }
}

/* ---------- Escape Isla: mundo 3D y HUD nativo ---------- */
body.loe-page-escape-island {
  background: #061923 !important;
}

body.loe-page-escape-island #islandCanvas {
  position: fixed !important;
  z-index: 0;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: block;
}

body.loe-page-escape-island .hud {
  position: fixed !important;
  z-index: 5;
  inset: 0 !important;
  pointer-events: none;
}

body.loe-page-escape-island .brand {
  top: calc(9px + var(--loe-safe-top)) !important;
  left: calc(60px + var(--loe-safe-left)) !important;
  font-size: .7rem;
}

body.loe-page-escape-island .mark-img {
  height: 27px;
}

body.loe-page-escape-island .panel {
  top: calc(45px + var(--loe-safe-top)) !important;
  left: calc(10px + var(--loe-safe-left)) !important;
  width: min(330px, calc(100vw - 20px - var(--loe-safe-left) - var(--loe-safe-right))) !important;
  padding: 8px 10px !important;
  border-radius: 10px;
}

body.loe-page-escape-island .objective {
  font-size: clamp(.68rem, 1.7vw, .84rem);
  line-height: 1.2;
}

body.loe-page-escape-island .meters {
  top: calc(9px + var(--loe-safe-top)) !important;
  right: calc(10px + var(--loe-safe-right)) !important;
  width: min(155px, 38vw);
}

body.loe-page-escape-island .meter {
  margin-bottom: 5px;
}

body.loe-page-escape-island .meter span {
  margin-bottom: 2px;
  font-size: .5rem;
}

body.loe-page-escape-island .bar {
  height: 6px;
}

body.loe-page-escape-island .inventory {
  left: calc(10px + var(--loe-safe-left)) !important;
  bottom: calc(10px + var(--loe-safe-bottom)) !important;
  padding: 7px 9px !important;
  border-radius: 9px;
  font-size: .58rem;
  line-height: 1.35;
}

body.loe-page-escape-island .hint {
  left: 50% !important;
  bottom: calc(10px + var(--loe-safe-bottom)) !important;
  max-width: min(44vw, 420px);
  padding: 7px 9px !important;
  font-size: .56rem;
  line-height: 1.2;
}

body.loe-page-escape-island .admin {
  right: calc(10px + var(--loe-safe-right)) !important;
  bottom: calc(10px + var(--loe-safe-bottom)) !important;
  padding: 7px 9px !important;
  font-size: .56rem;
}

body.loe-page-escape-island .notice {
  position: fixed !important;
  z-index: 40;
  inset: 0 !important;
  display: grid !important;
  place-items: center;
  padding: calc(12px + var(--loe-safe-top)) calc(12px + var(--loe-safe-right)) calc(12px + var(--loe-safe-bottom)) calc(12px + var(--loe-safe-left)) !important;
  overflow: hidden !important;
}

body.loe-page-escape-island .notice:not(.hide) ~ .inventory,
body.loe-page-escape-island .notice:not(.hide) ~ .roster,
body.loe-page-escape-island .notice:not(.hide) ~ .hint,
body.loe-page-escape-island .hud:has(.notice:not(.hide)) .inventory,
body.loe-page-escape-island .hud:has(.notice:not(.hide)) .roster,
body.loe-page-escape-island .hud:has(.notice:not(.hide)) .hint,
body.loe-page-escape-island:has(.notice:not(.hide)) .admin {
  display: none !important;
}

body.loe-page-escape-island .notice-card {
  width: min(650px, 100%);
  max-height: 100%;
  overflow: hidden !important;
  padding: clamp(14px, 3vw, 28px) !important;
  border-radius: 18px;
}

body.loe-page-escape-island .notice-card h1 {
  margin: 5px 0 10px;
  font-size: clamp(1.8rem, 6vw, 4rem);
  line-height: .9;
}

body.loe-page-escape-island .notice-card p {
  margin: 6px 0;
  font-size: clamp(.66rem, 1.5vw, .84rem);
  line-height: 1.25;
}

body.loe-page-escape-island .name-row,
body.loe-page-escape-island .mode-row {
  gap: 6px;
  margin: 7px 0;
}

body.loe-page-escape-island input,
body.loe-page-escape-island .mode-btn,
body.loe-page-escape-island .start {
  min-height: 36px;
  padding: 7px 9px !important;
  font-size: .65rem;
}

body.loe-page-escape-island .start {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

body.loe-page-escape-island .gear,
body.loe-page-escape-island > .loe-fullscreen {
  position: fixed !important;
  z-index: 35;
  top: calc(8px + var(--loe-safe-top)) !important;
  right: calc(10px + var(--loe-safe-right)) !important;
  width: 40px;
  min-height: 40px !important;
  padding: 0 !important;
  overflow: hidden;
  white-space: nowrap;
  color: transparent !important;
  font-size: 0 !important;
}

body.loe-page-escape-island .gear {
  right: calc(58px + var(--loe-safe-right)) !important;
  color: #f7f7ff !important;
  font-size: 1.1rem !important;
}

body.loe-page-escape-island > .loe-fullscreen::before {
  content: "⛶";
  color: #f7f7ff;
  font-size: 1rem;
}

body.loe-page-escape-island .settings {
  position: fixed !important;
  z-index: 50;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

body.loe-page-escape-island .tools {
  position: fixed !important;
  z-index: 30;
  top: calc(56px + var(--loe-safe-top)) !important;
  right: calc(10px + var(--loe-safe-right)) !important;
  bottom: auto !important;
  left: auto !important;
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 230px;
}

body.loe-page-escape-island .tools.show {
  display: flex !important;
}

body.loe-page-escape-island #cross {
  z-index: 6;
}

@media (pointer: coarse), (max-width: 760px) {
  body.loe-page-escape-island .inventory {
    bottom: calc(145px + var(--loe-safe-bottom)) !important;
  }
  body.loe-page-escape-island .hint {
    display: none !important;
  }
  body.loe-page-escape-island .admin {
    bottom: calc(145px + var(--loe-safe-bottom)) !important;
  }
  body.loe-page-escape-island .notice-card {
    padding: 12px !important;
  }
  body.loe-page-escape-island .notice-card p {
    font-size: .62rem;
    line-height: 1.18;
  }
  body.loe-page-escape-island .notice-card h1 {
    font-size: clamp(1.55rem, 8vw, 2.6rem);
  }
}

@media (max-height: 560px) {
  body.loe-page-escape-island .notice-card p:nth-of-type(n+3) {
    display: none;
  }
  body.loe-page-escape-island .notice-card .name-row,
  body.loe-page-escape-island .notice-card .mode-row {
    margin: 4px 0;
  }
  body.loe-page-escape-island .inventory {
    display: none;
  }
}

/* Modo ligero para tablets: menos composición GPU, mismo HUD y controles. */
@media (pointer: coarse), (max-width: 1100px) and (pointer: coarse) {
  html.loe-shell body::before,
  html.loe-shell body::after {
    display: none !important;
  }
  html.loe-shell .game-card,
  html.loe-shell .game,
  html.loe-shell .notice-card,
  html.loe-shell .panel,
  html.loe-shell .overlay-card,
  html.loe-shell .mobile-game .panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html.loe-shell .game-card,
  html.loe-shell .game {
    box-shadow: none !important;
  }
}

/* ---------- Ajustes de forma ---------- */
@media (orientation: portrait) {
  body.loe-page-index .card p {
    display: none;
  }
  body.loe-page-index .card {
    gap: 2px;
    padding: clamp(8px, 2vw, 11px) !important;
  }
  body.loe-page-index .card h2 {
    font-size: clamp(.85rem, 3.4vw, 1.05rem);
  }
  body.loe-page-index .card .number {
    font-size: .45rem;
  }
  body.loe-page-index .card .play {
    font-size: .5rem;
  }
  body.loe-page-quiz .options {
    grid-template-columns: 1fr;
  }
  body.loe-page-quiz .option {
    min-height: 44px;
  }
}

@media (orientation: landscape) {
  body.loe-page-index .hero {
    grid-template-columns: minmax(0, .42fr) minmax(0, 1fr);
    gap: clamp(8px, 1.4vw, 22px);
  }
  body.loe-page-index .hero h1 {
    font-size: clamp(1.5rem, 3.2vw, 2.7rem);
    letter-spacing: -.05em;
  }
  body.loe-page-index .hero .welcome {
    margin-top: 5px;
    font-size: clamp(.66rem, 1.1vw, .8rem);
  }
  body.loe-page-index .hero .welcome-row {
    margin-top: 3px;
  }
  body.loe-page-index .games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  body.loe-page-index .card.object3d {
    grid-column: auto;
  }
  body.loe-page-index .card.blob {
    grid-column: auto;
  }
  body.loe-page-index .card {
    gap: 5px;
    padding: clamp(10px, 1.2vw, 18px) !important;
  }
  body.loe-page-index .card h2 {
    font-size: clamp(.95rem, 1.6vw, 1.35rem);
  }
  body.loe-page-index .card .number {
    font-size: .55rem;
  }
  body.loe-page-index .card .play {
    font-size: .62rem;
  }
  body.loe-page-index .card p {
    -webkit-line-clamp: 3;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  body.loe-page-index .hero {
    grid-template-columns: minmax(0, .5fr) minmax(0, 1fr);
  }
  body.loe-page-index .hero h1 {
    font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  }
  body.loe-page-index .hero p:not(.eyebrow) {
    display: none;
  }
  body.loe-page-index .games {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
  }
  body.loe-page-index .card.blob {
    grid-column: auto;
  }
  body.loe-page-index .card p {
    display: none;
  }
  body.loe-page-index .card h2 {
    font-size: clamp(.8rem, 1.5vw, 1.05rem);
  }
  body.loe-page-index .card .number {
    font-size: .42rem;
  }
  body.loe-page-index .card .play {
    font-size: .46rem;
  }
  body.loe-page-index .card {
    gap: 2px;
    padding: clamp(6px, 1vw, 10px) !important;
  }
}

@media (max-height: 620px) {
  body.loe-page-index .hero h1 {
    font-size: clamp(1.8rem, 6vw, 3.8rem);
  }
  body.loe-page-index .hero p:not(.eyebrow) {
    margin-top: 5px;
    font-size: .68rem;
  }
  body.loe-page-index .card p {
    display: none;
  }
  body.loe-page-index .card h2 {
    font-size: clamp(.92rem, 2vw, 1.25rem);
  }
  body.loe-page-quiz .question {
    font-size: clamp(.9rem, 3vw, 1.5rem);
  }
  body.loe-page-quiz .option {
    min-height: 40px;
    padding: 6px 9px !important;
  }
}

@media (max-width: 600px) {
  body.loe-page-quiz .game-top {
    height: calc(102px + var(--loe-safe-top));
    grid-template-columns: minmax(0, 1fr) 42%;
    padding-top: calc(48px + var(--loe-safe-top)) !important;
  }
  body.loe-page-quiz .game-top h1 {
    max-width: 58vw;
    font-size: clamp(.88rem, 3.4vw, 1.15rem);
    line-height: .9;
  }
  body.loe-page-quiz .game-top .status {
    align-self: end;
  }
  body.loe-page-quiz .game-top .loe-fullscreen-inline {
    top: calc(8px + var(--loe-safe-top)) !important;
    right: calc(12px + var(--loe-safe-right)) !important;
  }
}

@media (max-width: 380px) {
  body.loe-page-index .by { display: none !important; }
  body.loe-page-index .itch-link { padding-inline: 7px; font-size: .55rem; }
  body.loe-page-index .card {
    padding: 8px !important;
  }
  body.loe-page-index .card h2 {
    font-size: .9rem;
  }
  body.loe-page-index .card .number {
    font-size: .45rem;
  }
  body.loe-page-escondite-objeto .stats,
  body.loe-page-escondite-objeto-3d .stats {
    max-width: 62vw;
  }
  body.loe-page-escondite-objeto .stat,
  body.loe-page-escondite-objeto-3d .stat {
    min-width: 45px;
    padding: 4px 5px !important;
  }
}

/* ---------- Pantallas bajas: portada compacta sin solapes ---------- */
@media (max-height: 520px) {
  body.loe-page-index .wrap {
    gap: 6px !important;
  }
  body.loe-page-index .hero {
    align-items: center;
  }
  body.loe-page-index .hero h1 {
    font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  }
  body.loe-page-index .hero .loe-install,
  body.loe-page-index .eyebrow,
  body.loe-page-index .free-games-link {
    display: none;
  }
  body.loe-page-index .card {
    gap: 2px;
    padding: clamp(6px, 1vw, 10px) !important;
  }
  body.loe-page-index .card h2 {
    font-size: clamp(.8rem, 1.5vw, 1.1rem);
  }
  body.loe-page-index .card .number {
    font-size: .42rem;
  }
  body.loe-page-index .card .play {
    font-size: .46rem;
  }
  body.loe-page-index .card p {
    display: none;
  }
}

/* Horizontal corto: 4 columnas x 2 filas para que los títulos respiren. */
@media (orientation: landscape) and (max-height: 520px) {
  body.loe-page-index .games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  body.loe-page-index .card.blob {
    grid-column: auto;
  }
  body.loe-page-index .card .number {
    font-size: .38rem;
  }
  body.loe-page-index .card h2 {
    font-size: clamp(.78rem, 1.7vw, 1.15rem);
  }
  body.loe-page-index .card .play {
    font-size: .5rem;
  }
}

/* ---------- Idioma y mensaje editable de la portada ---------- */
.loe-lang{display:inline-flex;gap:3px;padding:3px;border:1px solid rgba(255,255,255,.22);border-radius:9px;background:rgba(255,255,255,.06)}
.loe-lang button{min-height:22px;padding:2px 7px;border:0;border-radius:6px;background:transparent;color:#aeb2ce;font:700 .54rem "DM Mono",monospace;letter-spacing:.06em;white-space:nowrap;cursor:pointer;transition:background .2s,color .2s}
.loe-lang button:hover{color:#fff}
.loe-lang button.is-active{background:#b7ff3c;color:#0a1630}
.loe-lang button:focus-visible{outline:2px solid #b7ff3c;outline-offset:2px}
@media (max-width:560px){
  body.loe-page-index .by{display:none !important}
  .loe-lang{padding:2px}
  .loe-lang button{padding:2px 5px;font-size:.5rem}
  body.loe-page-index .top .loe-fullscreen{font-size:0;min-width:34px;padding:6px 8px}
  body.loe-page-index .top .loe-fullscreen::before{content:"⛶";font-size:1rem;line-height:1}
  body.loe-page-index .itch-link{padding:7px 8px;font-size:.56rem}
}
body.loe-page-index .hero .welcome{max-width:520px;margin:8px 0 0;font-size:clamp(.7rem,1.4vw,.88rem);line-height:1.35}
body.loe-page-index .hero .welcome-row{margin:6px 0 0}
body.loe-page-index .hero .welcome-edit{padding:5px 9px;border:1px solid rgba(255,255,255,.22);border-radius:8px;background:rgba(255,255,255,.06);color:#aeb2ce;font:700 .54rem "DM Mono",monospace;letter-spacing:.1em;cursor:pointer;transition:color .2s,border-color .2s}
body.loe-page-index .hero .welcome-edit:hover,body.loe-page-index .hero .welcome-edit:focus-visible{color:#b7ff3c;border-color:#b7ff3c;outline:none}
.loe-edit-sheet{position:fixed;inset:0;z-index:960;display:grid;place-items:center;padding:calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));background:rgba(4,8,22,.7);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-family:"Space Grotesk",system-ui,sans-serif}
.loe-edit-sheet .loe-gate-card{width:min(420px,100%)}
.loe-edit-sheet .loe-intro-input{width:100%;margin-top:10px;padding:11px 12px;border:1px solid rgba(255,255,255,.24);border-radius:11px;background:rgba(4,9,22,.86);color:#f7f7ff;font:500 .78rem/1.35 "Space Grotesk",system-ui,sans-serif;resize:none}
.loe-edit-sheet .loe-intro-input:focus{outline:2px solid #55e6ff;outline-offset:1px}
.loe-edit-sheet .loe-intro-editrow{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:12px}
.loe-edit-sheet .loe-intro-editrow button{padding:8px 11px;border:1px solid rgba(255,255,255,.2);border-radius:9px;background:rgba(255,255,255,.06);color:#f7f7ff;font:700 .56rem "DM Mono",monospace;letter-spacing:.08em;cursor:pointer}
.loe-edit-sheet .loe-intro-editrow button:hover{border-color:#b7ff3c;color:#b7ff3c}
.loe-edit-sheet .loe-intro-editrow .is-save{border-color:transparent;background:linear-gradient(110deg,#55e6ff,#9a7cff);color:#07121c}
