/* ============================================================
   HYPERTALE — Page & section layouts
   ============================================================ */

/* ==================== NAVBAR ==================== */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(14, 14, 15, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: var(--glass-brd);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.nav .wrap-wide { display: flex; align-items: center; gap: 22px; width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-pixel); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.02em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .mark {
  width: 34px; height: 36px;
  display: grid; place-items: center;
  filter: drop-shadow(0 4px 10px rgba(var(--green-rgb), 0.45));
}
.brand .mark svg { width: 30px; height: 32px; overflow: visible; }
.brand b { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > a, .nav-item > button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: var(--r-pill);
  font-size: 0.92rem; font-weight: 500; color: var(--text-soft);
  background: none; border: none; cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-links > a svg, .nav-item > button svg { width: 17px; height: 17px; }
.nav-links > a:hover, .nav-item > button:hover, .nav-links > a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links > a.active { color: var(--green); }

.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Dropdown */
.nav-item { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 240px; padding: 8px;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-brd-strong);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
  z-index: var(--z-dropdown);
}
.nav-item.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 0.9rem; color: var(--text-soft); background: none; border: none; cursor: pointer; text-align: left;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dropdown a:hover, .dropdown button:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.dropdown a svg, .dropdown button svg { width: 17px; height: 17px; color: var(--text-dim); }
.dropdown .dd-head { display: flex; align-items: center; gap: 11px; padding: 10px 12px 12px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.dropdown .dd-head .stack b { font-size: 0.95rem; }
.dd-sep { height: 1px; background: var(--hair); margin: 6px 4px; }

/* Language selector — a nav-item dropdown like the account menu, open to guests too */
.lang-switch > button { padding: 8px 10px; gap: 5px; }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-dropdown { min-width: 190px; }
.lang-dropdown a { justify-content: flex-start; }
.lang-check { width: 15px !important; height: 15px !important; margin-left: auto; color: var(--green) !important; }
.mobile-lang-switch { display: flex; gap: 8px; padding: 8px 16px 2px; }
.mobile-lang-switch a {
  flex: 1; justify-content: center; padding: 8px 10px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-brd); font-size: 0.85rem; font-weight: 600;
}
.mobile-lang-switch a.active { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); color: var(--text); }

/* Search trigger — used inline on the forum index page (not the cramped navbar) */
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; min-width: 210px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--glass-brd);
  border-radius: var(--r-pill); color: var(--text-dim); cursor: pointer;
  font-size: 0.88rem;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.search-trigger:hover { border-color: rgba(var(--green-rgb), 0.4); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem;
  padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-brd); color: var(--text-soft);
}

.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-brd);
  color: var(--text-soft); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); border: 2px solid var(--bg-850); }

/* Mobile menu button */
.burger { display: none; }
@media (max-width: 980px) {
  .nav-links { display: none; }
  .burger { display: grid; }
}
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: var(--z-overlay);
  background: rgba(10, 10, 11, 0.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 24px var(--gutter); display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform var(--t) var(--ease); overflow-y: auto;
}
.mobile-menu.open { transform: none; }
.mobile-menu a { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: var(--r-md); font-size: 1.05rem; font-weight: 600; color: var(--text-soft); background: var(--glass-bg); border: 1px solid var(--glass-brd); }
.mobile-menu a svg { width: 20px; height: 20px; color: var(--green); }

/* ==================== HERO ==================== */
.hero { position: relative; padding-top: clamp(48px, 9vw, 110px); padding-bottom: clamp(60px, 12vw, 150px); overflow: hidden; }
.hero-inner { position: relative; z-index: 3; text-align: center; }
.hero-badge { margin: 0 auto 22px; }
/* Font, size and colour come from the admin block classes on the inner span. */
.hero h1 { font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.hero .tagline { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--text-soft); max-width: 46ch; margin: 22px auto 0; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* Hero floating scene decorations */
.hero-scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-scene .orb { filter: blur(2px); opacity: 0.85; }
.hero-scene .orb.o1 { width: 70px; height: 70px; left: 6%; top: 18%; color: var(--purple); background: radial-gradient(circle at 35% 30%, var(--purple-bright), var(--purple-deep)); animation: floaty 7s ease-in-out infinite; }
.hero-scene .orb.o2 { width: 40px; height: 40px; right: 10%; top: 24%; color: var(--green); background: radial-gradient(circle at 35% 30%, var(--green-bright), var(--green-deep)); animation: floaty 5.5s ease-in-out infinite 0.4s; }
.hero-scene .orb.o3 { width: 28px; height: 28px; right: 30%; bottom: 34%; color: var(--cyan); background: radial-gradient(circle at 35% 30%, #9ff0ff, var(--cyan)); animation: floaty 6.5s ease-in-out infinite 0.8s; }
.hero-scene .orb.o4 { width: 18px; height: 18px; left: 24%; bottom: 40%; color: var(--gold); background: radial-gradient(circle at 35% 30%, #fff0b8, var(--gold)); animation: floaty 8s ease-in-out infinite 0.2s; }

/* Floating voxel blocks in the hero */
.hero-scene .float-block.b1 { left: 9%; top: 30%; width: 74px; height: 77px; --dur: 8s; --rot: -6deg; --ore-glow: rgba(var(--green-rgb),0.5); }
.hero-scene .float-block.b2 { right: 8%; top: 16%; width: 92px; height: 96px; --dur: 9s; --rot: 5deg; --ore-glow: rgba(var(--cyan-rgb),0.5); }
.hero-scene .float-block.b3 { left: 17%; bottom: 20%; width: 58px; height: 60px; --dur: 6.5s; --rot: 8deg; --ore-glow: rgba(var(--gold-rgb),0.5); }
.hero-scene .float-block.b4 { right: 18%; bottom: 26%; width: 66px; height: 69px; --dur: 7.5s; --rot: -4deg; --ore-glow: rgba(var(--purple-rgb),0.5); }
.hero-scene .float-block.b5 { left: 44%; top: 8%; width: 46px; height: 48px; --dur: 10s; --rot: 3deg; --ore-glow: rgba(var(--green-rgb),0.4); }

/* Starfield sits behind the hero copy (the voxel islands used to live here) */
.hero .starfield { z-index: 0; }
.hero .starfield .nebula.n1 { width: 44vw; height: 30vw; left: 4%; top: 8%; background: radial-gradient(circle, rgba(var(--purple-rgb), 0.45), transparent 70%); }
.hero .starfield .nebula.n2 { width: 38vw; height: 26vw; right: 2%; bottom: 6%; background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.3), transparent 70%); animation-delay: -7s; }

/* Editable hero title — the block's own font/size classes drive the type, this
   only supplies the glow that used to be baked into .hero h1. */
.hero .hero-title { text-shadow: 0 0 40px rgba(var(--green-rgb), 0.18); }
.hero .hero-title .tb { display: inline-block; }

/* Server / status bar under hero */
.serverbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 44px; }
.sb-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.sb-card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.sb-card .ic svg { width: 21px; height: 21px; }
.sb-card .ic.g { background: rgba(var(--green-rgb), 0.14); color: var(--green); }
.sb-card .ic.p { background: rgba(var(--purple-rgb), 0.16); color: var(--purple-bright); }
.sb-card .ic.c { background: rgba(var(--cyan-rgb), 0.14); color: var(--cyan); }
.sb-card .k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.sb-card .v { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; }

/* IP copy pill */
.ip-copy { display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 18px; border-radius: var(--r-pill); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--glass-brd-strong); }
.ip-copy .ip { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.02em; }
.ip-copy button { border-radius: var(--r-pill); }

/* ==================== PERSISTENT FORUM NAV (admin: Forum Display > Navigation) ==================== */
.forum-shell-top { display: flex; flex-direction: column; }
.forum-shell-side {
  display: flex; gap: 24px; align-items: flex-start;
  width: 100%; max-width: var(--wrap-wide); margin-inline: auto; padding-inline: var(--gutter);
}
.forum-shell-side .forum-nav-side { flex: 0 0 220px; position: sticky; top: 90px; margin-top: 28px; }
.forum-shell-side .wrap { flex: 1; min-width: 0; max-width: none; padding-inline: 0; margin-inline: 0; }
@media (max-width: 900px) {
  .forum-shell-side { flex-direction: column; padding-inline: 0; }
  .forum-shell-side .forum-nav-side { position: static; width: 100%; flex-direction: row !important; flex-wrap: wrap; margin-inline: var(--gutter); }
  .forum-shell-side .wrap { padding-inline: var(--gutter); }
}

.forum-nav { display: flex; gap: 8px; }
.forum-nav a {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-pill);
  color: var(--text-dim); font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.forum-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.forum-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.forum-nav a.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

.forum-nav-top {
  flex-wrap: wrap; padding: 12px clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--hair); background: rgba(0, 0, 0, 0.15); overflow-x: auto;
}
.forum-nav-side {
  flex-direction: column; align-items: stretch; padding: 14px 10px;
  border-radius: var(--r-lg); background: var(--glass-bg); border: 1px solid var(--glass-brd);
}
.forum-nav-side a { justify-content: flex-start; }

