/* ── Find my size (size-finder.js) ─────────────────────────────────────
   One modal for every mode: a bottom sheet on phones, centred from 640px.
   Colours and type follow the product page tokens, with fallbacks so the
   sheet looks the same on a page that doesn't define them. */

.sf-overlay, .sf-inline, .sf-try {
  --sf-bg: #141414;
  --sf-bg-deep: #0D0D0C;
  --sf-gold: var(--gold, #C9A84C);
  --sf-gold-light: var(--gold-light, #E2CE92);
  --sf-gold-grad: var(--gold-gradient, linear-gradient(135deg, #F2EAD0 0%, #C9A84C 30%, #8B6C14 60%, #C9A84C 78%, #E2CE92 100%));
  --sf-text: var(--text-primary, #EDE8DC);
  --sf-text-2: var(--text-secondary, #AFA898);
  --sf-line: rgba(201, 168, 76, 0.22);
  --sf-line-strong: rgba(201, 168, 76, 0.5);
  --sf-heading: 'Cinzel', serif;
  --sf-body: 'Cormorant Garamond', Georgia, serif;
}
.sf-overlay {
  position: fixed; inset: 0; z-index: 10050; /* above the cookie banner (10000) */
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0; transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.sf-overlay[hidden] { display: none; }
.sf-overlay.is-open { opacity: 1; }
html.sf-lock, html.sf-lock body { overflow: hidden; }

.sf-sheet {
  position: relative; width: 100%;
  max-height: 94vh; max-height: calc(100dvh - 16px);
  display: flex; flex-direction: column;
  background: var(--sf-bg); color: var(--sf-text);
  font-family: var(--sf-body); line-height: 1.5;
  border: 1px solid var(--sf-line); border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}
.sf-overlay.is-open .sf-sheet { transform: none; }

@media (min-width: 640px) {
  .sf-overlay { align-items: center; padding: 24px; }
  .sf-sheet {
    width: min(560px, 100%); max-height: min(880px, calc(100vh - 48px));
    border-bottom: 1px solid var(--sf-line); border-radius: 14px;
    transform: translateY(14px) scale(0.985); opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }
  .sf-overlay.is-open .sf-sheet { transform: none; opacity: 1; }
  .sf-grab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-overlay, .sf-sheet { transition: none; }
}

.sf-overlay *, .sf-overlay *::before, .sf-overlay *::after,
.sf-inline *, .sf-inline *::before, .sf-inline *::after,
.sf-try *, .sf-try *::before, .sf-try *::after { box-sizing: border-box; }
/* :where() keeps this reset weaker than any class below it. */
:where(.sf-overlay, .sf-inline, .sf-try) button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.sf-overlay :focus-visible, .sf-inline :focus-visible, .sf-try :focus-visible { outline: 2px solid var(--sf-gold-light); outline-offset: 2px; }
/* Headings and notes take focus only so screen readers start there. */
.sf-overlay [tabindex="-1"]:focus, .sf-inline [tabindex="-1"]:focus { outline: none; }

/* Inline on a page (the size guide): no sheet motion, the page scrolls, and
   the buttons stay in reach at the bottom of the screen. */
.sf-inline .sf-sheet {
  width: 100%; max-width: 640px; max-height: none; margin: 0 auto;
  transform: none; opacity: 1; transition: none;
  border-bottom: 1px solid var(--sf-line); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.sf-inline .sf-head { padding-top: 10px; }
.sf-inline .sf-body { overflow: visible; }
.sf-inline .sf-foot { position: sticky; bottom: 0; z-index: 2; border-radius: 0 0 14px 14px; }

.sf-vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Head: title, close, step and units ─────────────────────────────── */
.sf-head { flex-shrink: 0; padding: 8px 20px 0; }
.sf-grab { width: 38px; height: 4px; border-radius: 2px; background: rgba(201, 168, 76, 0.35); margin: 0 auto 4px; }
.sf-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.sf-title {
  margin: 0; font-family: var(--sf-heading); font-size: 12px; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--sf-gold);
}
.sf-close {
  width: 44px; height: 44px; margin-right: -12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--sf-text-2) !important;
  transition: color 0.2s ease;
}
.sf-close:hover { color: var(--sf-gold-light) !important; }
.sf-close svg { width: 18px; height: 18px; }

.sf-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.sf-step {
  margin: 0; font-family: var(--sf-heading); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--sf-text-2);
}
.sf-bar { height: 2px; margin-top: 10px; background: rgba(201, 168, 76, 0.14); border-radius: 1px; overflow: hidden; }
.sf-bar span { display: block; height: 100%; width: 33.34%; background: var(--sf-gold-grad); transition: width 0.3s ease; }

/* mm / in */
.sf-units { display: inline-flex; margin: 0; padding: 0; border: 1px solid var(--sf-line-strong); border-radius: 999px; }
.sf-units label { position: relative; cursor: pointer; }
.sf-units input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sf-units span {
  display: flex; align-items: center; justify-content: center; min-width: 48px; height: 32px; padding: 0 12px;
  border-radius: 999px; font-family: var(--sf-heading); font-size: 11px; letter-spacing: 0.12em;
  color: var(--sf-text-2); transition: background 0.2s ease, color 0.2s ease;
}
.sf-units input:checked + span { background: rgba(201, 168, 76, 0.16); color: var(--sf-gold-light); }
.sf-units input:focus-visible + span { outline: 2px solid var(--sf-gold-light); outline-offset: 1px; }

/* ── Body and foot ──────────────────────────────────────────────────── */
.sf-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 20px 20px 24px; position: relative;
}
.sf-foot {
  flex-shrink: 0; display: flex; gap: 10px; align-items: stretch;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sf-line); background: var(--sf-bg);
}
.sf-foot:empty { display: none; }
.sf-foot .sf-btn { flex: 1 1 auto; }
.sf-foot .sf-btn-ghost { flex: 0 0 auto; }

.sf-h {
  margin: 0 0 16px; font-family: var(--sf-heading); font-size: 16px; font-weight: 600;
  letter-spacing: 0.06em; line-height: 1.35; color: var(--sf-text); outline: none;
}
.sf-p { margin: 0 0 14px; font-size: 18px; color: var(--sf-text-2); }
.sf-p strong { color: var(--sf-text); font-weight: 600; }
.sf-q { margin: 0 0 10px; font-size: 19px; font-weight: 500; color: var(--sf-text); line-height: 1.35; }
.sf-hint { margin: 8px 0 0; font-size: 16px; color: var(--sf-text-2); }
.sf-note {
  margin: 18px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--sf-line-strong);
  font-size: 16px; font-style: italic; color: var(--sf-text-2);
}
.sf-warn {
  margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--sf-line);
  background: rgba(201, 168, 76, 0.06); font-size: 16px; color: var(--sf-text);
}
.sf-err { margin: 8px 0 0; font-size: 16px; color: #F0A878; }
.sf-err:empty { display: none; }
.sf-group { margin-bottom: 22px; }

/* Buttons */
.sf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 8px 20px; text-align: center; text-decoration: none;
  font-family: var(--sf-heading); font-size: 11px; font-weight: 700; line-height: 1.3;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--sf-gold-grad); color: #080808 !important;
  transition: opacity 0.2s ease; touch-action: manipulation;
}
.sf-btn:hover { opacity: 0.88; }
.sf-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.sf-btn-ghost {
  background: transparent; color: var(--sf-gold-light) !important;
  border: 1px solid var(--sf-line-strong) !important; font-weight: 600;
}
.sf-btn-ghost:hover { opacity: 1; border-color: var(--sf-gold) !important; }
.sf-link {
  display: inline-block; padding: 10px 0; font-family: var(--sf-body); font-size: 17px;
  color: var(--sf-gold) !important; text-decoration: underline; text-underline-offset: 3px;
}
.sf-link:hover { color: var(--sf-gold-light) !important; }

