/* ==========================================================
   pages/event-enchant.css — 이벤트 강화 시뮬레이터 /tools/{slug} (2026-10-28 할로윈, docs/06-기획/22-이벤트-시뮬레이션_plan.md — 시안 승인)
   뷰 app/Views/tools/event_enchant.php · JS public/js/pages/event-enchant.js
   - 사이트 부분은 ev-, 게임 창(마법인형 합성창과 같은 금줄 테·돌 바탕)은 eg- 접두사
   - 색은 아래 지역 토큰 — 사이트 부분은 기존 토큰(v3·v4 둘 다 있는 이름)에 v4 값을 먼저 잇고, 게임 창은 테마와 상관없이
     늘 어두운 돌판이라 실제 값을 둔다 (pages/doll.css와 같은 방식 — 게이트 check-design-tokens: 지역 토큰 선언은 허용)
   ========================================================== */
:root {
  --ev-sf: var(--ui-surface, var(--bg-surface));
  --ev-sf2: var(--ui-surface-2, var(--bg-elevated));
  --ev-sf3: var(--ui-surface-3, var(--bg-hover));
  --ev-line: var(--ui-line, var(--border-primary));
  --ev-line2: var(--ui-line-2, var(--border-secondary));
  --ev-t1: var(--ui-text-1, var(--text-primary));
  --ev-t2: var(--ui-text-2, var(--text-secondary));
  --ev-t3: var(--ui-text-3, var(--text-tertiary));
  --ev-ac: var(--ui-accent, var(--color-accent));
  --ev-ac-weak: var(--ui-accent-weak, var(--color-accent-bg));
  --ev-gold-weak: var(--ui-gold-weak, var(--color-accent-bg));
  --ev-gold-text: var(--ui-gold-text, var(--color-accent));
  --ev-down: var(--ui-down, var(--color-down));
  --ev-r: var(--radius-sm);
  --ev-seg-shadow: 0 1px 2px rgba(20, 26, 38, .08);
  --ev-icon-bg: #141A26;
  /* 게임 창 — 늘 어둡다 */
  --eg-backdrop: #1d1d20; --eg-stone: #2a2b2e; --eg-bar: #2c2d30; --eg-close: #3c3d40; --eg-label: #3a3b3e;
  --eg-gold-1: #e3bd62; --eg-gold-2: #8a5f1c; --eg-gold-3: #3b2708; --eg-gold-4: #c9a24c; --eg-gold-5: #6b4814;
  --eg-slot: #0d0d0f; --eg-slot-line: #55565a; --eg-cell: #101113; --eg-cell-line: #3a3b3f; --eg-cell-empty: #0e0e10; --eg-cell-empty-line: #232427;
  --eg-text: #e9e6dc; --eg-text-2: #d8d4ca; --eg-mute: #a7a39a; --eg-white: #f1f1f1; --eg-dim: #9a9a9a; --eg-scroll-track: #111;
  --eg-yellow: #ffe08a; --eg-yellow-2: #ffe9a8; --eg-cream: #fff3c4; --eg-sys: #9fd4ff; --eg-warn: #ff9a9a; --eg-charge-t: #bfe0ff;
  --eg-btn: #45464a; --eg-btn-hover: #55565a; --eg-btn-off: #323336; --eg-go: #8a6a2a; --eg-go-hover: #a07c33;
  --eg-orb: #2c7d2b; --eg-orb-glow: #7fe36a; --eg-sel-1: #1d6b45; --eg-sel-2: #0f3b26;
  --eg-fx-ok: #7cc4ff; --eg-fx-gold: #ffe08a; --eg-fx-fail: #ff7d7d;
  --eg-shade: rgba(0, 0, 0, .28); --eg-shade-2: rgba(0, 0, 0, .35); --eg-shade-3: rgba(0, 0, 0, .6); --eg-msg: rgba(0, 0, 0, .72);
  --eg-hi: rgba(255, 255, 255, .06); --eg-hi-2: rgba(255, 255, 255, .16); --eg-hi-3: rgba(255, 255, 255, .25); --eg-go-hi: rgba(255, 236, 170, .35);
  --eg-orn: rgba(201, 205, 211, .55); --eg-perm-bg: rgba(201, 162, 76, .18);
  --eg-shadow: 0 6px 18px rgba(0, 0, 0, .55); --eg-inset: inset 0 0 0 1px #000, inset 0 0 40px rgba(0, 0, 0, .6);
  --eg-glow-gold: rgba(246, 211, 107, .8); --eg-glow-gold-2: rgba(246, 211, 107, .6); --eg-glow-gold-3: rgba(246, 211, 107, .45); --eg-glow-gold-4: rgba(246, 211, 107, .9);
  --eg-glow-blue: rgba(120, 190, 255, .9); --eg-charge-1: rgba(90, 170, 255, 0); --eg-charge-2: rgba(90, 170, 255, .8); --eg-charge-3: rgba(150, 205, 255, .95);
  --eg-flash-ok: rgba(110, 180, 255, .45); --eg-flash-gold: rgba(255, 224, 138, .55); --eg-flash-fail: rgba(255, 90, 90, .45);
  --eg-serif: Georgia, 'Times New Roman', 'Noto Serif', serif;
}

