.skinmaker-main {
  padding: 2rem 1rem 4rem;
}

.skinmaker-page-header {
  margin-bottom: 1.5rem;
}

.skinmaker-page-header .page-header__copy {
  max-width: 860px;
}

.skinmaker-intro {
  color: var(--text-muted, rgba(255,255,255,0.78));
  margin: 0.9rem 0 0;
  line-height: 1.7;
}

.skinmaker-layout {
  display: grid;
  grid-template-columns: minmax(320px, 470px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.skinmaker-panel,
.skinmaker-preview-panel {
  background: rgba(9, 9, 15, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.skinmaker-panel {
  padding: 1.3rem;
  display: grid;
  gap: 1rem;
}

.skinmaker-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.skinmaker-card h2 {
  margin: 0;
  font-size: 1rem;
}

.skinmaker-card p,
.skinmaker-card small,
.skinmaker-hint,
.skinmaker-note,
.skinmaker-status {
  color: rgba(255, 255, 255, 0.72);
}

.skinmaker-grid {
  display: grid;
  gap: 0.85rem;
}

.skinmaker-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skinmaker-field {
  display: grid;
  gap: 0.38rem;
}

.skinmaker-field span,
.skinmaker-toggle__text strong {
  font-weight: 700;
  font-size: 0.92rem;
}

.skinmaker-field input[type="text"],
.skinmaker-field select,
.skinmaker-field input[type="file"] {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.skinmaker-field input[type="file"] {
  padding: 0.65rem 0.8rem;
}

.skinmaker-field select:disabled,
.skinmaker-field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.skinmaker-inline-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.skinmaker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.skinmaker-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #f13d64;
}

.skinmaker-toggle__text {
  display: grid;
  gap: 0.12rem;
}

.skinmaker-hint {
  font-size: 0.85rem;
  line-height: 1.5;
}

.skinmaker-status {
  min-height: 1.3rem;
  font-size: 0.9rem;
}

.skinmaker-status.is-error {
  color: #ff8e9b;
}

.skinmaker-status.is-success {
  color: #8dffbd;
}

.skinmaker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skinmaker-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.skinmaker-btn:hover {
  transform: translateY(-1px);
}

.skinmaker-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.skinmaker-btn--primary {
  background: linear-gradient(135deg, #f13d64, #ffbf5f);
  color: #fff;
}

.skinmaker-btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skinmaker-preview-panel {
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.skinmaker-preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.skinmaker-preview-header h2,
.skinmaker-preview-header p {
  margin: 0;
}

.skinmaker-preview-stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 620px;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.05) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.05) 75%),
    rgba(0, 0, 0, 0.22);
  background-size: 34px 34px;
  background-position: 0 0, 17px 17px;
}

.skinmaker-preview-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
}

.skinmaker-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.74);
}

.skinmaker-preview-meta strong {
  color: #fff;
}

.skinmaker-renderer-parking {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.skinmaker-renderer-parking .skin-render-stage {
  width: 1024px;
  height: 1024px;
}

.skins-tool-callout {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
}

.skins-tool-callout__copy {
  display: grid;
  gap: 0.2rem;
}

.skins-tool-callout__copy strong {
  font-size: 0.98rem;
}

.skins-tool-callout__copy span {
  color: rgba(255,255,255,0.72);
}

.skins-tool-callout__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(241,61,100,0.95), rgba(255,191,95,0.95));
}

