/* Components: controls, flow screens and the result experience. */

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--graphite); }
.btn--ghost { border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--link {
  min-height: 44px;
  padding: 0 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.btn--light { background: var(--paper); color: var(--ink); }
.btn--outline-light { border-color: rgba(250, 247, 242, 0.4); color: var(--paper); cursor: pointer; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--wide { width: 100%; }
.btn--round {
  width: 52px; min-height: 52px; padding: 0;
  border-radius: 50%;
  border-color: rgba(250, 247, 242, 0.4);
  color: var(--paper);
}

.stack-actions { display: grid; gap: 10px; }

.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: auto calc(var(--gutter) * -1) 0;
  padding: 14px var(--gutter) calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--paper) 30%);
}
.bottom-bar .btn--primary { flex: 1; max-width: 320px; margin-left: auto; }
.bottom-bar--stack { flex-direction: column; align-items: stretch; }
.bottom-bar--stack .btn--primary { max-width: none; margin: 0; }

/* Onboarding ------------------------------------------------------------- */

.ob {
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}
.ob__progress { height: 2px; background: var(--line); margin: 0 calc(var(--gutter) * -1); }
.ob__progress span { display: block; height: 100%; width: 25%; background: var(--ink); transition: width 0.5s var(--ease); }
.ob__step { padding: 34px 0 24px; animation: screen-in 0.45s var(--ease) both; }
.ob__step[hidden] { display: none; }
.ob__count { font-variant-numeric: tabular-nums; }
.ob__title { margin-top: 12px; font-size: clamp(2.3rem, 10vw, 3.4rem); max-width: 14ch; }
.ob__hint { margin-top: 12px; color: var(--stone); }
.ob__why {
  display: flex; gap: 10px;
  margin-top: 24px; padding: 14px 16px;
  background: var(--ivory);
  font-size: 0.86rem; color: var(--graphite);
}
.ob__why .icon { margin-top: 2px; }

.choices { margin-top: 28px; display: grid; gap: 10px; }
.choices--grid { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 2px;
  min-height: 72px;
  padding: 14px 18px;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.choice__title { font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; }
.choice__hint { font-size: 0.84rem; color: var(--stone); }
.choice[aria-checked='true'], .choice[aria-pressed='true'] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.choice[aria-checked='true'] .choice__hint, .choice[aria-pressed='true'] .choice__hint { color: var(--stone-light); }

.chips { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.95rem;
}
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.examples { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.example svg { width: 100%; height: auto; aspect-ratio: 120 / 150; }
.example figcaption {
  margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--warn);
}
.example--ok figcaption { color: var(--ok); }
.example .icon { width: 14px; height: 14px; }
.example--warm svg { filter: sepia(0.6) saturate(2.2) hue-rotate(-12deg) brightness(1.02); }
.example--back svg { --p-bg: #FFFFFF; --p-skin: #6B5247; --p-hair: #241B17; --p-cloth: #3E4643; }
.example--filter svg { filter: saturate(2.6) hue-rotate(-20deg) contrast(1.2) brightness(1.08); }

.checklist {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 0.88rem;
}
.checklist li { display: flex; gap: 8px; align-items: baseline; }
.checklist li::before { content: '✓'; color: var(--ok); font-weight: 700; }

/* Capture ---------------------------------------------------------------- */

.capture {
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) calc(18px + var(--safe-bottom));
}
.capture__stage {
  position: relative;
  flex: 1;
  min-height: 52vh;
  margin: 0 calc(var(--gutter) * -1);
  overflow: hidden;
  background: #0E0D0C;
}
.capture__stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}
.capture__stage.is-live video { opacity: 1; }
.capture__stage video.is-mirrored { transform: scaleX(-1); }
.capture__guide {
  position: absolute; inset: 6% 8%;
  color: rgba(250, 247, 242, 0.55);
  transition: color 0.3s;
  pointer-events: none;
}
.capture__guide svg { width: 100%; height: 100%; }
.capture__stage.is-aligned .capture__guide { color: #CFE3C9; }
.capture__stage:not(.is-live) .capture__guide { color: rgba(250, 247, 242, 0.2); }
.capture__checks {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  font-size: 0.74rem;
}
.capture__stage:not(.is-live) .capture__checks { display: none; }
.capture__checks li {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 19, 18, 0.72);
  color: var(--stone-light);
}
.capture__checks li::before { content: '○ '; }
.capture__checks li.is-ok { color: var(--paper); }
.capture__checks li.is-ok::before { content: '✓ '; color: #A9D8A0; }
.capture__idle {
  position: absolute; inset: auto 0 18%;
  text-align: center;
  padding: 0 var(--gutter);
}
.capture__stage.is-live .capture__idle { display: none; }
.capture__idle-title { font-size: 2.4rem; }
.capture__idle-text { margin-top: 8px; color: var(--stone-light); font-size: 0.92rem; }
.capture__controls {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 18px;
}
.capture__controls.is-live { flex-direction: row; justify-content: space-between; }
.capture__controls.is-live #btn-open-camera { display: none; }
.capture__controls.is-live label { width: auto; padding: 0 16px; }
.shutter {
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 3px solid var(--paper);
  background: transparent;
  padding: 5px;
  position: relative;
}
.shutter::after {
  content: ''; position: absolute; inset: 5px;
  border-radius: 50%; background: var(--paper);
  transition: transform 0.15s;
}
.shutter:active::after { transform: scale(0.9); }
.capture__note { margin-top: 12px; text-align: center; font-size: 0.75rem; color: var(--stone-light); }

/* Quality check ------------------------------------------------------------ */

.check {
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
  display: flex; flex-direction: column;
  padding: 0 var(--gutter);
}
.check__photo {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
  background: var(--ivory);
  max-height: 46vh;
  display: grid; place-items: center;
  overflow: hidden;
}
.check__photo canvas { max-height: 46vh; width: auto; }
.check__scan {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(250, 247, 242, 0.5) 50%, transparent 100%);
  background-size: 100% 40%;
  background-repeat: no-repeat;
  animation: scan 1.6s ease-in-out infinite;
}
.check__scan.is-done { display: none; }
@keyframes scan { from { background-position: 0 -40%; } to { background-position: 0 140%; } }
.check__body { padding: 26px 0 8px; }
.check__title { margin-top: 10px; font-size: clamp(2rem, 9vw, 2.8rem); }
.check__lede { margin-top: 10px; color: var(--graphite); }
.issues { margin-top: 18px; display: grid; gap: 10px; }
.issue {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.issue .icon { color: var(--warn); margin-top: 2px; }
.issue__title { font-weight: 600; }
.issue__fix { font-size: 0.88rem; color: var(--stone); margin-top: 2px; }
.ready { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--ok); font-weight: 600; }