/* Method cards (radio) */
.sf-opts { display: grid; gap: 10px; }
.sf-opt { position: relative; display: block; cursor: pointer; }
.sf-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sf-opt-box {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px;
  border: 1px solid var(--sf-line); background: var(--sf-bg-deep);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sf-opt:hover .sf-opt-box { border-color: var(--sf-line-strong); }
.sf-opt input:checked + .sf-opt-box { border-color: var(--sf-gold); background: rgba(201, 168, 76, 0.08); }
.sf-opt input:focus-visible + .sf-opt-box { outline: 2px solid var(--sf-gold-light); outline-offset: 2px; }
.sf-dot {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--sf-line-strong);
  display: flex; align-items: center; justify-content: center;
}
.sf-opt input:checked + .sf-opt-box .sf-dot { border-color: var(--sf-gold); }
.sf-opt input:checked + .sf-opt-box .sf-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sf-gold); }
.sf-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sf-opt-title { font-family: var(--sf-heading); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sf-text); }
.sf-opt-desc { font-size: 16px; line-height: 1.3; color: var(--sf-text-2); }

/* Pills: Yes / No, Snug / Comfortable */
.sf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-pill { position: relative; cursor: pointer; flex: 1 1 0; min-width: 88px; }
.sf-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sf-pill span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 12px;
  border: 1px solid var(--sf-line); background: var(--sf-bg-deep); text-align: center;
  font-family: var(--sf-heading); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sf-text-2); transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.sf-pill:hover span { border-color: var(--sf-line-strong); }
