:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --chip: #1f2937;
  --ok: #34d399;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a { color: var(--accent-2); }

.topbar h1 a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.48rem 0.65rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15,23,42,0.9), rgba(2,6,23,0.9));
  display: inline-flex;
  align-items: center;
}

.topbar h1 a:hover {
  border-color: #38bdf8;
  color: #f8fafc;
}

.beta-badge {
  margin-left: 0.45rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7dd3fc;
  background: rgba(8, 47, 73, 0.55);
  line-height: 1.1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

.layout-2col {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.map-index-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
}

.map-index-layout .main-content {
  width: auto;
  min-width: 0;
}

.sidebar-fixed {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.sidebar-scroll {
  max-height: none;
  overflow: visible;
  padding-left: 0.2rem;
  padding-right: 0.25rem;
}

.sidebar-fixed.is-collapsed {
  display: none !important;
}

.layout-2col.sidebar-collapsed {
  grid-template-columns: 1fr !important;
}

.sidebar-inline-toggle {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-inline-icon,
.sidebar-fab-icon {
  position: relative;
  width: 14px;
  height: 14px;
}

.sidebar-inline-icon::before,
.sidebar-inline-icon::after,
.sidebar-fab-icon::before,
.sidebar-fab-icon::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.sidebar-inline-icon::before,
.sidebar-inline-icon::after {
  transform: rotate(225deg);
}

.sidebar-inline-icon::before { left: 0; top: 3px; }
.sidebar-inline-icon::after { left: 5px; top: 3px; }

.sidebar-fab-toggle {
  position: fixed;
  left: max(0.45rem, env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.95);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.45);
  padding: 0;
}

.sidebar-fab-toggle:hover {
  border-color: #67e8f9;
}

.sidebar-fab-toggle.sidebar-fab-appear::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 2px solid rgba(103, 232, 249, 0.95);
  animation: sidebarFabAppearPulse 1s ease-out forwards;
  pointer-events: none;
}

@keyframes sidebarFabAppearPulse {
  0% {
    opacity: 0.95;
    transform: scale(0.92);
  }
  70% {
    opacity: 0.45;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

.sidebar-fab-icon::before,
.sidebar-fab-icon::after {
  transform: rotate(45deg);
}

.sidebar-fab-icon::before { left: 0; top: 3px; }
.sidebar-fab-icon::after { left: 5px; top: 3px; }

.community-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.community-filter-chip {
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.community-filter-chip.active {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35) inset;
  color: #ecfeff;
}

.main-content {
  min-height: calc(100vh - 2rem);
}

.panel {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  margin: 0 0 0.55rem;
}

.panel h2 {
  margin: 0 0 0.4rem;
}

#servers-panel {
  max-width: 100%;
}

.panel > summary {
  cursor: pointer;
  list-style: none;
}

.panel > summary::-webkit-details-marker {
  display: none;
}

.panel > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.45rem;
  color: #94a3b8;
  transform: translateY(-0.5px);
}

.panel[open] > summary::before {
  content: '▾';
}

.challenge-banner {
  margin-top: 0.65rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  text-align: center !important;
}

.challenge-banner p,
.challenge-banner .meta {
  margin: 0.15rem 0;
  text-align: center !important;
}

.challenge-countdown {
  color: #ef4444;
}

.privacy-policy-panel {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.indexed-sparkline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 20px;
  opacity: 0.95;
}

.topbar-trend-wrap {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 240px;
}

.topbar-trend-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.indexed-sparkline-title {
  margin-left: 0;
  width: 260px;
  height: 52px;
  opacity: 0.98;
  cursor: pointer;
}

.indexed-ratio-title {
  font-size: 0.74rem;
  line-height: 1.1;
  color: #94a3b8;
  text-align: center;
}

.indexed-sparkline-title:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  border-radius: 6px;
}

.indexed-history-pop-title {
  margin: 0 0 0.55rem;
}

.indexed-history-chart {
  width: 100%;
  height: auto;
  margin-bottom: 0.75rem;
}

.indexed-history-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  max-height: 260px;
  overflow: auto;
}

.indexed-history-list li {
  margin: 0.15rem 0;
}

.indexed-sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

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

.controls-wrap {
  flex-wrap: wrap;
}

.community-submissions-wrap {
  display: grid;
  gap: 0.7rem;
}

.community-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.community-submit-input {
  min-width: 0;
  width: 100%;
}

.community-submit-btn {
  white-space: nowrap;
}

.btn-success-flash {
  border-color: #16a34a !important;
  background: rgba(22, 163, 74, 0.28) !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.32) inset;
  transition: background-color 2s ease, border-color 2s ease, box-shadow 2s ease;
}

input, button, select {
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0b1220;
  color: var(--text);
  padding: 0.55rem 0.75rem;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 320px;
  min-width: 220px;
}

