:root {
  --bg: #060912;
  --bg-2: #0c1220;
  --panel: #111a28;
  --panel-2: #172233;
  --line: #243044;
  --line-2: #2f3d52;
  --txt: #eef4fc;
  --muted: #8fa3be;
  --accent: #38bdf8;
  --accent-d: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, .14);
  --gold: #d4a84b;
  --gold-d: #a67c2e;
  --gold-soft: rgba(212, 168, 75, .14);
  --live: #22c55e;
  --live-soft: rgba(34, 197, 94, .12);
  --dead: #ef4444;
  --dead-soft: rgba(239, 68, 68, .12);
  --warn: #f59e0b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 16px 48px rgba(0, 0, 0, .45);
  --glow: 0 0 40px rgba(56, 189, 248, .18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, .08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(212, 168, 75, .06), transparent),
    var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}

code, pre, .mono {
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}

.profile-sidebar {
  width: 260px;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(180deg, rgba(14, 20, 34, .95) 0%, rgba(8, 11, 20, .98) 100%);
  overflow-y: auto;
}

.profile-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-height: 100%;
  padding: 28px 18px 24px;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.profile-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-bottom: 6px;
}

.profile-avatar-ring {
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  box-shadow: 0 0 28px rgba(56, 189, 248, .28);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--bg);
}

.profile-avatar-initials {
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--txt);
  background: linear-gradient(145deg, #1a2740, #121a2a);
}

.profile-card-intro {
  width: 100%;
  min-width: 0;
}

.profile-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--txt);
  line-height: 1.25;
  word-break: break-word;
}

.profile-online {
  display: none;
}

.profile-tg-id {
  display: none;
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.profile-tier {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.profile-stats {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(0, 0, 0, .18);
}

.profile-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.profile-stat + .profile-stat {
  border-top: 1px solid rgba(255, 255, 255, .05);
}

.profile-stat dt {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.profile-stat-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  font-size: 11px;
  color: var(--accent);
  background: rgba(56, 189, 248, .1);
  border: 1px solid rgba(56, 189, 248, .18);
}

.profile-stat dd {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--txt);
  text-align: right;
  line-height: 1.3;
  max-width: 140px;
  word-break: break-word;
}

.profile-stat dd.mono {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 10px;
  color: #c8d8ec;
}

.profile-tier.is-muted {
  color: #9aa8bc;
  opacity: .85;
}

.profile-redeem {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-redeem-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #9aa8bc);
}

.profile-redeem-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.profile-redeem-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .45);
  color: var(--txt, #e8eef7);
  padding: 0 10px;
  font-size: 11px;
}

.profile-redeem-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, .45);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .12);
}

.profile-redeem-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 11px;
  white-space: nowrap;
}

.profile-redeem-msg {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.profile-redeem-msg.is-ok { color: #7ddea3; }
.profile-redeem-msg.is-err { color: #f0a0a0; }

.profile-sub-hint {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #9aa8bc;
}

.profile-credits-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    linear-gradient(120deg, rgba(212, 168, 75, .18), rgba(212, 168, 75, .06)),
    rgba(212, 168, 75, .08);
  border: 1px solid rgba(212, 168, 75, .28);
}

.profile-credits-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #e8c878;
}

.profile-credits-value {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #f5d98b;
  text-shadow: 0 0 18px rgba(212, 168, 75, .35);
}

.profile-status-wrap {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 18px;
}

.profile-status-pill {
  width: 100%;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: lowercase;
  padding: 9px 12px;
  border-radius: 10px;
}

.profile-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
  flex-shrink: 0;
}

.profile-status-pill.run::before {
  animation: profile-pulse 1.2s ease-in-out infinite;
}

@keyframes profile-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.35); opacity: .45; }
}

.lol-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 32px;
  min-height: 56px;
  border-bottom: 1px solid rgba(212, 168, 75, .18);
  background:
    linear-gradient(180deg, rgba(12, 18, 30, .98), rgba(8, 12, 20, .95)),
    radial-gradient(ellipse at 0% 0%, rgba(56, 189, 248, .06), transparent 50%);
  flex-shrink: 0;
  z-index: 100;
}