.ev-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--ev-r); font-size: var(--fs-12); font-weight: 700; vertical-align: middle; white-space: nowrap; }
.ev-chip--live { background: var(--ev-gold-weak); color: var(--ev-gold-text); }
.ev-chip--end { background: var(--ev-sf3); color: var(--ev-t2); }
.ev-head-ic { background: var(--ev-icon-bg); }
.ev-head-ic img { display: block; }
.ev-srv { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--ev-t3); }
.ev-srv select, .ev-fld input { height: 40px; border: 1px solid var(--ev-line2); border-radius: var(--ev-r); padding: 0 10px; font: inherit; font-size: var(--fs-14); color: var(--ev-t1); background: var(--ev-sf); }
.ev-srv select:focus, .ev-fld input:focus { outline: none; border-color: var(--ev-ac); }

.ev-ended { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--ev-r); border: 1px solid var(--ev-line2); background: var(--ev-sf3); color: var(--ev-t2); font-size: var(--fs-14); }
.ev-ended p { margin: 0; flex: 1 1 320px; }
.ev-ended b { color: var(--ev-t1); }
.ev-ended a { font-size: var(--fs-13); font-weight: 600; white-space: nowrap; }

.ev { display: flex; gap: 16px; align-items: flex-start; }
.ev-left { width: 320px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 16px; }
.ev-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ev-card { background: var(--ev-sf); border: 1px solid var(--ev-line); border-radius: var(--ev-r); }
.ev-card__hd { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; margin: 0; border-bottom: 1px solid var(--ev-line); font-size: var(--fs-15); font-weight: 700; color: var(--ev-t1); }
.ev-card__hd h2, .ev-card__hd h3 { margin: 0; font-size: var(--fs-15); font-weight: 700; }
.ev-card__hd span { font-size: var(--fs-12); font-weight: 500; color: var(--ev-t3); }
.ev-card__sub { margin: 0; padding: 12px 16px 4px; border-top: 1px solid var(--ev-line); font-size: var(--fs-12); font-weight: 700; color: var(--ev-t3); }
.ev-tools { list-style: none; margin: 0; padding: 8px; }
.ev-tool { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--ev-r); color: var(--ev-t1); text-decoration: none; }
.ev-tool:hover { background: var(--ev-sf2); }
.ev-tool.is-on { background: var(--ev-ac-weak); }
.ev-tool > i { font-size: var(--fs-18); color: var(--ev-t3); }
.ev-tool > img { border-radius: var(--radius-xs); background: var(--ev-icon-bg); }
.ev-tool > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ev-tool b { font-size: var(--fs-14); }
.ev-tool span { font-size: var(--fs-12); color: var(--ev-t3); }
.ev-rules { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-13); line-height: 1.55; color: var(--ev-t2); }
.ev-rules b { color: var(--ev-t1); }
.ev-rules__warn { padding: 8px 10px; border-radius: var(--ev-r); background: var(--ev-gold-weak); color: var(--ev-gold-text); }
.ev-src { margin: 0; padding: 0 16px 14px; font-size: var(--fs-12); color: var(--ev-t3); line-height: 1.6; }

