:root {
  --ink: #11100f;
  --muted: #3f3a37;
  --paper: #fbf6ee;
  --veil: #f2eee8;
  --plum: #4b183e;
  --coral: #e86f5b;
  --gold: #c8a45d;
  --jade: #2f766b;
  --lilac: #b8a5d3;
  --line: rgba(36, 27, 33, 0.14);
  --shadow: 0 28px 80px rgba(48, 27, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbf6ee;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

i[data-lucide] {
  display: none;
}

.grain {
  display: none;
}

body > *:not(.grain) {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1600px, calc(100% - 7rem));
  margin: 0 auto;
  padding: 2.1rem 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.brand,
.top-nav,
.language-switch,
.hero-actions,
.privacy-strip,
.sample-controls,
.result-metrics,
.policy-links,
.filter-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.95rem;
  font-weight: 800;
}

.brand-mark {
  display: none;
}

.top-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 2.6rem;
  color: #171514;
  font-size: 0.98rem;
  font-weight: 650;
}

.language-switch {
  gap: 0.45rem;
  margin-left: auto;
  color: #171514;
  font-size: 0.82rem;
  font-weight: 800;
}

.language-switch select {
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 1.2px solid #171514;
  border-radius: 999px;
  background: transparent;
  color: #171514;
  font: inherit;
  cursor: pointer;
}

.top-nav a {
  padding: 0;
  border-radius: 0;
}

.top-nav a:hover {
  background: transparent;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.3rem;
  min-height: 2.35rem;
  border: 1.2px solid #171514;
  border-radius: 999px;
  color: #171514;
  font-weight: 650;
}

main {
  overflow: hidden;
}

