/* Elemon UI kit (eui): eight micro-interactions, each with an Elemon creature
   that reacts. Vanilla CSS; motion is transform/opacity only; idle loops pause
   off-screen (.eui-scene:not(.is-live)) and are dropped for reduced motion. */
:root {
  --eui-ink: #261d3d;
  --eui-ink-2: #6f6888;
  --eui-ink-3: #a29cb6;
  --eui-card: #fff;
  --eui-line: rgba(38, 29, 61, 0.08);
  --eui-violet: #8b6cf2;
  --eui-violet-2: #a58cff;
  --eui-violet-ink: #5b3fd0;
  --eui-green: #22b26a;
  --eui-green-2: #3fcf86;
  --eui-red: #ee5b5b;
  --eui-orange: #f39a2e;
  --eui-yellow: #f7c531;
  --eui-gold: #f2c65a;
  --eui-shadow: 0 22px 44px -18px rgba(58, 38, 120, 0.28), 0 3px 10px rgba(58, 38, 120, 0.07);
  --eui-shadow-lg: 0 34px 70px -26px rgba(58, 38, 120, 0.4), 0 6px 16px rgba(58, 38, 120, 0.08);
  --eui-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --eui-out: cubic-bezier(0.22, 1, 0.36, 1);
  --eui-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --eui-font: "Nunito", ui-rounded, system-ui, sans-serif;
  --eui-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---------- scene: pastel tile / full-screen backdrop ---------- */
.eui-scene {
  --tint-a: #f1ecff; --tint-b: #e3dafc;
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 30% 20%, var(--tint-a), var(--tint-b));
  color: var(--eui-ink); font-family: var(--eui-font);
  -webkit-font-smoothing: antialiased;
}
.eui-scene::after { /* soft floor shadow / vignette like the reference */
  content: ""; position: absolute; inset: auto 8% 6% 8%; height: 30%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.55), transparent 70%);
}
.eui-scene[data-tint="lavender"] { --tint-a: #f3efff; --tint-b: #e1d8fb; }
.eui-scene[data-tint="lilac"]    { --tint-a: #f2edff; --tint-b: #ddd3fa; }
.eui-scene[data-tint="mint"]     { --tint-a: #effbf7; --tint-b: #d3f0e8; }
.eui-scene[data-tint="pink"]     { --tint-a: #fff1f6; --tint-b: #fbdbe7; }
.eui-scene[data-tint="lemon"]    { --tint-a: #fffbe8; --tint-b: #fdefb8; }
.eui-scene[data-tint="rose"]     { --tint-a: #fff3f1; --tint-b: #fbdcd8; }
.eui-scene[data-tint="sky"]      { --tint-a: #eff9fd; --tint-b: #d2ecf6; }
.eui-scene[data-tint="peach"]    { --tint-a: #fff6ec; --tint-b: #fde3c8; }

.eui-fit { position: absolute; left: 50%; top: 50%; width: 720px; height: 420px; transform: translate(-50%, -50%) scale(var(--k, 1)); transform-origin: 50% 50%; }
.eui-stage { position: relative; width: 720px; height: 420px; }

/* label chip: "01 Copy a table link · Gallium" */
.eui-chip {
  position: absolute; left: 22px; top: 20px; z-index: 6; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px -8px rgba(58, 38, 120, 0.35); font: 800 14px/1 var(--eui-font); color: var(--eui-ink); white-space: nowrap;
}
.eui-chip b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--eui-violet); color: #fff; font-size: 11px; }
.eui-chip span { color: var(--eui-ink-2); font-weight: 700; }

/* ---------- shared atoms ---------- */
.eui-card { position: absolute; background: var(--eui-card); border-radius: 22px; box-shadow: var(--eui-shadow); }
.eui-mascot { position: absolute; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; transform-origin: 50% 100%; filter: drop-shadow(0 14px 14px rgba(40, 28, 90, 0.18)); }
.eui-mascot img { display: block; width: 100%; height: auto; }
.eui-bobber { display: block; }
.eui-shadow { position: absolute; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(38, 29, 61, 0.22), transparent); pointer-events: none; }

.eui-pill {
  --pc: var(--eui-violet); --pc2: var(--eui-violet-2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; min-width: 104px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 900 15px/1 var(--eui-font); color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, var(--pc2), var(--pc));
  box-shadow: 0 10px 20px -10px var(--pc), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s var(--eui-spring), box-shadow 0.2s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.eui-pill:hover { transform: translateY(-1px) scale(1.03); filter: brightness(1.04); }
.eui-pill:active { transform: scale(0.94); }
.eui-pill:focus-visible { outline: 3px solid rgba(139, 108, 242, 0.45); outline-offset: 3px; }
.eui-pill svg { width: 15px; height: 15px; flex: none; }
.eui-pill .eui-pill-face { display: inline-flex; align-items: center; gap: 7px; }
.eui-pill .eui-pill-face + .eui-pill-face { position: absolute; inset: 0; justify-content: center; opacity: 0; transform: translateY(8px) scale(0.9); }
.eui-pill .eui-pill-face { transition: opacity 0.22s, transform 0.32s var(--eui-spring); }
.eui-pill.is-alt .eui-pill-face:first-child { opacity: 0; transform: translateY(-8px) scale(0.9); }
.eui-pill.is-alt .eui-pill-face + .eui-pill-face { opacity: 1; transform: none; }
.eui-pill--green { --pc: var(--eui-green); --pc2: var(--eui-green-2); }
.eui-pill--red { --pc: #e44c4c; --pc2: #f36e6e; }
.eui-pill--orange { --pc: #ec8a1d; --pc2: #f7ae4d; }
.eui-pill--yellow { --pc: #eeb312; --pc2: #fbd24c; color: #4a3500; }
.eui-pill[disabled] { cursor: default; }
.eui-pill.is-busy { pointer-events: none; }

.eui-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: eui-rot 0.7s linear infinite; }

.eui-toggle {
  position: relative; width: 56px; height: 32px; flex: none; border: 0; padding: 0; border-radius: 999px; cursor: pointer;
  background: #ddd8ea; box-shadow: inset 0 1px 3px rgba(38, 29, 61, 0.15); transition: background 0.35s var(--eui-out);
}
.eui-toggle::after {
  content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(38, 29, 61, 0.25); transition: transform 0.42s var(--eui-spring);
}
.eui-toggle[aria-checked="true"] { background: linear-gradient(180deg, var(--eui-violet-2), var(--eui-violet)); }
.eui-toggle[aria-checked="true"]::after { transform: translateX(24px); }
.eui-toggle:focus-visible { outline: 3px solid rgba(139, 108, 242, 0.45); outline-offset: 3px; }

/* ---------- toast ---------- */
.eui-toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 2147483000; display: grid; justify-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.eui-stage .eui-toasts { position: absolute; bottom: 22px; z-index: 8; }
.eui-toast {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; border-radius: 16px; pointer-events: auto;
  background: #231b38; color: #fff; font: 800 15px/1.25 var(--eui-font); box-shadow: 0 18px 36px -14px rgba(20, 12, 50, 0.55);
  animation: eui-toast-in 0.42s var(--eui-spring) both; max-width: 100%;
}
.eui-toast.is-out { animation: eui-toast-out 0.28s var(--eui-out) both; }
.eui-toast i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--eui-green); }
.eui-toast i svg { width: 13px; height: 13px; }
.eui-toast[data-kind="err"] i { background: var(--eui-red); }
.eui-toast[data-kind="info"] i { background: var(--eui-violet); }
.eui-toast[data-kind="gold"] i { background: var(--eui-gold); color: #3b2a00; }
.eui-toast button { margin-left: 4px; border: 0; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 900 13px/1 var(--eui-font); cursor: pointer; }
.eui-toast button:hover { background: rgba(255, 255, 255, 0.24); }

/* ---------- particles ---------- */
.eui-page-fx { position: fixed; inset: 0; z-index: 2147482000; pointer-events: none; }
.eui-page-fx > .eui-vial { z-index: 2; }
.eui-fx { position: absolute; inset: 0; pointer-events: none; z-index: 7; overflow: visible; }
.eui-spark { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; background: var(--c, #ffd35a); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); will-change: transform, opacity; }
.eui-spark.is-dot { clip-path: circle(50%); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.eui-puff { position: absolute; left: 0; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #efe6ff, #b9a2f6 70%); opacity: 0; will-change: transform, opacity; }
.eui-ring { position: absolute; left: 0; top: 0; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; border: 4px solid var(--c, #49b4f0); opacity: 0; will-change: transform, opacity; }
.eui-word { position: absolute; left: 0; top: 0; text-shadow: 0 2px 0 #fff, 0 0 12px rgba(255,255,255,.8); font: 900 30px/1 var(--eui-font); color: var(--c, var(--eui-ink)); white-space: nowrap; transform: translate(-50%, -50%); }

[data-eui] { position: absolute; inset: 0; transform: translateY(var(--dy, 0px)); }
.eui-copy { --dy: -16px; } .eui-reveal { --dy: -14px; } .eui-discard { --dy: -10px; } .eui-quiet { --dy: -8px; }
.eui-charge { --dy: -22px; } .eui-save { --dy: -4px; } .eui-retry { --dy: -26px; } .eui-get { --dy: -30px; }

/* ---------- 01 copy (Gallium) ---------- */
.eui-copy .eui-term {
  position: absolute; z-index: 2; left: 70px; right: 70px; top: 214px; height: 72px; display: flex; align-items: center; gap: 14px; padding: 0 14px 0 26px;
  background: linear-gradient(180deg, #2a2240, #1d1730); border-radius: 18px; box-shadow: var(--eui-shadow-lg);
}
.eui-copy .eui-code { position: relative; flex: 1; min-width: 0; font: 600 21px/1 var(--eui-mono); color: #e9e4ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 4px; }
.eui-copy .eui-code .p { color: #8e86ad; margin-right: 10px; }
.eui-copy .eui-code .c0 { color: #ff8fc7; } .eui-copy .eui-code .c1 { color: #8fd0ff; } .eui-copy .eui-code .k { color: #ffd77a; }
.eui-copy .eui-hl { position: absolute; inset: 0; border-radius: 8px; background: rgba(165, 140, 255, 0.38); transform: scaleX(0); transform-origin: 0 50%; z-index: -1; }
.eui-copy .eui-code-t { position: relative; z-index: 1; }
.eui-copy .eui-mascot { width: 132px; left: 294px; top: 52px; z-index: 3; }
.eui-copy .eui-ghost { position: absolute; left: 116px; top: 236px; font: 600 21px/1 var(--eui-mono); color: #5b3fd0; background: #efe9ff; border-radius: 10px; padding: 8px 12px; opacity: 0; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 20px -12px rgba(91, 63, 208, 0.6); }

/* ---------- 02 reveal (Argon) ---------- */
.eui-peek { position: absolute; left: 300px; top: -40px; width: 280px; height: 290px; overflow: hidden; z-index: 1; pointer-events: none; }
.eui-reveal .eui-mascot { width: 176px; left: 46px; top: 72px; transform: translateY(118px); }
.eui-reveal .eui-lbl { position: absolute; left: 160px; top: 182px; z-index: 3; font: 800 15px/1 var(--eui-font); color: var(--eui-ink-2); }
.eui-reveal .eui-field {
  left: 150px; width: 420px; top: 206px; height: 70px; z-index: 2; display: flex; align-items: center; padding: 0 12px 0 24px;
  border-radius: 20px; box-shadow: var(--eui-shadow), 0 0 0 2px transparent; transition: box-shadow 0.4s var(--eui-out);
}
.eui-reveal.is-on .eui-field { box-shadow: var(--eui-shadow), 0 0 0 2.5px rgba(139, 108, 242, 0.55), 0 0 26px -2px rgba(139, 108, 242, 0.35); }
.eui-reveal .eui-secret { flex: 1; font: 700 24px/1 var(--eui-mono); letter-spacing: 0.06em; color: var(--eui-ink); white-space: nowrap; overflow: hidden; }
.eui-reveal .eui-secret span { display: inline-block; min-width: 0.62em; text-align: center; }
.eui-reveal .eui-secret .is-dot { transform: scale(1.25); }
.eui-reveal .eui-secret .is-mix { color: var(--eui-violet); }
.eui-eye { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: #f0ebff; color: var(--eui-violet-ink); transition: background 0.3s, color 0.3s, transform 0.2s var(--eui-spring); }
.eui-eye:hover { transform: scale(1.06); }
.eui-eye:active { transform: scale(0.92); }
.eui-eye svg { width: 22px; height: 22px; }
.eui-eye .off { display: none; }
.eui-reveal.is-on .eui-eye { background: linear-gradient(180deg, var(--eui-violet-2), var(--eui-violet)); color: #fff; }
.eui-reveal.is-on .eui-eye .on { display: none; }
.eui-reveal.is-on .eui-eye .off { display: block; }
.eui-reveal .eui-strength { position: absolute; left: 160px; top: 294px; z-index: 3; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-6px); transition: opacity 0.3s, transform 0.4s var(--eui-spring); }
.eui-reveal.is-on .eui-strength { opacity: 1; transform: none; transition-delay: 0.45s; }
.eui-strength .bars { display: flex; gap: 4px; }
.eui-strength .bars i { width: 34px; height: 6px; border-radius: 3px; background: #e6e1f2; overflow: hidden; position: relative; }
.eui-strength .bars i::after { content: ""; position: absolute; inset: 0; background: var(--eui-green); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.3s var(--eui-out); }
.eui-reveal.is-on .eui-strength .bars i::after { transform: none; }
.eui-reveal.is-on .eui-strength .bars i:nth-child(1)::after { transition-delay: 0.55s; }
.eui-reveal.is-on .eui-strength .bars i:nth-child(2)::after { transition-delay: 0.68s; }
.eui-reveal.is-on .eui-strength .bars i:nth-child(3)::after { transition-delay: 0.81s; }
.eui-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 999px; font: 900 13px/1 var(--eui-font); background: #ddf6e8; color: #17894f; }

/* ---------- 03 discard (Lead) ---------- */
.eui-discard .eui-list { left: 60px; top: 70px; width: 410px; padding: 18px 16px 12px; }
.eui-list-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 10px; font: 900 18px/1 var(--eui-font); }
.eui-count { position: relative; display: inline-block; overflow: hidden; height: 18px; min-width: 5.4em; text-align: right; font: 800 14px/18px var(--eui-font); color: var(--eui-ink-2); }
.eui-count span { position: absolute; right: 0; top: 0; display: block; white-space: nowrap; }
.eui-row { position: relative; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 8px 0 10px; border-radius: 14px; background: #f7f5fc; transition: background 0.2s; }
.eui-row + .eui-row { margin-top: 8px; }
.eui-row:hover { background: #faf8ff; }
.eui-row.is-doomed { background: #fff0f0; }
.eui-ico { position: relative; display: grid; place-items: center; width: 40px; height: 48px; border-radius: 9px; flex: none; color: #fff; font: 900 16px/1 var(--eui-font); background: linear-gradient(160deg, var(--ic2, #a58cff), var(--ic, #7c5cf0)); box-shadow: 0 6px 12px -6px var(--ic, #7c5cf0); overflow: hidden; }
.eui-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eui-ico b { position: relative; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
.eui-row .t { flex: 1; min-width: 0; }
.eui-row .t b { display: block; font: 900 16px/1.2 var(--eui-font); }
.eui-row .t span { display: block; font: 700 13px/1.3 var(--eui-font); color: var(--eui-ink-3); }
.eui-trash { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--eui-ink-3); cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.2s var(--eui-spring); }
.eui-trash:hover, .eui-row.is-doomed .eui-trash { background: #ffe3e3; color: var(--eui-red); }
.eui-trash:active { transform: scale(0.9); }
.eui-trash svg { width: 19px; height: 19px; }
.eui-discard .eui-mascot { width: 196px; left: 488px; top: 150px; }
.eui-discard .eui-shadow { left: 500px; width: 176px; top: 346px; }
.eui-zzz { position: absolute; left: 616px; top: 132px; pointer-events: none; }
.eui-zzz i { position: absolute; font: 900 20px/1 var(--eui-font); color: #7d93c9; font-style: normal; opacity: 0; }
.eui-empty { padding: 26px 6px 18px; text-align: center; font: 800 15px/1.4 var(--eui-font); color: var(--eui-ink-3); }

/* ---------- 04 quiet (Helium) ---------- */
.eui-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(120% 90% at 30% 15%, #9a86d4, #6a56a8 75%); transition: opacity 0.7s var(--eui-inout); }
.eui-sky i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.7); opacity: 0.85; }
.eui-scene.is-night .eui-sky { opacity: 1; }
.eui-scene.is-night .eui-chip { background: rgba(255, 255, 255, 0.92); }
.eui-quiet .eui-qcard { left: 248px; top: 172px; width: 410px; height: 96px; display: flex; align-items: center; gap: 14px; padding: 0 20px; z-index: 2; transition: background 0.6s, box-shadow 0.6s; }
.eui-qico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none; background: #f0ebff; color: var(--eui-violet-ink); transition: background 0.5s, color 0.5s; }
.eui-qico svg { width: 24px; height: 24px; }
.eui-qico .moon { display: none; }
.eui-quiet.is-on .eui-qico { background: #3f3377; color: #ffe08a; }
.eui-quiet.is-on .eui-qico .bell { display: none; }
.eui-quiet.is-on .eui-qico .moon { display: block; }
.eui-qcard .t { flex: 1; min-width: 0; }
.eui-qcard .t b { display: block; font: 900 18px/1.2 var(--eui-font); }
.eui-qcard .t span { display: block; font: 700 14px/1.35 var(--eui-font); color: var(--eui-ink-2); }
.eui-quiet .eui-mascot { width: 184px; left: 46px; top: 96px; z-index: 2; transform-origin: 50% 60%; }
.eui-notes { position: absolute; z-index: 3; left: 150px; top: 90px; pointer-events: none; }
.eui-notes i { position: absolute; font: 900 34px/1 var(--eui-font); font-style: normal; color: #ff9ccf; opacity: 0; text-shadow: 0 0 10px rgba(255, 255, 255, 0.6); }
.eui-bubbles { position: absolute; left: 300px; top: 44px; width: 380px; height: 120px; z-index: 1; }
.eui-bub { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #fff; box-shadow: var(--eui-shadow); font: 800 13px/1 var(--eui-font); white-space: nowrap; transition: filter 0.6s, opacity 0.6s; }
.eui-bub i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #ffe8f2; font-style: normal; font-size: 13px; }
.eui-bub em { position: absolute; right: -4px; top: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--eui-red); color: #fff; font: 900 11px/18px var(--eui-font); text-align: center; font-style: normal; }
.eui-quiet .eui-waves { position: absolute; left: 138px; top: 160px; z-index: 1; }

/* ---------- 05 charge (Lithium) ---------- */
.eui-charge .eui-mascot { width: 168px; left: 36px; top: 112px; z-index: 3; }
.eui-charge .eui-shadow { left: 50px; width: 150px; top: 290px; }
.eui-charge .eui-ccard { left: 236px; top: 140px; width: 440px; padding: 20px 22px 22px; z-index: 2; }
.eui-crow { display: flex; align-items: center; gap: 14px; }
.eui-crow .t { flex: 1; min-width: 0; }
.eui-crow .t b { display: block; font: 900 18px/1.2 var(--eui-font); }
.eui-crow .t span { display: block; font: 700 14px/1.35 var(--eui-font); color: var(--eui-ink-3); font-variant-numeric: tabular-nums; }
.eui-crow .t span.is-ok { color: var(--eui-green); }
.eui-track { position: relative; height: 12px; margin-top: 18px; border-radius: 6px; background: #f1eef7; overflow: hidden; }
.eui-track .fill { position: absolute; inset: 0; border-radius: inherit; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #ffd84d, #ffb800); box-shadow: 0 0 14px rgba(255, 196, 0, 0.8); }
.eui-track .fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.85) 50%, transparent 70%); background-size: 200% 100%; animation: eui-sheen 0.9s linear infinite; opacity: 0; }
.eui-charge.is-busy .eui-track .fill::after { opacity: 1; }
.eui-charge.is-done .eui-track .fill { background: linear-gradient(90deg, var(--eui-green-2), var(--eui-green)); box-shadow: 0 0 10px rgba(34, 178, 106, 0.45); transition: background 0.3s; }
.eui-charge .eui-glow { position: absolute; left: 236px; top: 140px; width: 440px; height: 120px; border-radius: 22px; z-index: 1; box-shadow: 0 0 0 0 rgba(255, 200, 0, 0); opacity: 0; transition: opacity 0.3s; background: radial-gradient(60% 80% at 50% 100%, rgba(255, 210, 60, 0.55), transparent 70%); transform: translateY(14px) scale(1.04); }
.eui-charge.is-busy .eui-glow { opacity: 1; }
.eui-bolt { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: visible; }
.eui-bolt path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.eui-bolt .core { stroke: #fffbe0; stroke-width: 4; }
.eui-bolt .halo { stroke: #ffcc00; stroke-width: 18; opacity: 0.55; filter: blur(4px); }
.eui-pct { min-width: 2.6em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 06 save (specimen vial) ---------- */
.eui-save .eui-scard { left: 214px; top: 54px; width: 252px; overflow: hidden; z-index: 2; }
.eui-scard .art { position: relative; height: 168px; background: #cfe3f2 center / cover no-repeat; }
.eui-scard .art img { width: 100%; height: 100%; object-fit: cover; }
.eui-scard .body { padding: 14px 18px 18px; }
.eui-scard .body b { display: block; font: 900 19px/1.2 var(--eui-font); }
.eui-scard .body span { display: block; font: 700 13px/1.4 var(--eui-font); color: var(--eui-ink-3); }
.eui-scard .tags { display: flex; gap: 6px; margin-top: 10px; }
.eui-scard .tags i { font: 800 12px/1 var(--eui-font); font-style: normal; padding: 6px 9px; border-radius: 999px; background: #f2eff8; color: var(--eui-ink-2); }
.eui-mark { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, 0.95); color: var(--eui-ink); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.35); transition: transform 0.2s var(--eui-spring), color 0.3s; }
.eui-mark:hover { transform: scale(1.08); }
.eui-mark svg { width: 20px; height: 20px; }
.eui-mark svg path { fill: transparent; transition: fill 0.3s; }
.eui-save.is-saved .eui-mark { color: #d99a12; }
.eui-save.is-saved .eui-mark svg path { fill: var(--eui-gold); }
.eui-tally { position: absolute; left: 496px; top: 60px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 10px; border-radius: 999px; background: #fff; box-shadow: var(--eui-shadow); font: 900 15px/1 var(--eui-font); }
.eui-tally .mini { width: 22px; height: 30px; }
.eui-tally .n { position: relative; display: block; text-align: center; line-height: 26px; min-width: 32px; height: 26px; padding: 0 7px; border-radius: 13px; background: linear-gradient(180deg, #ffd56b, #f2b52c); color: #4a3300; font-size: 14px; overflow: hidden; }
.eui-vial { position: absolute; left: 0; top: 0; width: 46px; height: 70px; margin: 0; transform-origin: 50% 50%; z-index: 6; pointer-events: none; opacity: 0; }
.eui-vial svg { width: 100%; height: 100%; overflow: visible; }
.eui-vial .cap { transform-origin: 23px 12px; transform-box: view-box; }
.eui-flychip { position: absolute; left: 0; top: 0; z-index: 7; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 14px; background: #fff; box-shadow: 0 16px 30px -12px rgba(38, 29, 61, 0.45); pointer-events: none; white-space: nowrap; font: 900 16px/1 var(--eui-font); }
.eui-flychip .eui-ico { width: 34px; height: 42px; }
.eui-snap { position: absolute; z-index: 5; width: 70px; height: 50px; border-radius: 8px; background: center / cover no-repeat; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); pointer-events: none; opacity: 0; }

/* ---------- 07 retry (Bismuth) ---------- */
.eui-retry .eui-rcard { left: 44px; top: 142px; width: 452px; height: 136px; padding: 22px 24px; z-index: 2; }
.eui-rface { position: absolute; inset: 22px 24px; transition: opacity 0.3s, transform 0.45s var(--eui-spring); }
.eui-rface + .eui-rface { opacity: 0; transform: translateY(10px); pointer-events: none; }
.eui-retry.is-ok .eui-rface:first-child { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.eui-retry.is-ok .eui-rface + .eui-rface { opacity: 1; transform: none; pointer-events: auto; }
.eui-rhead { display: flex; gap: 12px; align-items: flex-start; }
.eui-rhead .dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; background: #ffe6e6; color: var(--eui-red); font: 900 15px/1 var(--eui-font); }
.eui-rhead .dot.ok { background: #ddf6e8; color: var(--eui-green); }
.eui-rhead .dot svg { width: 15px; height: 15px; }
.eui-rhead b { display: block; font: 900 19px/1.2 var(--eui-font); }
.eui-rhead span { display: block; font: 700 14px/1.35 var(--eui-font); color: var(--eui-ink-3); }
.eui-rface .eui-pill, .eui-rface .eui-badge { margin: 16px 0 0 42px; }
.eui-retry .eui-mascot { width: 176px; left: 516px; top: 140px; z-index: 3; }
.eui-retry .eui-shadow { left: 528px; width: 156px; top: 300px; }
.eui-qs { position: absolute; left: 520px; top: 96px; z-index: 3; pointer-events: none; }
.eui-qs i { position: absolute; font: 900 30px/1 var(--eui-font); font-style: normal; color: #3aa6dc; text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7); }
.eui-qs i:nth-child(1) { left: 0; top: 30px; }
.eui-qs i:nth-child(2) { left: 70px; top: 0; font-size: 36px; }
.eui-qs i:nth-child(3) { left: 150px; top: 24px; font-size: 26px; }
.eui-retry.is-ok .eui-qs i { opacity: 0 !important; transition: opacity 0.2s; }
.eui-halo { position: absolute; left: 604px; top: 228px; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; z-index: 2; background: radial-gradient(closest-side, rgba(90, 190, 255, 0.45), rgba(90, 190, 255, 0.12) 70%, transparent); opacity: 0; pointer-events: none; }

/* ---------- 08 download (Hydrogen hatches) ---------- */
.eui-get .eui-gcard { left: 44px; top: 146px; width: 450px; padding: 20px 22px 22px; z-index: 2; }
.eui-doc { display: grid; place-items: center; width: 46px; height: 56px; border-radius: 10px; flex: none; color: #fff; background: linear-gradient(160deg, #9d84ff, #6c4fe6); box-shadow: 0 8px 16px -8px #6c4fe6; }
.eui-doc svg { width: 22px; height: 22px; }
.eui-get .eui-track .fill { background: linear-gradient(90deg, #ffb24d, #f08a1a); box-shadow: none; }
.eui-get.is-done .eui-track .fill { background: linear-gradient(90deg, var(--eui-green-2), var(--eui-green)); }
.eui-get .eui-pill.is-pct { background: #fff1e0; color: #e07c0f; box-shadow: none; }
.eui-egg-wrap { position: absolute; left: 516px; top: 96px; width: 180px; height: 220px; z-index: 3; transform: scale(1.14); transform-origin: 50% 50%; }
.eui-egg-ring { position: absolute; left: -2px; top: 18px; width: 184px; height: 184px; overflow: visible; }
.eui-egg-ring circle { fill: none; stroke-width: 6; }
.eui-egg-ring .bg { stroke: rgba(240, 138, 26, 0.16); }
.eui-egg-ring .fg { stroke: #f08a1a; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke 0.3s; }
.eui-get.is-done .eui-egg-ring .fg { stroke: var(--eui-green); }
.eui-egg { position: absolute; left: 48px; top: 50px; width: 84px; height: 112px; transform-origin: 50% 92%; }
.eui-egg svg { width: 100%; height: 100%; overflow: visible; }
.eui-egg .crack { stroke: #6b5a3a; stroke-width: 2.2; fill: none; stroke-linejoin: round; opacity: 0; }
.eui-egg .top { transform-box: view-box; transform-origin: 42px 52px; }
.eui-get .eui-mascot { width: 120px; left: 30px; top: 30px; opacity: 0; transform-origin: 50% 90%; }
.eui-get .eui-shadow { left: 44px; width: 92px; top: 156px; }
.eui-shell-front { position: absolute; left: 48px; top: 50px; width: 84px; height: 112px; pointer-events: none; opacity: 0; }
.eui-shell-front svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- live / idle loops ---------- */
.eui-scene.is-live .eui-idle-bob { animation: eui-bob 3.2s ease-in-out infinite; }
.eui-scene.is-live .eui-zzz i { animation: eui-zzz 3s ease-out infinite; }
.eui-scene.is-live .eui-zzz i:nth-child(2) { animation-delay: 1s; }
.eui-scene.is-live .eui-zzz i:nth-child(3) { animation-delay: 2s; }
.eui-scene.is-live .eui-qs i { animation: eui-q 2.4s ease-in-out infinite; }
.eui-scene.is-live .eui-qs i:nth-child(2) { animation-delay: -0.8s; }
.eui-scene.is-live .eui-qs i:nth-child(3) { animation-delay: -1.6s; }
.eui-retry.is-busy .eui-qs i { animation-duration: 0.9s !important; }
.eui-scene.is-live.is-night .eui-sky i { animation: eui-twinkle 2.2s ease-in-out infinite; }
.eui-scene.is-live.is-night .eui-sky i:nth-child(3n) { animation-delay: -0.7s; }
.eui-scene.is-live.is-night .eui-sky i:nth-child(3n+1) { animation-delay: -1.4s; }

@keyframes eui-rot { to { transform: rotate(360deg); } }
@keyframes eui-sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes eui-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes eui-zzz { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -54px) scale(1.25); } }
@keyframes eui-q { 0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.95; } 50% { transform: translateY(-10px) rotate(8deg); opacity: 0.55; } }
@keyframes eui-twinkle { 0%, 100% { opacity: 0.9; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.6); } }
@keyframes eui-toast-in { from { opacity: 0; transform: translateY(16px) scale(0.94); } }
@keyframes eui-toast-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* ---------- reduced motion: static end states ---------- */
@media (prefers-reduced-motion: reduce) {
  .eui-scene *, .eui-toast { animation: none !important; transition: none !important; }
  .eui-fx { display: none; }
}

.eui-tally .n span { position: absolute; inset: 0; display: block; }

.eui-z { font-size: 16px; color: #e9e2ff; text-shadow: none; }
.eui-retry.is-busy .eui-rface:first-child .eui-rhead { opacity: 0.45; transition: opacity 0.3s; }
.eui-get.is-done .eui-egg-wrap::before { content: ""; position: absolute; left: 20px; top: 20px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.85), rgba(255,255,255,0)); }

/* printables: egg-hatch download buttons (Elemon UI kit) */
.dl--egg { position: relative; padding-right: 92px; overflow: visible; }
.dl-egg { position: absolute; right: 14px; top: 50%; width: 64px; height: 64px; margin-top: -32px; pointer-events: none; }
.dl-ring { position: absolute; inset: 0; width: 64px; height: 64px; opacity: 0; transition: opacity .3s; }
.dl-ring circle { fill: none; stroke-width: 4; stroke: rgba(28, 20, 6, .14); }
.dl-ring .fg { stroke: #1c1406; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.dl--egg.is-busy .dl-ring { opacity: 1; }
.dl-shell, .dl-front { position: absolute; left: 18px; top: 10px; width: 28px; height: 38px; transform-origin: 50% 90%; }
.dl-shell svg, .dl-front svg { width: 100%; height: 100%; overflow: visible; display: block; }
.dl-shell .crack { stroke: #6b5a3a; stroke-width: 2.4; fill: none; opacity: 0; }
.dl-shell .top { transform-box: view-box; transform-origin: 42px 52px; }
.dl-front { opacity: 0; }
.dl--egg .eui-mascot { position: absolute; left: 8px; top: -26px; width: 48px; opacity: 0; transform-origin: 50% 90%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.dl--egg .eui-mascot img { width: 100%; height: auto; display: block; }
.dl--egg.is-done { background: linear-gradient(180deg, #b8f0cf, #5fd496 60%, #2fae6a); }

/* ---------- inline variants (used inside the game and the landing panels) ---------- */
.eui-inline { position: relative; inset: auto; transform: none; font-family: var(--eui-font); color: var(--eui-ink); }
.eui-retry.eui-inline { display: flex; align-items: center; gap: 8px; min-height: 150px; padding: 6px 0; }
.eui-retry.eui-inline .eui-rcard { position: relative; left: auto; top: auto; width: auto; height: 136px; flex: 1; min-width: 0; padding: 0; }
.eui-retry.eui-inline .eui-rface { inset: 18px 16px; }
.eui-retry.eui-inline .eui-rhead b { font-size: 16px; }
.eui-retry.eui-inline .eui-rhead span { font-size: 13px; }
.eui-retry.eui-inline .eui-rface .eui-pill, .eui-retry.eui-inline .eui-rface .eui-badge { margin: 12px 0 0 42px; }
.eui-retry.eui-inline .eui-mascot { position: relative; left: auto; top: auto; order: 2; width: 92px; flex: none; }
.eui-retry.eui-inline .eui-qs { left: auto; right: 6px; top: -4px; width: 100px; transform: scale(.62); transform-origin: 100% 0; }
.eui-retry.eui-inline .eui-shadow { display: none; }
.eui-copy.eui-inline { width: min(540px, 100%); margin: 0 auto; padding-top: 86px; }
.eui-copy.eui-inline .eui-term { position: relative; left: auto; right: auto; top: auto; height: 60px; padding-left: 20px; }
.eui-copy.eui-inline .eui-code { font-size: 15px; }
.eui-copy.eui-inline .eui-mascot { left: 50%; top: 10px; width: 78px; margin-left: -39px; }
.eui-overlay { position: fixed; inset: 0; z-index: 2147481000; display: grid; place-items: center; padding: 20px; background: rgba(8, 12, 22, 0.55); backdrop-filter: blur(3px); animation: eui-fade 0.3s ease both; }
.eui-overlay > .eui-retry { width: min(460px, 100%); }
.eui-overlay.is-out { animation: eui-fade-out 0.35s ease both; }
@keyframes eui-fade { from { opacity: 0; } }
@keyframes eui-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .eui-overlay { animation: none; } }
