:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);
  --text: #fafafa;
  --muted: #a1a1aa;
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.14);
  --gold: #eab308;
  --radius: 14px;
}

[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: rgba(9, 9, 11, 0.09);
  --border-hi: rgba(9, 9, 11, 0.18);
  --text: #09090b;
  --muted: #52525b;
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.1);
  --gold: #ca8a04;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

code {
  font-family: "JetBrains Mono", monospace;
}

.container {
  width: min(1060px, calc(100% - 2.5rem));
  margin-inline: auto;
}

#snowCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}

.winter-vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px circle at 50% -10%, rgba(220, 38, 38, 0.14), transparent 55%),
    radial-gradient(600px circle at 85% 15%, rgba(255, 255, 255, 0.04), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }

.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  cursor: pointer;
  padding: 0;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem;
  border-radius: 10px;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.36rem 0.68rem;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

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

.nav-link.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-hi);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

.btn-join {
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
  transition: opacity 0.15s ease;
}

.btn-join:hover {
  opacity: 0.9;
}

.mobile-nav {
  display: none;
  gap: 0.25rem;
  padding-bottom: 0.6rem;
  overflow-x: auto;
}

/* Main Views */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view {
  display: none;
  flex: 1;
}

.view.active {
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.18s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Home */
.home-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4.5rem 0;
}

.winter-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 1.5rem;
}

.hero-title {
  margin: 0 0 0.85rem;
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.hero-desc {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3.25rem;
}

.btn-primary {
  padding: 0.78rem 1.5rem;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-ghost {
  padding: 0.78rem 1.4rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.quick-links {
  width: 100%;
  max-width: 780px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.quick-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.quick-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.q-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--red);
  font-weight: 600;
}

.q-title {
  font-weight: 700;
  font-size: 1.02rem;
}

.q-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Section Wrap */
.section-wrap {
  padding: 3.25rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Owners */
.filter-bar {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem;
  border-radius: 10px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--red);
  color: #fff;
}

.owners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.owner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.owner-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.owner-card.is-owner {
  border-color: rgba(234, 179, 8, 0.38);
}

.owner-card.is-xyn {
  border-color: rgba(220, 38, 38, 0.35);
}

.owner-card.hidden {
  display: none;
}

.owner-media {
  background: var(--surface-2);
  padding: 0.75rem;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.owner-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.owner-meta {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.owner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.owner-row h3 {
  margin: 0;
  font-size: 1.08rem;
}

.owner-row.sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.owner-row.sub code {
  font-size: 0.8rem;
  color: var(--text);
  background: var(--surface-2);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  color: var(--muted);
}

.role-badge.owner {
  color: var(--gold);
  border-color: rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.1);
}

/* Channels */
.channels-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.channel-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.channel-box-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.box-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 0.18rem 0.48rem;
  border-radius: 6px;
}

.channel-box-head h3 {
  margin: 0;
  font-size: 1.25rem;
}

.channel-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.channel-list {
  display: grid;
  gap: 0.65rem;
}

.ch-row {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ch-row code {
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 600;
}

.ch-row span {
  font-size: 0.84rem;
  color: var(--muted);
}

/* Rules */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.rule-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 500;
}

.rule-card span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  flex-shrink: 0;
}

/* FAQ */
.faq-narrow {
  max-width: 720px;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.faq-row summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-row p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-row a {
  color: var(--text);
  text-decoration: underline;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-right {
  display: flex;
  gap: 1.25rem;
}

.footer-right a:hover {
  color: var(--text);
}

@media (max-width: 820px) {
  .quick-links,
  .owners-grid,
  .channels-split,
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1.5rem);
  }

  .topbar-inner {
    height: 56px;
  }

  .brand {
    font-size: 0.98rem;
  }

  .btn-join {
    padding: 0.42rem 0.78rem;
    font-size: 0.8rem;
  }

  .nav {
    display: none;
  }

  .mobile-nav {
    display: flex;
    gap: 0.35rem;
    padding-bottom: 0.65rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav .nav-link {
    flex: 1 0 auto;
    text-align: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.84rem;
    background: var(--surface);
    border: 1px solid var(--border);
  }

  .mobile-nav .nav-link.active {
    border-color: var(--red);
    background: var(--red-soft);
    color: var(--text);
  }

  .home-center {
    padding: 2.25rem 0;
  }

  .hero-desc {
    font-size: 0.96rem;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    width: 100%;
    margin-bottom: 2rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    flex: 1;
    min-width: 135px;
    text-align: center;
    padding: 0.78rem 1rem;
  }

  .section-wrap {
    padding: 1.75rem 0;
  }

  .section-header {
    margin-bottom: 1.35rem;
  }

  .section-header h2 {
    font-size: 1.55rem;
  }

  .filter-bar {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 1 0 auto;
    padding: 0.42rem 0.75rem;
  }

  .channel-box {
    padding: 1.15rem;
  }

  .rule-card {
    padding: 0.82rem 0.9rem;
    font-size: 0.88rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
  }
}


/* ================= DISCORD LOGIN & USER MENU ================= */
.hidden {
  display: none !important;
}

.btn-discord-login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #5865f2;
  color: #ffffff;
  border: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.46rem 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-discord-login:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.user-menu-wrap {
  position: relative;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.28rem 0.72rem 0.28rem 0.32rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.user-pill:hover {
  border-color: var(--border-hi);
}

.user-pill-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-drop-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.52rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.user-drop-item:hover {
  background: var(--surface-2);
}

.user-drop-item.danger {
  color: #f87171;
}

/* ================= CUSTOM ACTIVITIES ================= */
.activities-head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.55rem 1rem !important;
  font-size: 0.85rem !important;
  border-radius: 9px !important;
}

.btn-xs {
  padding: 0.35rem 0.72rem !important;
  font-size: 0.78rem !important;
  border-radius: 8px !important;
}

.active-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
}

.active-status-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-dot-live {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  flex-shrink: 0;
}

.active-status-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4ade80;
  font-weight: 700;
}

