/* RANA non-home shell -- independent of styles.css / opening passage.
   Commerce field + readable utility pages. No card grids, pills, or drawers. */

:root {
  --ink: #020005;
  --cream: #fffaf5;
  --cream-soft: rgba(255, 250, 245, 0.78);
  --cream-faint: rgba(255, 250, 245, 0.52);
  --cream-mute: rgba(255, 250, 245, 0.38);
  --link-line: rgba(255, 250, 245, 0.55);
  --hairline: rgba(255, 250, 245, 0.18);
  --hairline-strong: rgba(255, 250, 245, 0.32);
  --focus: rgba(215, 185, 255, 0.95);
  --scrim-top: rgba(2, 0, 5, 0.58);
  --scrim-mid: rgba(2, 0, 5, 0.48);
  --scrim-deep: rgba(2, 0, 5, 0.82);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --shell-pad-x: clamp(1.25rem, 4.2vw, 4.5rem);
  /* Desktop/tablet: deliberate gap between mark bottom and page h1.
     Mobile keeps the accepted first-frame rhythm below. */
  --shell-pad-top: calc(clamp(7.35rem, 16.2svh, 9.1rem) + var(--safe-top));
  --mark-w: min(17vw, 240px);
  --type: Garamond, "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --measure: 38rem;
  --measure-wide: 46rem;
  /* True four-edge dissolve: outer ellipse radii equal center-to-edge
     (50% 50% at 50% 50%), so mask alpha is exactly 0 at every edge
     midpoint and every corner (corners sit at r=√2 > 1). Inner hold
     keeps the gem sharp; broad feather reads as photo → atmosphere. */
  --piece-mask: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    #000 0%,
    #000 44%,
    rgba(0, 0, 0, 0.97) 56%,
    rgba(0, 0, 0, 0.78) 68%,
    rgba(0, 0, 0, 0.42) 80%,
    rgba(0, 0, 0, 0.12) 90%,
    transparent 100%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body.shell-body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: var(--type);
  background: var(--ink);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.shell-body.is-locked {
  overflow: hidden;
}

/* --- Living ground: color atmosphere, not a second jewelry object --- */

.shell-ground {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 58% 36%, rgba(92, 48, 78, 0.38) 0%, transparent 62%),
    radial-gradient(ellipse 70% 55% at 28% 70%, rgba(48, 28, 62, 0.32) 0%, transparent 58%),
    var(--ink);
}

.shell-ground__image {
  position: absolute;
  /* Overscale + hard crop so the ring silhouette cannot read as a second object. */
  inset: -28%;
  width: 156%;
  height: 156%;
  object-fit: cover;
  object-position: 68% 42%;
  display: block;
  opacity: 0.42;
  filter: blur(52px) saturate(0.78) brightness(0.34) contrast(0.92);
  transform: scale(1.18);
  transform-origin: 62% 40%;
}

.shell-ground--studio .shell-ground__image {
  object-position: 42% 28%;
  opacity: 0.36;
  filter: blur(48px) saturate(0.72) brightness(0.32) contrast(0.9);
}

.shell-ground--making .shell-ground__image {
  object-position: 50% 52%;
  opacity: 0.38;
  filter: blur(50px) saturate(0.8) brightness(0.33) contrast(0.92);
}

.shell-ground--gem .shell-ground__image {
  object-position: 50% 45%;
  opacity: 0.34;
  filter: blur(56px) saturate(0.88) brightness(0.3) contrast(0.95);
}

.shell-ground__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 95% 80% at 55% 42%, rgba(2, 0, 5, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 40% 55%, rgba(70, 36, 72, 0.14) 0%, transparent 62%),
    linear-gradient(
      180deg,
      var(--scrim-top) 0%,
      var(--scrim-mid) 36%,
      rgba(2, 0, 5, 0.64) 70%,
      var(--scrim-deep) 100%
    );
}

.shell-ground__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* --- Chrome: mark + primary destinations + Index --- */

