.ag {
--ag-bg: #f7f7f2; --ag-ink: #172844; --ag-soft: #5d6a80; --ag-red: #ec5b37; --ag-green: #2e9e6a; --ag-grey: #d3d3ce;
--ag-gold: #d29a12; --ag-frost: #86bfe6; --ag-frost-d: #3f8cc4; --ag-teal: #13958e; --ag-violet: #7656cc;
--ag-blue: #2f74d6; --ag-plum: #974488; --ag-amber: #dc8f12; --ag-slate: #5b6b80; --ag-focus: #2f6fe0;
--ag-hover: #1f5e45; --ag-board: rgba(23, 40, 68, .035); --ag-card: #fff; --ag-btn: #fff; --ag-line: rgba(23, 40, 68, .12);
--ag-face: #fdfdfa; --ag-radius: 16px;
position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden;
background: var(--ag-bg); color: var(--ag-ink); border-radius: var(--ag-radius);
font: 500 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.ag[data-theme="dark"] {
--ag-bg: #121a29; --ag-ink: #e8ecf4; --ag-soft: #9aa6bb; --ag-grey: #3a4458; --ag-board: rgba(232, 236, 244, .045);
--ag-card: #1b2537; --ag-btn: #1b2537; --ag-line: rgba(232, 236, 244, .14); --ag-hover: #7fd7ab; --ag-focus: #7aa7ff;
--ag-slate: #8b9ab0; --ag-frost: #8fcaf0; --ag-face: #27344c;
}
@media (prefers-color-scheme: dark) {
.ag[data-theme="auto"] {
--ag-bg: #121a29; --ag-ink: #e8ecf4; --ag-soft: #9aa6bb; --ag-grey: #3a4458; --ag-board: rgba(232, 236, 244, .045);
--ag-card: #1b2537; --ag-btn: #1b2537; --ag-line: rgba(232, 236, 244, .14); --ag-hover: #7fd7ab; --ag-focus: #7aa7ff;
--ag-slate: #8b9ab0; --ag-frost: #8fcaf0; --ag-face: #27344c;
}
}
.ag.ag-fit { justify-content: center; }
.ag-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 6px; }
.ag-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ag-name { font-weight: 800; font-size: 17px; letter-spacing: .01em; white-space: nowrap; }
.ag-diff { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ag-soft); }
.ag-diff[data-d="hard"], .ag-diff[data-d="expert"] { color: var(--ag-red); }
.ag-lives { display: flex; gap: 4px; }
.ag-lives i { display: block; width: 18px; height: 18px; }
.ag-lives svg { width: 100%; height: 100%; fill: var(--ag-grey); transition: fill .3s, transform .3s; }
.ag-lives i.on svg { fill: var(--ag-red); }
.ag-progress { height: 3px; margin: 0 14px; border-radius: 2px; background: var(--ag-line); overflow: hidden; }
.ag-progress i { display: block; height: 100%; width: 0; background: var(--ag-green); transition: width .35s ease-out; }
.ag-stage { position: relative; flex: 1 1 auto; min-height: 0; outline: none; touch-action: none; }
.ag-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--ag-focus); border-radius: 12px; }
.ag-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ag-soft); }
.ag-line { min-height: 2.7em; padding: 2px 16px; text-align: center; font-size: 14px; color: var(--ag-soft);
opacity: 0; transition: opacity .25s; display: flex; align-items: center; justify-content: center; }
.ag-line.on { opacity: 1; }
.ag-line b { color: var(--ag-ink); margin-inline-end: .35em; }
.ag-bar { display: flex; justify-content: center; gap: 8px; padding: 2px 10px 12px; }
.ag-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px;
padding: 0 14px; border: 1px solid var(--ag-line); border-radius: 22px; background: var(--ag-btn); color: var(--ag-ink);
font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .1s, background .2s, opacity .2s; }
.ag-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ag-btn:active { transform: scale(.97); }
[dir="rtl"] .ag-btn[data-act="undo"] svg { transform: scaleX(-1); }   
.ag-btn:disabled { opacity: .4; cursor: default; }
.ag-btn:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }
.ag-btn.ag-primary { background: var(--ag-ink); color: var(--ag-bg); border-color: var(--ag-ink); }
.ag-btn.ag-wide { min-width: 160px; }
.ag-btn.ag-icon { padding: 0 12px; }
@media (max-width: 380px) { .ag-bar .ag-btn span { display: none; } .ag-bar .ag-btn { padding: 0 16px; } }
@media (hover: hover) { .ag-btn:not(:disabled):hover { background: var(--ag-board); } .ag-btn.ag-primary:hover { background: var(--ag-ink); opacity: .9; } }
.ag-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px;
background: color-mix(in srgb, var(--ag-bg) 45%, transparent); opacity: 0; transition: opacity .25s; z-index: 2; }
.ag-card[hidden] { display: none; }
.ag-card.on { opacity: 1; }
.ag-card-in { background: var(--ag-card); border-radius: 18px; padding: 22px 22px 18px; max-width: 340px; width: 100%;
text-align: center; box-shadow: 0 10px 40px rgba(10, 20, 40, .18); transform: translateY(8px); transition: transform .3s; }
.ag-card.on .ag-card-in { transform: none; }
.ag-card h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.ag-card p { margin: 0 0 6px; color: var(--ag-soft); }
.ag-card-btns { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.ag-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
.ag-svg .cam { pointer-events: none; }
.ag-svg .bg { fill: var(--ag-board); }
.ag-svg .dots circle { fill: var(--ag-ink); fill-opacity: .25; transform-box: fill-box; transform-origin: center; }
.ag-svg .dots circle.win { animation: ag-dot 1s ease-in-out both; }
@keyframes ag-dot { 50% { fill: var(--ag-green); fill-opacity: 1; transform: scale(1.7); } 100% { fill: var(--ag-green); fill-opacity: .75; transform: scale(1.15); } }
.ar { --c: var(--ag-ink); }
.ar .b { fill: none; stroke: var(--c); stroke-width: .2; stroke-linecap: square; stroke-linejoin: miter; transition: stroke .2s, stroke-width .2s; }
.ar .h { fill: var(--c); transition: fill .2s; }
.ar .ring { fill: none; stroke: var(--c); stroke-width: .06; transition: stroke .2s; }
.ar .plate { fill: var(--ag-slate); transform-box: fill-box; transform-origin: center; }
.ar .plate.off { animation: ag-plate .38s ease-in forwards; }
@keyframes ag-plate { to { transform: translate(.4px, -.8px) rotate(40deg) scale(.4); opacity: 0; } }
.ar.armour .b { stroke-width: .28; }
.ar.col-blue { --c: var(--ag-blue); } .ar.col-plum { --c: var(--ag-plum); } .ar.col-amber { --c: var(--ag-amber); }
.ar.frozen { --c: var(--ag-frost); }
.ar.key { --c: var(--ag-gold); }
.ar.bomb .h { fill: var(--ag-red); }
.ar.locked { --c: color-mix(in srgb, var(--ag-ink) 50%, var(--ag-bg)); }
.ar.hov { --c: var(--ag-hover); }
.ar.sel { --c: var(--ag-focus); }
.ar.red { --c: var(--ag-red); }
.ar.exit { --c: var(--ag-green); }
.ar.hint .b { animation: ag-hint-b .39s ease-in-out infinite alternate; }
.ar.hint .h { animation: ag-hint-h .39s ease-in-out infinite alternate; }
@keyframes ag-hint-b { to { stroke: var(--ag-green); stroke-width: .27; } }
@keyframes ag-hint-h { to { fill: var(--ag-green); } }
.ar.in { animation: ag-in .32s ease-out both; }
@keyframes ag-in { from { opacity: 0; } }
.ar.blasted { animation: ag-pop .45s ease-in forwards; transform-box: fill-box; transform-origin: center; }
@keyframes ag-pop { to { opacity: 0; transform: scale(.5); } }
.ar.flash { animation: ag-flash .4s; }
@keyframes ag-flash { 50% { opacity: .35; } }
.ar.jiggle { animation: ag-jig .4s; transform-box: fill-box; transform-origin: center; }
@keyframes ag-jig { 25% { transform: rotate(3deg); } 75% { transform: rotate(-3deg); } }
.ar.wake { animation: ag-wake .5s ease-out; }
@keyframes ag-wake { 40% { opacity: .4; } }
.portal circle { fill: none; stroke-width: .08; }
.portal.teal circle { stroke: var(--ag-teal); } .portal.violet circle { stroke: var(--ag-violet); }
.portal .in { stroke-dasharray: .21 .1; animation: ag-spin 4s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ag-spin { to { transform: rotate(360deg); } }
.wall .bar { stroke: var(--ag-red); stroke-width: .1; stroke-linecap: round; transition: stroke .3s; }
.wall .chev { fill: none; stroke: var(--ag-red); stroke-width: .07; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.wall.open .bar, .wall.open .chev { stroke: var(--ag-grey); }
.side { --sc: var(--ag-blue); }
.side.col-plum { --sc: var(--ag-plum); } .side.col-amber { --sc: var(--ag-amber); }
.side rect:first-child { fill: var(--sc); opacity: .55; transition: opacity .3s; }
.side.open rect:first-child { opacity: 1; }
.fxring { fill: none; stroke: var(--ag-red); stroke-width: .12; animation: ag-ring .6s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes ag-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ar.in, .ar.hint .b, .ar.hint .h, .portal .in { animation: none; } }
.ag-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