.search-input-wrap input {
  width: 100%;
  padding-right: 2.2rem;
}

.search-clear-btn {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.search-help-btn {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1;
}

.tag-id-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 6rem;
  min-width: 6rem;
}

.tag-id-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.tag-id-badge {
  display: inline-block;
  width: 3.8rem;
  min-width: 3.8rem;
  text-align: right;
  font-weight: 800;
  color: #e2e8f0;
}

.slider-group {
  margin: 0.6rem 0;
}

.slider-group label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
}

input[type="range"] {
  width: 100%;
  min-width: 130px;
}

.noui {
  margin: 0.4rem 0.75rem 0 0.75rem;
}

.noUi-target {
  border: 1px solid #334155;
  background: #0b1220;
  box-shadow: none;
}

.noUi-connect {
  background: linear-gradient(120deg, #0ea5e9, #22d3ee);
}

.noUi-horizontal {
  height: 8px !important;
}

.noUi-horizontal .noUi-handle {
  width: 16px !important;
  height: 16px !important;
  right: -8px !important;
  top: -5px !important;
  border-radius: 50%;
  border: 2px solid #082f49;
  background: #22d3ee;
  box-shadow: none;
}

.noUi-handle::before,
.noUi-handle::after {
  display: none !important;
  content: none !important;
}

button {
  cursor: pointer;
  background: linear-gradient(120deg, #0ea5e9, #22d3ee);
  color: #001018;
  border: none;
  font-weight: 700;
}

button.ghost {
  background: #111827;
  color: var(--text);
  border: 1px solid #334155;
}

#reset-filters-btn,
#servers-filter-reset {
  border-color: #7f1d1d;
  color: #fecaca;
  background: #2b1215;
}

#reset-filters-btn:hover,
#reset-filters-btn:focus-visible,
#servers-filter-reset:hover,
#servers-filter-reset:focus-visible {
  border-color: #ef4444;
  color: #ffe4e6;
  background: #3a1216;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.panel-title-row h2 {
  margin: 0;
}

.popup-root {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
}

.popup-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.62);
  pointer-events: auto;
}

.popup-modal {
  width: min(520px, 95vw);
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.55);
}

.popup-title {
  margin: 0 0 0.45rem;
}

.popup-text {
  margin: 0 0 0.8rem;
  white-space: pre-wrap;
}

.popup-code-wrap {
  margin: 0 0 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.popup-code {
  margin: 0;
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: rgba(2, 6, 23, 0.55);
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.35;
}

.popup-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.app-notify-host {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2550;
  display: grid;
  gap: 0.45rem;
  pointer-events: none;
}

.app-notify-toast {
  max-width: min(420px, 92vw);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.82);
  background: rgba(6, 78, 59, 0.94);
  color: #d1fae5;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.42);
  opacity: 0;
  transform: translateY(-7px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-weight: 600;
}

.app-notify-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-notify-toast--error {
  border-color: rgba(239, 68, 68, 0.9);
  background: rgba(127, 29, 29, 0.94);
  color: #fee2e2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(6px);
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}

.topbar-shell {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: 0;
  padding-bottom: 0;
}

.site-status-banner {
  margin: 0.35rem 0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.48rem 0.75rem;
  font-weight: 700;
  color: #f8fafc;
  background: #0ea5e9;
  text-align: center;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.35);
}

.topbar-site-tabs {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.topbar-site-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #334155;
  color: #cbd5e1;
  text-decoration: none;
  background: #0b1220;
  font-size: 0.86rem;
}

.topbar-site-tabs a:hover {
  border-color: #38bdf8;
  color: #e0f2fe;
}

.topbar-site-tabs a.active {
  border-color: #38bdf8;
  color: #e0f2fe;
  background: rgba(8, 47, 73, 0.55);
}

.topbar-site-tabs a.has-unseen-news {
  border-color: #f59e0b;
  color: #fde68a;
}

.news-unseen-dot {
  margin-left: 0.35rem;
  font-size: 0.75rem;
  line-height: 1;
}

.topbar h1 {
  margin: 0;
}

.auth-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.map-primary-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-indexer-pill {
  color: #94a3b8;
  font-size: 0.9rem;
  white-space: nowrap;
}

.map-indexer-link {
  color: #e2e8f0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map-indexer-link:hover {
  color: #7dd3fc;
}

.admin-pending-has-items {
  border-color: #f59e0b !important;
  color: #fde68a;
}

.admin-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.35rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #111827;
  background: #f59e0b;
}

.footer-links {
  padding-top: 0.25rem;
  padding-bottom: 1rem;
  color: var(--muted);
}

.wiki-shell {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.wiki-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.wiki-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #334155;
  text-decoration: none;
  color: #cbd5e1;
  background: #0b1220;
}