.shell-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding:
    calc(4.8svh + var(--safe-top))
    calc(var(--shell-pad-x) + var(--safe-right))
    0
    calc(4.2vw + var(--safe-left));
  pointer-events: none;
}

.shell-primary-nav {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem 1.2rem;
  margin-left: auto;
  margin-right: 0.35rem;
  max-width: min(64vw, 34rem);
}

.shell-primary-nav a {
  color: var(--cream);
  font-family: var(--type);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.32);
  padding: 0.55rem 0.05rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.shell-primary-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--link-line);
}

.shell-primary-nav a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell-primary-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(255, 250, 245, 0.72);
}

.shell-mark {
  display: block;
  width: var(--mark-w);
  min-height: calc(var(--mark-w) * 478 / 1485);
  pointer-events: auto;
  opacity: 0.96;
  line-height: 0;
  text-decoration: none;
  /* Halo follows canvas alpha only -- never a rectangular plate. */
  filter: drop-shadow(0 1px 14px rgba(0, 0, 0, 0.55));
}

.shell-mark canvas {
  display: block;
  width: 100%;
  height: auto;
}

.shell-mark:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 6px;
}

.shell-index-open {
  pointer-events: auto;
  position: relative;
  margin-top: 0.15rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.55rem 0.15rem;
  color: var(--cream);
  font-family: var(--type);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.32);
  user-select: none;
}

.shell-index-open::after {
  content: "";
  display: block;
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: 0.35rem;
  height: 1px;
  background: var(--link-line);
  opacity: 0.7;
  transform-origin: right center;
  transform: scaleX(0.55);
}

.shell-index-open:hover::after,
.shell-index-open[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.shell-index-open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* --- Page content --- */

.shell-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  padding:
    var(--shell-pad-top)
    calc(var(--shell-pad-x) + var(--safe-right))
    calc(4.5rem + var(--safe-bottom))
    calc(var(--shell-pad-x) + var(--safe-left));
  overflow-x: clip;
}

.tray-intro {
  max-width: 34rem;
  margin: 0 0 clamp(1.25rem, 3.4svh, 2.1rem);
  padding-top: 0.1rem;
}

.tray-intro h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.45rem, 4.8vw, 3.85rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.32);
}

.tray-intro p {
  margin: 0.55rem 0 0;
  max-width: 26rem;
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  line-height: 1.4;
  color: var(--cream-soft);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

/* Quiet catalog instrument: transparent fields, hairline rules only. */

.tray-instrument {
  width: 100%;
  max-width: none;
  margin: 0 0 clamp(1.6rem, 4svh, 2.6rem);
  padding: 0 0 1.1rem;
  border-bottom: 1px solid var(--hairline);
}

.tray-instrument__row {
  display: grid;
  grid-template-columns:
    minmax(10rem, 1.5fr)
    repeat(4, minmax(6.5rem, 0.85fr))
    minmax(7.5rem, 0.9fr);
  gap: 0.85rem 1.15rem;
  align-items: end;
}

.tray-instrument .tray-count {
  margin: 0;
  align-self: end;
  padding-bottom: 0.45rem;
}

.tray-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.tray-field label {
  color: var(--cream-faint);
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.tray-field input,
.tray-field select {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0 0.45rem;
  color: var(--cream);
  font-family: var(--type);
  font-size: 1.05rem;
  line-height: 1.3;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline-strong);
  border-radius: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.tray-field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--cream-faint) 50%),
    linear-gradient(135deg, var(--cream-faint) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.4rem;
}

.tray-field input::placeholder {
  color: var(--cream-mute);
}

.tray-field input:focus,
.tray-field select:focus {
  border-bottom-color: var(--focus);
}

.tray-field input:focus-visible,
.tray-field select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.tray-count {
  margin: 0.9rem 0 0;
  color: var(--cream-faint);
  font-size: 0.98rem;
  line-height: 1.4;
  min-height: 1.4em;
}

/* Product feed: three complete pieces across on desktop, two on tablet,
   one centered field on mobile — not media|meta internal columns. */

