/* corpo3d.css — "Monte sua tatuagem" (Bandit Studio). Tudo com prefixo .c3d pra não vazar no site. */
.c3d {
  --c3d-acento: var(--acento, #c8372d);
  --c3d-fundo: #0a0a0b;
  --c3d-sup: #131315;
  --c3d-sup2: #1b1b1e;
  --c3d-linha: rgba(255, 255, 255, 0.09);
  --c3d-linha2: rgba(255, 255, 255, 0.16);
  --c3d-texto: #efede9;
  --c3d-sub: #9d9a95;
  --c3d-raio: 18px;
  color: var(--c3d-texto);
  font: inherit;
  display: block;
  -webkit-tap-highlight-color: transparent;
}
.c3d *, .c3d *::before, .c3d *::after { box-sizing: border-box; }
.c3d [hidden] { display: none !important; }
.c3d button, .c3d input, .c3d textarea { font: inherit; color: inherit; }
.c3d button { cursor: pointer; }
.c3d :focus-visible { outline: 2px solid var(--c3d-acento); outline-offset: 2px; }
.c3d svg { width: 20px; height: 20px; flex: none; }

/* cabeçalho */
.c3d-cab { margin: 0 0 clamp(18px, 4vw, 32px); max-width: 44rem; }
.c3d-titulo { margin: 0; font-size: clamp(2.3rem, 8.2vw, 4.6rem); line-height: 0.94; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
.c3d-lead { margin: 14px 0 0; color: var(--c3d-sub); font-size: clamp(1rem, 2.6vw, 1.15rem); line-height: 1.5; max-width: 34rem; text-wrap: pretty; }

/* grade */
.c3d-grade { display: grid; gap: 14px; }

/* palco 3D */
.c3d-palco {
  position: relative; overflow: hidden; border-radius: var(--c3d-raio);
  height: clamp(460px, 70svh, 640px);
  border: 1px solid var(--c3d-linha);
  background:
    radial-gradient(46% 9% at 50% 92%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(70% 55% at 50% 38%, #2b2b30 0%, #161618 52%, #0b0b0c 100%);
  isolation: isolate;
}
@media (min-width: 920px) {
  .c3d-grade { grid-template-columns: minmax(0, 1.22fr) minmax(350px, 0.88fr); gap: 24px; align-items: start; }
  .c3d-grade > .c3d-palco { position: sticky; top: 16px; height: min(86vh, 820px) !important; }
}
.c3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; outline: none; }
.c3d-canvas:active { cursor: grabbing; }
.c3d-movendo .c3d-canvas { touch-action: none; cursor: move; }
.c3d-palco:not([data-estado="pronto"]) .c3d-topo .c3d-zoom,
.c3d-palco:not([data-estado="pronto"]) .c3d-base,
.c3d-palco:not([data-estado="pronto"]) .c3d-dica { visibility: hidden; }

.c3d-topo { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; z-index: 2; }
.c3d-topo > * { pointer-events: auto; }
.c3d-zoom { display: grid; gap: 8px; }
.c3d-redondo {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(12, 12, 13, 0.74); border: 1px solid var(--c3d-linha2); color: var(--c3d-texto);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.2s, border-color 0.2s;
}
.c3d-redondo:hover { background: rgba(30, 30, 33, 0.9); }
.c3d-redondo[aria-pressed="true"] { background: var(--c3d-acento); border-color: var(--c3d-acento); color: #fff; }

/* segmentado */
.c3d-seg {
  display: inline-flex; padding: 3px; border-radius: 999px; gap: 2px;
  background: rgba(12, 12, 13, 0.74); border: 1px solid var(--c3d-linha2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.c3d-seg button {
  min-height: 44px; padding: 0 15px; border: 0; border-radius: 999px; background: transparent;
  color: var(--c3d-sub); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.01em; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.c3d-seg button:hover { color: var(--c3d-texto); }
.c3d-seg button[aria-pressed="true"] { background: var(--c3d-texto); color: #0b0b0c; }
.c3d-painel .c3d-seg { background: #0e0e10; backdrop-filter: none; }

.c3d-base { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; z-index: 2; pointer-events: none; }
.c3d-base > * { pointer-events: auto; }

.c3d-pilula {
  position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 2; pointer-events: none;
  display: grid; justify-items: center; gap: 1px; padding: 9px 16px 10px; border-radius: 14px; text-align: center;
  background: rgba(12, 12, 13, 0.8); border: 1px solid var(--c3d-linha2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: calc(100% - 32px);
}
.c3d-pilula strong { font-size: 0.98rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.c3d-pilula strong::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c3d-acento); }
.c3d-pilula span { font-size: 0.76rem; color: var(--c3d-sub); }
.c3d-pilula span:empty { display: none; }
.c3d-entra { animation: c3d-entra 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes c3d-entra { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

.c3d-dica, .c3d-modo-mover {
  position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 2; pointer-events: none;
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 999px; white-space: nowrap;
  background: rgba(12, 12, 13, 0.72); border: 1px solid var(--c3d-linha2); color: #dedbd6; font-size: 0.84rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.c3d-dica svg { animation: c3d-acena 2.4s ease-in-out 3; }
@keyframes c3d-acena { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.c3d-dica.c3d-some { opacity: 0; transform: translate(-50%, 6px); }
.c3d-modo-mover { bottom: 136px; background: var(--c3d-acento); border-color: transparent; color: #fff; }

.c3d-aviso {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px;
  text-align: center; color: var(--c3d-sub); font-size: 0.95rem; z-index: 1; transition: opacity 0.4s;
}
.c3d-aviso p { margin: 0; max-width: 22rem; line-height: 1.45; }
.c3d-palco[data-estado="pronto"] .c3d-aviso { opacity: 0; pointer-events: none; }
.c3d-carga { width: 120px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; visibility: hidden; }
.c3d-carga span { display: block; width: 40%; height: 100%; background: var(--c3d-acento); }
.c3d-palco[data-estado="carregando"] .c3d-carga span { animation: c3d-carga 1.1s ease-in-out infinite; }
.c3d-palco[data-estado="carregando"] .c3d-carga { visibility: visible; }
.c3d-palco[data-estado="carregando"] .c3d-aviso { background: rgba(10, 10, 11, 0.35); }
.c3d-palco[data-estado="erro"] .c3d-aviso { color: var(--c3d-texto); }
@keyframes c3d-carga { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* painel */
.c3d-painel { display: grid; gap: 12px; }
.c3d-passo { background: var(--c3d-sup); border: 1px solid var(--c3d-linha); border-radius: var(--c3d-raio); padding: 18px 16px 20px; }
@media (min-width: 480px) { .c3d-passo { padding: 20px 20px 22px; } }
.c3d-passo h3 { margin: 0 0 14px; display: flex; align-items: center; gap: 11px; font-size: 1.06rem; font-weight: 700; letter-spacing: -0.005em; }
.c3d-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; border: 1px solid var(--c3d-linha2); color: var(--c3d-sub); }
/* lista de tatuagens */
.c3d-qual { color: var(--c3d-sub); font-weight: 500; }
.c3d-lista { display: grid; gap: 8px; }
.c3d-tat { display: flex; align-items: center; border: 1px solid var(--c3d-linha2); border-radius: 14px; background: #0d0d0f; transition: border-color 0.2s; }
.c3d-tat-ativa { border-color: var(--c3d-acento); }
.c3d-tat-sel { flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 6px 0 12px; background: none; border: 0; text-align: left; font-size: 0.93rem; font-weight: 600; }
.c3d-tat-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c3d-tat-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; border: 1px solid var(--c3d-linha2); color: var(--c3d-sub); }
.c3d-tat-ativa .c3d-tat-n { background: var(--c3d-acento); border-color: var(--c3d-acento); color: #fff; }
.c3d-tat-x { flex: none; width: 48px; height: 52px; display: grid; place-items: center; background: none; border: 0; color: var(--c3d-sub); border-radius: 0 14px 14px 0; }
.c3d-tat-x:hover { color: var(--c3d-texto); }
.c3d-tat-x svg { width: 18px; height: 18px; }
.c3d-btn-add { width: 100%; margin-top: 10px; }
.c3d-btn-add:disabled { cursor: not-allowed; }
.c3d-local { margin: -4px 0 14px; color: var(--c3d-sub); font-size: 0.95rem; }
.c3d-local strong { color: var(--c3d-texto); font-weight: 700; }
.c3d-lado { margin-top: 12px; }

.c3d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.c3d-chip {
  min-height: 44px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--c3d-linha2);
  background: transparent; color: var(--c3d-texto); font-size: 0.92rem; font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.c3d-chip:hover { border-color: rgba(255, 255, 255, 0.32); }
.c3d-chip[aria-pressed="true"] { background: var(--c3d-acento); border-color: var(--c3d-acento); color: #fff; font-weight: 600; }

.c3d-upload {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.24); border-radius: 14px; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.c3d-upload:hover, .c3d-upload:focus-within { border-color: var(--c3d-acento); background: rgba(255, 255, 255, 0.02); }
.c3d-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.c3d-upload svg { width: 26px; height: 26px; color: var(--c3d-acento); }
.c3d-upload span { display: grid; gap: 3px; }
.c3d-upload strong { font-size: 1rem; font-weight: 700; }
.c3d-upload small { color: var(--c3d-sub); font-size: 0.8rem; line-height: 1.35; }
.c3d-upload-curto { min-height: 52px; padding: 8px 14px; }
.c3d-upload-curto small { display: none; }
.c3d-upload-curto svg { width: 22px; height: 22px; }

.c3d-arte { margin-top: 14px; display: grid; gap: 12px; }
.c3d-arte-topo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.c3d-previa {
  width: 96px; height: 96px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; padding: 6px;
  background: #26262a; border: 1px solid var(--c3d-linha);
}
.c3d-previa canvas { max-width: 100%; max-height: 100%; display: block; }
.c3d-arte-info { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.c3d-arte-info .c3d-seg button { padding: 0 12px; font-size: 0.82rem; }
.c3d-msg-fundo { margin: 0; color: var(--c3d-sub); font-size: 0.84rem; line-height: 1.45; }
.c3d-msg-fundo:empty { display: none; }

.c3d-campo { display: grid; gap: 4px; margin: 0 0 6px; }
.c3d-campo > span { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 0.9rem; color: var(--c3d-sub); }
.c3d-campo small { font-size: 0.8rem; }
.c3d-campo output { color: var(--c3d-texto); font-weight: 700; font-size: 1rem; }
.c3d-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.c3d-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
.c3d-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
.c3d-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: var(--c3d-texto); border: 4px solid var(--c3d-acento); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.c3d-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--c3d-texto); border: 4px solid var(--c3d-acento); }

.c3d-linha { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 6px; }
.c3d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--c3d-linha2); background: var(--c3d-sup2); color: var(--c3d-texto);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}
.c3d-btn:hover { border-color: rgba(255, 255, 255, 0.3); }
.c3d-btn:active { transform: scale(0.98); }
.c3d-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.c3d-btn-ia:disabled { cursor: progress; }
.c3d-btn[aria-pressed="true"] { background: var(--c3d-acento); border-color: var(--c3d-acento); color: #fff; }
.c3d-btn-ia { width: 100%; }
.c3d-btn-pedir { width: 100%; min-height: 58px; margin-top: 4px; background: var(--c3d-acento); border-color: var(--c3d-acento); color: #fff; font-size: 1.04rem; font-weight: 700; }
.c3d-btn-pedir:hover { filter: brightness(1.08); border-color: var(--c3d-acento); }
.c3d-btn-pedir svg { width: 22px; height: 22px; }

.c3d-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; background: none; border: 0; font-weight: 600; font-size: 0.95rem; }
.c3d-switch-trilho { width: 42px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); position: relative; transition: background-color 0.2s; }
.c3d-switch-trilho span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.c3d-switch[aria-checked="true"] .c3d-switch-trilho { background: var(--c3d-acento); }
.c3d-switch[aria-checked="true"] .c3d-switch-trilho span { transform: translateX(16px); }

.c3d-nota { margin: 12px 0 0; color: var(--c3d-sub); font-size: 0.82rem; line-height: 1.45; }

.c3d-input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--c3d-linha2);
  background: #0d0d0f; color: var(--c3d-texto); font-size: 1rem; resize: vertical; margin-top: 4px;
}
.c3d-input::placeholder { color: #6f6c68; }
.c3d-input:focus { outline: none; border-color: var(--c3d-acento); }
.c3d-final .c3d-campo { margin-bottom: 12px; }

.c3d-resumo { margin: 0 0 16px; display: grid; border-top: 1px solid var(--c3d-linha); }
.c3d-resumo div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--c3d-linha); font-size: 0.9rem; }
.c3d-resumo dt { color: var(--c3d-sub); }
.c3d-resumo dd { margin: 0; text-align: right; font-weight: 600; }
.c3d-resumo-varias div { flex-direction: column; gap: 2px; }
.c3d-resumo-varias dt { color: var(--c3d-texto); font-weight: 600; }
.c3d-resumo-varias dd { text-align: left; font-weight: 400; color: var(--c3d-sub); }

.c3d-erro { margin: 10px 0 0; color: #ff9b8c; font-size: 0.9rem; }
.c3d-erro:empty { display: none; }

.c3d-pronto { margin-top: 16px; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border-radius: 14px; background: #0d0d0f; border: 1px solid var(--c3d-linha2); }
.c3d-pronto img { width: 104px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; display: block; }
.c3d-pronto > div { display: grid; gap: 6px; justify-items: start; }
.c3d-pronto-tit { margin: 0 0 4px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.c3d-pronto-tit svg { color: var(--c3d-acento); }
.c3d-btn-sec { min-height: 44px; padding: 0 16px; font-size: 0.9rem; }
.c3d-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--c3d-texto); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.c3d-link svg { width: 16px; height: 16px; }
.c3d-tirar-arte { text-decoration: none; color: var(--c3d-sub); }

.c3d-ia-prog { display: grid; gap: 8px; }
.c3d-ia-prog small { color: var(--c3d-sub); font-size: 0.8rem; }
.c3d-barra { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.c3d-barra span { display: block; height: 100%; width: 0; background: var(--c3d-acento); transition: width 0.25s; }

@media (max-width: 380px) {
  .c3d-seg button { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .c3d *, .c3d *::before, .c3d *::after { animation: none !important; transition: none !important; }
}

.c3d output, .c3d-resumo dd, .c3d-n, .c3d-tat-n, .c3d-tat-txt { font-variant-numeric: lining-nums tabular-nums; }