/* Calibration ------------------------------------------------------------ */

.calibrate { display: flex; flex-direction: column; min-height: calc(100dvh - var(--topbar) - var(--safe-top)); padding: 0 var(--gutter); }
.calibrate__head { padding: 24px 0 16px; }
.calibrate__title { margin-top: 8px; font-size: clamp(2rem, 9vw, 2.8rem); }
.calibrate__text { margin-top: 8px; color: var(--graphite); }
.calibrate__stage {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
  background: var(--ivory);
  display: grid; place-items: center;
}
.calibrate__stage canvas { max-height: 52vh; width: auto; cursor: crosshair; touch-action: manipulation; }
.calibrate__marker {
  position: absolute;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: pop 0.3s var(--ease);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.calibrate__status { min-height: 48px; padding: 14px 0 0; font-size: 0.92rem; }
.calibrate__status.is-ok { color: var(--ok); font-weight: 600; }
.calibrate__status.is-warn { color: var(--warn); }

/* Analyzing -------------------------------------------------------------- */

.analyzing {
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px var(--gutter) calc(32px + var(--safe-bottom));
}
.analyzing__orb {
  width: 132px; height: 132px;
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 36px;
  animation: orb 6s linear infinite;
}
.analyzing__orb span { background: var(--c, var(--stone-light)); transition: background 0.8s var(--ease); }
@keyframes orb { to { transform: rotate(360deg); } }
.analyzing__title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
.analyzing__steps { margin-top: 28px; display: grid; gap: 2px; counter-reset: step; }
.analyzing__steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 34px 1fr 22px; align-items: center;
  min-height: 40px;
  color: var(--stone-light);
  transition: color 0.3s;
}
.analyzing__steps li::before { content: counter(step, decimal-leading-zero); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.analyzing__steps li.is-active { color: var(--ink); }
.analyzing__steps li.is-active::after {
  content: ''; width: 14px; height: 14px;
  border: 1.5px solid var(--line-strong); border-top-color: var(--ink);
  border-radius: 50%; animation: orb 0.8s linear infinite;
}
.analyzing__steps li.is-done { color: var(--graphite); }
.analyzing__steps li.is-done::after { content: '✓'; color: var(--ok); font-weight: 700; }

/* Error ------------------------------------------------------------------ */

.error { padding: 48px var(--gutter) calc(32px + var(--safe-bottom)); max-width: 560px; }
.error .icon--xl { color: var(--warn); }
.error__title { margin-top: 20px; font-size: clamp(2rem, 9vw, 2.8rem); }
.error__text { margin-top: 12px; color: var(--graphite); }
.error__causes { margin: 18px 0 28px; display: grid; gap: 8px; }
.error__causes li { padding-left: 18px; position: relative; color: var(--graphite); }
.error__causes li::before { content: '—'; position: absolute; left: 0; color: var(--stone); }

/* Result: tabs ----------------------------------------------------------- */

.tabs {
  position: sticky;
  top: calc(var(--topbar) + var(--safe-top));
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs__track {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 calc(var(--gutter) - 10px);
}
.tabs__track::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: none;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--stone);
  position: relative;
}
.tab[aria-selected='true'] { color: var(--ink); font-weight: 700; }
.tab[aria-selected='true']::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px; background: var(--accent);
}

