/* Page-specific styles for this page. */

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid {
  display: grid;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section {
  border: 1px solid var(--table-border, rgb(var(--aoy-palette-border-rgb, 45, 55, 72)));
  border-radius: 8px;
  background: var(--table-surface, rgba(var(--aoy-palette-panel-rgb, 16, 20, 28), 0.55));
  padding: 1rem;
  max-width: 100%;
  overflow: hidden;
}

html[data-aoy-color-scheme="light"] .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(var(--aoy-palette-border-rgb, 148, 163, 184), 0.38);
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-title {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-title__icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 24px;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-title > span {
  display: inline;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-table-with-previews {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-table-main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-table-main .table-universal {
  display: table !important;
  width: 100% !important;
  min-width: 100%;
  margin: 0;
  overflow-x: visible;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-table-side {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile {
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  justify-content: center;
  padding: 0.7rem;
  border-radius: 8px;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__wrapper {
  width: 100%;
  max-width: 220px;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  overflow: visible;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__wrapper::before {
  display: none;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  filter: none !important;
  margin: 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__name {
  font-size: 0.84rem;
  line-height: 1.25;
  text-align: center;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-table-with-previews {
  gap: 1rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-table-side {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-preview-tile {
  padding: 0.8rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-preview-tile__wrapper--wide {
  width: 100%;
  max-width: 100%;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-preview-tile__image--wide {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: 8px;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-table-side .palette-preview-tile:only-child .palette-preview-tile__image--wide {
  max-height: 640px;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-table-side {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-preview-tile {
  padding: 0.6rem 0.5rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-preview-tile__wrapper {
  max-width: 200px;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-preview-tile__image {
  max-height: 132px;
}

/* Desktop fit rules for dense clothing palette compare tables */
@media (min-width: 641px) {
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table {
    table-layout: fixed;
    font-size: 0.86rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table th,
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table td {
    padding: 7px 8px;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table th {
    white-space: normal;
    line-height: 1.15;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table td:nth-child(1),
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table td:nth-child(4),
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table th:nth-child(1),
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-compare-table th:nth-child(4) {
    white-space: normal;
    min-width: 0;
    word-break: break-word;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-link-out {
    padding: 0.12rem 0.34rem;
    font-size: 0.78rem;
  }
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table th,
.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table th {
  white-space: nowrap;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table td,
.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table td {
  vertical-align: middle;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-branch-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-branch-head__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-link-out {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--table-border, rgb(var(--aoy-palette-border-rgb, 45, 55, 72)));
  background: rgba(0, 0, 0, 0.18);
  text-decoration: none;
  font-weight: 700;
  color: var(--announcement-title, rgb(var(--aoy-palette-accent-rgb, 78, 163, 255)));
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-link-out:hover {
  text-decoration: underline;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-link-out__icon {
  font-size: 0.85em;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-link-missing {
  opacity: 0.6;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table th:nth-child(1),
.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table th:nth-child(2),
.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table th:nth-child(3),
.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table td:nth-child(2),
.spawn-npc-wiki-document.aoy-character-stylist .palette-single-table td:nth-child(3) {
  text-align: center;
}

.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table th:nth-child(2),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table th:nth-child(3),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table th:nth-child(5),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table th:nth-child(6),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table td:nth-child(2),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table td:nth-child(3),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table td:nth-child(5),
.spawn-npc-wiki-document.aoy-character-stylist .palette-compare-table td:nth-child(6) {
  text-align: center;
}

@media (max-width: 1200px) {
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section .table-container {
    overflow-x: auto;
  }
}

@media (max-width: 860px) {
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section {
    padding: 0.85rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-table-side,
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-table-side {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 0.6rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile {
    padding: 0.55rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__wrapper {
    max-width: 180px;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__image {
    max-height: 130px;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-table-side {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-preview-tile__image--wide {
    max-height: 460px;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-link-out {
    padding: 0.16rem 0.34rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 640px) {
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section {
    padding: 0.75rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-table-with-previews {
    gap: 0.6rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-table-main {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-table-side,
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-grid--cloth .palette-table-side {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 0.5rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-table-side {
    grid-template-columns: 1fr;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile {
    padding: 0.45rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__wrapper {
    max-width: 160px;
    margin-bottom: 0.35rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__image {
    max-height: 120px;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-preview-tile__wrapper--wide {
    max-width: 100%;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-preview-tile__image--wide,
  .spawn-npc-wiki-document.aoy-character-stylist .palette-reference-section--feature .palette-table-side .palette-preview-tile:only-child .palette-preview-tile__image--wide {
    max-height: 70vh;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .palette-preview-tile__name {
    font-size: 0.76rem;
  }
}

/* Numbered previews rendered from the current client palettes. */
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery {
  --stylist-control-bg: #fff;
  --stylist-control-border: rgb(var(--aoy-palette-border-rgb, 179, 192, 204));
  --stylist-accent: rgb(var(--aoy-palette-accent-rgb, 18, 111, 159));
  margin: 1.25rem 0 2rem;
  padding: clamp(0.85rem, 2vw, 1.4rem);
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--aoy-palette-border-rgb, 148, 163, 184), 0.38);
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
}

html:not([data-aoy-color-scheme="light"]) .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery {
  --stylist-control-bg: rgb(var(--aoy-palette-panel-rgb, 24, 32, 43));
  --stylist-control-border: rgb(var(--aoy-palette-border-rgb, 82, 97, 115));
  --stylist-accent: rgb(var(--aoy-palette-accent-rgb, 123, 200, 251));
  background: rgba(var(--aoy-palette-panel-rgb, 16, 20, 28), 0.55);
  border-color: rgb(var(--aoy-palette-border-rgb, 53, 65, 84));
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__heading h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__heading p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(165px, 1fr) minmax(125px, 0.8fr);
  gap: 0.85rem;
  align-items: end;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__controls--single-model {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__field,
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__field > label,
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex > legend {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__field :is(select, input) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0.45rem 0.55rem;
  color: var(--text-color);
  background-color: var(--stylist-control-bg);
  border: 1px solid var(--stylist-control-border);
  border-radius: 7px;
  font: inherit;
  font-size: 0.875rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__field :is(select, input):focus-visible, .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex input:focus-visible + span, .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery :is(a, summary, button):focus-visible {
  outline: 2px solid var(--stylist-accent);
  outline-offset: 3px;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__field :disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select {
  position: relative;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0.45rem 0.55rem;
  color: var(--text-color);
  background: var(--stylist-control-bg);
  border: 1px solid var(--stylist-control-border);
  border-radius: 7px;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__icon {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  object-fit: contain;
  image-rendering: pixelated;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__chevron {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--stylist-accent);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__options {
  box-sizing: border-box;
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  width: max(100%, 18rem);
  max-width: calc(100vw - 3rem);
  max-height: min(22rem, 60vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 0.25rem;
  color: var(--text-color);
  background: var(--stylist-control-bg);
  border: 1px solid var(--stylist-control-border);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: left;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__options:focus-visible {
  outline: 2px solid var(--stylist-accent);
  outline-offset: 2px;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__group + .stylist-class-select__group {
  margin-top: 0.25rem;
  border-top: 1px solid var(--stylist-control-border);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__group-label {
  padding: 0.65rem 0.5rem 0.3rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__option {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 1.2rem;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.45rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__option--active {
  color: var(--stylist-accent);
  border-color: var(--stylist-accent);
  box-shadow: inset 0 0 0 1px var(--stylist-accent);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__option--selected {
  font-weight: 700;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__check {
  color: var(--stylist-accent);
  text-align: center;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex > div {
  display: flex;
  gap: 0.4rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex label {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex span {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  width: 100%;
  padding: 0.4rem 0.3rem;
  color: var(--text-color);
  background: var(--stylist-control-bg);
  border: 1px solid var(--stylist-control-border);
  border-radius: 7px;
  font-size: 0.82rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex input:checked + span {
  color: var(--stylist-accent);
  border-color: var(--stylist-accent);
  box-shadow: inset 0 0 0 1px var(--stylist-accent);
  font-weight: 700;
}
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex input:disabled + span { opacity: 0.45; cursor: not-allowed; }

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__control-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__range { position: relative; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__range > .stylist-palette-gallery__control-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stylist-accent);
  pointer-events: none;
}
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__range select { padding-left: 2.1rem; }

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__hint {
  margin: 0.65rem 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__hint--error {
  color: #b12630;
}

html:not([data-aoy-color-scheme="light"]) .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__hint--error {
  color: #ff9da5;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__result {
  margin-top: 1.1rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__preview-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  justify-items: center;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__frame {
  box-sizing: border-box;
  width: 220px;
  max-width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--stylist-control-border);
  border-radius: 10px;
  background: var(--stylist-control-bg);
  overflow: hidden;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__cell {
  flex: none;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--stylist-control-bg);
  font-size: 0.85rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__preview-copy {
  width: 100%;
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__eyebrow {
  color: var(--stylist-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.35rem 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__number {
  min-width: 0;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__number-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__number input {
  box-sizing: content-box;
  width: 3ch;
  min-width: 0;
  height: 42px;
  padding: 0 0.2rem;
  border: 1px solid var(--stylist-control-border);
  border-radius: 7px;
  color: inherit;
  background: var(--stylist-control-bg);
  font: inherit;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__number input::-webkit-inner-spin-button,
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__number input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__number input:focus-visible {
  outline: 2px solid var(--stylist-accent);
  outline-offset: 2px;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__default {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__stepper button {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--stylist-accent);
  background: var(--stylist-control-bg);
  border: 1px solid var(--stylist-control-border);
  border-radius: 7px;
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__stepper button:hover {
  border-color: var(--stylist-accent);
  box-shadow: inset 0 0 0 1px var(--stylist-accent);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__preview-copy p {
  margin: 0.5rem 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery .palette-link-out {
  margin-top: 0.5rem;
  padding: 0.5rem 0.7rem;
  color: var(--stylist-accent);
  background: var(--stylist-control-bg);
  border-color: var(--stylist-control-border);
  white-space: normal;
  font-size: 0.85rem;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__unavailable {
  padding: 1rem;
  color: var(--text-secondary);
  border: 1px dashed var(--stylist-control-border);
  border-radius: 8px;
  line-height: 1.6;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sheet { margin-top: 1.25rem; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sheet-range { white-space: nowrap; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sheet summary { cursor: pointer; font-weight: 600; color: var(--stylist-accent); }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sheet img { display: block; width: 100%; height: auto; margin-top: 1rem; image-rendering: pixelated; border-radius: 8px; }

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__appearance {
  grid-template-columns: minmax(0, 1fr) minmax(165px, 0.75fr);
}
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__layout { margin-top: 1.5rem; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__character { min-width: 0; width: 100%; text-align: center; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__frame { margin: 0 auto; min-height: 300px; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__sprite { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__name { margin: 0.65rem 0 0; font-size: 0.85rem; font-weight: 600; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__numbers { display: grid; gap: 1.15rem; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__number-control .stylist-palette-gallery__hint { margin: 0.25rem 0 0; font-size: 0.75rem; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__selection { margin: 1.25rem 0 0; text-align: center; color: var(--text-secondary); font-size: 0.8rem; line-height: 1.6; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__sheets { padding-top: 1rem; border-top: 1px solid var(--stylist-control-border); }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__sheet-content { margin-top: 1rem; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__sheet-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(125px, 0.7fr); gap: 0.85rem; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__error { font-size: 0.85rem; line-height: 1.6; }
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__error button,
.spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__sheet-content [role="status"] button {
  margin-top: 0.5rem; padding: 0.45rem 0.7rem; border: 1px solid var(--stylist-control-border);
  border-radius: 7px; color: var(--stylist-accent); background: var(--stylist-control-bg); cursor: pointer;
}

@media (max-width: 560px) {
  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__field--class {
    grid-column: 1 / -1;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex {
    grid-column: 1 / -1;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__preview-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__frame {
    justify-self: center;
    max-width: 100%;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__preview-copy {
    text-align: center;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__stepper {
    justify-content: center;
  }

  .spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__frame { min-height: 260px; }
  .spawn-npc-wiki-document.aoy-character-stylist .stylist-customizer__sheet-controls { grid-template-columns: minmax(0, 1fr); }
}

/* Match the website's NPC guide surfaces while preserving the wiki controls. */
.aoy-character-stylist {
  --text-color: rgb(var(--aoy-palette-text-rgb, 220, 232, 244));
  --text-secondary: rgb(var(--aoy-palette-muted-rgb, 178, 199, 220));
  color: var(--text-color);
  min-width: 0;
}

html:not([data-aoy-color-scheme="light"]) .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery {
  --stylist-control-bg: rgb(var(--aoy-palette-panel-rgb, 23, 40, 61));
  --stylist-control-border: rgba(var(--aoy-palette-border-rgb, 133, 182, 226), 0.38);
  --stylist-accent: rgb(var(--aoy-palette-accent-rgb, 155, 216, 255));
  background: linear-gradient(145deg, rgba(var(--aoy-palette-panel-rgb, 28, 48, 73), 0.95), rgba(var(--aoy-palette-panel-rgb, 13, 26, 44), 0.97));
  border-color: rgba(var(--aoy-palette-border-rgb, 139, 187, 226), 0.28);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
}

html[data-aoy-color-scheme="light"] .aoy-character-stylist {
  --text-color: var(--aoy-light-text, rgb(var(--aoy-palette-accent-rgb, 39, 71, 96)));
  --text-secondary: var(--aoy-light-muted, rgb(var(--aoy-palette-muted-rgb, 76, 104, 128)));
}

html[data-aoy-color-scheme="light"] .spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery {
  --stylist-control-bg: rgb(var(--aoy-palette-panel-rgb, 248, 252, 255));
  --stylist-control-border: rgba(var(--aoy-palette-border-rgb, 51, 123, 172), 0.3);
  --stylist-accent: rgb(var(--aoy-palette-accent-rgb, 18, 111, 159));
  background: linear-gradient(145deg, rgba(var(--aoy-palette-panel-rgb, 249, 253, 255), 0.97), rgba(var(--aoy-palette-panel-rgb, 225, 240, 249), 0.96));
  border-color: rgba(var(--aoy-palette-border-rgb, 63, 127, 169), 0.25);
  box-shadow: 0 14px 32px rgba(var(--aoy-palette-shadow-rgb, 35, 62, 87), 0.08);
}

.aoy-character-stylist .stylist-palette-gallery__field :is(select, input),
.aoy-character-stylist .stylist-palette-gallery button {
  font-family: inherit;
}

.aoy-character-stylist .stylist-palette-gallery__field :is(select, input) {
  color: var(--text-color);
}

.aoy-character-stylist > .default-background {
  min-width: 0;
}

/* A paragraph's only link can still have surrounding text nodes. */
.spawn-npc-wiki-document.aoy-character-stylist p > a:only-child:not(.spawn-npc-guide-reference) {
  display: inline;
  text-align: inherit;
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sex legend {
  color: var(--text-color);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__sheet {
  border-color: var(--stylist-control-border);
  background: var(--stylist-control-bg);
}

.spawn-npc-wiki-document.aoy-character-stylist .stylist-palette-gallery__stepper button:is(:hover, :focus-visible) {
  background: var(--stylist-control-bg);
  border-color: var(--stylist-accent);
  color: var(--stylist-accent);
  box-shadow: inset 0 0 0 1px var(--stylist-accent);
}

/* The global website form rules use important surface colors. */
#character-stylist-customizer .stylist-palette-gallery__number input {
  box-sizing: content-box;
  background: var(--stylist-control-bg) !important;
  color: var(--text-color) !important;
  border-color: var(--stylist-control-border) !important;
  caret-color: var(--text-color);
  margin: 0;
  min-height: 0;
  box-shadow: none;
}
#character-stylist-customizer .stylist-palette-gallery__number input:focus-visible {
  outline: 2px solid var(--stylist-accent) !important;
  outline-offset: 2px;
}
.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__icon {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.spawn-npc-wiki-document.aoy-character-stylist .stylist-class-select__button {
  font-family: inherit;
  text-transform: none;
  box-shadow: none;
}
