:root {
  --bg0: #03070d;
  --bg1: #07131f;
  --bg2: #0b1c2e;
  --ink: #f2fbff;
  --muted: #8fb0c8;
  --line: rgba(140, 220, 255, 0.14);
  --glass: rgba(8, 20, 34, 0.72);
  --glass-strong: rgba(5, 14, 26, 0.88);
  --blue: #2ec7ff;
  --blue-bright: #8cf0ff;
  --blue-soft: rgba(46, 199, 255, 0.16);
  --green: #3dd68c;
  --amber: #ffc14d;
  --danger: #ff6b7a;
  --purple: #5ec8ff;
  --accent: #7ef0ff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --font: "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 16px;
  --pad-x: 16px;
  --shell-gap: 14px;
  --list-cols: 1;
  --sidebar-w: 280px;
  --sheet-max-w: 100%;
  --glow: 0 0 32px rgba(80, 220, 255, 0.18);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg0);
  -webkit-tap-highlight-color: transparent;
}
body { padding-bottom: calc(18px + var(--safe-bot)); }

/* ===== Background ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(80, 210, 255, 0.22), transparent 62%),
    radial-gradient(720px 480px at 100% 100%, rgba(90, 70, 220, 0.22), transparent 58%),
    radial-gradient(620px 420px at 0% 70%, rgba(26, 167, 255, 0.16), transparent 60%),
    linear-gradient(
      160deg,
      #05070c 0%,
      #07111c 28%,
      #0a1a2e 52%,
      #071422 78%,
      #04060b 100%
    );
  background-size: 100% 100%, 100% 100%, 100% 100%, 320% 320%;
  animation: gradient-flow 22s ease infinite;
}
.bg-mesh {
  position: absolute;
  left: -40%;
  top: -40%;
  width: 180%;
  height: 180%;
  pointer-events: none;
  opacity: 0.55;
  background:
    conic-gradient(
      from 0deg at 50% 50%,
      transparent 0deg,
      rgba(0, 120, 255, 0.14) 55deg,
      transparent 110deg,
      rgba(0, 212, 255, 0.1) 180deg,
      transparent 240deg,
      rgba(107, 70, 193, 0.12) 300deg,
      transparent 360deg
    );
  animation: mesh-spin 36s linear infinite;
  will-change: transform;
}
.bg-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
  background: linear-gradient(
    112deg,
    transparent 0%,
    transparent 38%,
    rgba(0, 160, 255, 0.06) 44%,
    rgba(126, 232, 255, 0.16) 50%,
    rgba(0, 160, 255, 0.06) 56%,
    transparent 62%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: shimmer-bg 9s ease-in-out infinite;
}
.bg-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.55;
  will-change: transform;
}
.bg-aurora-a {
  width: 70vw;
  height: 70vw;
  left: -20vw;
  top: 10vh;
  background: radial-gradient(circle, rgba(0, 140, 255, 0.45), rgba(107, 70, 193, 0.2), transparent 70%);
  animation: aurora-drift-a 18s ease-in-out infinite;
}
.bg-aurora-b {
  width: 60vw;
  height: 60vw;
  right: -15vw;
  top: 35vh;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.35), rgba(0, 102, 255, 0.15), transparent 70%);
  animation: aurora-drift-b 22s ease-in-out infinite;
}
.bg-aurora-c {
  width: 55vw;
  height: 55vw;
  left: 25vw;
  bottom: -15vh;
  background: radial-gradient(circle, rgba(126, 232, 255, 0.28), rgba(56, 161, 105, 0.12), transparent 70%);
  animation: aurora-drift-c 26s ease-in-out infinite;
}
@keyframes aurora-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8vw, 6vh) scale(1.08); }
  66% { transform: translate(-4vw, 10vh) scale(0.95); }
}
@keyframes aurora-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(-10vw, -8vh) scale(1.1); }
  70% { transform: translate(6vw, 4vh) scale(0.92); }
}
@keyframes aurora-drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, -12vh) scale(1.06); }
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}
.bg-glow-a {
  width: 55vw; height: 55vw;
  left: -15vw; top: -10vw;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.28), rgba(0, 212, 255, 0.18), rgba(107, 70, 193, 0.14));
  background-size: 200% 200%;
  animation: pulse 7s ease-in-out infinite, gradient-flow 14s ease infinite;
}
.bg-glow-b {
  width: 45vw; height: 45vw;
  right: -12vw; bottom: -8vw;
  background: linear-gradient(135deg, rgba(0, 162, 255, 0.2), rgba(56, 161, 105, 0.1), rgba(0, 102, 255, 0.16));
  background-size: 200% 200%;
  animation: pulse 9s ease-in-out infinite reverse, gradient-flow 18s ease infinite reverse;
}
.bg-wave {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -8%;
  height: 42%;
  background:
    radial-gradient(60% 80% at 20% 100%, rgba(0, 162, 255, 0.45), transparent 70%),
    radial-gradient(50% 70% at 70% 110%, rgba(0, 102, 255, 0.35), transparent 65%),
    radial-gradient(40% 60% at 50% 100%, rgba(126, 232, 255, 0.2), transparent 60%);
  filter: blur(8px);
  opacity: 0.85;
  pointer-events: none;
  animation: aurora-shift 12s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}
@keyframes gradient-flow {
  0% { background-position: 0% 50%, 0% 50%, 0% 50%, 0% 50%; }
  50% { background-position: 0% 50%, 0% 50%, 0% 50%, 100% 50%; }
  100% { background-position: 0% 50%, 0% 50%, 0% 50%, 0% 50%; }
}
@keyframes mesh-spin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.04); }
  to { transform: rotate(360deg) scale(1); }
}
@keyframes shimmer-bg {
  0%, 100% { background-position: 200% 0; opacity: 0.65; }
  50% { background-position: -200% 0; opacity: 1; }
}
@keyframes shimmer-slide {
  0% { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(120%) skewX(-12deg); opacity: 0; }
}
@keyframes aurora-shift {
  0% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(18deg); }
  100% { filter: hue-rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow-a, .bg-glow-b, .bg-wave, .bg, .bg-aurora, .bg-mesh, .bg-shimmer,
  .brand-mark, .menu-btn::before, .stat-card b,
  .nf-name, .act-btn--start, .bot-hero-glow {
    animation: none !important;
  }
}

/* ===== App shell ===== */
.app {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: calc(12px + var(--safe-top)) var(--pad-x) 0;
}

.sidebar { display: none; }
.top-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(145deg, #1246b8, #062a70);
  box-shadow: 0 0 0 2px rgba(0, 162, 255, 0.45), var(--glow);
  flex: 0 0 auto;
}
.profile-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.verified {
  display: inline-grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.7);
}
.profile-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}
.profile-meta b, .profile-meta .accent {
  color: var(--blue-bright);
  font-weight: 700;
}

.gear-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: var(--blue-bright);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.gear-btn:active { transform: scale(0.96); }

/* ===== Stats (bots tab only) ===== */
.stats {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
body.tab-bots #stats {
  display: grid;
}
.stat {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.stat b {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}
.stat span {
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.content-head { margin: 4px 0 12px; }
.page-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ===== Toolbar ===== */
.toolbar { margin-bottom: 12px; }
.toolbar-row { margin-bottom: 10px; }
#search {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: var(--ink);
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 0.95rem;
  margin-bottom: 10px;
  outline: none;
}
#search::placeholder { color: rgba(158, 182, 216, 0.7); }
#search:focus {
  border-color: rgba(0, 162, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.chip.active {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow);
}

.view { display: none; padding-bottom: 28px; }
.view.active { display: block; animation: rise 0.35s ease both; }

/* ===== Cards / list (menu style) ===== */
.list {
  display: grid;
  grid-template-columns: repeat(var(--list-cols), minmax(0, 1fr));
  gap: 10px;
}
.card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 28px rgba(0, 20, 60, 0.25);
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.card:active { transform: scale(0.985); }
.card:hover {
  border-color: rgba(0, 162, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--glow);
}
.card-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--blue-soft);
  border: 1px solid rgba(0, 162, 255, 0.35);
  color: var(--blue-bright);
  font-size: 1.15rem;
  flex: 0 0 auto;
  box-shadow: 0 0 16px rgba(0, 102, 255, 0.25);
}
.card-ico.on { background: rgba(56, 161, 105, 0.18); border-color: rgba(56, 161, 105, 0.45); }
.card-ico.warn { background: rgba(221, 107, 32, 0.18); border-color: rgba(221, 107, 32, 0.45); }
.card-ico.off { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }

.fb-logo {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 5px rgba(94, 212, 255, 0.45));
}
.card-ico .fb-logo { width: 28px; height: 28px; }
.bot-avatar .fb-logo,
.nf-avatar .fb-logo {
  width: 36px;
  height: 36px;
  display: block;
}
.card-ico.on .fb-logo { filter: drop-shadow(0 0 5px rgba(93, 222, 160, 0.35)); }
.card-ico.warn .fb-logo { filter: drop-shadow(0 0 5px rgba(255, 176, 103, 0.4)); }
.card-ico.off .fb-logo { filter: drop-shadow(0 0 4px rgba(158, 182, 216, 0.25)); opacity: 0.88; }
.bot-avatar--off .fb-logo { opacity: 0.82; filter: drop-shadow(0 0 4px rgba(158, 182, 216, 0.2)); }
.card-body { flex: 1; min-width: 0; }
.nick {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 3px;
  line-height: 1.35;
}
.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.on { background: rgba(56, 161, 105, 0.2); color: #5ddea0; }
.badge.off { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.badge.warn { background: rgba(221, 107, 32, 0.2); color: #ffb067; }
.chev {
  color: var(--blue-bright);
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
}

.empty, .hidden { display: none !important; }
.empty:not(.hidden) {
  display: block !important;
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  grid-column: 1 / -1;
}

/* Mobile nav as stacked menu cards under title when needed — tabs are in sidebar on desktop;
   on mobile we show side-nav items as cards above content via cloning? 
   Actually mobile uses #tabs hidden in sidebar - need mobile tabs.
   Show side-nav on mobile as vertical menu cards before content when on "home"?
   Simpler: on mobile show .side-nav as horizontal? Or keep chips for filters and use page title + content.
   Better: on mobile, show nav-items as the first screen style - but we have 3 tabs.
   I'll show .side-nav on mobile as vertical glass cards (like screenshot 1). */

@media (max-width: 779px) {
  .sidebar {
    display: block;
    margin-bottom: 12px;
  }
  .sidebar .profile { display: none; }
  .side-support { display: none; }
  .content-head { display: block; margin-top: 2px; }

  /* Mobile: glass menu cards like screenshot 1 */
  .side-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
  }
  .nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    color: inherit;
    cursor: pointer;
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .nav-item.active {
    border-color: rgba(0, 162, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--glow);
    background: rgba(0, 102, 255, 0.22);
  }
  .nav-ico {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: var(--blue-soft);
    border: 1px solid rgba(0, 162, 255, 0.35);
    font-size: 1.2rem;
    box-shadow: 0 0 14px rgba(0, 102, 255, 0.25);
  }
  .nav-copy { flex: 1; min-width: 0; }
  .nav-copy strong { display: block; font-size: 1rem; font-weight: 750; }
  .nav-copy small { display: block; color: var(--muted); margin-top: 2px; font-size: 0.78rem; }
  .nav-chev { color: var(--blue-bright); font-size: 1.45rem; font-weight: 300; }
}

/* ===== Sheet (bot panel) ===== */
body.sheet-open { overflow: hidden; }

.sheet.hidden { display: none !important; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  pointer-events: auto;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 20, 0.78);
  backdrop-filter: blur(6px);
  animation: fade 0.22s ease;
  cursor: pointer;
  z-index: 0;
}
.sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, var(--sheet-max-w));
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0e2558 0%, #081428 38%, #060e22 100%);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(0, 162, 255, 0.35);
  border-bottom: 0;
  box-shadow:
    0 -20px 60px rgba(0, 60, 180, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: slide 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  touch-action: pan-y;
}
.sheet-drag {
  position: relative;
  flex: 0 0 auto;
  padding: 10px 16px 4px;
  cursor: grab;
  user-select: none;
}
.sheet-head {
  flex: 0 0 auto;
  padding: 10px 12px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sheet-head-bar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}
.sheet-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(0, 140, 255, 0.45);
  background: rgba(10, 24, 56, 0.9);
  color: var(--blue-bright);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.18);
}
.sheet-nav-btn:active { transform: scale(0.96); }
.sheet-handle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  cursor: grab;
  touch-action: none;
}
.sheet-handle-wrap:active { cursor: grabbing; }
.sheet-drag:active { cursor: grabbing; }
.sheet-handle {
  width: 48px; height: 5px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 auto 8px;
  box-shadow: 0 0 12px rgba(0, 162, 255, 0.35);
}
.sheet-close {
  position: relative;
  right: auto;
  top: auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 2;
  touch-action: manipulation;
}
.sheet-close:hover { border-color: rgba(0, 162, 255, 0.6); color: var(--blue-bright); }

#sheetBody {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px calc(22px + var(--safe-bot));
  scrollbar-width: thin;
}