.wiki-tab.active {
  border-color: #38bdf8;
  color: #e0f2fe;
  background: rgba(8, 47, 73, 0.5);
}

.wiki-pane .panel {
  margin-left: 0;
  margin-right: 0;
}

.markdown-editor-wrap { display:flex; flex-direction:column; gap:.45rem; }
.markdown-editor-toolbar { gap:.35rem; }
.markdown-editor-preview { min-height: 160px; }
.markdown-editor-preview h1,
.markdown-editor-preview h2,
.markdown-editor-preview h3,
.markdown-editor-preview h4,
.markdown-editor-preview h5,
.markdown-editor-preview h6 { margin: .35rem 0; }
.markdown-editor-preview p { margin: .25rem 0; }
.markdown-editor-preview pre { overflow:auto; padding:.6rem; background:#0b1220; border:1px solid #23324a; border-radius:8px; }
.markdown-editor-preview code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.tag-category {
  margin: 0.35rem 0 0.5rem;
}

.tag-category-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.tag-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.tag-category-tags .slider-group.lj-filter-inline {
  flex: 1 1 100%;
  margin: 0.2rem 0 0.35rem;
}

.tag-chip {
  display: inline-block;
  background: var(--chip);
  border: 1px solid #334155;
  padding: 0.22rem 0.46rem;
  border-radius: 8px;
  margin: 0.08rem;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1.1;
}

#map-meta .tag-chip {
  cursor: default;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.08rem;
  max-height: calc(1.55rem * 3);
  overflow: auto;
  margin: 0.2rem 0 0.35rem;
  padding-left: 0.14rem;
  padding-right: 0.1rem;
}

.tag-chip.active {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.35) inset;
  background: rgba(20,83,45,0.35);
}

.tag-chip.blocked {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239,68,68,0.35) inset;
  background: rgba(127,29,29,0.35);
}

.tag-chip.tag-chip-pending-delete {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239,68,68,0.35) inset;
  background: rgba(127,29,29,0.35);
}