/* ==================== FORUM ==================== */
.forum-group { margin-bottom: 40px; }
.forum-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.forum-group-head h2 { font-size: 1.25rem; }
.forum-group-head .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair), transparent); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.cat-card { display: flex; gap: 16px; padding: 20px; border-radius: var(--r-lg); overflow: hidden; position: relative; }
.cat-card .cat-ic {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cat-from, rgba(var(--green-rgb), 0.18)), var(--cat-to, rgba(var(--purple-rgb), 0.18)));
  border: 1px solid var(--glass-brd); color: var(--green);
  transition: transform var(--t) var(--spring);
}
.cat-card:hover .cat-ic { transform: scale(1.08) rotate(-4deg); }
.cat-card .cat-ic svg { width: 25px; height: 25px; }
.cat-card h3 { font-size: 1.08rem; }
.cat-card h3 a { color: var(--text); }
.cat-card:hover h3 a { color: var(--green); }
.cat-card .desc { font-size: 0.88rem; color: var(--text-dim); margin-top: 4px; }
.cat-card .cat-body { flex: 1; min-width: 0; }

/* Category card banner theming (admin-uploaded image behind the card) */
.cat-card.has-image { color: var(--text); }
.cat-card .cat-banner { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.cat-card .cat-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 6, 12, 0.92), rgba(6, 6, 12, 0.6) 55%, rgba(6, 6, 12, 0.28));
}
.cat-card.has-image > *:not(.cat-banner) { position: relative; z-index: 1; }
.cat-card.has-image .desc { color: var(--text-soft); }
.cat-card.has-image .cat-meta, .cat-card.has-image .cat-meta b { color: var(--text-soft); }

/* Category card effects, same visual language as rank/badge fx (components.css) */
.cat-ic.cat-fx-glow { animation: catGlow 2.6s ease-in-out infinite; }
.cat-ic.cat-fx-pulse { animation: rankPulse 1.9s ease-in-out infinite; }
.cat-ic.cat-fx-shimmer { position: relative; overflow: hidden; }
.cat-ic.cat-fx-shimmer::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-120%); animation: rankShimmer 2.8s linear infinite;
}
@keyframes catGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 0 10px var(--cat-glow, rgba(74,163,255,0.4)); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,0.22), 0 0 24px var(--cat-glow, rgba(74,163,255,0.4)); }
}
.cat-meta { display: flex; gap: 16px; margin-top: 12px; font-size: 0.8rem; color: var(--text-dim); }
.cat-meta b { color: var(--text-soft); font-family: var(--font-display); }
.cat-latest { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 0.82rem; }
.cat-latest .avatar { --size: 30px; }
.cat-latest .t { overflow: hidden; }
.cat-latest .t a { color: var(--text-soft); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-latest .t span { color: var(--text-faint); font-size: 0.76rem; }

/* Compact list mode for the category grid (admin: Forum Display > Category list) —
   a classic forum row list: icon, title+subtitle, chips, stats and last-post all on
   one divider-separated line, grouped under the existing section headers. */
.cat-grid.cat-list-mode {
  grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--glass-brd); border-radius: var(--r-lg); overflow: hidden;
}
.cat-grid.cat-list-mode .cat-card {
  flex-direction: row; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 0; overflow: visible;
  background: transparent; border: none; border-bottom: 1px solid var(--hair);
  box-shadow: none;
}
.cat-grid.cat-list-mode .cat-card:last-child { border-bottom: none; }
.cat-grid.cat-list-mode .cat-card:hover { background: rgba(255, 255, 255, 0.03); }
.cat-grid.cat-list-mode .cat-card:hover .cat-ic { transform: none; }
.cat-grid.cat-list-mode .cat-card .cat-ic { width: 40px; height: 40px; border-radius: 11px; }
.cat-grid.cat-list-mode .cat-card .cat-ic svg { width: 20px; height: 20px; }
.cat-grid.cat-list-mode .cat-card .cat-body {
  display: flex; align-items: center; gap: 24px; min-width: 0;
}
.cat-grid.cat-list-mode .cat-card .cat-title-block { flex: 1; min-width: 0; }
.cat-grid.cat-list-mode .cat-card h3 { font-size: 0.98rem; }
.cat-grid.cat-list-mode .cat-card .desc {
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-grid.cat-list-mode .cat-card .cat-meta {
  flex-direction: column; align-items: flex-end; gap: 2px;
  flex-shrink: 0; margin-top: 0; text-align: right;
}
.cat-grid.cat-list-mode .cat-card .cat-latest {
  flex-shrink: 0; margin-top: 0; padding-top: 0; border-top: none;
  width: 190px; display: none;
}
@media (min-width: 860px) { .cat-grid.cat-list-mode .cat-card .cat-latest { display: flex; } }
.cat-grid.cat-list-mode .cat-card.has-image .cat-banner { display: none; }

/* Category card visual style variants (admin: per-category "Card style") */
.cat-card.card-style-solid { background: var(--bg-800); border: 1px solid var(--glass-brd); }
.cat-card.card-style-outline { background: transparent; border: 1px solid var(--glass-brd-strong, var(--glass-brd)); box-shadow: none; }
.cat-card.card-style-outline:hover { background: rgba(255, 255, 255, 0.03); }

/* Custom icon image (uploaded), replacing the SVG icon in normal/list layouts */
.cat-ic.cat-ic-img { background-size: cover; background-position: center; }
.cat-ic.cat-ic-img svg { display: none; }

/* Icon-tile mode (Hypixel-style "Games" grid): big square art tile per category */
.cat-grid.cat-tile-mode { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat-grid.cat-tile-mode .cat-card { flex-direction: column; padding: 0; overflow: hidden; }
.cat-grid.cat-tile-mode .cat-card .cat-ic { display: none; }
.cat-tile-art {
  width: 100%; aspect-ratio: 16 / 10; background-size: cover; background-position: center;
  background-color: rgba(255, 255, 255, 0.04);
}
.cat-grid.cat-tile-mode .cat-card .cat-body { padding: 16px 18px 18px; }
.cat-grid.cat-tile-mode .cat-card:not(:has(.cat-tile-art)) .cat-body { padding-top: 18px; }

/* Avatar stack — overlapping avatars of the last few repliers */
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--bg-800); border-radius: 50%; }
.avatar-stack .avatar:not(:first-child) { margin-left: -12px; }
.avatar-stack-sm .avatar { --size: 22px; }
.avatar-stack-sm .avatar:not(:first-child) { margin-left: -9px; }