.tray {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Three product-sized tracks; space-between shares intro/filter edges.
     Tracks shrink evenly via minmax(0, 30rem) when the tray is narrower. */
  grid-template-columns: repeat(3, minmax(0, 30rem));
  justify-content: space-between;
  /* Start each field at the shared row top so media axes stay locked while
     metadata length varies beneath without shifting another image. */
  align-items: start;
  gap: clamp(2.4rem, 5.5svh, 3.8rem) clamp(1.6rem, 3.4vw, 3rem);
  width: 100%;
  max-width: none;
}

.piece {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 1.8vw, 1.25rem);
  /* Media + meta fill the product track as one coherent field. */
  align-items: stretch;
  align-self: start;
  min-height: 0;
  width: 100%;
  max-width: none;
}

.piece:first-child {
  min-height: 0;
}

.piece__media {
  position: relative;
  display: block;
  /* Track is the product field; 30rem is the accepted desktop media ceiling. */
  width: 100%;
  max-width: 30rem;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.piece__media:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 6px;
}

.piece__frame {
  position: absolute;
  /* Overscan so the zero-alpha ellipse perimeter lives outside the
     media box; the gem stays inside the solid hold, not cut by feather. */
  inset: -7% -5.5%;
  overflow: visible;
  /* Four-edge dissolve -- photograph becomes atmosphere, not a card. */
  -webkit-mask-image: var(--piece-mask);
  mask-image: var(--piece-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
}

.piece__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Soft field wash only -- no rectangular edge or pedestal. */
  background: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    transparent 42%,
    rgba(2, 0, 5, 0.14) 100%
  );
  -webkit-mask-image: var(--piece-mask);
  mask-image: var(--piece-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.piece__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  transform: scale(1.06);
  /* Product stays sharp; only the mask dissolves the perimeter. */
}

.piece__meta {
  position: relative;
  z-index: 2;
  padding: 0 0.15rem 0.2rem;
  width: 100%;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: flex-start;
}

.piece__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: 0.005em;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.36);
}

.piece__title a,
.piece__title button {
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.piece__title a:hover,
.piece__title button:hover {
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.piece__title a:focus-visible,
.piece__title button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.piece__price {
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.3;
  color: var(--cream-soft);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.piece__cue {
  margin: 0.1rem 0 0;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--cream-faint);
  letter-spacing: 0.01em;
}

.piece.is-sold .piece__image {
  filter: grayscale(0.35) brightness(0.85);
}

.piece.is-sold .piece__cue {
  color: rgba(255, 250, 245, 0.42);
}

.tray-empty,
.tray-status {
  margin: 2rem 0;
  color: var(--cream-soft);
  font-size: 1.1rem;
  max-width: 28rem;
  line-height: 1.45;
}

.tray-fallback {
  margin: 1.5rem 0 0;
  max-width: 28rem;
  color: var(--cream-soft);
  font-size: 1.05rem;
  line-height: 1.45;
}

.tray-fallback a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.18em;
}

.tray-fallback a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* Gallery: irregular current, not masonry cards. */

.gallery-intro {
  max-width: 36rem;
  margin: 0 0 clamp(1.5rem, 4svh, 2.4rem);
}

.gallery-intro h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.45rem, 4.8vw, 3.85rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.32);
}

.gallery-intro p {
  margin: 0.6rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  line-height: 1.45;
  color: var(--cream-soft);
}

.gallery-stream {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(2.2rem, 6.5svh, 4.4rem);
  width: 100%;
  max-width: 82rem;
}

.gallery-item {
  position: relative;
  display: grid;
  align-items: end;
  gap: 1rem 1.5rem;
  width: 100%;
}

.gallery-item--a {
  grid-template-columns: minmax(0, 0.95fr) minmax(11rem, 0.55fr);
  max-width: 58rem;
  margin-left: 0;
}

.gallery-item--b {
  grid-template-columns: minmax(11rem, 0.5fr) minmax(0, 1fr);
  max-width: 64rem;
  margin-left: auto;
}

.gallery-item--b .gallery-item__meta {
  order: -1;
  text-align: right;
  margin-left: auto;
}