@media (max-width: 1120px) {
  .skinmaker-layout {
    grid-template-columns: 1fr;
  }

  .skinmaker-preview-stage {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .skinmaker-main {
    padding-inline: 0.75rem;
  }

  .skinmaker-panel,
  .skinmaker-preview-panel {
    border-radius: 20px;
  }

  .skinmaker-grid--two {
    grid-template-columns: 1fr;
  }

  .skinmaker-preview-panel,
  .skinmaker-panel {
    padding: 1rem;
  }

  .skinmaker-preview-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


.skinmaker-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.skinmaker-arrange-tools {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.skinmaker-arrange-targets,
.skinmaker-arrange-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skinmaker-arrange-target {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.skinmaker-arrange-target.is-active {
  background: linear-gradient(135deg, rgba(241,61,100,0.95), rgba(255,191,95,0.95));
  border-color: transparent;
}

.skinmaker-arrange-target:disabled,
.skinmaker-btn--ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.skinmaker-arrange-grid {
  display: grid;
  gap: 0.85rem;
}

.skinmaker-arrange-field {
  display: grid;
  gap: 0.35rem;
}

.skinmaker-arrange-field span {
  font-weight: 700;
  font-size: 0.92rem;
}

.skinmaker-arrange-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}

.skinmaker-arrange-input input[type="range"] {
  width: 100%;
}

.skinmaker-arrange-input strong {
  min-width: 3.6rem;
  text-align: right;
  color: #fff;
}

.skinmaker-preview-canvas {
  cursor: grab;
  touch-action: none;
}

.skinmaker-preview-canvas.is-dragging {
  cursor: grabbing;
}

@media (max-width: 720px) {
  .skinmaker-arrange-input {
    grid-template-columns: 1fr;
  }

  .skinmaker-arrange-input strong {
    text-align: left;
  }
}

.skinmaker-preview-canvas.is-orbiting {
  cursor: ew-resize;
}

.skinmaker-arrange-tools--hidden { display: none; }
.skinmaker-preview-interaction-hint { display: none; }
.skinmaker-preview-canvas { cursor: default; }
.skinmaker-preview-canvas.is-dragging { cursor: grabbing; }

.skinmaker-preview-legend { margin: 1rem 0 0; padding: 1rem 1.05rem; border-radius: 18px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.skinmaker-preview-legend h3 { margin: 0 0 0.7rem; font-size: 1rem; color: #fff; }
.skinmaker-preview-legend ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; color: rgba(255,255,255,0.82); line-height: 1.55; font-size: 0.94rem; }
.skinmaker-preview-legend li strong { color: #fff; }


/* Promo compacta na página de skins */
.skins-maker-promo {
  position: relative;
  align-self: stretch;
  min-height: 250px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #09090d;
  box-shadow: none;
  isolation: isolate;
}

.skins-maker-promo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(7,7,11,0.94) 100%);
  z-index: 1;
}

.skins-maker-promo__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.skins-maker-promo__content {
  position: absolute;
  z-index: 2;
  inset: auto 1rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.28rem 0.8rem;
}

.skins-maker-promo__content span {
  grid-column: 1 / -1;
  width: max-content;
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  background: rgba(241,61,100,0.9);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skins-maker-promo__content strong {
  font-size: 1.12rem;
  color: #fff;
}

.skins-maker-promo__content a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  color: #111118;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.82rem;
}

/* Criador mais compacto */
.skinmaker-page-header { margin-bottom: 1rem; }
.skinmaker-intro { margin-top: 0.55rem; line-height: 1.5; }
.skinmaker-panel { gap: 0.75rem; padding: 1rem; }
.skinmaker-card { padding: 0.88rem; gap: 0.68rem; }
.skinmaker-card h2 { font-size: 0.95rem; }
.skinmaker-grid { gap: 0.68rem; }
.skinmaker-field input[type="text"],
.skinmaker-field input[type="search"],
.skinmaker-field select,
.skinmaker-field input[type="file"] { padding: 0.72rem 0.82rem; }
.skinmaker-note, .skinmaker-hint { margin: 0; }
.skinmaker-preview-panel { gap: 0.75rem; padding: 1rem; }
.skinmaker-preview-header p { margin-top: 0.25rem; color: rgba(255,255,255,0.68); }

.skinmaker-pokemon-picker { position: relative; }
.skinmaker-pokemon-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(13,13,20,0.98);
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.skinmaker-pokemon-suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.8rem;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.skinmaker-pokemon-suggestion:hover,
.skinmaker-pokemon-suggestion.is-active { background: rgba(255,255,255,0.08); }
.skinmaker-pokemon-suggestion strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skinmaker-pokemon-suggestion small { grid-column: 1; color: rgba(255,255,255,0.62); }
.skinmaker-pokemon-suggestion em { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #ffbd69; font-style: normal; font-size: 0.76rem; }
.skinmaker-pokemon-suggestions__empty { padding: 0.85rem; color: rgba(255,255,255,0.65); text-align: center; }

.skinmaker-preview-legend { padding: 0.8rem 0.9rem; }
.skinmaker-preview-legend h3 { margin-bottom: 0.55rem; }
.skinmaker-preview-legend__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem 0.9rem;
  color: rgba(255,255,255,0.74);
  font-size: 0.84rem;
  line-height: 1.35;
}
.skinmaker-preview-legend__grid strong { color: #fff; }

/* Nenhuma sombra projetada nos modelos do criador */
.skinmaker-preview-canvas,
.skinmaker-preview-stage canvas { filter: none !important; box-shadow: none !important; }

@media (max-width: 980px) {
  .skins-maker-promo { min-height: 220px; }
}

@media (max-width: 720px) {
  .skinmaker-preview-legend__grid { grid-template-columns: 1fr; }
  .skins-maker-promo { min-height: 210px; }
}


/* Viewer fluido com visual inspirado em Blockbench */
.skinmaker-preview-stage {
  isolation: isolate;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(241,61,100,.08), transparent 46%),
    #090b10;
  background-size: 32px 32px, 32px 32px, auto, auto;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    inset 0 -90px 120px rgba(0,0,0,.28);
}

.skinmaker-preview-stage::before,
.skinmaker-preview-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.skinmaker-preview-stage::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(241,61,100,.18), transparent);
}

.skinmaker-preview-stage::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,191,95,.15), transparent);
}