.lol-header-start {
  display: contents;
}

.lol-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
  justify-self: start;
}

.lol-brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.lol-brand-name {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt);
  white-space: nowrap;
}

.lol-header-left {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.lol-logo-wrap { display: block; line-height: 0; }

.lol-logo {
  width: auto;
  height: 48px;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(56, 189, 248, .3));
}

.lol-title-block { min-width: 0; }

.lol-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.1;
}

.lol-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.lol-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  min-width: 0;
  justify-self: center;
}

.lol-nav-link {
  padding: 9px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s;
}

.lol-nav-link:hover { color: var(--txt); background: rgba(255,255,255,.04); }

.lol-nav-link.active {
  color: var(--accent);
  background: rgba(56, 189, 248, .12);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.lol-nav-drop .dropdown-menu { left: 0; right: auto; }

.dropdown-menu-gates {
  min-width: 280px;
  max-height: min(70vh, 440px);
  overflow-y: auto;
}

.dropdown-menu-gates a {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.dropdown-menu-gates .nav-gate-logo {
  display: block;
  width: 56px;
  height: 18px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  align-self: center;
  background: transparent;
}

.dropdown-menu-gates .nav-gate-logo.theme-att,
.dropdown-menu-gates img[src*="att.png"] {
  background: transparent !important;
  mix-blend-mode: normal !important;
}

.dropdown-menu-gates .nav-gate-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 18px;
  padding: 0;
  margin: 0;
}

.dropdown-menu-gates a.is-current {
  background: var(--accent-soft);
}

.lol-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
}

.mobile-nav-toggle { display: none; }
.nav-redeem { display: none; }
.nav-account { display: none; }
.mobile-nav-backdrop { display: none; }

.lol-content {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 48px;
  max-width: none;
  width: auto;
  margin: 0;
}

.content { flex: 1; }

.dropdown { position: relative; }

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.dropdown-trigger b { color: var(--accent); }

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 200;
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a,
.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--txt);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover { background: var(--panel-2); }

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.status-badge.run { background: rgba(245, 158, 11, .15); color: var(--warn); border-color: rgba(245, 158, 11, .35); }
.status-badge.ok { background: var(--live-soft); color: var(--live); border-color: rgba(34, 197, 94, .35); }
.status-badge.err { background: var(--dead-soft); color: var(--dead); border-color: rgba(239, 68, 68, .35); }

.page-shell { max-width: 900px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.4px;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.header-badge {
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #1a1204;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(212, 168, 75, .25);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.gate-label { color: var(--accent); font-weight: 600; }

.dash-block {
  background: rgba(14, 20, 32, .65);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  overflow: hidden;
}

.dash-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(212, 168, 75, .12);
  background: linear-gradient(90deg, rgba(212, 168, 75, .06), transparent);
}

.dash-block-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
}

.dash-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.dash-link:hover { text-decoration: underline; }

.dash-empty {
  margin: 0;
  padding: 24px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.section-subtitle { margin: 0 0 16px; font-size: 15px; font-weight: 700; }

.section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.field { display: block; margin-bottom: 16px; }
.field.compact { margin-bottom: 0; }

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field textarea,
.field input,
.field select,
.select-inline {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--txt);
  font-size: 14px;
}

.field textarea {
  font-family: "JetBrains Mono", Consolas, monospace;
  resize: vertical;
  min-height: 120px;
}

.field textarea:focus,
.field input:focus,
.field select:focus,
.select-inline:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--txt);
  cursor: pointer;
}

.field-check input { width: 17px; height: 17px; accent-color: var(--accent); }

.hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.hint.warn { color: #d97706; }
.hint.center { text-align: center; }
.hint code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 11px; }

.btn-primary,
.btn-ghost,
.btn-icon {
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}

.btn-primary {
  padding: 12px 22px;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #1a1204;
  box-shadow: 0 4px 18px rgba(212, 168, 75, .22);
}

.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.98); }

.btn-ghost {
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--txt);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-ghost:hover { border-color: var(--line-2); }
.btn-ghost.danger { color: var(--dead); border-color: rgba(239,68,68,.35); }

.btn-icon {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt);
}