.gallery-item--c {
  grid-template-columns: minmax(0, 1.15fr) minmax(12rem, 0.65fr);
  max-width: 48rem;
  margin-left: 8%;
}

.gallery-item--d {
  grid-template-columns: minmax(0, 0.8fr) minmax(12rem, 0.7fr);
  max-width: 70rem;
  margin-left: 4%;
}

.gallery-item__media {
  position: relative;
  display: block;
  width: 100%;
  min-height: clamp(14rem, 38svh, 24rem);
  height: clamp(14rem, 38svh, 24rem);
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.gallery-item--a .gallery-item__media {
  min-height: clamp(16rem, 44svh, 26rem);
  height: clamp(16rem, 44svh, 26rem);
}

.gallery-item--c .gallery-item__media {
  min-height: clamp(12rem, 32svh, 20rem);
  height: clamp(12rem, 32svh, 20rem);
}

.gallery-item__media:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 6px;
}

.gallery-item__frame {
  position: absolute;
  inset: -8% -6%;
  -webkit-mask-image: var(--piece-mask);
  mask-image: var(--piece-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.gallery-item__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  transform: scale(1.05);
}

.gallery-item__meta {
  position: relative;
  z-index: 2;
  max-width: 18rem;
  padding-bottom: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-item__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.2;
  color: var(--cream);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.36);
}

.gallery-item__collection {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--cream-faint);
}

/* Readable prose pages: continuous passage, not boxed sections. */

.prose {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  padding-bottom: 2rem;
}

.prose--wide {
  max-width: var(--measure-wide);
}

.prose h1 {
  margin: 0 0 0.85rem;
  font-weight: 400;
  font-size: clamp(2.45rem, 4.8vw, 3.85rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.32);
}

.prose .lede {
  margin: 0 0 1.75rem;
  font-size: clamp(1.12rem, 1.55vw, 1.35rem);
  line-height: 1.45;
  color: var(--cream-soft);
  max-width: 32rem;
}

.prose p,
.prose li {
  margin: 0 0 1.05rem;
  font-size: clamp(1.05rem, 1.35vw, 1.18rem);
  line-height: 1.55;
  color: var(--cream-soft);
}

.prose h2 {
  margin: 2.4rem 0 0.85rem;
  font-weight: 400;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.15;
  color: var(--cream);
}

.prose a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.prose a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.15rem;
}

.prose .caveat {
  color: var(--cream-faint);
  font-size: 1rem;
}

.prose-figure {
  margin: 1.8rem 0 2.1rem;
  max-width: 28rem;
}

.prose-figure__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  -webkit-mask-image: var(--piece-mask);
  mask-image: var(--piece-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.prose-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform: scale(1.04);
}

.prose-figure figcaption {
  margin-top: 0.55rem;
  color: var(--cream-faint);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Native FAQ — no custom panels. */

.faq {
  margin: 2rem 0 1rem;
  max-width: var(--measure);
}

.faq details {
  margin: 0;
  padding: 0.95rem 0;
  border-top: 1px solid var(--hairline);
}

.faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  color: var(--cream);
  font-size: clamp(1.12rem, 1.5vw, 1.28rem);
  line-height: 1.35;
  padding: 0.15rem 0;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.faq details p,
.faq .faq-body {
  margin: 0.7rem 0 0.15rem;
  color: var(--cream-soft);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 34rem;
}

.faq .faq-body a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--link-line);
}

.faq .faq-body a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Journal river */

.journal-river {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  max-width: var(--measure-wide);
}

.journal-river li {
  margin: 0;
  padding: 1.05rem 0;
  border-top: 1px solid var(--hairline);
}