.tag-chip.or-group {
  color: #f8fafc;
}
.tag-chip.or-group-0 { background: rgba(99, 102, 241, 0.35); border-color: #6366f1; }
.tag-chip.or-group-1 { background: rgba(14, 165, 233, 0.35); border-color: #0ea5e9; }
.tag-chip.or-group-2 { background: rgba(168, 85, 247, 0.35); border-color: #a855f7; }
.tag-chip.or-group-3 { background: rgba(236, 72, 153, 0.35); border-color: #ec4899; }
.tag-chip.or-group-4 { background: rgba(245, 158, 11, 0.35); border-color: #f59e0b; }
.tag-chip.or-group-5 { background: rgba(6, 182, 212, 0.35); border-color: #06b6d4; }
.tag-chip.or-group-6 { background: rgba(132, 204, 22, 0.35); border-color: #84cc16; }
.tag-chip.or-group-7 { background: rgba(217, 70, 239, 0.35); border-color: #d946ef; }
.tag-chip.or-group-8 { background: rgba(59, 130, 246, 0.35); border-color: #3b82f6; }
.tag-chip.or-group-9 { background: rgba(249, 115, 22, 0.35); border-color: #f97316; }

.no-results-context {
  display: block;
  margin-top: 0.35rem;
}

.map-grid {
  --card-width: 350px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-width), var(--card-width)));
  gap: 0.8rem;
  justify-content: center;
  margin: 0;
}

/* Skip full rendering work for off-screen card lists until they are near viewport. */
.map-grid > .card,
.profile-collection-rail > .card,
.indexed-maps-grid > .card,
#map-servers-box .map-server-grid > .card,
.leaderboard-box > .leaderboard-row {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.card {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 12px;
  overflow: hidden;
}

.clickable-card {
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}

.clickable-card:hover,
.clickable-card:focus {
  border-color: #38bdf8;
  transform: translateY(-1px);
  outline: none;
}

.card-media-wrap {
  position: relative;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(90deg, #0b1220 25%, #1f2937 50%, #0b1220 75%);
  background-size: 200% 100%;
  animation: img-loading-pan 1.4s ease-in-out infinite;
}

@keyframes img-loading-pan {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce), (max-width: 700px) {
  .card img,
  .shot-card img {
    animation: none;
  }
}

.card-shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.75) !important;
  border: 1px solid #475569 !important;
  color: transparent;
  font-size: 0;
}

.card-shot-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-top: 2px solid #e5e7eb;
  border-right: 2px solid #e5e7eb;
}

.card-shot-nav.prev { left: 0.45rem; }
.card-shot-nav.next { right: 0.45rem; }
.card-shot-nav.prev::before { transform: translate(-42%, -50%) rotate(-135deg); }
.card-shot-nav.next::before { transform: translate(-58%, -50%) rotate(45deg); }

.card-shot-zoom {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.75) !important;
  border: 1px solid #475569 !important;
  color: #e2e8f0;
  font-weight: 700;
  line-height: 1;
}

.card-body { padding: 0.65rem; }
.card h3 { margin: 0 0 0.25rem; }

.profile-collection-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.profile-collection-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 0.7rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.15rem;
}

.profile-collection-card {
  margin: 0;
}

.profile-collection-card-skeleton .card-media-wrap {
  line-height: 0;
}

.profile-collection-card-skeleton .skeleton-line--media {
  margin-top: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.profile-rail-nav {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.75) !important;
  border: 1px solid #475569 !important;
  color: transparent;
  font-size: 0;
  position: relative;
}

.profile-rail-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-top: 2px solid #e5e7eb;
  border-right: 2px solid #e5e7eb;
}

.profile-rail-nav.prev::before { transform: translate(-42%, -50%) rotate(-135deg); }
.profile-rail-nav.next::before { transform: translate(-58%, -50%) rotate(45deg); }

.profile-rail-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.card-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.card-author-row .meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-metrics-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.meta-inline {
  color: var(--muted);
}

.histogram-with-y-axis {
  --histogram-bar-height: 96px;
  --histogram-x-label-height: 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 0.35rem;
}

.histogram-bars-wrap {
  position: relative;
}

.histogram-gridlines {
  position: absolute;
  inset: 0 0 var(--histogram-x-label-height) 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.histogram-gridlines span {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.histogram-y-axis {
  display: grid;
  grid-template-columns: auto auto;
  align-items: stretch;
  gap: 0.22rem;
  min-height: 118px;
}

.histogram-y-axis-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.histogram-y-axis-ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  min-height: var(--histogram-bar-height);
  margin-bottom: var(--histogram-x-label-height);
}

.histogram-y-axis-tick {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1;
}

.rating-histogram {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.3rem;
  width: 100%;
}

.profile-difficulty-popup-modal {
  width: min(96vw, 1540px);
}

.profile-difficulty-popup-graph {
  margin-top: 0.15rem;
}

.profile-difficulty-popup-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
}

.profile-difficulty-popup-scroll .histogram-with-y-axis {
  min-width: 1450px;
}

.rating-histogram--popup-100 {
  gap: 0.08rem;
}

.rating-histogram--popup-100 .rating-bin {
  grid-template-rows: 220px 0.95rem;
}

.rating-histogram--popup-100 .rating-bin-label {
  font-size: 0.54rem;
  line-height: 0.95rem;
}

.rating-histogram--popup-100 .rating-bin-bar-wrap {
  justify-content: center;
}

.rating-histogram--popup-100 .rating-bin-bar {
  width: 100%;
  max-width: 9px;
}

.rating-bin {
  border: none;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-rows: var(--histogram-bar-height) var(--histogram-x-label-height);
  align-items: stretch;
  min-width: 0;
  width: 100%;
  padding: 0;
  cursor: pointer;
}

.rating-bin-bar-wrap {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
}

.rating-bin-label {
  font-size: 0.72rem;
  line-height: var(--histogram-x-label-height);
  color: var(--muted);
  text-align: center;
}

.rating-bin-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 0;
  background: #eab308;
}

.profile-header-row {
  align-items: flex-start;
  position: relative;
}

@media (min-width: 961px) {
  .profile-header-row {
    padding-right: 258px;
    min-height: 166px;
  }

  .avatar-frame-wrap {
    width: 166px;
    height: 166px;
  }

  .profile-achievement-ranks {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: 0;
  }
}

.profile-identity-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  min-width: 340px;
  flex: 1 1 auto;
}

.profile-identity-text {
  min-width: 0;
}

.profile-name-text {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

.profile-map-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.profile-map-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.56rem;
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.profile-map-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-recent-names {
  margin-top: 0.35rem;
}

.profile-points-highlight {
  width: 84px;
  min-height: 84px;
  border-radius: 10px;
  padding: 0.35rem;
  border: 1px solid rgba(250, 204, 21, 0.52);
  background: radial-gradient(circle at 18% 14%, rgba(255,255,255,0.24), transparent 38%), linear-gradient(165deg, rgba(250, 204, 21, 0.38), rgba(217, 70, 239, 0.22) 55%, rgba(30, 41, 59, 0.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 10px 20px rgba(0,0,0,0.34);
  line-height: 1.1;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.26rem;
}

.profile-points-highlight .label {
  display: block;
  color: #fffbeb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.52rem;
}

.profile-points-highlight .value {
  display: block;
  color: #fff7ed;
  font-weight: 900;
  font-size: 1.06rem;
}

.profile-points-highlight .rank {
  display: block;
  color: #fef3c7;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.profile-achievement-ranks {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(3, 78px);
  grid-auto-rows: 78px;
  gap: 0.5rem;
  width: fit-content;
  flex: 0 0 auto;
  align-self: flex-start;
}

.profile-achievement-rank-card {
  border: 1px solid rgba(125, 211, 252, 0.55);
  background: radial-gradient(circle at 18% 14%, rgba(255,255,255,0.22), transparent 35%), linear-gradient(165deg, rgba(59, 130, 246, 0.35), rgba(99, 102, 241, 0.45));
  border-radius: 14px;
  padding: 0.38rem;
  line-height: 1.12;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 7px 16px rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.18rem;
  text-decoration: none;
}

/* removed mapper square variant */

.profile-achievement-rank-card .label {
  color: #dbeafe;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
}

.profile-achievement-rank-card .rank {
  color: #ffffff;
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 7px rgba(15, 23, 42, 0.6);
}

@media (max-width: 960px) {
  .profile-header-row {
    padding-right: 0;
  }

  .profile-identity-wrap {
    min-width: 0;
    width: 100%;
  }

  .profile-achievement-ranks {
    position: static;
    margin-left: 0;
  }
}

.profile-hist-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.indexed-maps-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 0.7rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
}

.indexed-maps-controls {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.indexed-map-card .card-media-wrap {
  aspect-ratio: 16 / 9;
}

.contributor-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.6rem;
  margin: 0.12rem 0.16rem 0.12rem 0;
  border-radius: 999px;
  border: 1px solid #f59e0b;
  background: linear-gradient(180deg, rgba(245,158,11,0.24), rgba(120,53,15,0.35));
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 3px rgba(0,0,0,0.3);
  white-space: nowrap;
}

.contributor-badge-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.45));
}

