/* Panorama Try-On. Colours come from the theme tokens when present, brand defaults otherwise. */
.ptr-modal, .ptr-trigger {
  --ptr-ink: var(--pn-ink, #171717);
  --ptr-cream: var(--pn-cream, #F6EFE6);
  --ptr-accent: var(--pn-accent, #C75C2C);
  --ptr-accent-strong: var(--pn-accent-strong, #A9491C);
}

/* ---------- trigger button ---------- */
.ptr-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 1.5em; margin: 0 0 1rem;
  border: 1.5px solid var(--ptr-ink); border-radius: 999px;
  background: transparent; color: var(--ptr-ink);
  font: inherit; font-weight: 600; letter-spacing: .01em; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.ptr-trigger svg { width: 1.6em; height: auto; flex: none; }
.ptr-trigger:hover { background: var(--ptr-ink); color: var(--ptr-cream); }
.ptr-trigger:focus-visible { outline: 2px solid var(--ptr-accent); outline-offset: 3px; }
.ptr-trigger--block { width: 100%; }

/* ---------- modal ---------- */
html.ptr-lock { overflow: hidden; }
.ptr-modal[hidden] { display: none !important; }
.ptr-modal {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(23, 23, 23, .72);
  animation: ptr-fade .2s ease-out;
}
.ptr-dialog {
  display: flex; flex-direction: column; width: min(960px, 100%); max-height: 100%;
  background: var(--ptr-cream); color: var(--ptr-ink); border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: ptr-rise .28s cubic-bezier(.2, .8, .2, 1);
}
.ptr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 14px 24px; }
.ptr-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 600; color: var(--ptr-ink); }
.ptr-close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(23, 23, 23, .06); color: var(--ptr-ink); cursor: pointer;
}
.ptr-close:hover { background: rgba(23, 23, 23, .12); }
.ptr-close:focus-visible, .ptr-start:focus-visible, .ptr-swatch:focus-visible, .ptr-pd button:focus-visible { outline: 2px solid var(--ptr-accent); outline-offset: 2px; }

.ptr-wrap { position: relative; flex: 1 1 auto; height: min(62vh, 600px); min-height: 360px; background: #111; overflow: hidden; }
.ptr-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scaleX(-1); }
.ptr-stage video, .ptr-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ptr-stage canvas { pointer-events: none; }

.ptr-intro[hidden] { display: none; }
.ptr-intro {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center; color: var(--ptr-cream);
  background: radial-gradient(120% 90% at 50% 30%, #2a2420 0%, #141211 70%);
}
.ptr-intro-icon { width: 76px; color: var(--ptr-accent); margin-bottom: 6px; }
.ptr-intro-title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.2; color: #fff; }
.ptr-intro-text { margin: 0 0 12px; max-width: 34ch; font-size: 15px; line-height: 1.5; opacity: .75; }
.ptr-start {
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--ptr-accent-strong); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, background-color .2s ease;
}
.ptr-start:hover { background: var(--ptr-accent); }
.ptr-start:active { transform: scale(.97); }

.ptr-status {
  position: absolute; top: 16px; left: 50%; z-index: 6; transform: translateX(-50%);
  max-width: calc(100% - 32px); margin: 0; padding: 9px 16px; border-radius: 999px;
  background: rgba(20, 18, 17, .72); color: #fff; font-size: 14px; line-height: 1.4; text-align: center;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ptr-status.is-visible { opacity: 1; }
.ptr-status.is-error { background: #7a2614; border-radius: 14px; }
.ptr-intro:not([hidden]) ~ .ptr-status.is-error { top: auto; bottom: 16px; }

.ptr-pd[hidden] { display: none; }
.ptr-pd {
  position: absolute; bottom: 14px; left: 50%; z-index: 6; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; width: 290px; max-width: calc(100% - 24px); box-sizing: border-box;
  padding: 6px 10px 6px 16px; border-radius: 999px;
  background: rgba(20, 18, 17, .55); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: 12px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); user-select: none;
}
.ptr-pd-label { flex: none; white-space: nowrap; opacity: .9; }
.ptr-pd-label b { display: inline-block; min-width: 3.6ch; text-align: right; font-variant-numeric: tabular-nums; }
.ptr-pd-step {
  flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.ptr-pd input[type=range] { flex: 1 1 auto; min-width: 0; accent-color: var(--ptr-accent); }

.ptr-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 24px 18px; }
.ptr-swatches[hidden] { display: none; }
.ptr-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.ptr-swatch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px;
  border: 1.5px solid rgba(23, 23, 23, .15); border-radius: 999px; background: #fff; color: var(--ptr-ink);
  font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s ease;
}
.ptr-swatch img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--ptr-cream); }
.ptr-swatch:not(:has(img)) { padding-left: 14px; }
.ptr-swatch[aria-checked="true"] { border-color: var(--ptr-ink); box-shadow: inset 0 0 0 1px var(--ptr-ink); }
.ptr-hint { margin: 0; font-size: 13px; color: rgba(23, 23, 23, .65); }