.journal-river li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.journal-river a {
  display: inline-block;
  color: var(--cream);
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.3;
  text-decoration: none;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.journal-river a:hover {
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.18em;
}

.journal-river a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.journal-river .external-note {
  display: block;
  margin-top: 0.3rem;
  color: var(--cream-mute);
  font-size: 0.92rem;
}

/* --- Full-field Index overlay --- */

.shell-index-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding:
    calc(5.5svh + var(--safe-top))
    calc(var(--shell-pad-x) + var(--safe-right))
    calc(3rem + var(--safe-bottom))
    calc(var(--shell-pad-x) + var(--safe-left));
  border: 0;
  background:
    radial-gradient(ellipse 80% 60% at 58% 36%, rgba(92, 48, 78, 0.42) 0%, transparent 62%),
    radial-gradient(ellipse 70% 55% at 28% 70%, rgba(48, 28, 62, 0.36) 0%, transparent 58%),
    rgba(2, 0, 5, 0.97);
  color: var(--cream);
  z-index: 80;
  /* Explicit cross-browser scroll — do not rely on dialog UA defaults. */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.shell-index-dialog::backdrop {
  background: rgba(2, 0, 5, 0.88);
}

.shell-index-dialog[open] {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.shell-index-dialog__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: clamp(1.5rem, 5svh, 3rem);
}

.shell-index-dialog__close {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.1rem;
  color: var(--cream);
  font-family: var(--type);
  font-size: 1.05rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.2em;
}

.shell-index-dialog__close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell-index-dialog__nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 28rem;
}

.shell-index-dialog__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--cream);
  font-family: var(--type);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.32);
}

.shell-index-dialog__nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.16em;
}

.shell-index-dialog__nav a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell-index-dialog__nav a[aria-current="page"] {
  color: var(--cream-soft);
}

.shell-index-dialog__external {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-width: 28rem;
}

.shell-index-dialog__external a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream-soft);
  font-size: 1.12rem;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.18em;
}

.shell-index-dialog__external a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* --- Held detail surface --- */

.shell-held {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding:
    calc(4.2svh + var(--safe-top))
    calc(var(--shell-pad-x) + var(--safe-right))
    calc(2.5rem + var(--safe-bottom))
    calc(var(--shell-pad-x) + var(--safe-left));
  border: 0;
  background:
    radial-gradient(ellipse 75% 55% at 55% 40%, rgba(92, 48, 78, 0.34) 0%, transparent 60%),
    rgba(2, 0, 5, 0.96);
  color: var(--cream);
  z-index: 90;
  overflow: auto;
}

.shell-held::backdrop {
  background: rgba(2, 0, 5, 0.9);
}

.shell-held[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.5rem;
}

.shell-held__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shell-held__close,
.shell-held__nav button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.45rem 0.1rem;
  color: var(--cream);
  font-family: var(--type);
  font-size: 1.02rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.2em;
}

.shell-held__close:focus-visible,
.shell-held__nav button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell-held__nav button:disabled {
  opacity: 0.35;
  cursor: default;
  text-decoration: none;
}

.shell-held__body {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(14rem, 0.85fr);
  gap: clamp(1.25rem, 3.5vw, 3rem);
  align-items: end;
  justify-content: start;
  min-height: 0;
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
}

/* Same square product field as the catalog: cover + shared focal rule, never a
   landscape stretch of a square source. Cap to the viewport so Close, meta,
   actions, and Previous/Next remain composed.

   Definite width (not min(100%, …)): the media track is minmax(0, auto), so a
   percentage inside width is circular and collapses the frame to 0×0. max-width
   100% still respects the body container without feeding the auto track. */
.shell-held__media {
  position: relative;
  width: min(52svh, 30rem);
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  isolation: isolate;
  justify-self: start;
}

.shell-held__frame {
  position: absolute;
  /* Match catalog overscan so the feathered mask geometry is shared. */
  inset: -7% -5.5%;
  overflow: visible;
  -webkit-mask-image: var(--piece-mask);
  mask-image: var(--piece-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
}

.shell-held__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  transform: scale(1.06);
  opacity: 1;
}

/* Gate previous stone during decode; composed frame/fallback stays visible. */
.shell-held__image.is-pending {
  opacity: 0;
}

.shell-held__image.is-ready {
  opacity: 1;
}

.shell-held__meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-bottom: 0.4rem;
  max-width: 24rem;
}

.shell-held__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  line-height: 1.15;
  color: var(--cream);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.36);
}

