/* Playport — design system */

:root {
  --bg: #080a0f;
  --bg-deep: #05070b;
  --surface: #0e121c;
  --surface-2: #131826;
  --surface-3: #1a2030;
  --surface-4: #222a3d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f6fb;
  --muted: #9aa3b7;
  --muted-2: #6c758b;
  --accent: #d7ff63;
  --accent-2: #8b6cff;
  --accent-ink: #101306;
  --accent-soft: rgba(215, 255, 99, 0.12);
  --coral: #ff7a59;
  --cyan: #5ee7ff;
  --pink: #ff8ad8;
  --gold: #ffd166;
  --danger: #ff5e78;
  --ok: #7dffb0;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 999px;
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 16px 44px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
  --header-h: 76px;
  --maxw: 1360px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1100px 760px at 88% -14%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 62%),
    radial-gradient(900px 700px at -8% 18%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, black 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, black 10%, transparent 80%);
}

body.has-tabs {
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

body[data-page="chat"] .site-footer {
  display: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

h1, h2, h3, h4, h5, p {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 30px;
  position: relative;
  z-index: 1;
}

.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.accent { color: var(--accent); }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  stroke-width: 1.8;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-4) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

/* ============================== Buttons ============================== */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 19px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s, filter 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-border: transparent;
  font-weight: 700;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 18%, transparent);
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 26%, transparent);
}

.btn-ghost {
  --btn-bg: rgba(255, 255, 255, 0.045);
}

.btn-ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-border: var(--line-strong);
}

.btn-soft {
  --btn-bg: color-mix(in srgb, var(--accent) 12%, transparent);
  --btn-fg: var(--accent);
  --btn-border: color-mix(in srgb, var(--accent) 24%, transparent);
}

.btn-soft:hover {
  --btn-bg: color-mix(in srgb, var(--accent) 18%, transparent);
}

.btn-danger {
  --btn-bg: rgba(255, 94, 120, 0.12);
  --btn-fg: #ff9cad;
  --btn-border: rgba(255, 94, 120, 0.28);
}

.btn-lg {
  min-height: 52px;
  padding: 13px 25px;
  font-size: 15px;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 94, 120, 0.35);
  background: rgba(255, 94, 120, 0.1);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 21px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-body);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-accent {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent);
}

.badge-new {
  background: var(--coral);
  border-color: transparent;
  color: #1c0b06;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ============================== Header ============================== */

.announcement {
  position: relative;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 38px;
  padding: 8px 46px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}

.announcement button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  opacity: 0.6;
  padding: 4px;
}

.announcement button:hover { opacity: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(8, 10, 15, 0.96), rgba(8, 10, 15, 0.82));
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: var(--maxw);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent);
  transition: transform 0.45s var(--ease-spring);
}

.brand:hover .brand-mark {
  transform: rotate(-16deg) scale(1.06);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--accent);
}

.header-spacer { flex: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 208px;
  height: 40px;
  padding: 0 10px 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-2);
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.search-trigger:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.search-trigger .search-label {
  flex: 1;
  text-align: left;
}

.search-trigger .kbd {
  font-size: 10px;
  min-height: 19px;
}

.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 11px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s, background 0.2s;
}

.user-chip:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.user-chip .avatar {
  width: 30px;
  height: 30px;
}

.user-chip-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  z-index: 30;
  animation: popIn 0.18s var(--ease) both;
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.user-dropdown-head .avatar {
  width: 38px;
  height: 38px;
}

.user-dropdown-head strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.2;
}

.user-dropdown-head span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.menu-item.danger:hover {
  background: rgba(255, 94, 120, 0.1);
  color: var(--danger);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-loading {
  display: flex;
  gap: 5px;
  align-items: center;
}

.header-loading span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: pulseDot 1.2s infinite ease-in-out;
}

.header-loading span:nth-child(2) { animation-delay: 0.15s; }
.header-loading span:nth-child(3) { animation-delay: 0.3s; }

/* ============================== Footer ============================== */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 100px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(13, 16, 25, 0.4), rgba(5, 7, 11, 0.85));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 54px 0 42px;
}

.footer-brand .brand {
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 330px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 15px;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
}

.footer-note .tiny-rings {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--accent);
}

.footer-note .tiny-rings span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.footer-note .tiny-rings span:nth-child(2) { background: var(--accent-2); }
.footer-note .tiny-rings span:nth-child(3) { background: var(--coral); }

/* ============================== Mobile tabs ============================== */

.mobile-tabs {
  display: none;
}

/* ============================== Boot ============================== */

.boot-screen {
  min-height: 60vh;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  color: var(--muted);
  font-size: 13px;
}

.boot-mark {
  width: 54px;
  height: 54px;
  color: var(--accent);
  animation: breathe 1.8s infinite ease-in-out;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  padding: 30px;
  text-align: center;
}

/* ============================== Hero ============================== */

.hero {
  position: relative;
  padding: 62px 0 44px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 8%;
  right: 2%;
  width: 55vw;
  height: 55vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-2) 16%, transparent);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.97fr);
  gap: 58px;
  align-items: center;
  z-index: 1;
}

.hero-copy {
  max-width: 660px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 9px;
  margin-bottom: 24px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-eyebrow .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
  animation: livePulse 2.2s infinite;
}

.hero-title {
  font-size: clamp(3.3rem, 6.4vw, 6.2rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.06em;
  max-width: 11ch;
}

.hero-title .grad {
  background: linear-gradient(100deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--cyan)) 56%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 520px;
  margin-top: 23px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 31px;
}

.hero-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 38px;
}

.hero-stat {
  padding-right: 26px;
  margin-right: 26px;
  border-right: 1px solid var(--line);
}

.hero-stat:last-child {
  border-right: 0;
  padding-right: 0;
  margin-right: 0;
}

.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-width: 0;
  perspective: 1200px;
}

.hero-feature {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: rotate(2.5deg);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  isolation: isolate;
}

.hero-feature:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.6), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.hero-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 6, 10, 0.92) 0%, rgba(4, 6, 10, 0.3) 46%, transparent 68%);
  pointer-events: none;
}

.hero-feature-art {
  aspect-ratio: 1.2 / 1;
  overflow: hidden;
}

.hero-feature-art svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.hero-feature:hover .hero-feature-art svg {
  transform: scale(1.04);
}

.hero-feature-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
}

.hero-feature-copy .eyebrow {
  color: var(--accent);
  margin-bottom: 7px;
}

.hero-feature-copy h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  letter-spacing: -0.045em;
}

.hero-feature-copy p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-feature-play {
  position: absolute;
  right: 24px;
  bottom: 26px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 0.35s var(--ease-spring);
}

.hero-feature:hover .hero-feature-play {
  transform: scale(1.08) rotate(-6deg);
}

.hero-feature-play svg {
  margin-left: 3px;
}

.float-card {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 15px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 20, 31, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  font-size: 11.5px;
  font-weight: 600;
  animation: floatY 6.5s infinite ease-in-out;
}

.float-card .float-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  flex: none;
}

.float-card strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.2;
}

.float-card span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  margin-top: 2px;
}

.float-card--games {
  top: 8%;
  left: -34px;
  animation-delay: -1.2s;
}

.float-card--live {
  bottom: 18%;
  right: -30px;
  animation-delay: -3.4s;
}