/* Spotlight cards — decorated link banners above a thread list or /forum */
.spotlight-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.spotlight-card {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--tag-from, rgba(74,163,255,0.16)), var(--tag-to, rgba(154,92,255,0.16)));
  border: 1px solid var(--glass-brd); color: var(--text);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.spotlight-card:hover { transform: translateX(4px); box-shadow: var(--sh-md); color: var(--text); }
.spotlight-ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); background-size: cover; background-position: center;
}
.spotlight-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.spotlight-body b { font-family: var(--font-display); font-size: 1rem; }
.spotlight-body span { font-size: 0.84rem; color: var(--text-soft); }
.spotlight-arrow { flex-shrink: 0; opacity: 0.7; }
.spotlight-card:hover .spotlight-arrow { opacity: 1; }
.spotlight-card.chip-fx-glow { animation: tagGlow 2.4s ease-in-out infinite; }
.spotlight-card.chip-fx-pulse { animation: rankPulse 2.2s ease-in-out infinite; }
.spotlight-card.chip-fx-shimmer { position: relative; overflow: hidden; }
.spotlight-card.chip-fx-shimmer::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.14) 50%, transparent 70%);
  transform: translateX(-120%); animation: rankShimmer 3s linear infinite;
}
/* Small square preview swatch used in the admin spotlight catalog */
.spotlight-mini {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--tag-from, #4aa3ff), var(--tag-to, #9a5cff)); color: #fff;
}
.spotlight-mini svg { width: 16px; height: 16px; }

/* Thread density (admin: Forum Display > Thread density) */
.topic-list.density-compact .topic-item { padding: 9px 16px; gap: 11px; }
.topic-list.density-compact .avatar { --size: 32px !important; }
.topic-card-grid.density-compact .topic-card { padding: 12px; }

/* Topic list */
.topic-list { display: flex; flex-direction: column; }
.topic-item { display: flex; align-items: center; gap: 15px; padding: 15px 18px; border-radius: var(--r-md); transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.topic-item:hover { background: rgba(255, 255, 255, 0.03); transform: translateX(3px); }
.topic-item + .topic-item { border-top: 1px solid var(--hair); }
.topic-item .tt { flex: 1; min-width: 0; }
.topic-item .tt a.title { font-weight: 600; color: var(--text); font-size: 1rem; }
.topic-item:hover .tt a.title { color: var(--green); }
.topic-item .tmeta { font-size: 0.8rem; color: var(--text-dim); margin-top: 3px; }
.topic-stats { display: flex; gap: 20px; text-align: center; color: var(--text-dim); font-size: 0.78rem; }
.topic-stats b { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--text-soft); }

