/* ==========================================================================
   Eclipsed Christmas Event
   1. Christmas Wonderland (decor hero, doar tema Crăciun)
   2. Bannerul evenimentului
   3. Grinch Chaos Mode
   4. Artificii / restaurare
   5. Grinch Takeover (joc)
   6. Administrare
   Culorile de suprafață vin din theme.css, deci Light/Dark funcționează automat.
   ========================================================================== */

/* ---------- 1. Christmas Wonderland ----------
   Scenă pe straturi (fundal → față), toate în spatele conținutului și fără clicuri:
   lumină → bokeh → ghirlandă → globuri → ramuri în colțuri → orizont (zăpadă, brazi, cadouri) → sclipiri.
   Doar transform/opacity sunt animate, iar straturile au paralaxă ușoară la mișcarea mouse-ului. */
.wonderland { display: none; }
body[data-theme="christmas"] .wonderland { display: block; position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; contain: layout paint; --px: 0; --py: 0; --needle: #1d5c3f; --needle2: #2e7d55; --tree1: #123f2b; --tree2: #0c2d20; --snow: 232, 243, 248; }
body[data-theme="christmas"] .hero::before { display: none; }
.wl-layer { position: absolute; inset: 0; transform: translate3d(calc(var(--px) * var(--depth) * -1px), calc(var(--py) * var(--depth) * -.6px), 0); }
.wl-paused *, .wl-paused { animation-play-state: paused !important; }

.wl-light { position: absolute; inset: 0; animation: wl-breathe 9s ease-in-out infinite;
  background: radial-gradient(ellipse 42% 34% at 80% 38%, rgba(255, 214, 130, .2), transparent 70%), radial-gradient(ellipse 70% 18% at 50% 0, rgba(255, 231, 176, .12), transparent 75%), radial-gradient(ellipse 32% 38% at 6% 100%, rgba(95, 227, 154, .1), transparent 70%); }
.wl-bokeh i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0; animation: wl-bokeh 12s ease-in-out var(--d) infinite;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 52%, transparent) 0, color-mix(in srgb, var(--c) 16%, transparent) 55%, transparent 70%); }

