/* ==========================================================================
   AI Game Atlas — base layer (every page)
   Tokens · typography · header · grimoire · footer · Adventure HUD
   ========================================================================== */

:root {
	--void: #07050b;
	--abyss: #120c19;
	--dusk: #231733;
	--ichor: #e3263f;
	--ichor-deep: #7d0f22;
	--aether: #9a6bff;
	--aether-deep: #3b1f73;
	--gilt: #d5a95a;
	--gilt-hi: #f6dfa4;
	--gilt-lo: #6d4a1c;
	--bone: #ece3d4;
	--ash: #a99cb3;
	--verdigris: #71c08f;
	--frost: #9fd4ff;
	--ember: #ff7a3d;

	--f-display: "Cormorant SC", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
	--f-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
	--f-ui: "Alegreya Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

	--hdr: 72px;
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	--ease-io: cubic-bezier(.65, 0, .35, 1);
	--hairline: linear-gradient(90deg, transparent, rgba(213, 169, 90, .55) 18%, rgba(246, 223, 164, .9) 50%, rgba(213, 169, 90, .55) 82%, transparent);
	color-scheme: dark;
}

/* ---------- Page canvas ---------- */
body.aga {
	background: var(--void);
	color: var(--bone);
	font-family: var(--f-ui);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.aga:not(.aga-front):not(.aga-bleed) { padding-top: var(--hdr); }
body.aga .site,
body.aga .site-content,
body.aga .inside-article,
body.aga .separate-containers .inside-article,
body.aga .one-container .container,
body.aga .separate-containers .comments-area,
body.aga .sidebar .widget { background: transparent; color: inherit; }
body.aga .separate-containers .inside-article { background: rgba(18, 12, 25, .72); border: 1px solid rgba(213, 169, 90, .14); }
body.aga a { color: var(--gilt-hi); text-decoration-color: rgba(213, 169, 90, .45); text-underline-offset: .18em; }
body.aga a:hover { color: #fff; }
body.aga h1, body.aga h2, body.aga h3, body.aga h4 { font-family: var(--f-serif); font-weight: 600; color: var(--bone); letter-spacing: .005em; line-height: 1.12; }
body.aga .entry-content { font-size: 1.125rem; line-height: 1.75; max-width: 42rem; }
body.aga ::selection { background: var(--ichor-deep); color: #fff; }
body.aga :focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 3px; border-radius: 2px; }

.aga-sigil, .aga-nav__sigil { width: 1em; height: 1em; flex: none; }

/* ---------- Header ---------- */
.aga-header {
	position: fixed; inset: 0 0 auto; z-index: 900;
	height: var(--hdr);
	transition: background .5s var(--ease-out), backdrop-filter .5s, box-shadow .5s;
}
.admin-bar .aga-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .aga-header { top: 46px; } }

.aga-header::before { /* soft top vignette for legibility over the hero */
	content: ""; position: absolute; inset: 0 0 -40px; pointer-events: none;
	background: linear-gradient(180deg, rgba(7, 5, 11, .78), rgba(7, 5, 11, 0));
	transition: opacity .5s;
}
.aga-header::after { /* gilt hairline, appears on scroll */
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
	background: var(--hairline); opacity: 0; transition: opacity .5s;
}
.aga-header.is-solid,
body.aga:not(.aga-front):not(.aga-lairpage) .aga-header {
	background: rgba(9, 6, 14, .84);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
}
.aga-header.is-solid::before, body.aga:not(.aga-front):not(.aga-lairpage) .aga-header::before { opacity: 0; }
.aga-header.is-solid::after, body.aga:not(.aga-front):not(.aga-lairpage) .aga-header::after { opacity: 1; }

.aga-header__inner {
	position: relative; height: 100%;
	display: flex; align-items: center; gap: clamp(12px, 2.2vw, 36px);
	padding: 0 clamp(16px, 3vw, 44px);
	max-width: 1680px; margin: 0 auto;
}

.aga-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--bone) !important; flex: none; }
.aga-brand__mark { width: 30px; height: 30px; color: var(--gilt); transition: transform 1.2s var(--ease-out), color .3s; }
.aga-brand:hover .aga-brand__mark { transform: rotate(180deg); color: var(--gilt-hi); }
.aga-brand__word { font-family: var(--f-display); font-weight: 700; font-size: 1.28rem; letter-spacing: .06em; line-height: 1; white-space: nowrap; }

/* Realm links */
.aga-nav { flex: 1 1 auto; min-width: 0; }
.aga-nav__list { display: flex; align-items: center; gap: clamp(2px, 1vw, 14px); margin: 0; padding: 0; list-style: none; }
.aga-nav__item { position: relative; }
.aga-nav__link {
	position: relative; display: flex; align-items: center; gap: 8px;
	padding: 10px 12px 12px; text-decoration: none !important;
	color: rgba(236, 227, 212, .78) !important;
	font-family: var(--f-ui); font-weight: 500; font-size: .98rem; letter-spacing: .02em;
	transition: color .3s;
}
.aga-nav__sigil { width: 19px; height: 19px; color: var(--gilt); opacity: .75; transition: opacity .3s, filter .3s, transform .5s var(--ease-out); }
.aga-nav__item[data-tier="final"] .aga-nav__sigil { color: #ff5566; }
.aga-nav__route { position: absolute; left: 12px; right: 12px; bottom: 4px; width: calc(100% - 24px); height: 7px; overflow: visible; }
.aga-nav__route path { fill: none; stroke: var(--gilt); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 130; stroke-dashoffset: 130; transition: stroke-dashoffset .7s var(--ease-out); }
.aga-nav__link:hover, .aga-nav__link:focus-visible, .aga-nav__link[aria-current] { color: #fff !important; }
.aga-nav__link:hover .aga-nav__sigil, .aga-nav__link:focus-visible .aga-nav__sigil, .aga-nav__link[aria-current] .aga-nav__sigil { opacity: 1; filter: drop-shadow(0 0 6px currentColor); transform: translateY(-1px) scale(1.08); }
.aga-nav__link:hover .aga-nav__route path, .aga-nav__link:focus-visible .aga-nav__route path { stroke-dashoffset: 0; }
.aga-nav__link[aria-current] .aga-nav__route path { stroke-dashoffset: 0; stroke-dasharray: 3 4; }

/* Lair card (hover/focus) */
.aga-lair {
	position: absolute; top: calc(100% + 8px); left: 0; width: 272px; z-index: 5;
	display: grid; gap: 6px; padding: 16px 18px 18px;
	background: linear-gradient(180deg, rgba(24, 16, 33, .97), rgba(10, 7, 15, .98));
	border: 1px solid rgba(213, 169, 90, .38);
	clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .35s var(--ease-out), transform .45s var(--ease-out), visibility 0s .35s;
	pointer-events: none;
}
.aga-nav__item:hover .aga-lair, .aga-nav__item:focus-within .aga-lair { opacity: 1; visibility: visible; transform: none; transition-delay: .08s, .08s, 0s; }
.aga-lair__rank { font-family: var(--f-serif); font-style: italic; font-size: .95rem; color: var(--gilt); }
.aga-lair__boss { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.1; color: var(--bone); }
.aga-lair__hp { display: block; height: 5px; background: rgba(125, 15, 34, .35); border: 1px solid rgba(213, 169, 90, .35); }
.aga-lair__hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--ichor-deep), var(--ichor)); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease-out) .15s; }
.aga-nav__item:hover .aga-lair__hp i, .aga-nav__item:focus-within .aga-lair__hp i { transform: scaleX(1); }
.aga-nav__item[data-tier="final"] .aga-lair__hp { height: 8px; }
.aga-lair__blurb { font-size: .92rem; line-height: 1.45; color: var(--ash); }