/* Topic card grid (admin: Forum Display > Thread list, or a per-category override) */
.topic-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; padding: 18px; border-radius: var(--r-lg); }
.topic-card .title { display: block; font-weight: 700; color: var(--text); font-size: 1.05rem; margin-top: 8px; }
.topic-card:hover .title { color: var(--green); }
.topic-card .desc { font-size: 0.86rem; color: var(--text-dim); margin-top: 6px; flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.topic-card .tmeta { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-dim); margin-top: 14px; flex-wrap: wrap; }
.topic-card .topic-stats { justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.topic-card.long { grid-column: span 1; }
.topic-card.long .desc { -webkit-line-clamp: 6; }
.topic-card-grid:has(.topic-card.long) { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* ==================== THREAD (Discord-style) ==================== */
.thread-head { margin-bottom: 22px; }
.thread-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.thread-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.post-card { display: grid; grid-template-columns: 220px 1fr; gap: 0; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 16px; }
.post-card.op { box-shadow: var(--sh-md), 0 0 0 1px rgba(var(--green-rgb), 0.2); }
.post-rail { padding: 22px 18px; text-align: center; background: rgba(0, 0, 0, 0.22); border-right: 1px solid var(--hair); }
.post-rail .avatar-ring { margin: 0 auto 12px; }
.post-rail .avatar { --size: 84px; }
.post-rail .uname { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.post-rail .uname a { color: var(--text); }
.post-rail .rank { margin-top: 8px; }
.post-rail .rail-title { font-size: 0.78rem; color: var(--gold); margin-top: 6px; }
.post-rail .rail-lv { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 0.76rem; color: var(--text-dim); }
.post-rail .rail-stats { display: flex; justify-content: center; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 0.72rem; color: var(--text-dim); }
.post-rail .rail-stats b { display: block; color: var(--text-soft); font-family: var(--font-display); font-size: 0.92rem; }
.post-rail .rail-social { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.post-rail .rail-social a { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-brd); color: var(--text-dim); }
.post-rail .rail-social a:hover { color: var(--green); transform: translateY(-2px); }
.post-rail .rail-social svg { width: 15px; height: 15px; }

.post-main { padding: 20px 24px; min-width: 0; display: flex; flex-direction: column; }
.post-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: var(--text-dim); padding-bottom: 12px; border-bottom: 1px solid var(--hair); margin-bottom: 16px; }
.post-body { line-height: 1.7; color: var(--text-soft); word-wrap: break-word; overflow-wrap: break-word; }
.post-body p { color: var(--text-soft); margin: 0 0 1em; }
.post-body p:last-child { margin-bottom: 0; }
.post-body h1, .post-body h2, .post-body h3 { color: var(--text); margin: 1.2em 0 0.5em; }
.post-body a { text-decoration: underline; text-underline-offset: 2px; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1em; color: var(--text-soft); }
.post-body blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 3px solid var(--purple); background: rgba(var(--purple-rgb), 0.08); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-soft); }
.post-body code { font-family: var(--font-mono); font-size: 0.86em; background: rgba(0, 0, 0, 0.45); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--hair); }
.post-body pre { background: rgba(0, 0, 0, 0.5); border: 1px solid var(--glass-brd); border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; margin: 0 0 1em; }
.post-body pre code { background: none; border: none; padding: 0; }
.post-body img { border-radius: var(--r-sm); margin: 4px 0; border: 1px solid var(--glass-brd); }
.post-body .mention { color: var(--purple-bright); background: rgba(var(--purple-rgb), 0.12); padding: 1px 5px; border-radius: 5px; text-decoration: none; }
.post-body .spoiler { background: var(--bg-650); color: transparent; border-radius: 5px; padding: 1px 6px; cursor: pointer; transition: color var(--t-fast); user-select: none; }
.post-body .spoiler.show, .post-body .spoiler:focus { color: var(--text-soft); background: rgba(255, 255, 255, 0.08); }
.post-body .embed-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; margin: 4px 0 1em; border: 1px solid var(--glass-brd); }
.post-body .embed-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-body .txt-sm { font-size: 0.85em; }
.post-body .txt-lg { font-size: 1.3em; }
.post-body img.post-img { display: block; max-width: 100%; height: auto; margin: 4px 0 1em; }
.post-body img.post-img-left { float: left; margin: 4px 16px 12px 0; }
.post-body img.post-img-right { float: right; margin: 4px 0 12px 16px; }
.post-body img.post-img-center { margin-left: auto; margin-right: auto; }
.post-actions { display: flex; gap: 8px; margin-top: 16px; }

.composer { padding: 20px; }
.composer .tools { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.composer .tools button { padding: 6px 10px; font-size: 0.78rem; }

/* ---------- Rich post editor ---------- */
.rich-editor-wrap { position: relative; margin-bottom: 10px; }
.rich-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px; margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--glass-brd); border-radius: var(--r-sm);
}
.rich-toolbar .btn { padding: 6px 10px; font-size: 0.78rem; }
.rich-toolbar .rt-sep { width: 1px; align-self: stretch; background: var(--hair); margin: 2px 2px; }
.rich-toolbar .rt-select { width: auto; padding: 6px 30px 6px 10px; font-size: 0.78rem; min-width: 118px; }
.rich-toolbar .rt-color {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 6px 8px; border-radius: var(--r-sm); color: var(--text-dim);
}
.rich-toolbar .rt-color:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.rich-toolbar .rt-color svg { width: 15px; height: 15px; }
.rich-toolbar .rt-color input[type=color] {
  width: 22px; height: 22px; padding: 0; cursor: pointer;
  border: 1px solid var(--glass-brd-strong); border-radius: 6px; overflow: hidden;
  -webkit-appearance: none; appearance: none; background: none;
}
.rich-toolbar .rt-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.rich-toolbar .rt-color input[type=color]::-webkit-color-swatch { border: none; border-radius: 5px; }
.rich-toolbar .rt-color input[type=color]::-moz-color-swatch { border: none; border-radius: 5px; }
.rich-toolbar .rt-text { font-family: var(--font-display); font-weight: 700; }

.rich-editable {
  width: 100%; min-height: 130px; line-height: 1.6; color: var(--text);
  padding: 12px 14px; background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-brd-strong); border-radius: var(--r-sm);
}
.rich-editable:focus { outline: none; border-color: rgba(var(--green-rgb), 0.6); box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.16); background: rgba(0, 0, 0, 0.4); }
.rich-editable:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
.rich-editable p { margin: 0 0 1em; }
.rich-editable p:last-child { margin-bottom: 0; }
.rich-editable h1, .rich-editable h2, .rich-editable h3 { margin: 0.6em 0 0.4em; }
.rich-editable blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 3px solid var(--purple); background: rgba(var(--purple-rgb), 0.08); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rich-editable code { font-family: var(--font-mono); font-size: 0.86em; background: rgba(0, 0, 0, 0.45); padding: 2px 6px; border-radius: 6px; }
.rich-editable img { max-width: 100%; border-radius: var(--r-sm); cursor: pointer; }
.rich-editable .spoiler { background: var(--bg-650); border-radius: 5px; padding: 1px 6px; }

.rt-img-toolbar { position: absolute; display: flex; gap: 4px; z-index: 5; }
.rt-img-toolbar button {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-850); border: 1px solid var(--glass-brd-strong); border-radius: 6px;
  color: var(--text-soft); font-size: 0.85rem; cursor: pointer; box-shadow: var(--sh-md);
}
.rt-img-toolbar button:hover { background: var(--bg-750); color: var(--text); }
.rt-resize-handle {
  position: absolute; width: 14px; height: 14px; border-radius: 4px;
  background: var(--accent); border: 2px solid var(--bg-900); cursor: nwse-resize; box-shadow: var(--sh-md);
}

/* ==================== PROFILE ==================== */
.profile-cover { position: relative; height: clamp(160px, 26vw, 260px); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--glass-brd); }
.profile-cover .cover-bg { position: absolute; inset: 0; }
.profile-cover .cover-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 60%); }
.profile-top { display: flex; align-items: flex-end; gap: 22px; margin-top: -70px; padding: 0 clamp(12px, 3vw, 32px); position: relative; z-index: 2; flex-wrap: wrap; }
.profile-avatar { --size: 128px; }
.profile-avatar .avatar { --size: 128px; border-radius: 26%; }
.profile-id { flex: 1; min-width: 220px; padding-bottom: 8px; }
.profile-id h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-id .meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; color: var(--text-dim); font-size: 0.86rem; }
.profile-id .meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-id .meta svg { width: 15px; height: 15px; }