/* ghirlanda luminoasă: firul e desenat în SVG, becurile sunt elemente HTML poziționate pe curbă */
.wl-lights { position: absolute; left: -1%; right: -1%; top: 78px; height: 130px; }
.wl-strand { position: absolute; inset: 0; transition: transform 1.1s cubic-bezier(.45, 0, .6, 1.15); }
.wl-strand-a { transform-origin: 0 14px; } .wl-strand-b { transform-origin: 100% 14px; }
.wl-strand svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .5)); }
.wl-bulb { position: absolute; width: 11px; height: 16px; margin: -1px 0 0 -5.5px; border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%; animation: wl-twinkle 3.2s ease-in-out calc(var(--i) * -.41s) infinite;
  background: radial-gradient(circle at 38% 30%, #fff 0 12%, var(--c) 42%, color-mix(in srgb, var(--c) 55%, #000) 100%);
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--c) 70%, transparent), 0 0 22px 6px color-mix(in srgb, var(--c) 28%, transparent); transition: background .6s, box-shadow .6s; }
.wl-bulb::before { content: ""; position: absolute; left: 50%; top: -5px; width: 7px; height: 6px; margin-left: -3.5px; border-radius: 2px 2px 0 0; background: #19221c; }
.wl-spark { position: absolute; left: 50%; width: 5px; height: 5px; margin: 6px 0 0 -2.5px; border-radius: 50%; background: #fff; opacity: 0; box-shadow: 0 0 8px 3px #aee3ff, 0 0 22px 9px rgba(110, 190, 255, .55); }

/* globuri: fir + sferă cu reflexie; „soarta” lor în Chaos e fixată în data-fate */
.wl-baubles { position: absolute; inset: 0; }
.wl-bauble { position: absolute; top: 0; left: var(--x); width: 0; transform-origin: 50% 0; animation: wl-swing 6.4s ease-in-out var(--d) infinite; transition: transform .9s ease .2s; }
.wl-bauble { --k: 1; }
.wl-string { display: block; width: 1.5px; height: calc(var(--len) * var(--k)); margin-left: -.75px; background: linear-gradient(#e6cd86, #8a7440); }
.wl-ball { position: relative; display: block; width: var(--s); height: var(--s); margin: -1px 0 0 calc(var(--s) / -2); border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, rgba(255, 255, 255, .92) 0 5%, rgba(255, 255, 255, 0) 22%), radial-gradient(circle at 50% 58%, var(--c), color-mix(in srgb, var(--c) 50%, #000) 94%);
  box-shadow: inset -5px -7px 12px rgba(0, 0, 0, .38), 0 8px 18px rgba(0, 0, 0, .45), 0 0 26px color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform 1.05s cubic-bezier(.55, 0, 1, .45) var(--fall), opacity .35s ease calc(var(--fall) + .95s), filter .8s; }
.wl-ball::before { content: ""; position: absolute; left: 50%; top: -7px; width: 14px; height: 9px; margin-left: -7px; border-radius: 3px 3px 1px 1px; background: linear-gradient(90deg, #8f7a3e, #f0d58a, #8f7a3e); }
.wl-ball em { position: absolute; inset: 0; border-radius: 50%; }
.wl-bauble[data-pattern="1"] .wl-ball em { background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(255, 233, 160, .55) 9px 12px); -webkit-mask: radial-gradient(circle, #000 64%, transparent 66%); mask: radial-gradient(circle, #000 64%, transparent 66%); }
.wl-bauble[data-pattern="2"] .wl-ball em { background: radial-gradient(circle at 30% 60%, #fff 0 2px, transparent 3px), radial-gradient(circle at 62% 40%, #fff 0 2px, transparent 3px), radial-gradient(circle at 70% 72%, #fff 0 1.6px, transparent 2.6px); opacity: .85; }
.wl-crack { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; }

/* ramuri de brad în colțurile de sus: încadrează scena și dau profunzime */
.wl-branch { position: absolute; top: 58px; width: min(29vw, 430px); transform-origin: 0 0; transition: rotate 1.3s cubic-bezier(.5, 0, .7, 1.2) .2s, translate 1.3s cubic-bezier(.5, 0, .7, 1.2) .2s; }
.wl-branch-left { left: -10px; } .wl-branch-right { right: -10px; transform: scaleX(-1); }
.wl-branch svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.wl-needles .n1 { stroke: var(--needle); transition: stroke 1.4s; } .wl-needles .n2 { stroke: var(--needle2); transition: stroke 1.4s; }
.wl-b-snow ellipse { fill: #f5fbff; opacity: .95; }
.wl-b-light { fill: var(--c); stroke: var(--c); stroke-opacity: .32; stroke-width: 7; animation: wl-twinkle 2.6s ease-in-out calc(var(--i) * -.23s) infinite; }

/* orizont: zăpadă, brazi, cadouri. Baza lui stă la 205px de marginea de jos a hero-ului, deasupra panoului de statistici. */
.wl-horizon { position: absolute; left: 0; right: 0; bottom: 205px; height: 0; }
.wl-snowline { position: absolute; left: -4%; right: -4%; bottom: -34px; height: 96px; transition: filter 1s;
  background: radial-gradient(ellipse 20% 100% at 10% 100%, rgba(var(--snow), .62), rgba(var(--snow), 0) 72%), radial-gradient(ellipse 26% 86% at 36% 100%, rgba(var(--snow), .46), rgba(var(--snow), 0) 72%), radial-gradient(ellipse 22% 104% at 66% 100%, rgba(var(--snow), .55), rgba(var(--snow), 0) 72%), radial-gradient(ellipse 28% 96% at 92% 100%, rgba(var(--snow), .6), rgba(var(--snow), 0) 72%); }
.wl-tree { position: absolute; bottom: -8px; width: clamp(120px, 13vw, 210px); transform-origin: 50% 100%; transition: rotate 1.25s cubic-bezier(.55, 0, .75, 1.08) .3s, translate 1.25s ease .3s; }
.wl-tree-left { left: -78px; } .wl-tree-right { right: -34px; }
.wl-tree svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.wl-tree .t0 { fill: var(--tree1); transition: fill 1.2s; } .wl-tree .t1 { fill: var(--tree2); transition: fill 1.2s; }
.wl-pine-bulb { fill: var(--c); animation: wl-twinkle 2.3s ease-in-out calc(var(--i) * -.3s) infinite; }
.wl-star { fill: #ffe08a; transform-box: fill-box; transform-origin: center; animation: wl-star 3s ease-in-out infinite; }
.wl-gifts { position: absolute; left: 31%; bottom: 4px; display: flex; align-items: flex-end; gap: 6px; }
.wl-gift { position: relative; display: block; width: var(--w); height: var(--h); border-radius: 3px; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1) calc(.5s + var(--i) * .12s), filter .7s;
  background: linear-gradient(90deg, transparent 42%, var(--r) 42% 58%, transparent 58%), var(--c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), 0 6px 10px rgba(0, 0, 0, .4); }
.wl-gift::after { content: ""; position: absolute; left: 50%; top: -15px; width: 16px; height: 9px; margin-left: -8px; border: 3px solid var(--r); border-radius: 50% 50% 0 0; box-sizing: border-box; }
.wl-gift b { position: absolute; left: -3px; right: -3px; top: -8px; height: 9px; border-radius: 3px; transition: transform .8s cubic-bezier(.2, 1.4, .4, 1) calc(.6s + var(--i) * .14s);
  background: linear-gradient(90deg, transparent 42%, var(--r) 42% 58%, transparent 58%), color-mix(in srgb, var(--c) 82%, #fff); }
.wl-debris { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.wl-shardset { position: absolute; left: var(--x); bottom: 0; opacity: 0; transition: opacity .1s linear calc(1s + var(--n) * .12s); }
.wl-shardset i { position: absolute; left: var(--sx); bottom: var(--sy); width: var(--w); height: calc(var(--w) * .8); transform: rotate(var(--r)) scale(0);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 60%, #000)); clip-path: polygon(0 100%, 34% 0, 62% 56%, 100% 18%, 78% 100%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); transition: transform .28s cubic-bezier(.2, 1.7, .4, 1) calc(1s + var(--n) * .12s + var(--k) * .035s); }
.wl-sparkles i { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; background: #fff3c4; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; animation: wl-sparkle 3.6s ease-in-out var(--d) infinite; }

@keyframes wl-breathe { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes wl-bokeh { 0%, 100% { opacity: 0; transform: translateY(0) scale(.85); } 50% { opacity: .5; transform: translateY(-18px) scale(1.05); } }
@keyframes wl-twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .58; } 55% { opacity: .96; } }
@keyframes wl-swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes wl-star { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(8deg); } }
@keyframes wl-sparkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: .9; transform: scale(1); } }
@media (max-width: 1100px) { .wl-tree-left, .wl-gifts { display: none; } .wl-tree-right { width: 110px; } .wl-branch { width: 38vw; } }
@media (max-width: 720px) { .wl-branch { width: 42vw; top: 70px; } .wl-bulb:nth-child(even) { display: none; } .wl-baubles .wl-bauble:nth-child(n+5) { display: none; } .wl-tree { display: none; } }

/* ---------- 2. Bannerul evenimentului ---------- */
.event-banner {
  position: absolute; z-index: 6; right: 4%; bottom: 228px; width: min(400px, 92vw);
  padding: 22px 22px 20px; border: 1px solid rgba(240, 207, 117, .45); border-radius: 18px;
  background: linear-gradient(160deg, rgba(14, 30, 23, .9), rgba(16, 14, 22, .92));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .08);
  color: #fff9ed;
}
.event-banner[data-status="grinch_won"] { border-color: rgba(189, 74, 72, .7); background: linear-gradient(160deg, rgba(28, 12, 12, .92), rgba(12, 10, 10, .94)); }
.event-banner h2 { margin: 6px 0 8px; font: 700 26px/1.15 "Playfair Display", Georgia, serif; color: #fff4d6; }
.event-banner[data-status="grinch_won"] h2 { font-family: Creepster, Georgia, serif; font-weight: 400; letter-spacing: .04em; font-size: 32px; color: #f2b7a8; text-shadow: 0 0 18px rgba(200, 40, 40, .5); }
.event-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; color: #f0d281; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.event-eyebrow-chaos { color: #ff8a7a; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 0 rgba(255, 77, 94, .7); animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }
.event-copy { margin: 0 0 14px; color: #ddd6c8; font-size: 13px; line-height: 1.6; }
.event-meter { margin: 12px 0; }
.event-meter-track { position: relative; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.event-meter-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c7364d, #f0cf75 55%, #3ccf7a); box-shadow: 0 0 14px rgba(240, 207, 117, .5); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.event-meter-track span { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff6d8; box-shadow: 0 0 12px #ffd36b; transition: left .8s cubic-bezier(.2, .8, .2, 1); }
.event-meter-legend { display: flex; justify-content: space-between; margin-top: 8px; color: #c9c2b2; font-size: 11px; }
.event-meter-legend b { color: #fff4d6; }
.event-facts { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.event-facts div { padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: rgba(255, 255, 255, .04); }
.event-facts dt { color: #b8b19f; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.event-facts dd { margin: 4px 0 0; font-weight: 800; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.event-difficulty { color: #9ad8ff; letter-spacing: 2px; }
.event-difficulty i { font-style: normal; opacity: .25; }
.event-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.event-actions .primary, .event-actions .secondary { flex: 1; justify-content: center; gap: 14px; padding: 14px 16px; cursor: pointer; font: 800 12px Inter, Arial, sans-serif; }
.event-board { margin-top: 14px; }
.event-leaderboard { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.event-leaderboard li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, .05); font-size: 12px; }
.event-leaderboard .rank { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(240, 207, 117, .18); color: #f0d281; font-weight: 800; font-size: 11px; }
.event-leaderboard li:first-child .rank { background: #f0cf75; color: #2a1d06; }
.event-leaderboard li > span:last-child { color: #f0d281; font-weight: 800; font-variant-numeric: tabular-nums; }
.event-empty { color: #b8b19f; font-size: 12px; }
@media (max-width: 1100px) {
  body[data-theme="christmas"] .hero:has(.event-banner:not(.hidden)) { flex-wrap: wrap; align-content: center; padding-bottom: 240px; }
  .event-banner { position: relative; right: auto; bottom: auto; width: 100%; max-width: 560px; margin-top: 28px; z-index: 6; }
  /* pe ecrane mici bradul-declanșator ar acoperi bannerul, care are deja butonul de joc */
  body[data-event-status="active"] .grinch-trigger { display: none; }
}

/* ---------- 3. Grinch Chaos Mode ----------
   Decorul Wonderland se strică pe loc (aceleași elemente, alte stări): ghirlanda se rupe și scânteiază, globurile cad și se sparg
   sau rămân crăpate, ramurile și brazii se prăbușesc, cadourile sunt deschise și goale. Peste ele: graffiti cu spray, urme de
   gheare, ceață, ochi în beznă și Grinch care apare din margini. Starea finală se aplică fără animație la încărcarea directă. */
body.chaos-instant .wonderland *, body.chaos-instant .wonderland { transition: none !important; }

body.chaos-mode .wonderland { --needle: #3f3b27; --needle2: #54472a; --tree1: #1b2119; --tree2: #151a14; --snow: 150, 158, 150; }
body.chaos-mode .wl-light { animation: chaos-flicker 6s steps(1) infinite;
  background: radial-gradient(ellipse 50% 40% at 70% 40%, rgba(130, 22, 22, .3), transparent 70%), radial-gradient(ellipse 40% 34% at 10% 70%, rgba(70, 120, 30, .16), transparent 70%); }
body.chaos-mode .wl-bokeh, body.chaos-mode .wl-sparkles { display: none; }
body.chaos-mode .wl-snowline { filter: brightness(.6) saturate(.4); }

/* ghirlandă: firul se rupe la mijloc, capetele atârnă și scânteiază, majoritatea becurilor sunt stinse */
body.chaos-mode .wl-strand-a { transform: rotate(8deg); } body.chaos-mode .wl-strand-b { transform: rotate(-15deg); }
body.chaos-mode .wl-bulb { animation: none; background: #2d302b; box-shadow: none; }
body.chaos-mode .wl-bulb:nth-child(4n+2) { background: radial-gradient(circle at 38% 30%, #fff 0 12%, var(--c) 42%, #000 130%); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--c) 70%, transparent); animation: chaos-bulb 2.9s steps(1) calc(var(--i) * -.37s) infinite; }
body.chaos-mode .wl-bulb:nth-child(7n+3) { animation: chaos-bulb 1.7s steps(1) calc(var(--i) * -.21s) infinite; background: radial-gradient(circle at 38% 30%, #f6ffb0 0 12%, #a6ff2f 45%, #000 140%); box-shadow: 0 0 10px 2px rgba(166, 255, 47, .6); }
body.chaos-mode .wl-spark { animation: wl-spark 2.6s steps(1) infinite; } body.chaos-mode .wl-strand-b .wl-spark { animation-delay: -1.1s; margin-left: -2.5px; }
body.chaos-mode .wl-strand-b .wl-spark { left: 0; }

/* globuri: cele „fall” cad și se sparg în cioburi pe orizont; „crack” rămân crăpate și strâmbe; „hang” se înclină, palide */
body.chaos-mode .wl-bauble { animation: none; }
body.chaos-mode .wl-bauble[data-fate="fall"] .wl-ball { transform: translateY(calc(100svh - 205px - var(--len) * var(--k) - var(--s))) rotate(160deg); opacity: 0; }
body.chaos-mode .wl-bauble[data-fate="fall"] .wl-string { height: calc(var(--len) * var(--k) * .86); mask: linear-gradient(#000 70%, transparent); -webkit-mask: linear-gradient(#000 70%, transparent); }
body.chaos-mode .wl-bauble[data-fate="crack"] { transform: rotate(13deg); }
body.chaos-mode .wl-bauble[data-fate="crack"] .wl-ball { clip-path: polygon(0 0, 52% 0, 58% 14%, 70% 6%, 100% 20%, 100% 100%, 0 100%); filter: saturate(.55) brightness(.72); }
body.chaos-mode .wl-bauble[data-fate="crack"] .wl-crack { opacity: .85; }
body.chaos-mode .wl-bauble[data-fate="hang"] { transform: rotate(-7deg); }
body.chaos-mode .wl-bauble[data-fate="hang"] .wl-ball { filter: saturate(.5) brightness(.6); }
body.chaos-mode .wl-shardset { opacity: 1; }
body.chaos-mode .wl-shardset i { transform: rotate(var(--r)) scale(1); }

/* ramuri, brazi, cadouri */
body.chaos-mode .wl-branch-left { rotate: 14deg; translate: 0 20px; }
body.chaos-mode .wl-branch-right { rotate: -22deg; translate: 0 34px; }
body.chaos-mode .wl-b-light { fill: #2b2d29; stroke: none; animation: none; }
body.chaos-mode .wl-b-snow { opacity: .35; }
body.chaos-mode .wl-tree-right { rotate: -82deg; translate: -16px 14px; }
body.chaos-mode .wl-tree-left { rotate: 78deg; translate: 20px 12px; }
body.chaos-mode .wl-pine-bulb { fill: #2a2d29; animation: none; }
body.chaos-mode .wl-pine-bulb:nth-child(9n+4) { fill: #ff4d5e; animation: chaos-bulb 2.2s steps(1) infinite; }
body.chaos-mode .wl-star { opacity: .0; }
body.chaos-mode .wl-gift { filter: brightness(.62) saturate(.7); }
body.chaos-mode .wl-gift:nth-child(odd) { transform: rotate(-14deg) translateY(2px); } body.chaos-mode .wl-gift:nth-child(even) { transform: rotate(11deg) translateX(4px); }
body.chaos-mode .wl-gift b { transform: translate(20px, -30px) rotate(38deg); }

/* peste decor: graffiti cu spray (filtru SVG: margini rugoase + ceață de vopsea), picături, ochi, urme de gheare */
.chaos-tags { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.chaos-tags .tag { position: absolute; padding: 16px 18px; font-family: "Permanent Marker", Creepster, "Comic Sans MS", cursive; line-height: .98; text-align: center; letter-spacing: .02em; opacity: .94; filter: url(#spray-fx); animation: spray-in .9s steps(20) both; }
.tag-1 { left: 45%; top: 12%; color: #a4ff3d; font-size: clamp(30px, 4.7vw, 64px); rotate: -8deg; animation-delay: .5s !important; }
.tag-2 { left: 55%; top: 33%; color: #ff4a55; font-size: clamp(22px, 3.2vw, 44px); rotate: 6deg; animation-delay: 1.1s !important; }
.tag-3 { right: 4%; top: 17%; color: #f4f6ec; font-size: clamp(14px, 1.7vw, 24px); rotate: -3deg; opacity: .7; animation-delay: 1.6s !important; }
.chaos-tags .chaos-drip { position: absolute; top: 88%; width: 8px; fill: currentColor; transform-origin: 50% 0; animation: drip-run 6s cubic-bezier(.3, .1, .45, 1) both; }
.chaos-eyes { position: absolute; left: 6%; top: 24%; display: flex; gap: 18px; opacity: 0; animation: eyes-peek 15s ease-in-out 4s infinite; }
.chaos-eyes i { width: 22px; height: 9px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle, #f6ffb0, #a6ff2f 52%, transparent 76%); box-shadow: 0 0 14px 2px #9dff3a; animation: eye-blink 5s infinite; }
.chaos-claw { position: absolute; width: clamp(86px, 9.5vw, 140px); height: auto; animation: claw-in .55s cubic-bezier(.6, 0, .3, 1) both; }
.claw-1 { right: 22%; top: 8%; rotate: 24deg; animation-delay: .35s; } .claw-2 { left: 40%; top: 58%; rotate: -18deg; scale: .85; animation-delay: .6s; }
.gouge path { fill: #14060a; stroke: #c4303c; stroke-width: 3; paint-order: stroke; stroke-linejoin: round; }
@keyframes spray-in { from { clip-path: inset(-24px 100% -24px -24px); } to { clip-path: inset(-24px -24px -24px -24px); } }
@keyframes drip-run { 0%, 15% { transform: scaleY(0); } 100% { transform: scaleY(1); } }
@keyframes claw-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes eyes-peek { 0%, 12%, 40%, 100% { opacity: 0; } 18%, 34% { opacity: .95; } }
@keyframes eye-blink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes chaos-flicker { 0%, 100% { opacity: .9; } 8% { opacity: .2; } 10% { opacity: .9; } 47% { opacity: .5; } 49% { opacity: 1; } }
@keyframes chaos-bulb { 0%, 100% { opacity: 1; } 12% { opacity: .08; } 16% { opacity: .9; } 60% { opacity: .12; } 62% { opacity: 1; } }
@keyframes wl-spark { 0%, 100% { opacity: 0; } 4%, 9% { opacity: 1; transform: scale(1.6); } 6% { opacity: .2; } 55% { opacity: 0; } 58% { opacity: 1; transform: scale(1.1); } 62% { opacity: 0; } }

/* ceață și vignetă */
.chaos-fog { position: fixed; inset: 0; z-index: 13; pointer-events: none; overflow: hidden; }
.chaos-fog i { position: absolute; inset: 0; }
.chaos-fog .fog-a { width: 160%; left: -30%; background: radial-gradient(ellipse 34% 20% at 28% 84%, rgba(125, 145, 125, .22), transparent 70%), radial-gradient(ellipse 30% 18% at 76% 92%, rgba(112, 124, 112, .2), transparent 70%); animation: fog-drift 32s ease-in-out infinite alternate; }
.chaos-fog .fog-c { width: 160%; left: -30%; background: radial-gradient(ellipse 28% 16% at 52% 70%, rgba(135, 150, 135, .14), transparent 70%); animation: fog-drift 44s ease-in-out -12s infinite alternate-reverse; }
.chaos-fog .fog-b { background: radial-gradient(ellipse at center, transparent 46%, rgba(0, 0, 0, .55) 100%); }
html[data-mode="light"] .chaos-fog .fog-a, html[data-mode="light"] .chaos-fog .fog-c { opacity: .8; }
html[data-mode="light"] .chaos-fog .fog-b { background: radial-gradient(ellipse at center, transparent 56%, rgba(60, 20, 20, .24) 100%); }
@keyframes fog-drift { from { transform: translate3d(-5%, 0, 0); } to { transform: translate3d(5%, 0, 0); } }

/* titlu cu glitch rar, ghirlande rupte pe toată interfața, carduri strâmbe cu urme de gheare și crăpături */
body.chaos-mode .hero h1 { animation: chaos-glitch 7s infinite; }
@keyframes chaos-glitch {
  0%, 90%, 100% { text-shadow: 0 3px 24px #000; transform: none; clip-path: none; }
  91% { text-shadow: -3px 0 #ff3b47, 3px 0 #9bff3d; transform: translateX(-3px); clip-path: inset(10% 0 55% 0); }
  93% { text-shadow: 3px 0 #ff3b47, -3px 0 #9bff3d; transform: translateX(4px); clip-path: inset(52% 0 12% 0); }
  95% { text-shadow: -2px 0 #ff3b47, 2px 0 #9bff3d; transform: none; clip-path: none; }
}
body.chaos-mode .christmas-garland { filter: grayscale(.85) brightness(.62); transform: rotate(.8deg);
  -webkit-mask: linear-gradient(90deg, #000 0 33%, transparent 33% 40%, #000 40% 71%, transparent 71% 76%, #000 76%); mask: linear-gradient(90deg, #000 0 33%, transparent 33% 40%, #000 40% 71%, transparent 71% 76%, #000 76%); }
body.chaos-mode .christmas-snow-cap { filter: grayscale(1) brightness(.55); }
body.chaos-mode[data-theme="christmas"] :is(.card, .team-card, .department-card, .location-card, .contact-card, .admin-tool-card) {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 90'%3E%3Cg fill='%2314060a' stroke='%23c4303c' stroke-width='1.4' stroke-linejoin='round' opacity='.85'%3E%3Cpath d='M16 4C26 30 36 58 48 84 50 88 53 88 52 83 44 56 32 28 20 2Z'/%3E%3Cpath d='M32 2C42 28 52 54 62 78 64 82 67 81 66 77 58 52 48 26 36 0Z'/%3E%3Cpath d='M48 2C58 26 66 48 74 68 76 72 79 71 78 67 72 46 64 24 52 0Z'/%3E%3C/g%3E%3C/svg%3E") right 16px top 38px / 54px 54px no-repeat, var(--card-bg);
}
body.chaos-mode .cards .card:nth-child(2) { rotate: -1.4deg; } body.chaos-mode .cards .card:nth-child(4) { rotate: 1.1deg; }
body.chaos-mode .team-grid .team-card:nth-child(3n+2) { rotate: .9deg; } body.chaos-mode .location-cards .location-card:nth-child(4n+3) { rotate: -.8deg; }
body.chaos-mode .stats { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%23d8dccf' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M158 0 120 44 132 52 96 96 104 100 80 120' stroke-width='1.6' opacity='.55'/%3E%3Cpath d='M120 44 148 58M96 96 126 88M132 52 156 30' stroke-width='1' opacity='.45'/%3E%3C/g%3E%3C/svg%3E") right 4px top 0 / 150px 112px no-repeat, var(--card-bg); }

/* Grinch apare din margini: se uită, râde, pleacă; dacă e lovit, se sperie */
.chaos-peek { position: fixed; z-index: 60; display: grid; justify-items: center; width: 150px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.chaos-peek .grinch-char { width: 150px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .7)) brightness(.88); }
.chaos-peek span { position: absolute; top: -6px; padding: 4px 10px; border: 1px solid rgba(155, 255, 61, .55); border-radius: 12px; background: rgba(10, 18, 10, .92); color: #b8f27d; font: 900 10px Inter, Arial, sans-serif; letter-spacing: .12em; white-space: nowrap; animation: peek-bubble .4s ease .5s both; }
.chaos-peek.from-left { left: 0; top: var(--pos); transform: translateX(-112%) rotate(88deg); animation: peek-left .8s cubic-bezier(.2, .9, .3, 1.15) forwards; }
.chaos-peek.from-right { right: 0; top: var(--pos); transform: translateX(112%) rotate(-88deg); animation: peek-right .8s cubic-bezier(.2, .9, .3, 1.15) forwards; }
.chaos-peek.from-bottom { bottom: 0; left: var(--pos); transform: translateY(112%); animation: peek-bottom .8s cubic-bezier(.2, .9, .3, 1.15) forwards; }
.chaos-peek.leaving { animation: peek-leave .7s ease-in forwards; }
.chaos-peek.fleeing { animation: peek-flee .55s ease-in forwards; }
@keyframes peek-left { to { transform: translateX(-34%) rotate(78deg); } } @keyframes peek-right { to { transform: translateX(34%) rotate(-78deg); } } @keyframes peek-bottom { to { transform: translateY(46%); } }
@keyframes peek-leave { to { opacity: 0; transform: translateY(60px) scale(.8); } } @keyframes peek-flee { to { opacity: 0; transform: translate(0, 80px) rotate(30deg) scale(.5); } }
@keyframes peek-bubble { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* tranziția Wonderland → Chaos: ghirlanda orbitoare, cutremur, beznă cu ochii lui Grinch, apoi decorul cade */
body.chaos-surge .wl-bulb { animation: none; background: #fff; box-shadow: 0 0 14px 5px #fff, 0 0 40px 14px var(--c); }
body.chaos-surge .wl-light { animation: none; opacity: 1; }
body.chaos-surge main { animation: surge-flicker .7s steps(1); }
body.chaos-quake main { animation: strike-shake .3s linear 3; }
@keyframes surge-flicker { 0% { filter: brightness(1); } 20% { filter: brightness(1.7) saturate(1.3); } 40% { filter: brightness(.7); } 60% { filter: brightness(1.9); } 80% { filter: brightness(.5); } 100% { filter: brightness(1); } }
@keyframes strike-shake { 25% { transform: translate(-6px, 2px); } 50% { transform: translate(5px, -3px); } 75% { transform: translate(-3px, 1px); } }
.chaos-blackout { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; background: #020403; pointer-events: none; animation: bo-in .25s ease forwards; }
.chaos-blackout .bo-eye { position: absolute; top: 44%; width: 46px; height: 18px; border-radius: 50% 50% 42% 42%; background: radial-gradient(circle, #f6ffb0, #a6ff2f 52%, transparent 76%); box-shadow: 0 0 34px 8px #9dff3a; animation: eye-blink 2.4s infinite; }
.bo-eye-l { left: calc(50% - 70px); } .bo-eye-r { left: calc(50% + 24px); }
.chaos-blackout span { margin-top: 140px; color: #b8f27d; font: 400 clamp(28px, 5vw, 56px) Creepster, Georgia, serif; letter-spacing: .1em; text-shadow: 0 0 20px rgba(155, 255, 61, .6); animation: bo-laugh .9s ease .35s both; }
.chaos-blackout.lift { animation: bo-out .9s ease forwards; }
@keyframes bo-in { from { opacity: 0; } to { opacity: 1; } } @keyframes bo-out { to { opacity: 0; visibility: hidden; } }
@keyframes bo-laugh { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
/* eticheta veche „Crăciunul e stricat” urcă deasupra bannerului ca să nu-l acopere; vizitatorii văd starea în banner */
body.chaos-mode .hero::after { content: "" !important; position: absolute !important; inset: auto 0 0 !important; width: auto !important; height: 230px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; transform: none !important; background: linear-gradient(transparent, var(--bg)) !important; }
.chaos-countdown { margin: -6px 0 14px; color: #f3c9a8; font-size: 12px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.grinch-chaos-banner.visitor-view { display: none; }

/* ---------- 4. Restaurare + artificii ---------- */
.fireworks-canvas { position: fixed; inset: 0; z-index: 95; width: 100%; height: 100%; pointer-events: none; }
body.wonderland-restore .wl-bulb ellipse { animation: wl-relight .5s ease-out calc(var(--i) * .07s) both, wl-twinkle 2.6s ease-in-out calc(1.6s + var(--i) * -.37s) infinite; }
body.wonderland-restore .wl-glow { animation: wl-bloom 3.5s ease-out; }
@keyframes wl-relight { from { opacity: 0; filter: none; } 60% { opacity: 1; filter: drop-shadow(0 0 22px var(--c)); } }
@keyframes wl-bloom { 0% { opacity: 0; } 30% { opacity: 1; filter: brightness(1.8); } 100% { opacity: .8; } }

/* ---------- 5. Grinch Takeover ---------- */
body.takeover-open { overflow: hidden; }
.takeover { position: fixed; inset: 0; z-index: 10030; display: grid; place-items: center; padding: 16px; background: rgba(4, 8, 6, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html[data-mode="light"] .takeover { background: rgba(40, 46, 42, .55); }
.tk-shell { display: grid; grid-template-rows: auto 1fr; width: min(1120px, 100%); height: min(860px, calc(100dvh - 32px)); overflow: hidden; border: 1px solid var(--theme-border); border-radius: 22px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop), 0 0 0 1px rgba(255, 255, 255, .04); }
.tk-hud { display: flex; align-items: center; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: var(--glass); }
.tk-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tk-brand img { width: 40px; height: 40px; object-fit: contain; }
.tk-brand span { display: grid; min-width: 0; }
.tk-brand b { font-size: 12px; letter-spacing: .18em; color: var(--theme-highlight); }
.tk-brand small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tk-steps { display: flex; gap: 6px; margin: 0 auto; padding: 0; list-style: none; }
.tk-steps li { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 800; transition: .3s; }
.tk-steps li.current { border-color: var(--theme-accent); color: var(--text); box-shadow: 0 0 0 3px var(--theme-soft); }
.tk-steps li.done { border-color: transparent; background: linear-gradient(135deg, var(--theme-accent-2), color-mix(in srgb, var(--theme-accent-2) 60%, #fff)); color: #fff; }
.tk-steps li.failed { border-color: transparent; background: var(--danger-bg); color: var(--danger-fg); }
.tk-score { display: grid; justify-items: end; }
.tk-score small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.tk-score b { font: 700 22px/1 "Playfair Display", Georgia, serif; font-variant-numeric: tabular-nums; color: var(--theme-highlight); }
.tk-close { width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 22px; cursor: pointer; }
.tk-close:hover { border-color: var(--theme-accent); color: var(--theme-highlight); }
.tk-body { position: relative; min-height: 0; overflow: auto; display: grid; grid-template-rows: minmax(0, 1fr); }

/* intro cinematic (mereu întunecat, ca o scenă de film) */
.tk-cinema { position: relative; height: 100%; min-height: 420px; overflow: hidden; background: #050806; color: #fff6df; }
.tk-cine-bg { position: absolute; inset: 0; background: linear-gradient(0deg, #050806 4%, transparent 50%), url("assets/theme-christmas.jpg") center 40% / cover; transform: scale(1.12); animation: cine-zoom 16s linear forwards; transition: filter 1.2s ease, opacity 1.2s ease; }
.tk-cinema[data-scene="1"] .tk-cine-bg { filter: brightness(.25) saturate(.4) hue-rotate(60deg); }
.tk-cinema[data-scene="2"] .tk-cine-bg { filter: brightness(.35) saturate(.5) sepia(.4) hue-rotate(40deg); }
.tk-cinema[data-scene="3"] .tk-cine-bg { filter: brightness(.45) blur(3px); }
.tk-cine-eyes { position: absolute; left: 58%; top: 34%; display: flex; gap: 26px; opacity: 0; transition: opacity 1s; }
.tk-cine-eyes i { width: 26px; height: 12px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle, #f6ff9a, #c8ff3d 55%, transparent 72%); box-shadow: 0 0 20px #b8ff3d; animation: cine-blink 3s infinite; }
.tk-cinema[data-scene="1"] .tk-cine-eyes { opacity: 1; }
.tk-cine-grinch { position: absolute; right: 6%; bottom: -4%; width: min(46%, 420px); opacity: 0; transform: translateX(40%) rotate(8deg); transition: transform 1.1s cubic-bezier(.2, .9, .3, 1.2), opacity .6s; filter: drop-shadow(0 20px 30px #000); }
.tk-cinema[data-scene="2"] .tk-cine-grinch { opacity: 1; transform: none; }
.tk-cine-laugh { position: absolute; right: 28%; top: 20%; color: #b8f27d; font: 400 clamp(26px, 5vw, 54px) Creepster, Georgia, serif; letter-spacing: .08em; text-shadow: 0 0 18px rgba(155, 255, 61, .6); opacity: 0; transform: rotate(-8deg) scale(.6); transition: .5s .6s; }
.tk-cinema[data-scene="2"] .tk-cine-laugh { opacity: 1; transform: rotate(-8deg); }
.tk-cine-logo { position: absolute; left: 50%; top: 42%; width: min(36%, 260px); opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: 1s; filter: drop-shadow(0 0 30px rgba(155, 40, 255, .6)); }
.tk-cinema[data-scene="3"] .tk-cine-logo { opacity: 1; transform: translate(-50%, -50%); }
.tk-letterbox { position: absolute; left: 0; right: 0; height: 11%; background: #000; z-index: 2; }
.tk-letterbox.top { top: 0; } .tk-letterbox.bottom { bottom: 0; }
.tk-caption { position: absolute; z-index: 3; left: 50%; bottom: 14%; width: min(760px, 88%); margin: 0; transform: translateX(-50%); text-align: center; font: 600 clamp(16px, 2.2vw, 22px)/1.5 "Playfair Display", Georgia, serif; text-shadow: 0 2px 12px #000; min-height: 3em; }
.tk-skip { position: absolute; z-index: 4; right: 16px; bottom: 3%; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font: 700 11px Inter, Arial, sans-serif; letter-spacing: .08em; cursor: pointer; }
@keyframes cine-zoom { to { transform: scale(1); } }
@keyframes cine-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* panouri */
.tk-panel { position: relative; width: 100%; max-width: 760px; margin: auto; padding: clamp(22px, 4vw, 44px); overflow: hidden; }
.tk-eyebrow { margin: 0 0 8px; color: var(--theme-highlight); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.tk-panel h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 700 clamp(26px, 4vw, 38px)/1.1 "Playfair Display", Georgia, serif; }
.tk-lead { margin: 0 0 20px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.tk-stage-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-surface); font-size: 22px; }
.tk-stage-list { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.tk-stage-list li { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.tk-stage-list .tk-stage-icon { grid-row: span 2; width: 40px; height: 40px; font-size: 19px; }
.tk-stage-list b { font-size: 14px; }
.tk-stage-list small { color: var(--muted); font-size: 12px; }
.tk-name-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tk-name-form label { flex: 1 1 240px; display: grid; gap: 7px; color: var(--text-2); font-size: 12px; font-weight: 700; }
.tk-name-form input { padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--text); font: inherit; }
.tk-name-form input:focus { outline: 0; border-color: var(--theme-accent); box-shadow: 0 0 0 3px var(--theme-soft); }
.tk-panel .primary, .tk-panel .secondary { border: 1px solid var(--theme-border); cursor: pointer; font: 800 12px Inter, Arial, sans-serif; letter-spacing: .04em; }
.tk-panel .primary:disabled { opacity: .5; cursor: not-allowed; }
.tk-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.tk-how { display: grid; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.tk-how li { position: relative; padding: 10px 12px 10px 38px; border-radius: 10px; background: var(--surface); color: var(--text-2); font-size: 14px; }
.tk-how li::before { content: "✦"; position: absolute; left: 14px; color: var(--theme-highlight); }
.tk-wait { display: grid; justify-items: center; gap: 16px; padding-top: 18vh; color: var(--muted); }
.tk-spinner { width: 42px; height: 42px; border: 3px solid var(--line-strong); border-top-color: var(--theme-accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* rezultate */
.tk-result.passed h2, .tk-result.completed h2 { color: var(--theme-highlight); }
.tk-result.failed h2 { color: var(--danger-fg); }
.tk-result-score { display: flex; gap: 12px; margin: 0 0 14px; }
.tk-result-score span { flex: 1; padding: 14px 16px; border: 1px solid var(--theme-border); border-radius: 14px; background: var(--theme-surface); }
.tk-result-score small, .tk-stats small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tk-result-score b { font: 700 30px/1.1 "Playfair Display", Georgia, serif; }
.tk-result .event-meter-track { background: var(--surface-2); }
.tk-result .event-meter-legend { color: var(--muted); }
.tk-result .event-meter-legend b { color: var(--text); }
.tk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.tk-confetti { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; background: var(--c); border-radius: 2px; animation: confetti 2.6s cubic-bezier(.2, .6, .4, 1) var(--d) forwards; pointer-events: none; }
@keyframes confetti { to { transform: translateY(560px) rotate(var(--r)); opacity: 0; } }

/* zona de joc */
.tk-play { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; padding: 16px clamp(14px, 3vw, 26px) 12px; gap: 10px; }
.tk-play-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.tk-play-head .tk-eyebrow { margin-bottom: 4px; }
.tk-objective { margin: 0; font-size: 16px; font-weight: 700; }
.tk-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-stats span { min-width: 84px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.tk-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.tk-stats b i { font-style: normal; opacity: .25; }
.tk-timer { position: relative; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.tk-timer i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, var(--theme-accent-2), var(--theme-highlight)); }
.tk-timer.urgent i { background: linear-gradient(90deg, #c7364d, #ff7a5c); animation: urgent .5s steps(1) infinite; }
.tk-timer span { position: absolute; right: 0; top: -20px; color: var(--muted); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes urgent { 50% { opacity: .55; } }
.tk-area { position: relative; min-height: 0; display: grid; place-items: center; }
.tk-feedback { min-height: 22px; margin: 0; text-align: center; font-weight: 800; font-size: 14px; }
.tk-feedback[data-tone="good"] { color: var(--ok-fg); }
.tk-feedback[data-tone="bad"] { color: var(--danger-fg); }

/* etapa 1 */
.tk-arena { position: relative; width: 100%; height: 100%; min-height: 340px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 16px; }
.tk-chase { cursor: crosshair; background: linear-gradient(180deg, #0b1630 0%, #1b2140 55%, #2b1d2c 100%); touch-action: manipulation; }
.tk-rooftops { position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background: linear-gradient(transparent 0 0), #0a0d14; clip-path: polygon(0 40%, 8% 40%, 8% 20%, 16% 20%, 16% 48%, 24% 48%, 24% 10%, 30% 10%, 30% 0, 34% 0, 34% 10%, 40% 10%, 40% 36%, 52% 36%, 52% 16%, 62% 16%, 62% 44%, 70% 44%, 70% 6%, 78% 6%, 78% 30%, 88% 30%, 88% 18%, 100% 18%, 100% 100%, 0 100%); }
.tk-rooftops::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 60%, #ffd36b 0 2px, transparent 3px) 0 0 / 40px 30px; opacity: .5; }
html[data-mode="light"] .tk-chase { background: linear-gradient(180deg, #8fb3e0 0%, #c9d6ee 60%, #e8d9e3 100%); }
html[data-mode="light"] .tk-rooftops { background: #3b4458; }
.tk-target { position: absolute; width: 88px; height: 98px; padding: 0; border: 0; background: none; cursor: pointer; transform: translate(-50%, -50%) scale(.2); opacity: 0; animation: target-in .18s ease-out forwards; }
.tk-target img, .tk-target svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); pointer-events: none; }
.tk-target.decoy { width: 70px; height: 86px; }
.tk-target::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -8px; height: 4px; border-radius: 4px; background: currentColor; color: #9bff3d; transform-origin: left; animation: target-life var(--life) linear forwards; }
.tk-target.decoy::after { color: #ffd36b; }
.tk-target.hit { animation: target-hit .38s ease-out forwards; }
.tk-target.decoy.hit { animation: target-wrong .38s ease-out forwards; }
.tk-target.gone { animation: target-gone .3s ease-in forwards; }
.tk-puff { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: radial-gradient(circle, #fff, rgba(255, 255, 255, 0) 70%); animation: puff .5s ease-out forwards; pointer-events: none; }
@keyframes target-in { to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes target-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes target-hit { to { transform: translate(-50%, -80%) scale(1.3) rotate(18deg); opacity: 0; filter: brightness(2); } }
@keyframes target-wrong { 30% { transform: translate(-50%, -50%) scale(1.1); filter: drop-shadow(0 0 12px #ff3b47); } to { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
@keyframes target-gone { to { transform: translate(-50%, 20%) scale(.5); opacity: 0; } }
@keyframes puff { to { transform: scale(2.4); opacity: 0; } }

/* etapa 2 */
.tk-memory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.5vw, 14px); width: min(560px, 100%); }
.tk-card { aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; }
.tk-card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .38s cubic-bezier(.3, 1.3, .5, 1); }
.tk-card.open .tk-card-inner, .tk-card.matched .tk-card-inner { transform: rotateY(180deg); }
.tk-card-back, .tk-card-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tk-card-back { border: 1px solid var(--theme-border); background: linear-gradient(90deg, transparent 44%, #f0cf75 44% 56%, transparent 56%), linear-gradient(transparent 44%, #f0cf75 44% 56%, transparent 56%), linear-gradient(145deg, #a8263c, #6d1426); box-shadow: 0 6px 14px rgba(0, 0, 0, .3), inset 0 -5px rgba(0, 0, 0, .2); }
.tk-card:hover .tk-card-back { filter: brightness(1.12); }
.tk-card-face { transform: rotateY(180deg); border: 1px solid var(--line-strong); background: var(--surface); font-size: clamp(28px, 5vw, 44px); }
.tk-card[data-symbol="gift-green"] .tk-card-face { filter: hue-rotate(110deg); }
.tk-card.matched .tk-card-face { border-color: var(--ok-line); background: var(--ok-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-fg) 25%, transparent); }
.tk-card.shake .tk-card-inner { animation: card-shake .4s; }
@keyframes card-shake { 25% { transform: rotateY(180deg) translateX(-6px); } 75% { transform: rotateY(180deg) translateX(6px); } }
.tk-memory.cards-16 { width: min(520px, 100%); }

/* etapa 3 */
.tk-lights { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 4px; width: min(480px, 100%, 52vh); padding: 10px; border: 1px solid var(--line-soft); border-radius: 16px; background: #0d1210; }
html[data-mode="light"] .tk-lights { background: #1d2620; }
.tk-tile { aspect-ratio: 1; padding: 0; border: 1px solid rgba(255, 255, 255, .06); border-radius: 8px; background: #151c18; cursor: pointer; }
.tk-tile:hover { border-color: rgba(240, 207, 117, .4); }
.tk-tile svg { display: block; width: 100%; height: 100%; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.tk-wire line { stroke: #39443d; stroke-width: 14; stroke-linecap: round; }
.tk-joint { fill: #39443d; }
.tk-tile.powered .tk-wire line { stroke: #f0cf75; filter: drop-shadow(0 0 4px #ffd36b); }
.tk-tile.powered .tk-joint { fill: #f0cf75; }
.tk-source { fill: #c7364d; stroke: #ffd36b; stroke-width: 3; }
.tk-bolt { fill: #fff3c4; }
.tk-bulb { fill: #2c322e; stroke: #4a524c; stroke-width: 3; transition: fill .3s; }
.tk-bulb-glint { fill: none; stroke: rgba(255, 255, 255, .25); stroke-width: 3; stroke-linecap: round; }
.tk-tile.bulb.powered .tk-bulb { fill: #ffd36b; stroke: #fff3c4; filter: drop-shadow(0 0 10px #ffd36b); }
.tk-lights.solved { animation: solved-glow 1s ease-out; }
@keyframes solved-glow { 50% { box-shadow: 0 0 60px rgba(255, 211, 107, .55); } }

/* etapa 4 */
.tk-sequence { display: grid; justify-items: center; gap: 22px; width: 100%; }
.tk-seq-status { margin: 0; font-size: 18px; font-weight: 800; }
.tk-seq-pads { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(12px, 3vw, 26px); }
.tk-pad { position: relative; width: clamp(64px, 12vw, 110px); aspect-ratio: 1; border: 3px solid color-mix(in srgb, var(--c) 60%, #000); border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff) 0 6%, color-mix(in srgb, var(--c) 40%, #111) 60%); cursor: pointer; transition: transform .12s, filter .12s, box-shadow .12s; }
.tk-pad span { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 11px; font-weight: 800; }
.tk-pad.lit { background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--c) 55%); box-shadow: 0 0 34px var(--c), 0 0 70px color-mix(in srgb, var(--c) 50%, transparent); transform: scale(1.08); }
.tk-pad:disabled { cursor: default; }
.tk-pad:not(:disabled):active { transform: scale(.94); }
.tk-sequence.error .tk-seq-pads { animation: card-shake-x .4s; }
@keyframes card-shake-x { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* etapa 5 */
.tk-boss { display: grid; grid-template-rows: auto 1fr auto auto; padding: 14px; background: radial-gradient(ellipse at 50% 30%, #2a3a2a, #0b100c 70%); color: #fff6df; }
html[data-mode="light"] .tk-boss { background: radial-gradient(ellipse at 50% 30%, #c9d8c4, #8ea38a 80%); color: #1c2a22; }
.tk-boss-hp { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.tk-boss-hp div { flex: 1; height: 12px; border-radius: 12px; background: rgba(0, 0, 0, .45); overflow: hidden; }
.tk-boss-hp i { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, #4f9e2f, #9bff3d); transition: transform .35s ease-out; }
.tk-boss-stage { position: relative; display: grid; place-items: center; min-height: 0; }
.tk-boss-grinch { height: min(38vh, 300px); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .6)); animation: boss-idle 2.4s ease-in-out infinite; }
.tk-boss-grinch.struck { animation: boss-struck .38s ease-out; }
.tk-boss.victory .tk-boss-grinch { animation: boss-down .9s ease-in forwards; }
.tk-boss-target { position: absolute; width: 110px; height: 110px; border: 3px solid #9bff3d; border-radius: 50%; opacity: 0; transform: scale(1.6); pointer-events: none; }
.tk-boss-target::before, .tk-boss-target::after { content: ""; position: absolute; left: 50%; top: -14px; bottom: -14px; width: 3px; margin-left: -1.5px; background: #9bff3d; }
.tk-boss-target::after { top: 50%; bottom: auto; left: -14px; right: -14px; width: auto; height: 3px; margin: -1.5px 0 0; }
.tk-boss-target.show { animation: target-lock var(--w) linear forwards; }
@keyframes target-lock { 0% { opacity: 0; transform: scale(1.6); } 15% { opacity: 1; transform: scale(1); } 100% { opacity: 1; transform: scale(.85); border-color: #ff3b47; } }
.tk-projectile { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6b6b6b, #111 70%); box-shadow: 0 0 14px rgba(255, 90, 40, .6); opacity: 0; pointer-events: none; }
.tk-projectile.incoming { animation: projectile var(--w) cubic-bezier(.5, 0, 1, .7) forwards; }
.tk-projectile.from-left { --sx: -140px; } .tk-projectile.from-right { --sx: 140px; } .tk-projectile.from-up { --sx: 0px; }
@keyframes projectile { 0% { opacity: 1; transform: translate(var(--sx), -40px) scale(.5); } 100% { opacity: 1; transform: translate(calc(var(--sx) * -.2), 220px) scale(2.2); } }
.tk-prompt { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 52px; font-size: 18px; letter-spacing: .08em; }
.tk-prompt[data-tone="warn"] { color: #ffb36b; } .tk-prompt[data-tone="good"] { color: #9bff3d; } .tk-prompt[data-tone="bad"] { color: #ff6b6b; }
html[data-mode="light"] .tk-prompt[data-tone="warn"] { color: #a24a00; } html[data-mode="light"] .tk-prompt[data-tone="good"] { color: #1e6b16; }
.tk-key { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; border: 2px solid currentColor; border-radius: 10px; font-size: 24px; animation: key-pulse .5s ease-in-out infinite alternate; }
@keyframes key-pulse { to { transform: scale(1.1); } }
.tk-boss-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tk-boss-controls button { min-width: 64px; height: 54px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; background: rgba(0, 0, 0, .35); color: inherit; font: 900 20px Inter, Arial, sans-serif; cursor: pointer; touch-action: manipulation; }
html[data-mode="light"] .tk-boss-controls button { border-color: rgba(0, 0, 0, .25); background: rgba(255, 255, 255, .5); }
.tk-boss-controls .tk-hit { min-width: 140px; border-color: #9bff3d; color: #9bff3d; font-size: 14px; letter-spacing: .12em; }
html[data-mode="light"] .tk-boss-controls .tk-hit { color: #1e6b16; border-color: #1e6b16; }
.tk-boss.hurt { animation: boss-hurt .45s; }
.tk-boss.dodge-left .tk-boss-stage { transform: translateX(26px); } .tk-boss.dodge-right .tk-boss-stage { transform: translateX(-26px); } .tk-boss.dodge-up .tk-boss-stage { transform: translateY(18px); }
.tk-boss-stage { transition: transform .2s; }
@keyframes boss-idle { 50% { transform: translateY(-8px) rotate(-2deg); } }
@keyframes boss-struck { 30% { transform: translateX(14px) rotate(6deg); filter: brightness(2) drop-shadow(0 0 20px #fff); } }
@keyframes boss-down { to { transform: translateY(60px) rotate(-80deg); opacity: .2; } }
@keyframes boss-hurt { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 30% { box-shadow: inset 0 0 120px rgba(220, 30, 30, .7); } }

@media (max-width: 720px) {
  .takeover { padding: 0; }
  .tk-shell { height: 100dvh; border-radius: 0; }
  .tk-hud { gap: 10px; padding: 10px 12px; }
  .tk-brand span, .tk-steps li:not(.current) span { display: none; }
  .tk-steps li { width: 12px; height: 12px; }
  .tk-steps li.current { width: 28px; height: 28px; }
  .tk-steps li.current span { display: inline; }
  .tk-stats span { min-width: 0; padding: 6px 9px; }
  .tk-arena { min-height: 300px; }
  .tk-target { width: 70px; height: 78px; }
  .tk-target.decoy { width: 58px; height: 70px; }
  .tk-boss-controls button { min-width: 56px; height: 52px; }
  .tk-boss-controls .tk-hit { flex-basis: 100%; }
}

/* ---------- 6. Administrare ---------- */
.event-pill { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 800; white-space: nowrap; }
.event-pill[data-status="active"] { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-fg); }
.event-pill[data-status="grinch_won"], .event-pill[data-status="offline"] { border-color: color-mix(in srgb, var(--danger-fg) 40%, transparent); background: var(--danger-bg); color: var(--danger-fg); }
.event-pill[data-status="community_won"] { border-color: var(--theme-border); background: var(--theme-surface); color: var(--theme-highlight); }
.event-admin-note { display: grid; gap: 6px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.event-admin-note code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); }
.event-admin-session { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.event-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.event-admin-stats article { display: grid; align-content: start; gap: 4px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.event-admin-stats small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.event-admin-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.event-admin-stats span { color: var(--muted); font-size: 11px; }
.event-admin-stats .event-meter { margin: 6px 0 0; }
.event-admin-stats .event-meter-track { background: var(--surface-2); }
.event-admin-stats .event-meter-legend { display: none; }
.event-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.event-admin-card { margin-top: 12px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }
.event-admin-grid .event-admin-card { margin-top: 0; }
.event-admin-card h4 { margin: 0 0 12px; font-size: 14px; letter-spacing: .04em; }
.event-admin-card h4 span { color: var(--muted); font-weight: 600; }
.event-inline { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.event-inline label, .event-config label, .event-form-row label { display: grid; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 700; }
.event-inline label { flex: 1; }
.event-admin :is(input, select) { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--field); color: var(--text); font: inherit; }
.event-admin :is(input, select):focus { outline: 0; border-color: var(--theme-accent); box-shadow: 0 0 0 3px var(--theme-soft); }
.event-admin .primary, .event-admin .secondary { justify-content: center; gap: 10px; padding: 12px 16px; cursor: pointer; font: 800 11px Inter, Arial, sans-serif; letter-spacing: .04em; border: 1px solid var(--theme-border); }
.event-admin .secondary { color: var(--text); }
.event-admin .secondary.danger { border-color: color-mix(in srgb, var(--danger-fg) 45%, transparent); color: var(--danger-fg); }
.event-admin :is(.primary, .secondary):disabled { opacity: .45; cursor: not-allowed; }
.event-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.event-config { display: grid; gap: 10px; }
.event-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.event-operator-form { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; margin: 14px 0 10px; }
.event-table-wrap { overflow-x: auto; }
.event-table-wrap table { min-width: 620px; }
.event-history { display: grid; gap: 0; max-height: 300px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.event-history li { display: grid; grid-template-columns: 110px 150px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.event-history time { color: var(--muted); font-variant-numeric: tabular-nums; }
.event-history span { color: var(--text-2); }
.event-history small { color: var(--muted); }
.event-login h3 { margin-top: 0; }
@media (max-width: 1000px) { .event-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .event-admin-grid, .event-operator-form { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .event-history li { grid-template-columns: 1fr; gap: 2px; } .event-form-row { grid-template-columns: 1fr; } .event-inline { flex-direction: column; align-items: stretch; } }

/* ---------- Performanță ----------
   Cele ~130 de „fulgi care cad” din decorul vechi (2 per element decorat, animate infinit, cu box-shadow) coborau
   pagina la <5 fps când erau multe carduri. Rămân doar în bara de sus și în panoul de statistici. */
body[data-theme="christmas"] .christmas-snow-drift { display: none; box-shadow: none; will-change: transform, opacity; }
body[data-theme="christmas"] .topbar > .christmas-decor-layer .christmas-snow-drift,
body[data-theme="christmas"] .stats > .christmas-decor-layer .christmas-snow-drift { display: block; }
html[data-fx="lite"] body[data-theme="christmas"] .christmas-snow-drift { display: none !important; }

/* ---------- mișcare redusă ---------- */
@media (prefers-reduced-motion: reduce) {
  .wl-glow, .wl-bulb ellipse, .wl-bauble, .wl-pine-lights circle, .wl-star, .wl-sparkles i, .live-dot,
  body.chaos-mode .hero h1, .chaos-fog i, .tk-cine-bg, .tk-key, .tk-boss-grinch, .tk-timer.urgent i, .chaos-tags .drip { animation: none !important; }
  body.chaos-mode .wl-ball { animation: none; opacity: 0; }
  .wl-sparkles i { opacity: .6; }
}

/* ---------- 7. Personaj Grinch (SVG inline, părți animabile) ---------- */
.grinch-char { display: block; aspect-ratio: 420 / 520; line-height: 0; position: relative; }
.grinch-char svg { display: block; width: 100%; height: 100%; overflow: visible; }
.grinch-char .gr-part { transform-box: fill-box; transform-origin: center; transition: transform .28s cubic-bezier(.3, 1.5, .5, 1); }
.grinch-char .gr-head { transform-box: view-box; transform-origin: 230px 215px; transition: transform .32s cubic-bezier(.3, 1.5, .5, 1); animation: gr-sway 5.2s ease-in-out infinite; }
.grinch-char .gr-eye, .grinch-char .gr-pupil { animation: gr-blink 5.6s infinite; }
.grinch-char.bob svg { animation: gr-bob 2.8s ease-in-out infinite; }
.grinch-char[data-expr="smug"] .gr-brows { transform: translateY(-4px) rotate(-3deg); }
.grinch-char[data-expr="angry"] .gr-brows { transform: translateY(10px) scaleY(1.3); }
.grinch-char[data-expr="angry"] .gr-eye { transform: scaleY(.78); }
.grinch-char[data-expr="angry"] .gr-mouth { transform: scaleY(.8) scaleX(1.06); }
.grinch-char[data-expr="angry"] .gr-head { transform: rotate(-5deg) translateY(5px); }
.grinch-char[data-expr="shock"] .gr-brows { transform: translateY(-18px); }
.grinch-char[data-expr="shock"] .gr-eye { transform: scale(1.28); }
.grinch-char[data-expr="shock"] .gr-pupil { transform: scale(.55); }
.grinch-char[data-expr="shock"] .gr-mouth { transform: scale(.72, 1.7); }
.grinch-char[data-expr="shock"] .gr-teeth { transform: scaleY(.15); }
.grinch-char[data-expr="shock"] .gr-head { transform: translateY(-8px) scale(1.03); animation: none; }
.grinch-char[data-expr="laugh"] .gr-brows { transform: translateY(-10px) rotate(-4deg); }
.grinch-char[data-expr="laugh"] .gr-eye { transform: scaleY(.45); }
.grinch-char[data-expr="laugh"] .gr-mouth { transform: scaleY(1.5) scaleX(1.08); }
.grinch-char[data-expr="laugh"] .gr-head { animation: gr-laugh .2s ease-in-out infinite alternate; }
.grinch-char[data-expr="defeat"] .gr-brows { transform: translateY(-8px) rotate(5deg); }
.grinch-char[data-expr="defeat"] .gr-eye { transform: scaleY(.2); }
.grinch-char[data-expr="defeat"] .gr-pupil { transform: scaleY(.3); }
.grinch-char[data-expr="defeat"] .gr-mouth { transform: scaleY(-1) translateY(10px); }
.grinch-char[data-expr="defeat"] .gr-head { transform: rotate(13deg) translateY(16px); animation: none; }
.grinch-char[data-expr="sneak"] .gr-pupil { transform: translateX(-5px); }
.grinch-char[data-expr="sneak"] .gr-eye { transform: scaleY(.85); }
.grinch-char[data-expr="sneak"] .gr-head { transform: rotate(5deg); }
.grinch-char.flee { animation: gr-flee 1.5s cubic-bezier(.5, 0, 1, .6) forwards; }
@keyframes gr-sway { 0%, 100% { rotate: -1.2deg; } 50% { rotate: 1.6deg; } }
@keyframes gr-blink { 0%, 93%, 100% { scale: 1 1; } 96% { scale: 1 .08; } }
@keyframes gr-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes gr-laugh { from { rotate: -5deg; translate: -2px 0; } to { rotate: 5deg; translate: 2px -4px; } }
@keyframes gr-flee { 0% { transform: none; } 25% { transform: translateX(-12%) rotate(-6deg); } 100% { transform: translateX(-190%) rotate(-24deg); opacity: 0; } }

/* mascota de pe banner: își scoate capul peste marginea de sus a panoului */
.event-mascot { position: absolute; right: 26px; bottom: calc(100% - 3px); width: 98px; pointer-events: none; clip-path: inset(0 0 47% 0); animation: mascot-peek 1.1s cubic-bezier(.2, .9, .3, 1.2) .4s both, gr-bob 3.4s ease-in-out 1.5s infinite; }
@keyframes mascot-peek { from { transform: translateY(46px); } to { transform: none; } }

/* ---------- 8. Banner: antet, restrângere, intrare ---------- */
.event-banner { width: min(372px, 92vw); animation: banner-in .6s cubic-bezier(.2, .9, .3, 1) both; }
.event-headrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.event-collapse { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; background: rgba(255, 255, 255, .06); color: inherit; cursor: pointer; pointer-events: auto; transition: background .2s, border-color .2s, transform .2s; }
.event-collapse:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.event-collapse svg { width: 12px; height: 12px; }
.event-banner.collapsed { width: auto; min-width: 270px; padding: 14px 16px; }
.event-banner.collapsed h2 { margin: 4px 0 0; font-size: 19px; }
.event-banner.collapsed .event-body { display: none; }
.event-actions .primary, .event-actions .secondary { transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.event-actions .primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(199, 54, 77, .5); }
.event-play span { display: inline-block; transition: transform .25s ease; } .event-play:hover span { transform: translateX(4px); }
@keyframes banner-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 9. Efecte vizuale „reduse” + comutator ---------- */
.fx-toggle { display: none; }
body[data-theme="christmas"] .fx-toggle { display: grid; }
.fx-toggle[aria-pressed="false"] { opacity: .78; }
.fx-toggle[aria-pressed="false"]::after { content: ""; position: absolute; width: 24px; height: 2px; border-radius: 2px; background: currentColor; rotate: -45deg; }
html[data-fx="lite"] .wl-light, html[data-fx="lite"] .wl-bulb, html[data-fx="lite"] .wl-bauble, html[data-fx="lite"] .wl-pine-bulb, html[data-fx="lite"] .wl-b-light,
html[data-fx="lite"] .wl-star, html[data-fx="lite"] .event-mascot, html[data-fx="lite"] .grinch-char.bob svg, html[data-fx="lite"] body.chaos-mode .hero h1 { animation: none !important; }
html[data-fx="lite"] .wl-bokeh, html[data-fx="lite"] .wl-sparkles, html[data-fx="lite"] .chaos-fog, html[data-fx="lite"] .chaos-eyes, html[data-fx="lite"] .chaos-peek { display: none !important; }
html[data-fx="lite"] .event-banner, html[data-fx="lite"] .takeover { backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-fx="lite"] .event-banner { background: #0e1a14; }
html[data-fx="lite"] .chaos-tags .tag { filter: none; text-shadow: 0 0 10px currentColor; animation: none; }
html[data-fx="lite"] .grinch-char .gr-head, html[data-fx="lite"] .grinch-char .gr-eye, html[data-fx="lite"] .grinch-char .gr-pupil { animation: none; }
html[data-fx="lite"] .wl-layer { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .wl-light, .wl-bulb, .wl-bauble, .wl-bokeh i, .wl-pine-bulb, .wl-b-light, .wl-star, .wl-sparkles i, .chaos-eyes, .chaos-eyes i, .chaos-fog i,
  .chaos-tags .tag, .chaos-claw, .chaos-drip, .grinch-char *, .grinch-char, .event-banner, .event-mascot, .chaos-peek, .chaos-blackout span { animation: none !important; }
  .wl-bokeh, .wl-sparkles, .chaos-fog, .chaos-eyes, .chaos-peek { display: none !important; }
  .wonderland *, .wonderland { transition: none !important; }
  .wl-layer { transform: none; }
}
/* ---------- 10. Joc: UX (antet, numărătoare, briefing cu Grinch, rezultate cu stele) ---------- */
.tk-hud .tk-sound { margin-left: -6px; }
.tk-sound svg { width: 20px; height: 20px; display: block; margin: auto; }
.tk-sound[aria-pressed="false"] .tk-wave { display: none; }
.tk-sound[aria-pressed="false"] { color: var(--muted); }
.tk-score b { display: inline-block; min-width: 3.2ch; text-align: right; transition: color .2s; }
.tk-score b.bump { color: #fff; animation: score-bump .35s ease; }
@keyframes score-bump { 40% { transform: scale(1.22); } }
.tk-timer { height: 22px; border: 1px solid var(--line-soft); }
.tk-timer span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 11px; letter-spacing: .06em; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.tk-timer.urgent span { animation: urgent .5s steps(1) infinite; }

.tk-brief-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 230px); gap: clamp(14px, 3vw, 34px); align-items: end; }
.tk-panel.tk-stage-brief { max-width: 920px; }
.tk-brief-grinch { position: relative; display: grid; justify-items: center; align-self: stretch; align-content: end; }
.tk-bubble { position: relative; margin: 0 0 12px; padding: 11px 15px; border: 1px solid var(--theme-border); border-radius: 16px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.4; animation: bubble-in .45s cubic-bezier(.2, 1.5, .4, 1) .4s both; }
.tk-bubble::after { content: ""; position: absolute; left: 56%; bottom: -8px; width: 14px; height: 14px; background: inherit; border: inherit; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.tk-grinch, .tk-result-grinch { width: min(100%, 200px); filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .45)); }
.tk-facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.tk-facts div { padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.tk-facts dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tk-facts dd { margin: 3px 0 0; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-hint { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
@keyframes bubble-in { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }

.tk-countin { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 100%; padding: 24px; text-align: center; }
.tk-count { display: grid; place-items: center; min-width: 190px; height: 190px; margin: 8px 0; border: 3px solid var(--theme-accent); border-radius: 50%; color: var(--theme-highlight); font: 700 76px/1 "Playfair Display", Georgia, serif; box-shadow: 0 0 0 10px var(--theme-soft), inset 0 0 40px var(--theme-soft); }
.tk-count.pop { animation: count-pop .62s cubic-bezier(.2, 1.4, .4, 1); }
.tk-count:is(:empty) { visibility: hidden; }
@keyframes count-pop { 0% { transform: scale(.4); opacity: 0; } 35% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.tk-result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 190px); gap: 18px; align-items: center; }
.tk-result-grinch { justify-self: center; }
.tk-stars { display: flex; gap: 6px; margin: 4px 0 12px; font-size: 30px; line-height: 1; }
.tk-stars i { font-style: normal; color: var(--line-strong); }
.tk-stars i.on { color: #ffcf4a; text-shadow: 0 0 16px rgba(255, 207, 74, .6); animation: star-pop .5s cubic-bezier(.2, 1.7, .4, 1) calc(.3s + var(--i) * .22s) both; }
@keyframes star-pop { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.tk-result-score { flex-wrap: wrap; }
.tk-result-score span { min-width: 140px; }
.tk-result.completed { background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--theme-highlight) 14%, transparent), transparent 60%); }

.tk-pop { position: absolute; z-index: 4; pointer-events: none; font: 900 18px Inter, Arial, sans-serif; transform: translate(-50%, -50%); animation: pop-up .9s ease-out forwards; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.tk-pop.good { color: #9bff3d; } .tk-pop.bad { color: #ff5a68; font-size: 22px; } .tk-pop.miss { color: #c9c4b6; font-size: 13px; }
@keyframes pop-up { from { opacity: 1; transform: translate(-50%, -30%) scale(.8); } to { opacity: 0; transform: translate(-50%, -190%) scale(1.15); } }

.tk-cine-grinch { position: absolute; right: 6%; bottom: -4%; width: min(46%, 380px); opacity: 0; transform: translateX(40%) rotate(8deg); transition: transform 1.1s cubic-bezier(.2, .9, .3, 1.2), opacity .6s; filter: drop-shadow(0 20px 30px #000); }
.tk-cinema[data-scene="2"] .tk-cine-grinch { opacity: 1; transform: none; }
.tk-boss-grinch { width: calc(min(38vh, 300px) * 420 / 520); height: auto; animation: none; }
.tk-boss-grinch svg { animation: gr-bob 2.4s ease-in-out infinite; }
.tk-boss-grinch.struck svg { animation: boss-struck .38s ease-out; }
.tk-boss.victory .tk-boss-grinch { animation: boss-down .9s ease-in forwards; }
@media (max-width: 720px) {
  .tk-brief-grid, .tk-result-grid { grid-template-columns: 1fr; }
  .tk-brief-grinch { order: -1; grid-template-columns: 1fr auto; align-items: end; justify-items: stretch; gap: 8px; }
  .tk-brief-grinch .tk-bubble { margin: 0 0 22px; } .tk-grinch { width: 96px; }
  .tk-result-grinch { width: 110px; order: -1; justify-self: end; margin-bottom: -40px; }
  .tk-count { min-width: 150px; height: 150px; font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) { .tk-bubble, .tk-count.pop, .tk-stars i.on, .tk-pop, .tk-score b.bump { animation: none !important; } }
/* arenă de urmărire: lună, stele și ninsoare ușoară în fundal (doar gradiente CSS, fără imagini) */
.tk-chase::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 14% 18%, #fff7dc 0 22px, rgba(255, 240, 200, .35) 23px 34px, transparent 70px),
    radial-gradient(circle at 30% 24%, #fff 0 1px, transparent 2px), radial-gradient(circle at 52% 12%, #fff 0 1.2px, transparent 2.2px), radial-gradient(circle at 71% 28%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 86% 14%, #fff 0 1.4px, transparent 2.4px), radial-gradient(circle at 63% 40%, #fff 0 1px, transparent 2px), radial-gradient(circle at 22% 46%, #fff 0 1px, transparent 2px); }
html[data-mode="light"] .tk-chase::before { opacity: .55; }
.event-meter-track .pend { position: absolute; top: 0; height: 100%; border-radius: 0 10px 10px 0; background: repeating-linear-gradient(135deg, rgba(240, 207, 117, .85) 0 6px, rgba(240, 207, 117, .3) 6px 12px); animation: pend-slide 1s linear infinite; }
.event-meter-legend em { font-style: normal; color: #f0d281; }
@keyframes pend-slide { to { background-position: 17px 0; } }
.tk-card-face svg { width: 62%; height: 62%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.tk-card[data-symbol] .tk-card-face { filter: none; }
@keyframes boss-struck { 30% { transform: translateX(14px) rotate(6deg); filter: brightness(1.45) saturate(1.3) drop-shadow(0 0 14px rgba(255, 90, 90, .8)); } }
/* acoperișul Primăriei: lună, zăpadă și un strat de umbră sub Grinch */
.tk-boss::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 82% 16%, #fff7dc 0 18px, rgba(255, 240, 200, .3) 19px 30px, transparent 62px), linear-gradient(0deg, rgba(0, 0, 0, .55), transparent 40%); }
.tk-boss-stage::after { content: ""; position: absolute; left: 50%; bottom: 8%; width: 46%; height: 26px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%); pointer-events: none; }
.tk-boss-stage .tk-boss-grinch { position: relative; z-index: 1; }
/* ---------- 11. Responsive: tabletă / mobil ---------- */
@media (max-width: 1100px) {
  .event-banner { width: 100%; max-width: 560px; }
  .event-banner.collapsed { width: auto; max-width: 100%; }
  .event-mascot { display: none; }
  .wl-branch { width: 31vw; }
  .wl-baubles .wl-bauble:nth-child(n+7) { display: none; }
}
@media (max-width: 720px) {
  .event-banner { padding: 18px 16px 16px; }
  .event-banner h2 { font-size: 22px; }
  .event-facts { grid-template-columns: 1.5fr 1fr 1fr; gap: 6px; }
  .event-facts div { padding: 8px 8px; }
  .event-facts dd { font-size: 12.5px; }
  .event-actions .primary, .event-actions .secondary { flex-basis: 100%; }
}
/* mobil: butonul de efecte stă în rândul de navigare; firele globurilor sunt scurtate ca să nu atingă titlul */
.fx-label { display: none; }
@media (max-width: 720px) {
  .topbar nav .fx-toggle { width: auto; height: 30px; padding: 0 11px; border-radius: 999px; flex: none; gap: 6px; grid-auto-flow: column; align-items: center; }
  .topbar nav .fx-toggle svg { width: 15px; height: 15px; }
  .topbar nav .fx-label { display: inline; font: 800 10px Inter, Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
  .topbar nav .fx-toggle[aria-pressed="false"]::after { width: 17px; left: 10px; }
  .wl-bauble { --k: .52; }
  .wl-baubles .wl-bauble:nth-child(n+4) { display: none; }
}
/* tablete și telefoane: graffiti-ul scurt rămâne într-un singur rând, sub bara de sus; restul (gheare, ochi, alte inscripții) nu are loc fără să acopere textul */
@media (max-width: 1100px) {
  .chaos-tags .tag-1 { left: auto; right: 4%; top: 134px; font-size: clamp(22px, 3.6vw, 34px); rotate: -4deg; padding: 10px 14px; }
  .chaos-tags .tag-1 br { display: none; }
  .chaos-tags .tag-2, .chaos-tags .tag-3, .chaos-claw, .chaos-eyes { display: none; }
  .chaos-tags .tag-1 .chaos-drip { height: 28px !important; }
}
/* cu două comutatoare (Light/Dark + efecte) și cont autentificat, bara de sus rămâne pe un rând fără să taie „CONTACT” */
@media (min-width: 721px) and (max-width: 1700px) {
  .topbar:has(.logged-user:not(.hidden)) { left: 1.5%; right: 1.5%; padding-left: 14px; padding-right: 12px; }
  .topbar:has(.logged-user:not(.hidden)) .account { gap: 5px; }
  .topbar:has(.logged-user:not(.hidden)) .mode-toggle { width: 38px; height: 38px; border-radius: 10px; }
  .topbar:has(.logged-user:not(.hidden)) .quick-actions button { padding: 0 8px; }
  .topbar:has(.logged-user:not(.hidden)) nav { gap: 4px; justify-content: space-between; }
}