.sf-pill input:checked + span { border-color: var(--sf-gold); color: var(--sf-gold-light); background: rgba(201, 168, 76, 0.1); }
.sf-pill span { flex-direction: column; gap: 2px; }
.sf-pill-sub { font-family: var(--sf-body); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--sf-text-2); }
.sf-pill input:focus-visible + span { outline: 2px solid var(--sf-gold-light); outline-offset: 2px; }

/* Fields */
.sf-panel { margin-top: 18px; }
.sf-panel:empty { display: none; }
.sf-field { margin-bottom: 4px; }
.sf-label {
  display: block; margin-bottom: 8px; font-family: var(--sf-heading); font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--sf-text-2);
}
.sf-input-wrap { position: relative; }
.sf-input, .sf-select {
  width: 100%; min-height: 52px; padding: 10px 56px 10px 14px; border-radius: 0;
  border: 1px solid var(--sf-line-strong); background: var(--sf-bg-deep); color: var(--sf-text);
  font-family: var(--sf-body); font-size: 22px; line-height: 1.2;  /* 16px+ keeps iOS from zooming */
  -webkit-appearance: none; appearance: none;
}
.sf-input:focus, .sf-select:focus { border-color: var(--sf-gold); outline: none; box-shadow: 0 0 0 1px var(--sf-gold); }
.sf-input[aria-invalid="true"] { border-color: #F0A878; }
.sf-suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-family: var(--sf-heading); font-size: 12px; letter-spacing: 0.12em; color: var(--sf-text-2);
}
.sf-select { padding-right: 44px; cursor: pointer; }
.sf-select-wrap::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px; pointer-events: none;
  border-right: 1.5px solid var(--sf-gold); border-bottom: 1.5px solid var(--sf-gold); transform: rotate(45deg);
}
.sf-select option { background: #141414; color: #EDE8DC; }

/* Sliders (card box and ring circle) */
.sf-slider { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.sf-step-btn {
  flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--sf-line-strong) !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: var(--sf-gold-light) !important; touch-action: manipulation;
}
.sf-step-btn:hover { border-color: var(--sf-gold) !important; }
.sf-range { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: pan-y; cursor: pointer; }
.sf-range:focus { outline: none; }
.sf-range:focus-visible { outline: 2px solid var(--sf-gold-light); outline-offset: 0; }
.sf-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(201, 168, 76, 0.3); }
.sf-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 50%;
  background: var(--sf-gold-light); border: 2px solid #8B6C14; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.sf-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(201, 168, 76, 0.3); }
.sf-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--sf-gold-light); border: 2px solid #8B6C14; }
.sf-readout { margin: 2px 0 0; text-align: center; font-size: 18px; color: var(--sf-text-2); }
.sf-readout strong { color: var(--sf-gold-light); font-weight: 600; }

/* The card box. On a phone the screen is narrower than a card's long edge,
   so the card goes upright and the box shows only its top end. */
.sf-card-stage { display: flex; justify-content: center; padding: 6px 0 12px; overflow: hidden; }
.sf-card {
  position: relative; flex-shrink: 0; border: 2px solid var(--sf-gold-light);
  background: repeating-linear-gradient(135deg, rgba(201, 168, 76, 0.07) 0 6px, transparent 6px 12px);
}
.sf-card.is-upright { border-bottom: none; border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.sf-card-label {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center;
  font-family: var(--sf-heading); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sf-text-2);
}
.sf-card.is-upright .sf-card-label { top: 38%; }

/* The ring circle */
.sf-ring-stage {
  position: relative; display: flex; align-items: center; justify-content: center; margin: 4px 0 8px;
  background: radial-gradient(circle, #1E1B15 0%, #0D0D0C 70%); border: 1px solid var(--sf-line);
}
.sf-ring-stage::before, .sf-ring-stage::after { content: ''; position: absolute; background: rgba(201, 168, 76, 0.18); }
.sf-ring-stage::before { left: 50%; top: 10%; bottom: 10%; width: 1px; }
.sf-ring-stage::after { top: 50%; left: 10%; right: 10%; height: 1px; }
.sf-ring-circle { position: relative; z-index: 1; border-radius: 50%; border: 2px solid var(--sf-gold-light); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.7); }

