/**
 * Editor embed — Stack mode HUD mock (visual match play.html cyber HUD / mnn93hpi preview).
 * Shown only when body.editor-embed-admin + #editor-stack-hud-mock:not(.is-hidden)
 */
body.editor-embed-admin .canvas-wrap {
  position: relative;
}

body.editor-embed-admin #editor-stack-hud-mock {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  font-family: 'Share Tech Mono', ui-monospace, monospace;
}

body.editor-embed-admin #editor-stack-hud-mock.is-hidden {
  display: none !important;
}

/* —— SCORE (left) — same tokens as #play-cyber-hud.play-cyber-hud--question-mission .play-cyber-scoreboard —— */
body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__score {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  width: min(252px, 64vw);
  max-width: min(252px, 64vw);
  box-sizing: border-box;
  padding: 0.48rem 0.62rem 0.52rem;
  background: linear-gradient(
    165deg,
    rgba(10, 26, 48, 0.92) 0%,
    rgba(5, 14, 32, 0.94) 42%,
    rgba(8, 20, 40, 0.9) 100%
  );
  border: 1px solid rgba(0, 255, 240, 0.38);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(0, 200, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__score-title {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(0.82rem, 2.4vmin, 0.95rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8afeff;
  text-shadow:
    0 0 16px rgba(0, 240, 255, 0.62),
    0 0 32px rgba(0, 160, 255, 0.32);
  margin: 0 0 0.34rem;
  padding: 0 0 0.38rem;
  border-bottom: 1px solid rgba(0, 255, 240, 0.48);
  text-align: left;
  line-height: 1.15;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__score-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 40vh;
  overflow: auto;
  box-sizing: border-box;
  width: 100%;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__score-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0, 255, 240, 0.32);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__score-row:last-child {
  border-bottom: none;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__score-left {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__av-wrap {
  display: block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid rgba(0, 255, 240, 0.4);
  background: rgba(0, 16, 28, 0.95);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__av {
  display: block;
  width: 34px;
  height: 34px;
  border: none;
  object-fit: cover;
  object-position: center 4%;
  transform: scale(1.38);
  transform-origin: center 8%;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__name {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(248, 252, 255, 0.95);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.92);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__points {
  flex: 0 0 auto;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.02rem, 3.5vmin, 1.38rem);
  font-weight: 800;
  color: #7af8ff;
  text-align: right;
  line-height: 1;
  text-shadow:
    0 0 14px rgba(0, 255, 240, 0.48),
    0 0 26px rgba(0, 160, 255, 0.22);
  white-space: nowrap;
}

/* —— TIME (center) —— */
body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__center {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  max-width: min(92vw, 520px);
  pointer-events: none;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__time-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(0, 255, 200, 0.55);
  margin-bottom: 0.15rem;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__time-val {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 4vmin, 1.85rem);
  line-height: 1;
  color: #7fffab;
  text-shadow:
    0 0 20px rgba(100, 255, 180, 0.55),
    0 0 40px rgba(0, 255, 140, 0.25);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__time-sub {
  margin-top: 0.28rem;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: rgba(122, 248, 255, 0.52);
  max-width: min(88vw, 420px);
  line-height: 1.35;
}

/* —— SYSTEM INTEGRITY + avatar (right) —— */
body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__right {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: min(96vw, 340px);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__integrity {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.42rem 0.55rem 0.48rem;
  background: linear-gradient(
    155deg,
    rgba(8, 22, 42, 0.94) 0%,
    rgba(4, 12, 28, 0.96) 100%
  );
  border: 1px solid rgba(0, 255, 240, 0.38);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(0, 200, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__integrity-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5cf0ff;
  text-shadow: 0 0 10px rgba(92, 240, 255, 0.45);
  margin-bottom: 0.22rem;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__hearts {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
  margin-bottom: 0.28rem;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__bracket {
  color: rgba(200, 240, 255, 0.75);
  font-weight: 700;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__heart {
  margin: 0 0.12em;
  color: #fff;
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__meta {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: rgba(232, 248, 255, 0.88);
  line-height: 1.45;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__avatar-frame {
  flex: 0 0 auto;
  padding: 4px;
  background: linear-gradient(145deg, rgba(0, 60, 70, 0.9), rgba(0, 20, 35, 0.95));
  border: 1px solid rgba(0, 255, 240, 0.45);
  border-radius: 6px;
  box-shadow:
    0 0 24px rgba(0, 200, 255, 0.2),
    inset 0 0 20px rgba(0, 255, 240, 0.06);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__avatar-img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center 6%;
  transform: scale(1.15);
  transform-origin: center 10%;
  image-rendering: pixelated;
  background: rgba(0, 8, 16, 0.9);
}

body.editor-embed-admin #editor-stack-hud-mock .editor-stack-hud-mock__link-chip {
  min-width: 1.65rem;
  padding: 0.12rem 0.28rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: #7af8ff;
  border: 1px solid rgba(0, 255, 240, 0.4);
  border-radius: 3px;
  background: rgba(0, 24, 36, 0.92);
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.2);
}