.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 20px; margin-top: 28px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.skin-render { display: grid; place-items: center; padding: 20px; border-radius: var(--r-lg); transition: background var(--t) var(--ease); }
.skin-render img { height: 300px; width: auto; image-rendering: auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5)); position: relative; z-index: 1; }
.skin-render.has-bg { position: relative; overflow: hidden; }
.skin-render.has-bg::after {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  background: linear-gradient(to top, rgba(6,6,12,0.35), transparent 55%);
}
.skin-render.skin-bg-fx-glow { animation: skinBgGlow 2.6s ease-in-out infinite; }
.skin-render.skin-bg-fx-pulse { animation: rankPulse 2.4s ease-in-out infinite; }
.skin-render.skin-bg-fx-shimmer { position: relative; overflow: hidden; }
.skin-render.skin-bg-fx-shimmer::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.16) 50%, transparent 70%);
  transform: translateX(-120%); animation: rankShimmer 3.2s linear infinite;
}
@keyframes skinBgGlow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 0 16px rgba(255,255,255,0.12); }
  50% { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 0 32px rgba(255,255,255,0.22); }
}
.profile-stats2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pstat { text-align: center; padding: 14px 8px; border-radius: var(--r-md); background: rgba(255,255,255,0.03); border: 1px solid var(--hair); }
.pstat b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--green); }
.pstat span { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(255,255,255,0.04); border: 1px solid var(--glass-brd); font-size: 0.85rem; color: var(--text-soft); }
.socials a:hover { border-color: rgba(var(--green-rgb), 0.4); color: var(--text); transform: translateY(-2px); }
.socials svg { width: 16px; height: 16px; }

/* ==================== COMMAND PALETTE ==================== */
.cmdk-overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; opacity: 0; visibility: hidden; transition: opacity var(--t) var(--ease), visibility var(--t); }
.cmdk-overlay.open { opacity: 1; visibility: visible; }
.cmdk { width: min(640px, 92vw); background: var(--glass-bg-strong); border: 1px solid var(--glass-brd-strong); border-radius: var(--r-lg); box-shadow: var(--sh-lg); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); overflow: hidden; transform: translateY(-14px) scale(0.98); transition: transform var(--t) var(--spring); }
.cmdk-overlay.open .cmdk { transform: none; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--hair); }
.cmdk-input svg { width: 20px; height: 20px; color: var(--text-dim); }
.cmdk-input input { border: none; background: none; padding: 0; font-size: 1.05rem; }
.cmdk-input input:focus { box-shadow: none; }
.cmdk-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-group-label { padding: 10px 12px 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); cursor: pointer; color: var(--text-soft); }
.cmdk-item.sel, .cmdk-item:hover { background: rgba(var(--green-rgb), 0.12); color: var(--text); }
.cmdk-item .ci { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,0.05); flex-shrink: 0; }
.cmdk-item .ci svg { width: 17px; height: 17px; color: var(--green); }
.cmdk-item .avatar { --size: 32px; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--text-dim); }

/* ==================== MINECRAFT-USERNAME GATE ==================== */
.mcgate-overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(0,0,0,0.65); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity var(--t) var(--ease), visibility var(--t); }
.mcgate-overlay.open { opacity: 1; visibility: visible; }
.mcgate { width: min(420px, 92vw); background: var(--glass-bg-strong); border: 1px solid var(--glass-brd-strong); border-radius: var(--r-lg); box-shadow: var(--sh-lg); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); padding: 26px; transform: translateY(-14px) scale(0.98); transition: transform var(--t) var(--spring); }
.mcgate-overlay.open .mcgate { transform: none; }

/* ==================== MINECRAFT PROFILE WIDGET ==================== */
.mc-widget { position: fixed; right: 20px; bottom: 20px; z-index: calc(var(--z-overlay) - 1); display: flex; align-items: center; gap: 12px; background: var(--glass-bg-strong); border: 1px solid var(--glass-brd-strong); border-radius: var(--r-lg); box-shadow: var(--sh-lg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 10px 14px 10px 10px; max-width: min(280px, calc(100vw - 40px)); }
.mc-widget-skin { height: 64px; width: auto; image-rendering: pixelated; flex-shrink: 0; }
.mc-widget-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-widget-hello { font-size: 0.72rem; color: var(--text-dim); }
.mc-widget-body b { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .mc-widget { left: 12px; right: 12px; bottom: 12px; max-width: none; } }

/* ==================== SCAFFOLD / COMING SOON ==================== */
.soon-hero { text-align: center; padding: clamp(40px, 8vw, 90px) 0; }
.soon-hero .big-ic { width: 90px; height: 90px; margin: 0 auto 24px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(var(--green-rgb),0.16), rgba(var(--purple-rgb),0.16)); border: 1px solid var(--glass-brd); color: var(--green); }
.soon-hero .big-ic svg { width: 44px; height: 44px; }
.ribbon { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 16px; border-radius: var(--r-pill); background: rgba(var(--gold-rgb), 0.12); border: 1px solid rgba(var(--gold-rgb), 0.4); color: var(--gold); font-weight: 600; font-size: 0.82rem; }

/* Rank ladder */
.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ladder-card { padding: 20px; border-radius: var(--r-lg); text-align: center; }
.ladder-card .rank { margin-bottom: 12px; }
.ladder-card .perk { font-size: 0.82rem; color: var(--text-dim); }

/* Leaderboard rows */
.lb-row { display: flex; align-items: center; gap: 15px; padding: 13px 18px; border-radius: var(--r-md); }
.lb-row + .lb-row { border-top: 1px solid var(--hair); }
.lb-row:hover { background: rgba(255,255,255,0.03); }
.lb-rank { width: 40px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text-dim); }
.lb-row.top1 .lb-rank { color: var(--gold); } .lb-row.top2 .lb-rank { color: #cfd6e4; } .lb-row.top3 .lb-rank { color: #e08a4b; }
.lb-row .who { flex: 1; min-width: 0; }
.lb-row .val { font-family: var(--font-display); font-weight: 700; color: var(--green); }

/* ==================== FOOTER ==================== */
.site-footer { margin-top: 60px; border-top: 1px solid var(--hair); background: rgba(0,0,0,0.3); position: relative; z-index: var(--z-base); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; padding: 52px 0 34px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.footer-grid h4 { font-family: var(--font-display); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 14px; }
.footer-grid a { display: block; padding: 5px 0; color: var(--text-soft); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--green); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 30px; border-top: 1px solid var(--hair); flex-wrap: wrap; color: var(--text-dim); font-size: 0.84rem; }

/* ==================== PAGE HEADER ==================== */
.page-head { padding: clamp(24px, 5vw, 44px) 0 clamp(16px, 3vw, 24px); }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-dim); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-dim); } .breadcrumb a:hover { color: var(--green); }
.breadcrumb svg { width: 14px; height: 14px; opacity: 0.5; }