/* ── Step 3: the result ─────────────────────────────────────────────── */
.sf-result { text-align: center; }
.sf-saved { margin: -4px 0 12px; font-family: var(--sf-heading); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sf-text-2); }
.sf-size-circle {
  width: 136px; height: 136px; margin: 4px auto 10px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--sf-gold); box-shadow: inset 0 0 0 6px rgba(201, 168, 76, 0.07), 0 0 40px rgba(201, 168, 76, 0.08);
}
.sf-size-num {
  font-family: var(--sf-heading); font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: 0.02em;
  background: var(--sf-gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--sf-gold);
}
.sf-size-num small { font-size: 0.42em; letter-spacing: 0.08em; }
.sf-best { margin: 0 0 14px; font-family: var(--sf-heading); font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--sf-gold); }
.sf-why { margin: 0 auto 8px; max-width: 400px; font-size: 18px; line-height: 1.45; color: var(--sf-text-2); }
.sf-why:last-of-type { margin-bottom: 0; }
.sf-help { margin: 8px auto 0; max-width: 360px; font-size: 21px; line-height: 1.4; color: var(--sf-text); }

.sf-chips-group { margin: 22px 0 0; padding: 0; border: none; text-align: left; min-width: 0; }
.sf-chips-label { padding: 0; margin-bottom: 10px; font-family: var(--sf-heading); font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sf-text-2); }
.sf-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 3px 3px 10px; margin: 0 -3px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(201, 168, 76, 0.35) transparent;
  -webkit-overflow-scrolling: touch;
}
.sf-chip { position: relative; flex: 0 0 auto; scroll-snap-align: center; cursor: pointer; }
.sf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sf-chip-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 82px; min-height: 58px; padding: 6px 10px; border: 1px solid var(--sf-line); background: var(--sf-bg-deep);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sf-chip:hover .sf-chip-box { border-color: var(--sf-line-strong); }
.sf-chip input:checked + .sf-chip-box { border-color: var(--sf-gold); background: rgba(201, 168, 76, 0.1); }
.sf-chip input:focus-visible + .sf-chip-box { outline: 2px solid var(--sf-gold-light); outline-offset: 2px; }
.sf-chip-val { font-family: var(--sf-heading); font-size: 15px; font-weight: 600; color: var(--sf-text); }
.sf-chip input:checked + .sf-chip-box .sf-chip-val { color: var(--sf-gold-light); }
.sf-chip-stock { font-size: 13px; line-height: 1.1; color: var(--sf-text-2); white-space: nowrap; }
.sf-chip-stock.is-in { color: var(--sf-gold-light); }
.sf-mto { margin: 10px 0 0; font-size: 16px; color: var(--sf-text-2); text-align: left; }
.sf-mto:empty { display: none; }
.sf-again { margin-top: 14px; }