.contributor-badge--locked {
  opacity: 0.45;
  filter: saturate(0.45);
}

.profile-achievement-group {
  margin-bottom: 0.35rem;
}

/* profile history styles removed */

.metric-circle {
  min-width: 44px;
  height: 44px;
  padding: 0 0.28rem;
  border-radius: 999px;
  border: 4px solid var(--c, #38bdf8);
  background: transparent;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.metric-circle-na {
  border-color: #475569;
  color: #94a3b8;
}

.metric-circle-row {
  display: flex;
  justify-content: center;
  margin: 0.1rem 0 0.35rem;
}

.metric-circle-lg {
  min-width: 74px;
  height: 74px;
  font-size: 0.92rem;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.metrics-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.metric-row {
  display: grid;
  grid-template-columns: 72px minmax(110px, 1fr) 74px;
  gap: 0.4rem;
  align-items: center;
  margin: 0.15rem 0;
}

.metric-row .meta {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.about-table-wrap {
  overflow-x: auto;
  margin-top: 0.6rem;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.about-table th,
.about-table td {
  border: 1px solid var(--line, #2b3342);
  padding: 0.7rem 0.85rem;
  text-align: center;
  vertical-align: middle;
}

/* Make column separation obvious (especially in embedded wiki panel). */
.about-table th + th,
.about-table td + td {
  border-left: 1px solid var(--line, #2b3342);
}

.about-table th:first-child,
.about-table td:first-child {
  text-align: left;
  min-width: 260px;
}

.admin-wide {
  max-width: 1800px;
}

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

.admin-hub-card {
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.85rem;
  min-height: 150px;
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
}

.admin-hub-card .emoji {
  font-size: 2rem;
  line-height: 1;
}

.admin-hub-card:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(420px, 2fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  border-bottom: 1px solid #1f2937;
  padding: 0.35rem 0;
}

.admin-user-main,
.admin-user-metrics {
  min-width: 0;
}

.admin-user-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
}

.admin-user-metrics > span {
  white-space: nowrap;
}

.admin-user-actions {
  justify-self: end;
}

.admin-user-ban-reason {
  grid-column: 1 / -1;
}

.meter {
  height: 16px;
  background: #1f2937;
  border-radius: 999px;
  overflow: hidden;
  min-width: 110px;
}

.meter > span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, #0ea5e9, #22d3ee);
}

.inline-edit {
  min-width: 260px;
}

.person-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  align-items: center;
}

.edit-section {
  margin-bottom: 0.8rem;
}

.edit-section h3 {
  margin: 0 0 0.35rem;
}

.inline-edit-year {
  max-width: 140px;
}

.inline-edit-textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0b1220;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  resize: vertical;
}

.carousel-head {
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.shots-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shots-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 340px;
  gap: 0.75rem;
}

.shot-card {
  scroll-snap-align: start;
}

.shot-card--draggable {
  cursor: grab;
}

.shot-card--draggable:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
  border-radius: 10px;
}

.shot-card--kbd-grabbed {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
  border-radius: 10px;
}

.shot-card--dragging {
  opacity: 0.55;
}

.shot-card--drop-target {
  outline: 2px dashed #60a5fa;
  outline-offset: 3px;
  border-radius: 10px;
  position: relative;
}

.shot-card--drop-before::before,
.shot-card--drop-after::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 3px;
  background: #60a5fa;
  border-radius: 999px;
  z-index: 2;
}

.shot-card--drop-before::before { left: 0.25rem; }
.shot-card--drop-after::before { right: 0.25rem; }

.shot-card--drop-target::after {
  content: attr(data-drop-hint);
  position: absolute;
  top: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  font-size: 0.72rem;
  z-index: 3;
  pointer-events: none;
}

.shots-reorder-busy {
  opacity: 0.82;
  pointer-events: none;
}

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

.shot-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #334155;
  background: linear-gradient(90deg, #0b1220 25%, #1f2937 50%, #0b1220 75%);
  background-size: 200% 100%;
  animation: img-loading-pan 1.4s ease-in-out infinite;
}

.shot-card-skeleton {
  pointer-events: none;
}

.map-shot-skeleton-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  margin-top: 0;
}