.panel { animation: screen-in 0.45s var(--ease) both; padding-bottom: calc(48px + var(--safe-bottom)); }
.panel[hidden] { display: none; }

.block { padding: 48px var(--gutter) 0; }
.block + .block { margin-top: 8px; }
.block__title { font-size: clamp(1.9rem, 8vw, 2.8rem); margin-top: 8px; }
.block__lede { margin-top: 10px; color: var(--graphite); max-width: 52ch; }
.rule { height: 1px; background: var(--line); margin: 48px var(--gutter) 0; }

/* Result: hero ----------------------------------------------------------- */

.r-hero {
  padding: 40px var(--gutter) 0;
  position: relative;
}
.r-hero__season {
  font-size: clamp(3.4rem, 16vw, 7.4rem);
  margin-top: 10px;
  line-height: 0.95;
}
.r-hero__traits {
  margin-top: 14px;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.r-hero__essence { margin-top: 14px; font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--graphite); max-width: 32ch; line-height: 1.3; }

.band {
  display: flex;
  height: 132px;
  margin: 30px calc(var(--gutter) * -1) 0;
}
.band span {
  flex: 1;
  background: var(--c);
  transform-origin: bottom;
  animation: band-in 0.7s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes band-in { from { transform: scaleY(0); } }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--white);
}
.badge b { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.74rem; }
.badge--button { cursor: pointer; }
.level { display: inline-flex; gap: 3px; }
.level i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.level i.on { background: var(--ink); }

.borderline {
  margin-top: 20px;
  padding: 18px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
}
.borderline__title { font-weight: 700; font-size: 0.9rem; }
.borderline__seasons { font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; margin-top: 4px; }
.borderline__text { margin-top: 6px; font-size: 0.9rem; color: var(--graphite); }

/* Natural colors --------------------------------------------------------- */

.natural { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.natural__item { text-align: left; }
.natural__dot { aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.natural__label { margin-top: 8px; font-size: 0.78rem; font-weight: 600; }
.natural__hex { font-size: 0.7rem; color: var(--stone); font-variant-numeric: tabular-nums; }

/* Formula & five things -------------------------------------------------- */

.formula {
  margin: 26px 0 0;
  border-top: 1px solid var(--ink);
}
.formula div {
  display: grid; grid-template-columns: 112px 1fr; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.formula dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); padding-top: 4px; }
.formula dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }

.five { margin-top: 26px; display: grid; gap: 0; }
.five li {
  display: grid; grid-template-columns: 58px 1fr; gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.five__n { font-family: var(--serif); font-size: 2.4rem; line-height: 0.9; color: var(--accent); }
.five__t { font-size: 1.02rem; align-self: center; }

.confidence {
  margin-top: 22px;
  padding: 20px;
  background: var(--ivory);
}
.confidence__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.confidence__title { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem; }
.confidence__text { margin-top: 8px; color: var(--graphite); }
.confidence__notes { margin-top: 12px; display: grid; gap: 6px; font-size: 0.88rem; color: var(--stone); }
.confidence__notes li::before { content: '· '; }
.confidence__tip { margin-top: 12px; font-size: 0.9rem; font-weight: 600; }

.compare { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.compare__col { background: var(--paper); padding: 16px; }
.compare__label { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.compare__season { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; margin-top: 6px; }
.compare__date { font-size: 0.78rem; color: var(--stone); margin-top: 4px; }
.compare__verdict { grid-column: span 2; background: var(--paper); padding: 14px 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.compare__verdict.is-ok { color: var(--ok); }

.explore { margin-top: 26px; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.explore button {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 64px; padding: 0 2px;
  border: 0; background: var(--paper); text-align: left;
  font-family: var(--serif); font-size: 1.5rem;
}

/* Dimensions ------------------------------------------------------------- */

.dims { margin-top: 26px; display: grid; gap: 0; }
.dim {
  display: block; width: 100%;
  padding: 18px 0;
  border: 0; border-top: 1px solid var(--line);
  background: none; text-align: left;
}
.dim > span { display: block; }
.dim > .dim__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dim__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.dim__value { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.dim__scale { display: block; position: relative; height: 10px; margin-top: 12px; background: var(--g); }
.dim__marker {
  display: block;
  position: absolute; top: -5px;
  width: 4px; height: 20px;
  margin-left: -2px;
  background: var(--ink);
  left: var(--x);
  transition: left 0.8s var(--ease);
}
.dim > .dim__ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--stone); }
.dim > .dim__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 0.78rem; color: var(--stone); }

.contrast-ramp { position: relative; height: 54px; margin-top: 16px; background: linear-gradient(90deg, #141414, #FAFAFA); }
.contrast-ramp span {
  display: block;
  position: absolute; top: 50%;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  left: var(--x);
}
.dim > .contrast-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 0.76rem; color: var(--stone); flex-wrap: wrap; }
.contrast-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: -1px; }

.reasoning { margin-top: 22px; font-family: var(--serif); font-size: 1.4rem; line-height: 1.35; max-width: 34ch; }

/* Palette ---------------------------------------------------------------- */

.group-label { margin-top: 32px; display: flex; justify-content: space-between; align-items: baseline; }
.group-label h3 { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.group-label span { font-size: 0.78rem; color: var(--stone); }

.swatches { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.swatch {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 1 / 1.08;
  padding: 14px;
  border: 0;
  background: var(--c);
  color: var(--ink-on);
  text-align: left;
  animation: swatch-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform 0.25s var(--ease);
}
.swatch:hover { transform: translateY(-2px); }
.swatch:active { transform: scale(0.98); }
@keyframes swatch-in { from { opacity: 0; transform: translateY(8px); } }
.swatch__name { font-family: var(--serif); font-size: 1.35rem; line-height: 1.05; }
.swatch__hex { font-size: 0.72rem; letter-spacing: 0.06em; opacity: 0.8; margin-top: 4px; font-variant-numeric: tabular-nums; }
.swatch__cat { position: absolute; top: 12px; left: 14px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.swatches--small { grid-template-columns: repeat(3, 1fr); }
.swatches--small .swatch { aspect-ratio: 1 / 1.15; padding: 10px; }
.swatches--small .swatch__name { font-size: 1.1rem; }

.neutrals { margin-top: 22px; display: grid; gap: 0; }
.neutral {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center;
  width: 100%;
  padding: 10px 0;
  border: 0; border-top: 1px solid var(--line);
  background: none; text-align: left;
}
.neutral__chip { height: 72px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.neutral__role { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.neutral__name { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; }
.neutral__hex { font-size: 0.74rem; color: var(--stone); font-variant-numeric: tabular-nums; }

.less { margin-top: 22px; display: grid; gap: 0; }
.less__item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.less__chip { position: relative; height: 64px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); overflow: hidden; }
.less__chip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(250, 247, 242, 0.9) 50%, transparent calc(50% + 1px)); }
.less__name { font-family: var(--serif); font-size: 1.4rem; line-height: 1.1; }
.less__why { font-size: 0.9rem; color: var(--graphite); margin-top: 4px; }
.less__tip { font-size: 0.86rem; color: var(--stone); margin-top: 6px; }
.less__tip b { color: var(--ink); font-weight: 600; }

/* Mini swatch list (hair, makeup) */
.minis { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 14px; }
.mini { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.mini i { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); flex: none; }
.mini small { display: block; color: var(--stone); font-size: 0.72rem; }

/* Recommendation lists --------------------------------------------------- */

.rec { margin-top: 26px; display: grid; gap: 0; }
.rec__row { padding: 18px 0; border-top: 1px solid var(--line); }
.rec__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.rec__text { margin-top: 6px; font-size: 1rem; color: var(--graphite); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--white);
}
.tag svg { width: 30px; height: 20px; }
.tag--avoid { border-style: dashed; color: var(--stone); }

/* Face ------------------------------------------------------------------- */

.face { display: grid; gap: 24px; margin-top: 22px; }
.face__diagram { background: var(--ivory); padding: 22px; display: grid; place-items: center; }
.face__diagram svg { width: min(300px, 100%); height: auto; overflow: visible; }
.face__diagram .contour { fill: var(--accent-soft); stroke: var(--ink); stroke-width: 1.3; }
.face__diagram .measure { stroke: var(--accent); stroke-width: 1.2; }
.face__diagram .measure-v { stroke: var(--ink); stroke-dasharray: 3 4; stroke-width: 1; }
.face__diagram text { font-family: var(--sans); font-size: 9px; fill: var(--stone); letter-spacing: 0.08em; text-transform: uppercase; }
.props { display: grid; gap: 0; }
.props div { display: grid; grid-template-columns: 116px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.props dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); padding-top: 2px; }
.props dd { margin: 0; }

/* Metals ----------------------------------------------------------------- */

.metals { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.metal { padding: 16px; background: var(--white); border: 1px solid var(--line); }
.metal__swatch { height: 64px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 60%, #000)); }
.metal__name { margin-top: 12px; font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.metal__aff { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.metal__why { margin-top: 8px; font-size: 0.84rem; color: var(--stone); }
.metal.is-low { opacity: 0.72; }

/* Style ------------------------------------------------------------------ */

.style-words { margin-top: 18px; font-family: var(--serif); font-size: clamp(2.4rem, 11vw, 4rem); line-height: 1; }
.style-words span { display: block; }
.style-words span:nth-child(2) { font-style: italic; padding-left: 0.6em; }
.style-words span:nth-child(3) { padding-left: 1.2em; }

/* Guide card ------------------------------------------------------------- */

.guide-card {
  margin-top: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px 20px;
}
.guide-card__brand { font-size: 0.7rem; letter-spacing: 0.4em; font-weight: 700; }
.guide-card__season { font-family: var(--serif); font-size: 2.2rem; line-height: 1; margin-top: 10px; }
.guide-card__traits { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin-top: 6px; }
.guide-card__section { margin-top: 20px; }
.guide-card__label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin-bottom: 8px; }
.guide-card__chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.guide-card__chips span { aspect-ratio: 1; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.guide-card__chips--avoid span { position: relative; overflow: hidden; }
.guide-card__chips--avoid span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(250, 247, 242, 0.9) 50%, transparent calc(50% + 1px)); }
.guide-card__text { font-size: 0.95rem; }

.actions-row { display: grid; gap: 10px; margin-top: 22px; }

/* Sheet ------------------------------------------------------------------ */

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.sheet::backdrop { background: rgba(20, 19, 18, 0.5); }
.sheet[open] { animation: sheet-in 0.4s var(--ease); }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet__inner { max-height: 92dvh; overflow-y: auto; padding-bottom: calc(24px + var(--safe-bottom)); overscroll-behavior: contain; }
.sheet__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(250, 247, 242, 0.85);
  color: var(--ink);
}
.sheet__pad { padding: 24px var(--gutter) 0; }
.sheet__hero {
  min-height: 220px;
  padding: 24px var(--gutter);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--c);
  color: var(--ink-on);
}
.sheet__name { font-family: var(--serif); font-size: 3rem; line-height: 1; }
.sheet__meta { margin-top: 6px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.sheet__title { font-size: 2.2rem; margin-top: 8px; }
.sheet__text { margin-top: 10px; color: var(--graphite); }

.tryon { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tryon figure { background: var(--c); padding: 16% 16% 0; display: flex; flex-direction: column; }
.tryon img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50% 50% 0 0; }
.tryon figcaption { background: var(--paper); padding: 8px 0 0; font-size: 0.76rem; font-weight: 600; margin: 0 -16%; text-align: center; }
.tryon-note { margin-top: 8px; font-size: 0.78rem; color: var(--stone); }

/* Toast ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%; bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  background: var(--ink); color: var(--paper);
  font-size: 0.9rem;
  border-radius: var(--radius);
  animation: screen-in 0.3s var(--ease);
}