.action-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.action-bar.hidden { display: none; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.tag.live { background: var(--live-soft); color: var(--live); }
.tag.dead { background: var(--dead-soft); color: var(--dead); }
.tag.error { background: rgba(245,158,11,.15); color: var(--warn); }

.placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 16px;
}

.hidden { display: none !important; }

body.nav-open {
  overflow: hidden;
}

.gate-pill {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-shell {
    position: relative;
  }

  .lol-header {
    display: contents;
  }

  .lol-header-left,
  .lol-brand {
    display: none;
  }

  .lol-header-right {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 10px;
    z-index: 220;
    gap: 6px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    width: 36px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
  }

  .app-body {
    display: contents;
  }

  .profile-sidebar {
    display: none;
  }

  .profile-card {
    display: grid;
    grid-template-columns: minmax(72px, auto) 1fr;
    align-items: center;
    gap: 8px 10px;
    padding: 4px 0;
    min-height: auto;
  }

  .profile-avatar-ring,
  .profile-card .profile-redeem,
  .profile-card .profile-sub-hint,
  .profile-status-wrap {
    display: none !important;
  }

  .profile-card-head {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0;
    padding: 0;
  }

  .profile-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
    vertical-align: middle;
  }

  .profile-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-width: 0;
  }

  .profile-stat-telegram {
    display: none !important;
  }

  .profile-tier {
    display: none !important;
  }

  .profile-tg-id {
    display: block;
  }

  .profile-stat,
  .profile-stat + .profile-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 0 8px;
    border: none;
    border-left: 1px solid rgba(15, 20, 30, .08);
  }

  .profile-stat:first-child {
    border-left: none;
    padding-left: 0;
  }

  .profile-stat dt {
    font-size: 9px;
  }

  .profile-stat-icon {
    display: none;
  }

  .profile-stat:last-child .profile-stat-icon {
    display: inline-grid;
    width: auto;
    height: auto;
    background: none;
    border: none;
    font-size: 10px;
  }

  .profile-stat dd {
    text-align: left;
    max-width: none;
    margin: 0;
    font-size: 11px;
  }

  .lol-nav {
    order: 2;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 201;
    display: flex;
    width: min(86vw, 340px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: calc(56px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px));
    border-bottom: none;
    background: #fff;
    box-shadow: -16px 0 40px rgba(0, 0, 0, .28);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: transform .28s ease, visibility 0s linear .28s;
  }

  .lol-nav.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform .28s ease, visibility 0s;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, .65);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
  }

  body.nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .tg-fab {
    opacity: 0;
    pointer-events: none;
  }

  .lol-header-right .logout-link {
    display: none;
  }

  .nav-account {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 10px;
    padding: 12px 12px 12px;
    border-radius: 14px;
    background: #f6f6f4;
  }

  .nav-account-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .nav-account-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0a0a0a;
    line-height: 1.2;
  }

  .nav-account-id {
    margin: 3px 0 0;
    font-size: 11px;
    color: #6b7280;
  }

  .nav-account-logout {
    flex-shrink: 0;
    padding: 4px 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: #6b7280;
  }

  .nav-account-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .nav-account-meta > div {
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid rgba(15, 20, 30, .1);
  }

  .nav-account-meta > div:first-child {
    padding-left: 0;
    border-left: none;
  }

  .nav-account-meta span {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9ca3af;
  }

  .nav-account-meta strong {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #0a0a0a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lol-nav .dropdown.open .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .lol-nav-checker .dropdown-menu {
    position: static;
    box-shadow: none;
    min-width: 0;
    max-height: min(42vh, 320px);
    overflow-y: auto;
  }

  .nav-redeem {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding: 16px 0 0;
    border-top: 1px solid rgba(15, 20, 30, .1);
    border-radius: 0;
    background: transparent;
  }

  .nav-redeem .profile-redeem-label {
    color: #0a0a0a;
    font-size: 11px;
    letter-spacing: .08em;
  }

  .nav-redeem .profile-redeem-row {
    display: none;
  }

  .nav-redeem .profile-redeem-input,
  .nav-redeem .profile-redeem-btn {
    width: 100%;
    height: 42px;
    border-radius: 10px;
  }

  .nav-redeem .profile-redeem-input {
    background: #f4f4f2;
    color: #0a0a0a;
    border: 1px solid rgba(15, 20, 30, .12);
    padding: 0 12px;
  }

  .nav-redeem .profile-redeem-input:focus {
    border-color: #0a0a0a;
    box-shadow: 0 0 0 2px rgba(10, 10, 10, .12);
  }

  .nav-redeem .profile-redeem-btn {
    border: none;
    background: #0a0a0a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .nav-redeem .profile-redeem-msg.is-ok { color: #166534; }
  .nav-redeem .profile-redeem-msg.is-err { color: #b91c1c; }

  .lol-content {
    order: 3;
    padding: 52px 12px 72px;
  }
}

@media (max-width: 420px) {
  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-stats {
    grid-column: 1 / -1;
  }
}

.profile-sidebar {
  display: none !important;
}

.profile-menu {
  position: relative;
}

.profile-menu-trigger {
  position: relative;
  z-index: 1020;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.profile-menu-trigger-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 50%;
  background: #0a0a0a;
  box-shadow: none;
  overflow: hidden;
}

.profile-menu-avatar {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  border-radius: 0;
  object-fit: contain;
  display: block;
  border: none;
}

.profile-menu-panel {
  position: fixed;
  top: calc(52px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  z-index: 1010;
  width: min(340px, calc(100vw - 24px));
  max-height: min(86vh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #f6f6f4;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

.profile-menu-panel[hidden] {
  display: none !important;
}

.profile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .32);
  border: none;
  padding: 0;
  cursor: pointer;
}

.profile-menu-backdrop[hidden] {
  display: none !important;
}

body.profile-menu-open {
  overflow: hidden;
}

body.profile-menu-open .lol-header {
  position: relative;
  z-index: 1020;
}

.profile-card.profile-card--menu {
  gap: 14px;
  padding: 18px 16px 14px;
  min-height: 0;
  background: transparent;
}

.profile-card--menu .profile-card-head {
  padding-bottom: 4px;
}

.profile-card--menu .profile-online {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
  vertical-align: middle;
}

.profile-card--menu .profile-tg-id {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
}

.profile-card--menu .profile-tier {
  display: inline-block;
  margin-top: 6px;
  color: #6b7280;
}

.profile-card--menu .profile-name {
  color: #0a0a0a;
  font-size: 17px;
}

.profile-card--menu .profile-stats {
  border-color: rgba(15, 20, 30, .08);
  background: #fff;
}

.profile-card--menu .profile-stat {
  grid-template-columns: 1fr auto;
}

.profile-card--menu .profile-stat-telegram {
  display: grid !important;
}

.profile-card--menu .profile-stat dt {
  color: #6b7280;
}

.profile-card--menu .profile-stat dd {
  color: #0a0a0a;
}

.profile-card--menu .profile-stat dd.mono {
  color: #111827;
}

.profile-card--menu .profile-redeem {
  border-top-color: rgba(15, 20, 30, .1);
}

.profile-card--menu .profile-redeem-label {
  color: #374151;
}

.profile-card--menu .profile-redeem-input {
  background: #fff;
  color: #0a0a0a;
  border-color: rgba(15, 20, 30, .12);
}

.profile-card--menu .profile-redeem-btn {
  color: #fff;
  background: #0a0a0a;
  border: none;
}

.profile-card--menu .profile-sub-hint {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.45;
}

.profile-card--menu .profile-status-wrap {
  display: flex;
  justify-content: center;
}

.profile-menu-foot {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 20, 30, .1);
}

.profile-menu-logout {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b7280;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(15, 20, 30, .08);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.profile-menu-logout:hover {
  color: #b91c1c;
  background: #fff;
  border-color: rgba(185, 28, 28, .25);
}

.tg-fab {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 400;
  display: flex;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(15, 20, 30, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}

.tg-fab img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  pointer-events: none;
}

.tg-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(15, 20, 30, .28);
}

.tg-fab:focus-visible {
  outline: 2px solid #26A5E4;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .tg-fab {
    width: 48px;
    height: 48px;
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .tg-fab img {
    width: 48px;
    height: 48px;
  }
}