.active-status-text {
  font-size: 0.92rem;
  font-weight: 600;
}

.active-status-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activities-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.activities-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.act-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.52rem 0.78rem;
  border-radius: 9px;
  outline: none;
  width: 100%;
}

.act-input:focus {
  border-color: var(--border-hi);
}

.act-search {
  width: 210px;
}

.act-select {
  width: auto;
  cursor: pointer;
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.act-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.15s ease;
}

.act-card:hover {
  border-color: var(--border-hi);
}

.act-card.is-active {
  border-color: rgba(34, 197, 94, 0.55);
}

.act-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.act-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.act-card-author {
  font-size: 0.78rem;
  color: var(--muted);
}

.act-card-stats {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Discord Rich Presence Mini-Box */
.rpc-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rpc-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rpc-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rpc-img-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.rpc-large-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--muted);
}

.rpc-small-img {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-2);
  background: var(--bg);
}

.rpc-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rpc-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpc-line {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpc-elapsed {
  font-size: 0.76rem;
  color: #22c55e;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}

.rpc-btn-preview {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 0.6rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

[data-theme="light"] .rpc-btn-preview {
  background: rgba(9, 9, 11, 0.05);
}

.act-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.act-use-btn {
  flex: 1;
  background: var(--text);
  color: var(--bg);
  border: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.52rem 0.8rem;
  border-radius: 9px;
  cursor: pointer;
}

.act-use-btn.active {
  background: #22c55e;
  color: #052e16;
}

.act-icon-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.72rem;
  border-radius: 9px;
  cursor: pointer;
}

.act-icon-btn.fav-on {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
}

.act-icon-btn.danger {
  color: #f87171;
}

.activities-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
  color: var(--muted);
}

/* ================= MODALS ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.modal-card.modal-wide {
  width: min(860px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.create-act-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
}

.create-act-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.create-act-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-checks {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.check-label {
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem !important;
  color: var(--text) !important;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.preview-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.rpc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rpc-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.rpc-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  font-size: 0.86rem;
}

.rpc-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.rpc-btn-row {
  margin-top: 0.55rem;
}

.rpc-cmd-box {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  overflow-x: auto;
}

@media (max-width: 780px) {
  .activities-grid,
  .create-act-layout,
  .field-row {
    grid-template-columns: 1fr;
  }

  .act-search {
    width: 100%;
  }

  .activities-controls {
    width: 100%;
  }
}


/* ================= ADMINS, ANNOUNCEMENT, CHESS & ADMIN PANEL ================= */
.quick-links-4 {
  max-width: 960px;
  grid-template-columns: repeat(4, 1fr);
}

.site-announcement {
  background: color-mix(in srgb, var(--red) 14%, var(--surface));
  border-bottom: 1px solid rgba(220, 38, 38, 0.35);
  padding: 0.5rem 0;
  font-size: 0.86rem;
}

.site-announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  text-align: center;
}

