.cp-page {
  overflow-x: clip;
  padding-bottom: 4rem;
}

.cp-page [hidden] {
  display: none !important;
}

.cp-hero {
  padding-top: 7.5rem;
  padding-bottom: 1.5rem;
}

.cp-crumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.cp-crumb li:not(:last-child)::after {
  content: ">";
  margin-left: 0.45rem;
}

.cp-crumb a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cp-hero h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cp-h1-name {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--muted);
}

.cp-lead {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.cp-panel {
  border-radius: 1.5rem;
  border: 2px solid var(--foreground);
  background: var(--card);
  padding: 1.35rem 1.15rem 1.5rem;
  box-shadow: 4px 4px 0 0 var(--foreground);
}

.cp-panel h2,
.cp-seo h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
}

.cp-privacy,
.cp-note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
}

.cp-privacy {
  font-size: 0.8125rem;
}

.cp-drop {
  position: relative;
  display: flex;
  min-height: 8.5rem;
  margin-top: 0.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  border: 2px dashed var(--foreground);
  background: var(--background);
  padding: 1.25rem;
  text-align: center;
  line-height: 1.7;
  cursor: pointer;
}

.cp-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cp-drop:focus-within,
.cp-drop.is-drag {
  outline: 3px solid color-mix(in oklch, var(--pop) 70%, var(--foreground));
  outline-offset: 2px;
  background: color-mix(in oklch, var(--pop) 28%, var(--background));
}

.cp-error {
  margin: 0.85rem 0 0;
  border-radius: 0.9rem;
  background: color-mix(in oklch, var(--pop-3) 35%, var(--card));
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.cp-stage {
  margin-top: 0.9rem;
}

.cp-frame {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.cp-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0.75rem;
  outline: 2px solid var(--foreground);
  object-fit: fill;
}

.cp-frame img.is-pixelated {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.cp-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #1c2430;
  pointer-events: none;
}

.cp-readout {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.cp-kicker {
  margin: 0;
  font-weight: 700;
}

.cp-color {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.55rem;
  border-radius: 1rem;
  border: 2px solid var(--foreground);
  background: var(--background);
  padding: 0.8rem 0.9rem;
}

.cp-swatch {
  width: 4.25rem;
  height: 4.25rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  border: 2px solid var(--foreground);
  overflow: hidden;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #ddd8ce 25%, transparent 25%),
    linear-gradient(-45deg, #ddd8ce 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd8ce 75%),
    linear-gradient(-45deg, transparent 75%, #ddd8ce 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.cp-live .cp-swatch {
  width: 3.25rem;
  height: 3.25rem;
}

.cp-swatch-fill {
  display: block;
  width: 100%;
  height: 100%;
}

.cp-codes p {
  margin: 0;
  font-weight: 700;
  line-height: 1.6;
  user-select: text;
}

.cp-hex {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.cp-loupe-float,
.cp-loupe-box {
  display: inline-block;
  border: 2px solid var(--foreground);
  border-radius: 0.5rem;
  overflow: hidden;
  line-height: 0;
  background: #fff;
}

.cp-loupe-float {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  box-shadow: 3px 3px 0 0 var(--foreground);
}

.cp-loupe-dock {
  margin-top: 0.2rem;
}

.cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.cp-ad {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0 0;
  border: 1px dashed color-mix(in oklch, var(--foreground) 35%, transparent);
  border-radius: 0.9rem;
  background: color-mix(in oklch, var(--secondary) 80%, var(--card));
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.cp-seo {
  margin-top: 2.5rem;
}

.cp-seo h2 {
  margin-top: 2.25rem;
}

.cp-seo h2:first-child {
  margin-top: 0;
}

.cp-seo p,
.cp-seo li {
  margin-top: 0.85rem;
  line-height: 1.85;
}

.cp-seo ul,
.cp-seo ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.cp-example {
  margin-top: 1rem;
  border-radius: 1rem;
  border: 2px solid var(--foreground);
  background: var(--card);
  padding: 0.95rem 1.05rem 1.05rem;
}

.cp-example p {
  margin: 0.35rem 0 0;
  line-height: 1.75;
}

.cp-example p:first-child {
  margin-top: 0;
}

.cp-seo .faq-list {
  margin-top: 1rem;
}

@media (max-width: 719px) {
  .cp-actions .btn-ghost {
    width: 100%;
    min-height: 3rem;
  }
}

@media (min-width: 720px) {
  .cp-panel {
    padding: 1.75rem 1.75rem 1.85rem;
  }

  .cp-readout {
    grid-template-columns: 1fr 1fr;
  }

  .cp-loupe-dock {
    grid-column: 1 / -1;
  }
}