.hero,
.explain-band,
.tool-section,
.makeup-section,
.compat-section,
.shade-engine,
.season-library,
.guide-band,
.policy-band,
.legal-grid {
  width: min(1600px, calc(100% - 7rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(26rem, 0.43fr) minmax(42rem, 0.57fr);
  align-items: center;
  gap: 1.5rem;
  padding: 7.8rem 0 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.95;
  letter-spacing: 0;
}

h1 {
  max-width: 8.5ch;
  font-size: clamp(5rem, 7.7vw, 7.75rem);
  line-height: 0.86;
  font-weight: 800;
}

h2 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

h3,
h4,
p {
  letter-spacing: 0;
}

.hero-text,
.section-head p,
.upload-zone p,
.result-card p,
.guide-grid p,
.policy-band p,
.legal-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 30rem;
  margin: 1.95rem 0 0;
  color: #252220;
  font-size: 1.19rem;
  line-height: 1.42;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.85rem 0 1.55rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 4.8rem;
  padding: 1rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.48rem;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: #161616;
  box-shadow: 0 18px 44px rgba(16, 16, 16, 0.18);
  font-size: 1.12rem;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.58);
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.privacy-strip {
  gap: 0.65rem;
  max-width: 36rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-weight: 650;
}

.hero-inline-link {
  display: inline-block;
  margin-left: 4.6rem;
  color: #1d1a18;
  border-bottom: 1px solid currentColor;
  font-size: 1.04rem;
  line-height: 1.4;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 3rem;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack span,
.avatar-stack b {
  display: grid;
  place-items: center;
  width: 2.55rem;
  aspect-ratio: 1;
  margin-left: -0.42rem;
  border: 2px solid #fbf6ee;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a179, #3f241d);
}

.avatar-stack span:first-child {
  margin-left: 0;
}

.avatar-stack span:nth-child(2) {
  background: linear-gradient(135deg, #e6b591, #7b432e);
}

.avatar-stack span:nth-child(3) {
  background: linear-gradient(135deg, #c66a45, #2b1713);
}

.avatar-stack span:nth-child(4) {
  background: linear-gradient(135deg, #f0cdb5, #6b3b2e);
}

.avatar-stack b {
  width: 2.9rem;
  color: #1f1b19;
  background: #eee6dc;
  font-size: 0.85rem;
  font-weight: 800;
}

.stars {
  color: #c6943d;
  font-size: 1.15rem;
  letter-spacing: 0.08rem;
}

.social-proof p {
  margin: 0.25rem 0 0;
  color: #3d3936;
  font-size: 0.98rem;
}

.privacy-strip svg {
  color: var(--jade);
  flex: 0 0 auto;
}

.editorial-panel {
  position: relative;
  align-self: stretch;
  min-height: calc(100vh - 7.8rem);
  margin-right: calc((100vw - min(1600px, calc(100vw - 7rem))) / -2);
}

.editorial-panel img {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 7.8rem);
  object-fit: cover;
  object-position: center center;
  border-radius: 0;
  box-shadow: none;
  border: 0;
}

.editorial-panel::after {
  display: none;
}

.hero-palette-card {
  position: absolute;
  left: -1.2rem;
  bottom: 2.1rem;
  width: min(23rem, 78%);
  padding: 1.1rem;
  border: 1px solid rgba(36, 27, 33, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 24px 70px rgba(36, 27, 33, 0.22);
  backdrop-filter: blur(20px);
  z-index: 2;
}

.hero-palette-card span {
  display: block;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 800;
}

.hero-palette-card strong {
  display: block;
  margin: 0.15rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-swatch-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.hero-swatch-row b {
  aspect-ratio: 1.55 / 1;
  border: 1px solid rgba(36, 27, 33, 0.1);
  border-radius: 0.28rem;
}

.fabric-chip {
  position: absolute;
  display: block;
  width: 4.7rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 0.18rem;
  box-shadow: 0 12px 30px rgba(36, 27, 33, 0.18);
  transform: rotate(9deg);
  z-index: 2;
}

.fabric-chip::before,
.fabric-chip::after {
  content: "";
  position: absolute;
  inset: -0.18rem;
  background: repeating-linear-gradient(90deg, transparent 0 0.35rem, rgba(255,255,255,0.35) 0.35rem 0.42rem);
  opacity: 0.28;
  clip-path: polygon(0 8%, 8% 0, 16% 8%, 24% 0, 32% 8%, 40% 0, 48% 8%, 56% 0, 64% 8%, 72% 0, 80% 8%, 88% 0, 100% 8%, 100% 92%, 92% 100%, 84% 92%, 76% 100%, 68% 92%, 60% 100%, 52% 92%, 44% 100%, 36% 92%, 28% 100%, 20% 92%, 12% 100%, 0 92%);
}

.chip-one {
  top: 5.5rem;
  left: 1.2rem;
  background: #d7b28a;
}

.chip-two {
  top: 8.5rem;
  right: 1.2rem;
  background: #6b7a3d;
  transform: rotate(-12deg);
}

.chip-three {
  right: 3.2rem;
  bottom: 10.5rem;
  background: #c66a45;
  transform: rotate(15deg);
}

.floating-card {
  position: absolute;
  right: -0.7rem;
  bottom: 3rem;
  width: min(17rem, 70%);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0.95rem;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 24px 70px rgba(36, 27, 33, 0.2);
  backdrop-filter: blur(20px);
}

.floating-card span,
.result-metrics span,
.sample-count,
.shade-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.floating-card strong {
  display: block;
  margin: 0.3rem 0 0.8rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.8rem;
}

.mini-swatches,
.palette-row,
.shade-swatches,
.skin-tone-row {
  display: flex;
  gap: 0.45rem;
}

.mini-swatches b,
.palette-row b {
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 27, 33, 0.12);
  border-radius: 50%;
}

.tool-section,
.makeup-section,
.compat-section,
.shade-engine,
.season-library,
.guide-band,
.policy-band,
.legal-grid {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-head {
  max-width: 48rem;
  margin-bottom: 1.5rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.upload-card,
.result-card,
.makeup-card,
.makeup-result,
.compat-card,
.compat-result,
.search-shell,
.shade-card,
.season-card,
.guide-grid article,
.policy-band,
.legal-grid article {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 60px rgba(36, 27, 33, 0.08);
  backdrop-filter: blur(18px);
}

.upload-card,
.result-card,
.makeup-card,
.makeup-result,
.compat-card,
.compat-result {
  padding: 1rem;
}

.explain-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.explain-band article {
  padding: 1.2rem;
  border-top: 1px solid rgba(17, 16, 15, 0.18);
}

.explain-band span {
  display: block;
  margin-bottom: 0.8rem;
  color: #9a7a43;
  font-weight: 900;
}

.explain-band h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.6rem);
  line-height: 1;
}

.explain-band p {
  color: var(--muted);
  line-height: 1.6;
}

.makeup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.makeup-card h3,
.makeup-result h3 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.makeup-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fffaf4;
}

.makeup-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.makeup-detail-grid div,
.makeup-palette-block {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.68);
}

.makeup-detail-grid span {
  display: block;
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.makeup-detail-grid strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
}

.makeup-palette-block {
  margin-top: 0.75rem;
}

.makeup-palette-block h4 {
  margin: 0 0 0.65rem;
  color: var(--plum);
}

#makeupPairingText,
#veinResultText {
  color: var(--muted);
  line-height: 1.6;
}

.compat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(18rem, 0.78fr);
  gap: 1rem;
  align-items: stretch;
}

.compat-card h3,
.compat-result h3 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.mini-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem;
  border: 1px dashed rgba(75, 24, 62, 0.32);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.7);
  color: var(--plum);
  font-weight: 850;
  cursor: pointer;
}

.mini-upload input {
  display: none;
}

.mini-upload svg {
  width: 1.1rem;
}

.compat-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fffaf4;
}