/* Right cluster */
.aga-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

.aga-adv {
	display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px;
	background: transparent; border: 1px solid rgba(213, 169, 90, .28); border-radius: 999px;
	color: var(--bone); font: 500 .88rem/1 var(--f-ui); letter-spacing: .02em; cursor: pointer;
	transition: border-color .3s, color .3s, background .3s;
}
.aga-adv__icon { width: 17px; height: 17px; color: var(--gilt); transition: transform .5s var(--ease-out); }
.aga-adv:hover { border-color: var(--gilt); background: rgba(213, 169, 90, .08); }
.aga-adv:hover .aga-adv__icon { transform: rotate(90deg); }
.aga-adv[aria-pressed="false"] { color: var(--ash); border-style: dashed; }
.aga-adv[aria-pressed="false"] .aga-adv__icon { color: var(--ash); opacity: .6; }

/* Submit CTA — a forged seal */
.aga-cta {
	--notch: 9px;
	position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 10px;
	height: 44px; padding: 0 20px 0 8px;
	text-decoration: none !important; color: var(--gilt-hi) !important;
	font: 700 .95rem/1 var(--f-ui); letter-spacing: .03em; white-space: nowrap;
	background: linear-gradient(180deg, var(--gilt-hi), var(--gilt) 50%, var(--gilt-lo));
	clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, var(--notch) 100%, 0 50%);
	transition: color .3s, transform .3s var(--ease-out);
}
.aga-cta::before { /* gilt edge drawn inside the clip */
	content: ""; position: absolute; inset: 1px; z-index: -1;
	clip-path: inherit; background: linear-gradient(180deg, #4a1220, #22070e);
}
.aga-cta::after { /* ember sweep */
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(100deg, transparent 30%, rgba(255, 122, 61, .55) 50%, transparent 70%);
	transform: translateX(-120%); transition: transform .9s var(--ease-out);
}
.aga-cta:hover { color: #fff !important; transform: translateY(-1px); }
.aga-cta:hover::after { transform: translateX(120%); }
.aga-cta__seal {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #ff5a5a, #a0141f 55%, #4a060c);
	box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 0 12px rgba(227, 38, 63, .5);
	color: var(--gilt-hi);
}
.aga-cta__icon { width: 16px; height: 16px; }
.aga-cta--block { display: flex; justify-content: center; height: 52px; margin-top: 28px; }

.aga-burger { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid rgba(213, 169, 90, .3); border-radius: 50%; cursor: pointer; }
.aga-burger__lines { display: grid; gap: 5px; width: 18px; margin: 0 auto; }
.aga-burger__lines i { display: block; height: 1.5px; background: var(--gilt-hi); transition: transform .4s var(--ease-out), opacity .3s; }
.aga-burger[aria-expanded="true"] .aga-burger__lines i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.aga-burger[aria-expanded="true"] .aga-burger__lines i:nth-child(2) { opacity: 0; }
.aga-burger[aria-expanded="true"] .aga-burger__lines i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Account (2.16): "Sign in" for visitors, a small menu for members. It follows the Adventure
   toggle's grammar: a dashed ring while nobody is signed in, a solid one once someone is. */
.aga-acct { position: relative; flex: none; }
a.aga-acct, .aga-acct__btn {
	height: 38px; background: transparent; border: 1px dashed rgba(213, 169, 90, .46); border-radius: 999px;
	color: var(--bone) !important; text-decoration: none !important;
	font: 500 .88rem/1 var(--f-ui); letter-spacing: .02em; white-space: nowrap; cursor: pointer;
	transition: border-color .3s, color .3s, background .3s;
}
a.aga-acct, .aga-acct__in { display: inline-flex; align-items: center; gap: 7px; padding: 0 13px 0 10px; }
/* the member's button is a <summary>: the flex row lives on a span inside it, because a <summary>
   is not a dependable flex container in every Safari still in use */
.aga-acct__btn { display: block; border-style: solid; border-color: rgba(213, 169, 90, .28); list-style: none; }
.aga-acct__btn::-webkit-details-marker { display: none; }
.aga-acct__in { display: flex; height: 100%; }
.aga-acct__icon { flex: none; width: 19px; height: 19px; color: var(--gilt); transition: color .3s; }
.aga-acct__text { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; }
a.aga-acct:hover, a.aga-acct:focus-visible, .aga-acct__btn:hover, .aga-acct[open] > .aga-acct__btn {
	border-style: solid; border-color: var(--gilt); background: rgba(213, 169, 90, .08); color: #fff !important;
}
a.aga-acct:hover .aga-acct__icon, .aga-acct__btn:hover .aga-acct__icon, .aga-acct[open] .aga-acct__icon { color: var(--gilt-hi); }
body.aga a.aga-acct:focus-visible, body.aga .aga-acct__btn:focus-visible { border-radius: 999px; } /* keep the ring round under the site-wide focus outline */

.aga-acct__menu {
	position: absolute; top: calc(100% + 12px); right: 0; z-index: 6; width: max-content; min-width: 212px; max-width: min(300px, 86vw);
	display: grid; gap: 2px; padding: 14px 8px 8px;
	background: linear-gradient(180deg, rgba(24, 16, 33, .97), rgba(10, 7, 15, .98));
	border: 1px solid rgba(213, 169, 90, .38);
	clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.aga-acct[open] > .aga-acct__menu { animation: aga-acct-in .28s var(--ease-out); }
@keyframes aga-acct-in { from { opacity: 0; transform: translateY(-6px); } }
.aga-acct__who { margin: 0 0 4px; padding: 0 10px 10px; border-bottom: 1px solid rgba(213, 169, 90, .2); font-family: var(--f-display); font-size: 1.2rem; line-height: 1.15; color: var(--bone); overflow-wrap: anywhere; }
.aga-acct__menu a { display: block; padding: 9px 10px; color: var(--bone) !important; text-decoration: none !important; font: 500 .95rem/1.25 var(--f-ui); transition: background .2s, color .2s; }
.aga-acct__menu a:hover, .aga-acct__menu a:focus-visible { background: rgba(213, 169, 90, .1); color: #fff !important; }

@media (max-width: 1399px) { .aga-header__actions .aga-acct__text { max-width: 8ch; } }
@media (max-width: 1339px) { /* the account label folds into its ring; the words stay for screen readers */
	.aga-header__actions .aga-acct__text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
	.aga-header__actions a.aga-acct, .aga-header__actions .aga-acct__btn { width: 38px; }
	.aga-header__actions a.aga-acct, .aga-header__actions .aga-acct__in { padding: 0; justify-content: center; }
}
@media (max-width: 1259px) { /* 1100px until 2.16: the account ring needs the room */
	.aga-adv__text { display: none; }
	.aga-adv { width: 38px; padding: 0; justify-content: center; }
}
@media (min-width: 1024px) and (max-width: 1100px) { /* five lairs and three controls on one line: close the gaps a little */
	.aga-header__inner { gap: 16px; }
	.aga-nav__list { gap: 2px; }
	.aga-nav__link { padding-left: 10px; padding-right: 10px; }
	.aga-nav__route { left: 10px; right: 10px; width: calc(100% - 20px); }
	.aga-header__actions .aga-cta { height: 40px; padding: 0 14px 0 6px; font-size: .88rem; }
}
@media (max-width: 1023px) {
	:root { --hdr: 62px; }
	.aga-nav { display: none; }
	.aga-burger { display: grid; place-items: center; }
	.aga-header__actions .aga-cta { height: 40px; padding: 0 14px 0 6px; font-size: .88rem; }
}
@media (max-width: 520px) {
	.aga-brand__word { font-size: 1.05rem; }
	.aga-header__actions > .aga-cta .aga-cta__text { display: none; }
	.aga-header__actions > .aga-cta { padding: 0 8px; }
}
@media (max-width: 599px) { .aga-header__actions > .aga-acct { display: none; } } /* no room on a phone: the grimoire carries it */

/* ---------- Grimoire (mobile menu) ---------- */
.aga-grimoire {
	position: fixed; inset: 0; z-index: 890; overflow-y: auto;
	padding: calc(var(--hdr) + 24px) 22px 40px;
	background: radial-gradient(120% 80% at 80% 0%, rgba(59, 31, 115, .45), transparent 60%), rgba(7, 5, 11, .97);
	clip-path: circle(0 at calc(100% - 40px) 30px);
	transition: clip-path .7s var(--ease-io);
}
.aga-grimoire.is-open { clip-path: circle(150% at calc(100% - 40px) 30px); }
.aga-grimoire[hidden] { display: block; visibility: hidden; }
.aga-grimoire.is-open[hidden], .aga-grimoire.is-open { visibility: visible; }
.aga-grimoire__page { max-width: 460px; margin: 0 auto; }
.aga-grimoire__title { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; color: var(--gilt); margin: 0 0 18px; }
.aga-grimoire__trail { position: relative; list-style: none; margin: 0; padding: 0; }
.aga-grimoire__trail::before { content: ""; position: absolute; left: 25px; top: 26px; bottom: 26px; border-left: 1.5px dashed rgba(213, 169, 90, .4); }
.aga-grimoire__trail li { opacity: 0; transform: translateX(-12px); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); }
.aga-grimoire.is-open .aga-grimoire__trail li { opacity: 1; transform: none; }
.aga-grimoire.is-open .aga-grimoire__trail li:nth-child(2) { transition-delay: .06s; }
.aga-grimoire.is-open .aga-grimoire__trail li:nth-child(3) { transition-delay: .12s; }
.aga-grimoire.is-open .aga-grimoire__trail li:nth-child(4) { transition-delay: .18s; }
.aga-grimoire.is-open .aga-grimoire__trail li:nth-child(5) { transition-delay: .24s; }
.aga-grimoire__trail a { position: relative; display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; align-items: center; padding: 12px 0; text-decoration: none !important; color: var(--bone) !important; }
.aga-grimoire__sigil { grid-row: span 2; width: 52px; height: 52px; padding: 13px; border-radius: 50%; background: var(--abyss); border: 1px solid rgba(213, 169, 90, .45); color: var(--gilt); }
.aga-grimoire__trail [data-tier="final"] .aga-grimoire__sigil { color: #ff5566; border-color: rgba(227, 38, 63, .6); box-shadow: 0 0 20px rgba(227, 38, 63, .35); }
.aga-grimoire__label { font-family: var(--f-display); font-size: 1.7rem; line-height: 1; }
.aga-grimoire__meta { font-size: .9rem; color: var(--ash); }
.aga-grimoire__trail a[aria-current] .aga-grimoire__sigil { background: var(--dusk); }
.aga-grimoire__acct { display: grid; gap: 12px; justify-items: center; margin-top: 14px; }
a.aga-acct--block { display: flex; justify-content: center; width: 100%; height: 48px; font-size: 1rem; }
.aga-acct--block .aga-acct__text { max-width: none; }
.aga-grimoire__join { font-size: .98rem; }
.aga-grimoire__who { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; max-width: 100%; font-family: var(--f-display); font-size: 1.35rem; line-height: 1.1; color: var(--bone); overflow-wrap: anywhere; }
.aga-grimoire__links { display: flex; gap: 10px; width: 100%; margin: 0; }
.aga-grimoire__links a { flex: 1 1 0; display: grid; place-items: center; min-height: 46px; padding: 6px 12px; border: 1px solid rgba(213, 169, 90, .28); border-radius: 999px; color: var(--bone) !important; text-align: center; text-decoration: none !important; font: 500 .98rem/1.2 var(--f-ui); }
body.aga-menu-open { overflow: hidden; }

/* ---------- Footer (2.19): the colophon, one index of the Atlas set like a gazetteer, the fine print ---------- */
.aga-footer { position: relative; overflow: hidden; padding: 64px clamp(20px, 4vw, 56px) 36px; background: radial-gradient(110% 70% at 88% 0%, rgba(154, 107, 255, .07), transparent 62%), linear-gradient(180deg, var(--void), #0c0812); }
.aga-footer::before { content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: var(--hairline); }
.aga-footer__rose { position: absolute; z-index: 0; right: -130px; top: -110px; width: 460px; height: 460px; color: var(--gilt); opacity: .055; pointer-events: none; }
.aga-footer__inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.aga-footer__top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; padding-bottom: 40px; }
.aga-footer__about p { margin: 14px 0 0; max-width: 34rem; color: var(--ash); font-size: .98rem; }
.aga-footer__realms ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; }
.aga-footer__realms a { display: inline-flex; align-items: center; gap: 10px; padding: 7px 0; color: var(--bone) !important; text-decoration: none !important; font: 600 1.06rem/1.2 var(--f-display); letter-spacing: .02em; }
.aga-footer__realms a:hover, .aga-footer__realms a:focus-visible { color: var(--gilt-hi) !important; }
.aga-footer__sigil { width: 18px; height: 18px; flex: none; color: var(--gilt); }

/* the index: each entry with its count, joined by a dotted leader, as in the back of an atlas */
.aga-gaz { padding: 34px 0 6px; border-top: 1px solid rgba(213, 169, 90, .2); }
.aga-footer .aga-gaz__title { margin: 0 0 24px; font: 600 clamp(1.5rem, 2.4vw, 1.9rem)/1.1 var(--f-display); letter-spacing: .02em; color: var(--bone); }
.aga-gaz__cols { columns: 4 220px; column-gap: 48px; }
.aga-gaz__group { break-inside: avoid; margin: 0 0 28px; }
.aga-footer .aga-gaz__h { margin: 0 0 8px; padding-bottom: 7px; border-bottom: 1px solid rgba(213, 169, 90, .3); font: 600 1.04rem/1.2 var(--f-display); letter-spacing: .03em; color: var(--gilt); }
.aga-gaz ul { list-style: none; margin: 0; padding: 0; }
.aga-gaz li a { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; color: var(--bone) !important; text-decoration: none !important; font-size: .93rem; line-height: 1.35; }
.aga-gaz li a span { min-width: 0; }
.aga-gaz li a i { flex: 1 1 auto; min-width: 14px; border-bottom: 1px dotted rgba(213, 169, 90, .34); transform: translateY(-4px); }
.aga-gaz li a b { flex: none; font: 500 .8rem/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--ash); }
.aga-gaz li a:hover span, .aga-gaz li a:focus-visible span { color: var(--gilt-hi); }
.aga-gaz li a:hover i, .aga-gaz li a:focus-visible i { border-bottom-color: rgba(246, 223, 164, .75); }
.aga-gaz li.is-key a span { color: var(--gilt-hi); font-weight: 700; }
.aga-gaz__group.is-atlas li a i { display: none; }

/* the fine print */
.aga-footer__base { display: grid; gap: 8px; margin-top: 14px; padding-top: 22px; border-top: 1px solid rgba(236, 227, 212, .08); }
.aga-footer__policies ul, .aga-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 22px; }
.aga-footer__legal { margin-top: 2px; }
.aga-footer__policies a, .aga-footer__legal a { display: inline-block; padding: 5px 0; font-size: .88rem; color: var(--ash) !important; text-decoration: none !important; border-bottom: 1px solid transparent; }
.aga-footer__policies a:hover, .aga-footer__policies a:focus-visible, .aga-footer__legal a:hover, .aga-footer__legal a:focus-visible { color: var(--gilt-hi) !important; border-bottom-color: rgba(213, 169, 90, .5); }
.aga-footer__note { margin: 6px 0 0; max-width: 54rem; font-size: .84rem; color: var(--ash); }
.aga-footer__copy { margin: 0; font-size: .84rem; color: rgba(169, 156, 179, .9); }
.aga-footer__copy em { font-family: var(--f-serif); font-size: 1rem; color: var(--ash); }
@media (max-width: 860px) { .aga-footer__top { grid-template-columns: 1fr; gap: 26px; padding-bottom: 32px; } }
@media (max-width: 560px) {
	.aga-footer { padding-top: 52px; }
	.aga-gaz__cols { columns: 2 140px; column-gap: 24px; }
	.aga-gaz li a { justify-content: space-between; font-size: .9rem; }
	.aga-gaz li a i { display: none; }
	.aga-footer__rose { width: 300px; height: 300px; right: -120px; top: -80px; }
}

/* ==========================================================================
   Adventure Mode HUD (activated by aga-core.js → body.aga-adv-on)
   ========================================================================== */
.aga-hud, .aga-cursor, .aga-dmg, .aga-edge, .aga-ghost { display: none; }
body.aga-adv-on .aga-hud { display: block; }
body.aga-adv-on.aga-fine .aga-cursor { display: block; }
body.aga-adv-on .aga-dmg, body.aga-adv-on .aga-edge { display: block; }

.aga-hud { position: fixed; inset: auto 0 0 0; z-index: 870; pointer-events: none; }
.aga-hud[hidden] { display: none !important; }

/* Player plate (2.18): the level in a medallion, health in an engraved vessel with its numbers,
   mana and stamina as a pair beneath, experience as the gilt rule under everything. An ink wash
   behind it keeps it legible over any page; on phones it becomes one band along the foot. */
:root {
	--aga-gut: clamp(12px, 2vw, 28px);
	--aga-hud-b: clamp(12px, 2vw, 26px);
	--aga-bars-w: clamp(210px, 17vw, 260px);
	--aga-hud-w: calc(var(--aga-bars-w) + 106px);   /* badge + bars + reading ring: the Adventure plugin puts its chests beside it */
	--aga-dock: calc(var(--aga-hud-b) + 72px);      /* what the HUD keeps at the foot of the screen; notes, cards and the ghost sit above */
	--aga-foe-b: calc(var(--aga-hud-b) + 186px);    /* monsters stand clear of the opened ability wheel (radius 118 + a button) */
}
.aga-player {
	position: fixed; left: var(--aga-gut); bottom: var(--aga-hud-b); display: flex; align-items: center; gap: 12px;
	pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.aga-player::before { content: ""; position: absolute; z-index: -1; left: -18px; right: -30px; top: -16px; bottom: -14px; border-radius: 34px; pointer-events: none; background: rgba(7, 5, 11, .88); filter: blur(14px); }   /* soft ink: the plate reads over any page */
.aga-player__badge {
	position: relative; display: grid; place-items: center; width: 52px; height: 52px; flex: none;
	font: 700 1.2rem/1 var(--f-display); color: var(--gilt-hi); font-variant-numeric: lining-nums;
	text-shadow: 0 1px 0 #000, 0 0 12px rgba(246, 223, 164, .35);
}
.aga-player__badge::before {
	content: ""; position: absolute; inset: 8px; transform: rotate(45deg);
	background: radial-gradient(circle at 50% 30%, #3d2a55, #170f22 62%, #0b0712);
	border: 1px solid var(--gilt);
	box-shadow: 0 0 0 3px rgba(7, 5, 11, .92), 0 0 0 4px rgba(213, 169, 90, .42), 0 8px 18px rgba(0, 0, 0, .6), inset 0 0 12px rgba(154, 107, 255, .28);
}
.aga-player__badge span { position: relative; }
.aga-player__bars { position: relative; display: grid; gap: 4px; width: var(--aga-bars-w); }
.aga-player__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.aga-player__name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 1rem/1.15 var(--f-display); letter-spacing: .03em; color: var(--bone); text-shadow: 0 1px 2px #000; }
.aga-player__hp { flex: none; font: 500 .78rem/1 var(--f-ui); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .02em; color: var(--ash); text-shadow: 0 1px 2px #000; }
.aga-player__hp b { font-weight: 700; color: var(--bone); transition: color .3s; }

/* the vessels: gilt between two black lines, glass over the fill */
.aga-bar {
	position: relative; display: block; box-sizing: border-box; height: 8px; overflow: hidden;
	background: linear-gradient(180deg, #030205, #130c1b);
	border: 1px solid rgba(213, 169, 90, .62);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .75), 0 4px 12px rgba(0, 0, 0, .5);
}
.aga-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 1)); }
.aga-bar::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7); background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 45%, rgba(0, 0, 0, .28)); }
.aga-player__vial { position: relative; display: block; }
.aga-player__vial::after { /* the badge's diamond, small, closes the vessel */
	content: ""; position: absolute; right: -6px; top: 50%; width: 8px; height: 8px; margin-top: -4px; transform: rotate(45deg);
	background: linear-gradient(135deg, var(--gilt-hi), var(--gilt) 50%, var(--gilt-lo)); box-shadow: 0 0 0 1px #000, 0 0 8px rgba(213, 169, 90, .45);
}
.aga-bar--hp { height: 12px; }
.aga-bar--hp::after { background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0, 0, 0, .42) calc(10% - 1px) 10%), linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .05) 45%, rgba(0, 0, 0, .3)); }
.aga-bar--hp .aga-bar__fill { background: linear-gradient(180deg, #ff8794 0%, #e8304a 34%, #a8122b 68%, #640716 100%); transition: transform .12s linear; }
.aga-bar--hp .aga-bar__lag { background: linear-gradient(180deg, #fff3d6, #f2c477 55%, #b9832f); transition: transform .8s var(--ease-io) .35s; }
.aga-bar--hp::before { /* the bright edge of what is left */
	content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; left: calc(var(--hp, 1) * 100% - 2px); width: 2px;
	background: #ffe2e6; box-shadow: 0 0 6px 1px rgba(255, 120, 135, .8); opacity: .85; transition: left .12s linear;
}
.aga-player__twin { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.aga-bar--fp, .aga-bar--st { height: 7px; }
.aga-bar--fp .aga-bar__fill { background: linear-gradient(180deg, #b6c3ff, #6268f2 45%, #2d2c95); transition: transform .12s linear; }
.aga-bar--st .aga-bar__fill { background: linear-gradient(180deg, #c4f2cf, #4fb176 45%, #1e5b39); transition: transform .1s linear; }
.aga-player .aga-bar--xp { width: auto; height: 4px; margin-top: 1px; border-color: rgba(213, 169, 90, .32); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.aga-player .aga-bar--xp::after { background: none; box-shadow: none; }
.aga-player .aga-bar--xp .aga-bar__fill { background: linear-gradient(90deg, #7a5520, #e9c87d 70%, #fff6dc); }
/* pieces the Adventure plugin adds: the guest's sign-in line under the rule, the reading ring at the end */
.aga-player__bars > .agar-guest { justify-self: start; margin-top: 1px; }
.aga-player > .agar-read { align-self: center; margin: 0 0 0 4px; }

/* what happened, at a glance: a blow flashes the vessel, a heal glows green-gold, low health pulses */
.aga-player.is-hurt { animation: aga-hurt .35s var(--ease-out); }
@keyframes aga-hurt { 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } }
.aga-player.is-hurt .aga-bar--hp .aga-bar__fill { animation: aga-hpflash .32s ease-out; }
@keyframes aga-hpflash { 0%, 30% { filter: brightness(2.3) saturate(.6); } }
.aga-player.is-low .aga-bar--hp { border-color: rgba(255, 106, 120, .9); animation: aga-low 1.15s ease-in-out infinite; }
@keyframes aga-low { 50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .75), 0 0 18px rgba(227, 38, 63, .85); } }
.aga-player.is-low .aga-player__hp b { color: #ff8a96; }
.aga-player.is-heal .aga-bar--hp { animation: aga-heal .8s var(--ease-out); }
@keyframes aga-heal { 25% { border-color: #c9f5d9; box-shadow: 0 0 0 1px rgba(0, 0, 0, .75), 0 0 16px rgba(113, 192, 143, .9); } }

/* Ability wheel */
.aga-wheel { position: fixed; right: var(--aga-gut); bottom: var(--aga-hud-b); width: 62px; height: 62px; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.aga-wheel__core, .aga-wheel__act {
	position: absolute; display: grid; place-items: center; padding: 0; cursor: pointer;
	border-radius: 50%; color: var(--gilt-hi);
	background: radial-gradient(circle at 50% 35%, #2e2140, #0c0812 70%);
	border: 1px solid rgba(213, 169, 90, .6);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .55), inset 0 0 12px rgba(154, 107, 255, .2);
}
.aga-wheel__core { inset: 0; box-shadow: 0 0 0 3px rgba(7, 5, 11, .9), 0 0 0 4px rgba(213, 169, 90, .3), 0 8px 22px rgba(0, 0, 0, .6), inset 0 0 14px rgba(154, 107, 255, .22); }
.aga-wheel__core svg { width: 30px; height: 30px; transition: transform .5s var(--ease-out); }
.aga-wheel__core[aria-expanded="true"] svg { transform: rotate(-20deg) scale(.92); }
.aga-wheel__act {
	--a: 0deg; --r: 0px;
	width: 46px; height: 46px; left: 8px; top: 8px;
	transform: rotate(var(--a)) translate(var(--r)) rotate(calc(var(--a) * -1)) scale(.4);
	opacity: 0; pointer-events: none;
	transition: transform .5s var(--ease-out), opacity .3s;
}
.aga-wheel__act svg { width: 22px; height: 22px; }
.aga-wheel__act b { position: absolute; right: -2px; top: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ichor-deep); border: 1px solid var(--gilt); font: 700 .7rem/16px var(--f-ui); color: #fff; text-align: center; }
.aga-wheel__act kbd { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 0 4px; font: 600 .62rem/14px var(--f-ui); color: var(--ash); background: #0c0812; border: 1px solid rgba(213, 169, 90, .35); border-radius: 3px; }
.aga-wheel__act[data-act="flask"] { --a: 180deg; }
.aga-wheel__act[data-act="guard"] { --a: 210deg; }
.aga-wheel__act[data-act="sound"] { --a: 240deg; }
.aga-wheel__act[data-act="adventure"] { --a: 270deg; }
.aga-wheel.is-open .aga-wheel__act { --r: 78px; opacity: 1; pointer-events: auto; transform: rotate(var(--a)) translate(var(--r)) rotate(calc(var(--a) * -1)) scale(1); }
.aga-wheel.is-open .aga-wheel__act[data-act="guard"] { transition-delay: .04s; }
.aga-wheel.is-open .aga-wheel__act[data-act="sound"] { transition-delay: .08s; }
.aga-wheel.is-open .aga-wheel__act[data-act="adventure"] { transition-delay: .12s; }
/* five abilities when the Adventure plugin adds Character: same spacing on a wider arc */
.aga-wheel:has([data-act="character"]) .aga-wheel__act[data-act="flask"] { --a: 180deg; }
.aga-wheel:has([data-act="character"]) .aga-wheel__act[data-act="guard"] { --a: 202.5deg; }
.aga-wheel:has([data-act="character"]) .aga-wheel__act[data-act="sound"] { --a: 225deg; }
.aga-wheel:has([data-act="character"]) .aga-wheel__act[data-act="adventure"] { --a: 270deg; }
.aga-wheel__act[data-act="character"] { --a: 247.5deg; }
.aga-wheel.is-open:has([data-act="character"]) .aga-wheel__act { --r: 118px; }   /* 46px buttons just touching */
.aga-wheel.is-open .aga-wheel__act[data-act="character"] { transition-delay: .1s; }
.aga-wheel__core svg.agar-wheel-weapon { width: 36px; height: 36px; }
.aga-wheel__act:hover { border-color: var(--gilt-hi); color: #fff; }
.aga-wheel__act.is-cooling { opacity: .45 !important; }
.aga-wheel__act[aria-pressed="true"] { box-shadow: 0 0 0 2px rgba(246, 223, 164, .5), 0 0 18px rgba(154, 107, 255, .5); }
.aga-wheel__act.is-prompt { animation: aga-prompt .5s ease-in-out infinite alternate; border-color: #fff; }
@keyframes aga-prompt { to { box-shadow: 0 0 0 4px rgba(227, 38, 63, .6), 0 0 26px rgba(227, 38, 63, .8); } }
body.aga-guarding .aga-wheel__act[data-act="guard"] { background: radial-gradient(circle, #6b4fd6, #1a1030 70%); }
@media (hover: none) { .aga-wheel__act kbd { display: none; } }

/* 2.18: a blow is coming (the guard button is prompted) and the wheel is closed: the core raises the guard.
   On a phone that is where the thumb already rests. The shield shows, "Guard" rises above it. */
.aga-wheel__ward { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0; transform: scale(.4); transition: opacity .12s, transform .3s var(--ease-out); pointer-events: none; }
.aga-wheel__core > svg:first-child { transition: transform .5s var(--ease-out), opacity .12s; }
.aga-wheel.is-danger:not(.is-open) .aga-wheel__core > svg:first-child, body.aga-guarding .aga-wheel:not(.is-open) .aga-wheel__core > svg:first-child { opacity: 0; transform: scale(.5); }
.aga-wheel.is-danger:not(.is-open) .aga-wheel__ward, body.aga-guarding .aga-wheel:not(.is-open) .aga-wheel__ward { opacity: 1; transform: none; }
.aga-wheel.is-danger:not(.is-open) .aga-wheel__core {
	color: #fff; border-color: #ffb3bb; background: radial-gradient(circle at 50% 35%, #6b1526, #1a0710 72%);
	box-shadow: 0 0 0 3px rgba(227, 38, 63, .45), 0 0 26px rgba(227, 38, 63, .8), inset 0 0 16px rgba(255, 90, 106, .45);
	animation: aga-core-danger .45s ease-in-out infinite alternate;
}
@keyframes aga-core-danger { to { box-shadow: 0 0 0 7px rgba(227, 38, 63, .18), 0 0 34px rgba(227, 38, 63, .95), inset 0 0 18px rgba(255, 90, 106, .6); } }
body.aga-guarding .aga-wheel:not(.is-open) .aga-wheel__core { color: #fff; border-color: #d9ceff; background: radial-gradient(circle, #6b4fd6, #1a1030 70%); box-shadow: 0 0 0 3px rgba(185, 168, 255, .5), 0 0 30px rgba(154, 107, 255, .85); animation: none; }
.aga-wheel.is-danger.is-guard-cool:not(.is-open) .aga-wheel__ward { opacity: .45; }
.aga-wheel::after {
	content: attr(data-ward); position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translate(-50%, 5px); opacity: 0; pointer-events: none; white-space: nowrap;
	padding: 3px 10px; font: 700 .74rem/1.2 var(--f-ui); letter-spacing: .04em; color: #fff; background: rgba(125, 15, 34, .94); border: 1px solid rgba(255, 179, 187, .7); border-radius: 99px;
	transition: opacity .12s, transform .25s var(--ease-out);
}
.aga-wheel.is-danger:not(.is-open):not(.is-guard-cool)::after { opacity: 1; transform: translate(-50%, 0); }
body.aga-guarding .aga-wheel::after { opacity: 0; }

/* Weapon cursor */
html.aga-fist, html.aga-fist body, html.aga-fist body * { cursor: none !important; }
.aga-cursor {
	position: fixed; left: 0; top: 0; z-index: 2147483000; width: 54px; height: 54px; pointer-events: none;
	transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0);
	will-change: transform;
}
.aga-cursor svg { width: 100%; height: 100%; margin: -16px 0 0 -18px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); transition: transform .12s var(--ease-out), opacity .15s; transform-origin: 30% 30%; }
.aga-cursor.is-civil svg { opacity: 0; transform: scale(.6); }
.aga-cursor.is-punch svg { animation: aga-punch .22s var(--ease-out); }
.aga-cursor.is-hot svg { filter: drop-shadow(0 0 8px rgba(255, 85, 102, .9)) drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
@keyframes aga-punch { 0% { transform: scale(1); } 35% { transform: translate(-7px, -7px) scale(.82) rotate(-8deg); } 100% { transform: none; } }
body.aga-ghosted .aga-cursor svg { opacity: .9; animation: aga-ghostbob 2.4s ease-in-out infinite; }
@keyframes aga-ghostbob { 50% { transform: translateY(-4px); } }

/* Floating numbers */
.aga-dmg { position: fixed; inset: 0; z-index: 880; pointer-events: none; overflow: hidden; }
.aga-num {
	position: absolute; left: 0; top: 0; white-space: nowrap;
	font: 700 1.5rem/1 var(--f-display); color: var(--bone);
	text-shadow: 0 0 1px #000, 0 2px 8px rgba(0, 0, 0, .9);
	animation: aga-num 1s var(--ease-out) forwards;
}
.aga-num--crit { font-size: 2.4rem; color: var(--gilt-hi); text-shadow: 0 0 14px rgba(255, 180, 80, .8), 0 2px 8px #000; }
.aga-num--crit small { display: block; font: italic 500 .9rem/1 var(--f-serif); letter-spacing: .08em; color: #ffcf7a; }
.aga-num--ward { color: #cbb8ff; font-size: 1.25rem; }
.aga-num--hurt { color: #ff5a6a; font-size: 1.7rem; }
.aga-num--heal { color: #9ff0b6; }
.aga-num--miss { color: var(--ash); font: italic 500 1.2rem/1 var(--f-serif); }
@keyframes aga-num {
	0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.4); }
	15% { opacity: 1; transform: translate(var(--x), calc(var(--y) - 14px)) scale(1.18); }
	30% { transform: translate(calc(var(--x) + var(--dx) * .3), calc(var(--y) - 28px)) scale(1); }
	100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) - 70px)) scale(.9); }
}

/* Danger edge (telegraphs on touch devices, damage feedback) */
.aga-edge { position: fixed; inset: 0; z-index: 860; pointer-events: none; opacity: 0; box-shadow: inset 0 0 0 2px rgba(227, 38, 63, .7), inset 0 0 120px 30px rgba(227, 38, 63, .55); transition: opacity .25s; }
.aga-edge.is-on { opacity: 1; animation: aga-edge .45s ease-in-out infinite alternate; }
.aga-edge.is-hit { opacity: 1; transition: none; }
@keyframes aga-edge { to { opacity: .45; } }

/* Toast */
.aga-toast {
	position: fixed; left: 50%; top: calc(var(--hdr) + 14px); z-index: 910; pointer-events: none;
	min-width: 240px; max-width: min(92vw, 520px); padding: 12px 22px;
	transform: translate(-50%, -12px); opacity: 0;
	background: linear-gradient(180deg, rgba(30, 20, 40, .96), rgba(12, 8, 18, .96));
	border: 1px solid rgba(213, 169, 90, .5); text-align: center;
	font: 500 1rem/1.35 var(--f-ui); color: var(--bone);
	transition: opacity .4s var(--ease-out), transform .5s var(--ease-out);
}
.aga-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.aga-toast strong { display: block; font: 600 1.2rem/1.2 var(--f-display); color: var(--gilt-hi); }
.aga-toast:empty { display: none; }

/* Ghost state */
body.aga-adv-on.aga-ghosted .aga-ghost { display: block; }
body.aga-ghosted .aga-player { opacity: .42; filter: grayscale(1) brightness(.85); }
.aga-ghost {
	position: fixed; left: var(--aga-gut); bottom: calc(var(--aga-dock) + 10px); z-index: 871; width: min(300px, calc(100vw - 2 * var(--aga-gut)));
	padding: 14px 18px; background: rgba(14, 10, 24, .92); border: 1px solid rgba(185, 168, 255, .45);
	box-shadow: 0 0 40px rgba(123, 92, 255, .25);
}
.aga-ghost[hidden] { display: none !important; }
.aga-ghost p { margin: 0; }
.aga-ghost__title { font: 600 1.35rem/1.1 var(--f-display); color: #d9ceff; }
.aga-ghost__time { margin-top: 4px !important; color: var(--bone); }
.aga-ghost__time b { font-variant-numeric: tabular-nums; color: #fff; }
.aga-ghost__note { margin-top: 6px !important; font-size: .85rem; color: var(--ash); }

/* 2.18 — phones: one band of ink along the foot of the screen holds the plate and the wheel; the bars
   take the width between them; the footer keeps room so its last line never sits under the HUD. */
body.aga-adv-on .aga-footer { padding-bottom: calc(36px + var(--aga-dock)); }
@media (max-width: 767px) {
	:root {
		--aga-hud-b: calc(10px + env(safe-area-inset-bottom, 0px));
		--aga-bars-w: min(300px, calc(100vw - 2 * var(--aga-gut) - 130px));   /* badge 44 + 10, wheel 62 + 14 */
		--aga-dock: calc(var(--aga-hud-b) + 70px);
	}
	.aga-hud::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--aga-dock) + 40px); pointer-events: none; background: linear-gradient(0deg, rgba(7, 5, 11, .98), rgba(7, 5, 11, .95) 64%, rgba(7, 5, 11, 0)); }
	.aga-player { gap: 10px; }
	.aga-player::before { display: none; }
	.aga-player__badge { width: 44px; height: 44px; font-size: 1.05rem; }
	.aga-player__badge::before { inset: 7px; }
	.aga-player__bars { gap: 3px; }
	.aga-player__name { font-size: .92rem; }
	.aga-player__hp { font-size: .74rem; }
	.aga-bar--hp { height: 11px; }
	.aga-bar--fp, .aga-bar--st { height: 6px; }
	.aga-player > .agar-read { position: absolute; left: 26px; top: -15px; margin: 0; transform: scale(.8); }
}
@media (max-height: 520px) and (orientation: landscape) {
	:root { --aga-foe-b: calc(var(--aga-hud-b) + 84px); }   /* short screens: monsters stand above the closed wheel */
}
@media (forced-colors: active) {
	.aga-bar { border-color: CanvasText; }
	.aga-bar .aga-bar__fill { forced-color-adjust: none; background: Highlight; }
	.aga-bar::after, .aga-bar--hp::before { display: none; }
}

/* Reading mode: nothing game-like remains */
body.aga-adv-off .aga-hud, body.aga-adv-off .aga-cursor, body.aga-adv-off .aga-dmg, body.aga-adv-off .aga-edge, body.aga-adv-off .aga-ghost { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Page transitions: cross-document view transitions (Chrome/Edge/Safari 18+).
   The old page sinks into ink while the new one surfaces through the map. ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: aga-vt-out .42s cubic-bezier(.65, 0, .35, 1) both; }
::view-transition-new(root) { animation: aga-vt-in .62s cubic-bezier(.16, 1, .3, 1) both; }
.aga-header { view-transition-name: aga-header; }
::view-transition-group(aga-header) { animation-duration: 0s; }
@keyframes aga-vt-out { to { opacity: 0; filter: blur(6px) brightness(.4) sepia(.6); transform: scale(.985); } }
@keyframes aga-vt-in { from { opacity: 0; clip-path: circle(0% at 50% 40%); filter: brightness(1.6) sepia(.4); } to { clip-path: circle(150% at 50% 40%); } }
@keyframes aga-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* ==================== Hubs (2.11): category intros, board pages, hub pages, footer index ==================== */
.aga-intro{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px 32px;align-items:start;margin-top:28px;margin-bottom:8px;color:var(--bone,#ece3d4)}
.aga-intro__def{margin:0 0 .6rem;font-size:1.08rem;color:#d3c9da}
.aga-intro__stat{margin:0;color:var(--ash,#a99cb3)}
.aga-intro__answer{border:1px solid rgba(213,169,90,.3);border-radius:16px;padding:18px 20px;background:rgba(18,13,23,.7)}
.aga-intro__q{margin:0 0 .4rem;font-family:var(--f-display);font-size:1.45rem;line-height:1.15;color:var(--bone,#ece3d4)}
.aga-intro__answer>p{margin:0 0 .6rem;color:#cfc5d6}
.aga-intro__top{margin:0;padding-left:1.3rem}
.aga-intro__top a{color:var(--gilt-hi,#f6dfa4);font-weight:700}
.aga-intro__related{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.aga-intro__label{font-size:.82rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gilt,#d5a95a);margin-right:4px}
.aga-intro__chip{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;border:1px solid rgba(236,227,212,.2);color:var(--bone,#ece3d4);text-decoration:none}
.aga-intro__chip:hover,.aga-intro__chip:focus-visible{border-color:var(--gilt,#d5a95a);color:var(--gilt-hi,#f6dfa4)}

.aga-crumbs{font-size:.88rem;color:var(--ash,#a99cb3);margin:24px 0 8px}
.aga-crumbs a{color:var(--gilt-hi,#f6dfa4)}
.aga-bp__meta{color:var(--ash,#a99cb3);margin:0 0 16px}
.aga-bp__meta a{color:var(--gilt-hi,#f6dfa4)}
.aga-bp__list{list-style:none;margin:0 0 40px;padding:0;border-top:1px solid rgba(236,227,212,.08)}
.aga-bp__row{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 10px;border-bottom:1px solid rgba(236,227,212,.08)}
.aga-bp__rank{font-family:var(--f-display);font-weight:700;font-size:1.6rem;color:var(--gilt,#d5a95a);text-align:center}
.aga-bp__row:nth-child(-n+3) .aga-bp__rank{color:var(--gilt-hi,#f6dfa4);font-size:1.9rem}
.aga-bp__game{min-width:0;display:flex;flex-direction:column;gap:3px}
.aga-bp__game a{color:var(--bone,#ece3d4);font-weight:800;font-size:1.05rem;text-decoration:none}
.aga-bp__tags{font-size:.85rem;color:var(--ash,#a99cb3)}
.aga-bp__value{color:#f0d79b;font-size:.92rem;white-space:nowrap}
.aga-bp__others ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.aga-bp__others li{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid rgba(236,227,212,.14);border-radius:14px}
.aga-bp__others a{color:var(--gilt-hi,#f6dfa4);font-weight:800}
.aga-bp__others span{font-size:.88rem;color:var(--ash,#a99cb3)}
.aga-board__full{font-size:.88rem;font-weight:700;color:var(--gilt-hi,#f6dfa4)}

.aga-hub{padding-top:clamp(40px,7vw,80px);padding-bottom:clamp(48px,8vw,96px);color:var(--bone,#ece3d4);max-width:960px}
.aga-hub__head{margin-bottom:28px}
.aga-hub__title{font-family:var(--f-display);font-size:clamp(2.2rem,5vw,3.6rem);line-height:1.05;margin:.5rem 0 .8rem}
.aga-hub__lede{font-size:1.15rem;line-height:1.6;color:#d3c9da;margin:0 0 .6rem;max-width:46rem}
.aga-hub__meta,.aga-hub__small{font-size:.9rem;color:var(--ash,#a99cb3)}
.aga-hub__meta a,.aga-hub a{color:var(--gilt-hi,#f6dfa4)}
.aga-hub__toc ul{list-style:none;margin:0 0 32px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.aga-hub__toc a{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;border:1px solid rgba(236,227,212,.18);text-decoration:none}
.aga-hub__dl dt{font-weight:800;margin-top:14px}
.aga-hub__dl dd{margin:4px 0 0;color:#cfc5d6}
.aga-hub .aga-prose h2,.aga-stat .aga-h2{font-family:var(--f-display);font-size:1.7rem;margin:2.2rem 0 .7rem}
.aga-hub .aga-prose p,.aga-hub .aga-prose li{color:#d3c9da;line-height:1.65}
.aga-stat__scroll{overflow-x:auto}
.aga-stat__table{width:100%;border-collapse:collapse;font-size:.98rem}
.aga-stat__table th,.aga-stat__table td{padding:10px 12px;border-bottom:1px solid rgba(236,227,212,.1);text-align:left;vertical-align:middle}
.aga-stat__table thead th{font-size:.8rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ash,#a99cb3);font-weight:700}
.aga-stat__table tbody th{font-weight:700}
.aga-stat__table td:nth-child(2){font-variant-numeric:tabular-nums;color:#f0d79b;white-space:nowrap}
.aga-stat__table td:last-child{width:45%}
.aga-stat__bar{position:relative;display:block;min-width:120px;height:28px;border-radius:8px;background:rgba(236,227,212,.06);overflow:hidden}
.aga-stat__bar::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--w,0%);background:linear-gradient(90deg,rgba(213,169,90,.5),rgba(213,169,90,.22));border-radius:8px}
.aga-stat__bar span{position:relative;display:flex;align-items:center;height:100%;padding:0 10px;font-size:.85rem;font-variant-numeric:tabular-nums}
.aga-opendata__links{display:flex;flex-wrap:wrap;gap:10px}
.aga-cite__text{padding:14px 16px;border-left:3px solid var(--gilt,#d5a95a);background:rgba(213,169,90,.07);border-radius:0 10px 10px 0}

/* 2.19: the footer index is .aga-gaz (above) */
.aga-db__quick { margin: -6px 0 18px; color: var(--ash); }
.aga-db__quick a { font-weight: 700; }
