.portrait-explorer {
  --portrait-ink: #183c50;
  --portrait-muted: #48626c;
  --portrait-line: #d1dfe3;
  min-width: 0;
  color: var(--portrait-ink);
  scroll-margin-block-start: 80px;
}
.portrait-explorer [hidden] { display: none !important; }
.portrait-explorer :is(button,select,[tabindex]):focus-visible,
.portrait-explorer:focus-visible { outline: 3px solid #32708a; outline-offset: -3px; }
.portrait-explorer button, .portrait-explorer select { cursor: pointer; }
.portrait-explorer button:disabled { cursor: default; }
.portrait-explorer svg { width: 18px; height: 18px; display: block; }
.portrait-figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--portrait-line);
  background: white;
}
.portrait-viewport {
  width: 100%;
  height: clamp(320px, 56svh, 560px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #edf3f3;
  user-select: none;
  -webkit-user-select: none;
}
.portrait-plane {
  position: absolute;
  inset: 0;
  transform: translateY(-10%) scale(1.4);
  transform-origin: center;
  pointer-events: none;
}
.portrait-plane canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  object-fit: contain;
}
.portrait-expand {
  position: absolute;
  z-index: 1;
  inset-inline-end: 12px;
  inset-block-start: 12px;
  background: #fff;
  color: var(--portrait-ink);
  border: 1px solid var(--portrait-line);
  box-shadow: 0 2px 8px #173c501a;
  border-radius: 999px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
}
.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: clamp(14px, 2.4vw, 24px);
}
.portrait-viewport + .portrait-caption { border-block-start: 1px solid var(--portrait-line); }
.portrait-caption-copy { flex: 1 1 260px; min-width: 0; }
.skin-diagnostic .portrait-caption h2 {
  margin: 0 0 4px;
  color: #42636d;
  font: 600 .8rem/1.3 var(--sans);
}
.portrait-current {
  display: block;
  color: var(--portrait-ink);
  font: 650 clamp(1.1rem, 2vw, 1.45rem)/1.2 var(--headline);
}
.portrait-caption .portrait-assessment { margin: 4px 0 0; color: var(--portrait-ink); font: 500 .95rem/1.4 var(--sans); }
.portrait-assessment bdi:not(:empty) { margin-inline-start: .45em; font-weight: 650; font-variant-numeric: tabular-nums; }
.portrait-caption .portrait-map-status { margin: 4px 0 0; color: var(--portrait-muted); font: 400 .9rem/1.4 var(--sans); }
.portrait-tools, .portrait-region { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.portrait-tools:not(:has(> :not([hidden]))) { display: none; }
.portrait-region { font: 600 .85rem/1.3 var(--sans); }
.portrait-tools button, .portrait-region select, .portrait-fullscreen > button {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 14px;
  color: var(--portrait-ink);
  background: white;
  border: 1px solid #b7cbd2;
  border-radius: 999px;
  font: 600 .85rem/1.3 var(--sans);
  cursor: pointer;
}
.portrait-region select { font-size: 1rem; }
.portrait-tools button[data-overlay-toggle][aria-pressed="true"] { background: #edf4f5; }
@media(hover:hover) {
  .portrait-explorer button:not(:disabled):hover, .portrait-region select:hover { background-color: #e4eff2; }
}
@media (max-width: 700px), (max-width: 900px) and (orientation: portrait) {
  .portrait-explorer > .portrait-figure .portrait-viewport {
    height: auto;
    aspect-ratio: var(--portrait-aspect, 3 / 4);
  }
}
@media (min-width: 701px) and (max-width: 900px) and (orientation: portrait) {
  .portrait-explorer > .portrait-figure { max-width: 640px; margin-inline: auto; }
}
@media (max-width: 700px) {
  .portrait-explorer > .portrait-figure:has(.portrait-viewport) {
    margin-inline: calc(0px - var(--gutter));
    border-inline: 0;
    border-radius: 0;
  }
  .portrait-figure > .portrait-caption { padding-inline: var(--gutter); }
  .portrait-caption { align-items: start; }
  .portrait-tools { width: 100%; }
}
.skin-diagnostic .portrait-fullscreen {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
  color: var(--portrait-ink);
  background: #eef3f4;
  border: 0;
}
.portrait-fullscreen[open] { display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-y: auto; overscroll-behavior: contain; }
.portrait-fullscreen::backdrop { background: #173746; }
.portrait-fullscreen > button { align-self: flex-end; flex-shrink: 0; }
.portrait-fullscreen .portrait-figure { width: min(100%, 1120px); display: flex; flex: 1 0 auto; flex-direction: column; }
.portrait-fullscreen .portrait-viewport { flex: 1; min-height: 200px; height: auto; }
.portrait-fullscreen .portrait-expand { display: none; }
[dir="rtl"] :is(.diag-report-back,.diag-back) svg { transform: scaleX(-1); }
