/* Рейтинг сезона — ночной экран: тёмно-фиолетовый фон, закат с облаками за пьедесталом,
   неоновые рамки (золото — «Весь мир» и я, розовая — «Друзья»), пейзажные аватары. */
.glr-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
body.glr-open { overflow: hidden; }

.glr {
  --glr-gold: #ffc542;
  --glr-gold-soft: #ffd77a;
  --glr-pink: #ff5fae;
  --glr-pink-text: #ff74b4;
  --glr-ink: #ffffff;
  --glr-muted: rgba(222, 210, 238, .72);
  --glr-card: rgba(255, 255, 255, .035);
  --glr-edge: rgba(255, 255, 255, .085);
  position: fixed;
  inset: 0;
  z-index: 140;
  overflow: hidden;
  color: var(--glr-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(70% 40% at 50% 34%, rgba(150, 60, 120, .35), rgba(150, 60, 120, 0) 70%),
    radial-gradient(60% 30% at 0% 100%, rgba(255, 140, 70, .16), rgba(255, 140, 70, 0) 70%),
    radial-gradient(60% 30% at 100% 100%, rgba(255, 110, 170, .14), rgba(255, 110, 170, 0) 70%),
    linear-gradient(180deg, #1a0f2b 0%, #160c25 40%, #120a1e 100%);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .26s ease, transform .26s cubic-bezier(.2, .8, .2, 1);
}
.glr.is-open { opacity: 1; transform: none; }
.glr[hidden] { display: none; }

.glr-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glr-sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px rgba(255, 220, 190, .7); opacity: .6; animation: glr-twinkle 3.4s ease-in-out infinite; }
.glr-sky i:nth-child(1) { left: 8%; top: 9%; }
.glr-sky i:nth-child(2) { left: 88%; top: 13%; animation-delay: .6s; }
.glr-sky i:nth-child(3) { left: 72%; top: 24%; animation-delay: 1.2s; }
.glr-sky i:nth-child(4) { left: 18%; top: 31%; animation-delay: 1.8s; }
.glr-sky i:nth-child(5) { left: 94%; top: 58%; animation-delay: .3s; }
.glr-sky i:nth-child(6) { left: 4%; top: 66%; animation-delay: 2.2s; }
.glr-sky i:nth-child(7) { left: 60%; top: 4%; animation-delay: 1.5s; }
.glr-sky i:nth-child(8) { left: 33%; top: 18%; animation-delay: 2.6s; }
@keyframes glr-twinkle { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: .95; transform: scale(1.15); } }
@keyframes glr-float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-10px) rotate(6deg); } }

