/* ================================================================ Modus „Gaming-Battle“
   Grundoptik aus mode-gaming.css (dessen Selektoren gelten auch für battle). Hier: Lobby-Hinweis und
   Handy-Hinweis, Spiel-Einblendung (.emuintro), Quest-Bildschirm (.emuq / .eh-*), Steuerung (.kc, .pb),
   das eigene Spiel über der Show (#emulayer) und der Zieleinlauf. Größen in rem: die Show skaliert mit. */

.lobbyv .battlenote { display: none; }
body.play[data-mode="battle"] .lobbyv .gamingnote { display: none; }
body.play[data-mode="battle"] .lobbyv .battlenote { display: block; font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.08em; color: var(--yellow); line-height: 1.6; }

/* Handy: gespielt wird am PC */
.battlehint { margin: auto; max-width: 26rem; padding: 1.6rem 1.4rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.battlehint .bh-ic { font-size: 3.4rem; line-height: 1; animation: bounce 1.2s steps(3) infinite; }
.battlehint p { margin: 0; font-weight: 700; line-height: 1.4; }
.battlehint .bh-url b { display: inline-block; margin: 0.3rem 0; font-size: 1.05rem; word-break: break-all; }

/* ---------------------------------------------------------------- Steuerung: Tastenkappen und Controller-Knöpfe */
.kc {
  display: inline-grid; place-items: center; min-width: 2.1em; height: 2.1em; padding: 0 0.45em;
  font: 800 0.95em/1 var(--font-body); color: var(--ink); white-space: nowrap;
  background: linear-gradient(#fff, #e6e0ff); border: 2px solid var(--ink); border-bottom-width: 5px; border-radius: 7px;
}
.kc.wide { min-width: 3.4em; font-size: 0.82em; height: 2.55em; }
.kc-arrows { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; }
.kc-arrows .kc { min-width: 1.75em; height: 1.75em; font-size: 0.85em; border-bottom-width: 4px; }
.kc-arrows .kc:nth-child(1) { grid-area: 1 / 2; }
.kc-arrows .kc:nth-child(2) { grid-area: 2 / 1; }
.kc-arrows .kc:nth-child(3) { grid-area: 2 / 2; }
.kc-arrows .kc:nth-child(4) { grid-area: 2 / 3; }
.pb {
  display: inline-grid; place-items: center; width: 2.1em; height: 2.1em; flex: none;
  font: 900 0.95em/1 var(--font-body); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  background: #3a2a6b; border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 50%;
}
.pb.pad { border-radius: 8px; width: auto; min-width: 2.1em; padding: 0 0.5em; }
.pb.wide { width: auto; padding: 0 0.6em; border-radius: 99px; font-size: 0.8em; height: 2.6em; }
.pb.pad-a { background: #2f9e44; }
.pb.pad-b { background: #e03131; }
.pb.pad-x { background: #1c7ed6; }
.pb.pad-y { background: #f2b705; color: var(--ink); text-shadow: none; }
.pb.stick { background: radial-gradient(circle at 50% 40%, #6b5bb0, #2a1f55); font-size: 0.8em; }
.pb.dpad { position: relative; background: none; border: 0; }
.pb.dpad::before, .pb.dpad::after, .pb.dpad i { content: ''; position: absolute; background: #3a2a6b; border: 2px solid var(--ink); border-radius: 3px; }
.pb.dpad::before { left: 34%; right: 34%; top: 2%; bottom: 2%; }
.pb.dpad::after { top: 34%; bottom: 34%; left: 2%; right: 2%; }
.pb.dpad i { left: 36%; right: 36%; top: 36%; bottom: 36%; border: 0; border-radius: 0; z-index: 1; }

.ctl-dev { font-size: 0.9rem; font-weight: 800; opacity: 0.7; margin-bottom: 0.55rem; }
.ctl-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem 0.8rem; align-items: center; }
.ctl-r { display: contents; }
.ctl-k { display: flex; gap: 0.25rem; align-items: center; justify-content: flex-end; }
.ctl-l { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.ctl-l small { display: block; font-weight: 700; font-size: 0.82rem; opacity: 0.65; }

/* ---------------------------------------------------------------- Spiel-Einblendung (Rundenintro) */
.intro.emuintro { justify-content: flex-start; padding: 1.4rem 2.6rem 8.6rem; }
/* unten bleibt ein Streifen für Quizzly (klein, Sprechblase daneben) und die Reaktionen */
body:has(.screen.emuintro:not(.leaving)) #mascot { left: 1rem; bottom: 0.3rem; width: 6.4rem; height: 6.7rem; }
body:has(.screen.emuintro:not(.leaving)) #mascot .bubble { bottom: 8%; }
.intro.emuintro::before { background-color: color-mix(in srgb, var(--sys) 55%, #1a0b45); }
.emuintro .rnum { flex: none; }
body .intro.emuintro.playing .ready-go { display: none; }
.ei-main {
  flex: 1; min-height: 0; width: 100%; max-width: 118rem; margin-top: 1rem;
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); gap: 2.6rem; align-items: center;
}
.emuintro.playing .ei-main { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.2fr) minmax(0, 0.78fr); gap: 2rem; }
.ei-cover { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; perspective: 1400px; min-width: 0; }
.ei-box {
  position: relative; overflow: hidden; border-radius: 10px; max-width: 100%;
  box-shadow: 0 0 0 4px var(--ink), 0 1.1rem 0 rgba(0, 0, 0, 0.45), 0 0 3.5rem color-mix(in srgb, var(--sys) 70%, transparent);
  animation: coverIn 1s 0.35s var(--ease-back) both, coverFloat 5s 1.4s ease-in-out infinite;
}
.ei-box img { display: block; max-width: 100%; max-height: calc(100vh - 21rem); width: auto; height: auto; }
.ei-box.nocover { width: 22rem; aspect-ratio: 3 / 4; display: grid; place-items: center; padding: 2rem; background: linear-gradient(160deg, var(--sys), #1a0b45); }
.ei-box.nocover b { font-family: var(--font-head); font-size: 2.6rem; line-height: 1; text-align: center; }
.ei-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 48%, transparent 62%); transform: translateX(-130%); animation: coverShine 1.3s 1.25s ease-out both; }
@keyframes coverIn { from { transform: translateY(-70vh) rotate(-14deg); } to { transform: rotateY(-12deg) rotateX(3deg); } }
@keyframes coverFloat { 0%, 100% { transform: rotateY(-12deg) rotateX(3deg); } 50% { transform: rotateY(-6deg) rotateX(1deg) translateY(-0.5rem); } }
@keyframes coverShine { to { transform: translateX(130%); } }
.ei-sys { display: flex; gap: 0.6rem; align-items: center; font-family: var(--font-pixel); font-size: 0.95rem; animation: slideUp 0.5s 1s var(--ease-back) both; }
.ei-sys b, .ei-sys span { white-space: nowrap; }
.ei-sys b { font-weight: 400; background: var(--sys); color: #fff; padding: 0.5rem 0.85rem; border-radius: 8px; border: 3px solid var(--ink); box-shadow: var(--shadow-sm); }
.ei-sys span { background: rgba(8, 3, 30, 0.75); padding: 0.5rem 0.85rem; border-radius: 8px; border: 2px solid rgba(255, 255, 255, 0.5); }
.ei-info { display: flex; flex-direction: column; gap: 1rem; text-align: left; min-width: 0; }
.ei-game {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(2.6rem, 4.4vw, 5.4rem); line-height: 0.95;
  -webkit-text-stroke: 0.05em var(--ink); paint-order: stroke fill; text-shadow: 0 0.08em 0 var(--ink), 0 0 0.4em rgba(255, 255, 255, 0.3);
  animation: slideLeft 0.6s 0.55s var(--ease-back) both;
}
.ei-blurb { font-size: 1.2rem; font-weight: 800; line-height: 1.35; opacity: 0.92; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); animation: fadeIn 0.6s 0.85s both; }
.ei-quest { position: relative; padding: 1.1rem 1.6rem 1.3rem; animation: popIn 0.6s 1.1s var(--ease-back) both; }
.ei-ql { font-family: var(--font-pixel); font-size: 0.75rem; letter-spacing: 0.12em; color: var(--pink); }
.ei-quest h2 { font-size: clamp(2rem, 3.1vw, 3.8rem); line-height: 1; margin: 0.4rem 0 0.45rem; }
.ei-quest p { margin: 0; font-size: clamp(1.2rem, 1.55vw, 1.9rem); font-weight: 800; line-height: 1.3; }
.ei-tips { list-style: none; margin: 0.85rem 0 0; padding: 0.8rem 0 0; border-top: 3px dashed rgba(14, 7, 38, 0.16); display: grid; gap: 0.45rem; }
.ei-tips li { position: relative; padding-left: 2rem; font-size: 1.1rem; font-weight: 700; line-height: 1.35; animation: slideUp 0.45s var(--ease-back) both; }
.ei-tips li:nth-child(1) { animation-delay: 1.7s; }
.ei-tips li:nth-child(2) { animation-delay: 1.95s; }
.ei-tips li:nth-child(3) { animation-delay: 2.2s; }
.ei-tips li::before { content: '💡'; position: absolute; left: 0; }
.ei-rules { display: flex; flex-wrap: wrap; gap: 0.55rem; animation: fadeIn 0.6s 2.1s both; }
.ei-rules span { background: rgba(8, 3, 30, 0.72); border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 8px; padding: 0.35rem 0.75rem; font-size: 0.98rem; font-weight: 800; }
.ei-ctl { padding: 1.1rem 1.3rem 1.2rem; text-align: left; animation: slideLeft 0.6s 1.4s var(--ease-back) both; min-width: 0; }
.ei-cl, .eh-cl { font-family: var(--font-pixel); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--pink); margin-bottom: 0.7rem; }
.ei-load { margin-top: 1rem; padding-top: 0.8rem; border-top: 3px dashed rgba(14, 7, 38, 0.16); font-weight: 800; font-size: 1rem; }
.ei-loadbar { display: block; height: 0.6rem; margin-top: 0.45rem; border-radius: 99px; background: rgba(14, 7, 38, 0.12); overflow: hidden; }
.ei-loadbar i { display: block; height: 100%; width: 35%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--pink)); animation: loadSlide 1.1s ease-in-out infinite alternate; }
.ei-load.ok .ei-loadbar i { width: 100%; animation: none; background: var(--green); }
.ei-load.bad { color: var(--red); }
.ei-load.bad .ei-loadbar { display: none; }
@keyframes loadSlide { from { transform: translateX(-30%); } to { transform: translateX(220%); } }

/* ---------------------------------------------------------------- Quest-Bildschirm */
.screen.emuq .qbody { padding-bottom: 0.3rem; }
.screen.emuq .qbody:has(.eh-wrap.mine:not(.revealed)) { padding-bottom: 0.9rem; }
.eh-wrap { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.eh-wrap.watch .eh-left, .eh-wrap.watch .eh-right, .eh-wrap.watch .eh-slot { display: none; }
.eh-wrap.mine .eh-grid { display: none; }
.eh-wrap.revealed > :not(.eh-finish) { display: none; }

/* links: Steuerung (darunter bleibt Platz für Quizzly und seine Sprechblase) */
.eh-left { display: flex; flex-direction: column; min-height: 0; padding-bottom: 13.5rem; }
/* Größen in em: emu-pc.js verkleinert die Karte (font-size), bis alle Zeilen hineinpassen */
.eh-ctl { flex: 0 1 auto; min-height: 0; padding: 0.9em 1em 0.8em; overflow: hidden; font-size: 0.92rem; animation: slideLeft 0.5s var(--ease-back) both; }
.eh-ctl .eh-cl { font-size: 0.85em; margin-bottom: 0.75em; }
.eh-ctl .ctl-dev { font-size: 0.95em; margin-bottom: 0.6em; }
.eh-ctl .ctl-rows { gap: 0.55em 0.8em; }
.eh-ctl .ctl-l { font-size: 1.06em; }
.eh-ctl .ctl-l small { display: none; }
.eh-hint { margin-top: 0.75em; font-size: 0.85em; font-weight: 700; opacity: 0.6; line-height: 1.3; }

.eh-center { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; min-height: 0; }
.eh-bar {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.45rem 0.6rem 0.45rem 0.5rem;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-sm);
  animation: slideDown 0.5s var(--ease-back) both;
}
.eh-cov { height: 3.6rem; width: auto; max-width: 5rem; object-fit: contain; border-radius: 4px; border: 2px solid var(--ink); flex: none; }
.eh-q { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.eh-q small { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eh-q small b { background: var(--sys); color: #fff; border-radius: 4px; padding: 0 0.35em; margin-right: 0.2em; }
.eh-qt { font-family: var(--font-head); font-size: 1.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eh-qx { font-size: 1.02rem; font-weight: 800; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.eh-clock { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 6.4rem; padding: 0.35rem 0.8rem 0.45rem; background: var(--ink); color: #fff; border-radius: 9px; }
.eh-clock small { font-family: var(--font-pixel); font-size: 0.55rem; letter-spacing: 0.15em; opacity: 0.7; }
.eh-clock b { font-family: var(--font-pixel); font-weight: 400; font-size: 1.35rem; }
/* Wettkampf: eigener Wert neben der Uhr */
.eh-myscore { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 6.4rem; padding: 0.35rem 0.8rem 0.45rem; background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 9px; }
.eh-myscore[hidden] { display: none; }
.eh-myscore small { font-family: var(--font-pixel); font-size: 0.55rem; letter-spacing: 0.15em; opacity: 0.75; }
.eh-myscore b { font-family: var(--font-head); font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.eh-clock.urgent b { color: var(--red); animation: pulse 0.5s steps(2) infinite alternate; }
.eh-wrap.watch .eh-bar { padding: 0.6rem 0.8rem 0.6rem 0.6rem; }
.eh-wrap.watch .eh-cov { height: 4.6rem; max-width: 6.4rem; }
.eh-wrap.watch .eh-qt { font-size: 2.3rem; }
.eh-wrap.watch .eh-qx { font-size: 1.25rem; }
.eh-wrap.watch .eh-clock b { font-size: 1.8rem; }

.eh-stage { position: relative; flex: 1; min-height: 0; container-type: size; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
/* Platzhalter fürs eigene Spiel (emu-pc.js legt es genau darüber); Rahmen außen, damit die Fläche stimmt */
.eh-slot {
  width: min(100cqw - 1rem, (100cqh - 1rem) * var(--ar)); aspect-ratio: var(--ar);
  border-radius: 10px; background: #000;
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 7px color-mix(in srgb, var(--sys) 80%, #fff), 0 0 0 10px var(--ink), 0 0 2.6rem color-mix(in srgb, var(--sys) 55%, transparent);
}
.eh-grid { display: grid; gap: 18px; align-content: center; justify-content: center; width: 100%; height: 100%; }
.eh-right { display: grid; gap: 16px; align-content: center; justify-content: center; min-height: 0; }

/* Spieler-Kacheln (Live-Bild, Name, Fortschritt) */
.eh-tile {
  position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.45rem; min-width: 0;
  background: rgba(8, 3, 30, 0.78); border: 3px solid rgba(255, 255, 255, 0.16); border-radius: 12px; box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s; animation: popIn 0.45s var(--ease-back) both;
}
.eh-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; background: #000; display: grid; place-items: center; }
.eh-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); }
.eh-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; opacity: 0; transition: opacity 0.3s; }
.eh-tile.live .eh-screen img { opacity: 1; }
.eh-tile.live .eh-wait { display: none; }
.eh-wait { font-size: 2rem; opacity: 0.75; }
.eh-flag { position: absolute; top: 0.3rem; right: 0.3rem; z-index: 1; font-size: 0.85rem; font-weight: 900; background: rgba(8, 3, 30, 0.8); border-radius: 6px; padding: 0.1rem 0.4rem; }
.eh-flag:empty { display: none; }
.eh-who { display: flex; align-items: center; gap: 0.45rem; font-size: 1rem; font-weight: 800; min-width: 0; }
.eh-who .avatar { flex: none; }
.eh-who b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eh-st { flex: none; font-size: 0.85rem; opacity: 0.85; white-space: nowrap; }
.eh-pbar { height: 0.5rem; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.eh-pbar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width 0.4s; }
.eh-tile.won { border-color: var(--gold); box-shadow: var(--shadow-sm), 0 0 1.3rem rgba(255, 210, 63, 0.55); }
.eh-tile.won .eh-pbar i { background: var(--gold); }
.eh-tile.won .eh-st { color: var(--gold); opacity: 1; }
.eh-tile.out { opacity: 0.6; }
.eh-wrap.watch .eh-who { font-size: 1.25rem; }
.eh-wrap.watch .eh-st { font-size: 1.05rem; }
.eh-wrap.watch .eh-pbar { height: 0.65rem; }
.eh-wrap.watch .eh-flag { font-size: 1.05rem; }

/* Countdown auf dem großen Bildschirm */
.eh-count {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3;
  font-family: var(--font-pixel); font-size: clamp(6rem, 14vw, 13rem); color: var(--yellow);
  text-shadow: 0 0.1em 0 var(--ink), 0 0 0.4em rgba(255, 210, 63, 0.5);
}
.eh-count[hidden] { display: none; }
.eh-count.go { color: var(--green); }

/* Zieleinlauf */
.eh-finish { grid-column: 1 / -1; display: flex; justify-content: center; align-items: flex-start; min-height: 0; }
.eh-finish[hidden] { display: none; }
.eh-fcard { width: min(70rem, 100%); max-height: 100%; overflow: hidden; padding: 1rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; animation: popIn 0.5s var(--ease-back) both; }
.eh-fh { font-family: var(--font-head); font-size: 2rem; line-height: 1; }
.eh-fh small { font-family: var(--font-body); font-size: 1.05rem; font-weight: 800; opacity: 0.6; margin-left: 0.5rem; }
.eh-flist { display: grid; gap: 0.5rem; min-height: 0; }
.eh-fr {
  display: grid; grid-template-columns: 2.8rem 5.2rem auto minmax(0, 1fr) auto 4.6rem; align-items: center; gap: 0.8rem;
  padding: 0.4rem 0.8rem 0.4rem 0.5rem; border-radius: 10px; background: rgba(14, 7, 38, 0.06); border: 2px solid transparent;
  animation: slideUp 0.5s var(--ease-back) both;
}
.eh-fr.first { background: linear-gradient(90deg, #ffe680, #ffd23f); border-color: var(--ink); }
.eh-fm { font-family: var(--font-head); font-size: 1.9rem; text-align: center; }
.eh-fimg { width: 5.2rem; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #000; border: 2px solid var(--ink); }
.eh-fimg img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; }
.eh-fn { font-family: var(--font-head); font-size: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eh-ft { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.eh-ft b { font-family: var(--font-pixel); font-weight: 400; font-size: 1.05rem; }
.eh-ft small { font-size: 0.85rem; font-weight: 800; opacity: 0.65; }
.eh-fp { justify-self: end; font-family: var(--font-head); font-size: 1.4rem; background: var(--ink); color: #fff; border-radius: 8px; padding: 0.05rem 0.5rem; }
.eh-fr:not(.won) .eh-fp { background: rgba(14, 7, 38, 0.3); }
.eh-flist:has(> .eh-fr:nth-child(5)) { grid-template-columns: 1fr 1fr; }
.eh-flist:has(> .eh-fr:nth-child(5)) .eh-fr { grid-template-columns: 2.2rem 4rem auto minmax(0, 1fr) auto 3.8rem; gap: 0.5rem; }
.eh-flist:has(> .eh-fr:nth-child(5)) .eh-fimg { width: 4rem; }
.eh-flist:has(> .eh-fr:nth-child(5)) .eh-fn { font-size: 1.25rem; }
.eh-flist:has(> .eh-fr:nth-child(5)) .eh-fm { font-size: 1.5rem; }

/* Quizzly auf dem großen Bildschirm (ohne Spielerleiste): klein unten links, Sprechblase im freien Streifen */
body:not(.emu-mine):has(.screen.emuq:not(.leaving)) #mascot { left: 1rem; bottom: 0.3rem; width: 6.4rem; height: 6.7rem; }
body:not(.emu-mine):has(.screen.emuq:not(.leaving)) #mascot .bubble { bottom: 8%; }

/* Quizzly in der eigenen Spielansicht: unten links, Sprechblase nach oben (über der Steuerung, nicht im Spiel) */
body.emu-mine #mascot { left: 1rem; bottom: 0.3rem; width: 6.4rem; height: 6.7rem; }
body.emu-mine #mascot .bubble, body.emu-mine.pcplay #mascot .bubble { left: 0.2rem; bottom: 100%; min-width: 0; max-width: max(150px, calc(15vw - 2rem)); border-bottom-left-radius: 20px; }

/* ---------------------------------------------------------------- Das eigene Spiel (über der Show) */
#emulayer { position: fixed; left: 0; top: 0; z-index: 25; overflow: hidden; border-radius: 10px; background: #000; }
#emulayer.hidden { opacity: 0; pointer-events: none; }
#emulayer .el-frame, #emulayer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.el-over { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; pointer-events: none; background: rgba(7, 4, 26, 0.8); }
.el-over[hidden] { display: none; }
.el-over.count { background: rgba(7, 4, 26, 0.3); }
.el-msg { font-family: var(--font-head); font-size: clamp(1.7rem, 2.5vw, 3.1rem); line-height: 1.1; color: #fff; text-shadow: 0 3px 0 var(--ink); padding: 1.5rem; max-width: 90%; animation: popIn 0.4s var(--ease-back) both; }
.el-msg small { display: block; margin-top: 0.6rem; font-family: var(--font-body); font-size: clamp(1rem, 1.15vw, 1.35rem); font-weight: 800; opacity: 0.88; text-shadow: none; }
.el-over.won .el-msg { color: var(--gold); }
.el-over.bad .el-msg { color: #ff8fa6; }
.el-count { display: inline-block; font-family: var(--font-pixel); font-size: clamp(5rem, 11vw, 11rem); color: var(--yellow); text-shadow: 0 0.1em 0 var(--ink), 0 0 0.4em rgba(255, 210, 63, 0.5); }
.el-over.go .el-count { color: var(--green); }
.el-spin { display: block; width: 3rem; height: 3rem; margin: 0 auto 1rem; border-radius: 50%; border: 0.4rem solid rgba(255, 255, 255, 0.18); border-top-color: var(--cyan); animation: spin 0.8s linear infinite; }
