: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); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #67e8f9;
  background: rgba(2, 6, 23, 0.96);
  color: #f8fafc;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.45);
}

.skip-link:focus-visible {
  top: 0.75rem;
}

.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;
}

.servers-page {
  max-width: 100%;
  width: 100%;
}

.servers-top-layout {
  width: 100%;
}

.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;
}

.texture-search-panel {
  margin-top: .65rem;
  border-top: 1px solid rgba(148, 163, 184, .22);
  padding-top: .55rem;
}

.texture-search-open {
  display: block;
  width: 100%;
}

.texture-search-dialog {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, .55);
}

.texture-search-dialog::backdrop {
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(2px);
}

.texture-search-dialog__frame {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.texture-search-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 0 0 auto;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
}

.texture-search-dialog__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.texture-search-dialog__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .65rem;
  min-height: 0;
  overflow: hidden;
  padding: .65rem .85rem .5rem;
}
.duration-filter-title { display: block; margin-bottom: .45rem; font-weight: 700; }
.duration-buckets { display: flex; flex-wrap: wrap; gap: .4rem; }
.duration-buckets button { width: auto; min-width: 3.25rem; padding: .3rem .5rem; border-radius: 999px; }
.duration-buckets button[aria-pressed="true"] { border-color: #38bdf8; background: #16415a; color: #f8fafc; }
.texture-search-tools { display: flex; align-items: center; gap: .5rem; }
.texture-search-tools input[type="search"] { flex: 1; min-width: 0; }
.texture-search-tools button { flex-shrink: 0; }
.texture-library-filters { display: flex; flex-wrap: wrap; gap: .65rem; }
.texture-library-filters label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; }
.texture-library-filters select { width: auto; max-width: 100%; }
.texture-search-workspace { display: flex; flex: 1; min-height: 0; gap: 1rem; }
.texture-library-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.texture-search-workspace:has(.texture-search-results:not([hidden])) .texture-library-panel { flex: 0 0 39%; }
.texture-library-help { margin: 0 0 .55rem; }
.texture-search-results { flex: 1; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.texture-search-results[hidden], .texture-search-tools [hidden] { display: none; }
.texture-search-dialog #texture-search-status { margin: .5rem 0 0; font-size: .85rem; }
.texture-grid-viewport { flex: 1; min-height: 0; overflow: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; scrollbar-gutter: stable; }
.texture-browser-grid { position: relative; min-height: 100%; width: 100%; }
.texture-browser-card { position: absolute; width: 64px; height: 64px; border: 1px solid transparent; background: #172230; box-sizing: border-box; }
.texture-browser-card.is-selected { border-color: #38bdf8; box-shadow: 0 0 0 1px #38bdf8; z-index: 2; }
.texture-browser-card__select { display: block; position: relative; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: transparent; padding: 0; color: inherit; text-align: left; }
.texture-browser-card__select:hover, .texture-browser-card__select:focus-visible { outline: 2px solid #e1efff; outline-offset: -2px; z-index: 3; }
.texture-browser-card__visual { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; background: #0b1018; }
.texture-browser-card__visual img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.texture-browser-card__name { display: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 2px; background: #080d16eb; color: #f1f6ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .65rem; line-height: 1.3; pointer-events: none; }
.texture-browser-card__select:hover .texture-browser-card__name, .texture-browser-card__select:focus-visible .texture-browser-card__name { display: block; }
.texture-browser-preview-status { font-size: .6rem; text-align: center; color: #c3cedb; padding: 2px; }
.texture-browser-empty { padding: .6rem; }
.texture-browser-reference { width: 96px; min-width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; background: #0b1018; }
.texture-browser-reference img { max-width: 100%; max-height: 100%; object-fit: contain; }
.texture-clear-selection { margin-left: .3rem; }
.texture-similar-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.texture-similar-actions button { flex: 1; }
.texture-similar-actions button[aria-pressed="true"], .texture-similarity-presets button[aria-pressed="true"] { border-color: #38bdf8; background: #16415a; }
.texture-similar-actions p { margin: .1rem 0; font-size: .78rem; }
.texture-similarity-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; margin: .3rem 0; }
.texture-similarity-presets button { min-width: 0; }
#texture-similarity-help { margin: 0 0 .5rem; font-size: .78rem; }
.texture-group-members { display: flex; gap: .35rem; overflow-x: auto; padding: .4rem 0; list-style: none; }
.texture-group-members img { width: 64px; height: 64px; object-fit: contain; background: #0b1018; }
@media (max-width: 700px) {
  .texture-search-dialog__header { padding: .55rem .7rem; }
  .texture-search-dialog__body { padding: .5rem; gap: .4rem; }
  .texture-search-tools { flex-wrap: wrap; }
  .texture-search-tools input[type="search"] { flex-basis: 60%; }
  .texture-library-filters { gap: .3rem .5rem; }
  .texture-library-filters label { font-size: .75rem; }
  .texture-library-filters select { max-width: 140px; }
  .texture-search-workspace { flex-direction: column; gap: .4rem; }
  .texture-search-workspace:has(.texture-search-results:not([hidden])) .texture-library-panel { flex: 0 0 32%; }
  .texture-search-results { flex: 1 1 auto; width: auto; max-height: none; }
  .texture-search-selected { position: static; }
  .texture-similarity-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .texture-library-help { font-size: .75rem; }
}

:root {
  --texture-tile-size: 64px;
}

.texture-selection-list,
.texture-admin-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--texture-tile-size));
  grid-auto-rows: var(--texture-tile-size);
  gap: 0;
  align-content: start;
  max-height: min(52vh, 32rem);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.texture-selection-list > .meta,
.texture-admin-choices > .meta {
  grid-column: 1 / -1;
}

.texture-search-selected {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem;
  margin: .5rem 0;
  background: #111f31;
  border: 1px solid #38bdf8;
  border-radius: .35rem;
}

.texture-search-selected[hidden] { display: none; }
.texture-search-selected > div { min-width: 0; }
.texture-search-selected p { margin: .15rem 0; overflow-wrap: anywhere; }
.texture-show-on-main { display: block; margin-top: .35rem; }

.texture-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 424px), 424px));
  justify-content: center;
  list-style: none;
  padding: 0;
  gap: .6rem;
}

.texture-map-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
}

.texture-map-card .card { min-width: 0; width: 100%; }
.texture-map-group { margin-top: .75rem; }
.texture-map-group__heading { overflow-wrap: anywhere; margin: .4rem 0; }

.texture-map-card a { overflow-wrap: anywhere; }
.texture-map-card__link { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.texture-map-card__link span { min-width: 0; }
.texture-map-card__screenshot { display: block; width: 96px; height: 54px; flex-shrink: 0; object-fit: cover; border-radius: .2rem; background: #0b1220; }
.texture-map-card p { margin: .2rem 0 0; }
.texture-map-card__texture img { width: 64px; height: 64px; object-fit: contain; display: block; }
.texture-map-card__texture { padding: 0; border: 0; background: #0b1220; }

.texture-load-more {
  width: 100%;
  margin: 0 0 .45rem;
}

.texture-choice {
  position: relative;
  display: block;
  flex: 0 0 var(--texture-tile-size);
  width: var(--texture-tile-size);
  height: var(--texture-tile-size);
  min-width: var(--texture-tile-size);
  min-height: var(--texture-tile-size);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0b1220;
  color: #f8fafc;
  font: inherit;
  overflow: hidden;
}

.texture-choice::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

button.texture-choice:hover::after {
  box-shadow: inset 0 0 0 2px #94a3b8;
}

.texture-choice:focus-visible {
  outline: none;
}

.texture-choice:focus-visible::after {
  box-shadow: inset 0 0 0 3px #f8fafc;
}

.texture-choice.is-selected::after {
  box-shadow: inset 0 0 0 3px #38bdf8;
}

.texture-choice.is-selected:focus-visible::after {
  box-shadow: inset 0 0 0 3px #f8fafc, inset 0 0 0 5px #38bdf8;
}

.texture-choice__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #0b1220;
}

.texture-choice__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

/* Preview and bulk-selection controls share one compact tile. */
.texture-choice[hidden] { display: none; }
.texture-choice__toggle {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}
.texture-choice:focus-within::after { box-shadow: inset 0 0 0 3px #f8fafc; }
.texture-choice.is-selected:focus-within::after { box-shadow: inset 0 0 0 3px #38bdf8, inset 0 0 0 5px #f8fafc; }
.texture-choice__preview {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #0b1220d9;
  color: #f8fafc;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.texture-tag-create { display: grid; gap: .45rem; margin-block: .75rem; }
.texture-tag-create input:not([type="checkbox"]),
.texture-tag-create textarea,
.texture-tag-create select { min-width: 0; width: 100%; box-sizing: border-box; }
.texture-tag-create textarea { resize: vertical; padding: .55rem; background: #0b1220; color: var(--text); border: 1px solid #334155; border-radius: .45rem; font: inherit; }
.texture-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 1rem;
  border: 0;
  box-sizing: border-box;
  background: #080d16;
  color: #f8fafc;
}
.texture-lightbox::backdrop { background: rgb(0 0 0 / .9); }
.texture-lightbox__frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: .75rem;
}
.texture-lightbox__toolbar { display: flex; flex-wrap: wrap; gap: .5rem; }
.texture-lightbox__image-area {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  overscroll-behavior: contain;
}
.texture-lightbox__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}
.texture-lightbox__image[hidden] { display: none; }
.texture-lightbox.is-native .texture-lightbox__image-area { display: block; }
.texture-lightbox.is-native .texture-lightbox__image {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: auto;
}
.texture-lightbox__status { margin: 0; color: #cbd5e1; }

html.texture-review-open { overflow: hidden; }
dialog.texture-review {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #101722;
  color: #e8edf5;
  overflow: hidden;
}
dialog.texture-review[open] { display: flex; flex-direction: column; gap: .85rem; }
.texture-review::backdrop { background: #101722; }
.texture-review [hidden] { display: none !important; }
.texture-review__header, .texture-review__actions { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.texture-review__header h2, .texture-review__sidebar h3, .texture-review p { margin: 0; }
.texture-review__header h2 { font-size: 1.2rem; }
.texture-review__progress, .texture-review__help, .texture-review__dimensions, .texture-review__actions p { color: #bcc9db; font-size: .85rem; }
.texture-review__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 19rem); gap: 1rem; }
.texture-review__stage { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; background: #080d14; border: 1px solid #29374b; border-radius: .6rem; overflow: hidden; text-align: center; }
.texture-review__image { display: block; width: 100%; height: 100%; object-fit: contain; min-width: 0; min-height: 0; }
.texture-review__sidebar { display: flex; flex-direction: column; min-height: 0; gap: .65rem; }
.texture-review__tags { display: flex; align-content: flex-start; flex-wrap: wrap; gap: .5rem; overflow: auto; overscroll-behavior: contain; padding: .15rem .3rem .5rem .15rem; }
.texture-review__tag { min-height: 2.75rem; max-width: 100%; border-radius: 2rem; overflow-wrap: anywhere; text-align: left; }
.texture-review__tag[aria-pressed="true"] { border-color: #64b2fa; background: #19436c; color: #fff; }
.texture-review__footer { display: flex; flex-direction: column; gap: .6rem; min-width: 0; flex: none; }
.texture-review__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #e8edf5; }
.texture-review__error { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; color: #ffbcb5; }
.texture-review__error p { flex: 1; }
.texture-review__reset-confirm { padding: .75rem; border: 1px solid #6e829e; border-radius: .5rem; background: #1a2638; }
.texture-review__reset-confirm p { margin-bottom: .65rem; }
.texture-review__reset-confirm button + button { margin-left: .5rem; }
.texture-review button:focus-visible { outline: 3px solid #a5d5ff; outline-offset: 2px; }
@media (max-width: 700px) {
  dialog.texture-review { padding: max(.7rem, env(safe-area-inset-top)) max(.7rem, env(safe-area-inset-right)) max(.7rem, env(safe-area-inset-bottom)) max(.7rem, env(safe-area-inset-left)); gap: .65rem; }
  .texture-review__body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(5rem, 1fr) minmax(5rem, 32%); gap: .65rem; }
  .texture-review__sidebar { gap: .4rem; }
  .texture-review__sidebar h3 { font-size: 1rem; }
  .texture-review__help { font-size: .78rem; }
  .texture-review__tags { flex: 1; }
  .texture-review__actions { flex-wrap: wrap; gap: .5rem; }
  .texture-review__actions p { order: -1; flex-basis: 100%; font-size: .75rem; }
  .texture-review__actions button { min-height: 2.75rem; padding: .45rem .7rem; }
  .texture-review__error { font-size: .85rem; }
  .texture-review__error p { flex-basis: 100%; }
}

.texture-map-results {
  min-height: 0;
  overflow-wrap: anywhere;
}

.texture-only-card__link { color: inherit; text-decoration: none; }
.texture-only-card__link:hover, .texture-only-card__link:focus-visible { color: #67e8f9; text-decoration: underline; }
.texture-only-card__match { display: flex; align-items: center; gap: .55rem; min-width: 0; margin-top: .4rem; }
.texture-only-card__match img { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; border-radius: .25rem; background: #0b1018; }
.texture-only-card__match img[hidden] { display: none; }
.texture-only-card__preview-status { padding: .35rem 0; }
.texture-only-card__path { min-width: 0; overflow-wrap: anywhere; }

.texture-map-results ul {
  margin: .35rem 0;
  padding: 0;
}

.texture-map-results li {
  margin: .22rem 0;
}

.map-textures-panel[hidden] {
  display: none;
}

.map-textures-panel {
  min-width: 0;
}

.map-textures-list {
  display: grid;
  grid-template-rows: repeat(2, var(--texture-tile-size));
  grid-auto-flow: column;
  grid-auto-columns: var(--texture-tile-size);
  gap: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.map-textures-list:empty {
  display: none;
}

.map-textures-list li {
  width: var(--texture-tile-size);
  height: var(--texture-tile-size);
  margin: 0;
  padding: 0;
}

.map-texture-unavailable {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: .45rem;
  overflow-wrap: anywhere;
  overflow: hidden;
  background: #162337;
  color: #cbd5e1;
  font-size: .72rem;
  line-height: 1.2;
}

.texture-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, .45fr);
  gap: 1.25rem;
}

.texture-admin-grid > div {
  min-width: 0;
}

.texture-admin-tags {
  width: 100%;
  min-height: 13rem;
}

@media (max-width: 800px) {
  .texture-admin-grid { grid-template-columns: 1fr; }
  .texture-admin-tags { min-height: 9rem; }
}

.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-suggestions {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: min(17rem, 55vh);
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.98);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.08) inset;
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion-option {
  width: 100%;
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
}

.search-suggestion-option:hover,
.search-suggestion-option[aria-selected="true"] {
  background: rgba(14, 165, 233, 0.18);
  color: #f8fafc;
}

.search-suggestion-option:focus-visible {
  outline-offset: -2px;
}

.search-suggestion-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.search-suggestion-kind {
  flex: 0 0 auto;
  padding: 0.15rem 0.35rem;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.7);
  color: #7dd3fc;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.search-suggestions-status {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.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;
}

a.ghost.button-link {
  background: #111827;
  color: var(--text);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
}

#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;
  min-width: 0;
  max-width: 100%;
}

.map-indexer-pill {
  color: #94a3b8;
  font-size: 0.9rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.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; }
.markdown-editor-preview ul,
.markdown-editor-preview ol,
.news-body-markdown ul,
.news-body-markdown ol,
.wiki-static-content-markdown ul,
.wiki-static-content-markdown ol,
.wiki-tag-markdown ul,
.wiki-tag-markdown ol {
  margin: 0.35rem 0 0.35rem 1.25rem;
  padding-left: 1rem;
}
.markdown-editor-preview li,
.news-body-markdown li,
.wiki-static-content-markdown li,
.wiki-tag-markdown li {
  margin: 0.18rem 0;
}
.markdown-editor-preview ul ul,
.markdown-editor-preview ol ol,
.markdown-editor-preview ul ol,
.markdown-editor-preview ol ul,
.news-body-markdown ul ul,
.news-body-markdown ol ol,
.news-body-markdown ul ol,
.news-body-markdown ol ul,
.wiki-static-content-markdown ul ul,
.wiki-static-content-markdown ol ol,
.wiki-static-content-markdown ul ol,
.wiki-static-content-markdown ol ul,
.wiki-tag-markdown ul ul,
.wiki-tag-markdown ol ol,
.wiki-tag-markdown ul ol,
.wiki-tag-markdown ol ul {
  margin-top: 0.18rem;
  margin-bottom: 0.18rem;
}

.news-post-card {
  padding: 1rem 1.1rem;
}

.news-body-markdown {
  padding: 0.35rem 0.15rem;
}

.news-body-markdown img,
.markdown-editor-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
  border-radius: 0.5rem;
}

.news-image-upload-status { font-size: 0.85rem; }

.news-post-preview-wrap {
  border-top: 1px solid #23324a;
  padding-top: 0.75rem;
}

.news-post-preview-card {
  margin: 0;
}

.news-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.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-length-tag { border-color: #38bdf8; background: #12374a; color: #e0f7ff; cursor: default; }
.map-length-tag--no-time { border-color: #f87171; background: #4c1d24; color: #fecaca; }
.map-length-view-only { margin-bottom: .4rem; }

#owner-texture-rebucket-tools button[data-rebucket-requested] { border-color: #38bdf8; }
#texture-rebucket-action:empty { display: none; }
#texture-rebucket-progress { display: block; width: min(100%, 24rem); margin: .45rem 0; }
#texture-rebucket-progress[hidden] { display: none; }

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

#map-meta,
#map-meta p,
#map-meta a {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.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: hidden;
  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;
}

.map-server-card--outdated {
  border-color: #BF4040 !important;
  box-shadow: 0 0 0 1px rgba(191, 64, 64, 0.5);
}

.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;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-collection-rail,
  .shots-viewport {
    scroll-behavior: auto;
  }
}

.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-author-clickable {
  cursor: pointer;
}

.card-author-row a {
  position: relative;
  z-index: 1;
}

.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-side {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: 0;
  }

  .profile-achievement-ranks {
    position: static;
    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-achievement-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.indexed-maps-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.indexed-maps-action-link {
  text-decoration: none;
}

.indexed-maps-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

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

.profile-name-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.profile-name-actions > button {
  min-width: 12.5rem;
}

.profile-name-actions > .meta {
  max-width: 22rem;
}

.profile-name-history-modal {
  width: min(560px, 95vw);
}

.profile-name-history-content {
  max-height: min(65vh, 32rem);
  overflow-y: auto;
  margin: 0.65rem 0 0.85rem;
}

.profile-name-history-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-name-history-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-side-actions > .meta {
  max-width: 22rem;
  text-align: right;
}

.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-side {
    width: 100%;
    align-items: stretch;
  }

  .indexed-maps-actions {
    justify-content: flex-start;
  }

  .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;
}

.serverlist-page-hero h1 {
  font-size: 1.55rem;
  line-height: 1.2;
}

#serverlist-panel {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.serverlist-sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.9rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.serverlist-sidebar-block {
  border: 1px solid #263246;
  background: #0b1220;
  border-radius: 0.55rem;
  padding: 0.85rem;
}

.serverlist-sidebar-block h2 {
  margin: 0 0 0.65rem;
  color: #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.serverlist-main {
  min-width: 0;
}

.serverlist-add-bar {
  display: grid;
  gap: 0.65rem;
}

.serverlist-add-bar label,
.serverlist-add-short-fields label {
  display: grid;
  gap: 0.25rem;
}

.serverlist-add-bar label span,
.serverlist-add-short-fields label span {
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.serverlist-add-short-fields {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 0.55rem;
}

.serverlist-add-bar input[type="color"] {
  width: 70px;
  min-width: 70px;
  height: 2.5rem;
  padding: 0.18rem;
}

.serverlist-search-input {
  width: 100%;
}

.serverlist-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.serverlist-summary span {
  border: 1px solid #263246;
  background: #111827;
  border-radius: 0.45rem;
  color: #94a3b8;
  padding: 0.5rem;
  font-size: 0.78rem;
}

.serverlist-summary strong {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
}

.serverlist-community-nav {
  display: grid;
  gap: 0.45rem;
}

.serverlist-community-nav button {
  display: grid;
  gap: 0.12rem;
  width: 100%;
  min-height: 54px;
  border: 1px solid #263246;
  border-left: 4px solid var(--community-accent, #355173);
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.55rem 0.65rem;
  text-align: left;
  cursor: pointer;
}

.serverlist-community-nav button:hover,
.serverlist-community-nav button:focus-visible {
  border-color: #475569;
  border-left-color: var(--community-accent, #355173);
  background: #111827;
}

.serverlist-nav-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.serverlist-nav-meta {
  color: #94a3b8;
  font-size: 0.78rem;
}

.serverlist-owner-actions {
  display: grid;
  gap: 0.5rem;
}

.serverlist-owner-actions button {
  width: 100%;
}

.serverlist-community-card {
  border-color: #263246;
  overflow: clip;
}

.serverlist-community-card[hidden] {
  display: none;
}

.serverlist-community-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto max-content;
  gap: 0.75rem;
  align-items: center;
}

.serverlist-community-title {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}

.serverlist-community-title strong {
  display: block;
  color: #f8fafc;
  font-size: 1.08rem;
}

.serverlist-community-color {
  width: 0.55rem;
  align-self: stretch;
  min-height: 42px;
  border-radius: 999px;
  background: var(--community-accent, #355173);
}

.serverlist-community-header-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.serverlist-community-header-meta span {
  border: 1px solid #263246;
  border-radius: 999px;
  color: #cbd5e1;
  background: #111827;
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.serverlist-card-body {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.serverlist-community-form,
.serverlist-servers-form {
  display: grid;
  gap: 0.7rem;
}

.serverlist-community-fields {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) minmax(230px, 1.1fr) minmax(260px, 1.35fr) 82px 64px;
  gap: 0.6rem;
  align-items: end;
  width: 100%;
}

.serverlist-community-fields label,
.serverlist-server-fields label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.serverlist-community-fields label span,
.serverlist-server-fields label span {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.serverlist-color-field input {
  width: 64px;
  min-width: 64px;
  height: 2.3rem;
  box-sizing: border-box;
  padding: 0.15rem;
}

.serverlist-community-actions,
.serverlist-server-actions,
.serverlist-server-toggles {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.serverlist-community-actions {
  width: 100%;
  padding-top: 0.25rem;
}

.serverlist-community-actions .meta:first-child {
  margin-right: auto;
}

.serverlist-resource-strip {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  color: #94a3b8;
  font-size: 0.82rem;
}

.serverlist-resource-strip span,
.serverlist-resource-strip a {
  border: 1px solid #263246;
  background: #0b1220;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.serverlist-error-text {
  color: #fecaca;
  border-color: #7f1d1d !important;
}

.serverlist-server-stack {
  display: grid;
  gap: 0.7rem;
}

.serverlist-server-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.8fr) max-content;
  grid-template-areas:
    "head fields actions"
    "head toggles actions";
  gap: 0.7rem;
  align-items: center;
  border: 1px solid #263246;
  background: #0b1220;
  border-radius: 0.55rem;
  padding: 0.75rem;
}

.serverlist-server-row-head {
  grid-area: head;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.serverlist-server-row-head > div:first-child {
  min-width: 0;
}

.serverlist-server-row-head strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serverlist-server-fields {
  grid-area: fields;
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) 80px minmax(260px, 1.2fr) minmax(190px, 0.9fr);
  gap: 0.55rem;
  align-items: end;
  min-width: 0;
}

.serverlist-server-fields input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.serverlist-server-toggles {
  grid-area: toggles;
  color: #cbd5e1;
  min-width: 0;
}

.serverlist-probe-controls { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.serverlist-probe-controls label { display: inline-flex; align-items: center; gap: .3rem; }

.serverlist-server-actions {
  grid-area: actions;
  justify-content: flex-end;
  align-self: end;
}

.serverlist-server-footer {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.serverlist-discovery-panel {
  border: 1px solid #263246;
  background: #0b1220;
  border-radius: 0.55rem;
  padding: 0.75rem;
}

.serverlist-discovery-panel summary {
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 800;
}

.serverlist-discovery-panel .records-box {
  margin-top: 0.65rem;
}

.danger-light {
  color: #fecaca !important;
  border-color: #7f1d1d !important;
}

@media (max-width: 1400px) {
  .serverlist-server-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "fields"
      "toggles"
      "actions";
    align-items: stretch;
  }

  .serverlist-server-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  #serverlist-panel {
    grid-template-columns: 1fr;
  }

  .serverlist-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .serverlist-community-nav {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }

  .serverlist-community-header {
    grid-template-columns: 1fr;
  }

  .serverlist-community-header-meta {
    justify-content: flex-start;
  }

  .serverlist-community-fields,
  .serverlist-server-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .serverlist-community-fields,
  .serverlist-server-fields {
    grid-template-columns: 1fr;
  }

  #serverlist-panel {
    padding: 0.75rem;
  }

  .serverlist-summary {
    grid-template-columns: 1fr;
  }

  .serverlist-server-actions {
    justify-content: flex-start;
  }
}

.admin-console {
  display: grid;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin-page-hero,
.admin-hub { grid-column: 1 / -1; }

.admin-page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2.1rem);
  border: 1px solid #36506d;
  border-radius: 18px;
  background: linear-gradient(110deg, #142c42 0%, #102134 52%, #111827 100%);
}

.admin-page-hero::after {
  content: '';
  position: absolute;
  inset: auto -3rem -7rem auto;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(125, 211, 252, .035), 0 0 0 6rem rgba(125, 211, 252, .025);
  pointer-events: none;
}

.admin-eyebrow {
  color: #7dd3fc;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.admin-page-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.admin-page-hero h1 { margin: .5rem 0 .35rem; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.035em; }
.admin-page-hero p { margin: 0; max-width: 45rem; color: #b8c9d9; }
.admin-hero-link {
  flex: none;
  padding: .55rem .8rem;
  border: 1px solid #48627b;
  border-radius: .65rem;
  color: #e0f2fe;
  background: rgba(12, 27, 43, .7);
  text-decoration: none;
  font-weight: 700;
}
.admin-hero-link:hover { border-color: #7dd3fc; background: #1a3b55; }
.admin-page-tabs { display: flex; gap: .35rem; margin: .7rem 0 1rem; padding-bottom: .25rem; overflow-x: auto; }
.admin-page-tabs a { flex: none; padding: .5rem .8rem; border: 1px solid #34465f; border-radius: 999px; color: #c7d8e8; background: #15263a; font-size: .85rem; font-weight: 650; text-decoration: none; }
.admin-page-tabs a:hover { border-color: #62b6e4; color: #fff; }
.admin-page-tabs a[aria-current="page"] { border-color: #62b6e4; color: #fff; background: #24445e; }
.traffic-controls-panel { padding: 1.1rem; border-color: #31445e; }

.admin-hub { min-width: 0; }
.admin-hub-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: .5rem 0 1rem; }
.admin-hub-heading h2 { margin: .2rem 0 0; font-size: 1.45rem; letter-spacing: -.02em; }
.admin-hub-search { display: block; min-width: min(100%, 19rem); }
.admin-hub-search input { width: 100%; min-height: 2.65rem; border-radius: .7rem; }
.admin-hub-group { margin-bottom: 1.3rem; }
.admin-hub-group-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: .65rem; }
.admin-hub-group-heading h3 { margin: 0; color: #e7eef7; font-size: 1rem; }
.admin-hub-group-heading p { margin: 0; color: var(--muted); font-size: .85rem; }
.admin-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .65rem; }
.admin-hub-empty { padding: 2rem; text-align: center; border: 1px dashed #475569; border-radius: .85rem; color: var(--muted); }

.admin-rail {
  grid-column: 1;
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border-color: #31445e;
  border-radius: .9rem;
  background: #101e30;
}
.admin-rail-home { display: inline-block; margin-bottom: 1rem; color: #7dd3fc; font-size: .88rem; font-weight: 700; text-decoration: none; }
.admin-rail-current { display: grid; gap: .2rem; margin-bottom: 1rem; padding: .7rem .8rem; border-radius: .65rem; background: #1b344b; color: #a8c4da; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.admin-rail-current strong { color: #f0f9ff; font-size: 1rem; letter-spacing: normal; text-transform: none; }
.admin-section-menu { display: grid; gap: .12rem; max-height: calc(100vh - 15rem); overflow: auto; }
.admin-section-menu-heading { margin: .9rem .5rem .3rem; color: #91a8bd; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-section-menu a { display: block; padding: .48rem .65rem; border: 1px solid transparent; border-radius: .5rem; color: #c7d8e8; font-size: .84rem; text-decoration: none; }
.admin-section-menu a:hover { background: #20384d; color: #fff; }
.admin-section-menu a[aria-current="page"] { border-color: #487391; background: #25445c; color: #fff; font-weight: 700; }
.admin-console > [data-admin-section] { grid-column: 2; min-width: 0; padding: clamp(.9rem, 2vw, 1.4rem); border-color: #31445e; border-radius: .9rem; }
.admin-console > details[data-admin-section] > summary { font-size: 1.15rem; }

.outbound-control-groups {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.outbound-control-group {
  border: 1px solid var(--border, #334155);
  border-radius: .6rem;
  padding: .7rem;
}

.outbound-control-field {
  display: grid;
  gap: .2rem;
  margin-top: .55rem;
}

.outbound-control-field input[type="number"] {
  width: 100%;
}

.admin-hub-card {
  border: 1px solid #34465f;
  background: linear-gradient(145deg, #18283c, #111d2e);
  color: #e2e8f0;
  border-radius: .85rem;
  min-height: 94px;
  padding: .9rem;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.admin-hub-card .emoji {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .65rem;
  background: #28435c;
  font-size: 1.2rem;
}

.admin-card-copy { display: grid; gap: .22rem; min-width: 0; }
.admin-card-copy strong { line-height: 1.25; font-size: .95rem; }
.admin-card-copy small { color: #aabdd0; font-size: .76rem; line-height: 1.35; }
.admin-card-arrow { margin-left: auto; color: #81bad9; }

.admin-hub-card:hover {
  border-color: #62b6e4;
  background: #1d344b;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .admin-console { grid-template-columns: minmax(0, 1fr); }
  .admin-rail, .admin-console > [data-admin-section] { grid-column: 1; }
  .admin-rail { position: static; }
  .admin-section-menu { display: flex; gap: .25rem; max-height: none; overflow-x: auto; }
  .admin-section-menu-heading { display: none; }
  .admin-section-menu a { flex: none; white-space: nowrap; }
}

@media (max-width: 600px) {
  .admin-page-hero-row, .admin-hub-heading { align-items: stretch; flex-direction: column; }
  .admin-hero-link { align-self: flex-start; }
  .admin-hub-search { width: 100%; }
  .admin-hub-grid { grid-template-columns: 1fr; }
}

.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(0, 1fr) auto;
  gap: 0.45rem;
  align-items: stretch;
}

.person-row + .person-row {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #334155;
}

.person-row-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.75rem), 1fr));
  gap: 0.45rem;
  min-width: 0;
}

.person-row .inline-edit {
  width: 100%;
  min-width: 0;
}

.person-row-remove {
  min-width: 2.25rem;
  padding-inline: 0.55rem;
}

.map-meta-panel .inline-edit {
  min-width: 0;
  max-width: 100%;
}

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

.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 {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shots-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  place-content: center;
  gap: 0.25rem;
  min-height: 12rem;
  text-align: center;
  color: #fff;
  background: rgba(2, 132, 199, 0.78);
  border: 2px dashed #bae6fd;
  border-radius: 10px;
  pointer-events: none;
}

.shots-drop-overlay span { font-size: 0.85rem; color: #e0f2fe; }
.shots-viewport--upload-drop .shots-drop-overlay { display: grid; }

.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;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  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 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 320px;
  overflow: auto;
}

.operation-progress {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.operation-progress[hidden] { display: none; }

.screenshots-panel .operation-progress:not([hidden]) {
  display: block;
  position: sticky;
  top: 0.5rem;
  z-index: 12;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.operation-progress__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.operation-progress progress {
  display: block;
  width: 100%;
  height: 0.75rem;
  accent-color: var(--accent);
}

.operation-progress--done progress { accent-color: #35b86b; }
.operation-progress--error progress { accent-color: #e05252; }

.owner-import-details {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.owner-import-details[hidden], .owner-import-details [hidden] { display: none; }
.owner-import-phase { margin-top: 0; font-weight: 700; }
.owner-import-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.55rem; }
.owner-import-stats > div { display: grid; gap: 0.2rem; padding: 0.55rem; border: 1px solid var(--border); border-radius: 6px; }
.owner-import-stats span { color: var(--muted); font-size: 0.85rem; }
.owner-import-details h4 { margin: 0.9rem 0 0.4rem; }
.owner-import-list { margin: 0; padding-left: 1.5rem; }
.owner-import-list li { padding: 0.25rem 0.3rem; }
.owner-import-list li strong { margin-right: 0.5rem; }
.owner-import-list li[data-state="active"] { border-left: 3px solid var(--accent); }
.owner-import-list li[data-state="done"] { opacity: 0.78; }
.owner-import-list li[data-state="error"], .owner-import-list li[data-state="failed"] { color: #fca5a5; }
.owner-import-recent { max-height: 280px; overflow: auto; }
.owner-import-current-line { display: flex; align-items: center; gap: 0.65rem; }
.owner-import-current-line progress { flex: 1; min-width: 80px; accent-color: var(--accent); }

.records-style-tabs {
  width: max-content;
  max-width: 100%;
  margin-bottom: 0.55rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.records-style-tab {
  flex: 0 0 auto;
  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-tab.has-no-times,
.records-style-tab.has-no-times:hover,
.records-style-tab.has-no-times:focus-visible {
  background: #111827 !important;
  color: #94a3b8 !important;
}

.records-style-tab.has-no-times.is-active {
  background: #334155 !important;
  color: #cbd5e1 !important;
  box-shadow: inset 0 -2px 0 #94a3b8 !important;
}

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

.records-substyle-tabs.u-hidden {
  display: none;
}

.records-substyle-tab {
  padding: 0.32rem 0.7rem;
  font-size: 0.85rem;
}

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

.records-pagination {
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.records-pagination[hidden] {
  display: none;
}

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

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

.records-grid-table.has-server-column {
  min-width: 820px;
}

.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-server-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.record-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1;
}

.record-source-image {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.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-detail-content {
  container: map-details / inline-size;
}

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

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

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

.map-meta-panel,
.map-records-panel {
  height: 26rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.map-records-panel {
  display: flex;
  flex-direction: column;
}

.map-records-panel > .records-box {
  flex: 1;
  min-height: 0;
  max-height: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.map-records-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.4rem;
}

.map-records-header h2 {
  margin: 0;
}

.records-preferences {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: auto;
}

.records-preference-status:not(:empty) {
  flex-basis: 100%;
  text-align: right;
}

.records-preference-status:empty,
#record-duplicates-status:empty,
#default-sort-status:empty {
  display: none;
}

button.record-runs-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.15rem 0.1rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.record-runs-switch__track {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: 2rem;
  height: 1.125rem;
  padding: 2px;
  border: 1px solid #64748b;
  border-radius: 999px;
  background: #334155;
}

.record-runs-switch__thumb {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #e2e8f0;
}

.record-runs-switch[aria-checked="true"] .record-runs-switch__track {
  justify-content: flex-end;
  border-color: var(--accent);
  background: var(--accent);
}

.record-runs-switch[aria-checked="true"] .record-runs-switch__thumb {
  background: #082f49;
}

.record-runs-switch:disabled {
  cursor: wait;
  opacity: 0.65;
}

.map-meta-panel > .controls {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

#primary-download {
  min-width: 0;
  max-width: 100%;
}


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

@media (max-width: 1350px) {
  .map-index-layout.map-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.map-community-name {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  line-height: 1.2;
  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: 3.7rem;
}

.map-server-pin-actions {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.map-server-favorite-btn {
  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-bottom-btn[aria-pressed="true"] {
  color: #f87171;
}

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

.map-server-bottom-btn:hover,
.map-server-bottom-btn:focus-visible {
  color: #fca5a5;
}

.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);
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-width: 0;
}

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

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

.map-server-connect-btn {
  color: #67e8f9;
  font-size: 1.35rem;
  transform: translateY(0.08rem);
}

.map-server-connect-btn:hover,
.map-server-connect-btn:focus-visible {
  color: #cffafe;
}

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

.server-address-connect {
  appearance: none;
  border: 0;
  background: transparent;
  color: #93c5fd;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.server-address-connect:hover,
.server-address-connect:focus-visible,
.server-community-website-link:hover,
.server-community-website-link:focus-visible,
.server-owner-link:hover,
.server-owner-link:focus-visible {
  color: #cffafe;
}

.server-owner-meta {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  color: #94a3b8;
}

.server-owner-link {
  color: inherit;
  text-decoration: none;
}

.server-community-website-link {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.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-denied {
  border-color: #7f1d1d;
  color: #fca5a5;
  background: #3f1010;
}

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

.map-server-chip--wl-unknown {
  border-color: #a16207;
  color: #fde68a;
  background: #422006;
}

.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-chip--outdated {
  border-color: #BF4040;
  color: #fecaca;
  background: rgba(191, 64, 64, 0.24);
}

.map-server-chip--no-connection {
  border-color: #7f1d1d;
  color: #fecaca;
  background: #3f1010;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.server-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.server-detail-panel {
  min-width: 0;
}

.server-detail-panel--outdated {
  border-color: #BF4040;
  box-shadow: 0 0 0 1px rgba(191, 64, 64, 0.42);
}

.server-detail-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.9rem;
  align-items: stretch;
}

.server-current-players-panel,
.server-player-graph-panel {
  min-width: 0;
}

.server-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.server-chart-wrap {
  position: relative;
  width: 100%;
  height: 360px;
  margin-top: 0.75rem;
  border: 1px solid #1f2937;
  background: #08111f;
  padding: 0.75rem;
}

.server-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.server-chart-map-popover {
  position: fixed;
  z-index: 80;
  width: min(340px, calc(100vw - 24px));
  max-height: min(430px, calc(100vh - 24px));
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.45));
}

.server-chart-map-popover .card {
  margin: 0;
  width: 100%;
}

.server-chart-hover-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #1f2937;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #08111f;
  color: #94a3b8;
  font-size: 0.82rem;
}

.server-chart-hover-summary strong {
  color: #e5e7eb;
  font-size: 0.9rem;
  font-weight: 750;
  white-space: nowrap;
}

.server-chart-hover-summary + .card {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.server-chart-map-popover .card-shot-nav,
.server-chart-map-popover .card-shot-zoom {
  display: none;
}

.server-chart-top-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.server-range-tabs {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.server-range-tabs button {
  min-width: 3.2rem;
}

.server-chart-zoom-controls {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.server-chart-zoom-controls button {
  min-width: 2.8rem;
}

.server-chart-scroll-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.55rem;
}

.server-chart-scroll-controls input[type="range"] {
  width: 100%;
  min-width: 0;
}

.servers-aggregate-chart-panel {
  width: 100%;
}

.servers-aggregate-chart-wrap {
  height: min(52vh, 520px);
  min-height: 340px;
}

.servers-aggregate-chart-hover-summary {
  border-bottom: 1px solid #1f2937;
  border-radius: 8px;
}

.servers-aggregate-filter-slot {
  margin-top: 0.85rem;
}

.servers-graph-filter-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(8, 17, 31, 0.96), rgba(15, 23, 42, 0.86));
}

.servers-graph-filter-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.servers-graph-filter-heading h4 {
  color: #e5e7eb;
  font-size: 0.95rem;
}

.servers-graph-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.75rem;
}

.servers-graph-filter-group {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.servers-graph-filter-group > strong {
  color: #94a3b8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.servers-graph-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 170px;
  overflow: auto;
  padding: 0.05rem 0.1rem 0.1rem 0;
}

.servers-graph-filter-chip {
  display: block;
  max-width: min(100%, 210px);
  min-height: 2rem;
  border: 1px solid color-mix(in srgb, var(--community-accent, #355173) 58%, #1f2937);
  border-left: 4px solid var(--community-accent, #355173);
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.94);
  color: #dbeafe;
  padding: 0.34rem 0.7rem 0.34rem 0.62rem;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9) inset;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.servers-graph-filter-chip:hover,
.servers-graph-filter-chip:focus-visible {
  transform: translateY(-1px);
  border-color: var(--community-accent, #355173);
  border-left-color: var(--community-accent, #355173);
  background: #0f172a;
}

.servers-graph-filter-chip.is-active {
  border-color: var(--community-accent, #355173);
  background: linear-gradient(135deg, color-mix(in srgb, var(--community-accent, #355173) 34%, #0f172a), #082f49);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--community-accent, #355173) 45%, transparent);
  color: #f8fafc;
}

.servers-graph-filter-chip span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-range-tab-active {
  border-color: #22d3ee !important;
  color: #cffafe !important;
  background: #083344 !important;
}

.server-current-players {
  margin-top: 0.75rem;
}

.server-current-player-list {
  display: grid;
  gap: 0.22rem;
}

.server-map-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 360px);
  gap: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem 0 0.2rem;
}

.server-map-card-current {
  border-color: rgba(34, 211, 238, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.38), 0 12px 30px rgba(8, 145, 178, 0.18);
}

.server-map-session-time {
  border-top: 1px solid #1f2937;
  padding-top: 0.55rem;
}

@media (max-width: 860px) {
  .server-detail-live-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.map-server-players {
  margin-top: 0.35rem;
  border-top: 1px dashed #334155;
  padding-top: 0.3rem;
  max-height: 12.8rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.map-server-player-count {
  font-weight: 800;
}

.map-server-empty-players {
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
  color: #cbd5e1;
}

.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;
  }

  .servers-graph-filter-heading,
  .servers-graph-filter-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .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-shell,
  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .card-author-row .meta {
    flex-basis: 100%;
  }

  .card-author-row {
    flex-wrap: wrap;
  }

  .card-metrics-inline {
    margin-left: auto;
  }

  .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-row-contribution {
  grid-template-columns: 4rem minmax(0, 1fr) 12rem;
}

.leaderboard-row-contribution .leaderboard-points {
  white-space: nowrap;
}

.leaderboard-row-season03 {
  grid-template-columns: 4rem minmax(0, 1fr) 7rem 6rem 6rem 8rem minmax(0, 1fr);
}

.leaderboard-row-global {
  grid-template-columns: 4rem minmax(10rem, 1fr) 8rem 6rem 5.5rem 5.5rem 6rem minmax(14rem, 1.2fr);
}

.leaderboard-header-row {
  font-size: 0.9rem;
  font-weight: 700;
  color: #bfdbfe;
  background: rgba(20, 31, 49, 0.92);
}

.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-season03-raw,
.leaderboard-season03-payout,
.leaderboard-season03-threshold {
  text-align: right;
  font-weight: 700;
  color: #dbeafe;
}

.leaderboard-permanent-maps,
.leaderboard-permanent-money {
  text-align: right;
  font-weight: 700;
  color: #dbeafe;
}

.leaderboard-debug-pre {
  white-space: pre-wrap;
  margin-top: 0.6rem;
}

.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,
  .leaderboard-row-season03,
  .leaderboard-row-global {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .leaderboard-points,
  .leaderboard-season03-raw,
  .leaderboard-season03-payout,
  .leaderboard-season03-threshold,
  .leaderboard-permanent-maps,
  .leaderboard-permanent-money,
  .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-mb-0 { margin-bottom: 0; }
.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; }

.traffic-dashboard { min-width: 0; }
.traffic-toolbar { gap: 0.7rem; }
.traffic-slice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.9rem 0;
}
.traffic-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.traffic-filter-chip {
  max-width: min(100%, 32rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.3rem 0.55rem;
  border: 1px solid #475569;
  border-radius: 999px;
  background: #17283c;
  color: var(--text);
  cursor: pointer;
}
.traffic-filter-chip:hover, .traffic-filter-chip:focus-visible { border-color: #38bdf8; }
.traffic-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.6rem;
}
.traffic-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0b1220;
}
.traffic-metric strong { color: #7dd3fc; font-size: clamp(1.25rem, 2vw, 1.8rem); }
.traffic-metric span { color: var(--muted); font-size: 0.82rem; }
.traffic-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 1.4rem;
}
.traffic-visual {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0b1220;
}
.traffic-visual h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.traffic-visual > .meta { margin: 0 0 0.65rem; }
.traffic-timeline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12rem;
  max-width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid #475569;
}
.traffic-trend-column {
  position: relative;
  display: flex;
  flex: 1 0 19px;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 0 1px 1.3rem;
}
.traffic-trend-column.is-unobserved {
  background: repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.13) 0 3px, transparent 3px 7px);
}
.traffic-trend-value {
  display: block;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: #38bdf8;
}
.traffic-timeline[data-metric="browser_requests"] .traffic-trend-value,
.traffic-bars[data-metric="browser_requests"] .traffic-bar-fill { background: #a78bfa; }
.traffic-timeline[data-metric="nonbrowser_requests"] .traffic-trend-value,
.traffic-bars[data-metric="nonbrowser_requests"] .traffic-bar-fill { background: #fb923c; }
.traffic-timeline[data-metric="requests"] .traffic-trend-value,
.traffic-bars[data-metric="requests"] .traffic-bar-fill { background: #4ade80; }
.traffic-trend-date {
  position: absolute;
  left: 1px;
  bottom: 0;
  color: var(--muted);
  font-size: 0.56rem;
  white-space: nowrap;
}
.traffic-legend { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.78rem; }
.traffic-legend span { display: inline-block; width: 0.85rem; height: 0.6rem; margin-left: 0.45rem; }
.traffic-legend-unobserved {
  background: repeating-linear-gradient(135deg, #64748b 0 2px, transparent 2px 4px);
}
.traffic-bars { display: grid; gap: 0.25rem; }
.traffic-bar-button {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(4rem, 2fr) auto;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.3rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.traffic-bar-button:hover, .traffic-bar-button:focus-visible {
  border-color: #38bdf8;
  background: #17283c;
}
.traffic-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.traffic-bar-track { height: 0.7rem; border-radius: 4px; background: #1e293b; overflow: hidden; }
.traffic-bar-fill { display: block; height: 100%; background: #38bdf8; }
.traffic-bar-count { font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.traffic-group-link {
  max-width: min(38rem, 55vw);
  padding: 0;
  border: 0;
  background: transparent;
  color: #7dd3fc;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.traffic-group-link:hover { text-decoration: underline; }
.traffic-pivot { min-width: max-content; }
.traffic-pivot th, .traffic-pivot td { font-variant-numeric: tabular-nums; }
.traffic-pivot td:not(:first-child) { text-align: right; }
.traffic-pivot .traffic-group-link { max-width: min(28rem, 45vw); }
.traffic-cell-link {
  padding: 0.15rem 0.25rem;
  border: 0;
  background: transparent;
  color: #7dd3fc;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.traffic-cell-link:hover, .traffic-cell-link:focus-visible { text-decoration: underline; }
.traffic-period-details { margin-top: 1.3rem; }
.traffic-period-details summary { cursor: pointer; font-weight: 700; }
@media (max-width: 900px) {
  .traffic-visual-grid { grid-template-columns: minmax(0, 1fr); }
  .traffic-bar-button { grid-template-columns: minmax(0, 1fr) minmax(4rem, 1fr) auto; }
}

.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; }

.storage-overview { min-width: 0; }
.storage-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.storage-section-heading > div { min-width: 0; }
.storage-section-heading h2, .storage-section-heading h3 { margin: 0 0 .5rem; }
.storage-section-heading p { margin: 0; }
.storage-section-heading > button { flex: 0 0 auto; }
.storage-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.storage-summary-card { display: flex; flex-direction: column; gap: .45rem; padding: 1rem; border: 1px solid #334155; border-radius: .75rem; background: #0f172a; overflow-wrap: anywhere; }
.storage-summary-card > span { color: #cbd5e1; font-size: .85rem; }
.storage-summary-card > strong { color: #f8fafc; font-size: clamp(1.15rem, 2.2vw, 1.65rem); font-variant-numeric: tabular-nums; }
.storage-summary-card > small { color: #94a3b8; line-height: 1.45; }
.storage-block { margin-top: 1.65rem; padding-top: 1.2rem; border-top: 1px solid #334155; }
.storage-block > h3 { margin: 0 0 .5rem; }
.storage-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.storage-detail-grid dt { color: #94a3b8; font-size: .82rem; }
.storage-detail-grid dd { margin: .4rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.storage-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #334155; border-radius: .6rem; }
.storage-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.storage-table th, .storage-table td { padding: .7rem .8rem; border-bottom: 1px solid #263449; text-align: right; white-space: nowrap; }
.storage-table th:first-child { text-align: left; min-width: 11rem; white-space: normal; overflow-wrap: anywhere; }
.storage-table thead { color: #cbd5e1; background: #0f172a; }
.storage-table tbody th { font-weight: 500; }
.storage-table tbody tr:last-child > * { border-bottom: 0; }
#storage-overview-status, #storage-scan-status, #storage-overview-notes { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .storage-summary-grid, .storage-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .storage-section-heading { flex-direction: column; gap: .7rem; }
  .storage-summary-card { padding: .75rem; }
  .storage-table th, .storage-table td { padding: .65rem; }
}

.texture-choice[data-preview-pending="true"] .texture-choice__visual::after {
  content: 'Preview unavailable';
  padding: .2rem;
  color: #9ca3af;
  font-size: .6rem;
  line-height: 1.1;
  text-align: center;
}
.texture-choice__image[hidden] { display: none; }
.texture-map-card__texture img[hidden] { display: none; }
.texture-map-card__preview-status { padding: .2rem; color: #9ca3af; font-size: .65rem; }
