/* ============================================================
   Little Lady — Estilos
   ============================================================ */

:root {
  --lilac-100: #f4ecff;
  --lilac-200: #e6d9f8;
  --lilac-300: #d0bcf0;
  --purple: #4f4ec3;
  --purple-dark: #37369a;
  --pink: #ff5fbc;
  --pink-soft: #ffd7ec;
  --yellow: #ffd23f;
  --teal: #4ecdc4;
  --ink: #3a3158;
  --ink-soft: #6a5fa0;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(79, 78, 195, 0.16);
  --rainbow: linear-gradient(90deg, #ff5f6d, #ffc371, #ffe66d, #8be04e, #4ecdc4, #a78bfa);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', 'Baloo 2', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  /* Fundo lilás com malha quadriculada responsiva */
  background-color: #d9c9f5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(180deg, #efe4ff 0%, #d8c4f4 55%, #c9b0ec 100%);
  background-size: clamp(22px, 4vw, 46px) clamp(22px, 4vw, 46px), clamp(22px, 4vw, 46px) clamp(22px, 4vw, 46px), 100% 100%;
  background-attachment: fixed;
}

img { max-width: 100%; }

button { font-family: inherit; cursor: pointer; }

/* ---------------- Header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  flex-wrap: wrap;
}

.logo-img { height: 256px; }

.social-row { display: flex; align-items: center; gap: 8px; }
.social-row img { width: 34px; height: 34px; }

.icon-btn {
  background: var(--white);
  border: 3px solid #e2d7f7;
  border-radius: 14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 4px 10px rgba(79, 78, 195, 0.12);
  transition: transform 0.15s ease;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn img { width: 100%; height: 100%; object-fit: contain; }
.icon-btn.icon-pink {
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 6px 14px rgba(255, 95, 188, 0.35);
}
.icon-btn.icon-pink img { filter: brightness(0) invert(1); }

/* Botão "Início" da página de cadastro: ícone 100% maior, sem a caixa branca. */
#btnHome {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 88px;
  height: 88px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.03); }