.glr-screen {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: max(6px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Шапка: стрелка, «GlowLetter ♡» розовым неоном, корона */
.glr-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; min-height: 50px; }
.glr-head h2 { margin: 0; text-align: center; font-size: 22px; font-weight: 600; letter-spacing: .01em; display: inline-flex; justify-content: center; align-items: center; gap: 6px; color: #fff; }
.glr-brand { font-size: 28px !important; font-weight: 500 !important; color: var(--glr-pink-text) !important; background: linear-gradient(180deg, #ff9fcb, #ff5fa6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 8px rgba(255, 95, 170, .65)); }
.glr-brand svg { width: 26px; height: 26px; color: #ff5fa6; }
.glr-brand svg path { fill: none; stroke: #ff6fb0; stroke-width: 2.2; }
.glr .glr-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  cursor: pointer;
}
.glr .glr-icon svg { width: 28px; height: 28px; }
.glr .glr-icon.is-empty { visibility: hidden; }
.glr .glr-icon.is-crown .glr-crown { width: 34px; height: 24px; filter: drop-shadow(0 0 8px rgba(255, 197, 66, .85)); }
.glr .glr-icon.is-gear svg { width: 27px; height: 27px; }
.glr .glr-icon:active { transform: scale(.94); }

/* Вкладки «Весь мир / Друзья» в общей капсуле */
.glr-tabs-wrap { padding: 3px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .03); }
.glr-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.glr .glr-tabs button {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px;
  border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 16px;
  color: var(--glr-muted);
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.glr .glr-tabs button svg { width: 24px; height: 24px; }
.glr .glr-tabs button:active { transform: scale(.97); }
.glr .glr-tabs .is-world[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 176, 60, .22), rgba(110, 50, 20, .3));
  border-color: #ffb73a;
  box-shadow: 0 0 16px rgba(255, 170, 50, .55), inset 0 0 12px rgba(255, 170, 50, .25);
}
.glr .glr-tabs .is-friends[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 90, 180, .38), rgba(140, 30, 110, .38));
  border-color: #ff5fb8;
  box-shadow: 0 0 18px rgba(255, 80, 180, .65), inset 0 0 12px rgba(255, 80, 180, .3);
}
.glr .glr-tabs .is-friends[aria-selected="true"] svg { color: #ffc2e4; }

/* Сцена с закатом за пьедесталом */
.glr-stage { position: relative; margin: -4px -14px 0; padding: 4px 14px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; isolation: isolate; }
.glr-scene { position: absolute; inset: 40px 0 0; z-index: -1; pointer-events: none; -webkit-mask: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.glr-scene svg { width: 100%; height: 100%; display: block; }
.glr-scene i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffe6c4; box-shadow: 0 0 6px 2px rgba(255, 210, 150, .8); animation: glr-twinkle 2.8s ease-in-out infinite; }
.glr-scene i:nth-of-type(4) { left: 30%; top: 22%; }
.glr-scene i:nth-of-type(5) { left: 74%; top: 16%; animation-delay: .7s; }
.glr-scene i:nth-of-type(6) { left: 90%; top: 40%; animation-delay: 1.4s; }
.glr-scene i:nth-of-type(7) { left: 12%; top: 48%; animation-delay: 2s; }
.glr-scene i:nth-of-type(8) { left: 58%; top: 8%; animation-delay: 1s; }
.glr-scene i.is-heart { width: 20px; height: 18px; background: none; box-shadow: none; animation: glr-float 6s ease-in-out infinite; }
.glr-scene i.is-heart::before { content: ""; position: absolute; inset: 0; background: #ff6fb0; filter: drop-shadow(0 0 6px rgba(255, 95, 170, .9)); -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 22"><path d="M12 21 2.6 11.8A5.6 5.6 0 0 1 12 4.2a5.6 5.6 0 0 1 9.4 7.6Z"/></svg>') center / contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 22"><path d="M12 21 2.6 11.8A5.6 5.6 0 0 1 12 4.2a5.6 5.6 0 0 1 9.4 7.6Z"/></svg>') center / contain no-repeat; }
.glr-scene i.is-heart:nth-of-type(1) { left: 6%; top: 10%; width: 24px; height: 22px; }
.glr-scene i.is-heart:nth-of-type(2) { left: 26%; top: 30%; width: 10px; height: 9px; animation-delay: 1.6s; opacity: .8; }
.glr-scene i.is-heart:nth-of-type(3) { right: 8%; left: auto; top: 6%; width: 12px; height: 11px; animation-delay: 3s; opacity: .7; }

.glr-note { margin: 2px 0 0; text-align: center; font-size: 16px; font-weight: 500; color: #fff; }
.glr-left { margin: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--glr-gold-soft); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.glr-left svg { width: 18px; height: 18px; color: var(--glr-gold); }

/* Пьедестал */
.glr-podium { position: relative; width: 100%; display: grid; grid-template-columns: 1fr 1.22fr 1fr; align-items: end; gap: 2px; margin-top: 6px; }
.glr .glr-ped { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.glr .glr-ped:disabled { cursor: default; opacity: .55; }
.glr-ped-crown { position: relative; z-index: 4; margin-bottom: -13px; }
.glr-ped-crown .glr-crown { width: 58px; height: 41px; display: block; filter: drop-shadow(0 0 7px rgba(225, 232, 255, .75)) drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.glr-ped.is-1 .glr-ped-crown { margin-bottom: -16px; }
.glr-ped.is-1 .glr-ped-crown .glr-crown { width: 78px; height: 55px; filter: drop-shadow(0 0 12px rgba(255, 200, 70, .95)) drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); animation: glr-crown 2.6s ease-in-out infinite; }
.glr-ped.is-3 .glr-ped-crown .glr-crown { filter: drop-shadow(0 0 7px rgba(255, 140, 150, .8)) drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
@keyframes glr-crown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.glr-ped-ring { position: relative; z-index: 2; display: grid; place-items: center; width: 112px; height: 112px; }
.glr-ped.is-1 .glr-ped-ring { width: 148px; height: 148px; }
.glr-laurel, .glr-ring { position: absolute; inset: -18.333%; width: 136.667%; height: 136.667%; pointer-events: none; }
.glr-laurel { z-index: 0; filter: drop-shadow(0 0 5px rgba(210, 220, 255, .55)); }
.glr-ped.is-1 .glr-laurel { filter: drop-shadow(0 0 9px rgba(255, 190, 60, .85)); }
.glr-ped.is-3 .glr-laurel { filter: drop-shadow(0 0 6px rgba(255, 120, 140, .7)); }
.glr-ring { z-index: 2; filter: drop-shadow(0 0 6px rgba(220, 228, 255, .8)); }
.glr-ped.is-1 .glr-ring { filter: drop-shadow(0 0 12px rgba(255, 190, 60, .95)); }
.glr-ped.is-3 .glr-ring { filter: drop-shadow(0 0 7px rgba(255, 110, 150, .85)); }
.glr-ped-ring .glr-ava { position: relative; z-index: 1; box-shadow: none; }
.glr-badge { position: absolute; z-index: 3; left: 50%; bottom: -16px; transform: translateX(-50%); width: 42px; height: 42px; display: grid; place-items: center; }
.glr-ped.is-1 .glr-badge { width: 54px; height: 54px; bottom: -19px; }
.glr-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(225, 232, 255, .7)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.glr-ped.is-1 .glr-badge svg { filter: drop-shadow(0 0 10px rgba(255, 190, 60, .9)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.glr-ped.is-3 .glr-badge svg { filter: drop-shadow(0 0 6px rgba(255, 110, 150, .8)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.glr-badge b { position: relative; font-size: 22px; font-weight: 800; line-height: 1; color: #1b2038; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }
.glr-ped.is-1 .glr-badge b { font-size: 29px; color: #2a1a06; }
/* Тумба: тёмный цилиндр с металлической крышкой */
.glr-ped-block {
  --rim: linear-gradient(180deg, #ffffff 0%, #d9def0 40%, #8d95b6 100%);
  --edge: rgba(214, 222, 255, .85);
  --glow: rgba(190, 200, 255, .45);
  position: relative;
  width: 100%;
  margin-top: 4px;
  padding: 22px 4px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(180deg, #1c1626 0%, #0d0a13 60%, #0a080f 100%);
  border-left: 2px solid var(--edge);
  border-right: 2px solid var(--edge);
  box-shadow: 0 0 14px var(--glow), inset 0 0 18px rgba(0, 0, 0, .7);
}
.glr-ped-block::before { content: ""; position: absolute; left: -6px; right: -6px; top: -7px; height: 12px; border-radius: 7px; background: var(--rim); box-shadow: 0 0 10px var(--glow), inset 0 -2px 2px rgba(0, 0, 0, .35); }
.glr-ped.is-3 .glr-ped-block { --rim: linear-gradient(180deg, #ffe4d8 0%, #f4a48a 45%, #a9524a 100%); --edge: rgba(255, 140, 160, .9); --glow: rgba(255, 80, 140, .55); background: linear-gradient(180deg, #2a1424 0%, #140912 60%, #0e070d 100%); }
.glr-ped.is-1 .glr-ped-block { --rim: linear-gradient(180deg, #fff3b8 0%, #ffc93d 45%, #9c6008 100%); --edge: #ffc23e; --glow: rgba(255, 180, 50, .75); padding: 26px 4px 16px; background: linear-gradient(180deg, #2c1a0c 0%, #140c08 55%, #0d0806 100%); box-shadow: 0 0 22px var(--glow), inset 0 0 22px rgba(255, 170, 50, .22); }
.glr-ped.is-1 { z-index: 2; }
.glr-ped-base { position: relative; z-index: 3; width: 128%; height: 30px; margin-top: 0; }
.glr-ped-base::before, .glr-ped-base::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #fff1a8 0%, #ffc63a 30%, #b97a10 75%, #7a4806 100%); box-shadow: 0 0 18px rgba(255, 180, 60, .85); }
.glr-ped-base::before { top: 0; width: 86%; height: 14px; }
.glr-ped-base::after { top: 13px; width: 100%; height: 17px; box-shadow: 0 0 22px rgba(255, 180, 60, .85), 0 8px 16px rgba(0, 0, 0, .55); }
.glr-ped-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 600; padding: 0 4px; color: #fff; }
.glr-ped-xp { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; }
.glr-ped.is-1 .glr-ped-xp { color: var(--glr-gold); text-shadow: 0 0 10px rgba(255, 190, 60, .6); }
.glr-ped.is-2 .glr-ped-xp { color: #c98bff; text-shadow: 0 0 10px rgba(190, 120, 255, .45); }
.glr-ped.is-3 .glr-ped-xp { color: #ff86b6; text-shadow: 0 0 10px rgba(255, 110, 170, .45); }
.glr-ped.is-2 .glr-ped-xp .glr-xp { color: #fff; background: radial-gradient(circle at 35% 30%, #e6c6ff, #b06ef0 55%, #7c3cc4); }
.glr-ped.is-3 .glr-ped-xp .glr-xp { color: #3a0a20; background: radial-gradient(circle at 35% 30%, #ffd0e2, #ff7fb2 55%, #d44a84); }

.glr-title { font-size: 15px; font-weight: 400; }
.glr-title.is-newbie { color: #a8c8ff; }
.glr-title.is-player { color: #ff7ab0; }
.glr-title.is-master { color: #66c4ff; }
.glr-title.is-champion { color: #ffb45a; }
.glr-title.is-legend { color: var(--glr-gold); }

/* Монетка «XP» */
.glr-xp { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 7px; font-weight: 800; letter-spacing: -.02em; color: #5a3200; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffc542 50%, #c98a12); box-shadow: 0 0 6px rgba(255, 197, 66, .6); vertical-align: middle; }
.glr-ped-xp .glr-xp { width: 19px; height: 19px; font-size: 8px; }

/* Аватары-картинки */
.glr-ava { --size: 40px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; overflow: hidden; display: block; background: #2a1838; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25); }
.glr-ava svg { width: 100%; height: 100%; display: block; }
.glr-ava.is-sm { --size: 34px; }
.glr-ava.is-md { --size: 54px; box-shadow: 0 0 0 2px #ffc542, 0 0 12px rgba(255, 190, 60, .6); }
.glr-ava.is-lg { --size: 82px; }
.glr-ava.is-xl { --size: 108px; }
.glr-ava.is-hero { --size: 116px; box-shadow: 0 0 0 3px #ffc542, 0 0 0 5px rgba(90, 40, 0, .6), 0 0 26px rgba(255, 180, 60, .65); }

/* Таблица */
.glr-table { position: relative; z-index: 1; margin-top: 2px; padding: 0 6px 6px; border-radius: 18px; background: rgba(20, 12, 32, .92); border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 -8px 24px rgba(0, 0, 0, .4); }
.glr-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 112px 70px; align-items: center; gap: 6px; min-height: 41px; padding: 3px 8px; margin-top: 3px; border-radius: 11px; background: var(--glr-card); border: 1px solid var(--glr-edge); cursor: pointer; }
.glr-row.is-head { cursor: default; min-height: 34px; margin: 0; background: none; border: 0; font-size: 14px; font-weight: 400; color: var(--glr-muted); }
.glr-row.is-head span:first-child { text-align: center; }
.glr-row.is-head span:last-child, .glr-pts { text-align: right; justify-self: end; }
.glr-row.is-me { border-color: rgba(255, 190, 60, .55); background: rgba(255, 180, 60, .1); }
.glr-row:not(.is-head):active { background: rgba(255, 255, 255, .08); }
.glr-place { font-weight: 500; font-size: 16px; text-align: center; color: #fff; font-variant-numeric: tabular-nums; }
.glr-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.glr-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 400; }
.glr-league { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 400; white-space: nowrap; }
.glr-league-ic { width: 21px; height: 21px; flex: none; }
.glr-league.is-diamond { color: #78c6ff; }
.glr-league.is-platinum { color: #e6eaff; }
.glr-league.is-gold { color: var(--glr-gold); }
.glr-league.is-silver { color: #dde3f2; }
.glr-league.is-bronze { color: #ff8d8d; }
.glr-league-ic.is-bronze path:first-child { fill: #ff6f6f; }
.glr-league-ic.is-platinum { filter: drop-shadow(0 0 4px rgba(200, 220, 255, .8)); }
.glr-league-ic.is-gold { filter: drop-shadow(0 0 4px rgba(255, 197, 66, .7)); }
.glr-pts { display: inline-flex; justify-content: flex-end; align-items: center; gap: 5px; font-weight: 600; font-size: 16px; color: var(--glr-gold); font-variant-numeric: tabular-nums; }

/* Нижние карточки: я — золотая рамка, «Пригласить друзей» — розовая */
.glr .glr-me, .glr .glr-invite {
  position: sticky; bottom: 0; z-index: 2;
  margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 78px;
  padding: 10px 14px;
  border-radius: 20px;
  font: inherit; color: #fff; text-align: left;
  cursor: pointer;
}
.glr .glr-me { background: linear-gradient(180deg, #2a1a24, #1c1018); border: 2px solid #ffb93c; box-shadow: 0 0 20px rgba(255, 175, 50, .55), inset 0 0 18px rgba(255, 170, 50, .18), 0 -10px 24px rgba(10, 4, 20, .7); }
.glr-me-place { font-size: 19px; font-weight: 500; color: #fff; min-width: 38px; }
.glr .glr-me > span:not(.glr-ava) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.glr .glr-me > span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 500; }
.glr .glr-me small { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--glr-muted); }
.glr .glr-me small .glr-league-ic { width: 18px; height: 18px; }
.glr-me-xp { display: inline-flex; align-items: center; gap: 5px; font-size: 20px; font-weight: 600; color: var(--glr-gold); white-space: nowrap; }
.glr .glr-me > svg, .glr .glr-invite > svg { width: 22px; height: 22px; flex: none; color: #fff; }
.glr .glr-me > svg { color: var(--glr-gold); margin-left: -6px; }
.glr .glr-invite { background: linear-gradient(90deg, #4c163f, #6a1e5c 60%, #5a1a55); border: 2px solid #ff62bd; box-shadow: 0 0 22px rgba(255, 80, 180, .6), inset 0 0 18px rgba(255, 80, 180, .2), 0 -10px 24px rgba(10, 4, 20, .7); }
.glr .glr-invite > span:not(.glr-invite-ic) { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.glr .glr-invite b { font-size: 18px; font-weight: 500; }
.glr .glr-invite small { font-size: 13.5px; color: rgba(255, 230, 245, .85); }
.glr-invite-ic { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #ffb6dc; background: rgba(255, 95, 180, .18); border: 1.5px solid rgba(255, 140, 210, .7); box-shadow: 0 0 12px rgba(255, 95, 180, .45); }
.glr-invite-ic svg { width: 30px; height: 30px; }

.glr-empty { position: relative; margin: 8px 0; text-align: center; color: var(--glr-muted); font-weight: 500; line-height: 1.45; }
.glr-loading { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.glr-loading span { width: 12px; height: 12px; border-radius: 50%; background: var(--glr-gold); animation: glr-dot 1s ease-in-out infinite; }
.glr-loading span:nth-child(2) { animation-delay: .15s; }
.glr-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes glr-dot { 0%, 100% { transform: scale(.6); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

/* Карточки профиля и справки */
.glr-card { position: relative; padding: 16px; border-radius: 22px; background: linear-gradient(160deg, rgba(70, 36, 80, .55), rgba(30, 18, 44, .92)); border: 1px solid var(--glr-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .35); overflow: hidden; }
.glr-info p { margin: 0 0 12px; line-height: 1.5; color: #f3ecfa; }
.glr-switch { display: flex; align-items: center; gap: 12px; font-weight: 500; cursor: pointer; }
.glr-switch input { position: absolute; opacity: 0; pointer-events: none; }
.glr-switch span { position: relative; flex: none; width: 50px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .2); transition: background .2s; }
.glr-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.glr-switch input:checked + span { background: linear-gradient(90deg, #ff5fae, #ff9ad0); box-shadow: 0 0 12px rgba(255, 95, 174, .6); }
.glr-switch input:checked + span::after { transform: translateX(20px); }
.glr-switch input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.glr-hero { display: flex; gap: 16px; align-items: center; padding: 18px 16px 20px; background: radial-gradient(60% 70% at 0% 100%, rgba(255, 130, 90, .18), transparent 70%), linear-gradient(160deg, rgba(64, 34, 74, .8), rgba(28, 16, 40, .95)); }
.glr-hero-moon { position: absolute; right: -18px; top: 6px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255, 210, 220, .38), rgba(200, 120, 160, .2) 55%, transparent 72%); box-shadow: 0 0 40px rgba(255, 150, 190, .18); pointer-events: none; }
.glr-hero > div { position: relative; flex: 1; min-width: 0; }
.glr-hero h3 { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 25px; font-weight: 500; }
.glr-hero h3 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glr .glr-edit { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.glr .glr-edit svg { width: 24px; height: 24px; }
.glr-name-form { display: flex; gap: 6px; }
.glr-name-form input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid rgba(255, 190, 60, .7); background: rgba(0, 0, 0, .3); color: #fff; font: inherit; font-size: 17px; }
.glr .glr-icon.is-save { width: 40px; height: 40px; background: rgba(255, 190, 60, .2); border: 1.5px solid #ffc542; color: var(--glr-gold); }
.glr .glr-icon.is-save svg { width: 22px; height: 22px; }
.glr-hero-league { margin: 6px 0 14px; display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: 16px; color: #c9d2ff; }
.glr-hero-league .glr-league-ic { width: 20px; height: 20px; }
.glr-hero-league.is-gold { color: var(--glr-gold); }
.glr-hero-league.is-diamond { color: #78c6ff; }
.glr-hero-league.is-bronze { color: #ff9a9a; }
.glr-level { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 400; color: var(--glr-muted); }
.glr-level span:first-child { color: #fff; }
.glr-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.glr-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ff5fa6, #ff9ccf); box-shadow: 0 0 10px rgba(255, 110, 180, .9); }

.glr-subtabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; border-radius: 20px; background: rgba(255, 255, 255, .03); border: 1px solid var(--glr-edge); }
.glr .glr-subtabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 2px solid transparent; border-radius: 15px; background: none; color: var(--glr-muted); font: inherit; font-weight: 400; font-size: 14px; cursor: pointer; white-space: nowrap; }
.glr .glr-subtabs button svg { width: 19px; height: 19px; flex: none; }
.glr .glr-subtabs button[aria-selected="true"] { color: #fff; font-weight: 500; background: linear-gradient(180deg, rgba(255, 90, 180, .4), rgba(140, 30, 110, .4)); border-color: #ff5fb8; box-shadow: 0 0 16px rgba(255, 80, 180, .6), inset 0 0 10px rgba(255, 80, 180, .25); }
.glr .glr-subtabs button[aria-selected="true"] svg { color: var(--glr-gold); }

.glr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.glr-stats p { margin: 0; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--glr-edge); display: flex; flex-direction: column; gap: 4px; }
.glr-stats small { color: var(--glr-muted); font-weight: 400; }
.glr-stats b { font-size: 21px; font-weight: 600; color: var(--glr-gold); font-variant-numeric: tabular-nums; }

.glr-medals { padding: 18px 16px 20px; }
.glr-medals h4, .glr-history-title { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 500; }
.glr-medals h4 .glr-crown, .glr-history-title .glr-crown { width: 32px; height: 22px; filter: drop-shadow(0 0 6px rgba(255, 197, 66, .7)); }
.glr-history-title { margin: 6px 4px 0; }
.glr-medal-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.glr-medal-row p { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0; }
.glr-medal-row b { font-size: 27px; font-weight: 600; line-height: 1.2; }
.glr-medal-row b.is-gold, .glr-medal-row small.is-gold { color: var(--glr-gold); }
.glr-medal-row b.is-silver { color: #e3e9f8; }
.glr-medal-row b.is-bronze { color: #ff8a6e; }
.glr-medal-row small { color: var(--glr-muted); font-weight: 400; font-size: 15px; }
.glr-medal-row p:nth-child(1) small { color: var(--glr-gold); }
.glr-medal-row p:nth-child(2) small { color: #e3e9f8; }
.glr-medal-row p:nth-child(3) small { color: #ff8a6e; }

.glr-rosette { position: relative; display: inline-grid; place-items: center; width: 66px; height: 66px; flex: none; }
.glr-rosette svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); }
.glr-rosette.is-gold svg { filter: drop-shadow(0 0 10px rgba(255, 197, 66, .7)); }
.glr-rosette.is-silver svg { filter: drop-shadow(0 0 8px rgba(190, 205, 255, .55)); }
.glr-rosette.is-bronze svg { filter: drop-shadow(0 0 8px rgba(255, 120, 90, .55)); }
.glr-rosette b { position: relative; font-size: 26px !important; font-weight: 700; color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.glr-history .glr-rosette { width: 50px; height: 50px; }
.glr-history .glr-rosette b { font-size: 20px !important; }

.glr-medal { position: relative; display: inline-grid; place-items: center; width: 44px; height: 51px; flex: none; }
.glr-medal svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.glr-medal b { position: relative; top: 9px; font-size: 14px !important; font-weight: 900; color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.glr-medal.is-gold svg { filter: drop-shadow(0 0 8px rgba(255, 210, 87, .8)); }
.glr-medal.is-big { width: 150px; height: 174px; }
.glr-medal.is-big b { top: 30px; font-size: 44px !important; }

.glr-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.glr-history li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 10px 8px 14px; border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1); }
.glr-history li.is-gold { border-color: rgba(255, 190, 80, .5); background: linear-gradient(90deg, rgba(255, 180, 70, .2), rgba(120, 60, 60, .18) 60%, rgba(255, 255, 255, .04)); box-shadow: inset 0 0 14px rgba(255, 180, 70, .12); }
.glr-history li > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.glr-history li > span:nth-child(2) b { position: relative; font-size: 17px; font-weight: 500; padding-left: 4px; }
.glr-history li > span:nth-child(2) b .glr-crown { position: absolute; left: -6px; top: -5px; width: 13px; height: 9px; }
.glr-history small { color: var(--glr-muted); font-size: 14px; }
.glr-history-xp { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.glr-history-xp b { font-size: 19px; font-weight: 600; color: var(--glr-gold); font-variant-numeric: tabular-nums; }
.glr-history-xp small { display: inline-flex; align-items: center; gap: 4px; }
.glr-history-xp svg { width: 14px; height: 14px; }
.glr-history li > svg { width: 22px; height: 22px; flex: none; color: rgba(255, 255, 255, .85); }

.glr-titles { display: flex; flex-direction: column; gap: 8px; }
.glr-titles p { margin: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--glr-edge); opacity: .55; }
.glr-titles p.is-on { opacity: 1; background: rgba(255, 255, 255, .08); }
.glr-titles .glr-title { font-size: 16px; }
.glr-titles p.glr-titles-note { opacity: 1; background: none; border: 0; padding: 4px 2px 0; color: var(--glr-muted); font-size: 13px; line-height: 1.45; }

/* Церемония */
.glr-ceremony {
  position: fixed; inset: 0; z-index: 160;
  display: grid; place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 42%, rgba(120, 30, 120, .7), rgba(20, 4, 30, .92));
  opacity: 0; transition: opacity .3s ease;
}
.glr-ceremony.is-open { opacity: 1; }
.glr-rays {
  position: absolute; left: 50%; top: 42%;
  width: 640px; height: 640px; margin: -320px 0 0 -320px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .28) 0 10deg, transparent 10deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%);
  mask: radial-gradient(circle, #000 18%, transparent 62%);
  animation: glr-spin 14s linear infinite;
  pointer-events: none;
}
.glr-ceremony.is-silver .glr-rays { background: repeating-conic-gradient(rgba(220, 230, 255, .26) 0 10deg, transparent 10deg 22deg); }
.glr-ceremony.is-bronze .glr-rays { background: repeating-conic-gradient(rgba(255, 170, 130, .26) 0 10deg, transparent 10deg 22deg); }
@keyframes glr-spin { to { transform: rotate(360deg); } }
.glr-ceremony-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #fff; max-width: 340px; }
.glr-ceremony-card .glr-medal { animation: glr-medal-in .9s cubic-bezier(.2, 1.4, .4, 1) both, glr-swing 3s ease-in-out .9s infinite; }
@keyframes glr-medal-in { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes glr-swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.glr-ceremony-season { margin: 0; font-weight: 800; color: #ffd8ec; letter-spacing: .03em; }
.glr-ceremony-card h2 { margin: 6px 0 0; font-size: 24px; text-shadow: 0 0 18px rgba(255, 210, 87, .7); }
.glr-ceremony-xp { margin: 0; font-size: 18px; font-weight: 900; color: #ffd257; }
.glr-ceremony .glr-take {
  margin-top: 12px; min-height: 52px; padding: 0 32px; border: 0; border-radius: 26px;
  font: inherit; font-size: 17px; font-weight: 900; color: #4a2600;
  background: linear-gradient(180deg, #fff1a8, #ffc83d 55%, #e39b17);
  box-shadow: 0 0 28px rgba(255, 200, 61, .8);
  cursor: pointer;
}

/* «В комнату зашёл ADMIN» */
.glr-admin {
  position: fixed; left: 50%; top: 22%; z-index: 170;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 30px; border-radius: 22px;
  color: #fff; pointer-events: none;
  background: linear-gradient(135deg, rgba(40, 6, 60, .92), rgba(120, 20, 80, .92));
  border: 1.5px solid #ffd257;
  box-shadow: 0 0 40px rgba(255, 210, 87, .7);
  animation: glr-admin 1.6s cubic-bezier(.2, .9, .3, 1) forwards;
}
.glr-admin small { font-size: 13px; font-weight: 700; color: #ffd8ec; }
.glr-admin b { font-size: 30px; font-weight: 900; letter-spacing: .14em; background: linear-gradient(90deg, #fff1a8, #ffc83d, #fff1a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glr-admin em { font-style: normal; font-size: 14px; font-weight: 700; }
.glr-admin-glow { position: absolute; inset: -2px; border-radius: inherit; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); background-size: 250% 100%; animation: glr-shine 1s ease forwards; }
@keyframes glr-admin { 0% { opacity: 0; transform: translate(-50%, -20px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px) scale(.96); } }
@keyframes glr-shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }

/* Админ-вкладка «Игры» (внутри обычной админки) */
.glr-admin-card { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--ui-border, #ddd); background: var(--ui-surface, #fff); }
.glr-admin-card header { display: flex; align-items: center; gap: 10px; }
.glr-admin-card header > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.glr-admin-card header small { color: var(--ui-muted, #666); font-size: 12px; overflow-wrap: anywhere; }
.glr-admin-card dl { margin: 12px 0; display: grid; gap: 6px; }
.glr-admin-card dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.glr-admin-card dt { color: var(--ui-muted, #666); }
.glr-admin-card dd { margin: 0; font-weight: 700; text-align: right; }
.glr-admin-warn { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: #fff1d6; color: #7a4a00; font-weight: 700; }
.glr-admin-owner { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid #d7aa3e; background: linear-gradient(145deg, #fff3b5, #f0cf73); color: #5a3b00; font-size: 13px; font-weight: 800; }
.glr-admin-resets { font-size: 13px; color: var(--ui-muted, #666); }
.glr-admin-reason { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.glr-admin-reason input { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ui-border, #ccc); font: inherit; }
.glr-admin-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.glr-admin-btn { min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ui-border, #ccc); background: var(--ui-panel, #fff); color: var(--ui-ink, #222); font: inherit; font-weight: 700; cursor: pointer; }
.glr-admin-btn.is-danger { background: #9e2b32; border-color: #9e2b32; color: #fff; }
.glr-admin-btn.is-soft { margin-top: 6px; }
.glr-admin-link { border: 0; background: none; font-size: 22px; cursor: pointer; }

@media (max-width: 370px) {
  .glr-screen { padding-left: 12px; padding-right: 12px; }
  .glr-ped-ring { width: 92px; height: 92px; }
  .glr-ped.is-1 .glr-ped-ring { width: 122px; height: 122px; }
  .glr-ava.is-lg { --size: 66px; }
  .glr-ava.is-xl { --size: 88px; }
  .glr-ped-name { font-size: 15px; }
  .glr-ped-xp { font-size: 18px; }
  .glr-row { grid-template-columns: 26px minmax(0, 1fr) 92px 60px; gap: 4px; padding: 3px 6px; }
  .glr-league { font-size: 13px; gap: 4px; }
  .glr-pts { font-size: 14px; }
  .glr .glr-subtabs button { font-size: 12.5px; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .glr, .glr *, .glr-ceremony, .glr-ceremony *, .glr-admin { animation: none !important; transition: none !important; }
  .glr-admin { opacity: 1; transform: translate(-50%, 0); }
}
.glr .glr-icon.is-report svg { width: 24px; height: 24px; color: #ffb4c4; }