/* Bot hero */
.bot-hero {
  position: relative;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 162, 255, 0.25);
  background: rgba(0, 40, 100, 0.35);
}
.bot-hero-glow {
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle at 30% 20%, rgba(0, 162, 255, 0.35), transparent 55%);
  pointer-events: none;
}
.bot-hero--on { border-color: rgba(56, 161, 105, 0.45); }
.bot-hero--on .bot-hero-glow {
  background: radial-gradient(circle at 30% 20%, rgba(56, 161, 105, 0.35), transparent 55%);
}
.bot-hero--warn { border-color: rgba(221, 107, 32, 0.5); }
.bot-hero--warn .bot-hero-glow {
  background: radial-gradient(circle at 30% 20%, rgba(221, 107, 32, 0.35), transparent 55%);
}
.bot-hero-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bot-avatar {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(145deg, #0066ff, #003d99);
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.45);
  flex: 0 0 auto;
}
.bot-avatar--on { background: linear-gradient(145deg, #2ecc71, #1a7a45); box-shadow: 0 0 20px rgba(46, 204, 113, 0.4); }
.bot-avatar--warn { background: linear-gradient(145deg, #f6ad55, #c05621); box-shadow: 0 0 20px rgba(246, 173, 85, 0.4); }
.bot-avatar--off { background: linear-gradient(145deg, #4a5568, #2d3748); box-shadow: none; }
.bot-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.bot-status-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bot-status-pill--on { background: rgba(56, 161, 105, 0.22); color: #5ddea0; }
.bot-status-pill--warn { background: rgba(221, 107, 32, 0.22); color: #ffb067; }
.bot-status-pill--off { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.bot-meta-row {
  position: relative;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.bot-meta-row .dot { opacity: 0.5; margin: 0 4px; }
.bot-stat-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.bot-stat-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bot-stat-item span {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(158, 182, 216, 0.85);
  margin-bottom: 4px;
}
.bot-stat-item b {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.bot-stat-item--wide b {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.bot-stat-item--wide { grid-column: 1 / -1; }
.bot-stats-panel {
  padding: 12px 14px 14px;
}
.bot-stat-highlight {
  text-align: center;
  padding: 14px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(0, 102, 255, 0.14);
  border: 1px solid rgba(0, 162, 255, 0.35);
}
.bot-stat-highlight span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-bright);
  margin-bottom: 6px;
}
.bot-stat-highlight b {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.bot-stat-lines {
  display: grid;
  gap: 6px;
}
.bot-stat-line {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(220, 232, 248, 0.92);
  word-break: break-word;
}
.stats-loading, .stats-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
.captcha-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(221, 107, 32, 0.15);
  border: 1px solid rgba(221, 107, 32, 0.4);
  color: #ffb067;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}
.captcha-banner .chev { margin-left: auto; font-size: 1.2rem; }
button.captcha-banner {
  width: 100%;
  border: 1px solid rgba(221, 107, 32, 0.4);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

/* Remote captcha browser (SOCKS of the bot) */
.cap-browser {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 8, 22, 0.72);
  backdrop-filter: blur(8px);
}
.cap-browser.hidden { display: none; }
.cap-browser-panel {
  width: min(520px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  background: #071428;
  border: 1px solid rgba(0, 140, 255, 0.28);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.cap-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}
.cap-browser-title { font-weight: 800; font-size: 0.95rem; }
.cap-browser-sub { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
.cap-browser-frame-wrap {
  position: relative;
  margin: 0 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 280px;
  touch-action: none;
}
.cap-browser-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  background: #111;
  user-select: none;
  -webkit-user-drag: none;
  cursor: crosshair;
  touch-action: manipulation;
  content-visibility: auto;
}
.cap-browser-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #9ec9ff;
  font-weight: 700;
  font-size: 0.9rem;
  pointer-events: none;
}
.cap-browser-loading.hidden { display: none; }
.cap-browser-actions {
  display: flex;
  gap: 8px;
  padding: 12px 12px 6px;
}
.cap-browser-actions .btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
}
.cap-browser-hint {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

/* Sections */
.bot-section {
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid rgba(0, 140, 255, 0.2);
  background: rgba(0, 20, 50, 0.45);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.bot-section > .section-label:first-child {
  padding: 12px 14px 0;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-bright);
}
.section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.section-head .section-label { margin: 0; }
.fold-chev {
  color: var(--blue-bright);
  font-size: 1rem;
  transition: transform 0.2s;
}
.bot-section--fold.collapsed .section-body { display: none; }
.bot-section--fold.collapsed .fold-chev { transform: rotate(-90deg); }
.section-body { padding: 0 12px 12px; }
.bot-section--form {
  padding: 12px 14px 14px;
  overflow: visible;
}
.bot-section--form .toggle-card {
  margin-left: 0;
  margin-right: 0;
}
.bot-section--form .act-btn--wide {
  width: 100%;
  margin-top: 4px;
}

.mod-block {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mod-block:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.mod-block-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.mod-block .toggle-card {
  margin-bottom: 8px;
}
.mod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.mod-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
}
.mod-chip.on {
  color: #fff;
  border-color: rgba(0, 162, 255, 0.55);
  background: rgba(0, 102, 255, 0.28);
}

.sheet-tabs.hidden { display: none !important; }

.bot-section--mods { padding-top: 8px; }

.mod-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}
.mod-row:last-child { margin-bottom: 0; }
.mod-row-body {
  flex: 1;
  min-width: 0;
}
.mod-row-info strong {
  display: block;
  font-size: 0.92rem;
}
.mod-row-info small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
  word-break: break-word;
}
.mod-cfg-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-self: center;
  border: 1px solid rgba(0, 162, 255, 0.35);
  border-radius: 14px;
  background: rgba(0, 40, 100, 0.35);
  color: var(--blue-bright);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, background 0.15s;
}
.mod-cfg-btn:active {
  transform: scale(0.96);
  background: rgba(0, 102, 255, 0.25);
}
.toggle-card--flat {
  margin-bottom: 0;
  background: rgba(0, 0, 0, 0.18);
}
.mod-subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mod-back-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.mod-subhead-title {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.mod-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
.mod-chips--wide { margin-top: 4px; }

/* Action buttons */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.action-grid--single {
  grid-template-columns: 1fr;
  padding-top: 0;
}
.act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 13px 10px;
  font-weight: 750;
  font-size: 0.88rem;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
}
.act-btn:active { transform: scale(0.97); }
.act-ico { font-size: 0.95rem; opacity: 0.95; }
.act-btn--start {
  background: linear-gradient(135deg, #0080ff, #00d4ff, #0066ff, #0080ff);
  background-size: 240% 240%;
  animation: gradient-flow 4s ease infinite;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.45);
}
.act-btn--stop {
  background: linear-gradient(135deg, rgba(180, 60, 80, 0.5), rgba(120, 30, 50, 0.65));
  color: #ffb4b4;
  border: 1px solid rgba(224, 83, 83, 0.45);
}
.act-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #e8f0ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.act-btn--wide { flex: 1; min-width: 0; }
.act-btn--icon { width: 44px; padding: 13px 0; flex: 0 0 44px; }

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.toggle-card:last-child { margin-bottom: 0; }
.toggle-copy strong { display: block; font-size: 0.92rem; }
.toggle-copy small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }

.grief-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 0 12px 14px;
}
.grief-row .act-btn--wide {
  flex: 1;
  min-width: 0;
}
.grief-input {
  width: 80px;
  min-width: 80px;
  flex: 0 0 80px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border-radius: 14px;
  padding: 12px 10px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
  -moz-appearance: textfield;
}
.grief-input::-webkit-outer-spin-button,
.grief-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.chat-compose {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.chat-compose input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 0.9rem;
  outline: none;
}
.chat-compose input:focus {
  border-color: rgba(0, 162, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}
.send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--glow);
  flex: 0 0 auto;
}
.chat-box {
  max-height: 280px;
  overflow: auto;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #dce8ff;
}
.sheet--chat {
  max-height: 98vh;
}
.sheet--chat .sheet-panel {
  max-height: 96vh;
  min-height: min(78vh, 720px);
}
.sheet--chat #sheetBody {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding-bottom: calc(12px + var(--safe-bot));
}
.sheet--chat .bot-hero--compact {
  flex: 0 0 auto;
  margin-bottom: 10px;
  padding: 12px 14px;
}
.sheet--chat .bot-hero--compact .bot-avatar {
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-radius: 12px;
}
.sheet--chat .bot-hero--compact .bot-name {
  font-size: 1rem;
}
.sheet--chat .bot-section--chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
}
.sheet--chat .bot-section--chat .chat-compose {
  flex: 0 0 auto;
  padding: 12px 12px 0;
  margin-bottom: 8px;
}
.sheet--chat .chat-box {
  flex: 1;
  min-height: min(56vh, 560px);
  max-height: none;
  height: auto;
  margin: 0 12px 12px;
  font-size: 0.95rem;
  line-height: 1.55;
}
.chat-line { margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.chat-line:last-child { border-bottom: 0; margin-bottom: 0; }
.chat-empty { text-align: center; padding: 12px; opacity: 0.7; }

.switch {
  width: 48px; height: 28px; border-radius: 999px;
  border: 0; background: rgba(255, 255, 255, 0.12);
  position: relative; cursor: pointer;
  flex: 0 0 auto;
}
.switch.on {
  background: linear-gradient(90deg, #0066ff, #00a2ff);
  box-shadow: 0 0 16px rgba(0, 102, 255, 0.55);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.switch.on::after { transform: translateX(20px); }

/* Legacy btn (autosda stop etc) */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
}
.btn.primary { background: var(--blue); color: #fff; box-shadow: var(--glow); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.btn.danger { background: rgba(224, 83, 83, 0.18); color: #ff8f8f; border: 1px solid rgba(224, 83, 83, 0.35); }
.btn:disabled { opacity: 0.5; }

.actions { display: none; }
.toggles { display: none; }
.field { display: none; }
.sheet h2 { display: none; }
.sheet .sub { display: none; }
.captcha-link { display: none; }
.price-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  box-shadow: var(--glow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bot));
  transform: translateX(-50%);
  background: #0c2255;
  border: 1px solid rgba(0, 162, 255, 0.45);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 60;
  box-shadow: var(--glow);
  max-width: min(90vw, 420px);
  text-align: center;
}

.gate {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: end center;
  background: linear-gradient(160deg, #001a44 0%, #0047ab 100%);
  padding: 24px 24px calc(40px + var(--safe-bot));
}
.gate.hidden { display: none !important; }
.gate-card {
  width: min(420px, 100%);
  text-align: center;
  margin-bottom: 8vh;
}
.gate-logo {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(145deg, #1246b8, #062a70);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.4), var(--glow);
}
.gate-card h1 { margin: 0 0 10px; font-size: 1.6rem; }
.gate-card p { color: rgba(220, 232, 255, 0.8); line-height: 1.45; margin: 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide {
  from { transform: translateY(24%); }
  to { transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ===== Desktop: sidebar + content ===== */
@media (min-width: 780px) {
  :root {
    --pad-x: 24px;
    --list-cols: 1;
    --sheet-max-w: 520px;
  }

  body.is-desktop {
    padding-bottom: 28px;
  }

  body.is-desktop .app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding-top: calc(20px + var(--safe-top));
  }

  body.is-desktop .top-mobile { display: none; }

  body.is-desktop .sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 16px;
    background: rgba(10, 24, 56, 0.45);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 50px rgba(0, 20, 60, 0.35);
    min-height: calc(100vh - 48px);
  }

  body.is-desktop .main {
    background: rgba(8, 18, 42, 0.28);
    border: 1px solid rgba(0, 140, 255, 0.14);
    border-radius: 22px;
    padding: 20px 22px 28px;
    backdrop-filter: blur(8px);
    min-height: calc(100vh - 48px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  body.is-desktop .side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
  }

  body.is-desktop .nav-item,
  body.is-desktop .side-support {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 14px;
    padding: 12px 12px;
    cursor: pointer;
    font: inherit;
  }
  body.is-desktop .nav-item:hover,
  body.is-desktop .side-support:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
  }
  body.is-desktop .nav-item.active {
    background: linear-gradient(135deg, #0066ff, #00a2ff, #0066ff);
    background-size: 200% 200%;
    animation: gradient-flow 4s ease infinite;
    color: #fff;
    box-shadow: var(--glow);
    outline: none;
  }
  body.is-desktop .nav-item.active .nav-copy small,
  body.is-desktop .nav-item.active .nav-chev { color: rgba(255, 255, 255, 0.85); }
  body.is-desktop .nav-ico {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1rem;
  }
  body.is-desktop .nav-item.active .nav-ico { background: rgba(255, 255, 255, 0.18); }
  body.is-desktop .nav-copy { flex: 1; }
  body.is-desktop .nav-copy strong { display: block; font-size: 0.92rem; color: inherit; }
  body.is-desktop .nav-copy small { display: none; }
  body.is-desktop .nav-chev { display: none; }

  body.is-desktop .side-support {
    margin-top: auto;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.15);
  }
  body.is-desktop .side-support .nav-copy small { display: block; color: var(--muted); font-size: 0.72rem; }
  body.is-desktop .side-support .nav-chev { display: inline; color: var(--blue-bright); }

  body.is-desktop .content-head { display: block; }
  body.is-desktop .page-title { font-size: 1.7rem; }

  body.is-desktop .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  body.is-desktop .stat { padding: 14px 10px; }
  body.is-desktop .stat b { font-size: 1.35rem; }

  body.is-desktop .toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
  }
  body.is-desktop #search { margin-bottom: 0; }
  body.is-desktop .chips { flex-wrap: wrap; overflow: visible; }

  body.is-desktop .list { --list-cols: 1; gap: 10px; }
  body.is-desktop .card:active { transform: none; }

  body.is-desktop .sheet { place-items: center; padding: 24px; }
  body.is-desktop .sheet-panel {
    max-height: min(90vh, 780px);
    border-radius: 22px;
    border-bottom: 1px solid rgba(0, 162, 255, 0.35);
    animation: pop 0.24s ease;
  }
  body.is-desktop .sheet-handle { display: block; }
  body.is-desktop .action-grid { grid-template-columns: repeat(4, 1fr); }
  body.is-desktop .sheet--chat .sheet-panel {
    max-height: min(92vh, 860px);
    min-height: min(82vh, 780px);
  }
  body.is-desktop .sheet--chat .chat-box {
    max-height: none;
    min-height: 520px;
    font-size: 1rem;
  }
  body.is-desktop .chat-box { max-height: 320px; }
  body.is-desktop .gate { place-items: center; }
  body.is-desktop .gate-card { margin-bottom: 0; }
}

@media (min-width: 1100px) {
  :root { --sidebar-w: 300px; }
  body.is-desktop .list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  :root { --pad-x: 12px; }
  .stats { gap: 6px; }
  .stat b, .stat-card b { font-size: 1rem; }
  .stat span, .stat-card span { font-size: 0.58rem; }
}

/* ===== v6 Command Center ===== */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 70%);
  pointer-events: none;
}

.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: -0.04em;
  color: #fff;
  background: linear-gradient(135deg, #0066ff, #00d4ff, #6b46c1, #0066ff);
  background-size: 280% 280%;
  animation: gradient-flow 5s ease infinite;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.45);
  flex-shrink: 0;
}
.brand-mark.sm { width: 36px; height: 36px; font-size: 0.72rem; border-radius: 11px; }
.brand-mark.lg { width: 72px; height: 72px; font-size: 1.4rem; margin: 0 auto 16px; border-radius: 20px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 2px 12px; }
.brand-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand-title.sm { font-size: 0.95rem; }
.brand-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.brand-sub .accent { color: var(--blue-bright); font-weight: 700; }

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.top-bar .top-brand {
  flex: 1;
  min-width: 0;
}
.top-bar .back-btn:not(.hidden) + .top-brand {
  margin-left: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 140, 255, 0.38);
  background: rgba(10, 24, 56, 0.62);
  backdrop-filter: blur(12px);
  color: var(--blue-bright);
  border-radius: 999px;
  padding: 8px 12px 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(0, 102, 255, 0.15);
}
.back-btn:active { transform: scale(0.97); }
.back-btn.hidden { display: none !important; }
.back-ico {
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
}
.back-txt { line-height: 1; }

.page-subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.page-subhead .page-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.page-subhead .back-btn {
  padding: 7px 11px 7px 9px;
  font-size: 0.78rem;
}

.sheet-drag {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px 8px;
  min-height: 44px;
}
.sheet-back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 6px 10px 6px 8px;
  font-size: 0.76rem;
}
.sheet-back .back-txt { display: none; }
@media (min-width: 400px) {
  .sheet-back .back-txt { display: none; }
}
.top-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icon-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--blue-bright);
  font-size: 1.1rem;
  cursor: pointer;
}

