.derm-experience { padding-block: var(--section-space); background: var(--white); }
.derm-heading { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.derm-heading h2 { margin-bottom: 22px; }
.derm-heading p { max-width: 620px; margin: 0 auto; color: var(--muted); }
.derm-instrument[hidden] { display: none; }
.derm-instrument:focus { outline: none; }
.derm-instrument:focus-visible .derm-optic { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.derm-color-filter { position: absolute; width: 0; height: 0; overflow: hidden; }
.derm-stage { position: relative; height: clamp(740px, 82vw, 1100px); overflow: hidden; isolation: isolate; background: #e8dfd4; border-radius: 4px; }
.derm-photo { position: absolute; inset: 0; overflow: hidden; background: #c8a18a; }
.derm-photo > img { width: 100%; height: 100%; object-fit: cover; }
.derm-experience[data-ready] .derm-photo > img { position: absolute; max-width: none; object-fit: fill; }
.derm-experience:not([data-ready]) .derm-photo { inset: 0; }
.derm-experience:not([data-ready]) .derm-photo img { object-fit: contain; }
.derm-experience:not([data-ready]) .derm-hint { display: none; }
.derm-light { position: absolute; top: 0; left: 0; z-index: 1; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff9e899 0%, #fff9e855 30%, #fff9e800 70%); mix-blend-mode: soft-light; opacity: .55; transition: opacity .18s; will-change: transform; }
.derm-stage[data-dragging] .derm-light { opacity: .9; }
.derm-experience:not([data-ready]) .derm-light { display: none; }
.derm-instrument { position: absolute; top: 0; left: 0; z-index: 3; height: 168%; aspect-ratio: 503 / 1210; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; pointer-events: none; will-change: transform; }
.derm-instrument.is-dragging { cursor: grabbing; }
.derm-instrument > img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(10px 16px 9px #32241955); }
/* The aperture is measured in the supplied 503 × 1210 PNG, not in the clinical photo. */
.derm-optic { position: absolute; left: 19.5%; top: 8.25%; width: 61%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #34271f; }
.derm-optic::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 18px #fff9e866; background: radial-gradient(ellipse at 30% 20%, #fff9e81f, transparent 65%); }
/* Clockwise orientation matches the hair direction and lesion axis in the clinical view. */
.derm-optic .derm-reveal { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: rotate(60deg); filter: url(#derm-white-balance) brightness(1.06); opacity: 0; }
.derm-optic .derm-reveal { -webkit-mask-image: radial-gradient(circle closest-side, #000 76%, #000e 82%, #0008 92%, #0000 100%); mask-image: radial-gradient(circle closest-side, #000 76%, #000e 82%, #0008 92%, #0000 100%); }
.derm-optic .derm-magnified { position: absolute; top: 0; left: 0; max-width: none; filter: brightness(1.06); }
.derm-callout { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; }
.derm-leader, .derm-tag { position: absolute; left: 66%; top: 39%; }
.derm-leader { height: 1px; background: #fffaf1; box-shadow: 0 0 2px #302219b3; transform-origin: left center; }
.derm-leader::after { content: ''; position: absolute; left: 100%; top: 50%; box-sizing: border-box; width: calc(2 * var(--derm-ring-radius)); height: calc(2 * var(--derm-ring-radius)); border: 1px solid #fffaf1; border-radius: 50%; box-shadow: 0 0 2px #302219b3; transform: translateY(-50%); }
.derm-tag { padding: 4px 8px; border: 1px solid #fffaf1b3; border-radius: 4px; background: #2b221de8; color: #fffaf1; font: 500 clamp(12px, 1vw, 14px)/1.2 var(--sans); white-space: nowrap; transform: translateY(-50%); }
.derm-hit-head { position: absolute; left: 4%; top: 1.5%; width: 92%; aspect-ratio: 1; border-radius: 50%; pointer-events: auto; }
.derm-hit-handle { position: absolute; left: 33%; top: 37%; width: 34%; height: 61%; border-radius: 24%; pointer-events: auto; }
.derm-grab-cue { position: absolute; left: 75%; top: 6%; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #fffaf1b3; border-radius: 50%; background: #fbfaf7; color: var(--ink); box-shadow: 0 4px 14px #27272440; pointer-events: none; }
.derm-hint { position: absolute; left: 24px; top: 24px; z-index: 4; display: flex; align-items: center; gap: 14px; max-width: min(320px, calc(100% - 48px)); margin: 0; padding: 16px 20px; border-radius: 12px; background: #fbfaf7f5; box-shadow: 0 6px 24px #27272426; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--ink); pointer-events: none; }
.derm-hint span { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 26px; }
.derm-stage[data-used] :is(.derm-hint, .derm-grab-cue) { opacity: 0; transition: opacity .18s; }
.derm-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding-top: 23px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.derm-caption p { margin-bottom: 8px; }
.derm-caption a { text-decoration: underline; text-underline-offset: 3px; }
.derm-explanation { max-width: 54ch; }
.derm-credit { grid-column: -2 / -1; font-size: 9px; text-align: right; }
.derm-credit p { margin-left: auto; }
.derm-fallback { margin-top: 20px; }
.derm-fallback img { transform: rotate(60deg) scale(.73); }
@media (max-width: 600px) {
  .derm-experience .wrap { padding-inline: 16px; }
  .derm-heading { padding-inline: 8px; }
  .derm-stage { height: 740px; }
  .derm-instrument { width: min(516px, 132%); max-width: none; height: auto; }
  .derm-hint { left: 16px; top: 16px; max-width: calc(100% - 32px); padding: 12px 16px; font-size: 14px; }
  .derm-caption { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .derm-stage[data-used] :is(.derm-hint, .derm-grab-cue) { transition: none; }
  .derm-light { transition: none; }
}