.ev-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ev-fact { padding: 16px; border-right: 1px solid var(--ev-line); display: flex; flex-direction: column; gap: 6px; }
.ev-fact:last-child { border-right: 0; }
.ev-fact span, .ev-fact small { font-size: var(--fs-12); color: var(--ev-t3); }
.ev-fact span { font-weight: 600; }
.ev-fact b { font-size: var(--fs-22); font-weight: 800; letter-spacing: -.02em; color: var(--ev-t1); font-variant-numeric: tabular-nums; }

.ev-scroll { overflow-x: auto; }
.ev-tbl { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.ev-tbl th, .ev-tbl td { padding: 11px 12px; border-bottom: 1px solid var(--ev-line); text-align: right; color: var(--ev-t1); }
.ev-tbl thead th { font-size: var(--fs-12); font-weight: 600; color: var(--ev-t3); background: var(--ev-sf2); }
.ev-tbl th:first-child, .ev-tbl td:first-child { text-align: left; }
.ev-tbl tbody th { font-weight: 400; }
.ev-tbl tfoot th, .ev-tbl tfoot td { font-weight: 800; border-bottom: 0; }
.ev-tbl--rate { min-width: 720px; }
.ev-tbl .is-safe { color: var(--ev-t3); }
.ev-tbl .is-mid { font-weight: 700; }
.ev-tbl .is-low { color: var(--ev-down); font-weight: 700; }
.ev-name { display: inline-flex; align-items: center; gap: 10px; }
.ev-name img { border-radius: var(--radius-xs); background: var(--ev-icon-bg); flex: 0 0 auto; }
.ev-name > span { display: flex; flex-direction: column; }
.ev-name small { font-size: var(--fs-12); color: var(--ev-t3); }

.ev-simhd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--ev-line); }
.ev-simhd p { margin: 0; font-size: var(--fs-12); color: var(--ev-t3); }
.ev-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--ev-r); background: var(--ev-sf3); }
.ev-seg button { height: 36px; padding: 0 16px; border: 0; border-radius: var(--ev-r); background: transparent; font: inherit; font-size: var(--fs-14); font-weight: 600; color: var(--ev-t2); cursor: pointer; }
.ev-seg button[aria-selected="true"] { background: var(--ev-sf); color: var(--ev-t1); box-shadow: var(--ev-seg-shadow); }
.ev-seg button:focus { outline: none; }
.ev-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--ev-line); background: var(--ev-sf2); }
.ev-prices p { grid-column: 1 / -1; margin: 0; font-size: var(--fs-12); color: var(--ev-t3); }
.ev-fld { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--ev-t3); }
.ev-pane { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.ev-pane[hidden] { display: none; }
.ev-bill { border: 1px solid var(--ev-line); border-radius: var(--ev-r); }
.ev-goalhd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--fs-14); font-weight: 600; }
.ev-goalhd small { font-size: var(--fs-12); font-weight: 400; color: var(--ev-t3); }
.ev-answer { margin: 0; padding: 16px; border-radius: var(--ev-r); background: var(--ev-ac-weak); font-size: var(--fs-15); color: var(--ev-t1); }
.ev-note { margin: 0; font-size: var(--fs-12); color: var(--ev-t3); }