.stat-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(0, 162, 255, 0.15), rgba(126, 232, 255, 0.45), rgba(107, 70, 193, 0.2), rgba(0, 162, 255, 0.15));
  background-size: 220% 220%;
  animation: gradient-flow 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.stat-card b {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff, #7ee8ff, #ffffff, #b794ff);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 5s linear infinite;
}
.stat-card span { color: var(--muted); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card.warn b {
  background: linear-gradient(90deg, #ffb067, #ffd4a3, #ffb067);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.dash-card {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(14px);
}
.dash-card h3 { margin: 0 0 8px; font-size: 0.78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-num { margin: 0; font-size: 1.6rem; font-weight: 900; }
.dash-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.78rem; }
.hint-card {
  border: 1px dashed rgba(0, 162, 255, 0.35);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(0, 40, 100, 0.25);
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mass-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== Bots tab (clean list) ===== */
.bots-panel {
  margin: 0 0 14px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.bots-mass {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mass-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}
.mass-btn:active { transform: scale(0.97); }
.mass-ico {
  font-size: 1.05rem;
  line-height: 1;
}
.mass-start {
  border-color: rgba(56, 161, 105, 0.45);
  background: rgba(56, 161, 105, 0.12);
  color: #5ddea0;
}
.mass-stop {
  border-color: rgba(224, 83, 83, 0.4);
  background: rgba(224, 83, 83, 0.1);
  color: #ff9a9a;
}
.mass-recon {
  border-color: rgba(0, 162, 255, 0.45);
  background: rgba(0, 102, 255, 0.12);
  color: var(--blue-bright);
}
.bots-list { margin-top: 0; }
.bots-list .card {
  padding: 16px 14px;
  border-radius: 16px;
}
.bots-list .nick {
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.bots-list .meta {
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(158, 182, 216, 0.92);
}
.bots-list .card-right {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.bots-list .chev {
  opacity: 0.45;
  font-size: 1.1rem;
}

.pill {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.pill.ok { background: rgba(56, 161, 105, 0.2); border-color: rgba(56, 161, 105, 0.45); color: #5ddea0; }
.pill.danger { background: rgba(224, 83, 83, 0.15); border-color: rgba(224, 83, 83, 0.4); color: #ff9a9a; }

#ownerFilter {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 0.88rem;
  margin-bottom: 10px;
  outline: none;
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 8px 8px calc(8px + var(--safe-bot));
  background: rgba(5, 10, 31, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.bnav {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
}
.bnav span { font-size: 1.1rem; line-height: 1; }
.bnav small { font-size: 0.62rem; font-weight: 700; }
.bnav {
  outline: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.bnav.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.35), rgba(0, 212, 255, 0.25));
  box-shadow: 0 0 16px rgba(0, 140, 255, 0.35);
}

.side-refresh {
  width: 100%;
  margin-top: auto;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--blue-bright);
  border-radius: 14px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sheet-tabs {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sheet-tabs::-webkit-scrollbar { display: none; }
.stab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.stab.active { background: var(--blue); color: #fff; border-color: transparent; }

.friend-add {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: stretch;
}
.friend-add textarea,
.friend-add input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 96px;
  line-height: 1.35;
}
.friend-add-btn {
  flex: 0 0 auto;
  padding-left: 14px;
  padding-right: 14px;
  white-space: nowrap;
}
.friend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
}
.friend-idx {
  flex: 0 0 auto;
  width: 1.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}
.friend-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-rm {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 90, 90, 0.35);
  background: rgba(255, 90, 90, 0.12);
  color: #ff8a8a;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 0.85rem;
}

.auto-cmd-add {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.auto-cmd-add input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.88rem;
}
.auto-cmd-sec {
  flex: 0 0 4.5rem;
  text-align: center;
}
.auto-cmd-add-btn {
  flex: 0 0 auto;
  padding-left: 14px;
  padding-right: 14px;
}
.auto-cmd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auto-cmd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
}
.auto-cmd-idx {
  flex: 0 0 auto;
  width: 1.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}
.auto-cmd-text {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auto-cmd-text code {
  font-weight: 700;
}
.auto-cmd-rm {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 90, 90, 0.35);
  background: rgba(255, 90, 90, 0.08);
  color: #ff8a8a;
  border-radius: 10px;
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.mod-hint--warn {
  color: #ffb347;
}
.friends-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.sheet-body { overflow-y: auto; max-height: calc(88vh - 120px); padding: 0 14px 20px; }

.lookup-card {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.lookup-card h3 { margin: 0 0 8px; font-size: 1rem; }
.lookup-row { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; color: var(--muted); margin: 4px 0; }
.lookup-row b { color: #fff; }

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px 0 80px;
}
.pager button {
  border: 1px solid var(--line);
  background: var(--glass);
  color: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}

.field-row {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}
.field-row label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  word-break: break-word;
}
.field-row input, .field-row textarea, .field-row select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}
.field-row input[type="text"] {
  font-size: 0.82rem;
  overflow-x: auto;
}
.field-row textarea { min-height: 72px; resize: vertical; }

.ticket-reply {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ticket-card { cursor: default; }
.ticket-card .card-body { cursor: pointer; }

body.is-desktop .bottom-nav { display: none; }
body.is-desktop .top-bar { display: none; }
body.is-desktop .sidebar .side-nav .nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  outline: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
body.is-desktop .sidebar .nav-item.active {
  background: linear-gradient(135deg, #0066ff, #00a2ff, #0066ff);
  background-size: 200% 200%;
  animation: gradient-flow 4s ease infinite;
  color: #fff;
  box-shadow: var(--glow);
}

@media (max-width: 779px) {
  body.is-mobile .sidebar { display: none; }
  body.is-mobile .main { padding-bottom: calc(72px + var(--safe-bot)); }
  body.is-mobile .sidebar .brand { display: none; }
  .stats { margin-top: 0; }
}

#accSearch {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 0.95rem;
  margin-bottom: 10px;
  outline: none;
}

/* ===== NightFlow Home ===== */
.view-home {
  padding-top: 4px;
  animation: rise 0.4s ease both;
}

.nf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.nf-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nf-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(145deg, #0d3d99, #051a44);
  box-shadow:
    0 0 0 2px rgba(0, 162, 255, 0.55),
    0 0 28px rgba(0, 102, 255, 0.45);
  flex-shrink: 0;
}

.nf-name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(90deg, #fff 0%, #7ee8ff 45%, #fff 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 6s ease infinite;
}

.nf-verified {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  vertical-align: middle;
  box-shadow: 0 0 12px rgba(0, 102, 255, 0.8);
}

.nf-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
}

.nf-sub b {
  color: var(--blue-bright);
  font-weight: 800;
}

.nf-gear {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0, 140, 255, 0.35);
  background: rgba(10, 24, 56, 0.55);
  backdrop-filter: blur(12px);
  color: var(--blue-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nf-gear:active {
  transform: scale(0.96);
}

.nf-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nf-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: 1px solid rgba(0, 140, 255, 0.42);
  background: rgba(8, 22, 54, 0.52);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 16px 18px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  box-shadow:
    0 0 22px rgba(0, 102, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.nf-card:active {
  transform: scale(0.985);
}

.nf-card:hover {
  border-color: rgba(0, 162, 255, 0.65);
  box-shadow:
    0 0 28px rgba(0, 102, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nf-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--blue-bright);
  background: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 162, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 102, 255, 0.2);
}

.nf-ico svg {
  width: 24px;
  height: 24px;
}

.nf-copy {
  flex: 1;
  min-width: 0;
}

.nf-copy strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.nf-copy small {
  display: block;
  color: rgba(158, 182, 216, 0.92);
  font-size: 0.78rem;
  line-height: 1.35;
}

.nf-chev {
  flex-shrink: 0;
  color: var(--blue-bright);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.95;
}

body.tab-home .top-bar,
body.tab-home #stats {
  display: none !important;
}

body.tab-home.is-mobile .bottom-nav {
  display: none !important;
}

body.tab-home.is-mobile .main {
  padding-bottom: calc(24px + var(--safe-bot));
}

body.is-desktop.tab-home .main {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding-left: 0;
  padding-right: 0;
}

body.is-desktop.tab-home .sidebar {
  min-height: auto;
}

@media (min-width: 780px) {
  .nf-menu {
    max-width: 520px;
  }
}

/* ===== TG Main Menu Grid ===== */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-row {
  display: grid;
  gap: 10px;
}
.menu-row-2 {
  grid-template-columns: 1fr 1fr;
}
.menu-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 120, 255, 0.35);
  background: rgba(14, 28, 58, 0.72);
  backdrop-filter: blur(14px);
  color: #fff;
  border-radius: 14px;
  padding: 15px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 18px rgba(0, 20, 60, 0.28);
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}
.menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(126, 232, 255, 0.16) 50%,
    transparent 65%
  );
  transform: translateX(-120%) skewX(-12deg);
  animation: shimmer-slide 5s ease-in-out infinite;
  pointer-events: none;
}
.menu-btn:nth-child(2)::before { animation-delay: 0.8s; }
.menu-row:nth-child(2) .menu-btn::before { animation-delay: 0.5s; }
.menu-row:nth-child(3) .menu-btn::before { animation-delay: 1.2s; }
.menu-row:nth-child(4) .menu-btn::before { animation-delay: 0.3s; }
.menu-row:nth-child(5) .menu-btn::before { animation-delay: 1.6s; }
.menu-row:nth-child(6) .menu-btn::before { animation-delay: 0.9s; }
.menu-row:nth-child(7) .menu-btn::before { animation-delay: 1.4s; }
.menu-btn:active {
  transform: scale(0.985);
}
.menu-btn:hover {
  border-color: rgba(0, 162, 255, 0.55);
  background: rgba(18, 36, 78, 0.82);
}
.menu-btn-wide {
  width: 100%;
}
.menu-btn-ghost {
  background: rgba(8, 18, 42, 0.55);
  color: var(--muted);
  font-weight: 600;
}
.menu-btn-admin {
  border-color: rgba(107, 70, 193, 0.55);
  background: rgba(40, 20, 70, 0.45);
}

.page-content {
  background: rgba(8, 22, 54, 0.38);
  border: 1px solid rgba(0, 140, 255, 0.35);
  border-radius: var(--radius);
  padding: 0;
  line-height: 1.55;
  font-size: 0.94rem;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.12);
}
.page-content b { color: #fff; font-weight: 700; }
.page-content i { color: var(--muted); font-style: italic; }
.page-content code {
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.88em;
  color: var(--blue-bright);
  border: 1px solid rgba(0, 140, 255, 0.25);
}
.page-content a { color: var(--blue-bright); text-decoration: none; }
.page-content a:hover { text-decoration: underline; }

.screen-title {
  padding: 16px 16px 12px;
  font-size: 1.12rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(0, 140, 255, 0.15);
  line-height: 1.3;
}
.screen-title b,
.screen-title strong { font-weight: inherit; }

.screen-card {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
}

.screen-kv {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 140, 255, 0.1);
}
.screen-kv:last-of-type { border-bottom: none; }

.screen-k {
  color: rgba(196, 214, 240, 0.92);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
}

.screen-v {
  color: #f2f7ff;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}
.screen-v strong { color: #fff; font-weight: 700; }
.screen-v i { color: var(--muted); font-style: italic; }

.screen-info {
  padding: 8px 0;
  line-height: 1.5;
  border-bottom: 1px solid rgba(0, 140, 255, 0.06);
}
.screen-info .screen-k {
  display: inline;
  margin-right: 6px;
}
.screen-info .screen-v {
  display: inline;
}

.screen-section {
  margin: 14px 0 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 140, 255, 0.22);
  font-weight: 800;
  font-size: 0.96rem;
  color: #fff;
  line-height: 1.35;
}

.screen-note {
  padding: 2px 0 8px;
  color: rgba(160, 180, 210, 0.95);
  font-size: 0.84rem;
  font-style: italic;
  line-height: 1.45;
}

.screen-gap {
  height: 6px;
}

.screen-raw {
  padding: 6px 0;
  line-height: 1.5;
}

.val-pill {
  display: inline-block;
  background: rgba(0, 0, 0, 0.42);
  padding: 4px 10px;
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88rem;
  color: var(--blue-bright);
  border: 1px solid rgba(0, 140, 255, 0.28);
  line-height: 1.3;
  vertical-align: middle;
}

.screen-empty {
  color: var(--muted);
}

.screen-body { padding: 16px; }

.page-content .screen-card,
.page-content .screen-body {
  color: rgba(230, 240, 255, 0.95);
}
.page-content .screen-hint,
.page-content i {
  color: var(--muted);
  font-size: 0.88rem;
}
.page-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-actions .menu-btn {
  text-align: left;
  padding: 13px 14px;
}

.create-bot-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(8, 22, 54, 0.55);
  border: 1px solid rgba(0, 140, 255, 0.35);
  border-radius: var(--radius);
}
.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(196, 214, 240, 0.9);
  letter-spacing: 0.02em;
}
.create-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 140, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 1rem;
}
.create-input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.25);
}
.key-input {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.menu-btn-primary {
  border-color: rgba(0, 140, 255, 0.55);
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.35), rgba(0, 60, 160, 0.45));
  text-align: center;
  font-weight: 800;
}
.menu-btn-primary:disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ===== Performance: mobile / weak devices ===== */
.fb-logo-mark {
  display: inline-grid;
  place-items: center;
  width: var(--fb-size, 34px);
  height: var(--fb-size, 34px);
  border-radius: 30%;
  font-weight: 900;
  font-size: calc(var(--fb-size, 34px) * 0.34);
  letter-spacing: -0.04em;
  color: #fff;
  background: linear-gradient(135deg, #0066ff, #00a2ff);
  flex-shrink: 0;
}

.view {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}
.view:not(.active) {
  content-visibility: hidden;
}

html.perf-mobile .bg-glow,
html.perf-mobile .bg-wave {
  display: none;
}
html.perf-mobile .bg-aurora {
  filter: blur(42px);
  opacity: 0.48;
}
html.perf-mobile .bg-aurora-c {
  display: none;
}
html.perf-mobile .bg-mesh {
  opacity: 0.42;
  animation-duration: 44s;
}
html.perf-mobile .bg-shimmer {
  animation-duration: 11s;
}
html.perf-mobile .bg {
  animation: gradient-flow 26s ease infinite !important;
}
html.perf-mobile .bg-grid {
  opacity: 0.4;
}

html.perf-mobile .card,
html.perf-mobile .stat-card,
html.perf-mobile .gate-card,
html.perf-mobile .sheet-panel,
html.perf-mobile .sheet-backdrop,
html.perf-mobile .sidebar,
html.perf-mobile .main,
html.perf-mobile .page-content,
html.perf-mobile .menu-btn,
html.perf-mobile .bottom-nav,
html.perf-mobile .bot-section,
html.perf-mobile .toggle-card,
html.perf-mobile .profile,
html.perf-mobile .top-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.perf-mobile .view.active,
html.perf-mobile .sheet-panel,
html.perf-mobile .nav-item.active,
html.perf-mobile .bnav.active,
html.perf-mobile .brand-mark,
html.perf-mobile .menu-btn::before,
html.perf-mobile .act-btn--start {
  animation: none !important;
}
html.perf-mobile .nav-item.active,
html.perf-mobile .bnav.active {
  background: var(--blue) !important;
  background-size: 100% 100% !important;
}
html.perf-mobile .menu-btn::before {
  display: none !important;
}
html.perf-mobile .brand-mark {
  background: linear-gradient(135deg, #0066ff, #00a2ff) !important;
  background-size: 100% 100% !important;
}

html.perf-lite .bg-glow,
html.perf-lite .bg-wave,
html.perf-lite .bg-aurora {
  display: none !important;
}
html.perf-lite .bg-mesh {
  opacity: 0.38;
  animation-duration: 52s;
}
html.perf-lite .bg-shimmer {
  opacity: 0.75;
  animation-duration: 14s;
}
html.perf-lite .bg {
  animation: gradient-flow 30s ease infinite !important;
}
html.perf-lite .stat-card b,
html.perf-lite .nf-name,
html.perf-lite .bot-hero-glow,
html.perf-lite .card:active {
  animation: none !important;
}
html.perf-lite * {
  scroll-behavior: auto !important;
}
html.perf-lite .card,
html.perf-lite .sheet-panel,
html.perf-lite .sidebar,
html.perf-lite .main {
  box-shadow: none;
}

@media (max-width: 779px) {
  .sheet-panel {
    animation: none !important;
  }
  .sheet-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(2, 6, 20, 0.88);
  }
}

/* ===== v51 Ice Glass ===== */
.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 86px;
  padding: 16px 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(140, 220, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 42%, rgba(8, 16, 28, 0.55) 100%),
    rgba(10, 18, 32, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.menu-btn-wide {
  flex-direction: row;
  justify-content: flex-start;
  min-height: 62px;
  padding: 14px 16px;
  gap: 12px;
  text-align: left;
}
.mb-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.15rem;
  background: rgba(26, 167, 255, 0.12);
  border: 1px solid rgba(110, 231, 255, 0.18);
  box-shadow: 0 0 16px rgba(80, 210, 255, 0.12);
  flex-shrink: 0;
}
.menu-btn-wide .mb-ico {
  width: 40px;
  height: 40px;
}
.mb-txt {
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #f4fbff;
}
.menu-btn:hover {
  border-color: rgba(110, 231, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(110, 231, 255, 0.12) 0%, rgba(26, 167, 255, 0.06) 100%),
    rgba(12, 24, 42, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--glow);
}
.menu-btn-admin {
  border-color: rgba(124, 108, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(124, 108, 255, 0.16) 0%, rgba(8, 16, 28, 0.55) 100%),
    rgba(22, 14, 42, 0.7);
}
.menu-btn-admin .mb-ico {
  background: rgba(124, 108, 255, 0.18);
  border-color: rgba(124, 108, 255, 0.35);
}

.nf-header {
  padding: 4px 2px 6px;
}
.nf-avatar {
  background: linear-gradient(145deg, #1aa7ff, #6ee7ff 55%, #7c6cff);
  box-shadow:
    0 0 0 2px rgba(110, 231, 255, 0.35),
    0 0 28px rgba(26, 167, 255, 0.35);
}
.nf-gear {
  border-color: rgba(140, 220, 255, 0.2);
  background: rgba(10, 18, 32, 0.7);
}

.card {
  border-color: rgba(140, 220, 255, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(8,16,28,0.55));
}
.card:hover {
  border-color: rgba(110, 231, 255, 0.45);
}
.card-ico {
  background: rgba(26, 167, 255, 0.14);
  border-color: rgba(110, 231, 255, 0.28);
  box-shadow: 0 0 16px rgba(26, 167, 255, 0.18);
}

.stat-card {
  border-color: rgba(140, 220, 255, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(8,16,28,0.5));
}

.brand-mark {
  background: linear-gradient(135deg, #1aa7ff, #6ee7ff, #7c6cff, #1aa7ff);
  box-shadow: 0 0 22px rgba(80, 210, 255, 0.4);
}

.page-content {
  background: rgba(8, 14, 24, 0.55);
  border-color: rgba(140, 220, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}
.screen-title {
  border-bottom-color: rgba(140, 220, 255, 0.1);
}

.chip.active,
.nav-item.active,
.bnav.active {
  box-shadow: 0 0 22px rgba(26, 167, 255, 0.28);
}

.bottom-nav {
  background: rgba(6, 10, 18, 0.86);
  border-top: 1px solid rgba(140, 220, 255, 0.12);
  backdrop-filter: blur(18px);
}

.sheet-panel {
  background: linear-gradient(180deg, rgba(14, 22, 36, 0.96), rgba(6, 10, 18, 0.98));
  border-color: rgba(140, 220, 255, 0.16);
}

.gate-card {
  background: linear-gradient(180deg, rgba(16, 26, 42, 0.92), rgba(6, 10, 18, 0.94));
  border: 1px solid rgba(140, 220, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), var(--glow);
}

.menu-btn-primary {
  background: linear-gradient(135deg, #1aa7ff, #6ee7ff);
  color: #041018;
  border: 0;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(26, 167, 255, 0.32);
}

html.perf-mobile .brand-mark {
  background: linear-gradient(135deg, #1aa7ff, #6ee7ff) !important;
}
/* ===== Frozen Ice redesign v60 ===== */
.bg {
  background:
    radial-gradient(880px 480px at 50% -18%, rgba(90, 220, 255, 0.2), transparent 60%),
    radial-gradient(640px 420px at 110% 90%, rgba(40, 150, 200, 0.14), transparent 58%),
    radial-gradient(560px 380px at -10% 70%, rgba(30, 180, 220, 0.12), transparent 62%),
    linear-gradient(165deg, #03070d 0%, #061220 34%, #0a1d30 58%, #071624 82%, #02060b 100%) !important;
}
.bg-aurora-a {
  background: radial-gradient(circle, rgba(70, 210, 255, 0.35), rgba(20, 90, 140, 0.12), transparent 70%) !important;
}
.bg-aurora-b {
  background: radial-gradient(circle, rgba(120, 235, 255, 0.28), rgba(30, 120, 180, 0.1), transparent 70%) !important;
}
.bg-aurora-c {
  background: radial-gradient(circle, rgba(80, 200, 220, 0.22), rgba(40, 160, 140, 0.08), transparent 70%) !important;
}
.bg-frost {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.04) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.03) 0 1px, transparent 1.5px),
    radial-gradient(circle at 40% 80%, rgba(180,240,255,0.04) 0 1px, transparent 1.5px);
  background-size: 48px 48px, 62px 62px, 40px 40px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px !important;
  padding: 18px 18px 16px !important;
  margin-bottom: 18px !important;
  border: 1px solid rgba(140, 230, 255, 0.2) !important;
  background:
    linear-gradient(145deg, rgba(18, 42, 64, 0.82), rgba(8, 18, 32, 0.9)),
    radial-gradient(120% 90% at 100% 0%, rgba(90, 220, 255, 0.18), transparent 55%) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(18px);
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -40%;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle, rgba(126, 240, 255, 0.16), transparent 68%);
  pointer-events: none;
}
.nf-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
  font-weight: 700;
  margin-bottom: 2px;
  opacity: 0.9;
}
.nf-name {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.nf-sub {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px !important;
}
.pill-soft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(126, 240, 255, 0.08);
  border: 1px solid rgba(126, 240, 255, 0.16);
  color: var(--muted);
  font-size: 0.82rem;
}
.pill-soft b { color: var(--ink); font-weight: 800; }

.menu-section-label {
  margin: 14px 2px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(140, 200, 230, 0.72);
}
.menu-section-label:first-child { margin-top: 2px; }

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 28px;
}
.menu-row {
  display: grid;
  gap: 8px;
}
.menu-row-2 {
  grid-template-columns: 1fr 1fr;
}
.menu-btn {
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  min-height: 92px !important;
  padding: 14px 14px 12px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(140, 220, 255, 0.14) !important;
  background:
    linear-gradient(160deg, rgba(14, 30, 48, 0.88), rgba(7, 16, 28, 0.92)),
    radial-gradient(120% 100% at 0% 0%, rgba(80, 200, 255, 0.1), transparent 50%) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  backdrop-filter: blur(14px);
  text-align: left !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(140, 240, 255, 0.08) 48%, transparent 66%);
  transform: translateX(-120%);
  animation: shimmer-slide 7.5s ease-in-out infinite;
  pointer-events: none;
}
.menu-btn:hover {
  border-color: rgba(140, 230, 255, 0.32) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,0.3), 0 0 0 1px rgba(126,240,255,0.08), var(--glow) !important;
  transform: translateY(-1px);
}
.menu-btn:active { transform: scale(0.985); }
.menu-btn-wide {
  min-height: 78px !important;
  width: 100%;
}
.mb-ico {
  font-size: 1.35rem !important;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(126, 240, 255, 0.25));
}
.mb-txt {
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
}
.mb-hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
  font-weight: 500;
}
.menu-btn-accent {
  border-color: rgba(255, 193, 77, 0.28) !important;
  background:
    linear-gradient(160deg, rgba(42, 34, 18, 0.9), rgba(12, 20, 30, 0.94)),
    radial-gradient(120% 100% at 100% 0%, rgba(255, 193, 77, 0.16), transparent 55%) !important;
}
.menu-btn-accent .mb-hint { color: rgba(255, 210, 140, 0.75); }
.menu-btn-admin {
  border-color: rgba(255, 107, 122, 0.28) !important;
  background:
    linear-gradient(160deg, rgba(40, 16, 24, 0.9), rgba(10, 14, 24, 0.94)),
    radial-gradient(120% 100% at 0% 0%, rgba(255, 107, 122, 0.14), transparent 55%) !important;
}