.float-card--live .float-icon {
  background: rgba(255, 122, 89, 0.14);
  color: var(--coral);
}

.hero-sticker {
  position: absolute;
  top: -16px;
  right: 32px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--accent-2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(11deg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.hero-sticker::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

/* ============================== Marquee ============================== */

.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  padding: 14px 0;
  margin: 26px 0 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-item::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
  opacity: 0.6;
}

.marquee-item:nth-child(3n)::after { background: var(--accent-2); }
.marquee-item:nth-child(3n + 2)::after { background: var(--coral); }

/* ============================== Sections ============================== */

.section {
  position: relative;
  z-index: 1;
  padding: 58px 0 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
}

.section-title-wrap .eyebrow {
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.section-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s, gap 0.2s;
}

.section-link:hover {
  color: var(--accent);
  gap: 10px;
}

/* ============================== Category grid ============================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.25s, background 0.25s;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -26px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--tile-color, var(--accent));
  opacity: 0.1;
  filter: blur(8px);
  transition: opacity 0.3s, transform 0.5s var(--ease);
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tile-color, var(--accent)) 36%, transparent);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
}

.category-tile:hover::after {
  opacity: 0.22;
  transform: scale(1.35);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  background: color-mix(in srgb, var(--tile-color, var(--accent)) 14%, transparent);
  color: var(--tile-color, var(--accent));
}

.category-icon svg {
  width: 22px;
  height: 22px;
}

.category-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-count {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
}

/* ============================== Game cards ============================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s var(--ease);
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.4);
}

.card-art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  opacity: 0.28;
  mix-blend-mode: overlay;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 7, 11, 0.55), transparent 45%);
}

.card-art > svg {
  width: 100%;
  height: 100%;
  transition: transform 0.7s var(--ease);
}

.game-card:hover .card-art > svg {
  transform: scale(1.055);
}

.card-emblem {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 44%;
  max-width: 148px;
  transform: translate(-50%, -54%);
  pointer-events: none;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.45));
  transition: transform 0.45s var(--ease-spring);
}

.card-emblem .game-icon {
  display: block;
  width: 100%;
  height: auto;
}

.game-card:hover .card-emblem {
  transform: translate(-50%, -58%) scale(1.05);
}

.search-result-art .game-icon {
  width: 100%;
  height: 100%;
  border-radius: 11px;
}

.game-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 2px;
}

.game-title-emblem {
  flex: none;
  width: 64px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}

.game-title-emblem .game-icon {
  display: block;
  width: 100%;
  height: auto;
}

.game-title-copy {
  min-width: 0;
}

@media (max-width: 560px) {
  .game-title-emblem { width: 52px; }
  .game-title-row { gap: 12px; }
}

.card-badges {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.card-badge {
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(7, 9, 14, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-badge.new {
  background: var(--coral);
  border-color: transparent;
  color: #1d0c07;
}


.card-play {
  position: absolute;
  right: 13px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(0.82) translateY(4px);
  transition: opacity 0.25s, transform 0.35s var(--ease-spring);
}

.game-card:hover .card-play,
.game-card:focus-visible .card-play {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.card-play svg {
  margin-left: 2px;
  width: 16px;
  height: 16px;
}

.card-best {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(7, 9, 14, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
}

.card-best svg {
  width: 10px;
  height: 10px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 14px 15px 15px;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-arrow {
  color: var(--muted-2);
  transition: color 0.2s, transform 0.2s;
}

.game-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

.card-tagline {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-meta .meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--surface-4);
}

.card-meta .meta-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-meta .meta-cat::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--cat-color, var(--accent));
  transform: rotate(45deg);
}

.card-likes {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-likes svg {
  width: 11px;
  height: 11px;
}

/* Large feature card variant */
.game-card--large .card-art {
  aspect-ratio: 1.55 / 1;
}

.game-card--large .card-title {
  font-size: 20px;
}

/* ============================== Page head / filters ============================== */

.page {
  position: relative;
  z-index: 1;
  padding: 48px 0 10px;
  animation: fadeUp 0.5s var(--ease) both;
}

.page-head {
  position: relative;
  padding: 8px 0 28px;
}

.page-title {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.page-sub {
  max-width: 640px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 500;
}

.breadcrumb a {
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--accent); }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(14, 18, 28, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 30;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
  flex: 1;
}

.search-field > svg {
  position: absolute;
  left: 13px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 39px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  outline: 0;
  transition: border-color 0.2s, background 0.2s;
}

.search-field input::placeholder { color: var(--muted-2); }

.search-field input:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: rgba(255, 255, 255, 0.055);
}

.search-clear {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
}

.search-clear:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }

.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.chip.active {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.sort-select {
  height: 42px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.035);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa3b7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  appearance: none;
  outline: 0;
  cursor: pointer;
}

.sort-select:hover, .sort-select:focus {
  border-color: var(--line-strong);
  color: var(--text);
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 500;
}

.result-row strong {
  color: var(--muted);
  font-weight: 600;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 13px;
  padding: 70px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--muted-2);
}

.empty-state h3 {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.empty-state p {
  max-width: 360px;
  font-size: 13px;
}

/* ============================== Community strip ============================== */

.community-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  margin-top: 62px;
  padding: 42px 44px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 26%, var(--line));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 85% 20%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}

.community-band::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -35%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.community-copy .eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
}

.community-copy h2 {
  max-width: 400px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.045em;
}

