/* Accounts UI shared by the hub and /me/: the header chip, the Telegram login dialog, favourite stars, toast, switch.
   Uses the page's tokens (--navy, --blue, --cyan, --ice, --dim, --mut, --line, --f-head, --f-cond). */

/* ---------- header chip ---------- */
.acct { display: flex; align-items: center; min-height: 34px; }
.acct-btn, .acct-chip {
  position: relative; display: inline-flex; align-items: center; gap: 10px; isolation: isolate;
  padding: 7px 20px 7px 16px; border: 0; background: transparent; color: var(--navy); cursor: pointer; text-decoration: none;
  font: 700 14px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase;
}
.acct-btn::before, .acct-chip::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); box-shadow: 4px 4px 0 var(--blue);
  transition: transform .15s ease;
}
.acct-btn:hover::before, .acct-chip:hover::before, .acct-btn:focus-visible::before, .acct-chip:focus-visible::before { transform: translate(-2px, -2px); }
.acct-btn:focus-visible, .acct-chip:focus-visible { outline: none; }
.acct-chip { padding: 4px 18px 4px 6px; letter-spacing: .08em; text-transform: none; font: 600 15px/1 var(--f-cond); }
.acct-ava {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--blue); color: #fff; font: italic 900 14px/1 var(--f-head);
}
.acct-ava img { width: 100%; height: 100%; object-fit: cover; }
.acct-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 759px) {
  .acct-name { display: none; }
  .acct-chip { padding: 3px 12px 3px 5px; }
  .acct-btn { padding: 7px 14px 7px 12px; font-size: 13px; letter-spacing: .1em; }
}

/* ---------- login dialog ---------- */
.vgl { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: #020824cc; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vgl[hidden] { display: none; }
.vgl-panel {
  position: relative; width: min(100%, 520px); max-height: calc(100vh - 32px); overflow: auto;
  padding: 30px 34px 30px; color: #fff;
  background: linear-gradient(165deg, var(--sea), var(--navy) 50%, var(--deep));
  box-shadow: 0 0 0 1.5px #ffffffb0, 12px 12px 0 var(--blue);
  animation: vgl-in .22s ease-out;
}
@keyframes vgl-in { from { transform: translate(24px, 0) skewX(-4deg); opacity: 0; } }
.vgl-x { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--dim); font: 28px/1 var(--f-head); cursor: pointer; }
.vgl-x:hover, .vgl-x:focus-visible { color: #fff; outline: none; }
.vgl-kicker { margin: 0 0 8px; font: 500 13px/1 var(--f-cond); letter-spacing: .3em; text-transform: uppercase; color: var(--cyan); }
.vgl h2 { margin: 0 0 14px; font: italic 900 clamp(28px, 6vw, 38px)/1 var(--f-head); text-transform: uppercase; letter-spacing: -.02em; text-shadow: .06em .06em 0 var(--blue); }
.vgl-note { margin: 0 0 14px; padding: 8px 14px; background: #ffffff14; border-left: 3px solid var(--cyan); color: var(--ice); font-size: 14px; }
.vgl-note:empty { display: none; }
.vgl-steps { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.vgl-steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; color: var(--dim); font-size: 15px; }
.vgl-steps li::before { content: counter(s); flex: none; width: 24px; text-align: center; font: italic 900 18px/1 var(--f-head); color: var(--cyan); }
.vgl-steps b { color: #fff; }
.vgl-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.vgl-go {
  position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 15px 32px 15px 26px; isolation: isolate;
  color: var(--navy); text-decoration: none; font: 700 17px/1 var(--f-cond); letter-spacing: .16em; text-transform: uppercase;
}
.vgl-go::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); box-shadow: 6px 6px 0 var(--blue); transition: transform .15s; }
.vgl-go:hover::before, .vgl-go:focus-visible::before { transform: translate(-2px, -2px); }
.vgl-go:focus-visible { outline: none; }
.vgl-go[aria-disabled=true] { opacity: .5; pointer-events: none; }
.vgl-go svg { width: 20px; height: 20px; }
.vgl-qr { display: none; flex-direction: column; align-items: center; gap: 6px; font: 500 11px/1.2 var(--f-cond); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); text-align: center; }
.vgl-qr.on { display: flex; }
.vgl-qr i { display: block; width: 112px; height: 112px; padding: 6px; background: #fff; }
.vgl-qr svg { display: block; width: 100%; height: 100%; }
.vgl-status { display: flex; align-items: center; gap: 10px; min-height: 22px; margin: 22px 0 0; font: 500 15px/1.3 var(--f-cond); letter-spacing: .06em; color: var(--ice); }
.vgl-status::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--cyan); transform: rotate(45deg); animation: vgl-pulse 1s ease-in-out infinite alternate; }
.vgl-status.done::before { background: #6dff9a; animation: none; }
.vgl-status.bad::before { background: #ff6a5a; animation: none; }
@keyframes vgl-pulse { to { opacity: .25; transform: rotate(45deg) scale(.7); } }
.vgl-retry { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--cyan); font: inherit; text-decoration: underline; cursor: pointer; }
.vgl-fine { margin: 16px 0 0; font-size: 12px; color: var(--mut); }

/* ---------- favourite star on the game cards ---------- */
.slot { position: relative; display: grid; }
.fav {
  position: absolute; z-index: 3; top: 82px; right: 36px; width: 42px; height: 38px; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--navy); background: transparent; isolation: isolate;
  transition: transform .15s ease;
}
.fav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #ffffffe6; clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); box-shadow: 3px 3px 0 var(--blue); }
.fav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav:hover, .fav:focus-visible { transform: scale(1.1); outline: none; }
.fav[aria-pressed=true] { color: #ffe14a; }
.fav[aria-pressed=true]::before { background: var(--blue); }
.fav[aria-pressed=true] svg { fill: currentColor; stroke: #fff; }
.fav.pop { animation: fav-pop .35s ease-out; }
@keyframes fav-pop { 40% { transform: scale(1.35) rotate(-12deg); } }
@media (max-width: 759px) { .fav { top: 76px; right: 30px; } }

/* ---------- toast ---------- */
.vg-toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 70; transform: translate(-50%, 20px); opacity: 0;
  padding: 11px 26px; background: #fff; color: var(--navy); pointer-events: none;
  font: 600 15px/1.2 var(--f-cond); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: opacity .2s, transform .2s;
}
.vg-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .vgl-panel, .fav.pop { animation: none; }
}