.btn-primary { background: linear-gradient(90deg, #ff5fbc, #ff8acb); color: #fff; }
.btn-ghost { background: #fff; color: var(--purple); border: 2px solid #e2d7f7; }
.btn-buy { background: var(--yellow); color: #5a4300; }
.btn-danger { background: linear-gradient(90deg, #ff6b6b, #ff8e8e); color: #fff; }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-login {
  background: var(--yellow);
  color: #5a4300;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(255, 210, 63, 0.45);
}

/* ---------------- Banner (espaços de anúncio) ---------------- */
.banner {
  border: 2px dashed rgba(79, 78, 195, 0.45);
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.4px;
  text-align: center;
  overflow: hidden;
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner span { line-height: 1.25; }
.banner small { display: block; font-size: 11px; font-weight: 600; opacity: 0.75; margin-top: 4px; }
.banner-top { height: 160px; margin: 20px 18px 12px; }
.banner-top img { object-fit: contain; }

/* Faixa lilás no topo (banner + logo + redes sociais + login) */
.top-band {
  background: linear-gradient(180deg, #c4a8ec 0%, #b294e4 55%, #a587dd 100%);
  padding: 14px 18px 20px;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 12px 28px rgba(79, 78, 195, 0.28);
  position: relative;
  z-index: 3;
}
.top-band .banner-top {
  height: 170px;
  margin: 0 0 14px;
  border: 2px dashed rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
}
.top-band .site-header { padding: 0 2px; }
.top-band .logo-img {
  position: absolute;
  left: 18px;
  bottom: -97px;
  height: 256px;
  z-index: 5;
}
.banner-left { min-height: 260px; width: 100%; }
.banner-right { min-height: 180px; width: 100%; margin-top: 12px; }

/* Espaço reservado para banner (Google Ads) — apenas desktop */
.ad-slot {
  display: none;
  width: 100%;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(79, 78, 195, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
}

@media (min-width: 1081px) {
  .ad-slot { display: flex; }
}

/* ---------------- Moeda, saldo, configurações e perfil ---------------- */
.top-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 18px 12px;
  margin-top: 90px;
  flex-wrap: wrap;
}
.stats-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.coin-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe28a, #f4b700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 5px 12px rgba(244, 183, 0, 0.4);
}
.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ee081, #43c26b);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  padding: 8px 18px 8px 12px;
  box-shadow: 0 6px 14px rgba(67, 194, 107, 0.4);
  transition: transform 0.15s ease;
}
.balance-pill:hover { transform: translateY(-2px); }
.balance-star { color: #ff5fbc; font-size: 18px; text-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }

/* ---------------- Barras de navegação (pílulas) ---------------- */
.nav-row {
  display: flex;
  gap: 14px;
  padding: 0 18px 14px;
  align-items: stretch;
}
.pill-bar {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 4px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    var(--rainbow) border-box;
  box-shadow: var(--shadow);
  min-width: 0;
}
.pill-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px;
}
.pill-scroll::-webkit-scrollbar { display: none; }
.pill-arrow {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #ece6fb;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pill-arrow:disabled { opacity: 0.35; }

/* Pílulas horizontais (laterais do portal) */
.pill-side {
  flex: 0 0 auto;
  width: 100%;
  min-height: 130px;
}
.pill-side .pill-scroll {
  flex-direction: row;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

/* Categorias (barra esquerda) — ícones 150px */
.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  border-radius: 16px;
  padding: 6px 10px;
  flex: 0 0 auto;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cat-btn img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}
.cat-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.cat-btn.active {
  background: #efe7ff;
  transform: scale(1.04);
}
.cat-btn.active .cat-label { color: var(--purple); font-weight: 800; }

/* Itens (barra direita) — ícones */
.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 4px;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #fff;
  border: 3px solid #e6dcf9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(79, 78, 195, 0.12);
}
.item-thumb img { width: 90%; height: 90%; object-fit: contain; }
.item-name {
  font-size: 11px;
  color: var(--ink-soft);
  max-width: 78px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-card.applied { transform: scale(1.06); }
.item-card.applied .item-thumb {
  border-color: #fff;
  outline: 3px solid var(--pink);
  outline-offset: -1px;
}
.item-card.applied .item-name { color: var(--purple); font-weight: 800; }
.item-crown { position: absolute; top: -6px; right: -4px; width: 22px; height: 22px; }

/* Cards de fundo (categoria "Fundos") */
.bg-item .item-thumb { width: 92px; height: 64px; }
.bg-item .item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bg-item[data-bgid="bgp_05"] .item-thumb img { transform: scale(1.7); }
.bg-item[data-bgid="bgp_11"] .item-thumb img { transform: scale(1.7); }
.bg-css-thumb { display: block; width: 100%; height: 100%; }
.bg-price, .item-price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--yellow);
  color: #5a4300;
  border: 2px solid var(--lilac-300);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
  margin-top: 3px;
  line-height: 1.2;
}
.bg-owned { display: block; font-size: 12px; font-weight: 800; color: #2ec4b6; margin-top: 2px; }

.item-color-dot {
  position: absolute;
  bottom: 26px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ---------------- Layout principal ---------------- */
.main {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(0, 1.15fr) minmax(210px, 1fr);
  gap: 16px;
  padding: 0 18px 26px;
  align-items: start;
}

.left-col { display: flex; flex-direction: column; gap: 12px; margin-top: 56px; min-width: 0; }
.right-col { display: flex; flex-direction: column; gap: 12px; margin-top: 56px; min-width: 0; }

.center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.top-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top-actions .icon-btn {
  width: 56px;
  height: 56px;
}
#btnBuy {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  width: 67px;
  height: 67px;
  flex-shrink: 0;
}
.top-stats #btnSettingsTop {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}
.top-stats .balance-tag {
  font-size: 13px;
  padding: 22px 67px 22px 73px;
  gap: 11px;
}

/* Moldura em arco do avatar */
.arch {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 260px 260px 28px 28px;
  box-shadow: 0 18px 50px rgba(79, 78, 195, 0.25);
  overflow: hidden;
}
.avatar-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4060.92 / 5714.36;
  background-color: #fdfbff;
  touch-action: none;
}
.avatar-stage.has-premium-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.bg-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.arch-frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.layers-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
  z-index: 2;
}
.adjust-btn {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 184px;
  height: 184px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  padding: 0;
}
.adjust-btn img { width: 104px; height: 104px; object-fit: contain; }
.adjust-btn[hidden] { display: none; }

.layer { position: absolute; inset: 0; }
.layer-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.layer-tint {
  position: absolute;
  inset: 0;
}
.layer-shade { opacity: 0.22; mix-blend-mode: multiply; }

/* Funções primárias */
.funcs-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background-image: url('../img/icones/icones_UI/barra_navegacao_funcoes_primarias.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 16px 20px;
}
.func-btn {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 4px solid var(--white);
  background: #f0e9fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(79, 78, 195, 0.2);
  transition: transform 0.15s ease;
  padding: 8px;
}
.func-btn:hover { transform: scale(1.08); }
.func-btn img { width: 100%; height: 100%; object-fit: contain; }

/* Nome e saldo */
.name-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 14px;
  border-radius: 999px;
  background-color: var(--white);
  background-image: url('../img/icones/icones_UI/barra_fundo_nome.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: var(--shadow);
  min-height: 0;
  width: fit-content;
  align-self: center;
}
.name-bar .avatar-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  margin: -18px -12px -18px 0;
}
.name-bar .avatar-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
  pointer-events: none;
}
.name-bar img.avatar-kid {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: #f3edfd;
}
.name-bar .name-text { font-weight: 800; font-size: 22px; color: var(--purple); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.balance-tag {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 32px 96px 32px 104px;
  border-radius: 999px;
  background-image: url('../img/icones/icones_UI/tag_saldo.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  font-weight: 800;
  color: var(--purple);
  font-size: 34px;
  width: fit-content;
}
.balance-tag .coin { font-size: 40px; }
#btnProfileTop {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
}
#btnProfileTop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------------- Seletor de cor ---------------- */
#colorPickerMount { min-height: 0; }
#colorPickerMount[hidden] { display: none; }

.color-picker {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cp-title { font-weight: 800; color: var(--purple); }
.cp-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-swatch {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 3px solid #e6dcf9;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.cp-hex-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 120px;
}
.cp-label { font-weight: 700; color: var(--ink-soft); }
.cp-hex {
  flex: 1;
  min-width: 70px;
  border: 2px solid #e6dcf9;
  border-radius: 10px;
  padding: 7px 8px;
  font-weight: 700;
  color: var(--ink);
}
.cp-pct { color: var(--ink-soft); font-size: 12px; }
.cp-add {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
}
.cp-rainbow {
  background: var(--rainbow);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.cp-rainbow.active { outline: 3px solid var(--purple); }

.cp-adjust { display: flex; flex-direction: column; gap: 8px; }
.cp-field { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.cp-field span { flex: 0 0 auto; min-width: 58px; }
.cp-field input[type="range"] { flex: 1; accent-color: var(--pink); }
.cp-field output { flex: 0 0 auto; min-width: 42px; text-align: right; }

.cp-palette, .cp-saved { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.cp-dot:hover { transform: scale(1.12); }
.cp-dot.active { outline: 3px solid var(--pink); outline-offset: 1px; }
.cp-saved-title { font-weight: 800; color: var(--purple); font-size: 13px; }
.cp-empty { color: var(--ink-soft); font-size: 13px; }

/* Seletor de cor desabilitado (item não editável): caixas brancas. */
.cp-disabled { opacity: 0.85; }
.cp-disabled .cp-swatch { background: #fff !important; }
.cp-disabled .cp-dot { background: #fff !important; border-color: #f4f0fb; box-shadow: 0 0 0 1px #dcd3f0; cursor: default; }
.cp-disabled .cp-dot:hover { transform: none; }
.cp-disabled .cp-dot.active { outline: none; }

.panel-hint { color: var(--ink-soft); font-size: 13px; padding: 10px 4px; white-space: nowrap; }

/* ---------------- Modais ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 49, 88, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  position: relative;
  background: var(--white);
  border-radius: 22px;
  padding: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: #f0e9fb;
  color: var(--purple);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}
.modal-title { margin: 0 0 14px; color: var(--purple); }

.bg-scroll { display: flex; flex-direction: column; gap: 14px; }
.bg-section h3 { margin: 0 0 8px; color: var(--ink-soft); font-size: 15px; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bg-swatch {
  position: relative;
  border: 3px solid #e6dcf9;
  border-radius: 14px;
  height: 92px;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: flex-end;
  transition: transform 0.15s ease;
}
.bg-swatch:hover { transform: scale(1.03); }
.bg-swatch.selected { outline: 4px solid var(--pink); outline-offset: 2px; }
.bg-swatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-name {
  position: relative;
  width: 100%;
  background: rgba(58, 49, 88, 0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 6px;
  text-align: center;
}
.bg-crown { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; }
.bg-crown img { position: static; width: 100%; height: 100%; }
.bg-price {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--yellow);
  color: #5a4300;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
}
.bg-note { color: #b3261e; font-weight: 700; font-size: 13px; }
.bg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

/* ---------------- Painel de ajuste (fundo premium) ---------------- */
.adjust-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  max-width: 640px;
  margin: 0 auto;
}
.adjust-sheet[hidden] { display: none; }
.adjust-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--purple);
  font-size: 16px;
  margin-bottom: 10px;
}
.adjust-x {
  border: none;
  background: #f0e9fb;
  color: var(--purple);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 900;
  cursor: pointer;
}
.adjust-grid { display: flex; flex-direction: column; gap: 10px; }
.adjust-field {
  display: grid;
  grid-template-columns: 110px 52px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.adjust-field output {
  text-align: right;
  color: var(--purple);
  font-weight: 800;
  font-size: 12px;
}
.adjust-field input[type="range"] { width: 100%; accent-color: var(--pink); }
.adjust-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ---------------- Confirmação de recomeçar ---------------- */
.reset-box { max-width: 400px; text-align: center; }
.reset-text { color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }
.reset-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------- Portão de boas-vindas ---------------- */
.welcome-gate {
  position: fixed;
  inset: 0;
  background: rgba(58, 49, 88, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
}
.welcome-gate[hidden] { display: none; }
.welcome-card {
  position: relative;
  background: var(--white);
  border-radius: 24px;
  padding: 8px 26px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.welcome-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f0e9fb;
  color: var(--purple);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.welcome-close:hover { transform: scale(1.1); background: #e6d9f8; }
.welcome-logo { height: 210px; }
.welcome-card h1 { color: var(--purple); margin: -18px 0 12px; line-height: 1.5; }
.welcome-card p { color: var(--ink-soft); line-height: 1.8; margin: 0 0 8px; }
.welcome-gift {
  background: var(--pink-soft);
  border-radius: 14px;
  padding: 14px 12px;
  margin: 18px 0;
  color: #a0256c;
  font-weight: 700;
  line-height: 1.7;
}

/* ---------------- Toast ---------------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 180px;
  transform: translateX(-50%) translateY(20px);
  background: var(--purple);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 10px 28px rgba(79, 78, 195, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 3000;
  max-width: 90vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Decoração de fundo ---------------- */
/* Conteúdo principal acima da decoração de fundo */
.site-header, .banner-top, .top-stats, .nav-row, .main { position: relative; z-index: 1; }

.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.decor-shape { position: absolute; opacity: 0.22; }
.shape-star {
  width: 44px; height: 44px;
  background: #ff5fbc;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.shape-heart {
  width: 34px; height: 30px;
  background: #ff7ac3;
  clip-path: path('M17 30C8 22 0 14 0 7.5C0 3 3 0 7 0C10 0 13 2 17 6C21 2 24 0 27 0C31 0 34 3 34 7.5C34 14 26 22 17 30Z');
}

/* Rodapé decorativo (Rosa Chiclete) por cima do fundo lilás */
.page-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(135deg, #ffd9e8 0%, #ff9ecb 100%);
  border-radius: 40px 40px 0 0;
  z-index: 0;
  pointer-events: none;
}

/* Crédito no final da página */
.site-credit {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 10px 180px;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 13px;
}
.site-credit a {
  color: var(--purple);
  font-weight: 800;
  text-decoration: none;
}
.site-credit a:hover { text-decoration: underline; }

/* ============================================================
   Página de cadastro
   ============================================================ */
.cadastro-page { max-width: 980px; margin: 0 auto; padding: 18px; }

.cadastro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2 { color: var(--purple); margin-top: 0; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.form-row input[type="text"] {
  width: 100%;
  border: 2px solid #e6dcf9;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}

.photo-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-preview-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--pink);
  background: #f6f1ff;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
}
.photo-preview-wrap.dragging { cursor: grabbing; }
.photo-preview {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  max-width: none;
  max-height: none;
}
.photo-actions { display: flex; flex-direction: column; gap: 8px; }
.photo-zoom { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.photo-zoom input[type="range"] { width: 130px; accent-color: var(--pink); }
.photo-zoom output { color: var(--purple); font-weight: 800; min-width: 42px; text-align: right; }
.photo-zoom[hidden] { display: none; }
.photo-box .upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff3bf;
  color: #6b5200;
  border: 2px solid #b8860b;
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}
.upload-label input { display: none; }
.photo-hint { font-size: 12px; color: var(--ink-soft); }
.link-btn { background: none; border: none; color: var(--purple); text-decoration: underline; font-weight: 700; padding: 0; }

.error { color: #b3261e; font-weight: 700; font-size: 13px; min-height: 18px; }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pkg {
  border: 3px solid #e6dcf9;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  background: #fbf9ff;
}
.pkg .credits { font-size: 26px; font-weight: 900; color: var(--purple); }
.pkg .price { color: var(--ink-soft); font-weight: 700; margin: 4px 0 10px; }
.balance-line { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--purple); margin-bottom: 14px; }

/* ---------------- Responsivo ---------------- */
@media (max-width: 1080px) {
  .main { grid-template-columns: 1fr; }
  .left-col { order: 1; margin-top: 0; }
  .right-col { display: contents; }
  .center-col { display: contents; }
  #subBar { order: 2; }
  .arch { order: 3; justify-self: center; }
  #colorPickerMount { order: 4; }
  .funcs-bar { order: 5; justify-self: center; max-width: 100%; }
}

@media (max-width: 760px) {
  .cadastro-grid { grid-template-columns: 1fr; }
  .logo-img { height: 176px; }
  .banner-top { height: 60px; margin: 20px 10px 10px; }
  .top-band .banner-top { height: 60px; margin: 0 0 8px; }
  .top-band .logo-img { position: relative; left: auto; bottom: auto; height: auto; min-width: 200px; max-width: 100%; transform: translateY(20%); }
  .top-band { padding-bottom: 0; }
  .social-row { gap: 6px; }
  .social-row .icon-btn { width: 34px; height: 34px; padding: 3px; }
  .social-row img { width: 24px; height: 24px; }
  #btnBuy { width: 67px; height: 67px; }
  .btn-login { padding: 8px 12px; font-size: 13px; }
  .main { padding: 0 10px 20px; gap: 12px; }
  .arch { border-width: 5px; max-width: 300px; }
  .func-btn { width: 104px; height: 104px; }
  .site-header { padding: 8px 10px 0; gap: 8px; }
  .social-row img { width: 28px; height: 28px; }
  .top-stats { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 0 10px 12px; margin-top: 40px; }
  .name-bar { order: -1; }

  /* Pílulas de categoria/subcategoria mais baixas no mobile */
  .pill-side { min-height: 92px; }
  .pill-bar { padding: 3px 6px; gap: 4px; }
  .pill-scroll { gap: 6px; }
  .pill-arrow { width: 24px; height: 24px; font-size: 11px; }
  .cat-btn { padding: 4px 6px; gap: 2px; border-radius: 12px; }
  .cat-btn img { width: 46px; height: 46px; }
  .cat-label { font-size: 12px; }
  .item-card { padding: 3px; gap: 2px; border-radius: 10px; }
  .item-thumb { width: 46px; height: 46px; border-radius: 10px; border-width: 2px; }
  .item-name { font-size: 10px; max-width: 62px; }
  .item-crown { width: 18px; height: 18px; top: -5px; right: -3px; }
  .item-color-dot { width: 13px; height: 13px; bottom: 20px; right: 4px; }
  .bg-item .item-thumb { width: 66px; height: 46px; }
  .bg-price, .item-price { font-size: 10px; padding: 1px 7px; margin-top: 2px; }
}