/* Auth card */
.auth-wrap { min-height: calc(100vh - var(--nav-h) - 120px); display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: min(440px, 92vw); padding: clamp(26px, 5vw, 40px); }
.auth-card h1 { font-size: 1.8rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-dim); margin: 8px 0 26px; }

@media (max-width: 620px) {
  .post-card { grid-template-columns: 1fr; }
  .post-rail { display: flex; align-items: center; gap: 14px; text-align: left; border-right: none; border-bottom: 1px solid var(--hair); padding: 14px 18px; }
  .post-rail .avatar-ring { margin: 0; }
  .post-rail .avatar { --size: 52px; }
  .post-rail .rail-stats, .post-rail .rail-social, .post-rail .rail-lv { display: none; }
}

/* ============================================================
   MAGIC FRAME CARDS — an "arcane relic" border with corner
   filigree that pops out on hover. Reused by home, store, profile.
   ============================================================ */
.frame-card { position: relative; transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease); }
/* Gilded rune edge — a 1px gradient ring drawn ON TOP (mask keeps only the border). */
.frame-card::before {
  content: ''; position: absolute; inset: 0; z-index: 4; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.6), rgba(var(--accent-2-rgb), 0.28) 45%, transparent 62%, rgba(var(--accent-2-rgb), 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.7; pointer-events: none; transition: opacity var(--t) var(--ease);
}
.frame-card:hover { transform: translateY(-8px) scale(1.012); box-shadow: var(--sh-lg), 0 0 34px rgba(var(--accent-rgb), 0.22); border-color: rgba(var(--accent-rgb), 0.4); }
.frame-card:hover::before { opacity: 1; }
/* Four corner filigrees */
.frame-corner { position: absolute; width: 26px; height: 26px; color: var(--gilt); opacity: 0.55; pointer-events: none; z-index: 1; transition: opacity var(--t) var(--ease), transform var(--t) var(--spring); }
.frame-corner svg { width: 100%; height: 100%; }
.frame-corner.tl { top: 8px; left: 8px; }
.frame-corner.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.frame-corner.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.frame-corner.br { bottom: 8px; right: 8px; transform: scale(-1, -1); }
.frame-card:hover .frame-corner { opacity: 1; color: var(--accent); }
.frame-card:hover .frame-corner.tl { transform: translate(-2px, -2px); }
.frame-card:hover .frame-corner.tr { transform: scaleX(-1) translate(-2px, -2px); }
.frame-card:hover .frame-corner.bl { transform: scaleY(-1) translate(-2px, -2px); }
.frame-card:hover .frame-corner.br { transform: scale(-1, -1) translate(-2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  .frame-card:hover { transform: none; }
  .frame-card:hover .frame-corner, .frame-card:hover .frame-corner.tr, .frame-card:hover .frame-corner.bl, .frame-card:hover .frame-corner.br { transform: none; }
}

/* ---- Hero + CTA arcane backgrounds (homepage) ---- */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: url('/images/backgrounds/bg4.png') center top / cover no-repeat;
  opacity: 0.26;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 92%);
}
.cta-arcane { position: relative; overflow: hidden; }
.cta-arcane::after {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  background:
    linear-gradient(160deg, rgba(var(--accent-2-rgb), 0.18), transparent 55%),
    url('/images/backgrounds/bg6.png') center / cover no-repeat;
  opacity: 0.3;
}
.cta-arcane > *:not(.frame-corner) { position: relative; z-index: 1; }

/* ============================================================
   STORE (public page)
   ============================================================ */
.store-section { margin-bottom: 44px; }
.store-section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.store-section-ic { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--from), var(--to)); box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.3); }
.store-section-ic svg { width: 26px; height: 26px; }
.store-section-head h2 { font-size: 1.4rem; }
.store-section-head p { font-size: 0.9rem; margin-top: 2px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; }

.store-card {
  --item-color: var(--accent);
  position: relative;
  background: var(--glass-bg); border: 1px solid var(--glass-brd); border-radius: var(--r-lg);
  padding: 26px 22px 22px; text-align: center; display: flex; flex-direction: column;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.store-card.featured { padding-top: 40px; box-shadow: var(--sh-md), 0 0 0 1px color-mix(in oklab, var(--item-color), transparent 55%); }
.store-featured-chip {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 14px; border-radius: var(--r-pill); font-size: 0.76rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--item-color), color-mix(in oklab, var(--item-color), #000 26%));
  box-shadow: 0 6px 18px color-mix(in oklab, var(--item-color), transparent 45%), 0 0 0 1px rgba(255,255,255,0.14);
}
.store-featured-chip svg { width: 14px; height: 14px; }
.store-ic {
  width: 96px; height: 96px; margin: 4px auto 10px; border-radius: 24px; display: grid; place-items: center;
  animation: floaty 6s ease-in-out infinite;
}
.store-ic.no-image {
  background: radial-gradient(circle at 50% 30%, color-mix(in oklab, var(--item-color), transparent 55%), color-mix(in oklab, var(--item-color), #000 30%));
  box-shadow: 0 10px 30px color-mix(in oklab, var(--item-color), transparent 55%), inset 0 0 0 1px rgba(255,255,255,0.12);
}
.store-ic.has-image {
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.store-ic img { width: 88px; height: 88px; object-fit: contain; border-radius: 18px; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35)); }
.store-ic-fallback { color: #fff; } .store-ic-fallback svg { width: 34px; height: 34px; }
.store-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }
.store-price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; margin: 6px 0 16px; color: color-mix(in oklab, var(--item-color), white 22%); text-shadow: 0 0 22px color-mix(in oklab, var(--item-color), transparent 55%); }
.store-benefits { display: flex; flex-direction: column; gap: 9px; text-align: left; margin-bottom: 16px; }
.store-benefit { display: flex; align-items: flex-start; gap: 9px; font-size: 0.88rem; color: var(--text-soft); }
.store-check { color: var(--item-color); flex-shrink: 0; display: inline-flex; } .store-check svg { width: 16px; height: 16px; }
.store-details { margin: 0 0 16px; border-top: 1px solid var(--hair); }
.store-details summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 2px 4px; font-size: 0.84rem; font-weight: 600; color: var(--item-color); }
.store-details summary::-webkit-details-marker { display: none; }
.store-details summary svg { width: 16px; height: 16px; transition: transform var(--t) var(--ease); }
.store-details[open] summary svg { transform: rotate(180deg); }
.store-details p { text-align: left; font-size: 0.86rem; line-height: 1.6; padding: 4px 2px 2px; }
.store-details summary span { display: inline-flex; align-items: center; gap: 6px; }
.store-details summary span svg { width: 15px; height: 15px; }
.store-buy { margin-top: auto; }