.shell-held__price {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--cream-soft);
}

.shell-held__cue {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--cream-faint);
}

.shell-held__handoff {
  margin: 0.55rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.shell-held__handoff a {
  color: var(--cream);
  font-size: 1.08rem;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.18em;
}

.shell-held__handoff a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell-held__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 78rem;
  margin: 0 auto;
  width: 100%;
}

/* Optional view-transition polish when supported. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
}

html.is-quiet::view-transition-old(root),
html.is-quiet::view-transition-new(root) {
  animation: none;
}

/* --- Mobile recut: calm centered product field + next-field sliver ---
   At 390x844 after two-band chrome, each piece media is a ~20rem centered
   field (not near-full-width / 48–50svh). Meta shares that measure so the
   title stays with the object. Scroll width stays viewport-bound. */


/* Tablet instrument reflow: still full width, fewer columns.
   Tray returns to two product-sized tracks so pieces stay readable. */
@media (max-width: 1100px) {
  .tray-instrument__row {
    grid-template-columns:
      minmax(0, 1.4fr)
      repeat(2, minmax(0, 0.9fr))
      minmax(0, 0.85fr);
  }

  .tray-field--search {
    grid-column: 1 / -1;
  }

  .tray-instrument .tray-count {
    grid-column: 1 / -1;
  }

  .shell-primary-nav {
    max-width: min(58vw, 30rem);
  }

  .tray {
    grid-template-columns: repeat(2, minmax(0, 30rem));
  }

  /* Tablet Held: keep two columns when the frame can hold them; square media
     stays bounded so meta and Previous/Next remain in the same composed frame. */
  .shell-held__body {
    grid-template-columns: minmax(0, auto) minmax(12rem, 0.95fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: end;
  }

  .shell-held__media {
    /* Same non-circular definite width as desktop; tablet cap only. */
    width: min(42svh, 22rem);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 700px) {
  :root {
    --mark-w: min(42vw, 156px);
    --shell-pad-x: clamp(1.1rem, 5.6vw, 1.45rem);
    /* Two-band chrome clearance at 390×844:
       top pad (3.6svh) + mark/Index row + gap + primary row + calm breath. */
    --shell-pad-top: calc(
      3.6svh
      + max(calc(var(--mark-w) * 478 / 1485), 2.75rem)
      + 0.45rem
      + 2.75rem
      + 1.35rem
      + var(--safe-top)
    );
  }

  /* Keep atmospheric mask overscan inside the 20rem field without overflow. */
  .piece__frame {
    inset: -5.5% -2.4%;
  }

  /* Mobile shell chrome: band 1 = mark + Index; band 2 = horizontal destinations. */
  .shell-chrome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.45rem;
    padding-top: calc(3.6svh + var(--safe-top));
    padding-right: calc(var(--shell-pad-x) + var(--safe-right));
    padding-bottom: 0;
    padding-left: calc(4.5vw + var(--safe-left));
  }

  .shell-mark {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
  }

  .shell-index-open {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-top: 0;
  }

  .shell-primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.2rem 1.15rem;
  }

  .shell-primary-nav a {
    font-size: 0.98rem;
    padding: 0.4rem 0.05rem;
    min-height: 44px;
  }

  .shell-main {
    padding-top: var(--shell-pad-top);
  }

  .tray-intro {
    margin-bottom: 1.05rem;
  }

  .tray-intro h1 {
    font-size: clamp(2.2rem, 10.2vw, 2.85rem);
  }

  .tray-intro p {
    margin-top: 0.42rem;
    font-size: 1.04rem;
    max-width: 19rem;
  }

  .tray-instrument__row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.9rem;
  }

  .tray-field--search {
    grid-column: 1 / -1;
  }

  .tray-instrument .tray-count {
    grid-column: 1 / -1;
    padding-bottom: 0;
    margin-top: 0.15rem;
  }

  .tray {
    grid-template-columns: 1fr;
    gap: 2.35rem;
  }

  .piece,
  .piece:first-child {
    gap: 0.85rem;
    min-height: 0;
    align-items: center;
  }

  .piece__media {
    /* One centered 20rem field; same rule for every piece, including the first. */
    width: min(100%, 20rem);
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .piece__meta {
    width: min(100%, 20rem);
    max-width: 20rem;
    padding: 0 0.1rem 0.15rem;
    gap: 0.38rem;
    align-self: center;
  }

  .piece__title {
    font-size: clamp(1.22rem, 5.2vw, 1.45rem);
  }

  .piece__price {
    font-size: 1.04rem;
  }

  .piece__cue {
    font-size: 0.94rem;
  }

  .gallery-item,
  .gallery-item--a,
  .gallery-item--b,
  .gallery-item--c,
  .gallery-item--d {
    grid-template-columns: 1fr;
    max-width: none;
    margin-left: 0;
  }

  .gallery-item--b .gallery-item__meta {
    order: 0;
    text-align: left;
    margin-left: 0;
  }

  .gallery-item__media,
  .gallery-item--a .gallery-item__media,
  .gallery-item--c .gallery-item__media {
    width: calc(100% + (var(--shell-pad-x) * 0.9));
    margin-left: calc(var(--shell-pad-x) * -0.45);
    margin-right: calc(var(--shell-pad-x) * -0.45);
    min-height: min(44svh, 19rem);
    height: min(44svh, 19rem);
  }

  .shell-held__body {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    min-height: 0;
    justify-items: center;
  }

  .shell-held__media {
    width: min(100%, 20rem);
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    justify-self: center;
  }

  .shell-held__frame {
    inset: -5.5% -2.4%;
  }

  .shell-held__meta {
    max-width: min(100%, 22rem);
    width: 100%;
    justify-self: center;
  }

  .prose h1,
  .gallery-intro h1 {
    font-size: clamp(2.2rem, 10.2vw, 2.85rem);
  }
}

