/* АНАРХИЯ · главная-хаб. Подключается после neon.css и берёт его токены. */
.hub-page { padding: 0 !important; }
.hub {
  max-width: 560px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(118px + env(safe-area-inset-bottom));
  display: grid; gap: 14px; text-align: left; font-family: var(--nx-font);
}
.hub .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hub a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.hub :focus-visible { outline: 2px solid var(--nx-cyan); outline-offset: 3px; }

/* ── Профиль ─────────────────────────────────────────────────────── */
.hub .hub-me {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px;
  border-radius: 22px; border: 1px solid var(--nx-line); background: var(--nx-surface);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: none; font-size: inherit; transition: border-color .2s, transform .15s;
  width: 100%; max-width: none; min-height: 0; white-space: normal;
}
.hub .hub-me .account-name { display: block; }
.hub .hub-me:hover { border-color: var(--nx-line-2); box-shadow: none; }
.hub .hub-me:active { transform: scale(.99); }
.hub .hub-avatar { width: 46px; height: 46px; flex: 0 0 46px; font-size: 18px; }
.hub-me-text { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.hub .hub-name { font: 700 16px/1.2 var(--nx-display); color: var(--nx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-handle { font-size: 13px; color: var(--nx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-stats { display: flex; gap: 6px; flex: none; }
.hub-stats[hidden] { display: none; }
.hub-stat {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px 0 6px;
  border-radius: 999px; background: rgba(255,255,255,.05); font-size: 14px; color: var(--nx-ink);
}
.hub-stat b { font-weight: 700; }
.hub-stat-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #05050a; }
.hub-stat-ico.is-coin { background: var(--nx-gold); }
.hub-stat-ico.is-nft { background: var(--nx-cyan); }
.hub-stat-ico.is-streak { background: none; font-size: 15px; }
@media (max-width: 380px) { .hub-stat { padding: 0 8px 0 5px; font-size: 13px; } .hub-stats .hub-stat:last-child { display: none; } }

/* ── Лента «что нового» ──────────────────────────────────────────── */
.hub-feed { display: grid; gap: 10px; }
.hub-slides {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 24px; outline: none;
}
.hub-slides::-webkit-scrollbar { display: none; }
.hub-slide {
  position: relative; scroll-snap-align: start; min-height: 188px; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  padding: 20px 40% 20px 20px; border-radius: 24px; border: 1px solid var(--nx-line);
  background: linear-gradient(135deg, #2a0f2b 0%, #150d24 55%, #0b0a14 100%);
}
.hub-slide.is-news { background: linear-gradient(135deg, #0d2130 0%, #0e1122 60%, #0a0a12 100%); }
.hub-slide.is-chat { background: linear-gradient(135deg, #0b2233 0%, #0d1424 60%, #0a0a12 100%); }
.hub-slide-copy { display: grid; justify-items: start; gap: 6px; position: relative; z-index: 1; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hub-slide strong { font: 700 21px/1.15 var(--nx-display); color: #fff; }
.hub-slide strong.is-clamp { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hub-slide-copy > span:not([class]) { font-size: 14px; line-height: 1.35; color: var(--nx-ink-2); }
.hub-badge {
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #05050a; background: var(--nx-magenta);
}
.hub-badge.is-quiet { color: var(--nx-cyan); background: rgba(47,230,255,.12); }
.hub-slide-btn {
  margin-top: 6px; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: #05050a; background: #fff; transition: transform .15s;
}
.hub-slide:hover .hub-slide-btn { transform: translateY(-1px); }
.hub-slide-art { position: absolute; z-index: 0; right: -14%; top: 50%; width: 54%; max-width: 230px; height: auto; aspect-ratio: 1; object-fit: contain;
  transform: translateY(-50%); filter: drop-shadow(0 14px 24px rgba(0,0,0,.5)); }
.hub-slide-art.is-photo { right: 12px; width: 36%; height: calc(100% - 24px); aspect-ratio: auto; object-fit: cover; border-radius: 16px; }
.hub-dots { display: flex; justify-content: center; gap: 6px; }
.hub-dots[hidden] { display: none; }
.hub-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.22); cursor: pointer; transition: width .25s, background .25s; }
.hub-dot[aria-selected=true] { width: 22px; background: #fff; }

/* ── Плитки разделов ─────────────────────────────────────────────── */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-tile {
  --tint: 255, 46, 136;
  position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px;
  min-height: 128px; padding: 14px; border-radius: 20px; border: 1px solid var(--nx-line);
  background: radial-gradient(120% 90% at 100% 0%, rgba(var(--tint), .22), transparent 60%), var(--nx-surface);
  transition: transform .15s, border-color .2s;
}
.hub-tile:hover { transform: translateY(-2px); border-color: rgba(var(--tint), .45); }
.hub-tile:active { transform: scale(.985); }
.hub-tile strong { font: 700 16px/1.2 var(--nx-display); color: #fff; }
.hub-tile span:not([class]) { font-size: 13px; line-height: 1.35; color: var(--nx-ink-2); }
.hub-ico {
  width: 40px; height: 40px; margin-bottom: 8px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(var(--tint), .16); color: rgb(var(--tint));
}
.hub-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hub-tile.is-shop { --tint: 255, 209, 102; }
.hub-tile.is-casino { --tint: 255, 46, 136; }
.hub-tile.is-news { --tint: 47, 230, 255; }
.hub-tile.is-rules { --tint: 120, 220, 160; }
.hub-tile.is-chat { --tint: 47, 160, 255; }
.hub-tile.is-nft { --tint: 176, 60, 255; }
#tile-news { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.hub-tile.is-wide { grid-column: 1 / -1; }
.hub-tile.is-nft { min-height: 104px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; align-content: center; }
.hub-tile-copy { display: grid; gap: 4px; min-width: 0; }
.hub-tile.is-nft strong { overflow-wrap: anywhere; }
.hub-tile-copy span { font-size: 13px; line-height: 1.35; color: var(--nx-ink-2); }
.hub-coins { display: flex; align-items: center; padding-right: 2px; }
.hub-coins img { width: 74px; height: 74px; margin-left: -26px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); transition: transform .25s; }
.hub-coins img:nth-child(2) { width: 86px; height: 86px; position: relative; z-index: 1; }
.hub-tile.is-nft:hover .hub-coins img:nth-child(1) { transform: translateX(-4px) rotate(-6deg); }
.hub-tile.is-nft:hover .hub-coins img:nth-child(3) { transform: translateX(4px) rotate(6deg); }
.hub-tile.is-chat { min-height: 0; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.hub-tile.is-chat .hub-ico { margin: 0; }
.hub-arrow { font-size: 20px; color: rgb(var(--tint)); }

/* ── Полезное ────────────────────────────────────────────────────── */
.hub-useful { margin-top: 6px; }
.hub-useful-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.hub-useful h2 { margin: 0; font: 700 15px var(--nx-display); color: var(--nx-ink-2); letter-spacing: .02em; }
.hub-useful .home-account-actions { display: flex; align-items: center; gap: 8px; }
.hub-useful .home-admin-link, .hub-useful .home-done-btn, .hub-useful .nx-install {
  min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--nx-line-2);
  background: transparent; color: var(--nx-muted); font: 600 12px var(--nx-font); cursor: pointer; position: static;
}
.hub-menu { border-radius: 18px; border: 1px solid var(--nx-line); background: var(--nx-surface); overflow: hidden; color: var(--nx-muted); font-size: 14px; }
.hub-menu:not(:has(.menu-list)) { padding: 14px; }
.hub-menu .menu-list { display: grid !important; grid-template-columns: 1fr !important; gap: 0 !important; margin: 0 !important; padding: 0 !important; }
.hub-menu .menu-item::before { display: none !important; }
.hub-menu .menu-ic { flex: none; width: 32px !important; height: 32px !important; margin-right: 12px; display: grid !important; place-items: center;
  border-radius: 10px; opacity: 1 !important; animation: none !important; background: rgba(255,255,255,.06) !important; color: var(--nx-ink-2) !important; }
.hub-menu .menu-ic svg { width: 18px !important; height: 18px !important; stroke: currentColor !important; fill: none; }
.hub-menu .menu-copy { flex: 1; min-width: 0; }
.hub-menu .menu-item { position: relative; display: flex; align-items: center; margin: 0 !important; border-top: 1px solid var(--nx-line); }
.hub-menu .menu-item:first-child { border-top: 0; }
.hub-menu .menu-item[data-menu-id="join"] { display: none; }
.hub-menu .menu-item[data-menu-id="join"] + .menu-item { border-top: 0; }
.hub-menu .menu-btn {
  flex: 1; display: flex !important; align-items: center; justify-content: flex-start; min-height: 52px !important;
  margin: 0 !important; padding: 0 16px !important; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; color: var(--nx-ink) !important;
  font: 500 15px var(--nx-font) !important; text-align: left !important; transform: none !important;
}
.hub-menu .menu-btn::after { content: "›" !important; position: static !important; margin-left: 10px; font-size: 20px; color: var(--nx-muted); opacity: 1 !important; transform: none !important; }
.hub-menu .menu-btn:hover { background: rgba(255,255,255,.04) !important; }
.hub-menu .menu-btn::before { display: none !important; }
.hub-menu .menu-subtitle { display: none; }
.hub-menu .menu-pencil-btn { margin-right: 8px; border: 0; background: none; cursor: pointer; }
.hub-menu .menu-edit-card { padding: 12px 16px; display: grid; gap: 6px; flex-basis: 100%; }
.hub-menu .menu-item:has(.menu-edit-card) { flex-wrap: wrap; }

@media (min-width: 720px) {
  .hub-slide-art { right: 4%; width: 38%; }
  .hub { max-width: 720px; }
  .hub-grid { grid-template-columns: repeat(4, 1fr); }
  .hub-tile.is-nft { grid-column: span 4; }
  .hub-tile.is-chat { grid-column: span 4; }
  .hub-slide { min-height: 230px; }
}
@media (max-width: 420px) {
  .hub-coins img { width: 56px; height: 56px; margin-left: -22px; }
  .hub-coins img:nth-child(2) { width: 66px; height: 66px; }
  .hub-tile.is-nft strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .hub * { transition: none !important; } }

/* Вход в админку — только из профиля владельца */
.hub-useful .home-admin-link { display: none !important; }
