/* ==========================================================================
   The arcade. Loaded only on pages carrying the ec_game widget.
   ========================================================================== */
.ec-game { margin-top: clamp(1.6rem, 3vw, 2.4rem); max-width: 900px; }

.ec-game__frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 18px 44px rgba(0,0,0,.4), 0 0 0 1px var(--line);
}
.ec-game__canvas { display: block; width: 100%; touch-action: none; outline: none; }

.ec-game__veil {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  text-align: center; padding: 1.2rem;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .ec-game__veil { background: rgba(11,18,32,.82); }
}
.ec-game__msg {
  margin: 0; min-height: 1.2em;
  font-size: .9rem; letter-spacing: .02em;
  color: var(--paper-45);
}
.ec-game__start { cursor: pointer; }

.ec-game__hud {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .6rem 1.4rem;
  margin-top: .9rem;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--paper-45);
}
.ec-game__hud b { color: var(--paper); font-weight: 600; letter-spacing: .04em; }

.ec-game__lives { display: inline-flex; gap: .34rem; align-items: center; }
.ec-game__lives i {
  width: 15px; height: 10px;
  border: 1.6px solid var(--paper);
  border-radius: 60% 60% 60% 60% / 70% 70% 70% 70%;
  display: inline-block;
}

.ec-game__keys {
  margin: .7rem 0 0;
  font-size: .72rem; letter-spacing: .03em;
  color: var(--paper-45);
}
@media (hover: none) { .ec-game__keys { display: none; } }
/* ==========================================================================
   Easter egg mode: nothing on the page, the hero eye opens it.
   ========================================================================== */
.ec-game--egg { margin: 0; max-width: none; }

/* The mark only advertises itself on hover, so the page stays serious. */
.eyestage--live { cursor: pointer; }
.eyestage--live svg { transition: transform .5s var(--ease-out, cubic-bezier(.22,1,.36,1)), opacity .4s; }
.eyestage--live:hover svg,
.eyestage--live:focus-visible svg { transform: scale(1.05); }
.eyestage--live:focus-visible { outline: 2px solid var(--accent, #2e9be0); outline-offset: 10px; border-radius: 12px; }

html.ec-game-open, html.ec-game-open body { overflow: hidden; }

.ec-game__stage {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(6, 10, 18, .88);
  animation: ec-game-in .28s var(--ease-out, ease) both;
}
@supports (backdrop-filter: blur(4px)) {
  .ec-game__stage { backdrop-filter: blur(6px); }
}
@keyframes ec-game-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ec-game__stage { animation: none; } }

.ec-game__panel { position: relative; width: min(920px, 100%); }
.ec-game__panel .ec-game__keys { text-align: center; }
.ec-game__panel .ec-game__hud { justify-content: center; }

/* Closing the game closes an eye. Escape and a click outside also work. */
.ec-game__close {
  position: absolute; top: -14px; right: -6px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; padding: 0;
  transition: border-color .3s, transform .3s;
}
.ec-game__close span {
  display: block; width: 17px; height: 0;
  border-top: 2px solid var(--paper); border-radius: 2px;
}
.ec-game__close:hover, .ec-game__close:focus-visible { border-color: var(--paper); transform: scale(1.06); }
@media (max-width: 640px) { .ec-game__close { top: -50px; right: 0; } }