/* Lote 29: ferramentas novas. Usa o painel e os botões do criador de gradiente (gradient-creator.css), o esquema da
   roda de cores (ferramentas-novas.css: .roda-page, .roda-ferramenta, .roda-todas) e as faixas da ficha
   (color-single.css: .harmony-colors). Aqui ficam só as peças que as ferramentas novas acrescentam. */

/* O atributo hidden vence o display dos blocos do lote */
.l29-page [hidden] { display: none !important; }

/* Painel um pouco mais estreito que a área da ferramenta */
@media (min-width: 900px) {
  .l29-ferramenta.roda-ferramenta {
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    max-width: 1400px;
  }
}
.l29-painel .gradient-creator-field { min-width: 0; }
.l29-sub { margin-top: 12px; font-weight: 600; }
.l29-link { margin-top: 10px; }
.l29-palco {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.l29-aviso {
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff7e6;
  border: 1px solid #f3d9a4;
  color: #6b4e00;
  font-size: 0.9rem;
}

/* Abas (Imagem / Paleta, Foto / Câmera…) */
.l29-abas {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #ececec;
  border-radius: 10px;
}
.l29-aba {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
}
.l29-aba.is-active {
  background: #fff;
  color: #0061ff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.l29-aba:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }

/* Escolher foto e câmera */
.l29-foto-entrada {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.l29-foto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.l29-foto-entrada .gradient-creator-btn { flex: 1 1 140px; }
/* Fotos de exemplo (modelos): miniaturas redondas; a escolhida ganha o anel na cor de destaque */
.l29-exemplos { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.l29-exemplos-lista { display: grid; grid-template-columns: repeat(7, minmax(0, 48px)); gap: 6px; }
.l29-exemplo { width: 100%; height: auto; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); transition: border-color 0.15s, transform 0.15s; }
.l29-exemplo img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.l29-exemplo:hover { transform: scale(1.06); }
.l29-exemplo:focus-visible { outline: 2px solid var(--color-primary, #111); outline-offset: 2px; }
.l29-exemplo[aria-pressed="true"] { border-color: var(--color-primary, #111); box-shadow: 0 0 0 2px #fff inset; }
.l29-privacidade {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.8125rem;
  color: #555;
}
.l29-camera {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}
.l29-camera video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  transform: scaleX(-1);
}
.l29-camera-acoes {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.l29-camera-acoes .gradient-creator-btn { flex: 0 0 auto; }

/* Lista de cores editáveis (chips) */
.l29-cores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.l29-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}
/* O botão de cor do tema é absoluto (feito para ficar dentro do campo HEX); no chip ele fica no fluxo, senão escapa
   para a beira da página e não dá para clicar (papel de parede e modo paleta do simulador de daltonismo) */
.l29-chip .gradient-creator-color-trigger { position: static; transform: none; flex: 0 0 auto; width: 30px; height: 30px; }
.l29-chip-hex {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.8125rem;
}
.l29-chip-x {
  border: 0;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  color: #777;
  cursor: pointer;
  padding: 0 2px;
}
.l29-chip-x:hover { color: #c00; }

/* Faixa de cores com o HEX sempre visível (como a paleta da roda) */
.harmony-colors.l29-faixa {
  height: 64px;
  margin-top: 0;
  border: 1px solid #e0e0e0;
  box-shadow: none;
}
.l29-faixa .harmony-color { height: 100%; min-height: 0; box-shadow: none !important; }
.l29-faixa .harmony-hex {
  opacity: 1 !important;
  position: absolute !important;
  top: auto !important;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
}
.l29-faixa-cinza { background: linear-gradient(to right, #ddd, #555); }

/* ---------- Simulador de daltonismo ---------- */
.sd-cortina {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #eee;
  line-height: 0;
  user-select: none;
}
.sd-canvas { display: block; width: 100%; height: auto; }
.sd-normal-wrap {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  border-right: 3px solid #fff;
  box-shadow: 2px 0 0 rgba(0, 0, 0, 0.15);
}
.sd-normal-wrap .sd-canvas { width: auto; height: 100%; max-width: none; }
.sd-rotulo {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
}
.sd-rotulo--esq { left: 10px; }
.sd-rotulo--dir { right: 10px; }
.sd-divisor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.sd-miniaturas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 768px) { .sd-miniaturas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sd-miniatura {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  text-align: center;
}
.sd-miniatura canvas { width: 100%; height: auto; border-radius: 8px; }
.sd-miniatura.is-active { border-color: #0061ff; color: #0061ff; }
.sd-paleta-linhas { display: flex; flex-direction: column; gap: 14px; }
.sd-linha {
  padding: 12px 14px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 12px;
  cursor: pointer;
}
.sd-linha.is-active { border-color: #0061ff; }
.sd-linha h3 { margin: 0 0 8px; font-size: 1rem; }
.sd-aviso { margin: 8px 0 0; font-size: 0.875rem; color: #2f6b2f; }
.sd-aviso--alerta { color: #8a1c1c; }
/* Paletas prontas e resumo do modo paleta */
.sd-exemplos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.sd-exemplo { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #e0e0e0; border-radius: 10px; background: #fff; font: inherit; font-size: 0.75rem; font-weight: 600; line-height: 1.25; color: #333; text-align: left; cursor: pointer; }
.sd-exemplo:hover { border-color: #bbb; }
.sd-exemplo[aria-pressed="true"] { border-color: #0061ff; background: #e8f0fe; color: #0061ff; }
.sd-exemplo:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.sd-exemplo-faixa { display: flex; height: 14px; border-radius: 4px; overflow: hidden; }
.sd-exemplo-faixa span { flex: 1; }
.sd-resumo { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; font-size: 0.9375rem; font-weight: 600; }
.sd-resumo--ok { background: #eaf6ec; color: #1f5f2a; }
.sd-resumo--alerta { background: #fdecec; color: #8a1c1c; }
.sd-resumo:empty { display: none; }
/* Celular: a imagem (ou a paleta) vem antes do painel, à vista logo depois do título */
@media (max-width: 767px) {
  .sd-page .l29-palco { order: -1; }
  .sd-page .l29-ferramenta { gap: 16px; }
}

/* ---------- Papel de parede ---------- */
.pp-palco { align-items: center; }
.pp-moldura {
  --pp-proporcao: 1179 / 2556;
  position: relative;
  box-sizing: border-box;
  background: #111;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.pp-moldura--celular {
  width: min(100%, 290px);
  padding: 11px;
  border-radius: 44px;
}
.pp-moldura--celular::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 90px;
  height: 24px;
  margin-left: -45px;
  border-radius: 999px;
  background: #111;
  z-index: 2;
}
.pp-moldura--tablet {
  width: min(100%, 420px);
  padding: 18px;
  border-radius: 30px;
}
.pp-moldura--monitor {
  width: 100%;
  max-width: 820px;
  padding: 14px 14px 18px;
  border-radius: 14px;
  margin-bottom: 40px;
}
.pp-moldura--monitor::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 26%;
  height: 34px;
  transform: translateX(-50%);
  background: linear-gradient(#2a2a2a, #111);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}
.pp-tela {
  position: relative;
  aspect-ratio: var(--pp-proporcao);
  overflow: hidden;
  border-radius: 34px;
  background: #222;
}
.pp-moldura--tablet .pp-tela { border-radius: 14px; }
.pp-moldura--monitor .pp-tela { border-radius: 4px; }
.pp-tela canvas { display: block; width: 100%; height: 100%; }
.pp-bloqueio {
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.pp-data { font-size: 0.85rem; font-weight: 600; }
.pp-hora { font-size: 3.4rem; font-weight: 700; line-height: 1.05; letter-spacing: -1px; }
.pp-moldura--monitor .pp-bloqueio, .pp-moldura--tablet .pp-bloqueio { display: none; }
.pp-personalizado {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 10px;
}
.pp-personalizado label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; font-weight: 600; color: #444; }
.pp-personalizado input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9375rem;
}
.pp-usadas { width: 100%; max-width: 520px; }
.pp-usadas-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pp-usadas-lista li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.pp-usada-cor { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.12); flex: 0 0 auto; }
.pp-usadas-lista code { font-size: 0.8125rem; }

/* ---------- Coloração pessoal (guia, estações e cartelas) ---------- */
.cp-conteudo { padding-top: var(--space-md, 16px); }
.cp-secao { margin-bottom: var(--space-lg, 32px); }
.cp-secao .tab-title a { color: inherit; text-decoration: none; }
.cp-secao .tab-title a:hover { text-decoration: underline; }
.cp-eixos {
  list-style: none;
  margin: 0 auto var(--space-lg, 32px);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.cp-eixo {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  padding: 10px 16px;
  background: #f8f8f8;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}
.cp-eixo span { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #666; }
.cp-eixo strong { font-size: 1rem; color: #1a1a1a; }
.cp-eixo.is-dominante { background: #eef4ff; border-color: #c7dcff; }
.cp-eixo.is-dominante strong { color: #0050d4; }
.related-colors-grid.cp-cartela { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.related-colors-grid.cp-cartela--curta { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cp-cartela--evitar .related-color-preview { position: relative; }
.cp-cartela--evitar .related-color-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top right, transparent calc(50% - 2.5px), rgba(0, 0, 0, 0.45) calc(50% - 2.5px), rgba(0, 0, 0, 0.45) calc(50% - 1px), rgba(255, 255, 255, 0.95) calc(50% - 1px), rgba(255, 255, 255, 0.95) calc(50% + 1px), rgba(0, 0, 0, 0.45) calc(50% + 1px), rgba(0, 0, 0, 0.45) calc(50% + 2.5px), transparent calc(50% + 2.5px));
}
.cp-cartela .related-color-preview { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.cp-duas { display: grid; grid-template-columns: 1fr; gap: var(--space-lg, 32px); }
@media (min-width: 1024px) { .cp-duas { grid-template-columns: 1fr 1fr; } }
.palettes-grid.cp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 0; }
@media (max-width: 1024px) {
  .related-colors-grid.cp-cartela { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Cards em grupos de 3: 3 colunas a partir de 768 px, 1 coluna abaixo (nunca um card sozinho na linha) */
@media (max-width: 767px) {
  .palettes-grid.cp-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .related-colors-grid.cp-cartela, .related-colors-grid.cp-cartela--curta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Teste por selfie (e peças comuns dos testes com foto) ---------- */
.l29-dicas { margin: 0; padding-left: 18px; font-size: 0.875rem; color: #444; display: grid; gap: 4px; }
.l29-status { margin: 0; font-size: 0.9rem; color: #555; min-height: 1.4em; }
.cs-pergunta { border: 0; margin: 0 0 12px; padding: 0; }
.cs-pergunta:last-child { margin-bottom: 0; }
.cs-pergunta legend { font-size: 0.8125rem; font-weight: 600; color: #444; margin-bottom: 6px; padding: 0; }
.cs-pergunta .l29-aba { font-size: 0.8125rem; padding: 8px 6px; }
.cs-vazio {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: #fff;
  border: 1px dashed #d6d6d6;
  border-radius: 12px;
  text-align: center;
  color: #444;
}
.cs-vazio p { margin: 0 auto; max-width: 520px; }
.cs-vazio-faixa { display: flex; height: 64px; border-radius: 10px; overflow: hidden; }
.cs-vazio-faixa .palette-color-item { flex: 1; }
.cs-vazio-faixa .gradient-hex { display: none; }
.cs-resultado { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1100px) { .cs-resultado { grid-template-columns: minmax(0, 560px) minmax(240px, 1fr); align-items: start; } }
.cs-foto-wrap { border-radius: 12px; overflow: hidden; background: #eee; line-height: 0; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 4 / 5; }
/* Foto única (selfie, batom, formato de rosto): sempre o recorte 4:5 do rosto, com até 480 px (560 px no desktop) */
.cs-foto { width: 100%; height: 100%; display: block; }
.cs-dados { display: flex; flex-direction: column; gap: 20px; }
.cs-titulo { margin: 0 0 10px; font-size: 1.05rem; }
.cs-medidas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cs-medidas li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 0.9rem; }
.cs-medidas strong { min-width: 56px; }
.cs-hex { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--color-primary, #0066ff); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cs-hex:hover { text-decoration-thickness: 2px; }
.cs-legenda { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.45; color: #666; }
.cs-amostra { width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.12); flex: 0 0 auto; }
.cs-amostra--vazia { background: repeating-linear-gradient(45deg, #eee, #eee 4px, #fff 4px, #fff 8px); }
.cs-eixos { display: grid; gap: 14px; }
.cs-eixo-nome { display: block; font-size: 0.8125rem; font-weight: 700; color: #333; margin-bottom: 4px; }
.cs-eixo-linha { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: #555; }
.cs-eixo-linha > span { flex: 0 0 52px; }
.cs-eixo-linha > span:last-child { text-align: right; }
.cs-eixo-trilho { position: relative; flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(to right, #cfe0ff, #eee 50%, #ffe0c2); }
.cs-eixo-marca { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #0061ff; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.cs-estacao { padding-top: var(--space-lg, 32px); }
.cs-estacao-texto { max-width: 820px; margin: 0 auto var(--space-md, 16px); text-align: center; color: #444; }

/* ---------- Teste de tecidos ---------- */
.tt-etapa { display: flex; flex-direction: column; gap: 12px; }
.tt-pergunta { margin: 0; font-size: 1.05rem; font-weight: 700; text-align: center; }
.tt-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tt-grade--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1200px) { .tt-grade--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tt-grade > .gradient-creator-btn { grid-column: 1 / -1; justify-self: center; flex: 0 0 auto; }
.tt-opcao {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tt-opcao:hover, .tt-opcao:focus-visible { border-color: #0061ff; outline: none; }
.tt-opcao canvas { width: 100%; height: auto; border-radius: 10px; }
.tt-rotulo { font-size: 0.875rem; font-weight: 600; color: #333; }
.tt-rodape { display: flex; justify-content: space-between; align-items: center; }
.tt-progresso { font-size: 0.875rem; color: #666; }
.tt-refazer { flex: 0 0 auto; text-decoration: none; }
.tt-rodape { gap: 10px; flex-wrap: wrap; }
/* Fim do teste: as 5 escolhas em miniatura */
.tt-grade--resumo { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1200px) { .tt-grade--resumo { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tt-escolha { margin: 0; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.tt-escolha canvas { width: 100%; height: auto; border-radius: 10px; }
.tt-escolha .tt-rotulo { font-size: 0.8125rem; line-height: 1.3; }
.tt-page .l29-abas .l29-aba { padding-left: 6px; padding-right: 6px; }

/* ---------- Provador de batom ---------- */
.pb-grupos { display: grid; gap: 10px; }
.pb-grupo { display: flex; align-items: center; gap: 10px; }
.pb-grupo-nome { flex: 0 0 96px; font-size: 0.8125rem; font-weight: 600; color: #444; }
.pb-tons { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-tons--estacao { margin-top: 10px; font-size: 0.8125rem; color: #555; }
.pb-tom {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.pb-tom.is-active { box-shadow: 0 0 0 2px #0061ff; }
.pb-tom:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.pb-livre { width: 34px; height: 34px; }
.pb-cortina { max-width: 480px; margin: 0 auto; width: 100%; aspect-ratio: 4 / 5; }
.pb-cortina .sd-canvas { height: 100%; }
.pb-cor-atual { margin: 0; text-align: center; font-size: 0.9375rem; }

/* ---------- Simulador de esmalte ---------- */
.se-palco { align-items: center; }
.se-mao {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 740 / 900;
  background: #fff;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #fbf8f4, #ebe4dc);
  border-radius: 16px;
}
.se-mao svg, .se-mao canvas { display: block; width: 100%; height: 100%; }
.se-foto { cursor: pointer; }
/* Pintar uma por vez: um botão por dedo, com a cor atual da unha */
.se-dedos { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; max-width: 440px; }
.se-dedo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #ddd; border-radius: 999px; background: #fff; font: inherit; font-size: 0.8125rem; font-weight: 600; color: #444; cursor: pointer; }
.se-dedo:hover { border-color: #bbb; }
.se-dedo:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.se-dedo-cor { width: 14px; height: 14px; border-radius: 50%; background: var(--se-cor, #dc143c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.se-unha { cursor: pointer; }
.se-unha:focus-visible { outline: none; }
/* Opções em botões: acabamento (4 por linha) e formato (com o desenho da unha) */
.se-opcoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.se-opcoes--formato { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.se-opcao {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 6px 4px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
}
.se-opcao:hover { border-color: #bbb; }
.se-opcao.is-active { border-color: #0061ff; background: #e8f0fe; color: #0061ff; }
.se-opcao:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.se-opcao--formato { font-size: 0.75rem; padding: 6px 2px; }
.se-formato-icone { width: 16px; height: 24px; color: #c9a3a3; }
.se-opcao--formato.is-active .se-formato-icone { color: #0061ff; }
/* Ideias prontas: grupos e cartões com uma paleta das 5 unhas (polegar → mínimo, como na mão) */
.se-coluna-mao { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 480px; }
.se-ideias { width: 100%; max-width: 480px; }
.se-ideias-grupos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.se-grupo { font-size: 0.8125rem; padding: 5px 11px; }
.se-ideias-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-top: 10px; }
.se-ideia[data-se-oculta] { display: none; }
.se-ideia {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  color: #333;
  text-align: left;
  cursor: pointer;
}
.se-ideia:hover { border-color: #bbb; }
.se-ideia.is-active { border-color: #0061ff; background: #e8f0fe; color: #0061ff; }
.se-ideia:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.se-amostras { display: flex; align-items: flex-end; gap: 4px; height: 26px; }
.se-amostra {
  --unha: #efd3c6;
  width: 12px;
  height: 20px;
  border-radius: 6px 6px 4px 4px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.se-amostra:first-child { width: 14px; height: 16px; transform: rotate(-30deg); transform-origin: bottom center; margin-right: 2px; }
.se-amostra:nth-child(3) { height: 24px; }
.se-amostra:last-child { width: 10px; height: 17px; }
/* formato: ponta da amostra */
.se-amostra--curta, .se-amostra--redonda { border-radius: 5px 5px 4px 4px; }
.se-amostra--quadrada { border-radius: 2px 2px 4px 4px; }
.se-amostra--oval, .se-amostra--amendoada { border-radius: 50% 50% 4px 4px / 60% 60% 4px 4px; }
.se-amostra--bailarina { border-radius: 3px 3px 4px 4px; clip-path: polygon(22% 0, 78% 0, 100% 34%, 100% 100%, 0 100%, 0 34%); }
.se-amostra--stiletto { border-radius: 0 0 4px 4px; clip-path: polygon(50% 0, 100% 46%, 100% 100%, 0 100%, 0 46%); }
/* acabamento */
.se-amostra--gel { background: linear-gradient(100deg, transparent 24%, rgba(255, 255, 255, 0.55) 34%, transparent 46%), var(--c); }
.se-amostra--metalico { background: linear-gradient(100deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.6) 45%, rgba(0, 0, 0, 0.2)), var(--c); }
.se-amostra--perolado { background: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(190, 220, 255, 0.25) 50%, rgba(255, 200, 230, 0.3)), var(--c); }
.se-amostra--glitter { background: radial-gradient(circle at 30% 30%, #fff 0 1px, transparent 1.5px) 0 0 / 5px 5px, radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px) 0 0 / 6px 6px, var(--c); }
.se-amostra--francesinha { background: linear-gradient(to bottom, var(--c) 0 32%, var(--unha) 38%); }
.se-amostra--degrade { background: linear-gradient(to bottom, var(--c) 15%, var(--unha) 95%); }
.se-ideia-nome { display: block; }
.se-ideia-detalhe { display: block; margin-top: -6px; font-size: 0.75rem; font-weight: 500; color: #777; }
.se-ideia.is-active .se-ideia-detalhe { color: #4a7fd6; }
.se-unha:focus-visible .se-unha-borda { stroke: #0061ff; stroke-width: 2.5; opacity: 1; }

/* ---------- Formato de rosto ---------- */
.fr-formas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.fr-forma { width: 40px; height: 52px; border: 3px solid #b9c7e8; background: #eef3ff; }
.fr-forma--oval { border-radius: 50% / 45%; }
.fr-forma--redondo { height: 44px; width: 44px; border-radius: 50%; }
.fr-forma--quadrado { height: 44px; width: 44px; border-radius: 10px; }
.fr-forma--retangular { height: 56px; width: 38px; border-radius: 10px; }
.fr-forma--coracao { border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; }
.fr-forma--diamante { width: 40px; height: 40px; transform: rotate(45deg) scale(0.9); border-radius: 8px; }
.fr-forma--triangular { border-radius: 40% 40% 12px 12px / 60% 60% 12px 12px; }
.fr-medidas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.875rem; }
.fr-medidas li { display: flex; justify-content: space-between; gap: 10px; }
.fr-foto-wrap { max-width: 480px; }
.fr-dicas { margin-top: var(--space-md, 16px); }
.fr-link { grid-column: 1 / -1; text-align: center; margin: 0; }
/* Combinações prontas: faixa 60-30-10 */
.cp-look-faixa .palette-color-item:nth-child(1) { flex: 6 1 0; }
.cp-look-faixa .palette-color-item:nth-child(2) { flex: 3 1 0; }
.cp-look-faixa .palette-color-item:nth-child(3) { flex: 1 1 0; min-width: 28px; }
.cp-estacao-texto { max-width: none; margin: 0 0 var(--space-md, 16px); color: #333; }
.cp-estacao-texto p { margin: 0 0 10px; }

/* ---------- Subtom de pele ---------- */
.st-grade { display: grid; gap: 8px; }
.st-linha { display: grid; grid-template-columns: 96px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.st-canto { }
.st-cab { display: flex; flex-direction: column; gap: 2px; font-size: 0.875rem; text-align: center; }
.st-cab small { font-size: 0.75rem; color: #666; line-height: 1.3; }
.st-prof { display: flex; align-items: center; font-size: 0.875rem; font-weight: 600; color: #333; }
.st-amostra { position: relative; min-height: 64px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.st-hex { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-size: 0.6875rem; font-family: var(--font-mono, ui-monospace, monospace); color: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.15s ease; }
.st-amostra:hover .st-hex { opacity: 1; }
.st-linha:nth-last-child(-n+2) .st-hex { color: rgba(255, 255, 255, 0.75); }
@media (max-width: 600px) {
  .st-linha { grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 5px; }
  .st-cab small { display: none; }
  .st-amostra { min-height: 48px; }
  .st-prof { font-size: 0.75rem; }
}
.st-teste { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 1024px) { .st-teste { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.st-perguntas { background: #f8f8f8; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 12px; padding: 20px; }
.st-resultado { background: #fff; border: 2px solid #e6eefc; border-radius: 12px; padding: 20px; }
.st-resultado p { margin: 0 0 10px; }
.st-resultado-titulo { font-size: 1.15rem; }
.st-resultado-vazio { color: #666; }

/* ---------- Teste de daltonismo ---------- */
/* Prancha e resposta: lado a lado no computador (tudo acima da dobra), uma embaixo da outra no celular */
.td-palco { align-items: center; }
.td-prancha-wrap { width: 100%; max-width: min(520px, 62vh); aspect-ratio: 1; margin: 0 auto; }
.td-lado { width: 100%; max-width: 520px; }
.td-inicio { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid #e6e6e6; border-radius: 14px; background: #fafafa; }
.td-inicio-titulo { margin: 0; font-size: 1.1rem; font-weight: 700; }
.td-inicio-texto { margin: 0; font-size: 0.9375rem; color: #444; }
.td-fatos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.td-fatos li { padding: 8px 6px; border-radius: 10px; background: #fff; border: 1px solid #ececec; text-align: center; font-size: 0.8125rem; color: #555; line-height: 1.25; }
.td-fatos strong { display: block; font-size: 1.35rem; color: #111; }
.td-inicio.is-fim .td-fatos { display: none; }
.td-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.td-voltar { align-self: center; }
.td-dica { margin: 0; text-align: center; font-size: 0.8125rem; color: #777; }
.td-passos { max-width: 820px; margin: var(--space-lg, 24px) auto 0; padding: 18px 20px; border: 1px solid #e6e6e6; border-radius: 14px; background: #fafafa; }
.td-passos-titulo { margin: 0 0 10px; font-size: 1.05rem; }
.td-passos-lista { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; color: #333; }
@media (min-width: 1100px) {
  .td-page .td-palco { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: center; gap: 28px; }
  .td-page .td-prancha-wrap { max-width: min(500px, 66vh); }
}
@media (max-width: 767px) {
  .td-page .td-prancha-wrap { max-width: min(100%, 46vh); }
  .td-page .td-resposta { gap: 8px; }
  .td-page .td-tecla { padding: 9px 0; }
  .td-page .td-dica { display: none; }
  .td-page .td-inicio { padding: 14px; }
}
.td-prancha { width: 100%; height: 100%; display: block; }
.td-progresso { height: 8px; border-radius: 999px; background: #e6e6e6; overflow: hidden; }
.td-progresso span { display: block; height: 100%; width: 0; background: #0061ff; transition: width 0.25s ease; }
.td-contagem { margin: 6px 0 0; font-size: 0.875rem; color: #555; }
.td-resposta { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.td-pergunta { margin: 0; text-align: center; font-size: 1.05rem; font-weight: 600; }
.td-digitado { display: inline-block; min-width: 2.2em; padding: 2px 10px; margin-left: 6px; border-radius: 8px; background: #eef4ff; color: #0050d4; font-size: 1.3rem; text-align: center; }
.td-teclado { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.td-tecla { padding: 12px 0; border: 1px solid #e0e0e0; border-radius: 10px; background: #fff; font-size: 1.15rem; font-weight: 700; cursor: pointer; }
.td-tecla:hover { border-color: #0061ff; color: #0061ff; }
.td-tecla:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.td-resultado-texto { max-width: 820px; margin: 0 auto var(--space-md, 16px); color: #333; }
.td-resultado-texto p { margin: 0 0 10px; }
.td-tabela-wrap { overflow-x: auto; }
.td-tabela { width: 100%; max-width: 820px; margin: 0 auto; border-collapse: collapse; font-size: 0.9rem; }
.td-tabela th, .td-tabela td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; }
.td-tabela .td-errado td:last-child { color: #a11; font-weight: 600; }
.td-tabela .td-certo td:last-child { color: #1a7a33; }
.td-acoes-fim { max-width: 520px; margin: var(--space-md, 16px) auto 0; }
.td-link-sim { text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* Foto única no desktop: 560 px (fica no fim para valer sobre os 480 px de cada ferramenta) */
@media (min-width: 1100px) { .cs-foto-wrap, .pb-cortina, .fr-foto-wrap { max-width: 560px; } }

/* Cor livre: botão dentro do painel, com a amostra e o código (batom e teste de tecidos) */
.l29-cor-livre {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  cursor: pointer;
}
.l29-cor-livre:hover { border-color: #bbb; }
.l29-cor-livre:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.l29-cor-livre-amostra { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.12); }
.l29-cor-livre-texto { flex: 1; min-width: 0; }
.l29-cor-livre-hex { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; font-weight: 500; color: #666; }

/* Antes e depois: alça redonda sobre a linha (a barra começa no meio da foto) */
.sd-alca {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 3 12 9 18'/%3E%3Cpolyline points='15 6 21 12 15 18'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.sd-normal-wrap.is-ponta { border-right-color: transparent; box-shadow: none; }

/* Celular: nas ferramentas com rosto, a foto vem antes do painel; no batom, ela fica presa no topo enquanto a pessoa
   escolhe os tons, para ver cada cor na hora */
@media (max-width: 767px) {
  .pb-page .l29-ferramenta,
  .tt-page .l29-ferramenta,
  .cs-page .l29-ferramenta { gap: 16px; padding-top: 8px; }
  .pb-page .l29-palco,
  .tt-page .l29-palco,
  .cs-page .l29-palco { order: -1; }
  .pb-page .l29-painel,
  .tt-page .l29-painel,
  .cs-page .l29-painel { padding: 16px; gap: 14px; }
  .pb-page .l29-palco {
    position: sticky;
    top: 52px;
    z-index: 5;
    gap: 6px;
    margin: 0 -16px;
    padding: 8px 16px;
    background: #fff;
    box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.25);
  }
  .pb-page .pb-cortina { width: auto; height: 36vh; max-width: 100%; align-self: center; }
  .pb-page .pb-cor-atual { font-size: 0.8125rem; }
  .pb-page #pb-status { margin: 0; font-size: 0.75rem; text-align: center; }
  .pb-page #pb-status.is-dica { display: none; }
  .pb-page .cs-vazio { padding: 12px; gap: 10px; }
  .pb-grupo-nome { flex-basis: 84px; }
  .cs-page .cs-foto-wrap { max-width: 280px; }
}

/* Batom no desktop: a foto encosta no painel, e o nome do batom e a dica ficam centrados embaixo dela */
@media (min-width: 768px) {
  .pb-page .l29-palco { align-items: flex-start; }
  .pb-page .pb-cortina { margin: 0; }
  .pb-page .cs-vazio { align-self: stretch; }
  .pb-page .pb-cor-atual,
  .pb-page #pb-status { width: 100%; max-width: 480px; text-align: center; }
}
@media (min-width: 1100px) {
  .pb-page .pb-cor-atual,
  .pb-page #pb-status { max-width: 560px; }
}

/* ---------- Papel de parede: grade de 3 partes (painel, prévia e ideias prontas) ---------- */
.pp-moldura { max-width: 100%; }
.pp-page .l29-painel { align-self: start; }
.pp-extras { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pp-ideias-titulo { margin: 0 0 8px; font-size: 0.875rem; }
.pp-temas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pp-tema {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
}
.pp-tema:hover { border-color: #bbb; }
.pp-tema.is-active { border-color: #0061ff; background: #e8f0fe; color: #0061ff; }
.pp-tema:focus-visible, .pp-ideia:focus-visible { outline: 2px solid #0061ff; outline-offset: 2px; }
.pp-ideias-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pp-ideia {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: none;
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s, border-color 0.15s;
}
.pp-ideia:hover { transform: translateY(-2px); }
.pp-ideia.is-active { border-color: #0061ff; }
.pp-ideia canvas { width: 100%; height: auto; display: block; border-radius: 10px; }
.pp-extras .roda-dica { margin: 8px 0 0; }
.pp-usadas { max-width: none; }
@media (min-width: 768px) {
  .pp-page .l29-ferramenta { align-items: start; }
  .pp-page .pp-extras { grid-column: 1 / -1; }
  .pp-page .pp-ideias-grade { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .pp-page .l29-ferramenta.roda-ferramenta { grid-template-columns: minmax(300px, 380px) auto minmax(0, 1fr); }
  .pp-page .pp-extras { grid-column: auto; }
  .pp-page .pp-ideias-grade { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Celular: a prévia vem primeiro e fica presa no topo enquanto a pessoa mexe no painel */
@media (max-width: 767px) {
  .pp-page .l29-ferramenta { gap: 16px; padding-top: 8px; }
  .pp-page .pp-palco {
    order: -1;
    position: sticky;
    top: 52px;
    z-index: 5;
    gap: 4px;
    margin: 0 -16px;
    padding: 8px 16px 6px;
    background: #fff;
    box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.25);
  }
  .pp-page .pp-moldura--celular { padding: 6px; border-radius: 26px; }
  .pp-page .pp-moldura--celular::before { top: 12px; width: 44px; height: 12px; margin-left: -22px; }
  .pp-page .pp-moldura--celular .pp-tela { border-radius: 20px; }
  .pp-page .pp-hora { font-size: 1.6rem; }
  .pp-page .pp-data { font-size: 0.6rem; }
  .pp-page .pp-moldura--monitor { margin-bottom: 22px; }
  .pp-page .pp-moldura--monitor::after { bottom: -20px; height: 20px; }
  .pp-page #pp-medida { margin: 0; font-size: 0.75rem; }
  .pp-page .l29-painel { padding: 16px; gap: 14px; }
}
@media (max-width: 767px) {
  .pp-page .pp-temas { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
  .pp-page .pp-temas::-webkit-scrollbar { display: none; }
  .pp-page .pp-tema { flex: 0 0 auto; }
}
/* Papel de parede em tamanho de computador: painel e monitor lado a lado; as ideias prontas numa linha embaixo */
.pp-page .pp-ferramenta--paisagem .pp-moldura--monitor { width: 100%; max-width: 820px; }
@media (min-width: 768px) {
  .pp-page .pp-ferramenta--paisagem .pp-palco { align-items: flex-start; }
}
@media (min-width: 1100px) {
  .pp-page .pp-ferramenta--paisagem.l29-ferramenta.roda-ferramenta { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .pp-page .pp-ferramenta--paisagem .pp-extras { grid-column: 1 / -1; }
  .pp-page .pp-ferramenta--paisagem .pp-ideias-grade { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .pp-page .pp-ferramenta--paisagem .pp-usadas-lista { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ---------- Formato de rosto (revisão de 19/10) ---------- */
.fr-lema { margin: -12px 0 12px; text-align: center; font-weight: 600; color: #666; }
.fr-afinidade-bloco { max-width: 560px; margin: 0 auto 24px; }
.fr-afinidade { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fr-afinidade li { display: grid; grid-template-columns: 28px 96px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 0.9rem; }
.fr-afinidade li.is-principal { font-weight: 700; }
.fr-afinidade .fr-afinidade-forma { width: 20px; height: 26px; border-width: 2px; justify-self: center; }
.fr-afinidade .fr-forma--redondo, .fr-afinidade .fr-forma--quadrado, .fr-afinidade .fr-forma--diamante { width: 22px; height: 22px; }
.fr-afinidade .fr-forma--retangular { width: 18px; height: 28px; }
.fr-afinidade-barra { height: 10px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.fr-afinidade-barra span { display: block; height: 100%; border-radius: 999px; background: #b9c7e8; }
.fr-afinidade li.is-principal .fr-afinidade-barra span { background: #0061ff; }
.fr-afinidade-pct { text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .fr-page .l29-palco { align-items: flex-start; }
  .fr-page .fr-foto-wrap { margin: 0; }
  .fr-page .cs-vazio { align-self: stretch; }
  .fr-page #fr-status { max-width: 560px; }
}
@media (max-width: 767px) {
  .fr-page .l29-ferramenta { gap: 16px; padding-top: 8px; }
  .fr-page .l29-palco { order: -1; }
  .fr-page .fr-foto-wrap { max-width: 300px; }
  .fr-page .l29-painel { padding: 16px; gap: 14px; }
  .fr-afinidade li { grid-template-columns: 24px 84px minmax(0, 1fr) 40px; gap: 8px; }
}

/* Simulador de esmalte: no desktop a mão encosta no painel; no celular ela vem primeiro e fica presa no topo */
@media (min-width: 768px) {
  .se-page .se-palco { align-items: flex-start; }
  .se-page .pb-cor-atual { width: 100%; max-width: 480px; text-align: center; }
}
/* Computador largo: as ideias ficam à direita da mão, na altura dela */
@media (min-width: 1180px) {
  .se-page .se-palco { display: grid; grid-template-columns: minmax(0, 440px) minmax(260px, 1fr); align-items: start; gap: 24px; }
  .se-page .se-coluna-mao { max-width: 440px; }
  .se-page .se-ideias { max-width: none; }
  .se-page .se-ideias-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .se-page .l29-ferramenta { gap: 16px; padding-top: 8px; }
  .se-page .se-palco {
    order: -1;
    position: sticky;
    top: 52px;
    z-index: 5;
    gap: 4px;
    margin: 0 -16px;
    padding: 8px 16px 6px;
    background: #fff;
    box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.25);
  }
  .se-page .se-mao { width: auto; height: 36vh; max-width: 100%; align-self: center; }
  .se-page .se-dedos { justify-content: center; }
  .se-page .pb-cor-atual { font-size: 0.8125rem; text-align: center; }
  .se-page .se-coluna-mao { gap: 4px; max-width: none; }
  .se-page .se-ideias > .gradient-creator-label, .se-page .se-ideias-grupos { display: none; }
  .se-page .se-ideias-lista { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 4px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
  .se-page .se-ideias-lista::-webkit-scrollbar { display: none; }
  .se-page .se-ideia, .se-page .se-ideia[data-se-oculta] { display: flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; padding: 6px 10px; }
  .se-page .se-amostras { height: 22px; }
  .se-page .se-amostra { transform: scale(0.85); transform-origin: bottom center; }
  .se-page .se-amostra:first-child { transform: rotate(-30deg) scale(0.85); }
  .se-page .se-ideia-nome { white-space: nowrap; }
  .se-page .se-ideia-detalhe { display: none; }
  .se-page .l29-painel { padding: 16px; gap: 14px; }
}


/* Faixa de cores do simulador no celular: o tema empilha .harmony-colors em linhas; aqui ela continua na horizontal
   (é uma paleta) e o HEX fica na vertical, para caber até 10 cores sem se sobrepor */
@media (max-width: 767px) {
  .harmony-colors.l29-faixa { flex-direction: row; height: 72px; margin-top: 0; }
  .l29-faixa .harmony-color { width: auto; height: 100%; min-height: 0; }
  .l29-faixa .harmony-hex {
    position: absolute !important;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%) rotate(180deg) !important;
    writing-mode: vertical-rl;
    font-size: 0.6875rem !important;
    letter-spacing: 0.02em;
  }
}

/* Subtom de pele: a nota embaixo da grade acompanha a grade inteira (a .roda-dica nasceu para a roda, com 420 px) */
.st-page #tons-e-subtons .roda-dica { max-width: none; margin: 10px 0 0; text-align: left; }
/* Lote 32 (desempenho): a moldura do celular já nasce com a largura que o script calcula (74% da altura da janela no
   computador, 40% no celular, até 300 px, na proporção 1179 × 2556), para a coluna das ideias não pular ao carregar. */
.pp-page #pp-moldura.pp-moldura--celular:not([style*="width"]) { width: min(300px, calc((74vh - 22px) * 0.46127 + 22px)); }
@media (max-width: 767px) {
  .pp-page #pp-moldura.pp-moldura--celular:not([style*="width"]) { width: min(300px, calc((40vh - 22px) * 0.46127 + 22px)); }
}
