body.spriteshub-archive-page {
  margin: 0 !important;
  background: #0d1114 !important;
}

body.spriteshub-archive-page .site-header,
body.spriteshub-archive-page .site-footer,
body.spriteshub-archive-page .entry-header,
body.spriteshub-archive-page .wp-dark-mode-switcher,
body.spriteshub-archive-page .wp-dark-mode-floating-switch,
body.spriteshub-archive-page .wp-dark-mode-side-toggle-wrap,
body.spriteshub-archive-page .wp-dark-mode-toggle {
  display: none !important;
}

body.spriteshub-archive-page #content,
body.spriteshub-archive-page .site-content,
body.spriteshub-archive-page .ast-container,
body.spriteshub-archive-page .ast-separate-container .ast-article-single,
body.spriteshub-archive-page .ast-page-builder-template .site-content > .ast-container,
body.spriteshub-archive-page #primary,
body.spriteshub-archive-page .site-main,
body.spriteshub-archive-page .entry-content,
body.spriteshub-archive-page .entry-content[data-ast-blocks-layout] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.spriteshub-archive-page .entry-content p {
  margin: 0;
}

.sh-archive,
.sh-archive * {
  box-sizing: border-box;
}

.sh-archive {
  --sh-bg: #eef3f6;
  --sh-shell: #f7fafb;
  --sh-panel: #ffffff;
  --sh-panel-2: #eef4f6;
  --sh-elevated: #ffffff;
  --sh-text: #111820;
  --sh-heading: #071016;
  --sh-muted: #66747e;
  --sh-soft: #8b9aa4;
  --sh-line: #d6e1e7;
  --sh-line-strong: #b8c8d1;
  --sh-accent: #20806c;
  --sh-accent-2: #54bfa5;
  --sh-accent-text: #ffffff;
  --sh-glow: rgba(32, 128, 108, 0.18);
  --sh-shadow: 0 22px 70px rgba(17, 24, 32, 0.12);
  --sh-card-shadow: 0 1px 0 rgba(17, 24, 32, 0.05), 0 18px 46px rgba(17, 24, 32, 0.09);

  min-height: 100vh;
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  overflow-x: clip;
  background:
    radial-gradient(circle at 20% -10%, rgba(32, 128, 108, 0.18), transparent 34rem),
    linear-gradient(180deg, var(--sh-shell), var(--sh-bg) 34rem),
    var(--sh-bg);
  color: var(--sh-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sh-archive[data-theme="dark"] {
  --sh-bg: #0d1114;
  --sh-shell: #10161a;
  --sh-panel: #151c21;
  --sh-panel-2: #11171b;
  --sh-elevated: #1a2329;
  --sh-text: #edf4f6;
  --sh-heading: #ffffff;
  --sh-muted: #9facb5;
  --sh-soft: #73838d;
  --sh-line: #27343c;
  --sh-line-strong: #40515b;
  --sh-accent: #56c3a8;
  --sh-accent-2: #2f8f7c;
  --sh-accent-text: #06211b;
  --sh-glow: rgba(86, 195, 168, 0.18);
  --sh-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --sh-card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 22px 56px rgba(0, 0, 0, 0.34);
}

.sh-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--sh-line);
  background: color-mix(in srgb, var(--sh-shell) 94%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 16px 48px rgba(0, 0, 0, 0.16);
}

.admin-bar .sh-topbar {
  top: 32px;
}

.sh-topbar-inner {
  display: grid;
  grid-template-columns: 220px minmax(300px, 560px) minmax(160px, 1fr);
  align-items: center;
  gap: 22px;
  width: min(1280px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
}

.sh-brand,
.sh-brand:visited,
.sh-brand:hover,
.sh-brand:focus {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--sh-heading) !important;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
}

.sh-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--sh-line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sh-accent) 23%, var(--sh-panel)), var(--sh-panel));
  color: var(--sh-accent);
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 22px var(--sh-glow);
}

.sh-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.sh-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--sh-line-strong) !important;
  border-radius: 8px !important;
  background: var(--sh-panel-2) !important;
  color: var(--sh-heading) !important;
  padding: 0 16px !important;
  font: 600 15px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  outline: none;
  box-shadow: none !important;
}

.sh-search input:focus {
  border-color: var(--sh-accent) !important;
  box-shadow: 0 0 0 4px var(--sh-glow) !important;
}

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

.sh-theme-toggle {
  justify-self: end;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background: var(--sh-panel-2);
}

.sh-theme-toggle button {
  min-width: 68px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sh-muted);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.sh-theme-toggle button[aria-pressed="true"] {
  background: var(--sh-elevated);
  color: var(--sh-heading);
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.18);
}

.sh-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 90px;
}

.sh-sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.admin-bar .sh-sidebar {
  top: 142px;
}

.sh-sidebar-card {
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sh-panel) 96%, transparent);
  box-shadow: var(--sh-card-shadow);
  padding: 18px;
}

.sh-current-card h2 {
  margin: 8px 0 6px;
  color: var(--sh-heading);
  font-size: 18px;
  line-height: 1.15;
}