/* ── 게임 창 ── */
.eg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; border-radius: var(--ev-r); background: var(--eg-backdrop); box-shadow: var(--eg-inset); color: var(--eg-text); }
.eg-win { padding: 5px; border-radius: var(--radius-sm); min-width: 0; background: repeating-linear-gradient(135deg, var(--eg-gold-1) 0 2px, var(--eg-gold-2) 2px 4px, var(--eg-gold-3) 4px 5px); box-shadow: var(--eg-shadow); }
.eg-win--full { grid-column: 1 / -1; }
.eg-in { position: relative; height: 100%; display: flex; flex-direction: column; border: 1px solid #000; background: var(--eg-stone); }
.eg-close { position: absolute; top: 0; right: 0; z-index: 2; font-family: var(--eg-serif); font-size: var(--fs-11); font-weight: 700; line-height: 1; color: var(--eg-white); padding: 5px 7px 6px 9px; background: var(--eg-close); border-bottom-left-radius: var(--radius-sm); border-left: 1px solid #000; border-bottom: 1px solid #000; }
.eg-top { position: relative; overflow: hidden; min-height: 300px; display: flex; flex-direction: column; align-items: center; padding: 18px 12px 14px; box-shadow: inset 0 0 0 1px var(--eg-hi); }
.eg-orn { position: absolute; inset: 0 0 auto 0; width: 100%; height: auto; color: var(--eg-orn); opacity: .6; pointer-events: none; }
.eg-tier { position: relative; height: 40px; font-family: var(--eg-serif); font-size: var(--fs-32); font-weight: 700; line-height: 40px; color: var(--eg-white); letter-spacing: .04em; text-shadow: 1px 1px 0 #000, 0 0 8px var(--eg-hi-3); }
.eg-tier.is-perm { color: var(--eg-yellow); text-shadow: 1px 1px 0 #000, 0 0 12px var(--eg-glow-gold); }
.eg-tier.is-charge { color: var(--eg-charge-t); text-shadow: 1px 1px 0 #000, 0 0 14px var(--eg-glow-blue); }
.eg-tier.is-fail { color: var(--eg-warn); }
.eg-sw { position: relative; margin-top: 12px; }
.eg-slot { position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--eg-slot); border: 2px solid var(--eg-slot-line); box-shadow: inset 0 0 0 2px #000, 0 0 0 1px #000; }
.eg-slot img { width: 64px; height: 64px; }
.eg-slot em { position: absolute; right: 4px; bottom: 3px; font-size: var(--fs-12); font-weight: 700; line-height: 1; font-style: normal; color: #fff; text-shadow: 1px 1px 0 #000; }
.eg-slot__q { font-family: var(--eg-serif); font-size: var(--fs-32); font-weight: 700; line-height: 1; color: var(--eg-gold-4); text-shadow: 1px 1px 0 #000; }
.eg-slot.is-perm { border-color: var(--eg-gold-4); box-shadow: inset 0 0 0 2px #000, 0 0 0 1px #000, 0 0 14px var(--eg-glow-gold-2); }
.eg-name { position: relative; margin-top: 10px; font-size: var(--fs-15); font-weight: 700; color: var(--eg-white); text-shadow: 1px 1px 0 #000; }
.eg-perm { position: relative; margin-top: 8px; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--eg-perm-bg); border: 1px solid var(--eg-gold-4); color: var(--eg-yellow); font-size: var(--fs-12); font-weight: 700; text-shadow: 1px 1px 0 #000; }
.eg-perm[hidden] { display: none; }
.eg-next { position: relative; margin-top: 4px; font-size: var(--fs-13); color: var(--eg-text-2); text-shadow: 1px 1px 0 #000; text-align: center; }
.eg-scr { position: relative; margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px 10px 4px 4px; border-radius: var(--radius-sm); background: var(--eg-shade-2); font-size: var(--fs-12); color: var(--eg-text-2); }
.eg-scr img { width: 28px; height: 28px; }
.eg-scr b { color: var(--eg-yellow); }
.eg-scr__note { color: var(--eg-mute); }
.eg-bar { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 8px; border-top: 2px solid var(--eg-scroll-track); background: var(--eg-bar); }
.eg-sp { flex: 1; }
.eg-cmd { height: 32px; padding: 0 14px; border: 1px solid #000; border-radius: var(--radius-sm); background: var(--eg-btn); box-shadow: inset 0 1px 0 var(--eg-hi-2); font: inherit; font-size: var(--fs-14); font-weight: 700; color: var(--eg-white); text-shadow: 1px 1px 0 #000; cursor: pointer; }
.eg-cmd:hover:not(:disabled) { background: var(--eg-btn-hover); color: var(--eg-yellow-2); }
.eg-cmd--go { min-width: 96px; background: var(--eg-go); color: var(--eg-cream); box-shadow: inset 0 1px 0 var(--eg-go-hi); }
.eg-cmd--go:hover:not(:disabled) { background: var(--eg-go-hover); color: #fff; }
.eg-cmd:disabled { background: var(--eg-btn-off); color: var(--eg-dim); cursor: default; box-shadow: none; }
.eg-cmd:focus { outline: none; }
.eg-cmd:focus-visible { box-shadow: 0 0 0 2px var(--eg-gold-1); }
.eg-label { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; height: 26px; margin: 10px 12px 0; padding: 0 14px 0 6px; border-radius: var(--radius-pill); font-family: var(--eg-serif); font-size: var(--fs-13); font-weight: 700; line-height: 1; color: var(--eg-white); background: var(--eg-label); border: 1px solid #000; box-shadow: inset 0 1px 0 var(--eg-hi-2); }
.eg-orb { width: 14px; height: 14px; border-radius: 50%; background: var(--eg-orb); box-shadow: 0 0 0 1px #000, 0 0 8px var(--eg-orb-glow); }
.eg-shop { list-style: none; margin: 10px 12px 12px; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.eg-shop li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--eg-shade); border: 1px solid var(--eg-shade-3); }
.eg-shop__ic { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; background: var(--eg-slot); border: 1px solid var(--eg-cell-line); }
.eg-shop__nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eg-shop__nm b { font-size: var(--fs-13); color: var(--eg-white); text-shadow: 1px 1px 0 #000; }
.eg-shop__nm span { font-size: var(--fs-11); color: var(--eg-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-shop__pr { font-size: var(--fs-12); color: var(--eg-yellow); white-space: nowrap; text-shadow: 1px 1px 0 #000; font-variant-numeric: tabular-nums; }
.eg-shop__own { min-width: 44px; font-size: var(--fs-11); color: var(--eg-mute); text-align: right; }
.eg-shop__buy { height: 30px; min-width: 60px; padding: 0 12px; border: 1px solid #000; border-radius: var(--radius-sm); background: var(--eg-go); color: var(--eg-cream); font: inherit; font-size: var(--fs-13); font-weight: 700; box-shadow: inset 0 1px 0 var(--eg-go-hi); text-shadow: 1px 1px 0 #000; cursor: pointer; }
.eg-shop__buy:hover:not(:disabled) { background: var(--eg-go-hover); color: #fff; }
.eg-shop__buy:disabled { background: var(--eg-btn-off); color: var(--eg-dim); cursor: default; box-shadow: none; }
.eg-invf { display: grid; grid-template-columns: minmax(0, 1fr) 14px; gap: 8px; padding: 10px 10px 8px; }
.eg-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); grid-auto-rows: 58px; align-content: start; height: 196px; overflow-y: auto; padding: 4px; background: var(--eg-slot); border: 1px solid #000; box-shadow: inset 0 0 0 1px var(--eg-cell-line); }
.eg-cell { position: relative; padding: 0; min-width: 0; display: grid; place-items: center; background: var(--eg-cell); border: 1px solid var(--eg-cell-line); color: inherit; cursor: pointer; }
.eg-cell:disabled { cursor: default; }
.eg-cell img { width: 46px; height: 46px; }
.eg-cell__st, .eg-cell__en { position: absolute; font-size: var(--fs-11); font-weight: 700; line-height: 1; color: #fff; text-shadow: 1px 1px 0 #000; }
.eg-cell__st { right: 3px; bottom: 2px; }
.eg-cell__en { left: 3px; top: 3px; }
.eg-cell__pm { position: absolute; right: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--eg-yellow); box-shadow: 0 0 0 1px #000, 0 0 6px var(--eg-glow-gold-4); }
.eg-cell.is-sel { background: radial-gradient(circle, var(--eg-sel-1), var(--eg-sel-2) 70%); }
.eg-cell.is-perm { box-shadow: inset 0 0 0 1px var(--eg-gold-4), 0 0 10px var(--eg-glow-gold-3); }
.eg-cell.is-perm .eg-cell__en { color: var(--eg-yellow); }
.eg-cell.is-empty { border-color: var(--eg-cell-empty-line); background: var(--eg-cell-empty); }
.eg-cell:focus { outline: none; }
.eg-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--eg-gold-1); }
.eg-rod { width: 10px; justify-self: center; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--eg-gold-5), var(--eg-gold-1) 45%, var(--eg-gold-2)); box-shadow: 0 0 0 1px #000; }
.eg-invbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 4px 10px; border-top: 2px solid var(--eg-scroll-track); background: var(--eg-bar); font-size: var(--fs-13); color: var(--eg-text-2); }
.eg-invbar b { color: var(--eg-yellow); text-shadow: 1px 1px 0 #000; font-variant-numeric: tabular-nums; }
.eg-msg { grid-column: 1 / -1; list-style: none; margin: 0; padding: 8px 12px; min-height: 96px; display: flex; flex-direction: column; gap: 4px; background: var(--eg-msg); border: 1px solid #000; font-size: var(--fs-13); line-height: 1.5; text-shadow: 1px 1px 0 #000; }
.eg-msg .is-sys { color: var(--eg-text-2); }
.eg-msg .is-ok { color: var(--eg-sys); }
.eg-msg .is-bad { color: var(--eg-warn); }
.eg-msg .is-gold { color: var(--eg-yellow); font-weight: 700; }
.eg-msg__hint { color: var(--eg-mute); }

/* ── 강화 연출 — 확률이 100% 아닌 도전: 기 모으기 → 결과 터짐 ── */
@keyframes eg-charge { 0% { transform: scale(1); box-shadow: inset 0 0 0 2px #000, 0 0 0 1px #000, 0 0 0 0 var(--eg-charge-1); } 20% { transform: scale(1.03) rotate(-2deg); } 40% { transform: scale(1.05) rotate(2deg); box-shadow: inset 0 0 0 2px #000, 0 0 0 1px #000, 0 0 22px 6px var(--eg-charge-2); } 60% { transform: scale(1.06) rotate(-2deg); } 80% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1.1); box-shadow: inset 0 0 0 2px #000, 0 0 0 1px #000, 0 0 44px 16px var(--eg-charge-3); } }
@keyframes eg-ok { 0% { transform: scale(1.18); } 40% { transform: scale(.92); } 70% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes eg-fail { 0% { transform: translateX(0); } 12% { transform: translateX(-7px); } 24% { transform: translateX(7px); } 36% { transform: translateX(-5px); } 48% { transform: translateX(5px); filter: brightness(2) saturate(0); } 100% { transform: scale(.4) rotate(14deg); opacity: 0; filter: blur(3px) brightness(2); } }
@keyframes eg-ring { from { transform: translate(-50%, -50%) scale(.2); opacity: .95; } to { transform: translate(-50%, -50%) scale(2.8); opacity: 0; } }
@keyframes eg-pop { 0% { transform: translate(-50%, 0) scale(.3); opacity: 0; } 16% { transform: translate(-50%, 0) scale(1.3); opacity: 1; } 28% { transform: translate(-50%, 0) scale(1); } 72% { opacity: 1; } 100% { transform: translate(-50%, -30px) scale(1); opacity: 0; } }
@keyframes eg-spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes eg-flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.eg-slot.is-charge { animation: eg-charge .95s ease-in forwards; }
.eg-slot.is-ok, .eg-slot.is-gold { animation: eg-ok .5s ease-out; }
.eg-slot.is-fail { animation: eg-fail 1.1s ease-in forwards; }
.eg-flash { position: absolute; inset: 0; pointer-events: none; animation: eg-flash 1s ease-out forwards; }
.eg-flash--ok { background: radial-gradient(circle at 50% 42%, var(--eg-flash-ok), transparent 60%); }
.eg-flash--gold { background: radial-gradient(circle at 50% 42%, var(--eg-flash-gold), transparent 62%); }
.eg-flash--fail { background: radial-gradient(circle at 50% 42%, var(--eg-flash-fail), transparent 60%); }
.eg-ring { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; border-radius: 50%; border: 3px solid currentColor; box-shadow: 0 0 14px currentColor; pointer-events: none; animation: eg-ring .75s ease-out forwards; }
.eg-ring--2 { animation-delay: .14s; border-width: 2px; }
.eg-spk { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; pointer-events: none; animation: eg-spark .9s ease-out forwards; }
.eg-pop { position: absolute; left: 50%; top: -30px; z-index: 4; white-space: nowrap; font-family: var(--eg-serif); font-size: var(--fs-28); font-weight: 800; line-height: 1; text-shadow: 0 0 14px currentColor, 2px 2px 0 #000; pointer-events: none; animation: eg-pop 1.25s ease-out forwards; }
.eg-fx-ok { color: var(--eg-fx-ok); }
.eg-fx-gold { color: var(--eg-fx-gold); }
.eg-fx-fail { color: var(--eg-fx-fail); }
@media (prefers-reduced-motion: reduce) { .eg-slot, .eg-flash, .eg-ring, .eg-spk, .eg-pop { animation-duration: .01s !important; } }

@media (max-width: 900px) {
  .ev { flex-direction: column; }
  .ev-left { width: 100%; }
  .ev-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-fact:nth-child(2) { border-right: 0; }
  .eg { grid-template-columns: minmax(0, 1fr); padding: 8px; }
}
