/* Shared UI for the account, profile and admin pages. */
:root {
  color-scheme: dark;
  --bg: #08070b;
  --surface: #121017;
  --surface-glass: rgba(18, 16, 23, 0.86);
  --surface-2: #17141d;
  --surface-3: #1f1b27;
  --line: #25202e;
  --line-2: #352e42;
  --text: #f1edf7;
  --muted: #8d8599;
  --faint: #5f586b;
  --accent: #2ee6ff;
  --pink: #ff2e88;
  --gold: #ffcf4a;
  --ok: #6fd18a;
  --err: #ef6a5f;
  --warn: #ffb020;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background-attachment: fixed;
}
a { color: inherit; }
svg { display: block; }
button, input, select { font-family: inherit; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(8,7,11,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), #8b5cf6 55%, var(--accent)); box-shadow: 0 0 18px -4px rgba(255,46,136,0.7); }
.brand-mark svg { width: 17px; height: 17px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 11px; border-radius: 8px; transition: color 0.15s ease, background 0.15s ease; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.current { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.coin-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; text-decoration: none; background: rgba(255,207,74,0.08); border: 1px solid rgba(255,207,74,0.3); font-size: 13px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.coin-pill svg { width: 16px; height: 16px; }
.account-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; padding: 7px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line-2); transition: border-color 0.15s ease; }
.account-link:hover { border-color: #4a4058; }
.account-link svg { width: 15px; height: 15px; }
.account-link.owner svg { color: var(--gold); }
.account-link.admin svg { color: var(--accent); }
.account-link.signin { background: var(--text); color: #0b0a0e; border-color: transparent; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.15s ease; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--text); color: #0b0a0e; }
.btn-primary:hover:not(:disabled) { background: #fff; }
.btn-accent { background: var(--accent); color: #04232b; }
.btn-accent:hover:not(:disabled) { background: #63edff; }
.btn-gold { background: var(--gold); color: #241900; }
.btn-gold:hover:not(:disabled) { background: #ffd968; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { border-color: #4a4058; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: #4a4058; }
.btn-danger { background: rgba(239,106,95,0.12); color: #ff8b80; border-color: rgba(239,106,95,0.35); }
.btn-danger:hover:not(:disabled) { background: rgba(239,106,95,0.2); }
.btn-danger.confirming { background: var(--err); color: #2a0d0a; border-color: var(--err); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; padding: 0; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface-glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.panel-head h2 svg, .panel-head h3 svg { width: 18px; height: 18px; color: var(--muted); }
.panel-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.panel-body { padding: 20px 22px 22px; }
.eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.muted { color: var(--muted); }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; height: 36px; padding: 0 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs button svg { width: 16px; height: 16px; }
.tabs button .count { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--faint); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; height: 28px; padding: 0 11px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: #c9c2d3; }
.input { width: 100%; height: 42px; padding: 0 13px; border-radius: 10px; font-size: 14px; background: rgba(8,7,11,0.7); border: 1px solid var(--line-2); color: var(--text); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, var(--line-2)); box-shadow: 0 0 0 3px rgba(46,230,255,0.12); }
.input.invalid { border-color: color-mix(in srgb, var(--err) 70%, var(--line-2)); }
.input.valid { border-color: color-mix(in srgb, var(--ok) 60%, var(--line-2)); }
.field-hint { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.field-hint.err { color: var(--err); }
.field-hint.ok { color: var(--ok); }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.input-with-icon .input { padding-left: 38px; }

/* ---------- avatar + role chips ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-3); border: 2px solid rgba(255,255,255,0.12); }
.avatar-fallback { border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; color: var(--text); background: linear-gradient(135deg, #2a2236, #1a1622); border: 2px solid rgba(255,255,255,0.12); }
/* serial numbers on Unstoppable backgrounds */
.serial-tag {
  position: absolute; right: 10px; bottom: 4px; z-index: 3; pointer-events: none;
  font-family: "Permanent Marker", "Rock Salt", "Comic Sans MS", cursive; font-size: 22px; line-height: 1; letter-spacing: 0.02em;
  color: #ffe14a; transform: rotate(-7deg); transform-origin: bottom right;
  -webkit-text-stroke: 1px #1a0414; paint-order: stroke fill;
  text-shadow: 0 2px 0 #1a0414, 0 0 10px rgba(255,43,214,0.85), 0 0 22px rgba(255,43,214,0.45);
}
.serial-tag.fixed { position: fixed; right: 22px; bottom: 14px; font-size: 46px; z-index: 40; -webkit-text-stroke: 1.6px #1a0414; }
.serial-tag { white-space: nowrap; }
.serial-tag.many { font-size: 17px; transform: rotate(-4deg); }
.serial-tag.fixed.many { font-size: 36px; bottom: 26px; }
@media (max-width: 600px) { .serial-tag.fixed { font-size: 34px; right: 14px; bottom: 10px; } .serial-tag.fixed.many { font-size: 24px; bottom: 18px; } }
/* friends */
.fr-list { display: grid; gap: 8px; }
.fr-list.cols { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.fr-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.fr-main:hover .fr-name { text-decoration: underline; }
.fr-text { display: grid; gap: 4px; min-width: 0; }
.fr-name { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-name .role-chip { padding: 1px 7px; font-size: 10.5px; }
.fr-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fr-sub .title-chip { font-size: 11px; padding: 2px 8px 2px 6px; }
.fr-meta { font-size: 12px; color: var(--muted); }
.fr-actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); white-space: nowrap; }
.friend-chip svg { width: 12px; height: 12px; }
.title-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--tier-color); background: color-mix(in srgb, var(--tier-color) 12%, transparent); border: 1px solid color-mix(in srgb, var(--tier-color) 38%, transparent);
}
.title-chip svg { width: 14px; height: 14px; }
.title-chip.tier-legendary, .title-chip.tier-mythic { box-shadow: 0 0 14px -4px var(--tier-color); }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.role-chip svg { width: 13px; height: 13px; }
.role-owner { background: rgba(255,207,74,0.12); color: var(--gold); border: 1px solid rgba(255,207,74,0.35); }
.role-admin { background: rgba(46,230,255,0.1); color: var(--accent); border: 1px solid rgba(46,230,255,0.3); }
.role-banned { background: rgba(239,106,95,0.12); color: #ff8b80; border: 1px solid rgba(239,106,95,0.35); }
.role-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { padding: 16px; border-radius: 13px; background: var(--surface-glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.tile-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.tile-label svg { width: 15px; height: 15px; }
.tile-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--accent)); }

/* ---------- game stat cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.game-card { display: flex; gap: 14px; align-items: flex-start; padding: 15px; border-radius: 13px; background: var(--surface-glass); border: 1px solid var(--line); text-decoration: none; backdrop-filter: blur(10px); transition: border-color 0.15s ease, transform 0.15s ease; }
.game-card:hover { border-color: color-mix(in srgb, var(--game-color) 50%, var(--line)); transform: translateY(-2px); }
.game-icon { flex: 0 0 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--game-color); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--game-color) 28%, transparent), transparent 70%), var(--surface-2); border: 1px solid color-mix(in srgb, var(--game-color) 32%, var(--line)); }
.game-icon svg { width: 22px; height: 22px; }
.game-icon.art { flex-basis: 46px; height: 46px; background: none; border: 0; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--game-color) 35%, transparent)); }
.game-icon.art svg { width: 46px; height: 46px; }
.game-main { flex: 1; min-width: 0; }
.game-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.game-name { font-size: 15px; font-weight: 600; }
.game-head { text-align: right; }
.game-head b { display: block; font-size: 19px; font-weight: 700; color: var(--game-color); font-variant-numeric: tabular-nums; line-height: 1.1; }
.game-head span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.metrics { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.metric { font-size: 11.5px; color: #b5adc0; background: rgba(255,255,255,0.05); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.metric i { font-style: normal; color: var(--faint); margin-right: 4px; }

.rank-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 13px; margin-bottom: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--tier-color) 16%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--tier-color) 45%, var(--line)); }
.rank-card .rank-icon { flex-shrink: 0; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--tier-color) 60%, transparent)); }
.rank-card b { display: block; font-size: 15px; color: var(--tier-color); }
.rank-card span { font-size: 12.5px; color: var(--muted); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.empty-state b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty-state .btn { margin-top: 14px; }

/* ---------- badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.badge-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; border-radius: 13px; text-align: center; cursor: pointer; background: var(--surface-glass); border: 1px solid var(--line); transition: border-color 0.15s ease, transform 0.15s ease; }
.badge-card:hover, .badge-card:focus-visible { border-color: color-mix(in srgb, var(--tier-color) 55%, var(--line)); transform: translateY(-2px); outline: none; }
.medal { position: relative; width: 68px; height: 68px; display: block; transition: transform 0.2s ease; }
.medal-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.55)) drop-shadow(0 0 10px color-mix(in srgb, var(--tier-color) 30%, transparent)); }
.badge-card:hover .medal, .badge-card:focus-visible .medal { transform: scale(1.06) rotate(-3deg); }
.badge-card[data-tier="legendary"]:not(.locked) .medal-svg, .badge-card[data-tier="mythic"]:not(.locked) .medal-svg { animation: mythicPulse 2.4s ease-in-out infinite; }
@keyframes mythicPulse { 0%, 100% { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.55)) drop-shadow(0 0 8px color-mix(in srgb, var(--tier-color) 35%, transparent)); } 50% { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.55)) drop-shadow(0 0 18px color-mix(in srgb, var(--tier-color) 80%, transparent)); } }
.medal-lock { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--muted); }
.medal-lock svg { width: 12px; height: 12px; }
.tt-medal { width: 76px; height: 76px; margin: 2px auto 8px; }
.tt-medal .medal-svg { filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6)); }
.tt-medal.locked .medal-svg { filter: grayscale(1) brightness(0.7); }
.badge-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.badge-meta { font-size: 10.5px; color: var(--tier-color); font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 0.06em; }
.badge-card.locked .medal-svg { filter: grayscale(1) brightness(0.75); opacity: 0.45; }
.badge-card.locked .badge-name { color: var(--muted); }
.badge-card.locked .badge-meta { color: var(--faint); }
.tier-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.tier-bar { font-size: 12px; color: var(--muted); }
.tier-bar b { color: var(--tier-color); font-weight: 600; }
.tier-bar .progress span { background: var(--tier-color); }

.tooltip { position: fixed; z-index: 400; max-width: 240px; padding: 11px 13px; border-radius: 11px; font-size: 12.5px; line-height: 1.5; pointer-events: none; background: #0d0b12; border: 1px solid var(--line-2); box-shadow: 0 16px 36px -12px rgba(0,0,0,0.8); }
.tooltip .tt-name { font-weight: 700; margin-bottom: 3px; }
.tooltip .tt-desc { color: var(--muted); margin-bottom: 6px; }
.tooltip .tt-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.tooltip .tt-status { font-size: 12px; margin-top: 5px; font-weight: 600; }

/* ---------- cosmetic pickers ---------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid var(--line-2); display: flex; align-items: flex-end; padding: 8px 10px; transition: border-color 0.15s ease, transform 0.15s ease; text-align: left; color: #fff; }
.swatch:hover, .swatch:focus-visible { transform: translateY(-2px); border-color: #5a4f6b; outline: none; }
.swatch.equipped { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,230,255,0.15); }
.swatch-name { position: relative; z-index: 1; font-size: 12.5px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.swatch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent 55%); pointer-events: none; }
.swatch-check { position: absolute; top: 8px; right: 8px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #04232b; }
.swatch-check svg { width: 13px; height: 13px; }
.font-swatch { aspect-ratio: auto; min-height: 92px; align-items: center; justify-content: center; background: #0c0a10; padding: 14px; text-align: center; }
.font-swatch::after { display: none; }
.font-swatch .swatch-name { font-size: 18px; text-shadow: none; color: var(--text); }
.font-swatch .font-label { position: absolute; left: 10px; bottom: 8px; font-size: 10.5px; color: var(--muted); font-family: "IBM Plex Mono", monospace; }

/* ---------- toasts ---------- */
.toast-stack { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 900; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 440px; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); font-size: 13.5px; box-shadow: 0 16px 34px -14px rgba(0,0,0,0.9); animation: toastIn 0.25s ease; }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.ok svg { color: var(--ok); }
.toast.err { border-color: color-mix(in srgb, var(--err) 45%, var(--line-2)); }
.toast.err svg { color: var(--err); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- owner-exclusive glitch font ---------- */
.text-glitch { position: relative; display: inline-block; }
.text-glitch::before, .text-glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; overflow: hidden; background: transparent; color: inherit; }
.text-glitch::before { left: 2px; text-shadow: -1px 0 #ff2e88; animation: glitchSlice1 3.2s infinite linear alternate-reverse; }
.text-glitch::after { left: -2px; text-shadow: -1px 0 #2ee6ff, 1px 0 #35d9e0; animation: glitchSlice2 2.6s infinite linear alternate-reverse; }
@keyframes glitchSlice1 { 0% { clip-path: inset(10% 0 65% 0); transform: translate(-1px,0); } 20% { clip-path: inset(60% 0 5% 0); transform: translate(1px,0); } 40% { clip-path: inset(30% 0 40% 0); transform: translate(-2px,0); } 60% { clip-path: inset(75% 0 5% 0); transform: translate(2px,0); } 80% { clip-path: inset(15% 0 55% 0); transform: translate(-1px,0); } 100% { clip-path: inset(45% 0 20% 0); transform: translate(1px,0); } }
@keyframes glitchSlice2 { 0% { clip-path: inset(55% 0 20% 0); transform: translate(2px,0); } 25% { clip-path: inset(5% 0 70% 0); transform: translate(-2px,0); } 50% { clip-path: inset(35% 0 35% 0); transform: translate(1px,0); } 75% { clip-path: inset(65% 0 10% 0); transform: translate(-1px,0); } 100% { clip-path: inset(20% 0 55% 0); transform: translate(2px,0); } }
.text-glitch.glitch-burst { animation: glitchJolt 0.15s steps(2) both; }
@keyframes glitchJolt { 0% { transform: skewX(0deg); filter: none; } 30% { transform: skewX(-6deg) translateX(-3px); filter: hue-rotate(40deg) brightness(1.4); } 60% { transform: skewX(4deg) translateX(2px); filter: hue-rotate(-30deg) brightness(1.2); } 100% { transform: skewX(0deg); filter: none; } }
@keyframes fluxShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tier-bars { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .nav-inner { gap: 12px; }
  .nav-links .hide-md { display: none; }
  .nav-links a { padding: 8px 8px; }
  .game-grid { grid-template-columns: 1fr; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
  .panel-pad { padding: 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .brand-text { display: none; }
  .nav-links .hide-sm { display: none; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .swatch-grid { grid-template-columns: repeat(2, 1fr); }
  .tile { padding: 13px; }
  .tile-value { font-size: 21px; }
}
/* The bar now also carries the daily-reward and notification buttons, so it
   needs to give up some room on phones. */
@media (max-width: 600px) {
  .brand-text { display: none; }
  .nav-links .hide-sm { display: none; }
  .nav-right { gap: 6px; }
  .coin-pill { padding: 6px 9px; }
  .account-link { padding: 7px 10px; }
  .account-link span { max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 400px) {
  .nav-links a { padding: 8px 6px; }
  .account-link span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .text-glitch::before, .text-glitch::after, .text-glitch.glitch-burst, .toast, .skeleton, .badge-card .medal { animation: none !important; }
  .game-card, .badge-card, .swatch { transition: none; }
}