.clickable-shot {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid #334155;
  border-radius: 10px;
}

#lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

#lightbox-prev { left: 1rem; }
#lightbox-next { right: 1rem; }

.lightbox-status {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  pointer-events: none;
}

.records-box {
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 0.75rem;
  color: #bae6fd;
}

.records-box-scroll {
  max-height: 320px;
  overflow: auto;
}

.records-style-tabs {
  margin-bottom: 0.55rem;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
}

.records-style-tab {
  border: 0 !important;
  border-radius: 0 !important;
  background: #0b1220 !important;
  color: #cbd5e1 !important;
  padding: 0.45rem 0.85rem;
  border-right: 1px solid #334155 !important;
}

.records-style-tab:last-child {
  border-right: 0 !important;
}

.records-style-tab.is-active {
  background: linear-gradient(120deg, #0ea5e9, #22d3ee) !important;
  color: #001018 !important;
  box-shadow: none !important;
}

.records-style-body {
  margin-bottom: 0.55rem;
}

.records-table-wrap {
  overflow: auto;
}

.records-grid-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.records-grid-table th,
.records-grid-table td {
  border: 1px solid #334155;
  padding: 0.38rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.records-grid-table th {
  background: #0f172a;
  color: #cbd5e1;
}

.records-grid-table td:nth-child(1),
.records-grid-table td:nth-child(3),
.records-grid-table td:nth-child(5) {
  white-space: nowrap;
}

.records-grid-table td:nth-child(2),
.records-grid-table td:nth-child(4) {
  overflow-wrap: anywhere;
}

.record-source-head,
.record-source-cell {
  text-align: right !important;
}

.record-source-link {
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1;
}

.record-source-link.is-muted {
  opacity: 0.72;
  cursor: help;
}

.records-status {
  border-top: 1px solid #1f2937;
  padding-top: 0.45rem;
}

.records-status .meta {
  margin: 0.2rem 0;
}

.map-primary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.map-primary-row > .panel {
  margin: 0;
}

.map-meta-panel,
.map-records-panel,
.map-collections-panel {
  width: 100%;
}


.records-active-style {
  margin: 0.15rem 0 0.45rem;
}

@media (max-width: 1200px) {
  .map-primary-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.map-community-name {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border: 1px solid #355173;
  border-radius: 999px;
  background: #15253b;
}

.map-community-link {
  color: inherit;
  text-decoration: none;
}

.map-community-link:hover .map-community-name,
.map-community-link:focus-visible .map-community-name {
  filter: brightness(1.12);
}

.map-server-community-row {
  margin: 0 0 0.2rem;
  line-height: 1;
}

.map-server-grid {
  --card-width: 360px;
  margin-top: 0.55rem;
}

#map-servers-box .map-server-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, var(--card-width));
  justify-content: start;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
}

.map-card-skeleton .card-media-wrap {
  line-height: 0;
}

.map-card-skeleton .skeleton-line--media {
  margin-top: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.map-server-card-skeleton {
  min-height: 0;
}

.map-server-card-skeleton .skeleton-line--media {
  height: auto;
  aspect-ratio: 16 / 9;
}

.skeleton-line,
.skeleton-chip {
  position: relative;
  overflow: hidden;
  background: #1f2937;
}

.skeleton-line::after,
.skeleton-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.25), transparent);
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  height: 0.82rem;
  border-radius: 6px;
  margin-top: 0.45rem;
}

.skeleton-line--pill {
  width: 38%;
  height: 1.1rem;
  border-radius: 999px;
  margin-top: 0;
}

