/* ══════════════════════════════════
   AQUA GUILDS v2 — Premium Dark Theme
   ══════════════════════════════════ */

.ag-guild-list, .ag-leaderboard {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
	color: #fff;
}

/* ── Buttons ── */
.ag-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
	cursor: pointer; border: 1px solid rgba(255,255,255,0.1);
	background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
	text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.ag-btn:hover { border-color: rgba(255,255,255,0.2); color: #fff; }
.ag-btn--join { background: var(--ag-color, #005F99); border-color: transparent; color: #fff; }
.ag-btn--join:hover { filter: brightness(1.15); }
.ag-btn--leave { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.3); color: #e74c3c; }
.ag-btn--leave:hover { background: rgba(231,76,60,0.25); }
.ag-btn--member {
	background: color-mix(in srgb, var(--ag-color, #27ae60) 15%, transparent);
	border-color: color-mix(in srgb, var(--ag-color, #27ae60) 30%, transparent);
	color: var(--ag-color, #27ae60); cursor: default;
}
.ag-btn--disabled { opacity: 0.4; cursor: not-allowed; }
.ag-btn--login { color: #48CAE4; }

/* ── Header ── */
.ag-guild-list__header, .ag-leaderboard__header { text-align: center; margin-bottom: 28px; }
.ag-guild-list__title, .ag-leaderboard__title { font-size: 28px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.ag-guild-list__sub, .ag-leaderboard__sub { color: rgba(255,255,255,0.4); font-size: 14px; margin: 0; }

/* ── My guild banner ── */
.ag-my-guild-banner {
	display: flex; align-items: center; gap: 12px;
	background: color-mix(in srgb, var(--ag-color, #48CAE4) 8%, transparent);
	border: 1px solid color-mix(in srgb, var(--ag-color, #48CAE4) 25%, transparent);
	border-radius: 12px; padding: 14px 18px; margin-bottom: 24px;
}
.ag-my-guild-banner__icon { font-size: 28px; }
.ag-my-guild-banner__info { flex: 1; }
.ag-my-guild-banner__text { color: rgba(255,255,255,0.8); font-size: 14px; display: block; }
.ag-aura-hl { color: var(--ag-color, #48CAE4); }

/* Daily aura stats */
.ag-daily-stats {
	display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.ag-daily-stat {
	font-size: 11px; color: rgba(255,255,255,0.45);
	background: rgba(255,255,255,0.04); border-radius: 4px; padding: 2px 8px;
}
.ag-daily-stat--total { color: var(--ag-color, #48CAE4); font-weight: 600; }

/* Cooldown banner */
.ag-cooldown-banner {
	background: rgba(230,126,34,0.1); border: 1px solid rgba(230,126,34,0.25);
	border-radius: 10px; padding: 14px 18px; margin-bottom: 24px;
	color: rgba(255,255,255,0.7); font-size: 14px; text-align: center;
}
.ag-cooldown-banner strong { color: #e67e22; }

/* ══════════════════════════════════
   GUILD CARDS
   ══════════════════════════════════ */
.ag-guild-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.ag-guild-card {
	background: rgba(255,255,255,0.025);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 16px; padding: 24px 20px; text-align: center;
	position: relative; transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
}
.ag-guild-card:hover {
	border-color: color-mix(in srgb, var(--ag-color, #48CAE4) 40%, transparent);
	transform: translateY(-3px);
	box-shadow: 0 8px 32px color-mix(in srgb, var(--ag-color, #48CAE4) 10%, transparent);
}
.ag-guild-card--mine {
	border-color: color-mix(in srgb, var(--ag-color, #48CAE4) 35%, transparent);
	background: color-mix(in srgb, var(--ag-color, #48CAE4) 5%, transparent);
}
.ag-guild-card__rank {
	position: absolute; top: 12px; right: 14px;
	font-size: 12px; color: rgba(255,255,255,0.2); font-weight: 700;
}
.ag-guild-card__icon { font-size: 52px; margin-bottom: 10px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.ag-guild-card__name { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.ag-guild-card__desc {
	font-size: 12px; color: rgba(255,255,255,0.35); margin: 0 0 16px;
	line-height: 1.6; min-height: 40px;
}
.ag-guild-card__stats { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.ag-guild-card__stat { text-align: center; }
.ag-guild-card__stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--ag-color, #48CAE4); }
.ag-guild-card__stat-label {
	display: block; font-size: 9px; color: rgba(255,255,255,0.3);
	text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px;
}
.ag-guild-card__actions { margin-top: 8px; }
.ag-guild-card__actions .ag-btn { width: 100%; }
.ag-guild-card__my-aura { font-size: 11px; color: rgba(255,255,255,0.35); text-align: center; margin-top: 8px; }
.ag-guild-card__my-aura strong { color: var(--ag-color, #48CAE4); }

/* Toggle button */
.ag-guild-card__toggle {
	background: none; border: none; color: var(--ag-color, #48CAE4);
	font-size: 12px; font-weight: 600; cursor: pointer;
	padding: 10px 0 0; width: 100%; text-align: center; transition: color 0.2s;
}
.ag-guild-card__toggle:hover { color: #fff; }

/* Members panel */
.ag-guild-card__members {
	margin-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; text-align: left;
}
.ag-no-members { color: rgba(255,255,255,0.25); font-size: 12px; text-align: center; margin: 0; }

/* Mini member list (shared) */
.ag-mini-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.ag-mini-list::-webkit-scrollbar { width: 4px; }
.ag-mini-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.ag-mini-list::-webkit-scrollbar-track { background: transparent; }

.ag-mini-member {
	display: flex; align-items: center; gap: 8px; padding: 6px 8px;
	border-radius: 6px; text-decoration: none; transition: background 0.15s;
}
.ag-mini-member:hover { background: rgba(255,255,255,0.04); }
.ag-mini-member--top { background: rgba(244,208,63,0.06); }
.ag-mini-member__rank {
	font-size: 11px; color: rgba(255,255,255,0.25); min-width: 20px; text-align: center;
}
.ag-mini-member--top .ag-mini-member__rank { font-size: 14px; }
.ag-mini-member__avatar { border-radius: 50%; flex-shrink: 0; }
.ag-mini-member__name {
	flex: 1; font-size: 12px; color: rgba(255,255,255,0.8);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ag-mini-member--top .ag-mini-member__name { color: #fff; font-weight: 600; }
.ag-mini-member__aura { font-size: 11px; color: var(--ag-color, #48CAE4); font-weight: 600; flex-shrink: 0; }

/* Activity feed */
.ag-activity { margin-top: 10px; border-top: 1px solid rgba(255,255,255,0.04); padding-top: 8px; }
.ag-activity__label {
	display: block; font-size: 9px; color: rgba(255,255,255,0.25);
	text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px;
}
.ag-activity__item {
	display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 11px;
}
.ag-activity__avatar { border-radius: 50%; flex-shrink: 0; }
.ag-activity__text { flex: 1; color: rgba(255,255,255,0.5); }
.ag-activity__text strong { color: rgba(255,255,255,0.7); }
.ag-activity__time { color: rgba(255,255,255,0.2); font-size: 10px; flex-shrink: 0; }

/* ══════════════════════════════════
   LEADERBOARD
   ══════════════════════════════════ */
.ag-podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-bottom: 32px; }
.ag-podium__item {
	background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06);
	border-radius: 16px; padding: 20px 16px; text-align: center; width: 200px;
	transition: transform 0.2s, box-shadow 0.3s;
}
.ag-podium__item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--ag-color, #48CAE4) 15%, transparent);
}
.ag-podium__item--gold {
	border-color: rgba(244,208,63,0.3); background: rgba(244,208,63,0.05); padding: 28px 16px;
}
.ag-podium__item--silver { border-color: rgba(189,195,199,0.3); background: rgba(189,195,199,0.03); }
.ag-podium__item--bronze { border-color: rgba(205,127,50,0.3); background: rgba(205,127,50,0.03); }
.ag-podium__place { font-size: 28px; margin-bottom: 6px; }
.ag-podium__icon { font-size: 44px; margin-bottom: 6px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.ag-podium__name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.ag-podium__aura { font-size: 20px; font-weight: 700; color: var(--ag-color, #48CAE4); }
.ag-podium__members { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 4px; }

/* Leaderboard rows */
.ag-leaderboard__list { display: flex; flex-direction: column; }
.ag-leaderboard__item { border-bottom: 1px solid rgba(255,255,255,0.04); }
.ag-leaderboard__row {
	display: flex; align-items: center; gap: 14px; padding: 14px 16px;
	border-radius: 8px; text-decoration: none; transition: background 0.15s;
}
.ag-leaderboard__row:hover { background: rgba(255,255,255,0.03); }
.ag-leaderboard__rank { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.25); min-width: 28px; text-align: center; }
.ag-leaderboard__icon { font-size: 28px; }
.ag-leaderboard__name { flex: 1; color: #fff; font-size: 15px; font-weight: 600; }
.ag-leaderboard__members { font-size: 12px; color: rgba(255,255,255,0.3); }
.ag-leaderboard__aura {
	font-size: 13px; font-weight: 700; padding: 4px 14px; border-radius: 20px;
}
.ag-leaderboard__chevron {
	font-size: 12px; color: rgba(255,255,255,0.25); transition: transform 0.2s;
}
.ag-leaderboard__row.is-open .ag-leaderboard__chevron { transform: rotate(180deg); }
.ag-leaderboard__member-panel {
	padding: 6px 16px 14px 56px; background: rgba(255,255,255,0.015);
}

/* ── Toast ── */
.ag-toast {
	position: fixed; bottom: 24px; left: 50%;
	transform: translateX(-50%) translateY(100px);
	background: #1a1a2e; border: 1px solid rgba(72,202,228,0.3);
	border-radius: 10px; padding: 14px 24px; color: #fff;
	font-size: 14px; font-weight: 500; z-index: 99999; opacity: 0;
	transition: all 0.3s ease; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.ag-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.ag-toast--error { border-color: rgba(231,76,60,0.3); }

/* ── Confirm modal ── */
.ag-confirm-overlay {
	position: fixed; top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.7); z-index: 99998;
	display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ag-confirm-modal {
	background: #1a1a2e; border: 1px solid rgba(255,255,255,0.1);
	border-radius: 14px; padding: 28px; text-align: center;
	max-width: 360px; width: 100%;
}
.ag-confirm-modal__text { color: rgba(255,255,255,0.8); font-size: 16px; margin: 0 0 20px; line-height: 1.5; }
.ag-confirm-modal__text strong { color: #fff; }
.ag-confirm-modal__btns { display: flex; gap: 10px; }
.ag-confirm-modal__btns .ag-btn { flex: 1; justify-content: center; }

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 767px) {
	.ag-guild-grid { grid-template-columns: 1fr; gap: 12px; }
	.ag-podium { flex-direction: column; align-items: center; }
	.ag-podium__item { width: 100%; max-width: 300px; }
	.ag-guild-list__title, .ag-leaderboard__title { font-size: 22px; }
	.ag-my-guild-banner { flex-direction: column; text-align: center; gap: 8px; }
	.ag-leaderboard__row { gap: 8px; padding: 12px 10px; }
	.ag-leaderboard__member-panel { padding-left: 16px; }
}
@media (min-width: 768px) and (max-width: 992px) {
	.ag-guild-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Fallbacks for color-mix */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
	.ag-guild-card:hover { border-color: rgba(72,202,228,0.3); }
	.ag-guild-card--mine { border-color: rgba(72,202,228,0.25); background: rgba(72,202,228,0.04); }
	.ag-my-guild-banner { background: rgba(72,202,228,0.08); border-color: rgba(72,202,228,0.2); }
	.ag-btn--member { background: rgba(39,174,96,0.15); border-color: rgba(39,174,96,0.25); color: #27ae60; }
	.ag-podium__item:hover { box-shadow: 0 8px 24px rgba(72,202,228,0.1); }
}

/* ==========================================================================
   Guild Hall v3 (agx) — mobile-first, same system as profile/leaderboard.
   Ink surfaces, aqua accent, gold for 1st / captain / champion.
   Each guild brings its own colour via --g.
   ========================================================================== */
.agx {
	--s1: #12151b; --s2: #181c24; --s3: #212631;
	--line: rgba(255,255,255,.06); --line2: rgba(255,255,255,.11); --hi: inset 0 1px 0 rgba(255,255,255,.045);
	--tx: #eef1f5; --tx2: #aab3c0; --mut: #737d8c; --acc: #48cae4; --ink: #03151b; --gold: #f0b94e; --gold-ink: #2a1b00; --bg: #0b0d11;
	--r1: 12px; --r2: 18px; --r3: 24px;
	--display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--out: cubic-bezier(.22,1,.36,1); --press: cubic-bezier(.3,0,.5,1);
	max-width: 1080px; margin: 0 auto 40px; color: var(--tx); font-size: 14px; line-height: 1.5;
}
.agx *, .agx *::before, .agx *::after { box-sizing: border-box; }
.agx a { text-decoration: none !important; -webkit-tap-highlight-color: transparent; }
.agx .mcpx-i { display: block; flex: 0 0 auto; }
.agx b { font-variant-numeric: tabular-nums; }
@keyframes agxRise { from { opacity: 0; transform: translate3d(0,12px,0); } }
@keyframes agxGrow { from { transform: scaleX(0); } }
.agx > * { animation: agxRise .7s var(--out) both; }
.agx > :nth-child(2) { animation-delay: .06s; } .agx > :nth-child(3) { animation-delay: .12s; }
.agx > :nth-child(4) { animation-delay: .18s; } .agx > :nth-child(n+5) { animation-delay: .24s; }

.agx-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--acc); }
.agx-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px rgba(72,202,228,.12); }
.agx-title { margin: 0 0 8px !important; font-family: var(--display) !important; font-size: 40px !important; line-height: .98 !important; font-weight: 700 !important; letter-spacing: -.04em !important; color: #fff !important; }
.agx-sub { margin: 0 !important; color: var(--tx2); font-size: 14.5px; line-height: 1.55; max-width: 52ch; text-wrap: pretty; }
.agx-label { font-size: 12px; font-weight: 600; color: var(--mut); }

/* Hero: open (no box), glow behind the title, countdown as a live readout */
.agx-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 18px; padding: 8px 4px 0; margin-bottom: 24px; }
.agx-hero::before { content: ""; position: absolute; z-index: -1; top: -40px; left: -20%; width: 120%; height: 240px; pointer-events: none; background: radial-gradient(50% 60% at 18% 40%, rgba(72,202,228,.14), transparent 70%); }
.agx-countdown { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 99px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--acc); white-space: nowrap; }
.agx-countdown > div { display: flex; align-items: baseline; gap: 8px; }
.agx-countdown small { font-size: 12.5px; color: var(--mut); }
.agx-countdown b { font: 700 16px/1 var(--display); color: #fff; letter-spacing: -.01em; }

/* Crest = guild emoji on a disc tinted with the guild colour */
.agx-crest {
	position: relative; width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 14px; font-size: 22px; line-height: 1;
	background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--g, var(--acc)) 30%, var(--s2)), color-mix(in srgb, var(--g, var(--acc)) 10%, var(--s2)));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g, var(--acc)) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.12);
}
.agx-crest--lg { width: 56px; height: 56px; flex-basis: 56px; font-size: 28px; border-radius: 18px; }
.agx-crest--xl { width: 76px; height: 76px; flex-basis: 76px; font-size: 38px; border-radius: 22px; }

/* Buttons */
.agx-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 20px; border-radius: 99px; border: 0;
	background: var(--acc); color: var(--ink) !important; font-family: inherit; font-weight: 650; font-size: 14px; line-height: 1; white-space: nowrap; cursor: pointer;
	transition: transform .18s var(--press), background-color .2s var(--out); -webkit-tap-highlight-color: transparent;
}
.agx-btn:hover { background: #6dd5ea; }
.agx-btn:active { transform: scale(.96); }
.agx-btn:focus-visible, .agx a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.agx-btn--quiet { background: rgba(255,255,255,.07); color: var(--tx) !important; box-shadow: inset 0 0 0 1px var(--line2); }
.agx-btn--quiet:hover { background: rgba(255,255,255,.11); }
.agx-btn--off { background: transparent; color: var(--mut) !important; box-shadow: inset 0 0 0 1px var(--line2); cursor: default; }
.agx-btn--off:active { transform: none; }
.agx-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }
.agx-btn:disabled { opacity: .55; cursor: progress; }

/* Your guild */
.agx-mine {
	position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: "crest body" "stats stats" "act act";
	gap: 14px; padding: 16px; margin-bottom: 12px; border-radius: var(--r3);
	background: var(--s1); box-shadow: var(--hi), 0 0 0 1px color-mix(in srgb, var(--g) 30%, var(--line));
}
.agx-mine::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--g) 22%, transparent), transparent 70%); }
.agx-mine > .agx-crest { grid-area: crest; }
.agx-mine__body { grid-area: body; min-width: 0; display: contents; }
.agx-mine__body > .agx-label, .agx-mine__body > h3 { grid-area: body; }
.agx-mine__body > .agx-label { align-self: start; }
.agx-mine__body > h3 { align-self: end; margin: 0 !important; font-family: var(--display) !important; font-size: 22px !important; font-weight: 700 !important; letter-spacing: -.03em; line-height: 1.1 !important; }
.agx-mine__body > h3 a { color: #fff !important; }
.agx-mine__stats {
	grid-area: stats; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; margin: 2px 0 0;
	background: var(--line); border-radius: var(--r1); overflow: hidden;
}
.agx-mine__stats span { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 12px; background: color-mix(in srgb, var(--s2) 85%, transparent); min-width: 0; }
.agx-mine__stats span:nth-child(4) { grid-column: span 2; }
.agx-mine__stats small { font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-mine__stats b { font: 700 19px/1 var(--display); letter-spacing: -.02em; color: #fff; }
.agx-mine__stats span:nth-child(2) b { color: var(--acc); }
.agx-mine__actions { grid-area: act; display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.agx-note { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r2); background: var(--s1); box-shadow: var(--hi), 0 0 0 1px var(--line); color: var(--tx2); font-size: 14px; }
.agx-note .mcpx-i { color: var(--acc); }
.agx-note a { color: var(--acc) !important; font-weight: 650; }

/* Champion of last season — a slim ribbon */
.agx-champ {
	display: grid; grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "crest badge aura" "crest name aura";
	align-items: center; gap: 2px 12px; margin-bottom: 24px; padding: 12px 16px 12px 12px; border-radius: var(--r2);
	background: linear-gradient(100deg, rgba(240,185,78,.12), rgba(240,185,78,.02) 60%), var(--s1); box-shadow: inset 0 1px 0 rgba(240,185,78,.25), 0 0 0 1px rgba(240,185,78,.16);
}
.agx-champ .agx-crest { grid-area: crest; }
.agx-champ__badge { grid-area: badge; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gold); }
.agx-champ__name { grid-area: name; font: 700 16px/1.2 var(--display); letter-spacing: -.02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-champ__aura { grid-area: aura; font: 700 14px/1 var(--display); color: var(--gold); white-space: nowrap; }

/* Standings */
.agx-standings { margin-bottom: 20px; }
.agx-standings__head { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 12px; }
.agx-standings__head h3 { margin: 0 !important; font-family: var(--display) !important; font-size: 20px !important; font-weight: 700 !important; letter-spacing: -.025em; color: #fff !important; }
.agx-standings__head span { font-size: 12.5px; color: var(--mut); }
.agx-standings { background: transparent; }
.agx-guild {
	position: relative; display: grid; grid-template-columns: 22px auto minmax(0,1fr) auto; grid-template-areas: "rank crest main cta";
	align-items: center; gap: 12px; padding: 14px 14px 14px 10px; margin: 0;
	background: var(--s1); box-shadow: inset 0 -1px 0 var(--line);
	transition: background-color .2s var(--out);
}
.agx-standings__head + .agx-guild { border-radius: var(--r2) var(--r2) 0 0; box-shadow: var(--hi), inset 0 -1px 0 var(--line); }
.agx-guild:last-child { border-radius: 0 0 var(--r2) var(--r2); box-shadow: none; }
.agx-standings__head + .agx-guild:last-child { border-radius: var(--r2); }
.agx-guild:hover { background: var(--s2); }
.agx-guild:active { background: var(--s2); }
.agx-guild.is-mine { background: linear-gradient(90deg, color-mix(in srgb, var(--g) 14%, transparent), transparent 70%), var(--s1); }
.agx-guild.is-mine::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--g); }
.agx-guild__rank { grid-area: rank; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 650 15px/1 var(--display); color: var(--mut); }
.agx-guild.is-first .agx-guild__rank { color: var(--gold); }
.agx-guild > .agx-crest { grid-area: crest; position: relative; z-index: 1; }
.agx-guild__main { grid-area: main; min-width: 0; }
.agx-guild__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agx-guild__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 15.5px/1.25 var(--display); letter-spacing: -.02em; color: #fff !important; }
.agx-guild__name::after { content: ""; position: absolute; inset: 0; z-index: 0; }   /* whole row is the link */
.agx-guild__desc { margin: 2px 0 0 !important; font-size: 12.5px; line-height: 1.4; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-meter { height: 4px; margin: 9px 0 8px; border-radius: 99px; background: var(--s3); overflow: hidden; }
.agx-meter span { display: block; height: 100%; border-radius: inherit; background: var(--g, var(--acc)); transform-origin: left; animation: agxGrow 1.1s var(--out) .3s both; }
.agx-guild__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--mut); }
.agx-guild__facts b { font: 700 13px/1 var(--display); color: var(--tx); }
.agx-cap i { display: none; }
.agx-stack { display: none; }
.agx-stack__img { width: 22px !important; height: 22px !important; border-radius: 50% !important; object-fit: cover; box-shadow: 0 0 0 2px var(--s1); }
.agx-stack__img + .agx-stack__img { margin-left: -7px; }
.agx-guild__cta { grid-area: cta; position: relative; z-index: 1; }
.agx-go { display: grid; place-items: center; width: 28px; height: 28px; color: var(--mut); transform: rotate(-90deg); transition: transform .3s var(--out), color .2s; }
.agx-guild:hover .agx-go { color: var(--tx); transform: rotate(-90deg) translateY(2px); }
.agx-tag { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 3px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 650; background: rgba(72,202,228,.12); color: var(--acc); }
.agx-tag--gold { background: rgba(240,185,78,.14); color: var(--gold); }

/* Rules: one quiet surface */
.agx-rules { list-style: none !important; margin: 0 !important; padding: 6px 16px !important; display: grid; border-radius: var(--r2); background: var(--s1); box-shadow: var(--hi), 0 0 0 1px var(--line); }
.agx-rules li { display: flex; gap: 12px; align-items: flex-start; margin: 0 !important; padding: 12px 0; font-size: 13.5px; line-height: 1.5; color: var(--tx2); }
.agx-rules li + li { box-shadow: inset 0 1px 0 var(--line); }
.agx-rules .mcpx-i { color: var(--acc); margin-top: 2px; }

/* ---------------- single guild ---------------- */
.agx-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 6px 12px 6px 8px; border-radius: 99px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx2) !important; font-size: 13px; font-weight: 600; transition: transform .18s var(--press), color .2s; }
.agx-back:hover { color: #fff !important; }
.agx-back:active { transform: scale(.96); }
.agx-ghero {
	position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: "crest text" "cta cta";
	gap: 16px; padding: 20px 16px 16px; margin-bottom: 12px; border-radius: var(--r3);
	background: var(--s1); box-shadow: var(--hi), 0 0 0 1px color-mix(in srgb, var(--g) 28%, var(--line));
}
.agx-ghero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 90% at 0% 0%, color-mix(in srgb, var(--g) 26%, transparent), transparent 70%); }
.agx-ghero > .agx-crest { grid-area: crest; align-self: start; }
.agx-ghero__text { grid-area: text; min-width: 0; }
.agx-ghero .agx-eyebrow { margin-bottom: 6px; }
.agx-ghero .agx-title { font-size: 30px !important; overflow-wrap: anywhere; }
.agx-ghero__cta { grid-area: cta; display: grid; }
.agx-kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; margin-bottom: 12px; background: var(--line); border-radius: var(--r2); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.agx-kpis > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 14px; background: var(--s1); min-width: 0; }
.agx-kpis small { font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-kpis b { font: 700 22px/1 var(--display); letter-spacing: -.025em; color: #fff; }
.agx-kpis > div:first-child b { color: var(--g, var(--acc)); }
.agx-kpis em { font-style: normal; font-size: 14px; color: var(--mut); font-weight: 600; }
.agx-cols { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.agx-panel { padding: 16px 6px 6px; border-radius: var(--r2); background: var(--s1); box-shadow: var(--hi), 0 0 0 1px var(--line); min-width: 0; }
.agx-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 10px 10px; }
.agx-panel__head h3 { margin: 0 !important; font-family: var(--display) !important; font-size: 18px !important; font-weight: 700 !important; letter-spacing: -.02em; color: #fff !important; }
.agx-panel__head span { font-size: 12px; color: var(--mut); }
.agx-empty { margin: 0; padding: 4px 10px 14px; color: var(--mut); font-size: 14px; }
.agx-roster { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.agx-roster li { margin: 0 !important; }
.agx-roster a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; color: var(--tx) !important; transition: background-color .2s var(--out), transform .18s var(--press); }
.agx-roster a:hover { background: var(--s2); }
.agx-roster a:active { transform: scale(.985); background: var(--s2); }
.agx-roster li.is-me a { background: rgba(72,202,228,.07); box-shadow: inset 0 0 0 1px rgba(72,202,228,.2); }
.agx-roster__pos { width: 22px; flex: 0 0 22px; text-align: center; font: 650 14px/1 var(--display); color: var(--mut); }
.agx-roster li:first-child .agx-roster__pos { color: var(--gold); }
.agx-roster__img { width: 36px !important; height: 36px !important; flex: 0 0 36px; border-radius: 50% !important; object-fit: cover; }
.agx-roster__who { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.agx-roster__who b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 650; font-size: 14px; }
.agx-roster__who small { flex-basis: 100%; font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-roster__aura { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.agx-roster__aura b { font: 700 15px/1 var(--display); color: #fff; letter-spacing: -.015em; }
.agx-roster__aura small { font-size: 10.5px; color: var(--mut); }
.agx-feed { list-style: none !important; margin: 0 !important; padding: 0 10px 8px !important; }
.agx-feed li { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; padding: 9px 0; font-size: 13.5px; color: var(--tx2); }
.agx-feed li + li { box-shadow: inset 0 1px 0 var(--line); }
.agx-feed img { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px; object-fit: cover; }
.agx-feed b { color: #fff; font-weight: 650; }
.agx-feed small { display: block; font-size: 12px; color: var(--mut); }

/* modal + toast in the same system */
.ag-confirm-modal { background: #12151b !important; border: 0 !important; border-radius: 22px !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(2,6,12,.6) !important; }
.ag-confirm-modal .ag-btn { height: 42px; border-radius: 99px; font-weight: 650; }
.ag-confirm-modal .ag-btn--join { background: #48cae4 !important; color: #03151b !important; }
.ag-toast { background: #12151b !important; border-color: rgba(255,255,255,.1) !important; border-radius: 99px !important; }

@media (min-width: 720px) {
	.agx-hero { flex-direction: row; align-items: flex-end; justify-content: space-between; padding-top: 20px; margin-bottom: 28px; }
	.agx-title { font-size: 60px !important; }
	.agx-sub { font-size: 16px; }
	.agx-countdown { align-self: auto; padding: 10px 18px 10px 14px; }
	.agx-countdown b { font-size: 20px; }
	.agx-mine { grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "crest body act" "stats stats stats"; padding: 20px; gap: 16px 18px; }
	.agx-mine__stats { grid-template-columns: repeat(5, minmax(0,1fr)); }
	.agx-mine__stats span:nth-child(4) { grid-column: auto; }
	.agx-mine__actions { display: flex; align-self: center; }
	.agx-standings__head { flex-direction: row; align-items: baseline; justify-content: space-between; }
	.agx-guild { grid-template-columns: 28px auto minmax(0,1fr) auto; gap: 16px; padding: 16px 18px 16px 14px; }
	.agx-crest:not(.agx-crest--lg):not(.agx-crest--xl) { width: 52px; height: 52px; flex-basis: 52px; font-size: 26px; border-radius: 16px; }
	.agx-guild__name { font-size: 17px; }
	.agx-stack { display: inline-flex; margin-left: 4px; }
	.agx-cap { display: inline-flex; align-items: center; gap: 4px; }
	.agx-cap i { display: inline-block; width: 44px; height: 3px; margin-left: 6px; border-radius: 9px; background: linear-gradient(90deg, var(--tx2) var(--f), var(--s3) var(--f)); }
	.agx-rules { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 24px; padding: 4px 20px !important; }
	.agx-rules li + li { box-shadow: none; }
	.agx-ghero { grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "crest text cta"; align-items: center; padding: 28px; gap: 22px; }
	.agx-ghero .agx-title { font-size: 44px !important; }
	.agx-ghero__cta { display: flex; }
	.agx-kpis { grid-template-columns: repeat(4, minmax(0,1fr)); }
	.agx-kpis > div { padding: 18px; }
	.agx-kpis b { font-size: 28px; }
}
@media (min-width: 1000px) {
	.agx-cols { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 16px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
	.agx *, .agx > * { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Hero with artwork */
body.aqua-fullwidth .c-blog-post { background: transparent !important; box-shadow: none !important; border: 0 !important; }
.agx-hero.has-art {
	overflow: hidden; justify-content: flex-end; min-height: 320px; padding: 22px 20px 20px; border-radius: var(--r3);
	background: #070a10; box-shadow: inset 0 0 0 1px var(--line), 0 20px 60px -30px rgba(72,202,228,.35);
}
.agx-hero.has-art::before {
	top: 0; left: 0; width: 100%; height: 100%; z-index: -2; border-radius: inherit;
	background: var(--ag-art) 70% 40% / cover no-repeat; transform: scale(1.04); animation: agxArt 1.6s var(--out) both;
}
@keyframes agxArt { from { transform: scale(1.12); opacity: .4; } }
.agx-hero.has-art::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: linear-gradient(180deg, rgba(5,8,12,0) 15%, rgba(5,8,12,.6) 60%, rgba(5,8,12,.94) 100%), linear-gradient(90deg, rgba(5,8,12,.55), rgba(5,8,12,0) 60%);
}
.agx-hero.has-art .agx-eyebrow { align-self: flex-start; padding: 5px 10px 5px 8px; border-radius: 99px; background: rgba(5,8,12,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.agx-hero.has-art .agx-title { font-size: 44px !important; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.agx-hero.has-art .agx-sub { color: #d6dde6; }
.agx-hero.has-art .agx-countdown { background: rgba(5,8,12,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (min-width: 720px) {
	.agx-hero.has-art { min-height: 380px; padding: 40px; }
	.agx-hero.has-art .agx-title { font-size: 72px !important; }
}
@media (min-width: 720px) { .agx-hero.has-art { justify-content: space-between; align-items: flex-end; } }

/* ==========================================================================
   v2.5 — pills & colour: stats as tinted cards, standings as separate cards
   ========================================================================== */
/* Your guild stats */
.agx-mine__stats { gap: 8px; background: none; border-radius: 0; overflow: visible; }
.agx-mine__stats span {
	--t: #48cae4; padding: 12px; border-radius: 14px;
	background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--t) 16%, transparent), transparent 65%), rgba(18,21,27,.85);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 22%, rgba(255,255,255,.05));
}
.agx-mine__stats span:nth-child(1) { --t: #f0b94e; }
.agx-mine__stats span:nth-child(1) b { color: #ffd88a; }
.agx-mine__stats span:nth-child(2) { --t: var(--g, #48cae4); }
.agx-mine__stats span:nth-child(2) b { color: color-mix(in srgb, var(--g, #48cae4) 70%, #fff); }
.agx-mine__stats span:nth-child(3) { --t: #ff3d3d; }
.agx-mine__stats span:nth-child(3) b { color: #ff8a6b; }
.agx-mine__stats span:nth-child(4) { --t: #a596f5; }
.agx-mine__stats span:nth-child(5) { --t: #5fd39a; }
.agx-mine__stats span:nth-child(5) b { color: #8ee8b8; }

/* Single guild KPIs */
.agx-kpis { gap: 10px; background: none; box-shadow: none; overflow: visible; border-radius: 0; }
.agx-kpis > div {
	--t: #48cae4; border-radius: 18px;
	background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--t) 16%, transparent), transparent 62%), var(--s1);
	box-shadow: var(--hi), inset 0 0 0 1px color-mix(in srgb, var(--t) 22%, rgba(255,255,255,.05));
}
.agx-kpis > div:nth-child(1) { --t: var(--g, #48cae4); }
.agx-kpis > div:nth-child(2) { --t: #48cae4; }
.agx-kpis > div:nth-child(3) { --t: #5fd39a; }
.agx-kpis > div:nth-child(4) { --t: #f0b94e; }
.agx-kpis > div:nth-child(4) b { color: #ffd88a; }

/* Standings: separate cards, each lit by its guild colour */
.agx-standings { display: grid; gap: 10px; }
.agx-standings__head { padding-bottom: 2px; }
.agx-guild, .agx-standings__head + .agx-guild, .agx-guild:last-child, .agx-standings__head + .agx-guild:last-child {
	border-radius: 18px;
	background: radial-gradient(90% 120% at 0% 50%, color-mix(in srgb, var(--g) 14%, transparent), transparent 55%), var(--s1);
	box-shadow: var(--hi), inset 0 0 0 1px color-mix(in srgb, var(--g) 22%, rgba(255,255,255,.05));
}
.agx-guild:hover { background: radial-gradient(90% 120% at 0% 50%, color-mix(in srgb, var(--g) 20%, transparent), transparent 60%), var(--s2); }
.agx-guild.is-first { box-shadow: var(--hi), inset 0 0 0 1px rgba(240,185,78,.45), 0 12px 34px -20px rgba(240,185,78,.5); }
.agx-guild__rank { min-width: 22px; }
.agx-guild.is-mine::before { top: 16px; bottom: 16px; }
.agx-guild__facts b { color: #fff; }
.agx-guild__facts > span:first-child b { color: color-mix(in srgb, var(--g) 65%, #fff); }

/* Rules as three soft pills */
.agx-rules { gap: 8px; padding: 0 !important; background: none; box-shadow: none; }
.agx-rules li, .agx-rules li + li { padding: 12px 14px; border-radius: 16px; background: var(--s1); box-shadow: var(--hi), inset 0 0 0 1px var(--line); }
@media (min-width: 720px) { .agx-rules { gap: 10px; padding: 0 !important; } }

/* Roster: each member a soft row card */
.agx-roster { display: grid; gap: 6px; }
.agx-roster a { background: rgba(255,255,255,.02); box-shadow: inset 0 0 0 1px var(--line); }
.agx-roster li:first-child a { background: linear-gradient(90deg, rgba(240,185,78,.1), transparent 70%); box-shadow: inset 0 0 0 1px rgba(240,185,78,.3); }
.agx-roster__aura b { color: #ff8a6b; }

/* ==========================================================================
   v2.6 colour discipline — neutral cards; guild colour only on crest, meter, edge
   ========================================================================== */
.agx { --ember: #f2704f; --gold: #e6b35a; }
.agx-mine__stats span, .agx-mine__stats span:nth-child(n) {
	background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.agx-mine__stats span:nth-child(n) b { color: #fff; }
.agx-mine__stats span:nth-child(2) b { color: color-mix(in srgb, var(--g, #48cae4) 55%, #fff); }
.agx-mine__stats span:nth-child(3) b { color: #ff8d6e; }

.agx-kpis > div, .agx-kpis > div:nth-child(n) { background: var(--s1); box-shadow: var(--hi), inset 0 0 0 1px rgba(255, 255, 255, .055); }
.agx-kpis > div:nth-child(n) b { color: #fff; }
.agx-kpis > div:first-child b { color: color-mix(in srgb, var(--g, #48cae4) 60%, #fff); }

.agx-guild, .agx-standings__head + .agx-guild, .agx-guild:last-child, .agx-standings__head + .agx-guild:last-child {
	background: var(--s1); box-shadow: var(--hi), inset 0 0 0 1px rgba(255, 255, 255, .055);
}
.agx-guild:hover { background: var(--s2); }
.agx-guild::after { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; border-radius: 0 2px 2px 0; background: var(--g); opacity: .55; }
.agx-guild.is-mine { background: linear-gradient(90deg, color-mix(in srgb, var(--g) 8%, transparent), transparent 55%), var(--s1); }
.agx-guild.is-mine::after { width: 3px; opacity: 1; }
.agx-guild.is-mine::before { display: none; }
.agx-guild.is-first { box-shadow: var(--hi), inset 0 0 0 1px rgba(230, 179, 90, .32); }
.agx-guild__facts > span:first-child b { color: #fff; }
.agx-meter span { opacity: .9; }

.agx-roster li:first-child a { background: rgba(230, 179, 90, .05); box-shadow: inset 0 0 0 1px rgba(230, 179, 90, .22); }
.agx-roster__aura b { color: #fff; }
.agx-tag--gold { background: rgba(230, 179, 90, .12); color: var(--gold); }

/* mobile hardening: grid children must be allowed to shrink */
.agx-roster { grid-template-columns: minmax(0, 1fr); }
.agx-roster > li, .agx-roster a, .agx-panel, .agx-cols > * { min-width: 0; }
.agx-standings > *, .agx-guild__main { min-width: 0; }
.agx-ghero .agx-title { font-size: clamp(24px, 8vw, 30px) !important; }
.agx-mine__body > h3 { font-size: clamp(18px, 6vw, 22px) !important; }
@media (max-width: 420px) {
	.agx-roster a { gap: 8px; padding: 9px 8px; }
	.agx-roster__img { width: 32px !important; height: 32px !important; flex-basis: 32px; }
	.agx-roster__who small { font-size: 11.5px; }
	.agx-panel { padding-left: 4px; padding-right: 4px; }
}