.announce-pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.14rem 0.48rem;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  letter-spacing: 0.05em;
}

.owner-card.is-admin {
  border-color: rgba(220, 38, 38, 0.28);
}

.role-badge.admin {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.35);
}

/* Chess Layout */
.chess-my-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  font-size: 0.86rem;
}

.chess-my-badge img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.chess-layout {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(300px, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.chess-board-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.chess-controls-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.5rem 0.6rem;
}

.chess-controls-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.chess-player-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.chess-strip-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chess-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
}

.chess-dot.white {
  background: #fafafa;
}

.chess-dot.black {
  background: #27272a;
}

.chess-captured {
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.chess-board-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-hi);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.chess-board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}

.chess-sq {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: clamp(1.65rem, 4.4vw, 2.55rem);
  line-height: 1;
  transition: background 0.1s ease;
}

.chess-sq.light {
  background: #d4d4d8;
  color: #18181b;
}

.chess-sq.dark {
  background: #52525b;
  color: #18181b;
}

[data-theme="light"] .chess-sq.light {
  background: #f4f4f5;
}

[data-theme="light"] .chess-sq.dark {
  background: #71717a;
}

.chess-sq.selected {
  background: rgba(234, 179, 8, 0.58) !important;
}

.chess-sq.last-move {
  box-shadow: inset 0 0 0 999px rgba(234, 179, 8, 0.22);
}

.chess-sq.in-check {
  background: radial-gradient(circle, rgba(220, 38, 38, 0.85) 0%, rgba(220, 38, 38, 0.35) 75%) !important;
}

.chess-sq.legal-move::after {
  content: "";
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: rgba(9, 9, 11, 0.28);
  pointer-events: none;
}

.chess-sq.legal-capture::after {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 3.5px solid rgba(220, 38, 38, 0.72);
  pointer-events: none;
}

.chess-coord-rank {
  position: absolute;
  top: 2px;
  left: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.6;
  pointer-events: none;
}

.chess-coord-file {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.6;
  pointer-events: none;
}

.chess-piece {
  position: relative;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.chess-piece.w {
  color: #ffffff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.chess-piece.b {
  color: #09090b;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.25);
}

.chess-promo-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
}

.chess-promo-card {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-weight: 700;
}

.chess-promo-choices {
  display: flex;
  gap: 0.5rem;
}

.chess-promo-btn {
  width: 52px;
  height: 52px;
  font-size: 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.chess-promo-btn:hover {
  border-color: var(--red);
  background: var(--red-soft);
}

.chess-status-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.chess-status-bar.status-win {
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}

.chess-status-bar.status-loss {
  border-color: rgba(220, 38, 38, 0.45);
  color: #f87171;
}

.chess-side-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chess-panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.chess-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.chess-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.chess-muted-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--muted);
}

.chess-move-list {
  max-height: 185px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 0.6rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
}

.chess-empty-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
}

.chess-move-item {
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  background: var(--surface-2);
}

.chess-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 290px;
  overflow-y: auto;
}

.chess-lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.chess-lb-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.chess-lb-rank {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--muted);
  width: 1.4rem;
  text-align: center;
}

.chess-lb-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chess-lb-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chess-lb-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.chess-elo-pill {
  font-weight: 700;
  color: var(--text);
}

.chess-title-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.22rem 0.48rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #3f3f46, #27272a);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: default;
}

.chess-title-badge.title-gm {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fef08a;
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35);
}

.chess-title-badge.title-im {
  background: linear-gradient(135deg, #991b1b, #b91c1c);
  color: #ffffff;
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.3);
}

.chess-title-badge.title-fm {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  color: #ffffff;
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28);
}

.chess-title-badge.title-cm {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  color: #ffffff;
  border-color: rgba(192, 132, 252, 0.55);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28);
}

.chess-title-badge.title-nm {
  background: linear-gradient(135deg, #047857, #059669);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.chess-title-badge.title-wgm,
.chess-title-badge.title-wim,
.chess-title-badge.title-wfm,
.chess-title-badge.title-wcm {
  background: linear-gradient(135deg, #be185d, #db2777);
  color: #fdf2f8;
  border-color: rgba(244, 114, 182, 0.55);
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.28);
}

.chess-tiers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  border-radius: 7px;
}

/* Admin Panel */
.admin-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9px;
  background: var(--red-soft);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: var(--text);
}

