/* =============================================================
   LabRocks · Stone size picker
   Glassmorphism, twinkle, animated price
   ============================================================= */

/* ---------- Universal tokens (override sparingly) ---------- */
:where(body) {
  --picker-glass-bg: rgba(244, 240, 234, 0.55);
  --picker-glass-bg-dark: rgba(14, 14, 12, 0.45);
  --picker-glass-border: rgba(255, 255, 255, 0.32);
  --picker-glass-border-dark: rgba(255, 255, 255, 0.16);
  --picker-glass-shadow: 0 24px 60px rgba(14, 14, 12, 0.28), 0 4px 14px rgba(14, 14, 12, 0.12);
  --picker-easing: cubic-bezier(0.2, 0.7, 0.2, 1);
  --picker-fast: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- Lightbox shell (shared base, used by both pages) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
.lightbox[aria-hidden="false"] { visibility: visible; pointer-events: auto; }
.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 14, 12, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s var(--picker-easing);
}
.lightbox.is-open .lightbox-backdrop { opacity: 1; }

.lightbox-shell {
  position: absolute;
  left: 50%; top: 50%;
  width: min(1100px, 92vw);
  max-height: 92vh;
  background: var(--ivory, #F4F0EA);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  transition: opacity 0.45s var(--picker-easing), transform 0.55s var(--picker-easing);
  overflow: hidden;
  color: var(--ink, #0E0E0C);
}
.lightbox.is-open .lightbox-shell { opacity: 1; transform: translate(-50%, -50%) scale(1); }

[data-theme="dark"] .lightbox-shell { background: #1A1916; color: #F4F0EA; }

.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  z-index: 4;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s var(--picker-easing), background 0.3s var(--picker-fast);
}
.lightbox-close:hover { transform: rotate(90deg); background: rgba(0, 0, 0, 0.05); }
[data-theme="dark"] .lightbox-close:hover { background: rgba(255, 255, 255, 0.08); }

.lightbox-media {
  /* Match the warm-ivory paper backdrop in the photographs so any contain
     letterbox reads as continuous paper, not a decorative border. */
  background: #EFEAE0;
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .lightbox-media { background: #15140F; }

.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  animation: lbZoom 0.7s var(--picker-easing) both;
}
@keyframes lbZoom {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.lightbox-info {
  padding: 56px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: var(--bg-elevated, #ffffff);
  overflow-y: auto;
}
[data-theme="dark"] .lightbox-info { background: #1A1916; color: #F4F0EA; }

.lightbox-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep, oklch(0.62 0.05 75));
  margin: 0 0 8px;
}
.lightbox-name {
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  line-height: 1.05;
}
.lightbox-desc {
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft, #1A1916);
  margin: 0 0 4px;
}
[data-theme="dark"] .lightbox-desc { color: rgba(244, 240, 234, 0.85); }
.lightbox-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-mute, #4A463E);
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin: 8px 0 0;
}
[data-theme="dark"] .lightbox-meta { color: rgba(244, 240, 234, 0.6); }

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 26px;
  border: 1px solid var(--ink, #0E0E0C);
  border-radius: 999px;
  background: var(--ink, #0E0E0C);
  color: var(--ivory, #F4F0EA);
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.3s var(--picker-fast), color 0.3s var(--picker-fast);
}
.cta:hover { background: transparent; color: var(--ink, #0E0E0C); }
.cta-ghost { background: transparent; color: var(--ink, #0E0E0C); }
.cta-ghost:hover { background: var(--ink, #0E0E0C); color: var(--ivory, #F4F0EA); }
[data-theme="dark"] .cta { background: var(--ivory, #F4F0EA); color: var(--ink, #0E0E0C); border-color: var(--ivory, #F4F0EA); }
[data-theme="dark"] .cta:hover { background: transparent; color: var(--ivory, #F4F0EA); }
[data-theme="dark"] .cta-ghost { background: transparent; color: var(--ivory, #F4F0EA); }
[data-theme="dark"] .cta-ghost:hover { background: var(--ivory, #F4F0EA); color: var(--ink, #0E0E0C); }

/* ---------- Size picker ---------- */
.size-picker {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border-top: 1px solid rgba(14, 14, 12, 0.1);
  border-bottom: 1px solid rgba(14, 14, 12, 0.1);
}
[data-theme="dark"] .size-picker { border-top-color: rgba(255,255,255,0.1); border-bottom-color: rgba(255,255,255,0.1); }

/* Collapsed summary — left = diamond + carat (centered), right = eyebrow over chevron */
.size-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: rgba(14,14,12,0.025);
  border: 1px solid rgba(14,14,12,0.12);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.4s var(--picker-easing);
}
.size-summary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  align-self: stretch;
  flex-shrink: 0;
}
[data-theme="dark"] .size-summary {
  background: rgba(244,240,234,0.04);
  border-color: rgba(244,240,234,0.16);
}
.size-summary:hover {
  border-color: rgba(14,14,12,0.45);
  background: rgba(14,14,12,0.05);
}
[data-theme="dark"] .size-summary:hover {
  border-color: rgba(244,240,234,0.45);
  background: rgba(244,240,234,0.07);
}
.size-summary:active { transform: scale(0.995); }

/* Diagonal shine sweep — fires once per lightbox open via .is-revealed */
.size-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.18) 46%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.18) 54%,
    transparent 70%
  );
  pointer-events: none;
  mix-blend-mode: screen;
}
[data-theme="dark"] .size-summary::before {
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.10) 46%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0.10) 54%,
    transparent 70%
  );
}
.size-summary.is-revealed::before {
  animation: size-summary-shine 1.6s ease-out 0.6s 1 forwards;
}
@keyframes size-summary-shine {
  0%   { left: -150%; }
  100% { left: 150%; }
}

@media (prefers-reduced-motion: reduce) {
  .size-summary::before { animation: none; opacity: 0; }
}
.size-summary-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute, #6e6b68);
  white-space: nowrap;
  line-height: 1;
}
[data-theme="dark"] .size-summary-eyebrow { color: rgba(244,240,234,0.55); }

.size-summary-line {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  min-width: 0;
}
.size-summary-dot {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: url("logos/diamond_overlay.png") center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(14,14,12,0.25));
  transition: transform 0.4s var(--picker-easing);
  animation: size-summary-dot-glow 3.6s ease-in-out infinite;
}
@keyframes size-summary-dot-glow {
  0%, 100% { filter: drop-shadow(0 1px 2px rgba(14,14,12,0.25)) drop-shadow(0 0 0px rgba(255,255,255,0)); }
  50%      { filter: drop-shadow(0 1px 2px rgba(14,14,12,0.25)) drop-shadow(0 0 8px rgba(255,255,255,0.75)); }
}
.size-summary:hover .size-summary-dot { transform: rotate(45deg); }

/* Four-point sparkle that twinkles on the diamond's surface */
.size-summary-dot::after {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 12px;
  height: 12px;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(0deg,  transparent 46%, rgba(255,255,255,0.95) 49%, rgba(255,255,255,0.95) 51%, transparent 54%),
    linear-gradient(90deg, transparent 46%, rgba(255,255,255,0.95) 49%, rgba(255,255,255,0.95) 51%, transparent 54%);
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.95));
  opacity: 0;
  transform: scale(0) rotate(0deg);
  animation: size-summary-twinkle 3.6s ease-in-out infinite;
  animation-delay: 1.4s;
}
@keyframes size-summary-twinkle {
  0%, 70%, 100% { opacity: 0; transform: scale(0)   rotate(0deg); }
  82%           { opacity: 1; transform: scale(1)   rotate(45deg); }
  94%           { opacity: 0; transform: scale(0.2) rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .size-summary-dot,
  .size-summary-dot::after { animation: none; }
  .size-summary-dot::after { opacity: 0; }
}
.size-summary-carat {
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.size-summary-unit {
  font-size: 0.55em;
  letter-spacing: 0.06em;
  margin-left: 3px;
  opacity: 0.65;
  font-feature-settings: "smcp", "c2sc";
  text-transform: lowercase;
  white-space: nowrap;
}
.size-summary-sep {
  color: var(--ink-mute, #6e6b68);
  opacity: 0.5;
}
.size-summary-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute, #6e6b68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
[data-theme="dark"] .size-summary-label { color: rgba(244,240,234,0.6); }
.size-summary-chevron {
  width: 16px;
  height: 16px;
  color: var(--ink-mute, #6e6b68);
  transition: transform 0.4s var(--picker-easing), color 0.3s;
}
[data-theme="dark"] .size-summary-chevron { color: rgba(244,240,234,0.5); }
.size-summary:hover .size-summary-chevron { color: var(--ink, #0E0E0C); }
[data-theme="dark"] .size-summary:hover .size-summary-chevron { color: #F4F0EA; }
/* Summary opens the scale sheet; chevron rotates while it's the active trigger. */
.size-summary[aria-expanded="true"] .size-summary-chevron { transform: rotate(-180deg); }

/* ============================================================
   Scale-on-piece bottom sheet — opens above the lightbox info panel.
   ============================================================ */
.scale-sheet {
  position: fixed;
  inset: 0;
  z-index: 105;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.32s var(--picker-easing), visibility 0s linear 0.32s;
}
.scale-sheet[aria-hidden="false"] { visibility: visible; }
.scale-sheet.is-open { opacity: 1; pointer-events: auto; transition: opacity 0.32s var(--picker-easing); }
.scale-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 14, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s var(--picker-easing);
}
.scale-sheet.is-open .scale-sheet-backdrop { opacity: 1; }

.scale-sheet-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #15140F;
  color: #F4F0EA;
  padding: 0;
  opacity: 0;
  transition: opacity 0.32s var(--picker-easing);
  display: block;
}
.scale-sheet.is-open .scale-sheet-panel { opacity: 1; }
.scale-sheet.is-open .scale-sheet-panel { transform: translateY(0); }
[data-theme="dark"] .scale-sheet-panel { background: #1A1916; color: #F4F0EA; }

/* Sheet handle hidden on all viewports — full-bleed sheet, no drag affordance.
   The element stays in markup for ARIA structure but has no visual presence. */
.scale-sheet-handle { display: none; }

.scale-sheet-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  z-index: 3;
  background: linear-gradient(to bottom, rgba(14,14,12,0.55) 0%, rgba(14,14,12,0) 100%);
  color: #F4F0EA;
}
.scale-sheet-title {
  margin: 0;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.2;
  color: #F4F0EA;
}
.scale-sheet-close {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(14,14,12,0.45);
  color: #F4F0EA;
  border: 0;
  cursor: pointer;
  transition: background 0.3s var(--picker-fast), transform 0.3s var(--picker-easing);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.scale-sheet-close:hover { background: rgba(14,14,12,0.7); transform: rotate(90deg); }

/* Photo frame: holds the topdown image + the worn-stone overlay */
.scale-photo-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #15140F;
  isolation: isolate;
  transition: filter 0.3s var(--picker-easing);
  container-type: inline-size;
  container-name: photoframe;
}
/* object-position pins the photo's (anchor-x, anchor-y) point to the same
   point of the frame regardless of frame aspect — the cover-crop happens
   around the crown, so a fixed-coord overlay always lands on it.
   image-orientation:none disables Safari iOS EXIF re-orientation that would
   otherwise shift the anchor. */
.scale-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--anchor-x, 50%) var(--anchor-y, 50%);
  image-orientation: none;
  display: block;
  transition: opacity 0.22s var(--picker-easing);
}
.scale-photo.is-swapping { opacity: 0.55; }

/* Worn stone — anchored to the same (anchor-x, anchor-y) as object-position.
   Physical left/top is intentional: it must match object-position's top-left
   origin. Don't swap to inset-inline-start.
   Size is JS-driven via --worn-px (real-mm × cover-scale); --worn-pct is the
   cqw fallback so a non-zero diamond is still visible if JS errors, prints,
   or runs before image decode. */
/* Base layer — always rendered at the smallest carat (size 1) under the
   active stone. Never animates. Hides the empty band/lobe/chain during
   the worn-stone crossfade. */
.scale-stone-base {
  position: absolute;
  left: var(--anchor-x, 50%);
  top: var(--anchor-y, 50%);
  width: max(calc(var(--base-px, 0) * 1px), calc(var(--base-pct, 0) * 1cqw));
  height: max(calc(var(--base-px, 0) * 1px), calc(var(--base-pct, 0) * 1cqw));
  transform: translate(-50%, -50%);
  background: url("logos/diamond_overlay.png") center/contain no-repeat;
  filter: drop-shadow(0 2px 6px rgba(14,14,12,0.45));
  z-index: 1;
  pointer-events: none;
}
.scale-stone-worn {
  position: absolute;
  left: var(--anchor-x, 50%);
  top: var(--anchor-y, 50%);
  width: max(calc(var(--worn-px, 0) * 1px), calc(var(--worn-pct, 0) * 1cqw));
  height: max(calc(var(--worn-px, 0) * 1px), calc(var(--worn-pct, 0) * 1cqw));
  transform: translate(-50%, -50%);
  background: url("logos/diamond_overlay.png") center/contain no-repeat;
  filter: drop-shadow(0 2px 6px rgba(14,14,12,0.45));
  transition: width 0.36s var(--picker-easing), height 0.36s var(--picker-easing), opacity 0.22s var(--picker-easing), transform 0.36s var(--picker-easing);
  z-index: 2;
  pointer-events: none;
}
.scale-stone-worn.is-swapping {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
}
.scale-stone-worn.is-landing {
  animation: stoneLand 0.32s var(--picker-easing) both;
}
@keyframes stoneLand {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.scale-help {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(64px + 56px + 48px);
  margin: 0;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(244,240,234,0.85);
  text-align: center;
  z-index: 3;
  text-shadow: 0 1px 6px rgba(14,14,12,0.6);
  pointer-events: none;
  padding: 0 22px;
}

/* Scale row — 5 stones at real mm, 64x64 hit targets, anchored to bottom */
.scale-row {
  position: absolute;
  left: 0; right: 0;
  bottom: 56px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
  padding: 14px 16px 12px;
  z-index: 3;
  background: linear-gradient(to top, rgba(14,14,12,0.7) 0%, rgba(14,14,12,0) 100%);
  color: #F4F0EA;
}
.scale-stone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 64px;
  padding: 6px 2px 8px;
  background: transparent;
  border: 0;
  position: relative;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  opacity: 0.78;
  transition: opacity 0.3s var(--picker-fast);
}
.scale-stone:hover, .scale-stone:focus-visible { opacity: 1; }
.scale-stone.is-active { opacity: 1; }
.scale-stone.is-active::after {
  content: '';
  position: absolute;
  left: 24%; right: 24%;
  bottom: 0;
  height: 1px;
  background: var(--gold-deep, oklch(0.62 0.05 75));
  opacity: 0.7;
}
.scale-stone-glyph {
  display: block;
  background: url("logos/diamond_overlay.png") center/contain no-repeat;
  filter: drop-shadow(0 1px 3px rgba(14,14,12,0.28));
  transition: filter 0.3s var(--picker-easing), transform 0.3s var(--picker-easing);
}
.scale-stone:hover .scale-stone-glyph { transform: scale(1.06); }
.scale-stone.is-active .scale-stone-glyph {
  filter: drop-shadow(0 2px 6px rgba(204, 172, 112, 0.55)) brightness(1.06) saturate(1.1);
}
.scale-stone-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}
.scale-stone-carat {
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: #F4F0EA;
}
.scale-stone-unit {
  font-size: 0.72em;
  letter-spacing: 0.06em;
  margin-left: 1px;
  opacity: 0.7;
  font-feature-settings: "smcp", "c2sc";
  text-transform: lowercase;
  color: #F4F0EA;
}
.scale-stone-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
  color: #F4F0EA;
}

.scale-detail {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(244,240,234,0.85);
  text-transform: uppercase;
  text-align: center;
  z-index: 3;
  padding: 18px 16px 22px;
  background: rgba(14,14,12,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.size-detail {
  margin: 0;
  padding: 18px 0 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute, #6e6b68);
  line-height: 1.6;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.7;
}

/* ---------- Price counter ---------- */
.price-display {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  display: inline-block;
  transition: color 0.3s;
}
.price-display.flash { animation: priceFlash 0.6s var(--picker-easing) both; }
@keyframes priceFlash {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(-2px); opacity: 0.4; }
  100% { transform: translateY(0); opacity: 1; }
}

.lightbox-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.lightbox-cta .cta {
  justify-content: space-between;
  display: inline-flex;
  align-items: center;
}

/* Focus indicator */
:focus-visible {
  outline: 2px solid var(--gold-deep, oklch(0.62 0.05 75));
  outline-offset: 2px;
  border-radius: 2px;
}
.scale-stone:focus-visible,
.lightbox-close:focus-visible,
.scale-sheet-close:focus-visible { outline-offset: 3px; }

[data-theme="dark"] .size-detail { color: rgba(244, 240, 234, 0.55); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  /* Lightbox: full-screen sheet, image on top, info below */
  .lightbox-shell {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: 38vh 1fr;
    border-radius: 0;
  }
  .lightbox-media {
    padding: 0;
    min-height: 0;
    max-height: 38vh;
  }
  .lightbox-media img { width: 100%; height: 100%; object-fit: cover; }
  .lightbox-info {
    padding: 20px 22px 28px;
    justify-content: flex-start;
    gap: 10px;
  }
  .lightbox-close {
    top: 10px; right: 10px;
    width: 44px; height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(14, 14, 12, 0.18);
  }
  [data-theme="dark"] .lightbox-close {
    background: rgba(14, 14, 12, 0.7);
    color: #F4F0EA;
  }
  .lightbox-eyebrow { margin-bottom: 4px; }
  .lightbox-name { font-size: clamp(28px, 7vw, 36px); margin-bottom: 4px; }
  .lightbox-desc { font-size: 16px; }
  .lightbox-cta { gap: 8px; margin-top: 4px; }
  .lightbox-cta .cta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
  }

  .size-summary-carat { font-size: 28px; }
  .size-summary { padding: 14px 16px; column-gap: 12px; }
  .size-summary-line { gap: 14px; }
  .size-summary-dot { width: 32px; height: 32px; }
  .size-detail { font-size: 10px; }
  .scale-sheet-panel { padding: 12px 16px 20px; }
  .scale-sheet-title { font-size: 16px; }
  .scale-stone-carat { font-size: 13px; }
  .scale-stone-label { font-size: 7px; letter-spacing: 0.12em; }
}
@media (max-width: 380px) {
  .lightbox-info { padding: 20px 18px 28px; }
  .scale-sheet-panel { padding: 10px 14px 18px; }
  .scale-row { gap: 2px; }
}
@media (max-width: 720px) and (orientation: landscape) {
  .lightbox-shell { grid-template-rows: 28vh 1fr; }
  .lightbox-media { max-height: 28vh; }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scale-stone-worn,
  .scale-stone-worn.is-swapping,
  .scale-stone-worn.is-landing { animation: none !important; transition: none !important; opacity: 1 !important; transform: translate(-50%, -50%) !important; }
  .scale-photo-frame.is-pulsing { filter: none !important; }
  .price-display.flash { animation: none; }
}