.page-subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.page-title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
}
.back-btn {
  border-radius: 14px !important;
  border: 1px solid rgba(140, 220, 255, 0.16) !important;
  background: rgba(10, 22, 36, 0.8) !important;
  backdrop-filter: blur(12px);
}
.page-content.html-screen {
  animation: fade-up 0.28s ease;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.screen-title {
  margin-bottom: 12px !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
.screen-card {
  border-radius: 22px !important;
  border: 1px solid rgba(140, 220, 255, 0.14) !important;
  background:
    linear-gradient(180deg, rgba(12, 28, 44, 0.88), rgba(6, 14, 24, 0.94)) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  padding: 16px !important;
  backdrop-filter: blur(16px);
}
.screen-kv, .screen-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(140, 220, 255, 0.08);
}
.screen-kv:last-child, .screen-info:last-child { border-bottom: 0; }
.screen-k {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.screen-v {
  text-align: right;
  font-weight: 700;
  color: var(--ink);
}
.val-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(126, 240, 255, 0.12);
  border: 1px solid rgba(126, 240, 255, 0.18);
  color: var(--blue-bright);
  font-weight: 700;
  font-size: 0.84rem;
}
.screen-section {
  margin: 12px 0 6px;
  font-weight: 800;
  color: var(--blue-bright);
  letter-spacing: -0.01em;
}
.screen-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}
.page-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 24px;
}
.page-actions .menu-btn {
  min-height: 56px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 800;
}

