.area-paleta, .painel-paletas, .aviso-girar {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #25252a;
}
.area-paleta {
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-inline: auto;
}
.seletor-paleta, .opcao-paleta, .fechar-paletas, .acoes-girar > * {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.seletor-paleta {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border-radius: 22px;
  background: #f1f1f5;
  font-size: .9rem;
  font-weight: 650;
  white-space: nowrap;
}
.previa-paleta { display: flex; overflow: hidden; height: 14px; width: 94px; border-radius: 10px; }
.previa-paleta i { flex: 1; }
.seletor-paleta .previa-paleta { width: 62px; height: 12px; }
.seta-paleta { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; translate: 0 -2px; margin-inline: 2px; }
.area-paleta .grade-cores {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  place-items: stretch;
}
.grade-cores > button {
  display: grid;
  place-items: center;
  width: auto;
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
}
.grade-cores > button::before {
  content: "";
  width: min(68%, 32px);
  aspect-ratio: 1;
  background: var(--cor);
  border-radius: 50%;
  border: 1px solid #2020282b;
}
.grade-cores > [aria-pressed="true"]::before { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #25252a; }
.area-paleta :focus-visible, .painel-paletas :focus-visible, .aviso-girar :focus-visible {
  outline: 2px solid #644cb6;
  outline-offset: 2px;
}
.painel-paletas {
  width: min(calc(100% - 20px), 440px);
  max-height: min(82dvh, 690px);
  margin: auto auto calc(10px + env(safe-area-inset-bottom));
  padding: 0;
  border: 1px solid #eeeef1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 60px #19192730;
  overflow: hidden;
}
.painel-paletas[open] { display: flex; flex-direction: column; }
.painel-paletas::backdrop { background: #19192755; }
.cabecalho-paletas { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; border-bottom: 1px solid #eeeef1; }
.cabecalho-paletas h2 { font-size: 1rem; margin: 0; }
.fechar-paletas { background: #f2f2f6; border-radius: 50%; width: 44px; height: 44px; font-size: 1.35rem; }
.lista-paletas { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 10px 10px; }
.opcao-paleta {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 17px;
  gap: 11px;
  align-items: center;
  min-height: 45px;
  padding: 5px 7px 5px 10px;
  border-radius: 10px;
  background: #fff;
  text-align: start;
  font-size: .9rem;
}
.opcao-paleta[aria-pressed="true"] { background: #f2effb; font-weight: 650; }
.opcao-paleta[aria-pressed="true"]::after { content: "✓"; color: #644cb6; }
.pintura-pausada { visibility: hidden; }
.aviso-girar {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #fff;
  text-align: center;
}
.aviso-girar[hidden] { display: none; }
.conteudo-girar > svg { width: 42px; height: 42px; color: #644cb6; }
.conteudo-girar > h1 { margin: 6px 0 12px; font-size: clamp(1.05rem, 4.5vh, 1.45rem); outline: 0; }
.acoes-girar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.acoes-girar > * { display: grid; place-items: center; min-height: 44px; padding: 0 14px; border-radius: 14px; background: #f1f1f5; text-decoration: none; font-size: .9rem; }
.acoes-girar > button { background: #f0ebfb; color: #52389a; }
@media (min-width: 680px) and (pointer: fine) {
  .area-paleta { width: min(100%, 580px); }
  .area-paleta .grade-cores { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .painel-paletas { margin: auto; }
}
@media (hover: hover) {
  .opcao-paleta:not([aria-pressed="true"]):hover, .seletor-paleta:hover { background: #ebebf0; }
}

.aviso-tela-cheia {
  width: min(calc(100% - 32px), 360px);
  padding: 20px;
  border: 1px solid #eeeef1;
  border-radius: 22px;
  color: #25252a;
  background: #fff;
  font: .95rem/1.5 system-ui, sans-serif;
}
.aviso-tela-cheia::backdrop { background: #19192755; }
.aviso-tela-cheia h2 { margin: 0; font-size: 1.1rem; }
.aviso-tela-cheia form { display: flex; justify-content: flex-end; }
.aviso-tela-cheia button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding-inline: 14px;
  font: inherit;
  color: #52389a;
  background: #f0ebfb;
  cursor: pointer;
}


.seletor-paleta, .opcao-paleta { touch-action: manipulation; }
.grade-cores > .cor { touch-action: none; }


.grade-cores > button { position: relative; }
.particulas-amostra {
  position: absolute;
  pointer-events: none;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: min(68%, 32px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}
.previa-glitter { position: relative; }
.particula-glitter {
  position: absolute;
  width: var(--tamanho);
  height: var(--tamanho);
  filter: drop-shadow(0 0 1px #fffc);
  opacity: .4;
  animation: piscar-glitter var(--duracao) var(--atraso) infinite alternate ease-in-out;
}
.particula-glitter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
}
@keyframes piscar-glitter {
  0%, 27% { opacity: .17; transform: scale(.64); }
  69%, 78% { opacity: 1; transform: scale(1.12); }
  100% { opacity: .35; transform: scale(.8); }
}
@media (prefers-reduced-motion: reduce) {
  .particula-glitter { animation: none; }
}

.camada-glitter { pointer-events: none; }
.particulas-gota { overflow: hidden; }