.ptr-debug {
  position: absolute; top: 60px; left: 12px; z-index: 7; width: 240px; max-height: calc(100% - 80px); overflow: auto;
  padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, .82); color: #fff; font: 12px/1.4 monospace;
}
.ptr-debug label { display: block; margin-top: 6px; }
.ptr-debug input[type=range], .ptr-debug textarea { width: 100%; }

@media (max-width: 640px) {
  .ptr-modal { padding: 0; }
  .ptr-dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .ptr-head { padding: max(12px, env(safe-area-inset-top)) 12px 10px 16px; }
  .ptr-title { font-size: 17px; }
  .ptr-wrap { height: auto; min-height: 0; }
  .ptr-foot { padding: 12px 16px max(14px, env(safe-area-inset-bottom)); }
  .ptr-hint { display: none; }
  .ptr-swatches { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
}

@keyframes ptr-fade { from { opacity: 0; } }
@keyframes ptr-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .ptr-modal, .ptr-dialog { animation: none; }
}

/* =========================================================
   Face shape test
   ========================================================= */
.pnfs, .pnfs-modal { --pnfs-ink: var(--pn-ink, #171717); --pnfs-cream: var(--pn-cream, #F6EFE6); --pnfs-accent: var(--pn-accent, #C75C2C); --pnfs-accent-strong: var(--pn-accent-strong, #A9491C); }
.pnfs-wrap { display: grid; place-items: center; }
.pnfs-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.pnfs-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pnfs-guide ellipse { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: .6; stroke-dasharray: 2 1.5; vector-effect: non-scaling-stroke; }
.pnfs-guide .pnfs-guide__ring { stroke: var(--pnfs-accent); stroke-width: 4; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .2s linear; }
.pnfs-done { position: absolute; inset: 0; z-index: 8; overflow: auto; padding: clamp(24px, 5vw, 48px); background: var(--pnfs-cream); color: var(--pnfs-ink); }
.pnfs-done[hidden] { display: none; }

.pnfs-res__kicker { margin: 0; font-size: .9rem; color: var(--pnfs-accent-strong); font-weight: 600; }
.pnfs-res__name { margin: 0 0 8px; font-family: var(--pn-font-display, inherit); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.pnfs-res__desc { margin: 0 0 18px; max-width: 46ch; color: color-mix(in oklab, var(--pnfs-ink) 72%, var(--pnfs-cream)); }
.pnfs-res__label { margin: 0 0 8px; font-weight: 600; font-size: .9rem; }
.pnfs-res__frames { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.pnfs-res__frames li { padding: 8px 14px; border-radius: 999px; background: var(--pnfs-ink); color: var(--pnfs-cream); font-size: .9rem; font-weight: 600; }
.pnfs-res__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pnfs-res__cta { display: inline-flex; align-items: center; min-height: 50px; padding: 0 22px; border-radius: 999px; background: var(--pnfs-accent-strong); color: #fff !important; font-weight: 600; text-decoration: none; }
.pnfs-res__cta:hover { background: var(--pnfs-ink); }
.pnfs-res__again { min-height: 50px; padding: 0 18px; border: 1.5px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