/* ——— Consultation destination: Rana's own ring sketch as the full-page world.
   Contain/right-side composition keeps both top and side views recognizable;
   left copy rides a deep aubergine wash into the paper field. No cards/panels. */

.page-consultation .shell-ground {
  /* Paper field is part of the world; sketch sits on it, not over purple fog. */
  background: #f4f1ea;
}

.page-consultation .shell-ground--sketch .shell-ground__image {
  /* Full square drawing held sharp — line work and pale blue stone stay legible. */
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  filter: none;
  transform: none;
  transform-origin: 70% 48%;
  /* Landscape desktop: contain so both views stay whole; bias right for copy. */
  object-fit: contain;
  object-position: 88% 48%;
}

.page-consultation .shell-ground__scrim {
  /* Directional deep aubergine / near-black wash: chrome hold, left copy support,
     soft yield into the lighter sketch field. No rectangular overlay panel. */
  background:
    linear-gradient(
      180deg,
      rgba(10, 2, 14, 0.72) 0%,
      rgba(10, 2, 14, 0.28) 12%,
      rgba(10, 2, 14, 0.08) 24%,
      transparent 38%
    ),
    linear-gradient(
      90deg,
      rgba(10, 2, 14, 0.9) 0%,
      rgba(18, 4, 24, 0.78) 18%,
      rgba(18, 4, 24, 0.42) 34%,
      rgba(18, 4, 24, 0.12) 48%,
      transparent 62%
    ),
    radial-gradient(
      ellipse 70% 105% at 6% 48%,
      rgba(10, 2, 14, 0.88) 0%,
      rgba(18, 4, 24, 0.62) 30%,
      rgba(18, 4, 24, 0.28) 54%,
      rgba(18, 4, 24, 0.08) 70%,
      transparent 82%
    ),
    radial-gradient(
      ellipse 55% 48% at 14% 90%,
      rgba(10, 2, 14, 0.48) 0%,
      rgba(10, 2, 14, 0.14) 46%,
      transparent 74%
    );
}

.page-consultation .shell-ground__grain {
  opacity: 0.03;
}