/* ── Chain: the figure ──────────────────────────────────────────────── */
.sf-figbox { position: relative; margin: 2px 0 16px; }
.sf-figbox-result { margin-top: 18px; text-align: left; }
.sf-figswitch { position: absolute; top: 0; right: 0; z-index: 1; background: var(--sf-bg); }
.sf-figswitch span { min-width: 0; height: 30px; padding: 0 12px; font-size: 10px; }
.sf-fig { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; overflow: visible; }
.sf-fig-fill { fill: url(#sfFigFill); }
.sf-fig-body { fill: none; stroke: rgba(226, 206, 146, 0.42); stroke-width: 1.2; }
.sf-fig-detail { fill: none; stroke: rgba(226, 206, 146, 0.2); stroke-width: 1; stroke-linecap: round; }
.sf-zone line { stroke: rgba(201, 168, 76, 0.3); stroke-width: 1; stroke-dasharray: 3 4; }
.sf-zone text {
  fill: rgba(175, 168, 152, 0.9); font-family: var(--sf-body); font-size: 11px;
  paint-order: stroke; stroke: #15130F; stroke-width: 3px; stroke-linejoin: round;
}
.sf-zone.is-on line { stroke: var(--sf-gold-light); stroke-dasharray: none; }
.sf-zone.is-on text { fill: var(--sf-gold-light); font-weight: 600; }
.sf-chain { fill: none; stroke: url(#sfGold); stroke-linecap: round; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.6)); }
.sf-chain-links { fill: none; stroke: rgba(48, 32, 6, 0.55); stroke-linecap: butt; }
.sf-pendant { fill: url(#sfGold); stroke: #8B6C14; stroke-width: 0.8; }
.sf-fig-cap { margin: 6px 0 14px; text-align: center; font-size: 18px; color: var(--sf-text-2); }
.sf-fig-cap strong { color: var(--sf-gold-light); font-weight: 600; }
.sf-range-ends {
  display: flex; justify-content: space-between; margin: -4px 52px 0;
  font-family: var(--sf-heading); font-size: 10px; letter-spacing: 0.12em; color: var(--sf-text-2);
}
.sf-pills.is-grid { display: grid; grid-template-columns: 1fr 1fr; }
.sf-pills.is-grid .sf-pill { min-width: 0; }
.sf-pills.is-grid .sf-pill:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ── Chain: See it on me (size-tryon.js) ─────────────────────────────── */
.sf-tryon-btn { display: flex; width: 100%; margin: -4px 0 18px; }
html.sf-try-lock, html.sf-try-lock body { overflow: hidden; }
.sf-try {
  position: fixed; inset: 0; z-index: 10060; display: flex; flex-direction: column;
  background: #000; color: var(--sf-text); font-family: var(--sf-body); line-height: 1.45;
}
@media (min-width: 640px) {
  .sf-try {
    inset: 24px; margin: auto; width: min(520px, calc(100% - 48px)); height: min(900px, calc(100% - 48px));
    border: 1px solid var(--sf-line); border-radius: 14px; overflow: hidden;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.78);
  }
}
.sf-try-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0B0A08; }
.sf-try-stage video, .sf-try-stage img, .sf-try-stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
/* The drawing is sized to the screen itself (sharp links), not to the picture. */
.sf-try-stage canvas { object-fit: fill; pointer-events: none; }
.sf-try-stage video[hidden], .sf-try-stage img[hidden] { display: none; }
/* Live camera: fill the frame, mirrored like a mirror. The drawing is mirrored with it. */
.sf-try-stage.is-cam video, .sf-try-stage.is-cam canvas { object-fit: cover; transform: scaleX(-1); }
.sf-try-start {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 64px 24px 24px; text-align: center;
  background: radial-gradient(circle at 50% 40%, #1E1B15 0%, #0B0A08 70%);
}
.sf-try-start[hidden] { display: none; }
.sf-try-start .sf-btn { width: min(320px, 100%); }
.sf-try-lead { margin: 0 0 8px; max-width: 320px; font-size: 21px; line-height: 1.35; color: var(--sf-text); }
.sf-try-msg { margin: 0; max-width: 320px; font-size: 16px; color: #F0A878; }
.sf-try-msg:empty { display: none; }
.sf-try-private { margin: 6px 0 0; max-width: 300px; font-size: 15px; color: var(--sf-text-2); }
.sf-try-hint {
  position: absolute; z-index: 3; left: 12px; right: 64px; top: 12px; margin: 0; padding: 8px 12px;
  background: rgba(8, 8, 8, 0.72); border: 1px solid var(--sf-line); font-size: 16px; color: var(--sf-text);
}
.sf-try-hint:empty { display: none; }
.sf-try-close {
  position: absolute; z-index: 4; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 8, 8, 0.62) !important; color: var(--sf-text) !important;
}
.sf-try-close svg { width: 18px; height: 18px; }
.sf-try-dot {
  position: absolute; z-index: 3; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab;
}
.sf-try-dot[hidden] { display: none; }
.sf-try-dot::after {
  content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--sf-gold-light);
  border: 2px solid #080808; box-shadow: 0 0 0 2px rgba(226, 206, 146, 0.55), 0 2px 8px rgba(0, 0, 0, 0.6);
}
.sf-try-dot:active { cursor: grabbing; }
.sf-try-panel {
  flex: 0 0 auto; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--sf-bg); border-top: 1px solid var(--sf-line);
}
.sf-try-panel .sf-fig-cap { margin: 0 0 4px; }
.sf-try-panel .sf-label { margin-bottom: 0; }
/* Length and width, side by side when there's room, stacked on a phone. */
.sf-try-rows { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 640px) { .sf-try-rows { grid-template-columns: 1fr 1fr; } }
.sf-try-row .sf-slider { margin: 0 0 2px; }
.sf-try-row .sf-step-btn { width: 40px; height: 40px; }
.sf-try-val { color: var(--sf-gold-light); letter-spacing: 0.08em; text-transform: none; font-size: 11px; }
.sf-try-actions { display: flex; gap: 8px; margin-top: 4px; }
.sf-try-actions .sf-btn { flex: 1 1 0; min-height: 46px; padding: 6px 8px; font-size: 10px; letter-spacing: 0.14em; }
.sf-try-actions .sf-btn[hidden] { display: none; }
.sf-try-note { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--sf-text-2); }