.stat-card {
  border-radius: 18px !important;
  border: 1px solid rgba(140, 220, 255, 0.14) !important;
  background: linear-gradient(160deg, rgba(12, 28, 44, 0.85), rgba(6, 14, 24, 0.9)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
}
.bots-mass {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.mass-btn {
  border-radius: 16px !important;
  border: 1px solid rgba(140, 220, 255, 0.14) !important;
  background: rgba(10, 22, 36, 0.85) !important;
  padding: 12px 8px !important;
  font-weight: 700;
}
.mass-start { border-color: rgba(61, 214, 140, 0.35) !important; color: #7dffb5; }
.mass-stop { border-color: rgba(255, 107, 122, 0.35) !important; color: #ff9aa5; }
.mass-recon { border-color: rgba(126, 240, 255, 0.3) !important; color: var(--blue-bright); }

.bottom-nav {
  background: rgba(4, 10, 18, 0.9) !important;
  border-top: 1px solid rgba(140, 220, 255, 0.12) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.35);
}
.bnav.active, .nav-item.active {
  color: var(--blue-bright) !important;
  box-shadow: 0 0 24px rgba(80, 210, 255, 0.22) !important;
}
.sheet-panel {
  background: linear-gradient(180deg, rgba(10, 22, 36, 0.98), rgba(4, 10, 18, 0.99)) !important;
  border-color: rgba(140, 220, 255, 0.16) !important;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.45), var(--glow) !important;
}
.stab.active {
  color: #041018 !important;
  background: linear-gradient(135deg, #2ec7ff, #8cf0ff) !important;
  font-weight: 800;
}
.brand-mark {
  background: linear-gradient(145deg, #2ec7ff, #8cf0ff) !important;
  color: #041018 !important;
  box-shadow: 0 0 0 2px rgba(140, 240, 255, 0.25), var(--glow) !important;
}
.gate-card {
  background: linear-gradient(180deg, rgba(12, 28, 44, 0.95), rgba(4, 10, 18, 0.96)) !important;
  border: 1px solid rgba(140, 220, 255, 0.2) !important;
  border-radius: 28px !important;
}
.toast {
  border-radius: 16px !important;
  background: rgba(8, 20, 34, 0.94) !important;
  border: 1px solid rgba(140, 220, 255, 0.22) !important;
  backdrop-filter: blur(16px);
}

@media (max-width: 420px) {
  .menu-btn { min-height: 86px !important; padding: 12px !important; }
  .mb-hint { font-size: 0.68rem; }
  .nf-name { font-size: 1.28rem !important; }
}
/* ===== Menu v61 · tile list ===== */
.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.hero-chip {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  background: linear-gradient(135deg, #2ec7ff, #8cf0ff);
  color: #041018;
  box-shadow: 0 8px 22px rgba(46, 199, 255, 0.28);
}
.hero-chip.ghost {
  background: rgba(126, 240, 255, 0.08);
  color: var(--blue-bright);
  border: 1px solid rgba(126, 240, 255, 0.22);
  box-shadow: none;
}
.hero-chip:active { transform: scale(0.97); }

.menu-grid-v2 {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding-bottom: 32px;
}
.tile {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr 18px;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(140, 220, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(12, 28, 44, 0.92), rgba(6, 14, 24, 0.94));
  padding: 14px 14px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.tile:hover {
  border-color: rgba(140, 220, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  transform: none;
}
.tile:active { transform: none; opacity: 0.92; }
.tile-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: rgba(126, 240, 255, 0.1);
  border: 1px solid rgba(126, 240, 255, 0.14);
}
.tile-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tile-body b {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tile-body small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}
.tile-arrow {
  color: rgba(140, 220, 255, 0.55);
  font-size: 1.35rem;
  font-weight: 300;
}
.tile-hot {
  border-color: rgba(255, 193, 77, 0.28);
  background:
    linear-gradient(135deg, rgba(42, 34, 18, 0.92), rgba(10, 18, 28, 0.95)),
    radial-gradient(120% 100% at 100% 0%, rgba(255, 193, 77, 0.14), transparent 55%);
}
.tile-hot .tile-ico {
  background: rgba(255, 193, 77, 0.12);
  border-color: rgba(255, 193, 77, 0.2);
}
.tile-admin {
  border-color: rgba(255, 107, 122, 0.28);
  background:
    linear-gradient(135deg, rgba(40, 16, 24, 0.92), rgba(10, 14, 24, 0.95));
}
.tile-admin .tile-ico {
  background: rgba(255, 107, 122, 0.12);
  border-color: rgba(255, 107, 122, 0.2);
}
.topup-form {
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(140, 220, 255, 0.14);
  background: rgba(8, 20, 34, 0.8);
}
.page-actions .menu-btn-primary {
  background: linear-gradient(135deg, #2ec7ff, #8cf0ff) !important;
  color: #041018 !important;
  border: 0 !important;
  font-weight: 800 !important;
}
.page-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 28px;
}
.page-actions .menu-btn,
.page-actions a.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(140, 220, 255, 0.16);
  background: rgba(10, 24, 40, 0.9);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.page-actions .menu-btn-primary,
.page-actions a.menu-btn-primary {
  background: linear-gradient(135deg, #2ec7ff, #8cf0ff) !important;
  color: #041018 !important;
  border: 0 !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 28px rgba(46, 199, 255, 0.28);
}
.page-actions .menu-btn:active,
.page-actions a.menu-btn:active { transform: scale(0.985); }
.nf-kicker { letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.68rem; opacity: 0.75; }
/* ===== v63 · hero layout + weak-phone ===== */
.nf-header.hero-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  overflow: visible !important;
}
.hero-card .nf-profile {
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-card .nf-profile-text { min-width: 0; flex: 1; }
.hero-card .nf-sub {
  position: relative;
  z-index: 2;
}
.hero-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
  margin-top: 0 !important;
  width: 100%;
  position: relative;
  z-index: 3;
}
.hero-chip {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  font-size: 0.84rem !important;
  padding: 11px 12px !important;
  position: relative;
  z-index: 3;
}
.hero-card::after { z-index: 0; pointer-events: none !important; }

/* page actions must NOT inherit home card menu-btn (92px column) */
.page-actions .menu-btn,
.page-actions a.menu-btn {
  min-height: 0 !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 0 !important;
  padding: 13px 14px !important;
}
.page-actions .menu-btn::before { display: none !important; }

/* content-visibility on tiles causes Telegram WebView to recycle/flash wrong labels */
.tile {
  content-visibility: visible !important;
  contain: none !important;
  transform: none !important;
}
.tile:active {
  transform: none !important;
  opacity: 0.92;
}

/* hover only on real pointer devices — sticky :hover on phones was hiding tiles */
@media (hover: hover) and (pointer: fine) {
  .tile:hover {
    border-color: rgba(140, 230, 255, 0.32);
    box-shadow: 0 14px 34px rgba(0,0,0,0.28), var(--glow);
    transform: translateY(-1px) !important;
  }
}

html.perf-weak .bg-aurora,
html.perf-weak .bg-glow,
html.perf-weak .bg-wave,
html.perf-weak .bg-shimmer,
html.perf-weak .bg-mesh,
html.perf-weak .bg-frost {
  display: none !important;
  animation: none !important;
}
html.perf-weak .bg {
  background: #070f1a !important;
  animation: none !important;
}
html.perf-weak .hero-card,
html.perf-weak .tile,
html.perf-weak .menu-btn,
html.perf-weak .stat-card,
html.perf-weak .sheet-panel,
html.perf-weak .cap-browser,
html.perf-weak .page-actions .menu-btn {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22) !important;
}
html.perf-weak .hero-card::after,
html.perf-weak .menu-btn::before {
  display: none !important;
}
html.perf-weak .tile,
html.perf-weak .tile:hover,
html.perf-weak .tile:active {
  display: grid !important;
  transform: none !important;
  transition: none !important;
}
html.perf-weak .nf-name,
html.perf-weak .view.active,
html.perf-weak .brand-mark {
  animation: none !important;
  -webkit-text-fill-color: #fff !important;
  background: none !important;
  color: #fff !important;
}
html.perf-mobile .stats { gap: 6px; }
html.perf-mobile .stat-card { padding: 10px 8px; }

html.perf-mobile .view.active,
html.perf-weak .view.active {
  animation: none !important;
}
.menu-grid-v2 .tile {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
/* Long URLs / codes — one block, no split pills */
.page-content code,
.val-pill {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4;
  vertical-align: top;
}
a.link-block,
.link-block {
  display: block !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: rgba(8, 20, 36, 0.95) !important;
  border: 1px solid rgba(140, 220, 255, 0.22) !important;
  color: #9fe9ff !important;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  text-decoration: none !important;
}
a.link-block:active { opacity: 0.9; }
/* ===== v67 · screen redesign: cards, no hairline rows ===== */
.page-content.html-screen {
  animation: none !important;
  padding-bottom: 8px;
}
.screen-hero {
  margin: 0 0 14px;
  padding: 16px 16px 14px;
  border-radius: 22px;
  border: 1px solid rgba(140, 220, 255, 0.16);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(80, 210, 255, 0.16), transparent 55%),
    linear-gradient(145deg, rgba(16, 36, 56, 0.95), rgba(8, 16, 28, 0.98));
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}
.screen-hero-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #fff;
}
.screen-hero-title b,
.screen-hero-title strong { font-weight: 800; color: #fff; }

.screen-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.screen-block {
  border-radius: 22px;
  border: 1px solid rgba(140, 220, 255, 0.14);
  background:
    linear-gradient(165deg, rgba(14, 30, 48, 0.94), rgba(7, 14, 24, 0.96));
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  overflow: hidden;
}
.screen-block-head {
  padding: 12px 14px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(140, 220, 255, 0.85);
  background: rgba(126, 240, 255, 0.05);
  border-bottom: 1px solid rgba(140, 220, 255, 0.08);
}
.screen-block-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(126, 240, 255, 0.06);
  border: 1px solid rgba(140, 220, 255, 0.1);
}
.screen-chip-soft {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}
.screen-chip .screen-k {
  color: rgba(170, 198, 220, 0.9);
  font-size: 0.82rem;
  font-weight: 650;
  flex: 0 1 auto;
}
.screen-chip .screen-v {
  text-align: right;
  font-weight: 750;
  color: #f4f8ff;
  font-size: 0.95rem;
  min-width: 0;
}

.screen-fact {
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(20, 40, 62, 0.9), rgba(10, 20, 34, 0.95));
  border: 1px solid rgba(140, 220, 255, 0.1);
  color: rgba(235, 245, 255, 0.95);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}
.screen-fact strong,
.screen-fact b { color: #fff; font-weight: 800; }

.screen-raw {
  padding: 4px 2px;
  color: rgba(220, 234, 250, 0.92);
  font-size: 0.92rem;
  line-height: 1.5;
  border: 0 !important;
}
.screen-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 193, 77, 0.08);
  border: 1px solid rgba(255, 193, 77, 0.16);
  color: rgba(220, 200, 160, 0.95);
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.4;
}

/* kill old line-list look */
.screen-card,
.screen-kv,
.screen-info,
.screen-section,
.screen-title {
  border-bottom: 0 !important;
  border-top: 0 !important;
}
.screen-kv,
.screen-info {
  display: flex !important;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px !important;
  margin: 0 !important;
  border-radius: 16px !important;
  background: rgba(126, 240, 255, 0.06) !important;
  border: 1px solid rgba(140, 220, 255, 0.1) !important;
}
.page-content .screen-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-actions .menu-btn,
.page-actions a.menu-btn {
  border-radius: 16px !important;
  min-height: 50px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}
.page-subhead {
  margin-bottom: 16px !important;
}
.page-title {
  font-size: 1.28rem !important;
}

html.perf-weak .screen-hero,
html.perf-weak .screen-block,
html.perf-weak .screen-chip,
html.perf-weak .screen-fact {
  backdrop-filter: none !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2) !important;
}

body.is-guest [data-need-auth] { display: none !important; }
body.is-guest #stats { display: none !important; }
body.is-guest .side-nav .nav-item:not([data-tab="home"]) { display: none !important; }
body.is-guest .bottom-nav { display: none !important; }
body.is-guest #heroActions { display: none !important; }

/* ===== FrozenCoins tap (panel chrome hidden) ===== */
body.tap-first .sidebar,
body.tap-first #stats,
body.tap-first .bottom-nav,
body.tap-first #topBar,
body.tap-first #heroActions,
body.tap-first .side-refresh,
body.tap-first .view:not(#viewTap),
body.tap-first #sheet,
body.tap-first #gate {
  display: none !important;
}
body.tap-first #tapMap {
  z-index: 90;
}
body.tap-first #viewTap {
  display: block !important;
}
body.tap-first .app {
  display: block;
}
body.tap-first .main {
  padding-top: calc(6px + var(--safe-top));
  padding-bottom: calc(18px + var(--safe-bot));
}
body.tap-first .bg-aurora,
body.tap-first .bg-glow,
body.tap-first .bg-wave,
body.tap-first .bg-shimmer,
body.tap-first .bg-mesh,
body.tap-first .bg-frost,
body.tap-first .bg-grid {
  display: none !important;
}
body.tap-first .bg {
  background:
    radial-gradient(640px 380px at 50% -10%, rgba(80, 200, 255, 0.22), transparent 58%),
    linear-gradient(180deg, #061018 0%, #081422 48%, #05080d 100%);
  animation: none;
}
body.tap-first {
  padding-bottom: 0;
}
.view-tap {
  min-height: calc(100dvh - var(--safe-top));
  padding: 0 0 28px;
}
.fc-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px 4px;
}
.fc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fc-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background:
    linear-gradient(160deg, rgba(210, 248, 255, 0.95), rgba(90, 190, 255, 0.35));
  box-shadow:
    0 10px 24px rgba(80, 200, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.fc-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 860;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #c9f3ff 70%, #7ed6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fc-tag {
  margin: 2px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(170, 214, 235, 0.72);
}
.tap-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 18px 20px;
  user-select: none;
}
.tap-balance {
  text-align: center;
  margin-top: 8px;
}
.tap-coins {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.tap-coin-ico {
  font-size: 30px;
  filter: drop-shadow(0 6px 14px rgba(255, 193, 77, 0.45));
}
.tap-coins b {
  font-size: 2.55rem;
  font-weight: 880;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff6d0 0%, #ffd36a 55%, #f0a62a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(255, 193, 77, 0.28));
}
.tap-sub {
  margin-top: 6px;
  color: rgba(186, 220, 238, 0.78);
  font-size: 0.9rem;
  font-weight: 650;
}
.tap-energy {
  width: min(340px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 12px 14px 13px;
  border-radius: 18px;
  background: rgba(10, 24, 38, 0.55);
  border: 1px solid rgba(150, 230, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tap-energy-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(186, 220, 238, 0.7);
}
.tap-energy-bar {
  height: 11px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  border: 1px solid rgba(140, 230, 255, 0.16);
}
.tap-energy-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #3ec7ff, #8cf0ff 55%, #ffe38a);
  box-shadow: 0 0 14px rgba(80, 220, 255, 0.45);
  transition: width 0.18s ease;
}
.tap-energy-top #tapEnergyLabel,
.tap-energy span {
  text-align: right;
  font-size: 0.74rem;
  color: rgba(255, 232, 180, 0.92);
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}
.tap-orb-stage {
  position: relative;
  width: min(200px, 56vw);
  height: min(200px, 56vw);
  display: grid;
  place-items: center;
  margin: 2px 0 0;
}
.tap-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: min(168px, 46vw);
  height: min(168px, 46vw);
  border: 1px solid rgba(160, 230, 255, 0.28);
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  background:
    radial-gradient(circle at 32% 28%, rgba(210, 248, 255, 0.28), transparent 42%),
    radial-gradient(circle at 50% 50%, #12344c 0%, #0a1c2c 72%, #071018 100%);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  -webkit-tap-highlight-color: transparent;
}
.tap-orb:active,
.tap-orb.is-hit {
  transform: scale(0.94);
}
.tap-flake {
  width: 72%;
  height: 72%;
  display: block;
  pointer-events: none;
}
.tap-orb-glow,
.tap-orb-ring,
.tap-orb-ring-2,
.tap-orb-mascot,
.tap-orb-ice,
.tap-orb-face {
  display: none;
}
.tap-hint {
  font-size: 0.75rem;
  color: rgba(143, 176, 200, 0.7);
  font-weight: 650;
}
.tap-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(340px, 88vw);
}
.tap-stats div {
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(10, 24, 38, 0.55);
  border: 1px solid rgba(150, 230, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tap-stats small {
  color: rgba(170, 214, 235, 0.7);
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tap-stats b {
  font-size: 1.2rem;
  font-weight: 830;
  color: #eef9ff;
}
.tap-float {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  color: #ffe38a;
  font-weight: 850;
  font-size: 1.2rem;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
  animation: tap-float 0.7s ease-out forwards;
  z-index: 3;
}
@keyframes tap-float {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1.15); }
}
html.perf-weak .tap-orb-glow,
html.perf-weak .tap-orb-ring,
html.perf-weak .tap-orb-ring-2 { animation: none; }
html.perf-weak .tap-float { animation-duration: 0.45s; }

.tap-map-open {
  width: min(360px, 92vw);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(150, 230, 255, 0.16);
  border-radius: 20px;
  background: rgba(10, 24, 38, 0.62);
  color: inherit;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tap-map-open-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: linear-gradient(160deg, rgba(210, 248, 255, 0.28), rgba(80, 180, 230, 0.12));
}
.tap-map-open-txt {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tap-map-open-txt b {
  font-size: 0.98rem;
  font-weight: 830;
}
.tap-map-open-txt small {
  color: rgba(170, 214, 235, 0.7);
  font-weight: 650;
}
.tap-map-open-go {
  font-size: 1.3rem;
  color: rgba(180, 230, 255, 0.7);
}
.tap-map {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(520px 280px at 50% 18%, rgba(70, 180, 230, 0.16), transparent 60%),
    #05080d;
}
.tap-map.hidden { display: none; }
.tap-map-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
}
.tap-map-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: #e8f7ff;
  font-size: 1.15rem;
}
.tap-map-bar-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tap-map-bar-txt b { font-size: 1.02rem; font-weight: 830; }
.tap-map-bar-txt small { color: #ffe38a; font-weight: 750; }
.tap-map-pan {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
.tap-map-field {
  position: relative;
  width: 720px;
  height: 860px;
  margin: 0 auto;
}
.tap-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tap-hex {
  position: absolute;
  width: 78px;
  height: 86px;
  margin: -43px 0 0 -39px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8f7ff;
}
.tap-hex i {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: #123044;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  font-style: normal;
}
.tap-hex small {
  display: block;
  max-width: 62px;
  font-size: 0.58rem;
  font-weight: 780;
  line-height: 1.15;
  text-align: center;
}
.tap-hex b {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
  margin-bottom: 2px;
}
.tap-hex.is-core i {
  background: linear-gradient(180deg, #d9f8ff 0%, #4ec6f0 100%);
  color: #041018;
}
.tap-hex.is-owned i {
  background: linear-gradient(180deg, #7ee0ff 0%, #1d7aa0 100%);
}
.tap-hex.is-open i {
  background: linear-gradient(180deg, #ffe38a 0%, #f0a62a 100%);
  color: #2a1600;
}
.tap-hex.is-fog i {
  background: #0c1822;
  color: rgba(200, 230, 245, 0.45);
}
.tap-hex.is-on i {
  outline: 2px solid #fff;
  outline-offset: -6px;
}
.tap-map-sheet {
  padding: 12px 14px calc(16px + var(--safe-bot));
  background: rgba(8, 16, 24, 0.94);
  border-top: 1px solid rgba(150, 230, 255, 0.12);
}
.tap-map-sheet.hidden { display: none; }
.tap-map-sheet h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tap-map-sheet p { margin: 0 0 10px; color: rgba(186, 220, 238, 0.78); font-size: 0.84rem; font-weight: 600; }
.tap-map-buy {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  font-weight: 830;
  color: #041018;
  background: linear-gradient(180deg, #d9f8ff 0%, #6ad4ff 100%);
}
.tap-map-buy:disabled {
  opacity: 0.55;
  color: #e8f7ff;
  background: rgba(80, 120, 150, 0.28);
}