.page-consultation .shell-main {
  /* Authored full viewport: sketch fills the frame; passage sits in the wash. */
  min-height: 100svh;
  padding-bottom: calc(2.4rem + var(--safe-bottom));
  box-sizing: border-box;
}

.page-consultation .consult-passage {
  /* Leave the right paper field open so both ring views remain the scene. */
  max-width: min(34rem, 44vw);
  padding-bottom: 0.35rem;
}

.page-consultation .consult-passage h1 {
  text-shadow:
    0 1px 2px rgba(2, 0, 5, 0.62),
    0 2px 28px rgba(2, 0, 5, 0.55),
    0 0 40px rgba(2, 0, 5, 0.36);
}

.page-consultation .consult-passage .lede {
  margin-bottom: 1.35rem;
  max-width: 30rem;
  color: var(--cream);
  text-shadow:
    0 1px 2px rgba(2, 0, 5, 0.62),
    0 2px 24px rgba(2, 0, 5, 0.55);
}

.page-consultation .consult-passage p {
  margin-bottom: 0.88rem;
  max-width: 32rem;
  font-size: clamp(1.02rem, 1.28vw, 1.14rem);
  line-height: 1.5;
  text-shadow:
    0 1px 2px rgba(2, 0, 5, 0.55),
    0 2px 22px rgba(2, 0, 5, 0.48);
}

.page-consultation .consult-passage a {
  /* Long mail and listing URLs stay inside the measure; no horizontal spill. */
  overflow-wrap: anywhere;
  text-shadow:
    0 1px 2px rgba(2, 0, 5, 0.6),
    0 2px 18px rgba(2, 0, 5, 0.45);
}

@media (max-width: 700px) {
  .page-consultation .shell-ground {
    background: #f4f1ea;
  }

  .page-consultation .shell-ground--sketch .shell-ground__image {
    /* Tall mobile: crop outer band ends; keep stone + top/side views legible. */
    object-fit: cover;
    object-position: 50% 42%;
    transform: none;
    filter: none;
  }

  .page-consultation .shell-ground__scrim {
    /* Stronger left/top wash so type stays legible over the pale sketch paper. */
    background:
      linear-gradient(
        180deg,
        rgba(10, 2, 14, 0.78) 0%,
        rgba(10, 2, 14, 0.42) 14%,
        rgba(10, 2, 14, 0.16) 28%,
        transparent 42%
      ),
      linear-gradient(
        90deg,
        rgba(10, 2, 14, 0.88) 0%,
        rgba(18, 4, 24, 0.72) 28%,
        rgba(18, 4, 24, 0.36) 52%,
        rgba(18, 4, 24, 0.1) 72%,
        transparent 88%
      ),
      radial-gradient(
        ellipse 130% 90% at 22% 40%,
        rgba(10, 2, 14, 0.86) 0%,
        rgba(18, 4, 24, 0.58) 36%,
        rgba(18, 4, 24, 0.22) 62%,
        transparent 80%
      ),
      linear-gradient(
        0deg,
        rgba(10, 2, 14, 0.58) 0%,
        rgba(10, 2, 14, 0.22) 20%,
        transparent 46%
      );
  }

  .page-consultation .shell-main {
    /* Existing full-viewport mobile behavior; allow exact height if words fit. */
    min-height: 100svh;
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: calc(3.5rem + var(--safe-bottom));
  }

  .page-consultation .consult-passage {
    max-width: 100%;
    width: 100%;
  }

  .page-consultation .consult-passage .lede,
  .page-consultation .consult-passage p {
    max-width: 100%;
  }

  .page-consultation .consult-passage p {
    font-size: clamp(1.02rem, 4.1vw, 1.1rem);
  }
}

/* Explicit quiet mode: rest composition only, no decorative animation. */

html.is-quiet .shell-ground__image,
html.is-quiet .piece__image,
html.is-quiet .gallery-item__image,
html.is-quiet .shell-held__image,
html.is-quiet .prose-figure img {
  transform: none;
}

html.is-quiet .shell-index-dialog,
html.is-quiet .shell-held,
html.is-quiet .shell-held__image {
  transition: none;
}