.admin-denied-card {
  background: var(--surface);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.admin-span-2 {
  grid-column: 1 / -1;
}

.admin-form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-form-stack label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.admin-row-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .quick-links-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .chess-layout,
  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .quick-links-4 {
    grid-template-columns: 1fr;
  }
}


/* ================= VISUAL POLISH & ADMINS SUBSECTION ================= */
.topbar {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.admins-sub-header {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.owner-card {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.owner-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.btn-primary {
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
}

.btn-discord-login {
  flex-shrink: 0;
  white-space: nowrap;
}

.auth-notice {
  background: color-mix(in srgb, #dc2626 18%, var(--surface));
  border-bottom: 1px solid rgba(220, 38, 38, 0.5);
}


/* ================= CHESS CLOCKS & FRIEND INVITE ================= */
.chess-strip-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chess-clock {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  min-width: 4.3rem;
  text-align: center;
}

.chess-clock.active-clock {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.chess-clock.low-clock {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  animation: pulseClock 1s infinite;
}

@keyframes pulseClock {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.chess-invite-box {
  background: var(--surface);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 11px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chess-invite-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.chess-invite-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.chess-invite-link-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.chess-invite-link-row .act-input {
  flex: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
}


/* ================= VISUAL OVERHAUL & 100X BETTER CHESS ================= */
body {
  background-image:
    radial-gradient(900px 500px at 50% -120px, rgba(220, 38, 38, 0.14), transparent 65%),
    radial-gradient(650px 450px at 90% 25%, rgba(99, 102, 241, 0.06), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 26px 26px;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(900px 500px at 50% -120px, rgba(220, 38, 38, 0.08), transparent 65%),
    radial-gradient(rgba(9, 9, 11, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px;
}

.hero-title {
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 55%, var(--red)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quick-card,
.chess-panel-card,
.channel-box,
.rule-card,
.faq-row {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.quick-card:hover {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(220, 38, 38, 0.12);
}

/* Better Chess Positioning & Rich Board Theme */
.chess-layout {
  grid-template-columns: minmax(0, 540px) minmax(300px, 1fr);
  gap: 1.75rem;
}

.chess-sq.light {
  background: #e4e4e7;
}

.chess-sq.dark {
  background: #52525b;
}

[data-theme="light"] .chess-sq.light {
  background: #f4f4f5;
}

[data-theme="light"] .chess-sq.dark {
  background: #71717a;
}

.chess-sq.last-move.light {
  background: #fde68a;
}

.chess-sq.last-move.dark {
  background: #ca8a04;
}

.chess-sq.selected {
  background: #facc15 !important;
}

.chess-piece-svg {
  width: 82%;
  height: 82%;
  position: relative;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.38));
  transition: transform 0.1s ease;
}

.chess-sq[draggable="true"]:hover .chess-piece-svg {
  transform: scale(1.06);
}

.chess-sq.dragging {
  opacity: 0.45;
}

.chess-mat-diff {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 0.25rem;
}

.chess-gameover-card {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  text-align: center;
  min-width: 250px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.chess-gameover-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.chess-gameover-card h3 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}

.chess-gameover-card p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.chess-gameover-actions {
  display: flex;
  gap: 0.5rem;
}


/* ================= MOBILE CHESS & TOPBAR FIX ================= */
.btn-join {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .chess-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .chess-board-col,
  .chess-side-col {
    width: 100%;
    min-width: 0;
  }

  .chess-board-wrap {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .topbar-right {
    gap: 0.35rem;
  }

  .btn-discord-login,
  .btn-join {
    padding: 0.38rem 0.65rem;
    font-size: 0.78rem;
  }

  .chess-controls-bar {
    gap: 0.4rem;
  }

  .chess-controls-group {
    width: 100%;
  }

  .chess-controls-group select {
    flex: 1;
    min-width: 0;
  }
}


/* ================= CAT PROFILE DECO ================= */
.owner-card.has-cat-deco {
  position: relative;
  overflow: visible;
  margin-top: 24px;
  margin-bottom: 14px;
}

.owner-card.has-cat-deco .owner-media {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  overflow: hidden;
}

.cat-deco-top {
  position: absolute;
  top: -54px;
  left: -12px;
  width: calc(100% + 24px);
  height: auto;
  pointer-events: none;
  z-index: 5;
}

.cat-deco-bottom {
  position: absolute;
  bottom: -30px;
  left: -12px;
  width: calc(100% + 24px);
  height: auto;
  pointer-events: none;
  z-index: 5;
}