.compat-result {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.compat-result label {
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compat-result select {
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 7.5rem;
  aspect-ratio: 1;
  border: 10px solid rgba(75, 24, 62, 0.14);
  border-top-color: var(--coral);
  border-right-color: var(--jade);
  border-radius: 50%;
  color: var(--plum);
  font-size: 1.8rem;
  font-weight: 900;
}

.compat-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.compat-result ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.compat-recommendations {
  display: grid;
  gap: 0.65rem;
}

.compat-recommendations div {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 250, 244, 0.68);
}

.compat-recommendations span {
  display: block;
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compat-recommendations strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.compact-makeup {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0.55rem;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 15rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed rgba(75, 24, 62, 0.32);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(255, 250, 244, 0.8), rgba(232, 111, 91, 0.1));
}

.upload-zone.dragging {
  border-color: var(--coral);
  background: rgba(232, 111, 91, 0.15);
}

.upload-zone > svg {
  width: 2.8rem;
  height: 2.8rem;
  color: var(--plum);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.upload-zone h3 {
  margin: 0.8rem 0 0;
  font-size: 1.5rem;
}

.canvas-wrap {
  position: relative;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #1c171a;
}

#photoCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  cursor: crosshair;
}

.empty-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.sample-controls {
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
}

.sample-controls p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.sample-guide {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255, 250, 244, 0.72);
}

.sample-guide h4 {
  margin: 0 0 0.6rem;
  color: var(--plum);
}

.sample-guide ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.55;
}

.sample-guide p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.result-card h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.2rem;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.result-metrics div,
.advice-boxes div {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.56);
}

.result-metrics strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.95rem;
}

.season-calibrator {
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.56);
}

.season-calibrator label {
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.season-calibrator select {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.season-calibrator p {
  margin: 0;
  font-size: 0.88rem;
}

.calibration-help {
  margin-top: 0.35rem;
}

.calibration-help summary {
  color: var(--plum);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.calibration-help p {
  margin-top: 0.45rem;
}

.palette-row {
  flex-wrap: wrap;
  margin: 1rem 0;
}

.palette-row b {
  width: 2.65rem;
}

.mini-heading,
.swatch-label {
  margin: 1rem 0 0.45rem;
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skin-tone-row {
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.skin-tone-row span {
  width: 2.65rem;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 27, 33, 0.14);
  border-radius: 50%;
}

.identified-color-box {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0 0.9rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.72);
}

.identified-color-box span {
  display: block;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.identified-color-box strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
}

.identified-gradient {
  min-height: 3.2rem;
  border: 1px solid rgba(36, 27, 33, 0.14);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.55);
}

.advice-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.advice-columns h4,
.advice-boxes strong {
  margin: 0;
  color: var(--plum);
}

.advice-columns ul {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.advice-boxes {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.advice-boxes p,
.disclaimer {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}

.search-shell {
  padding: 0.8rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
}

.search-box svg {
  color: var(--plum);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.filter-row {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.filter-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.52rem 0.72rem;
  background: rgba(255, 250, 244, 0.76);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.filter-row button.active {
  color: #fff;
  background: var(--plum);
}

.vein-choice-panel {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.72);
}

.vein-choice-panel h4 {
  margin: 0 0 0.65rem;
  color: var(--plum);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vein-choice-panel p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.vein-choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.vein-choice-row button {
  display: grid;
  gap: 0.45rem;
  min-height: 4.6rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-align: left;
}

.vein-choice-row button span {
  width: 100%;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 27, 33, 0.14);
}

.vein-choice-row button.active {
  border-color: var(--plum);
  box-shadow: 0 0 0 2px rgba(75, 24, 62, 0.14);
}

.shade-results,
.season-grid,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.shade-card {
  overflow: hidden;
}

.shade-card .color-top {
  height: 6.5rem;
  border-bottom: 1px solid var(--line);
}

.shade-card .shade-body,
.season-card {
  padding: 1rem;
}

.shade-card h3,
.season-card h3,
.guide-grid h3 {
  margin: 0.25rem 0;
}

.shade-card p,
.season-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.hex-pill {
  display: inline-flex;
  margin-top: 0.8rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: rgba(255, 250, 244, 0.7);
  font-size: 0.82rem;
  font-weight: 850;
}

.season-card {
  min-height: 18rem;
}

.season-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.season-card .season-label {
  color: var(--muted);
  font-weight: 800;
}

.shade-swatches {
  flex-wrap: wrap;
  margin: 1rem 0;
}

.shade-swatches span {
  width: 2.2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 27, 33, 0.14);
  border-radius: 0.35rem;
}

.skin-tone-row.compact {
  margin: 0.55rem 0 1rem;
}

.skin-tone-row.compact span {
  width: 1.9rem;
}

.season-download {
  width: 100%;
  margin-top: 1rem;
}

.guide-grid article {
  padding: 1.2rem;
}

.guide-grid svg {
  color: var(--coral);
}

.policy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.55fr);
  gap: 1rem;
  padding: 1.2rem;
  margin-bottom: 2rem;
}

.policy-band h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.policy-links {
  align-content: start;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.policy-links a {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 250, 244, 0.72);
  color: var(--plum);
  font-weight: 850;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0;
}

.legal-grid article {
  padding: 1rem;
}

.legal-grid h2 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .site-header {
    position: relative;
    width: min(100% - 2rem, 1180px);
    padding: 1.2rem 0;
  }

  .top-nav {
    display: none;
  }

  .language-switch {
    margin-left: 0;
  }

  .hero,
  .explain-band,
  .tool-grid,
  .makeup-grid,
  .compat-grid,
  .policy-band,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .editorial-panel {
    margin-right: 0;
    min-height: auto;
  }

  .editorial-panel img {
    min-height: 32rem;
    border-radius: 1rem;
  }

  .shade-results,
  .season-grid,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 1rem, 1180px);
  }

  .brand {
    font-size: 1.45rem;
  }

  .hero,
  .explain-band,
  .tool-section,
  .makeup-section,
  .compat-section,
  .shade-engine,
  .season-library,
  .guide-band,
  .policy-band,
  .legal-grid {
    width: min(100% - 1rem, 1180px);
  }

  h1 {
    font-size: clamp(3.8rem, 16vw, 5rem);
  }

  .hero-text {
    font-size: 1rem;
  }

  .button {
    width: 100%;
    min-height: 3.8rem;
  }

  .hero-inline-link {
    margin-left: 0;
  }

  .social-proof {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.8rem;
  }

  .editorial-panel img {
    min-height: 28rem;
  }

  .floating-card {
    right: 0.7rem;
    bottom: 1rem;
  }

  .hero-palette-card {
    left: 0.8rem;
    bottom: 1rem;
  }

  .fabric-chip {
    width: 3.5rem;
  }

  .result-metrics,
  .makeup-detail-grid,
  .advice-columns,
  .shade-results,
  .season-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