.community-copy p {
  max-width: 460px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.community-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.community-visual {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.chat-snippet {
  width: min(100%, 330px);
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(8, 10, 15, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.chat-snippet-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 4px;
}

.chat-snippet-row .avatar { width: 26px; height: 26px; }

.chat-snippet-row strong {
  display: block;
  font-size: 10.5px;
  color: var(--accent);
}

.chat-snippet-row span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.avatar-stack {
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.avatar-stack .avatar {
  width: 32px;
  height: 32px;
  margin-left: -8px;
  border: 2px solid var(--bg);
  border-radius: 50%;
}

.avatar-stack .stack-count {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  margin-left: -8px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

/* ============================== Game page ============================== */

.game-page {
  position: relative;
  z-index: 1;
  padding: 28px 0 10px;
  animation: fadeUp 0.45s var(--ease) both;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.player-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.player-card:fullscreen,
.player-card.is-theater {
  display: block;
  border: 0;
  border-radius: 0;
  background: #030407;
  box-shadow: none;
}

.player-card.is-theater {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.player-card:fullscreen .stage,
.player-card.is-theater .stage {
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  border-radius: 0;
}

.player-card:fullscreen .player-toolbar,
.player-card.is-theater .player-toolbar {
  display: none;
}

body.pp-theater {
  overflow: hidden;
}

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(139, 108, 255, 0.13), transparent 70%),
    #05060a;
  touch-action: none;
  outline: 0;
}

.stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.stage-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(rgba(255, 255, 255, 0.4) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

.player-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.player-toolbar .grow { flex: 1; }

.player-toolbar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.player-toolbar-title strong {
  color: var(--text);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud {
  position: absolute;
  inset: 12px 12px auto;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.hud[hidden] { display: none; }

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(6, 8, 13, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11px;
  color: var(--muted);
}

.hud-pill strong {
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.hud-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--muted-2);
}

.hud-best {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.hud-best span:not(.hud-label) {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hud-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
  white-space: nowrap;
}

.hud-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.hud-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(6, 8, 13, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s, background 0.2s;
}

.hud-btn:hover {
  color: #fff;
  background: rgba(20, 24, 36, 0.9);
}

.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 400px at 50% 40%, rgba(10, 12, 20, 0.35), rgba(4, 5, 9, 0.82)),
    linear-gradient(to top, rgba(4, 6, 10, 0.7), rgba(4, 6, 10, 0.25));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.stage-overlay[hidden] { display: none; }

.overlay-card {
  width: min(100%, 470px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(12, 15, 24, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: popIn 0.4s var(--ease) both;
}

.overlay-card .eyebrow {
  justify-content: center;
  color: var(--accent);
  margin-bottom: 10px;
}

.overlay-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.05em;
}

.overlay-card > p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.overlay-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 17px 0 20px;
}

.overlay-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
}

.overlay-control .kbd {
  min-height: 17px;
  font-size: 9px;
}

.overlay-card .btn {
  min-width: 170px;
}

.overlay-note {
  display: block;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.4;
}

.overlay-score {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 18px 0 22px;
}

.overlay-score strong {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.overlay-score span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overlay-score .best strong { color: var(--accent); }

.new-best {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overlay-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}

.game-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 17px;
}

.panel + .panel { margin-top: 0; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-title svg { color: var(--accent); }

.mini-muted {
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 500;
}

.game-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.game-title {
  font-size: clamp(2rem, 3.7vw, 2.9rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.game-tagline {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13.5px;
}

.game-actions {
  display: flex;
  gap: 8px;
  margin: 14px 0 20px;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.like-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.like-button.liked {
  border-color: rgba(255, 94, 120, 0.34);
  background: rgba(255, 94, 120, 0.1);
  color: #ff9cad;
}

.like-button.liked svg { fill: currentColor; }

.score-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.score-summary strong {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.score-summary span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.score-summary .accent { color: var(--accent); }

.side-note {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.leader-mini {
  display: grid;
  gap: 2px;
}

.leader-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 11px;
}

.leader-mini-row:last-child { border-bottom: 0; }

.leader-mini-pos {
  width: 18px;
  flex: none;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.leader-mini-row .avatar {
  width: 24px;
  height: 24px;
  flex: none;
}

.leader-mini-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 500;
}

.leader-mini-score {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
}

.leader-mini-empty {
  padding: 12px 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.5;
}

.control-list {
  display: grid;
  gap: 9px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}

.control-row .keys {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sensitivity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.sensitivity input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
}

.game-info {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px;
}

.info-card h3 {
  font-size: 17px;
  letter-spacing: -0.03em;
  margin-bottom: 9px;
}

.info-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.info-chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.side-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin: 0 -8px;
  border-radius: 12px;
  transition: background 0.2s;
}

.side-game:hover { background: rgba(255, 255, 255, 0.045); }

.side-game-art {
  width: 64px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  background: var(--surface-3);
}

.side-game-art svg { width: 100%; height: 100%; }

.side-game-copy {
  min-width: 0;
}

.side-game-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-game-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

/* ============================== Comments ============================== */

.comments-section {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px;
}

.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.comments-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.comments-head h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 700;
}

.comment-form {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 19px;
}

.comment-form .avatar {
  width: 32px;
  height: 32px;
  flex: none;
}

.comment-form-body {
  flex: 1;
  min-width: 0;
}

.comment-form textarea {
  width: 100%;
  min-height: 64px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  outline: 0;
  resize: vertical;
}

.comment-form textarea::placeholder { color: var(--muted-2); }

.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.comment-count {
  color: var(--muted-2);
  font-size: 10px;
}

.signin-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  margin-bottom: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.signin-prompt p {
  color: var(--muted);
  font-size: 12px;
}

.comment-list {
  display: grid;
  gap: 4px;
}

.comment {
  display: flex;
  gap: 10px;
  padding: 13px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comment:first-child { border-top: 0; padding-top: 4px; }

.comment > .avatar {
  width: 32px;
  height: 32px;
  flex: none;
}

.comment-main {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.comment-name {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.comment-name .owner-tag {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.comment-time {
  color: var(--muted-2);
  font-size: 9.5px;
}

.comment-delete {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  padding: 2px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.comment:hover .comment-delete { opacity: 1; }
.comment-delete:hover { color: var(--danger); }

.comment-body {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comments-empty {
  padding: 26px 0 10px;
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.comments-more {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ============================== Avatars ============================== */

.avatar {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: var(--surface-3);
}

.avatar svg {
  width: 100%;
  height: 100%;
}

/* ============================== Auth modal ============================== */

dialog.modal {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  max-height: min(880px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--surface-2);
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

dialog.modal::backdrop {
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

dialog.modal[open] {
  animation: modalIn 0.28s var(--ease) both;
}

dialog.modal::backdrop {
  animation: fadeIn 0.25s ease both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 10, 15, 0.55);
  color: var(--muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover { color: var(--text); background: rgba(8, 10, 15, 0.8); }

.dialog-size-sm { width: min(560px, calc(100vw - 32px)) !important; }
.dialog-size-md { width: min(720px, calc(100vw - 32px)) !important; }
.dialog-size-lg { width: min(980px, calc(100vw - 32px)) !important; }

.auth-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 590px;
}

.auth-art {
  position: relative;
  padding: 34px;
  background:
    radial-gradient(500px 400px at 20% 10%, color-mix(in srgb, var(--accent-2) 35%, transparent), transparent 70%),
    radial-gradient(400px 300px at 90% 90%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    #0b0e16;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
  pointer-events: none;
}

.auth-art .brand {
  position: relative;
  z-index: 1;
}

.auth-art-copy {
  position: relative;
  z-index: 1;
}

.auth-art-copy .eyebrow {
  color: var(--accent);
  margin-bottom: 12px;
}

.auth-art-copy h2 {
  max-width: 330px;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-art-copy p {
  max-width: 320px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
  line-height: 1.65;
}

.auth-avatar-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(5, 7, 12, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  color: var(--muted);
}

.auth-avatar-row .avatar { width: 36px; height: 36px; }

.auth-panel {
  padding: 42px 42px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-title {
  font-size: 1.7rem;
  letter-spacing: -0.045em;
  margin-bottom: 5px;
}

.auth-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 21px;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field-label span { color: var(--muted-2); font-weight: 500; }

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  outline: 0;
  transition: border-color 0.2s, background 0.2s;
}

.field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: rgba(255, 255, 255, 0.055);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }

.password-wrap { position: relative; }

.password-wrap input { padding-right: 44px; }

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
}

.password-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.form-error {
  padding: 9px 11px;
  border: 1px solid rgba(255, 94, 120, 0.28);
  border-radius: 9px;
  background: rgba(255, 94, 120, 0.09);
  color: #ff9cad;
  font-size: 11.5px;
  line-height: 1.45;
}

.form-note {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.auth-avatar-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.auth-avatar-pick .avatar { width: 44px; height: 44px; }

.auth-avatar-pick p {
  flex: 1;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Avatar editor */

.avatar-editor {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  padding: 32px;
}

.avatar-stage {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(260px 200px at 50% 20%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 70%),
    var(--bg);
  align-content: center;
}

.avatar-stage .avatar {
  width: 150px;
  height: 150px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.avatar-stage-note {
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
  line-height: 1.45;
}

.avatar-options {
  display: grid;
  gap: 18px;
  align-content: start;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.option-block h4 {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.swatch-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.swatch {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: var(--sw);
  transition: transform 0.2s, border-color 0.2s;
}

.swatch:hover { transform: scale(1.08); }

.swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.option-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.option-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.option-chip:hover { color: var(--text); border-color: var(--line-strong); }

.option-chip.active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.editor-actions .left { display: flex; gap: 8px; }

/* ============================== Search dialog ============================== */

.search-dialog {
  width: min(760px, calc(100vw - 28px)) !important;
  margin-top: 9vh;
  max-height: min(620px, calc(100dvh - 80px));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(13, 16, 25, 0.96);
  color: var(--text);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-dialog::backdrop {
  background: rgba(3, 4, 8, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.search-box > svg {
  color: var(--accent);
  flex: none;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
  outline: 0;
}

.search-box input::placeholder { color: var(--muted-2); }

.search-box .kbd { flex: none; }

.search-results {
  padding: 10px;
  overflow-y: auto;
  max-height: min(470px, calc(100dvh - 200px));
}

.search-group-label {
  padding: 9px 10px 6px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.12s;
}

.search-result:hover,
.search-result.active {
  background: rgba(255, 255, 255, 0.06);
}

.search-result.active {
  box-shadow: inset 2px 0 0 var(--accent);
}

.search-result-art {
  width: 74px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}

.search-result-art svg { width: 100%; height: 100%; }

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

.search-result-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-arrow { color: var(--muted-2); flex: none; }

.search-result:hover .search-result-arrow { color: var(--accent); }

.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
}

.search-footer span { display: inline-flex; align-items: center; gap: 5px; }

.search-empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ============================== Toasts ============================== */

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 500;
  display: grid;
  gap: 9px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(17, 21, 32, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease) both;
}

.toast.leaving { animation: toastOut 0.2s ease both; }

.toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.toast.error .toast-icon {
  background: rgba(255, 94, 120, 0.12);
  color: var(--danger);
}

.toast-text { flex: 1; }

/* ============================== Chat ============================== */

.chat-page {
  position: relative;
  z-index: 1;
  padding: 30px 0 20px;
  animation: fadeUp 0.4s var(--ease) both;
}

.chat-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  height: calc(100dvh - var(--header-h) - 70px);
  min-height: 540px;
  max-height: 900px;
}

.chat-side {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
}

.chat-side-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 18px;
}

.chat-side-card h2 {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.chat-side-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: livePulse 2.2s infinite;
}

.chat-rules {
  display: grid;
  gap: 9px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.chat-rule {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.chat-rule svg {
  color: var(--accent);
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: none;
}

.chat-side-art {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(240px 160px at 20% 10%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 70%),
    var(--surface);
  padding: 18px;
  overflow: hidden;
  margin-top: auto;
}

.chat-side-art .avatar-stack { padding-left: 8px; }

.chat-side-art p {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.chat-side-art span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.chat-head-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent);
}

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

.chat-head-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chat-head-copy span {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  margin-top: 1px;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 8px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.chat-day {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-day::before,
.chat-day::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.chat-msg {
  display: flex;
  gap: 10px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  transition: background 0.15s;
}

.chat-msg:hover { background: rgba(255, 255, 255, 0.025); }

.chat-msg.fresh { animation: messageIn 0.25s var(--ease) both; }

.chat-msg .avatar {
  width: 32px;
  height: 32px;
  margin-top: 1px;
}

.chat-msg-main { flex: 1; min-width: 0; }

.chat-msg-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.chat-msg-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}

.chat-msg.own .chat-msg-name { color: var(--accent); }

.chat-msg-name .owner-tag {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.chat-msg-time {
  color: var(--muted-2);
  font-size: 9px;
}

.chat-msg-text {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-msg-delete {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  opacity: 0;
  padding: 2px;
  align-self: flex-start;
}

.chat-msg:hover .chat-msg-delete { opacity: 1; }
.chat-msg-delete:hover { color: var(--danger); }

.chat-empty {
  display: grid;
  place-items: center;
  height: 100%;
  text-align: center;
  color: var(--muted-2);
  gap: 10px;
  font-size: 12px;
  padding: 30px;
}

.chat-empty svg { color: var(--surface-4); }

.chat-compose {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.08);
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px 7px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s;
}

.chat-input-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.chat-input-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 30px;
  max-height: 110px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  resize: none;
  outline: 0;
}

.chat-input-row textarea::placeholder { color: var(--muted-2); }

.chat-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  flex: none;
  transition: transform 0.2s, filter 0.2s;
}

.chat-send:hover { filter: brightness(1.06); transform: translateY(-1px); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.chat-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 3px 0;
  color: var(--muted-2);
  font-size: 9px;
}

.chat-compose-foot .counter.warn { color: var(--gold); }
.chat-compose-foot .counter.over { color: var(--danger); }

.chat-signin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 4px 2px;
  color: var(--muted);
  font-size: 11.5px;
}

/* ============================== Ranks ============================== */

.ranks-page {
  position: relative;
  z-index: 1;
  padding: 42px 0 0;
  animation: fadeUp 0.45s var(--ease) both;
}

.ranks-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.ranks-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  width: fit-content;
}

.ranks-tab {
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.ranks-tab.active {
  background: var(--surface-3);
  color: var(--text);
}

.ranks-filter-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ranks-board {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 120px 120px;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.15s;
}

.rank-row:last-child { border-bottom: 0; }

.rank-row:hover { background: rgba(255, 255, 255, 0.022); }

.rank-row.you {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  box-shadow: inset 2px 0 0 var(--accent);
}

.rank-pos {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.rank-pos.top1 { color: var(--gold); }
.rank-pos.top2 { color: #c7d2e0; }
.rank-pos.top3 { color: #d99b6b; }

.rank-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rank-user .avatar {
  width: 34px;
  height: 34px;
}

.rank-user-copy { min-width: 0; }

.rank-user-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-user-copy span {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  margin-top: 1px;
}

.rank-level { color: var(--muted); font-size: 11px; }

.rank-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.rank-score span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rank-your-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-size: 12px;
}

.rank-your-card strong { color: var(--accent); }

/* ============================== Profile ============================== */

.profile-page {
  position: relative;
  z-index: 1;
  padding: 40px 0 0;
  animation: fadeUp 0.45s var(--ease) both;
}

.profile-hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.profile-cover {
  height: 150px;
  background:
    radial-gradient(420px 220px at 18% 30%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(380px 240px at 82% 10%, color-mix(in srgb, var(--accent-2) 32%, transparent), transparent 70%),
    linear-gradient(120deg, #151a27, #0d1018);
  position: relative;
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
}

.profile-body {
  position: relative;
  padding: 0 30px 26px;
}

.profile-avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin-top: -54px;
  margin-bottom: 14px;
}

.profile-avatar-wrap .avatar {
  width: 108px;
  height: 108px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.avatar-edit-btn {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.2s;
}

.avatar-edit-btn:hover { transform: scale(1.08); }

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-name {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.05em;
}

.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.profile-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--surface-4);
}

.profile-bio {
  max-width: 620px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.profile-bio.empty {
  color: var(--muted-2);
  font-style: italic;
}

.profile-actions {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  gap: 8px;
}

.profile-xp {
  max-width: 480px;
  margin-top: 17px;
}

.xp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.xp-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 0.8s var(--ease);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.stat-card {
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
}

.profile-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px;
}

.profile-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.best-list { display: grid; gap: 2px; }

.best-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  transition: background 0.15s;
}

.best-row:hover { background: rgba(255, 255, 255, 0.035); }

.best-thumb {
  width: 70px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}

.best-thumb svg { width: 100%; height: 100%; }

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

.best-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-copy span {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  margin-top: 1px;
}

.best-score {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.recent-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.2s;
}

.recent-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }

.recent-art { aspect-ratio: 2.1 / 1; overflow: hidden; }
.recent-art svg { width: 100%; height: 100%; }

.recent-copy { padding: 9px 11px 11px; }

.recent-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.account-list { display: grid; gap: 8px; }

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
}

.account-row:last-child { border-bottom: 0; }

.account-row span { color: var(--muted-2); }
.account-row strong { font-weight: 600; }

.profile-empty {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ============================== Studio ============================== */

.studio-page {
  position: relative;
  z-index: 1;
  padding: 40px 0 0;
  animation: fadeUp 0.45s var(--ease) both;
}

.studio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.studio-head .eyebrow { margin-bottom: 9px; color: var(--accent); }

.studio-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.studio-nav {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.studio-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.studio-tab:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.studio-tab.active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.studio-tab svg { width: 15px; height: 15px; }

.studio-main { min-width: 0; display: grid; gap: 16px; }

.studio-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px;
}

.studio-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.studio-panel-head h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.studio-panel-head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.studio-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.studio-stat {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.studio-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.studio-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .span-2 { grid-column: span 2; }

.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10.5px;
  color: var(--muted);
  font-family: var(--font-body);
}

.color-input input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.preset-swatches { display: flex; gap: 6px; }

.preset-swatch {
  width: 24px;
  height: 24px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--sw);
  transition: transform 0.2s, border-color 0.2s;
}

.preset-swatch:hover { transform: scale(1.12); }

.preset-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.switch-row:last-child { border-bottom: 0; }

.switch-copy strong { display: block; font-size: 12px; font-weight: 600; }
.switch-copy span { display: block; color: var(--muted-2); font-size: 10px; margin-top: 1px; }

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface-4);
  transition: background 0.2s;
  cursor: pointer;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.24s var(--ease), background 0.2s;
}

.switch input:checked + .switch-track {
  background: color-mix(in srgb, var(--accent) 28%, var(--surface-4));
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
  background: var(--accent);
}

.admin-table {
  display: grid;
  gap: 8px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-row-art {
  width: 64px;
  height: 42px;
  border-radius: 7px;
  overflow: hidden;
  flex: none;
}

.admin-row-art svg { width: 100%; height: 100%; }

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

.admin-row-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row-actions { display: flex; gap: 6px; align-items: center; }

.badge-soft {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex: none;
}

.badge-soft.accent {
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

.admin-mod-row {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-mod-row:last-child { border-bottom: 0; }

.admin-mod-row .avatar { width: 28px; height: 28px; flex: none; }

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

.admin-mod-copy strong { font-size: 10.5px; font-weight: 600; }

.admin-mod-copy p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.admin-mod-copy span { color: var(--muted-2); font-size: 9px; }

.project-card {
  display: grid;
  gap: 14px;
}

.project-step {
  display: flex;
  gap: 12px;
}

.project-step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.project-step strong { display: block; font-size: 12px; font-weight: 600; }
.project-step p { margin-top: 2px; color: var(--muted-2); font-size: 10.5px; line-height: 1.5; }

.project-step code {
  display: inline-block;
  padding: 1px 5px;
  margin-top: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.studio-save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.studio-save-row .save-status {
  flex: 1;
  color: var(--muted-2);
  font-size: 10px;
}

/* ============================== Small components ============================== */

.auth-guest-card {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 70px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 260px at 50% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%),
    var(--surface);
  text-align: center;
}

.auth-guest-card .avatar {
  width: 76px;
  height: 76px;
  border: 2px solid var(--line-strong);
}

.auth-guest-card h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.auth-guest-card p {
  max-width: 380px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.access-card {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.access-card h2 { font-size: 24px; }
.access-card p { max-width: 380px; color: var(--muted); font-size: 12.5px; }
.access-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--surface-2); color: var(--muted-2); }

.page-section { padding-top: 22px; }

.not-found {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 14px;
  padding: 110px 20px;
}

.not-found .big-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--surface-4);
}

.not-found h1 { font-size: 28px; }
.not-found p { max-width: 380px; color: var(--muted); font-size: 12.5px; }

.confirm-copy {
  padding: 26px;
}

.confirm-copy h2 { font-size: 21px; }
.confirm-copy p { margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* ============================== Animations ============================== */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseDot { 0%, 100% { opacity: 0.25; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scale(0.92); opacity: 0.6; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================== Responsive ============================== */

@media (max-width: 1180px) {
  .header-inner { gap: 18px; }
  .header-nav { gap: 0; }
  .nav-link { padding: 9px 10px; }
  .search-trigger { min-width: 168px; }
  .search-trigger .kbd { display: none; }
  .hero-grid { gap: 38px; }
  .float-card--games { left: -12px; }
  .float-card--live { right: -12px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid .footer-col:last-child { display: none; }
  .studio-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1020px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { max-width: 680px; }
  .hero-title { max-width: 14ch; }
  .hero-visual { max-width: 600px; width: 100%; margin: 0 auto; }
  .hero-feature-art { aspect-ratio: 1.42 / 1; }
  .float-card--games { left: 10px; }
  .float-card--live { right: 10px; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .game-layout { grid-template-columns: 1fr; }
  .game-side {
    position: static;
    grid-template-columns: 1fr 1fr;
    display: grid;
  }
  .game-side .panel:first-child { grid-column: span 2; }
  .game-info { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 0.85fr 1.15fr; }
  .auth-panel { padding: 36px 32px 30px; }
  .chat-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .studio-layout { grid-template-columns: 1fr; }
  .studio-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 6px;
    scrollbar-width: none;
  }
  .studio-nav::-webkit-scrollbar { display: none; }
  .studio-tab { white-space: nowrap; }
  .profile-grid { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 44px minmax(0, 1fr) 96px 100px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  body.has-tabs { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .wrap { padding: 0 20px; }
  .header-inner { padding: 0 20px; gap: 12px; }
  .header-nav { display: none; }
  .search-trigger { min-width: 0; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
  .search-trigger .search-label { display: none; }
  .brand-name { font-size: 19px; }
  .mobile-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 2px;
    min-height: 66px;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(8, 10, 15, 0.93);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
  }
  .mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border-radius: 10px;
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.2s, background 0.2s;
  }
  .mobile-tab svg { width: 20px; height: 20px; }
  .mobile-tab:hover { color: var(--muted); }
  .mobile-tab.active { color: var(--accent); }
  .mobile-tab.active svg { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 40%, transparent)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; padding: 40px 0 32px; }
  .footer-brand { grid-column: span 2; }
  .footer-brand p { max-width: 440px; }
  .footer-note { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 26px; }
  .toast-root { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  .page { padding-top: 32px; }
  .page-title { font-size: clamp(2rem, 7vw, 2.8rem); }
  .filter-bar { top: calc(var(--header-h) + 8px); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .card-body { padding: 11px 12px 12px; }
  .card-title { font-size: 14.5px; }
  .card-tagline { font-size: 11px; }
  .auth-grid { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { display: none; }
  .auth-panel { padding: 38px 26px 28px; }
  .avatar-editor { grid-template-columns: 1fr; padding: 24px; gap: 22px; max-height: calc(100dvh - 40px); overflow-y: auto; }
  .avatar-stage { padding: 16px; }
  .avatar-stage .avatar { width: 110px; height: 110px; }
  .chat-shell { grid-template-columns: 1fr; height: calc(100dvh - var(--header-h) - 82px); min-height: 480px; }
  .chat-side { display: none; }
  .comments-section { padding: 17px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-body { padding: 0 20px 22px; }
  .profile-avatar-wrap, .profile-avatar-wrap .avatar { width: 90px; height: 90px; }
  .profile-avatar-wrap { margin-top: -45px; }
  .profile-actions { position: static; margin-top: 14px; }
  .community-band { grid-template-columns: 1fr; gap: 26px; padding: 30px; }
  .community-visual { justify-items: start; }
  .section { padding-top: 45px; }
  .game-page { padding-top: 18px; }
  .stage { aspect-ratio: 16 / 10; }
  .game-side { grid-template-columns: 1fr; }
  .game-side .panel:first-child { grid-column: auto; }
  .ranks-top { flex-direction: column; align-items: flex-start; }
  .rank-row { grid-template-columns: 36px minmax(0, 1fr) 88px; padding: 11px 13px; gap: 10px; }
  .rank-level { display: none; }
  .studio-stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .site-footer { margin-top: 70px; }
}

@media (min-width: 901px) {
  .mobile-tabs { display: none !important; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 15px; }
  .header-inner { padding: 0 15px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 18px; }
  .auth-actions .btn { min-height: 38px; padding: 8px 13px; font-size: 12px; }
  .user-chip-name { display: none; }
  .user-chip { padding: 3px; }
  .hero { padding-top: 30px; }
  .hero-eyebrow { margin-bottom: 17px; }
  .hero-title { font-size: clamp(2.9rem, 14vw, 4.4rem); }
  .hero-sub { font-size: 14px; margin-top: 17px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { flex: 1; min-width: 150px; }
  .hero-stats { margin-top: 27px; }
  .hero-stat { padding-right: 16px; margin-right: 16px; }
  .hero-stat strong { font-size: 18px; }
  .hero-feature { transform: none; border-radius: 20px; }
  .hero-feature:hover { transform: translateY(-3px); }
  .hero-feature-copy { padding: 18px; }
  .hero-feature-copy h2 { font-size: 1.5rem; }
  .hero-feature-copy p { font-size: 11px; max-width: 70%; }
  .hero-feature-play { width: 44px; height: 44px; right: 16px; bottom: 18px; }
  .float-card { display: none; }
  .hero-sticker { top: -10px; right: 14px; width: 68px; height: 68px; font-size: 8px; }
  .hero-feature-art { aspect-ratio: 1.25 / 1; }
  .marquee { margin-top: 12px; }
  .marquee-item { font-size: 10px; padding: 0 14px; gap: 14px; }
  .section { padding-top: 38px; }
  .section-head { margin-bottom: 16px; align-items: flex-start; }
  .section-title { font-size: 1.55rem; }
  .section-sub { font-size: 11.5px; }
  .category-grid { gap: 9px; }
  .category-tile { min-height: 70px; padding: 12px; gap: 10px; border-radius: 14px; }
  .category-icon { width: 36px; height: 36px; border-radius: 10px; }
  .category-icon svg { width: 18px; height: 18px; }
  .category-name { font-size: 13px; }
  .category-count { font-size: 9px; }
  .game-grid { gap: 10px; }
  .game-card { border-radius: 15px; }
  .card-art { aspect-ratio: 1.25 / 1; }
  .card-body { padding: 9px 10px 10px; gap: 3px; }
  .card-title { font-size: 13.5px; }
  .card-tagline { display: none; }
  .card-meta { font-size: 8.5px; gap: 6px; margin-top: 2px; }
  .card-meta .meta-cat::before { width: 4px; height: 4px; }
  .card-badges { top: 7px; left: 7px; }
  .card-badge { padding: 3px 5px; font-size: 7.5px; }
  .card-play { width: 34px; height: 34px; right: 8px; bottom: 8px; }
  .card-best { top: 7px; right: 7px; font-size: 8px; padding: 3px 5px; }
  .card-arrow { display: none; }
  .filter-bar { padding: 8px; gap: 8px; border-radius: 14px; margin-bottom: 18px; }
  .search-field { min-width: 100%; flex: 1 1 100%; order: -1; }
  .search-field input { height: 38px; font-size: 12px; }
  .chip { padding: 7px 10px; font-size: 10.5px; }
  .sort-select { height: 38px; font-size: 11px; }
  .community-band { padding: 22px; border-radius: 20px; gap: 20px; }
  .community-copy h2 { font-size: 1.65rem; }
  .community-copy p { font-size: 12px; }
  .community-actions .btn { flex: 1; min-width: 140px; }
  .chat-snippet { width: 100%; }
  .footer-grid { padding: 32px 0 24px; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-grid .footer-col:last-child { display: block; }
  .site-footer { margin-top: 55px; }
  .page { padding-top: 24px; }
  .page-sub { font-size: 12px; }
  .result-row { font-size: 10.5px; }
  .game-title { font-size: 2rem; }
  .game-tagline { font-size: 12px; }
  .stage { aspect-ratio: 4 / 3; }
  .overlay-card { padding: 20px 17px; border-radius: 17px; }
  .overlay-card h2 { font-size: 1.6rem; }
  .overlay-card > p { font-size: 11px; }
  .overlay-controls { margin: 12px 0 15px; }
  .overlay-score { gap: 26px; margin: 12px 0 16px; }
  .overlay-score strong { font-size: 26px; }
  .hud { inset: 8px 8px auto; }
  .hud-pill { height: 29px; padding: 0 8px; font-size: 9.5px; gap: 5px; }
  .hud-pill strong { font-size: 11px; }
  .hud-btn { width: 29px; height: 29px; border-radius: 8px; }
  .hud-meta { font-size: 9px; }
  .player-toolbar { min-height: 48px; padding: 7px 9px; gap: 6px; flex-wrap: wrap; }
  .player-toolbar-title { width: 100%; }
  .game-side { gap: 10px; }
  .panel { padding: 14px; border-radius: 15px; }
  .game-info { gap: 10px; margin-top: 12px; }
  .info-card { padding: 16px; }
  .comments-section { padding: 14px; margin-top: 12px; }
  .comment-form { padding: 9px; }
  .comment-form .avatar { width: 28px; height: 28px; }
  .signin-prompt { flex-direction: column; align-items: flex-start; }
  .rank-row { grid-template-columns: 30px minmax(0, 1fr) 78px; gap: 8px; padding: 10px; }
  .rank-pos { font-size: 14px; }
  .rank-user .avatar { width: 28px; height: 28px; }
  .rank-user-copy strong { font-size: 11px; }
  .rank-score { font-size: 11px; }
  .ranks-board { border-radius: 15px; }
  .profile-hero { border-radius: 20px; }
  .profile-cover { height: 110px; }
  .profile-stats { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card strong { font-size: 20px; }
  .profile-panel { padding: 16px; }
  .chat-page { padding-top: 12px; }
  .chat-shell { height: calc(100dvh - var(--header-h) - 78px); min-height: 430px; }
  .chat-head { padding: 9px 12px; min-height: 50px; }
  .chat-scroll { padding: 10px 12px 6px; }
  .chat-compose { padding: 9px 10px; }
  .chat-msg { padding: 6px; margin: 0 -6px; }
  .chat-msg .avatar { width: 28px; height: 28px; }
  .chat-msg-text { font-size: 12px; }
  .modal { border-radius: 20px !important; }
  .auth-panel { padding: 34px 20px 24px; }
  .modal-close { top: 10px; right: 10px; }
  .avatar-editor { padding: 18px; gap: 18px; }
  .avatar-stage .avatar { width: 96px; height: 96px; }
  .search-dialog { margin-top: 5vh; }
  .search-result-art { width: 58px; height: 40px; }
  .studio-head { flex-direction: column; align-items: flex-start; }
  .studio-panel { padding: 16px; }
  .studio-stats { gap: 7px; }
  .studio-stat { padding: 10px; }
  .admin-row { flex-wrap: wrap; }
  .admin-row-actions { width: 100%; justify-content: flex-end; }
  .footer-note { font-size: 10px; }
}

@media (max-width: 380px) {
  .game-grid { grid-template-columns: 1fr 1fr; }
  .card-title { font-size: 12.5px; }
  .hero-stat strong { font-size: 16px; }
  .game-stat span { font-size: 8.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; }
}

/* ============================== Game runtime bits ============================== */

.embed-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 0;
  background: #05060a;
}

.stage.has-embed canvas { visibility: hidden; }

.aim-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  pointer-events: none;
  opacity: 0.9;
}

.aim-crosshair::before,
.aim-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px rgba(215, 255, 99, 0.85);
}

.aim-crosshair::before {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  margin-left: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 32%, 0 32%, 0 68%, 100% 68%, 100% 100%, 0 100%);
}

.aim-crosshair::after {
  top: 50%;
  left: 0;
  height: 2px;
  width: 100%;
  margin-top: -1px;
  clip-path: polygon(0 0, 32% 0, 32% 100%, 0 100%, 68% 100%, 68% 0, 100% 0, 100% 100%);
}

.touch-ui {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 7;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 22px;
  pointer-events: none;
}

.touch-joy {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.12), rgba(6, 8, 13, 0.42));
  backdrop-filter: blur(6px);
  pointer-events: auto;
  touch-action: none;
}

.touch-joy::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.touch-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f2ffcf, var(--accent));
  box-shadow: 0 0 18px rgba(215, 255, 99, 0.45);
  transition: transform 0.05s linear;
  pointer-events: none;
}

.touch-action {
  pointer-events: auto;
  touch-action: none;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.touch-action:active {
  background: var(--accent);
  color: var(--accent-ink);
}

@media (prefers-reduced-motion: reduce) {
  .touch-knob { transition: none; }
}

/* ============================== Small utilities ============================== */

.linklike {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.toast-action {
  flex: none;
  border: 0;
  border-radius: 8px;
  padding: 5px 9px;
  margin-left: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.xp-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 4px 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.xp-chip strong {
  color: var(--accent);
  font-size: 11px;
}

.game-hero-meta .badge-new {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}

.comments-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comments-head h3 svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.comments-head h3 span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
}

.comments-section .comment-list {
  display: grid;
  gap: 14px;
}

.comments-section .comment {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.comments-section .comment .avatar {
  width: 36px;
  height: 36px;
}

.comments-section .comment-main {
  min-width: 0;
  flex: 1;
}

.comments-section .comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.comments-section .comment-name {
  font-size: 12.5px;
  font-weight: 700;
}

.comments-section .comment-time {
  color: var(--muted-2);
  font-size: 10.5px;
}

.comments-section .comment-delete {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  padding: 2px;
  border-radius: 6px;
}

.comments-section .comment-delete:hover {
  color: var(--danger);
  background: rgba(255, 94, 120, 0.12);
}

.comments-section .comment-delete svg {
  width: 14px;
  height: 14px;
}

.comments-section .comment-body {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.comments-section .comment-form {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.comments-section .comment-form > .avatar {
  width: 36px;
  height: 36px;
}

.comments-section .comment-form-body {
  flex: 1;
  min-width: 0;
}

.comments-section .comment-form textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
}

.comments-section .comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.comments-section .comment-count {
  color: var(--muted-2);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.comments-section .comments-empty {
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
  padding: 20px 10px;
}

.comments-section .signin-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
}

/* ===================== Titles, name glows & avatar locks ===================== */

.user-name {
  font: inherit;
}

.name-glow--cyan,
.name-glow--gold,
.name-glow--violet,
.name-glow--coral,
.name-glow--red,
.name-glow--rainbow {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 100% auto;
}

.name-glow--cyan { background-image: linear-gradient(100deg, #a9f7ff, #38cbee); filter: drop-shadow(0 0 6px rgba(94, 231, 255, 0.45)); }
.name-glow--gold { background-image: linear-gradient(100deg, #ffe9a3, #ffb020); filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.5)); }
.name-glow--violet { background-image: linear-gradient(100deg, #d9c6ff, #9b7bff); filter: drop-shadow(0 0 6px rgba(180, 139, 255, 0.5)); }
.name-glow--coral { background-image: linear-gradient(100deg, #ffc0a6, #ff5f6d); filter: drop-shadow(0 0 6px rgba(255, 122, 89, 0.5)); }
.name-glow--red { background-image: linear-gradient(100deg, #ff97a8, #ff2d55); filter: drop-shadow(0 0 6px rgba(255, 45, 85, 0.5)); }
.name-glow--rainbow {
  background-image: linear-gradient(90deg, #ff8ad8, #ffd166, #9cffc8, #5ee7ff, #b48bff, #ff8ad8);
  background-size: 200% auto;
  animation: name-rainbow 5s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 138, 216, 0.4));
}

@keyframes name-rainbow {
  to { background-position: 200% center; }
}

.title-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}

.title-chip--cyan { color: #8ef4ff; border-color: rgba(94, 231, 255, 0.4); background: rgba(94, 231, 255, 0.12); text-shadow: 0 0 10px rgba(94, 231, 255, 0.45); }
.title-chip--gold { color: #ffe08a; border-color: rgba(255, 209, 102, 0.45); background: rgba(255, 209, 102, 0.13); text-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }
.title-chip--violet { color: #d9c6ff; border-color: rgba(180, 139, 255, 0.45); background: rgba(180, 139, 255, 0.13); text-shadow: 0 0 10px rgba(180, 139, 255, 0.5); }
.title-chip--coral { color: #ffc0a6; border-color: rgba(255, 122, 89, 0.45); background: rgba(255, 122, 89, 0.13); text-shadow: 0 0 10px rgba(255, 122, 89, 0.45); }
.title-chip--red { color: #ff9aab; border-color: rgba(255, 45, 85, 0.5); background: rgba(255, 45, 85, 0.14); text-shadow: 0 0 10px rgba(255, 45, 85, 0.5); }
.title-chip--rainbow {
  background: linear-gradient(90deg, #ff8ad8, #ffd166, #9cffc8, #5ee7ff, #b48bff);
  border-color: transparent;
  color: #141824;
  text-shadow: none;
}

.avatar--glow-1 { box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.5), 0 0 12px rgba(255, 209, 102, 0.4); }
.avatar--glow-2 { box-shadow: 0 0 0 1px rgba(180, 139, 255, 0.55), 0 0 12px rgba(180, 139, 255, 0.45); }
.avatar--glow-3 { box-shadow: 0 0 0 1px rgba(255, 122, 89, 0.55), 0 0 14px rgba(255, 122, 89, 0.45); }
.avatar--glow-4 { box-shadow: 0 0 0 1px rgba(94, 231, 255, 0.55), 0 0 14px rgba(255, 138, 216, 0.4); }

.avatar-level {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.avatar-level-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: var(--muted);
}

.avatar-level-row strong {
  color: var(--text);
  font-size: 12px;
}

.avatar-level-note {
  color: var(--muted-2);
  font-size: 10px;
}

.option-block h4 span {
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.option-chip.locked,
.swatch.locked {
  position: relative;
  opacity: 0.45;
  cursor: not-allowed;
}

.option-chip .lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
}

.option-chip .lock-badge svg {
  width: 9px;
  height: 9px;
}

.swatch .lock-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(8, 10, 15, 0.6);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  margin: 0;
}

.swatch .lock-badge svg {
  width: 11px;
  height: 11px;
}

.admin-player-list {
  display: grid;
  gap: 8px;
}

.admin-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-player-row .avatar {
  width: 34px;
  height: 34px;
}

.admin-player-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.admin-player-copy strong {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.admin-player-copy span {
  color: var(--muted-2);
  font-size: 10.5px;
}

.title-select {
  min-width: 132px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

/* ------------------------------ admin console ------------------------------ */

.admin-player-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-player-toolbar .search-field {
  max-width: 320px;
}

.admin-player-toolbar .mini-muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-player-toolbar .mini-muted svg {
  width: 13px;
  height: 13px;
}

.admin-player-row {
  flex-wrap: wrap;
}

.admin-player-row[hidden] {
  display: none;
}

.admin-player-row.banned {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  background: color-mix(in srgb, var(--danger) 6%, transparent);
}

.admin-player-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-player-actions .title-select {
  min-width: 118px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.role-pill.owner {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255, 209, 102, 0.1);
}

.role-pill.staff {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
}

.role-pill.paused {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.role-pill.you {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.xp-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-3);
}

.xp-stepper button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  height: 31px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.xp-stepper button:last-child {
  border-right: 0;
}

.xp-stepper button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.xp-stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-player-actions .btn-sm {
  padding: 6px 10px;
  font-size: 10.5px;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-overview-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-overview-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.admin-overview-card h3 svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.admin-overview-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
}

.admin-overview-card strong {
  color: var(--text);
}

.admin-overview-card .btn {
  margin-top: 6px;
  justify-self: start;
}

.power-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.power-list li {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
}

.power-list strong {
  color: var(--text);
}

.admin-power-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.admin-power {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.admin-power:hover {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.admin-power.safe:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.admin-power:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.admin-power-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.admin-power-icon svg {
  width: 16px;
  height: 16px;
}

.admin-power strong {
  font-size: 12.5px;
  font-weight: 700;
  align-self: center;
}

.admin-power > span:last-child {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ------------------------------ leaderboard extras ------------------------------ */

.daily-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-2);
  font-size: 11.5px;
}

.daily-strip strong {
  color: var(--text);
}

.daily-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.daily-block {
  display: grid;
  gap: 8px;
}

.daily-block + .daily-block {
  margin-top: 26px;
}

.daily-block > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.daily-block > h2 svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.champion-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.champion-card.empty {
  border-color: var(--line);
}

.champion-art {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  display: block;
}

.champion-art svg,
.champion-art img {
  width: 100%;
  height: 100%;
  display: block;
}

.champion-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.champion-copy .eyebrow {
  margin: 0;
  color: var(--accent);
}

.champion-copy h2 {
  margin: 0;
  font-size: 18px;
}

.champion-copy p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.champion-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.champion-user .avatar {
  width: 38px;
  height: 38px;
}

.champion-user > div {
  display: grid;
  gap: 2px;
}

.champion-user strong {
  font-size: 14px;
}

.champion-user span {
  color: var(--muted-2);
  font-size: 10.5px;
}

.champion-score {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.champion-score strong {
  font-family: var(--font-display, inherit);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.champion-score span {
  color: var(--muted-2);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.champion-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition: border-color 0.18s, background 0.18s;
}

.champion-tile:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: rgba(255, 255, 255, 0.04);
}

.champion-tile-art {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  flex: none;
}

.champion-tile-art svg,
.champion-tile-art img {
  width: 100%;
  height: 100%;
  display: block;
}

.champion-tile-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.champion-tile-copy strong {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.champion-tile-copy span {
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.champion-tile-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 760px) {
  .admin-overview-grid { grid-template-columns: 1fr; }
  .admin-power-grid { grid-template-columns: 1fr; }
  .admin-player-actions { justify-content: flex-start; width: 100%; }
  .admin-player-toolbar .search-field { max-width: none; }
  .champion-card { grid-template-columns: 64px minmax(0, 1fr); }
  .champion-art { width: 64px; }
  .champion-score { grid-column: 2; justify-items: start; text-align: left; }
  .champion-grid { grid-template-columns: 1fr; }
}


/* live presence + owner command console */

.command-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line, #232636);
  border-radius: 12px;
  background: var(--panel-2, #10121a);
  margin-top: 4px;
}

.command-prompt {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.command-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13.5px;
  padding: 8px 2px;
  outline: none;
}

.command-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.6;
}

.command-hint code {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  color: var(--text, #e8eaf2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  padding: 1px 5px;
}

.command-output {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  background: rgba(215, 255, 99, 0.08);
  border: 1px solid rgba(215, 255, 99, 0.22);
}

.command-output.bad {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
}

.live-list {
  display: grid;
  gap: 6px;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--panel-2, #10121a);
  border: 1px solid var(--line, #232636);
}

.live-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.live-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
}

.live-copy span {
  font-size: 11.5px;
  color: var(--muted-2);
}

.live-copy span strong {
  display: inline;
  color: var(--accent);
  font-size: inherit;
}

/* mod desk */

.mod-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.command-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.command-chip {
  border: 1px solid var(--line, #232636);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted, #aab0c0);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}

.command-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.command-output {
  white-space: pre-wrap;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12.5px;
  line-height: 1.55;
}

.admin-mod-list {
  display: grid;
  gap: 4px;
}

@media (max-width: 860px) {
  .mod-grid { grid-template-columns: 1fr; }
}