/* ============================================================
   STORE (admin)
   ============================================================ */
.store-cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.86rem; color: #fff; background: linear-gradient(135deg, var(--from), var(--to)); }
.store-cat-chip svg { width: 15px; height: 15px; }
.store-cat-heading { margin-bottom: 10px; }
.store-admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255,255,255,0.03); border: 1px solid var(--hair); margin-bottom: 8px; }
.store-admin-row .tt { flex: 1; min-width: 0; font-size: 0.9rem; }
.store-admin-row .tt b { color: var(--text); }
.store-swatch { width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; border: 1px solid var(--glass-brd-strong); }
.store-admin-ic { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

/* ============================================================
   HOMEPAGE — custom admin-authored sections
   ============================================================ */
.hp-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.hp-card-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.hp-card-body { padding: 18px 20px 20px; }
.hp-card-body h3 { font-size: 1.08rem; }
.hp-card-body h3 a { color: var(--text); }
.hp-card-body .desc { font-size: 0.88rem; color: var(--text-dim); margin-top: 4px; }
.hp-card-body .btn { margin-top: 14px; }

/* ============================================================
   PROFILE — emblem, cover veil, quest board
   ============================================================ */
.cover-veil { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, transparent, rgba(var(--accent-2-rgb), 0.14)), linear-gradient(120deg, rgba(var(--accent-rgb), 0.12), transparent 60%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .store-ic { animation: none; } }

.quest-list { display: flex; flex-direction: column; gap: 10px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: rgba(255,255,255,0.03); border: 1px solid var(--hair); transition: border-color var(--t) var(--ease), background var(--t) var(--ease); }
.quest.ready { border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.08); }
.quest.done { opacity: 0.6; }
.quest-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-2-rgb), 0.18)); border: 1px solid var(--glass-brd); }
.quest-ic svg { width: 20px; height: 20px; }
.quest-body { flex: 1; min-width: 0; }
.quest-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quest-top b { font-size: 0.92rem; }
.quest-xp { font-size: 0.74rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.quest-desc { font-size: 0.78rem; margin: 1px 0 6px; }
.quest-bar { height: 6px; border-radius: var(--r-pill); background: rgba(0,0,0,0.4); overflow: hidden; border: 1px solid var(--glass-brd); }
.quest-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.8s var(--ease); }
.quest-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }
.quest-action { flex-shrink: 0; }
.quest-claimed { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--leaf); background: rgba(var(--leaf-rgb), 0.14); border: 1px solid rgba(var(--leaf-rgb), 0.4); }
.quest-claimed svg { width: 18px; height: 18px; }
.quest.locked { opacity: 0.5; }
.quest.locked .quest-ic { color: var(--text-faint); background: rgba(255, 255, 255, 0.04); }
.quest-period {
  font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); border: 1px solid var(--hair); border-radius: var(--r-pill);
  padding: 1px 7px; margin-left: auto; white-space: nowrap;
}

/* ============================================================
   CART / CHECKOUT / ORDERS
   ============================================================ */
.store-cartbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.store-cartbar-ic {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.14); color: var(--accent);
}
.store-cartbar-ic svg { width: 21px; height: 21px; }
.store-soldout-chip {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  padding: 3px 10px; border-radius: var(--r-pill); font-size: 0.7rem; font-weight: 700;
  background: rgba(0, 0, 0, 0.6); color: var(--text-dim); border: 1px solid var(--glass-brd);
}
.store-card.sold-out { opacity: 0.62; }
.store-stock { font-size: 0.74rem; color: var(--gold); margin-top: -4px; }
.store-buy-form { margin-top: auto; padding-top: 14px; }

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.cart-row {
  display: grid; grid-template-columns: 56px 1fr auto auto auto;
  gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair);
}
.cart-row:last-of-type { border-bottom: 0; }
.cart-ic {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, color-mix(in oklab, var(--item-color), transparent 60%), color-mix(in oklab, var(--item-color), #000 35%));
  color: #fff;
}
.cart-ic img { width: 100%; height: 100%; object-fit: contain; }
.cart-ic svg { width: 24px; height: 24px; }
.cart-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cart-info b { font-size: 0.95rem; }
.cart-info span { font-size: 0.78rem; }
.cart-unit { color: var(--text-faint) !important; }
.cart-qty { display: flex; align-items: center; gap: 4px; }
.cart-qty input {
  width: 52px; text-align: center; padding: 6px 4px;
  -moz-appearance: textfield; appearance: textfield;
}
.cart-qty input::-webkit-outer-spin-button,
.cart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--glass-bg); border: 1px solid var(--glass-brd); color: var(--text-soft);
  font-size: 1rem; line-height: 1; cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.qty-btn:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--text); }
.cart-line-total { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }

.cart-summary { position: sticky; top: calc(var(--nav-h) + 16px); }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 0.92rem; }
.cart-total-row.discount { color: var(--leaf); }
.cart-total-row.grand { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.order-row {
  display: grid; grid-template-columns: 1fr auto auto 18px;
  gap: 16px; align-items: center; margin-bottom: 10px; color: var(--text-soft);
}
.order-row svg { width: 18px; height: 18px; color: var(--text-dim); }
.order-total { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.order-status {
  display: inline-block; padding: 3px 11px; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.07); color: var(--text-dim); border: 1px solid var(--hair);
}
.order-status.s-paid,
.order-status.s-fulfilled { background: rgba(var(--leaf-rgb), 0.14); color: var(--leaf); border-color: rgba(var(--leaf-rgb), 0.35); }
.order-status.s-pending { background: rgba(var(--gold-rgb), 0.14); color: var(--gold); border-color: rgba(var(--gold-rgb), 0.35); }
.order-status.s-cancelled,
.order-status.s-failed,
.order-status.s-refunded { background: rgba(var(--danger-rgb), 0.14); color: var(--danger); border-color: rgba(var(--danger-rgb), 0.35); }

@media (max-width: 800px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-row { grid-template-columns: 46px 1fr auto; row-gap: 10px; }
  .cart-row .cart-qty { grid-column: 2; }
  .cart-row .cart-line-total { grid-column: 3; }
}

/* ============================================================
   PLAYER HUB  (/tasks)
   ============================================================ */
.hub-summary {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  margin-bottom: 22px;
}
.hub-level { display: flex; align-items: center; gap: 16px; }
.hub-level-meta { display: flex; flex-direction: column; gap: 2px; }
.hub-level-meta b { font-family: var(--font-display); font-size: 1.05rem; }
.hub-level-meta span { font-size: 0.82rem; }
.hub-bar { min-width: 0; }
.hub-balance {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  padding-left: 28px; border-left: 1px solid var(--hair);
}
.hub-balance .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.hub-balance .v {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--gold);
}
.hub-balance .v svg { width: 20px; height: 20px; }