.skeleton-line--title {
  width: 85%;
  height: 1.25rem;
}

.skeleton-line--media {
  height: 170px;
  border-radius: 8px;
}

.skeleton-line--short {
  width: 55%;
}

.skeleton-chip {
  width: 52px;
  height: 1.05rem;
  border-radius: 999px;
  margin-top: 0.35rem;
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

.map-server-head {
  position: relative;
  border-bottom: 1px solid #1f2937;
  padding-right: 1.8rem;
}

.map-server-favorite-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 0;
  line-height: 1;
  font-size: 2rem;
  cursor: pointer;
}

.map-server-favorite-btn[aria-pressed="true"] {
  color: #fbbf24;
}

.map-server-favorite-btn:hover,
.map-server-favorite-btn:focus-visible {
  color: #fde68a;
  transform: scale(1.06);
}

.map-server-favorite-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.map-server-link {
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  min-height: calc(1.25em * 2);
}

.map-server-link--button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  text-align: left;
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.map-server-link--button:hover {
  color: #67e8f9;
}

.map-server-link--button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

.map-server-address {
  color: #94a3b8;
  font-size: 0.84rem;
  margin-top: 0.12rem;
}

.map-server-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.map-server-meta-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.map-server-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 0.07rem 0.42rem;
  font-size: 0.76rem;
  color: #cbd5e1;
  background: #0f172a;
}

.map-server-chip--vac {
  border-color: #166534;
  color: #86efac;
  background: #052e16;
}

.map-server-chip--wl {
  border-color: #7f1d1d;
  color: #fca5a5;
  background: #3f1010;
}

.map-server-chip--wl-ok {
  border-color: #166534;
  color: #86efac;
  background: #052e16;
}

.map-server-chip--wl-muted {
  border-color: #475569;
  color: #94a3b8;
  background: #1e293b;
}

.tag-chip--disabled {
  opacity: 0.55;
  filter: saturate(0.4);
  cursor: not-allowed;
}

.tag-chip--disabled:hover {
  border-color: #475569 !important;
  color: #94a3b8 !important;
}

.map-server-chip--players-live {
  border-color: #166534;
  color: #86efac;
  background: #052e16;
}

.map-server-players {
  margin-top: 0.35rem;
  border-top: 1px dashed #334155;
  padding-top: 0.3rem;
}

.vote-controls {
  display: none;
}

.map-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.55rem;
}

.map-collection-card {
  margin: 0;
}

.metric-vote-box {
  min-height: 112px;
}

.vote-slot {
  margin-top: 0.35rem;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.2rem;
}

.mini-vote-btn {
  padding: 0.3rem 0;
  font-size: 0.78rem;
  min-width: 0;
}

.vote-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.45rem;
  align-items: center;
  margin: 0.15rem 0;
}