.skinmaker-preview-canvas {
  position: relative;
  z-index: 1;
  cursor: grab;
  transition: filter .18s ease;
}

.skinmaker-preview-canvas.is-dragging {
  cursor: grabbing;
}

.skinmaker-preview-panel {
  box-shadow:
    0 24px 70px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.skinmaker-preview-legend {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
  border-color: rgba(255,255,255,.09);
}

.skinmaker-renderer-parking {
  width: 2px;
  height: 2px;
}


.skinmaker-compact-actions { display: flex; justify-content: flex-end; }
.skinmaker-actions--export { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.skinmaker-preview-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.skinmaker-layer-count { padding: .45rem .7rem; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.76); font-size: .82rem; white-space: nowrap; }
.skinmaker-layer-count strong { color: #fff; }
@media (max-width: 640px) { .skinmaker-actions--export { grid-template-columns: 1fr; } }


/* Lista clicável de players e Pokémon da cena */
.skinmaker-element-browser { margin: 0 0 1rem; padding: .9rem; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(7,9,14,.54); }
.skinmaker-element-browser__header { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.7rem; }
.skinmaker-element-browser__header strong { color:#fff; font-size:.92rem; }
.skinmaker-element-browser__header small { color:rgba(255,255,255,.54); font-size:.76rem; }
.skinmaker-element-list { display:flex; flex-wrap:wrap; gap:.55rem; }
.skinmaker-element-list__empty { margin:0; color:rgba(255,255,255,.52); font-size:.84rem; }
.skinmaker-element-item { min-width:0; max-width:100%; display:flex; align-items:center; gap:.55rem; padding:.58rem .72rem; border-radius:12px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.045); color:#fff; cursor:pointer; text-align:left; transition:background .16s ease,border-color .16s ease,transform .16s ease; }
.skinmaker-element-item:hover { background:rgba(255,255,255,.08); transform:translateY(-1px); }
.skinmaker-element-item.is-active { border-color:rgba(255,191,95,.75); background:linear-gradient(135deg,rgba(241,61,100,.18),rgba(255,191,95,.12)); box-shadow:0 0 0 2px rgba(255,191,95,.08); }
.skinmaker-element-item__icon { width:1.7rem; height:1.7rem; display:grid; place-items:center; border-radius:8px; background:rgba(255,255,255,.07); flex:0 0 auto; }
.skinmaker-element-item__copy { min-width:0; display:grid; gap:.08rem; }
.skinmaker-element-item__copy strong { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.84rem; }
.skinmaker-element-item__copy small { color:rgba(255,255,255,.52); font-size:.7rem; }
.skinmaker-field > span strong { color:#ffbf5f; }
@media (max-width:640px){ .skinmaker-element-browser__header{align-items:flex-start;flex-direction:column;gap:.2rem}.skinmaker-element-item{width:100%}.skinmaker-element-item__copy strong{max-width:240px} }

.skinmaker-element-item__icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; border-radius: 6px; display: block; }
.skinmaker-element-item__icon { overflow: hidden; flex: 0 0 auto; }

.skinmaker-element-list {
  display: grid;
  gap: 0.6rem;
}
.skinmaker-element-item {
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.skinmaker-element-item__drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  color: rgba(255,255,255,.45);
  font-size: 1rem;
}
.skinmaker-element-item.is-dragging {
  opacity: .75;
  transform: scale(.985) rotate(-1deg);
}
.skinmaker-element-item.is-drop-target {
  border-color: rgba(255,191,95,.55);
  box-shadow: 0 0 0 1px rgba(255,191,95,.28), 0 16px 30px rgba(0,0,0,.18);
  transform: translateY(2px);
}
.skinmaker-element-browser__header small {
  color: rgba(255,255,255,.66);
}


/* Reordenação dos elementos por pointer events */
.skinmaker-element-item__drag {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0.35rem 0.2rem;
  border-radius: 8px;
}

.skinmaker-element-item__drag:hover {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.055);
}

.skinmaker-element-list.is-reordering {
  user-select: none;
  -webkit-user-select: none;
}

.skinmaker-element-list.is-reordering .skinmaker-element-item {
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    opacity .16s ease;
}

.skinmaker-element-list .skinmaker-element-item.is-dragging {
  cursor: grabbing;
  z-index: 4;
  opacity: .88;
  transform: scale(1.018) rotate(-.45deg);
  border-color: rgba(255,191,95,.62);
  box-shadow:
    0 18px 34px rgba(0,0,0,.34),
    0 0 0 1px rgba(255,191,95,.25);
}