body > .vein-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 14, 18, 0.7);
  backdrop-filter: blur(2px);
}

body > .vein-zoom[hidden] {
  display: none;
}

.vein-zoom-inner {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.4rem 1.1rem;
  width: min(460px, 92vw);
  box-shadow: var(--shadow);
}

.vein-zoom-inner h3 {
  margin: 0 0 0.4rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
}

.vein-zoom-inner > p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.vein-zoom-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #1c171a;
  cursor: crosshair;
}

#veinZoomCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  /* Visual aid only: bumps subtle vein color shifts so you can see them clearly.
     Sampled data is read from the underlying source canvas — unaffected. */
  filter: contrast(1.45) saturate(1.7);
}

/* When the chromatic-extraction view is active, we've already amplified the
   color deviation in pixel data — applying the CSS filter on top would over-
   process. Disable it. */
#veinZoomCanvas.chroma-mode {
  filter: none;
}

.vein-zoom-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  flex-wrap: wrap;
}

.vein-zoom-toggle {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
}

.vein-zoom-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.vein-zoom-toggle-help {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.personalized-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.personalized-tag-sm {
  margin: 0.4rem 0 0;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
}

.palette-row .palette-swatch {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.palette-row .palette-swatch b {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.palette-row .palette-swatch small {
  font: 600 0.66rem/1.15 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: var(--muted);
  letter-spacing: 0;
  max-width: 64px;
  text-align: center;
  word-break: break-word;
}

.palette-row .palette-swatch small.palette-swatch-hex {
  font-size: 0.6rem;
  color: var(--muted);
}

.palette-row {
  flex-wrap: wrap;
  gap: 0.55rem;
}

.result-makeup-kit {
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}

.result-makeup-kit .mini-heading {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
}

.result-makeup-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 0.6rem;
  margin: 0.35rem 0;
}

.result-makeup-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.result-makeup-row .hero-swatch-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.result-makeup-row .hero-swatch-row b {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}

.vein-zoom-crosshair {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid #fffaf4;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(36, 27, 33, 0.7), 0 0 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.06s linear, top 0.06s linear;
}

.vein-zoom-crosshair::before,
.vein-zoom-crosshair::after {
  content: "";
  position: absolute;
  background: #fffaf4;
}

.vein-zoom-crosshair::before {
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 1px;
  margin-left: -0.5px;
}

.vein-zoom-crosshair::after {
  top: 50%;
  left: -8px;
  right: -8px;
  height: 1px;
  margin-top: -0.5px;
}

.vein-zoom-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.9rem 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.vein-zoom-info strong {
  color: var(--ink);
  font-weight: 800;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.vein-zoom-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-left: auto;
}

.vein-zoom-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}