.avatar-frame-wrap {
  width: 84px;
  height: 84px;
  padding: 4px;
  border-radius: 10px;
  background: conic-gradient(from 20deg, #38bdf8, #22d3ee, #a78bfa, #38bdf8);
  box-shadow: 0 0 0 1px #1f2937 inset, 0 0 12px rgba(56, 189, 248, 0.22);
}

@media (min-width: 961px) {
  .profile-header-row .avatar-frame-wrap {
    width: 166px;
    height: 166px;
  }
}

.profile-avatar-square {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid #334155;
  background: #020617;
}

.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spinner {
  -moz-appearance: textfield;
}

.ok { color: var(--ok); }

@media (max-width: 1024px) {
  .layout-2col {
    grid-template-columns: 1fr;
  }

  .sidebar-fixed {
    position: static;
    max-height: none;
  }

  .sidebar-scroll {
    max-height: none;
  }

  .metrics-inline {
    grid-template-columns: 1fr;
  }

  /* map servers use card grid auto-fit */

  .profile-hist-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .container {
    padding: 0.7rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-grid {
    --card-width: min(100%, 350px);
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  #map-servers-box .map-server-grid {
    grid-auto-columns: minmax(84vw, 1fr);
    scroll-snap-type: x proximity;
  }

  #map-servers-box .map-server-grid > .card {
    scroll-snap-align: start;
  }

  .vote-row,
  .metric-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .metric-row .meta {
    text-align: left;
  }

  .community-submit-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .community-submit-btn {
    width: 100%;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    justify-self: start;
  }

  .admin-user-metrics {
    white-space: normal;
  }
}

.challenge-rules-block {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #243245;
  border-radius: 10px;
  background: rgba(9, 14, 24, 0.32);
}

.challenge-rules-block h3 {
  margin: 0 0 0.3rem 0;
  font-size: 0.95rem;
}

.challenge-rules-lines {
  display: grid;
  gap: 0.18rem;
}

.challenge-rules-lines p {
  margin: 0;
  padding: 0.24rem 0.35rem;
  border-left: 2px solid rgba(147, 197, 253, 0.28);
  background: rgba(15, 23, 42, 0.18);
  border-radius: 6px;
  line-height: 1.35;
}

.challenge-rules-actions {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.leaderboard-box {
  display: grid;
  gap: 0.45rem;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 7rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border: 1px solid #243245;
  border-radius: 10px;
  background: rgba(9, 14, 24, 0.8);
}

.leaderboard-rank {
  font-weight: 800;
  color: #bae6fd;
}

.leaderboard-highlight-gold {
  border-color: #facc15;
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.4);
}

.leaderboard-highlight-silver {
  border-color: #d1d5db;
  box-shadow: inset 0 0 0 1px rgba(209, 213, 219, 0.35);
}

.leaderboard-highlight-bronze {
  border-color: #d97706;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.32);
}

.leaderboard-player {
  min-width: 0;
}

.leaderboard-player .meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-points {
  text-align: right;
  font-weight: 700;
}

.leaderboard-bonus-link {
  border: 0;
  background: transparent;
  color: #93c5fd;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 0.2rem;
  text-decoration: underline;
}

.leaderboard-bonus-link:hover {
  color: #bfdbfe;
}

.leaderboard-row-skeleton {
  pointer-events: none;
}

.leaderboard-row-skeleton .skeleton-line {
  margin-top: 0;
}

@media (max-width: 920px) {
  .leaderboard-row {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .leaderboard-points,
  .leaderboard-breakdown {
    grid-column: 2;
    text-align: left;
  }
}

/* utility modernizations (inline-style replacement) */
.u-hidden { display: none !important; }
.u-flex { display: flex; }
.u-wrap { flex-wrap: wrap; }
.u-jc-between { justify-content: space-between; }
.u-jc-center { justify-content: center; }
.u-ai-center { align-items: center; }
.u-ai-start { align-items: flex-start; }
.u-ml-auto { margin-left: auto; }
.u-m-0 { margin: 0; }
.u-mb-05 { margin-bottom: 0.5rem; }
.u-mb-075 { margin-bottom: 0.75rem; }
.u-mb-04 { margin-bottom: 0.4rem; }
.u-mt-05 { margin-top: 0.5rem; }
.u-mt-06 { margin-top: 0.6rem; }
.u-mt-075 { margin-top: 0.75rem; }
.u-mt-09 { margin-top: 0.9rem; }
.u-mt-1 { margin-top: 1rem; }
.u-mt-0 { margin-top: 0; }
.u-mt-035 { margin-top: 0.35rem; }
.u-mt-045 { margin-top: 0.45rem; }
.u-mt-065 { margin-top: 0.65rem; }
.u-mt-085 { margin-top: 0.85rem; }
.u-py-05 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.u-gap-035 { gap: 0.35rem; }
.u-gap-04 { gap: 0.4rem; }
.u-gap-045 { gap: 0.45rem; }
.u-gap-05 { gap: 0.5rem; }
.u-gap-06 { gap: 0.6rem; }
.u-gap-075 { gap: 0.75rem; }
.u-fs-09 { font-size: 0.9rem; }
.u-fw-400 { font-weight: 400; }
.u-w-100 { width: 100%; }
.u-maxw-520 { max-width: 520px; }

.wiki-container-fluid { max-width: none !important; width: 100% !important; padding-left: 1rem; padding-right: 1rem; }
.wiki-shell-fluid { width: 100% !important; max-width: none !important; }
.wiki-video-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: #020617; }
.wiki-video-close { position: absolute; top: .75rem; right: .75rem; z-index: 2; }
.wiki-video-player { width: 100vw; height: 100vh; object-fit: contain; background: #000; }
.tag-detail-container { max-width: none; width: 100%; padding: 1rem; }
.btn-linkish { text-decoration: none; padding: .42rem .7rem; border: 1px solid #334155; border-radius: .5rem; }
.btn-linkish-md { text-decoration: none; padding: .45rem .75rem; border: 1px solid #334155; border-radius: .5rem; }
.btn-linkish-sm { text-decoration: none; padding: .35rem .6rem; border: 1px solid #334155; border-radius: .45rem; display: inline-flex; align-items: center; }
.cursor-default { cursor: default; }
.u-color-muted { color: #94a3b8; }
.u-pre-wrap { white-space: pre-wrap; }
.u-mt-055 { margin-top: 0.55rem; }
.panel-fluid { width: 100% !important; max-width: none !important; }
.wiki-tag-guide-half { width: 50%; }
.contributor-badge-inline { margin-right: .4rem; margin-bottom: .35rem; display: inline-flex; }