.hub-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px;
  padding-bottom: 12px; border-bottom: 1px solid var(--hair);
}
.hub-tabs a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-pill);
  font-size: 0.9rem; font-weight: 600; color: var(--text-dim);
  border: 1px solid transparent; transition: all var(--t) var(--ease);
}
.hub-tabs a svg { width: 17px; height: 17px; }
.hub-tabs a:hover { color: var(--text); background: var(--glass-bg); }
.hub-tabs a.active {
  color: var(--text); background: var(--glass-bg);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18);
}
.hub-tabs .tab-pill {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--gold); color: #1a1400; font-size: 0.68rem; font-weight: 800;
  line-height: 19px; text-align: center;
}

.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.hub-h { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 1.02rem; }
.hub-h svg { width: 19px; height: 19px; color: var(--accent); }
.hub-stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.hub-stat-row .k { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); }
.hub-stat-row .v { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }

.hub-earn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hub-earn li { display: flex; align-items: center; gap: 11px; font-size: 0.88rem; color: var(--text-soft); }
.hub-earn li b { margin-left: auto; }
.hub-earn-ic {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
}
.hub-earn-ic svg { width: 15px; height: 15px; }

/* XP shop cards */
.xpshop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.xpshop-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 24px 18px 18px; border-radius: var(--r-lg);
  border: 1px solid var(--glass-brd);
}
.xpshop-card.buyable { border-color: color-mix(in oklab, var(--from), transparent 55%); }
.xpshop-card.locked { opacity: 0.62; }
.xpshop-ic {
  width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--from), var(--to));
  box-shadow: 0 10px 26px color-mix(in oklab, var(--from), transparent 60%);
}
.xpshop-ic svg { width: 30px; height: 30px; }
.xpshop-card.locked .xpshop-ic { background: linear-gradient(135deg, var(--bg-650), var(--bg-700)); box-shadow: none; }
.xpshop-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.xpshop-kind { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-faint); }
.xpshop-desc { font-size: 0.82rem; color: var(--text-dim); margin: 2px 0 0; }
.xpshop-price {
  display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--gold);
}
.xpshop-price svg { width: 17px; height: 17px; }
.xpshop-price span { font-size: 0.74rem; color: var(--text-dim); font-weight: 600; }
.xpshop-stock { font-size: 0.72rem; color: var(--text-dim); }
.xpshop-card form { width: 100%; margin-top: 10px; }
.xpshop-card > .btn { width: 100%; margin-top: 10px; }
.xpshop-owned {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-pill); font-size: 0.66rem; font-weight: 700;
  background: rgba(var(--leaf-rgb), 0.16); color: var(--leaf); border: 1px solid rgba(var(--leaf-rgb), 0.35);
}
.xpshop-owned svg { width: 11px; height: 11px; }

/* Perks + codes */
.perk-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--hair); }
.perk-row:first-of-type { border-top: 0; }
.perk-row b { text-transform: capitalize; font-size: 0.9rem; }
.perk-ic {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(var(--leaf-rgb), 0.14); color: var(--leaf);
}
.perk-ic svg { width: 14px; height: 14px; }

.code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--hair); flex-wrap: wrap;
}
.code-row.used { opacity: 0.5; }
.code-value {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em;
  color: var(--gold);
}

/* Admin: XP shop swatch */
.xp-swatch {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--from), var(--to));
}
.xp-swatch svg { width: 15px; height: 15px; }
.api-key-box {
  flex: 1; min-width: 240px; padding: 9px 12px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--glass-brd);
  font-family: var(--font-mono); font-size: 0.8rem; overflow-wrap: anywhere;
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-tile .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.stat-tile .v { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; margin-top: 4px; }

@media (max-width: 860px) {
  .hub-summary { grid-template-columns: 1fr; gap: 18px; }
  .hub-balance { align-items: flex-start; padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--hair); width: 100%; }
}

/* ============================================================
   COOKIE CONSENT — arcane banner with twinkling stars
   ============================================================ */
.cookie-consent {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%);
  z-index: var(--z-toast); width: min(680px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-brd-strong);
  box-shadow: var(--sh-lg), 0 0 40px rgba(var(--accent-2-rgb), 0.22);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  transition: transform 0.5s var(--spring), opacity 0.4s var(--ease); opacity: 0;
}
.cookie-consent.show { transform: translate(-50%, 0); opacity: 1; }
.cookie-stars { position: absolute; inset: 0; pointer-events: none; }
.ck-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(var(--accent-rgb), 0.9); animation: ckTwinkle 2.6s ease-in-out infinite; }
.ck-star.s1 { left: 8%; top: 30%; animation-delay: 0s; }
.ck-star.s2 { left: 22%; top: 68%; animation-delay: 0.5s; width: 2px; height: 2px; }
.ck-star.s3 { left: 40%; top: 18%; animation-delay: 1s; }
.ck-star.s4 { left: 63%; top: 74%; animation-delay: 1.4s; width: 4px; height: 4px; }
.ck-star.s5 { left: 82%; top: 28%; animation-delay: 0.8s; }
.ck-star.s6 { left: 92%; top: 60%; animation-delay: 1.8s; width: 2px; height: 2px; }
@keyframes ckTwinkle { 0%, 100% { opacity: 0.2; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .ck-star { animation: none; opacity: 0.7; } }
.cookie-ic { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-2-rgb), 0.2)); border: 1px solid var(--glass-brd); position: relative; z-index: 1; }
.cookie-ic svg { width: 22px; height: 22px; }
.cookie-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.cookie-text b { font-size: 0.94rem; }
.cookie-text p { font-size: 0.82rem; color: var(--text-dim); margin-top: 2px; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; position: relative; z-index: 1; }
@media (max-width: 560px) {
  .cookie-consent { flex-wrap: wrap; }
  .cookie-actions { width: 100%; justify-content: flex-end; }
}

/* ============================================================
   MAINTENANCE — full-screen "back soon" page
   ============================================================ */
.maint-wrap {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow: hidden;
}
.maint-card {
  position: relative; z-index: 1; width: min(560px, 100%); text-align: center;
  padding: clamp(32px, 6vw, 56px) clamp(24px, 5vw, 44px);
}
.maint-icon {
  width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 38px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-2-rgb), 0.2));
  border: 1px solid var(--glass-brd); color: var(--accent);
  animation: blockFloat 6s ease-in-out infinite;
}
.maint-msg { margin: 14px 0 0; white-space: pre-line; }
.maint-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; }
.maint-staff-link {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-faint);
}
.maint-staff-link svg { width: 14px; height: 14px; }
.maint-staff-link:hover { color: var(--text-dim); }