.sh-kicker {
  margin: 0;
  color: var(--sh-accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sh-game-picker {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.sh-game-picker span {
  color: var(--sh-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sh-game-picker select {
  width: 100%;
  min-height: 44px;
  appearance: none;
  border: 1px solid var(--sh-line-strong);
  border-radius: 8px;
  background-color: var(--sh-panel-2);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--sh-muted) 50%),
    linear-gradient(135deg, var(--sh-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--sh-heading);
  padding: 0 38px 0 13px;
  font: 850 14px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
  cursor: pointer;
}

.sh-game-picker select:focus {
  border-color: var(--sh-accent);
  box-shadow: 0 0 0 4px var(--sh-glow);
}

.sh-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.sh-stats span {
  display: grid;
  gap: 2px;
  min-height: 64px;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background: var(--sh-panel-2);
  color: var(--sh-muted);
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
}

.sh-stats strong {
  color: var(--sh-heading);
  font-size: 22px;
  line-height: 1;
}

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

.sh-main-home {
  min-height: 62vh;
}

.sh-empty-home {
  display: grid;
  min-height: 52vh;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--sh-line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--sh-line) 55%, transparent) 1px, transparent 1px),
    var(--sh-panel-2);
  background-size: 28px 28px;
  place-items: center;
}

.sh-empty-home h1 {
  margin: 0;
  color: color-mix(in srgb, var(--sh-muted) 35%, transparent);
  font-size: clamp(46px, 10vw, 120px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
}

.sh-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 22px;
}

.sh-page-head h1 {
  margin: 7px 0 6px;
  color: var(--sh-heading);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.98;
}

.sh-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sh-meta {
  color: var(--sh-muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.sh-button,
.sh-button:visited,
.sh-button:hover,
.sh-button:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--sh-accent);
  border-radius: 8px;
  background: var(--sh-accent);
  color: var(--sh-accent-text) !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
}

.sh-button:hover,
.sh-button:focus {
  background: var(--sh-accent-2);
  border-color: var(--sh-accent-2);
}

.sh-button-secondary,
.sh-button-secondary:visited,
.sh-button-secondary:hover,
.sh-button-secondary:focus {
  border-color: var(--sh-line-strong);
  background: var(--sh-panel);
  color: var(--sh-heading) !important;
}

.sh-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.sh-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.sh-asset-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background: var(--sh-panel);
  box-shadow: var(--sh-card-shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sh-asset-card:hover {
  border-color: var(--sh-line-strong);
  transform: translateY(-2px);
}

.sh-asset-card.is-selected,
.sh-asset-card:has([data-sh-asset-check]:checked) {
  border-color: var(--sh-accent);
  box-shadow: 0 0 0 3px var(--sh-glow), var(--sh-card-shadow);
}

.sh-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 0.82;
  width: 100%;
  border-bottom: 1px solid var(--sh-line);
  background-color: var(--sh-panel-2);
  background-image:
    linear-gradient(45deg, rgba(120, 133, 143, 0.15) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(120, 133, 143, 0.15) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(120, 133, 143, 0.15) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(120, 133, 143, 0.15) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.sh-preview img,
.sh-result-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 28px;
  image-rendering: pixelated;
}

.sh-check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--sh-line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sh-panel) 92%, transparent);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.sh-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--sh-accent);
}

.sh-asset-body {
  display: grid;
  gap: 10px;
  padding: 17px;
}

.sh-asset-title {
  margin: 0;
  color: var(--sh-heading);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.18;
}

.sh-asset-body .sh-meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid var(--sh-line);
  border-radius: 999px;
  background: var(--sh-panel-2);
}

.sh-asset-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.sh-asset-actions .sh-button {
  width: 100%;
}

.sh-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1002;
  width: min(720px, calc(100vw - 48px));
  max-height: min(620px, 70vh);
  overflow: auto;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background: var(--sh-elevated);
  box-shadow: var(--sh-shadow);
  padding: 10px;
  pointer-events: none;
}

.sh-results[hidden] {
  display: none !important;
}

.sh-result-group + .sh-result-group {
  margin-top: 12px;
}

.sh-results h2 {
  margin: 0 0 8px;
  color: var(--sh-heading);
  font-size: 13px;
  font-weight: 950;
}

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

.sh-result-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  background: var(--sh-panel-2);
  padding: 8px;
  pointer-events: none;
}

.sh-result-item .sh-button {
  pointer-events: auto;
}

.sh-result-thumb {
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--sh-line);
  border-radius: 6px;
  background: var(--sh-panel);
}

.sh-result-thumb img {
  padding: 5px;
}

.sh-result-title {
  display: block;
  overflow: hidden;
  color: var(--sh-heading);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-empty {
  margin: 0;
  color: var(--sh-muted);
  font-size: 14px;
  font-weight: 800;
}

.sh-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 1040px) {
  .sh-topbar-inner {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }

  .sh-search {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-bottom: 12px;
  }

  .sh-layout {
    grid-template-columns: 1fr;
  }

  .sh-sidebar {
    position: static;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-bar .sh-topbar {
    top: 46px;
  }

  .sh-topbar-inner,
  .sh-layout {
    width: calc(100% - 24px);
  }

  .sh-topbar-inner {
    grid-template-columns: 1fr auto;
    min-height: 0;
    padding: 10px 0 0;
  }

  .sh-brand {
    font-size: 17px;
  }

  .sh-brand-mark {
    width: 32px;
    height: 32px;
  }

  .sh-search {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .sh-search input {
    min-height: 42px;
  }

  .sh-search .sh-button {
    min-width: 72px;
    padding: 0 10px;
  }

  .sh-theme-toggle button {
    min-width: 48px;
  }

  .sh-layout {
    gap: 18px;
    padding-top: 18px;
  }

  .sh-page-head {
    grid-template-columns: 1fr;
  }

  .sh-page-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .sh-page-actions .sh-button {
    flex: 1 1 145px;
  }

  .sh-asset-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sh-results {
    width: 100%;
  }

  .sh-result-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .sh-result-item .sh-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
