/* Scoped arcade effects: no overlays above controls and no changes to game rules. */
.arcane-panel { --realm: #ffb43e; position: relative; isolation: isolate; border-color: var(--realm); box-shadow: 0 8px 32px #0008, inset 0 1px 24px #ff5e0015; }
.arcane-panel[data-realm="nine-circles"] { --realm: #ff6845; }
.arcane-panel[data-realm="liars-altar"] { --realm: #d697ff; }
.arcane-panel[data-realm="soulbound"] { --realm: #79e6df; }
.arcane-panel[data-realm="last-candle"] { --realm: #ffd47f; }
.arcane-panel[data-realm="cursed-draft"] { --realm: #c294ff; }
.arcane-stage { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #49251b 0, #160606 60%, #090303 100%); }
.arcane-stage > :not(.arcane-aura) { position: relative; z-index: 1; }
.arcane-stage .sigil { display: grid; place-items: center; width: 124px; height: 124px; margin: 0 auto; color: var(--realm); text-shadow: 0 0 26px var(--realm); animation: arcane-breathe 4s ease-in-out infinite; }
.arcane-aura { position: absolute; inset: 0; pointer-events: none; overflow: hidden; color: var(--realm); opacity: .42; }
.orbit { position: absolute; left: 50%; top: 90px; width: 170px; height: 170px; margin: -85px; border: 1px solid currentColor; border-radius: 50%; box-shadow: 0 0 18px #ff9b0020; animation: arcane-orbit 24s linear infinite; }
.orbit::before, .orbit::after { content: '◆'; position: absolute; top: 50%; left: -5px; font: 12px Arial; }
.orbit::after { left: auto; right: -5px; }
.orbit-two { width: 198px; height: 198px; margin: -99px; border-style: dashed; animation-direction: reverse; animation-duration: 40s; }
.orbit-three { width: 228px; height: 228px; margin: -114px; opacity: .4; }
[data-realm="vault"] .orbit-one { border-width: 5px; border-style: double; }
[data-realm="nine-circles"] .orbit { border-radius: 28%; }
[data-realm="liars-altar"] .orbit-one { border-radius: 18px; transform: rotate(45deg); }
[data-realm="soulbound"] .orbit-one { margin-left: -115px; border-width: 3px; }
[data-realm="soulbound"] .orbit-two { width: 170px; height: 170px; margin: -85px -55px; border-style: solid; border-width: 3px; }
[data-realm="cursed-draft"] .orbit { border-radius: 12px; }
.arcane-panel .stat { border-bottom-color: var(--realm); }
.arcane-panel .player-current { border-color: var(--realm); }
.arcane-panel .event { border-color: var(--realm); }
.arcane-panel .log li:first-child { color: var(--realm); }
.fx-stat-change { animation: arcane-stat .65s ease-out; }
.fx-resolve .sigil { animation: arcane-reveal .6s ease-out, arcane-breathe 4s .6s ease-in-out infinite; }
.fx-resolve .event { animation: arcane-message .6s ease-out; }
.fx-victory .notice { border-color: #ffdc77; background: linear-gradient(115deg, #493109, #241307); box-shadow: inset 0 0 28px #ffd36118; }
.fx-defeat .notice { border-color: #eb6969; background: #280b13; }
.fx-celebrate .notice { animation: arcane-reveal .7s ease-out; }
.fx-fall .arcane-stage { animation: arcane-fall .55s ease-out; }
.arcane-panel.fx-danger .stat:first-child { border-color: #ff7777; box-shadow: inset 0 0 20px #c9000028; }
.arcane-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; border-radius: inherit; }
.arcane-burst span { position: absolute; left: 50%; top: 210px; color: var(--realm); text-shadow: 0 0 12px currentColor; font: 18px Arial; opacity: 0; animation: arcane-spark 1s ease-out forwards; }
.cursed-card { position: relative; overflow: hidden; animation: arcane-deal .4s var(--card-delay) both; }
.cursed-card::before { content: '♠'; position: absolute; right: 10px; top: -12px; font: 100px Georgia; color: #c294ff; opacity: .08; pointer-events: none; }
.cursed-card:not(.locked):hover { border-color: var(--realm); box-shadow: 0 0 22px #c294ff30; }
.candle-scene { height: 116px; width: 130px; margin: 20px auto 0; position: relative; pointer-events: none; }
.candle-wax { position: absolute; width: 28px; height: 56px; left: 51px; bottom: 10px; border-radius: 5px 5px 3px 3px; background: linear-gradient(90deg, #9d622d, #ffe6ac 42%, #c58c4f); box-shadow: 0 0 35px #ffa62f30; }
.candle-flame { position: absolute; width: 22px; height: 37px; left: 54px; top: 8px; border-radius: 80% 20% 65% 35%; background: radial-gradient(ellipse at 50% 80%, #fff8d1 10%, #ffd260 45%, #f97515 80%); box-shadow: 0 0 22px #ffb13f, 0 0 60px #ff971f80; transform-origin: bottom; animation: arcane-flame 2.3s ease-in-out infinite alternate; }
.candle-pool { position: absolute; inset: auto 5px 0; height: 13px; border-radius: 50%; background: #ffbf4a22; box-shadow: 0 0 30px #ffa62f33; }
.extinguished .candle-flame { opacity: 0; animation: none; }
.extinguished .candle-wax { filter: saturate(.25); }
.arcane-panel .grid-map { background: radial-gradient(ellipse at center, #4c2d12, #10090a 80%); padding: 12px; border-radius: 16px; }
.grid-map .arcane-aura { display: none; }
.arcane-panel .tile.here { box-shadow: 0 0 24px #ffc14b70; background: #7a4516; }
.fx-resolve .tile.here { animation: arcane-reveal .45s ease-out; }
@keyframes arcane-orbit { to { transform: rotate(360deg); } }
@keyframes arcane-breathe { 50% { transform: translateY(-4px); } }
@keyframes arcane-reveal { from { opacity: .4; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes arcane-stat { 40% { color: #fff5ce; text-shadow: 0 0 18px var(--realm); } }
@keyframes arcane-message { from { border-left-width: 12px; } }
@keyframes arcane-fall { 30% { transform: translateX(-3px); } 65% { transform: translateX(3px); } }
@keyframes arcane-deal { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes arcane-flame { to { transform: rotate(7deg) scale(.88, 1.08); } }
@keyframes arcane-spark { 15% { opacity: .9; } to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--spin)) scale(.3); } }
html.ddr-lite-fx .arcane-panel *, html.ddr-lite-fx .arcane-panel *::before, html.ddr-lite-fx .arcane-panel *::after { animation: none !important; }
html.ddr-lite-fx .arcane-burst { display: none; }
@media (prefers-reduced-motion: reduce) {
  .arcane-panel *, .arcane-panel *::before, .arcane-panel *::after { animation: none !important; transition: none !important; }
  .arcane-burst { display: none; }
}
@media (max-width: 600px) { .arcane-panel { padding: 16px; } .arcane-panel .grid-map { padding: 8px; gap: 6px; } }
