:root {
  --rites-panel: rgba(3, 12, 34, 0.74);
  --rites-panel-strong: rgba(4, 10, 26, 0.84);
  --rites-stroke: rgba(176, 151, 96, 0.28);
  --rites-stroke-soft: rgba(136, 156, 214, 0.16);
  --rites-glow: rgba(219, 176, 90, 0.28);
  --rites-silver: rgba(215, 224, 255, 0.72);
}

.ts-rites-wrap {
  padding-bottom: 2rem;
}

.ts-rites-stage {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 132px);
  padding: 2rem;
  border-radius: 2rem;
  border: 1px solid var(--rites-stroke-soft);
  background: radial-gradient(circle at top, rgba(14, 31, 77, 0.24), rgba(4, 8, 20, 0.9) 74%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 22px 60px rgba(0, 0, 0, 0.36);
}

.ts-rites-worldback,
.ts-rites-worldback > * {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ts-rites-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.42s ease;
}

.ts-rites-bg-secondary {
  opacity: 0;
}

.ts-rites-vignette-shade {
  background:
    radial-gradient(circle at center, rgba(7, 16, 38, 0.14), rgba(1, 3, 10, 0.74) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.52));
}

.ts-rites-gridveil {
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.2;
  mix-blend-mode: screen;
}

.ts-rites-rings {
  border-radius: 50%;
  border: 1px solid rgba(179, 192, 255, 0.12);
  mix-blend-mode: screen;
}

.ts-rites-rings-a {
  inset: 7% auto auto 57%;
  width: 620px;
  height: 620px;
}

.ts-rites-rings-b {
  inset: auto auto 8% -4%;
  width: 480px;
  height: 480px;
}

.ts-rites-motes span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 238, 201, 0.58);
  box-shadow: 0 0 12px rgba(255, 229, 172, 0.46);
  animation: ritesDrift 14s linear infinite;
}

.ts-rites-motes span:nth-child(1) { top: 16%; left: 18%; animation-delay: 0s; }
.ts-rites-motes span:nth-child(2) { top: 28%; left: 72%; animation-delay: -3s; }
.ts-rites-motes span:nth-child(3) { top: 44%; left: 40%; animation-delay: -7s; }
.ts-rites-motes span:nth-child(4) { top: 62%; left: 84%; animation-delay: -9s; }
.ts-rites-motes span:nth-child(5) { top: 78%; left: 22%; animation-delay: -11s; }
.ts-rites-motes span:nth-child(6) { top: 22%; left: 58%; animation-delay: -5s; }
.ts-rites-motes span:nth-child(7) { top: 70%; left: 52%; animation-delay: -1s; }
.ts-rites-motes span:nth-child(8) { top: 34%; left: 87%; animation-delay: -13s; }

.ts-rites-headerband,
.ts-rites-topgrid,
.ts-rites-bottomgrid {
  position: relative;
  z-index: 2;
}

.ts-rites-headerband {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 64rem;
  margin-bottom: 1.4rem;
}

.ts-rites-overline,
.ts-rites-kicker {
  font-family: "Cinzel", serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: rgba(226, 203, 151, 0.96);
}

.ts-rites-title {
  margin: 0;
  color: #f7f2e6;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
}

.ts-rites-intro {
  max-width: 52rem;
  margin: 0;
  color: rgba(232, 234, 245, 0.86);
}

.ts-rites-topgrid {
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(620px, 1.22fr);
  gap: 1.35rem;
  align-items: stretch;
}

.ts-rites-hubpanel,
.ts-rites-viewerpanel,
.ts-rites-mini {
  background: var(--rites-panel);
  border: 1px solid var(--rites-stroke-soft);
  border-radius: 1.7rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  backdrop-filter: blur(14px);
}

.ts-rites-hubpanel {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ts-rites-orbitwrap {
  display: grid;
  place-items: center;
  min-height: 33rem;
}

.ts-rites-orbitstage {
  --orbit-main-size: min(100%, 52rem);
  --orbit-main-radius: 19.8rem;
  --orbit-bridge-radius: 24.5rem;
  position: relative;
  width: var(--orbit-main-size);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}

.ts-rites-orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.ts-rites-orbit-ring-main {
  width: calc(var(--orbit-main-radius) * 2);
  height: calc(var(--orbit-main-radius) * 2);
  border: 1px solid rgba(222, 189, 112, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 30px rgba(219, 176, 90, 0.08);
}

.ts-rites-orbit-ring-bridge {
  width: calc(var(--orbit-bridge-radius) * 2);
  height: calc(var(--orbit-bridge-radius) * 2);
  border: 1px dashed rgba(181, 198, 255, 0.12);
  opacity: 0.55;
}

.ts-rites-node {
  position: absolute;
  width: 8.5rem;
  height: 8.5rem;
  display: grid;
  place-items: end center;
  padding: 0.75rem 0.6rem 0.85rem;
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid rgba(181, 198, 255, 0.16);
  background: linear-gradient(180deg, rgba(9, 23, 57, 0.82), rgba(8, 18, 42, 0.94));
  color: rgba(243, 239, 232, 0.96);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    filter 0.18s ease;
  will-change: transform;
}

.ts-rites-node::before {
  content: "";
  position: absolute;
  inset: -0.7rem;
  clip-path: polygon(25% 6%, 75% 6%, 94% 50%, 75% 94%, 25% 94%, 6% 50%);
  border: 1px solid rgba(222, 189, 112, 0.22);
  opacity: 0.55;
  pointer-events: none;
}

.ts-rites-node-art,
.ts-rites-node-shade,
.ts-rites-node-sigil {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.ts-rites-node-art {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  transform: scale(1.02);
}

.ts-rites-node-art-center-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56%;
  height: 56%;
  object-fit: contain;
  object-position: center center;
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.ts-rites-node-center .ts-rites-node-label {
  position: absolute;
  left: 50%;
  bottom: 0.64rem;
  transform: translateX(-50%);
  width: 78%;
  margin: 0;
  text-align: center;
  line-height: 1.02;
  z-index: 2;
}

.ts-rites-node-shade {
  background:
    linear-gradient(180deg, rgba(5, 12, 30, 0.02), rgba(5, 12, 30, 0.10) 42%, rgba(4, 10, 26, 0.24)),
    radial-gradient(circle at 50% 18%, rgba(237, 214, 157, 0.10), transparent 58%);
}

.ts-rites-node:hover,
.ts-rites-node:focus-visible,
.ts-rites-node.is-active {
  border-color: rgba(231, 202, 132, 0.42);
  box-shadow:
    0 0 0 1px rgba(231, 202, 132, 0.18),
    0 10px 34px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(219, 176, 90, 0.18);
}

.ts-rites-node:hover,
.ts-rites-node:focus-visible {
  filter: brightness(1.04);
}

.ts-rites-node-center {
  top: 50%;
  left: 50%;
  width: 12rem;
  height: 12rem;
  padding: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(219, 176, 90, 0.24), rgba(31, 43, 80, 0.96) 74%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 76%);
  z-index: 1;
}

.ts-rites-node-center::before {
  inset: -1rem;
  clip-path: polygon(25% 6%, 75% 6%, 94% 50%, 75% 94%, 25% 94%, 6% 50%);
}

.ts-rites-node-sigil {
  background: none;
}

.ts-rites-node-orbit {
  top: 50%;
  left: 50%;
  z-index: 2;
}

.ts-rites-node-orbit[data-locus="A"] { box-shadow: 0 0 0 1px rgba(196, 214, 255, 0.10), 0 0 24px rgba(161, 194, 255, 0.10); }
.ts-rites-node-orbit[data-locus="B"] { box-shadow: 0 0 0 1px rgba(112, 204, 255, 0.10), 0 0 24px rgba(112, 204, 255, 0.12); }
.ts-rites-node-orbit[data-locus="C"] { box-shadow: 0 0 0 1px rgba(226, 184, 112, 0.10), 0 0 24px rgba(226, 184, 112, 0.12); }
.ts-rites-node-orbit[data-locus="D"] { box-shadow: 0 0 0 1px rgba(255, 214, 150, 0.10), 0 0 24px rgba(255, 214, 150, 0.12); }
.ts-rites-node-orbit[data-locus="E"] { box-shadow: 0 0 0 1px rgba(255, 170, 214, 0.10), 0 0 24px rgba(255, 170, 214, 0.12); }

.ts-rites-node-orbit[data-locus="A"]:hover,
.ts-rites-node-orbit[data-locus="A"].is-active { border-color: rgba(196, 214, 255, 0.62); box-shadow: 0 0 0 1px rgba(196, 214, 255, 0.22), 0 10px 34px rgba(0,0,0,0.34), 0 0 30px rgba(161,194,255,0.24); }
.ts-rites-node-orbit[data-locus="B"]:hover,
.ts-rites-node-orbit[data-locus="B"].is-active { border-color: rgba(112, 204, 255, 0.58); box-shadow: 0 0 0 1px rgba(112, 204, 255, 0.20), 0 10px 34px rgba(0,0,0,0.34), 0 0 30px rgba(112,204,255,0.24); }
.ts-rites-node-orbit[data-locus="C"]:hover,
.ts-rites-node-orbit[data-locus="C"].is-active { border-color: rgba(226, 184, 112, 0.58); box-shadow: 0 0 0 1px rgba(226, 184, 112, 0.20), 0 10px 34px rgba(0,0,0,0.34), 0 0 30px rgba(226,184,112,0.24); }
.ts-rites-node-orbit[data-locus="D"]:hover,
.ts-rites-node-orbit[data-locus="D"].is-active { border-color: rgba(255, 214, 150, 0.62); box-shadow: 0 0 0 1px rgba(255, 214, 150, 0.22), 0 10px 34px rgba(0,0,0,0.34), 0 0 30px rgba(255,214,150,0.26); }
.ts-rites-node-orbit[data-locus="E"]:hover,
.ts-rites-node-orbit[data-locus="E"].is-active { border-color: rgba(255, 170, 214, 0.62); box-shadow: 0 0 0 1px rgba(255, 170, 214, 0.22), 0 10px 34px rgba(0,0,0,0.34), 0 0 30px rgba(255,170,214,0.26); }

.ts-rites-node-code {
  display: none;
}

.ts-rites-node-name,
.ts-rites-node-label {
  position: relative;
  z-index: 2;
  display: block;
  font-family: "EB Garamond", serif;
  font-size: 1.18rem;
  line-height: 1.03;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.ts-rites-hubtitle {
  font-family: "EB Garamond", serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: #f5f0e6;
}

.ts-rites-hubtext {
  color: rgba(228, 231, 242, 0.84);
  font-size: 1.05rem;
  line-height: 1.48;
}

.ts-rites-viewerpanel {
  padding: 1.15rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 1rem;
  min-height: 44rem;
}

.ts-rites-viewerframe {
  position: relative;
  min-height: 28rem;
  border-radius: 1.65rem;
  overflow: hidden;
  border: 1px solid rgba(177, 196, 255, 0.12);
  background: rgba(3, 8, 20, 0.82);
}

.ts-rites-mainstill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ts-rites-mainvideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.72);
}

.ts-rites-mainvideo.is-hidden {
  display: none;
}

/* Past Rite foreshadow veil: prior charge through the Active Field. */
.ts-rites-pastritevideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: saturate(1.08) contrast(1.06) brightness(1.04);
}

.ts-rites-pastritevideo.is-active {
  animation: ritesPastRiteForeshadow var(--rites-past-duration, 2800ms) ease-in-out forwards;
}

@keyframes ritesPastRiteForeshadow {
  0% { opacity: 0; }
  18% { opacity: var(--rites-past-opacity, 0.24); }
  68% { opacity: var(--rites-past-opacity, 0.24); }
  100% { opacity: 0; }
}

.ts-rites-mainveil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.06) 32%, rgba(0,0,0,0.54));
}

.ts-rites-mainhalo {
  position: absolute;
  inset: auto auto 14% 50%;
  width: 58%;
  height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(255, 225, 173, 0.16), rgba(255, 225, 173, 0.02) 68%, transparent 72%);
  pointer-events: none;
}

.ts-rites-maincaption {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(5, 12, 28, 0.5), rgba(5, 12, 28, 0.76));
  border: 1px solid rgba(178, 191, 246, 0.12);
  backdrop-filter: blur(12px);
}

.ts-rites-scene-title {
  font-family: "EB Garamond", serif;
  font-size: clamp(2.1rem, 3vw, 3rem);
  color: #faf6ed;
}

.ts-rites-scene-note {
  color: rgba(233, 235, 244, 0.86);
  font-size: 1.03rem;
  line-height: 1.45;
}

.ts-rites-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ts-rites-toolbar-left {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.ts-rites-toolbar-right {
  display: none;
}

.ts-rites-ghost {
  padding: 0.88rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(180, 195, 244, 0.18);
  background: rgba(7, 17, 41, 0.62);
  color: rgba(244, 238, 226, 0.84);
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
}

.ts-rites-ghost:disabled {
  opacity: 0.42;
}

.ts-rites-modebadge {
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 180, 102, 0.38);
  background: rgba(17, 28, 54, 0.72);
  color: #f3ece0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
}

.ts-rites-drawer {
  padding: 1rem;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(4, 11, 30, 0.66), rgba(6, 17, 43, 0.84));
  border: 1px solid rgba(176, 191, 255, 0.1);
}

.ts-rites-drawer-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
}

.ts-rites-drawer-title {
  font-family: "EB Garamond", serif;
  font-size: 1.45rem;
  color: #f4efe5;
}

.ts-rites-fragmentrail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.ts-rites-fragbtn {
  display: grid;
  gap: 0.45rem;
  padding: 0.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(177, 190, 255, 0.12);
  background: rgba(7, 16, 39, 0.64);
  color: rgba(245, 241, 232, 0.92);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ts-rites-fragbtn:hover,
.ts-rites-fragbtn:focus-visible,
.ts-rites-fragbtn.is-active {
  transform: translateY(-2px);
  border-color: rgba(231, 202, 132, 0.36);
  box-shadow: 0 0 0 1px rgba(231, 202, 132, 0.12), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ts-rites-fragthumb {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  border-radius: 0.8rem;
}

.ts-rites-fraglabel {
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(228, 203, 149, 0.92);
}

.ts-rites-bottomgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ts-rites-mini {
  padding: 1rem 1.15rem;
}

.ts-rites-mini-speech {
  grid-column: span 1;
}

.ts-rites-minivalue {
  font-family: "EB Garamond", serif;
  font-size: 1.95rem;
  color: #f7f2e8;
}

.ts-rites-mininote,
.ts-rites-minispeech {
  color: rgba(232, 235, 244, 0.84);
  line-height: 1.46;
  font-size: 1rem;
}

@keyframes ritesDrift {
  0% { transform: translateY(0) scale(0.92); opacity: 0.35; }
  50% { transform: translateY(-12px) scale(1.08); opacity: 0.88; }
  100% { transform: translateY(0) scale(0.92); opacity: 0.35; }
}

@media (max-width: 1380px) {
  .ts-rites-topgrid {
    grid-template-columns: 1fr;
  }

  .ts-rites-viewerpanel {
    min-height: 0;
  }

  .ts-rites-bottomgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ts-rites-stage {
    padding: 1rem;
  }

  .ts-rites-orbitwrap {
    min-height: 20rem;
  }

  .ts-rites-orbitstage {
    --orbit-main-size: min(100%, 36rem);
    --orbit-main-radius: 15.4rem;
    --orbit-bridge-radius: 19rem;
  }

  .ts-rites-node {
    width: 6.6rem;
    height: 6.6rem;
  }

  .ts-rites-node-center {
    width: 9.25rem;
    height: 9.25rem;
  }

  .ts-rites-fragmentrail,
  .ts-rites-bottomgrid {
    grid-template-columns: 1fr;
  }

  .ts-rites-toolbar {
    align-items: flex-start;
  }
}

/* MR canonical precinct patch: visible tiles use names only; stage numbers remain hidden. */
.ts-rites-node-code {
  display: none !important;
}

.ts-rites-surroundingwash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.5s ease;
  mix-blend-mode: screen;
}

.ts-rites-surroundingwash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 230, 184, 0.12), rgba(5, 12, 30, 0.42) 70%);
}

.ts-rites-surroundingwash.is-active {
  opacity: 0.4;
}

.ts-rites-mainstill,
.ts-rites-mainvideo {
  z-index: 0;
}

.ts-rites-mainveil,
.ts-rites-mainhalo,
.ts-rites-maincaption {
  z-index: 2;
}


/* MR loci-drawer placement patch: Locus -> four carried loci -> Active Field. */
.ts-rites-topgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.ts-rites-hubpanel {
  gap: 0.72rem;
}

.ts-rites-orbitwrap {
  min-height: 32rem;
}

.ts-rites-hubnote {
  margin-top: 0;
}

.ts-rites-drawer {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0.82rem 0.92rem 0.92rem;
}

.ts-rites-drawer-head {
  margin-bottom: 0.62rem;
}

.ts-rites-drawer-title {
  font-size: 1.28rem;
}

.ts-rites-fragmentrail {
  gap: 0.65rem;
}

.ts-rites-fragbtn {
  gap: 0;
  padding: 0.42rem;
}

.ts-rites-fragthumb {
  aspect-ratio: 9 / 4.8;
}

.ts-rites-fraglabel {
  display: none !important;
}

.ts-rites-viewerpanel {
  min-height: 0;
  grid-template-rows: minmax(24rem, 38rem) auto;
  gap: 0.82rem;
  margin: 0;
}

.ts-rites-viewerframe {
  min-height: 24rem;
}

.ts-rites-bottomgrid {
  margin-top: 0.72rem;
}

.ts-rites-surroundingwash {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transform: none;
  background-position: center;
  background-size: cover;
  mix-blend-mode: screen;
  transition: none;
}

.ts-rites-surroundingwash.is-active {
  animation: ritesSurroundingDissolve 2.5s linear forwards;
}

@keyframes ritesSurroundingDissolve {
  0% { opacity: 0.5; }
  100% { opacity: 0; }
}

@media (max-width: 900px) {
  .ts-rites-topgrid {
    gap: 0.5rem;
  }

  .ts-rites-orbitwrap {
    min-height: 20rem;
  }

  .ts-rites-viewerpanel {
    grid-template-rows: minmax(20rem, auto) auto;
  }
}

/* MR surgical pass: compact header/locus spacing, place Surroundings cleanly between Locus and Active Field. */
.ts-rites-stage {
  padding-top: 1.15rem;
}

.ts-rites-headerband {
  gap: 0.22rem;
  margin-bottom: 0.62rem;
}

.ts-rites-intro {
  line-height: 1.42;
}

.ts-rites-topgrid {
  gap: 0.42rem;
}

.ts-rites-hubpanel {
  padding: 0.95rem 1.25rem 0.75rem;
  gap: 0.28rem;
  overflow: hidden;
}

.ts-rites-hubpanel > .ts-rites-kicker {
  margin-bottom: 0;
}

.ts-rites-orbitwrap {
  min-height: 29.5rem;
  margin-top: -0.65rem;
  margin-bottom: -0.85rem;
}

.ts-rites-orbitstage {
  transform: translateY(-0.75rem);
}

.ts-rites-hubnote {
  display: none !important;
}

.ts-rites-drawer {
  margin-top: 0;
  margin-bottom: 0;
}

.ts-rites-viewerpanel {
  margin-top: 0;
}

.ts-rites-maincaption #ritesModeKicker,
#ritesModeKicker {
  letter-spacing: 0.18em;
}

@media (max-width: 900px) {
  .ts-rites-stage {
    padding-top: 0.9rem;
  }
  .ts-rites-headerband {
    margin-bottom: 0.5rem;
  }
  .ts-rites-orbitwrap {
    min-height: 22rem;
    margin-top: -0.35rem;
    margin-bottom: -0.5rem;
  }
  .ts-rites-orbitstage {
    transform: translateY(-0.35rem);
  }
}

/* MR surgical tightening: Locus block vertical compression; tile sizes unchanged. */
.ts-rites-headerband {
  margin-bottom: 0.75rem;
}

.ts-rites-hubpanel {
  padding: 1rem 1.35rem 1.05rem;
  gap: 0.45rem;
}

.ts-rites-hubpanel > .ts-rites-kicker {
  margin-bottom: -0.15rem;
}

.ts-rites-orbitwrap {
  min-height: 0;
  padding: 0;
  margin: 0;
}

/* MR baseline tightening pass: keep tile size and side orbit proportions; reduce only vertical slack around the Locus field. */
.ts-rites-hubpanel {
  padding-top: 1rem;
  padding-bottom: 1rem;
  overflow: hidden;
}

.ts-rites-hubpanel > .ts-rites-kicker {
  margin-bottom: 0;
}

.ts-rites-orbitwrap {
  height: 42rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
}

.ts-rites-orbitstage {
  width: min(100%, 52rem);
  height: 42rem;
  aspect-ratio: auto;
  transform: none;
}

.ts-rites-drawer {
  margin-top: 0.48rem;
}

@media (max-width: 900px) {
  .ts-rites-orbitwrap {
    height: 30rem;
  }

  .ts-rites-orbitstage {
    height: 30rem;
  }
}

@media (max-width: 640px) {
  .ts-rites-orbitwrap {
    height: 25rem;
  }

  .ts-rites-orbitstage {
    height: 25rem;
  }
}

/* MR surgical pass: remove Locus title space, reduce whole orbit field by about 20 percent, and keep side breathing room. */
.ts-rites-hubpanel {
  padding: 0.65rem 1.35rem;
  gap: 0;
  overflow: hidden;
}

.ts-rites-orbitwrap {
  height: 33.6rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
}

.ts-rites-orbitstage {
  --orbit-main-size: min(100%, 41.6rem);
  --orbit-main-radius: 15.85rem;
  --orbit-bridge-radius: 19.6rem;
  width: var(--orbit-main-size);
  height: auto;
  aspect-ratio: 1 / 1;
  transform: none;
}

.ts-rites-node {
  width: 6.8rem;
  height: 6.8rem;
  padding: 0.58rem 0.48rem 0.64rem;
  border-radius: 1.15rem;
}

.ts-rites-node-center {
  width: 9.6rem;
  height: 9.6rem;
}

.ts-rites-node-center .ts-rites-node-label {
  display: none;
}

.ts-rites-node-name {
  font-size: 0.96rem;
  line-height: 1.02;
}

@media (max-width: 900px) {
  .ts-rites-orbitwrap {
    height: 24rem;
  }

  .ts-rites-orbitstage {
    --orbit-main-size: min(100%, 28.8rem);
    --orbit-main-radius: 12.3rem;
    --orbit-bridge-radius: 15.2rem;
  }

  .ts-rites-node {
    width: 5.3rem;
    height: 5.3rem;
  }

  .ts-rites-node-center {
    width: 7.4rem;
    height: 7.4rem;
  }
}

@media (max-width: 640px) {
  .ts-rites-orbitwrap {
    height: 20rem;
  }

  .ts-rites-orbitstage {
    --orbit-main-size: min(100%, 24rem);
    --orbit-main-radius: 10.1rem;
    --orbit-bridge-radius: 12.6rem;
  }

  .ts-rites-node {
    width: 4.65rem;
    height: 4.65rem;
  }

  .ts-rites-node-name {
    font-size: 0.78rem;
  }

  .ts-rites-node-center {
    width: 6.5rem;
    height: 6.5rem;
  }
}

/* MR surgical pass: restore the Locus as a wide oblong field while preserving the current reduced tile scale. */
.ts-rites-hubpanel {
  padding: 0.55rem 1.35rem;
  overflow: hidden;
}

.ts-rites-orbitwrap {
  height: 31rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
}

.ts-rites-orbitstage {
  width: min(100%, 52rem);
  height: 31rem;
  aspect-ratio: auto;
  margin-inline: auto;
  transform: none;
}

.ts-rites-orbit-ring-main {
  width: min(100%, 42rem);
  height: 24rem;
}

.ts-rites-orbit-ring-bridge {
  width: min(100%, 50rem);
  height: 30rem;
}

.ts-rites-node-center {
  width: 9.4rem;
  height: 9.4rem;
}

@media (max-width: 900px) {
  .ts-rites-orbitwrap {
    height: 23rem;
  }

  .ts-rites-orbitstage {
    width: min(100%, 38rem);
    height: 23rem;
    aspect-ratio: auto;
  }

  .ts-rites-orbit-ring-main {
    width: min(100%, 31rem);
    height: 17.5rem;
  }

  .ts-rites-orbit-ring-bridge {
    width: min(100%, 37rem);
    height: 22rem;
  }
}

@media (max-width: 640px) {
  .ts-rites-orbitwrap {
    height: 20rem;
  }

  .ts-rites-orbitstage {
    width: min(100%, 32rem);
    height: 20rem;
    aspect-ratio: auto;
  }

  .ts-rites-orbit-ring-main {
    width: min(100%, 26rem);
    height: 15rem;
  }

  .ts-rites-orbit-ring-bridge {
    width: min(100%, 31rem);
    height: 19rem;
  }
}

/* MR surgical baseline: transparent centre sigil and final threshold title. */
.ts-rites-node-center,
.ts-rites-node-center:hover,
.ts-rites-node-center:focus-visible,
.ts-rites-node-center.is-active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none;
}

.ts-rites-node-center::before,
.ts-rites-node-center .ts-rites-node-sigil {
  display: none !important;
}

/* MR baseline hardening: ensure Active Field halo remains suppressed. */
.ts-rites-mainhalo {
  display: none !important;
}

/* MR baseline hardening: Locus translucence and Active Field halo suppression. */
.ts-rites-hubpanel {
  background: rgba(5, 12, 30, 0.25);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.ts-rites-mainhalo {
  display: none !important;
}



/* MR Chamber v1 clean section: state-driven backend continuation renderer.
   Landing, orbit, Surroundings and Active Field rules above this line are preserved.
   This section replaces the accumulated Chamber patch stack. */

/* 1. Chamber shell state --------------------------------------------------- */
.ts-rites-chamberbody {
  display: none;
}

.ts-rites-stage.is-chamber {
  min-height: calc(100vh - 132px);
}

.ts-rites-stage.is-chamber .ts-rites-headerband,
.ts-rites-stage.is-chamber .ts-rites-hubpanel,
.ts-rites-stage.is-chamber .ts-rites-drawer,
.ts-rites-stage.is-chamber .ts-rites-bottomgrid {
  display: none !important;
}

.ts-rites-stage.is-chamber .ts-rites-topgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.ts-rites-stage.is-chamber .ts-rites-viewerpanel {
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: clamp(1rem, 2vw, 1.65rem);
  display: block;
  background:
    radial-gradient(circle at 18% 4%, rgba(219, 176, 90, 0.08), transparent 32%),
    radial-gradient(circle at 78% 0%, rgba(107, 132, 214, 0.10), transparent 36%),
    linear-gradient(180deg, rgba(3, 8, 20, 0.68), rgba(2, 5, 14, 0.88));
  border-color: rgba(231, 202, 132, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 22px 62px rgba(0, 0, 0, 0.35);
}

.ts-rites-stage.is-chamber .ts-rites-viewerframe {
  display: none !important;
}

.ts-rites-stage.is-chamber .ts-rites-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.35rem);
  align-items: start;
}

.ts-rites-stage.is-chamber .ts-rites-toolbar-right {
  display: none !important;
}

.ts-rites-stage.is-chamber .ts-rites-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  width: min(100%, 82rem);
  margin: 0 auto;
  order: 2;
}

.ts-rites-stage.is-chamber .ts-primary-btn,
.ts-rites-stage.is-chamber .ts-rites-ghost {
  min-height: 3.15rem;
  padding: 0.9rem 1.55rem;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continuing"] .ts-rites-chamberbody {
  opacity: 0.82;
}

/* 2. Chamber layout ------------------------------------------------------- */
.ts-rites-stage.is-chamber .ts-rites-chamberbody.is-visible {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.35rem);
  width: min(100%, 82rem);
  margin: 0 auto;
  order: 1;
}

.ts-rites-stage.is-chamber .ts-rites-storycascade {
  order: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.85rem, 1.65vw, 1.15rem);
  width: 100%;
  margin: 0;
  padding: 0;
}

.ts-rites-stage.is-chamber .ts-rites-chamberstory {
  order: 2;
  display: block;
  width: 100%;
  padding: clamp(1.05rem, 2.2vw, 1.45rem);
  border: 1px solid rgba(177, 196, 255, 0.16);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at top left, rgba(219, 176, 90, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(4, 12, 31, 0.74), rgba(2, 6, 18, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 14px 34px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ts-rites-stage.is-chamber .ts-rites-chamberstory[aria-hidden="true"] {
  display: none;
}

.ts-rites-stage.is-chamber .ts-rites-chamberstory-title {
  margin: 0.22rem 0 0.62rem;
  font-family: "EB Garamond", serif;
  font-size: clamp(2rem, 3.5vw, 3.15rem);
  line-height: 1.02;
  color: #fbf6ec;
  text-wrap: balance;
}

.ts-rites-stage.is-chamber .ts-rites-chamberstory-body {
  margin: 0;
  max-width: 74rem;
  color: rgba(235, 238, 247, 0.9);
  font-size: clamp(1.05rem, 1.38vw, 1.22rem);
  line-height: 1.56;
  white-space: pre-line;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-chamberstory {
  order: 0;
  padding: clamp(1.2rem, 2.4vw, 1.7rem);
  border-color: rgba(231, 202, 132, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 18px 38px rgba(0,0,0,0.24);
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-storycascade {
  order: 1;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-chamberstory-title {
  font-size: clamp(2.3rem, 4vw, 3.6rem);
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-chamberstory-body {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
}


/* 3. Fourfold determinant bands ------------------------------------------ */
.ts-rites-stage.is-chamber .ts-rites-storystep {
  position: relative;
  display: grid;
  gap: clamp(0.78rem, 1.55vw, 1rem);
  align-items: stretch;
  min-height: 0;
  margin: 0;
}

.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="past"],
.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="bridge"] {
  grid-template-columns: minmax(9.25rem, 13rem) minmax(0, 1fr);
}

.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"],
.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] {
  grid-template-columns: minmax(0, 1fr) minmax(9.25rem, 13rem);
}

.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"] .ts-rites-storycopy,
.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] .ts-rites-storycopy {
  grid-column: 1;
  grid-row: 1;
}

.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"] .ts-rites-storycard,
.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] .ts-rites-storycard {
  grid-column: 2;
  grid-row: 1;
}

.ts-rites-stage.is-chamber .ts-rites-storycard,
.ts-rites-stage.is-chamber .ts-rites-storycopy {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(177, 196, 255, 0.15);
  border-radius: 1.16rem;
  background:
    radial-gradient(circle at top left, rgba(219, 176, 90, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(4, 12, 31, 0.78), rgba(2, 6, 18, 0.91));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 14px 34px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ts-rites-stage.is-chamber .ts-rites-storycard {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  padding: 0.72rem;
}

.ts-rites-stage.is-chamber .ts-rites-storycopy {
  display: grid;
  align-content: center;
  padding: clamp(0.92rem, 1.7vw, 1.15rem);
}

.ts-rites-stage.is-chamber .ts-rites-storycopy-title {
  margin: 0.2rem 0 0.28rem;
  font-family: "EB Garamond", serif;
  font-size: clamp(1.35rem, 2.05vw, 1.85rem);
  line-height: 1.04;
  color: #f8f2e7;
}

.ts-rites-stage.is-chamber .ts-rites-storycopy-body {
  margin: 0;
  color: rgba(232, 235, 244, 0.88);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.46;
  white-space: pre-line;
}

.ts-rites-stage.is-chamber .ts-rites-storycard-value {
  display: block;
  margin-top: 0.35rem;
  font-family: "EB Garamond", serif;
  font-size: clamp(1.12rem, 1.6vw, 1.45rem);
  line-height: 1.08;
  color: #fbf6ec;
  text-align: center;
  text-wrap: balance;
}

.ts-rites-stage.is-chamber .ts-rites-storycard--chooser > .ts-rites-storycard-value {
  display: none !important;
}

.ts-rites-stage.is-chamber .ts-rites-strip-image,
.ts-rites-stage.is-chamber .ts-rites-strip-video,
.ts-rites-stage.is-chamber .ts-rites-present-viewport,
.ts-rites-stage.is-chamber .ts-rites-door-image {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 0.82rem;
  border: 1px solid rgba(177, 196, 255, 0.15);
  background: radial-gradient(circle at center, rgba(16, 26, 55, 0.9), rgba(3, 7, 18, 0.98));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.ts-rites-stage.is-chamber .ts-rites-strip-image,
.ts-rites-stage.is-chamber .ts-rites-strip-video,
.ts-rites-stage.is-chamber .ts-rites-present-viewport,
.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] .ts-rites-door-image {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="bridge"] .ts-rites-storycard {
  justify-content: flex-start;
}

.ts-rites-stage.is-chamber .ts-rites-storystep[data-step="bridge"] .ts-rites-door-image {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.ts-rites-stage.is-chamber .ts-rites-strip-video.is-hidden,
.ts-rites-stage.is-chamber .ts-rites-strip-image.is-empty,
.ts-rites-stage.is-chamber .ts-rites-door-image.is-empty {
  display: none;
}

.ts-rites-stage.is-chamber .ts-rites-strip-video.is-visible {
  display: block;
}

.ts-rites-stage.is-chamber .ts-rites-storycard--image .ts-rites-strip-image.has-video-visible {
  display: none;
}

/* 4. Present Rite chooser ------------------------------------------------- */
.ts-rites-stage.is-chamber .ts-rites-presentchooser {
  display: grid;
  gap: 0.62rem;
}

.ts-rites-stage.is-chamber .ts-rites-present-viewport {
  position: relative;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  isolation: isolate;
}

.ts-rites-stage.is-chamber .ts-rites-present-viewport:disabled {
  cursor: default;
  opacity: 0.76;
}

.ts-rites-stage.is-chamber .ts-rites-present-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.ts-rites-stage.is-chamber .ts-rites-present-status,
.ts-rites-stage.is-chamber .ts-rites-present-meta {
  display: none !important;
}

.ts-rites-stage.is-chamber .ts-rites-present-actions {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.ts-rites-stage.is-chamber .ts-rites-present-actions .ts-rites-ghost {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-present-actions,
.ts-rites-stage.is-chamber[data-chamber-phase="continuing"] .ts-rites-present-actions {
  display: none !important;
}

.ts-rites-present-sprinkle {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.ts-rites-present-sprinkle span {
  position: absolute;
  width: 25%;
  height: 25%;
  background-image: var(--next-image);
  background-size: 400% 400%;
  opacity: 0;
  transform: scale(0.72) rotate(var(--tile-rot, 0deg));
  animation: ts-present-sprinkle 0.62s ease both;
  animation-delay: var(--tile-delay, 0s);
}

@keyframes ts-present-sprinkle {
  0% { opacity: 0; transform: scale(0.62) rotate(var(--tile-rot, 0deg)); filter: brightness(1.25) saturate(1.08); }
  48% { opacity: 1; transform: scale(1.02) rotate(0deg); filter: brightness(1.05) saturate(1.02); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: none; }
}

/* 5. Querent identification ----------------------------------------------- */
.ts-rites-stage.is-chamber .ts-rites-identity {
  order: 3;
  padding: clamp(1rem, 2vw, 1.3rem);
  border: 1px solid rgba(177, 196, 255, 0.16);
  border-radius: 1.28rem;
  background:
    radial-gradient(circle at top left, rgba(219, 176, 90, 0.11), transparent 38%),
    linear-gradient(180deg, rgba(4, 12, 31, 0.72), rgba(2, 6, 18, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 14px 34px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ts-rites-stage.is-chamber .ts-rites-identity-prompt {
  margin: 0.45rem 0 0.82rem;
  color: rgba(232, 235, 244, 0.88);
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.48;
}

.ts-rites-stage.is-chamber .ts-rites-identity-options {
  display: grid;
  gap: 0.65rem;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-identity {
  order: 2;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-identity-options {
  display: none;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-identity-prompt {
  margin: 0.3rem 0 0;
  font-size: clamp(1.02rem, 1.3vw, 1.12rem);
  color: rgba(244, 238, 226, 0.9);
}

.ts-rites-stage.is-chamber .ts-rites-idbtn {
  width: 100%;
  display: grid;
  gap: 0.22rem;
  padding: 0.86rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(180, 195, 244, 0.16);
  background: rgba(7, 17, 41, 0.62);
  color: rgba(244, 238, 226, 0.92);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.ts-rites-stage.is-chamber .ts-rites-idbtn span {
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.86rem;
  color: rgba(244, 224, 178, 0.96);
}

.ts-rites-stage.is-chamber .ts-rites-idbtn small {
  font-size: 0.98rem;
  line-height: 1.35;
  color: rgba(232, 235, 244, 0.78);
}

.ts-rites-stage.is-chamber .ts-rites-idbtn:disabled {
  opacity: 0.46;
  cursor: default;
}

.ts-rites-stage.is-chamber .ts-rites-idbtn:not(:disabled):hover,
.ts-rites-stage.is-chamber .ts-rites-idbtn:not(:disabled):focus-visible,
.ts-rites-stage.is-chamber .ts-rites-idbtn.is-selected {
  transform: translateY(-1px);
  border-color: rgba(231, 202, 132, 0.44);
  box-shadow: 0 0 0 1px rgba(231, 202, 132, 0.16), 0 10px 28px rgba(0, 0, 0, 0.28);
}

.ts-rites-stage.is-chamber .ts-rites-idbtn.is-selected {
  background:
    radial-gradient(circle at top left, rgba(231, 202, 132, 0.19), transparent 48%),
    rgba(9, 21, 48, 0.82);
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-idbtn,
.ts-rites-stage.is-chamber[data-chamber-phase="continuing"] .ts-rites-idbtn {
  transform: none;
}

/* 6. Present preview modal ------------------------------------------------ */
.ts-rites-modal[hidden] {
  display: none;
}

.ts-rites-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.ts-rites-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ts-rites-modal-dialog {
  position: relative;
  width: min(94vw, 34rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(177, 196, 255, 0.16);
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at top left, rgba(219, 176, 90, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(4, 12, 31, 0.94), rgba(2, 6, 18, 0.97));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.44);
}

.ts-rites-modal-close {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(177, 196, 255, 0.14);
  border-radius: 999px;
  background: rgba(9, 18, 40, 0.76);
  color: #f8f2e7;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.ts-rites-modal-title {
  display: none !important;
}

.ts-rites-modal-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(72vh, 48rem);
  margin: 1.4rem auto 0;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 1rem;
  border: 1px solid rgba(177, 196, 255, 0.14);
  background: radial-gradient(circle at center, rgba(16, 26, 55, 0.9), rgba(3, 7, 18, 0.98));
}

.ts-rites-modal-caption {
  margin: 0.9rem 0 0;
  color: rgba(232, 235, 244, 0.86);
  font-size: 1rem;
  line-height: 1.5;
}

.ts-rites-modal-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.ts-rites-modal-actions .ts-primary-btn,
.ts-rites-modal-actions .ts-rites-ghost {
  flex: 1 1 12rem;
}

/* 7. Responsive Chamber fallback ----------------------------------------- */
@media (max-width: 980px) {
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="past"],
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="bridge"],
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"],
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] {
    grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  }

  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"] .ts-rites-storycard,
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] .ts-rites-storycard {
    grid-column: 1;
    grid-row: 1;
  }

  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"] .ts-rites-storycopy,
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] .ts-rites-storycopy {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .ts-rites-stage.is-chamber .ts-rites-viewerpanel {
    padding: 0.9rem;
  }

  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="past"],
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="bridge"],
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="present"],
  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="future"] {
    grid-template-columns: 1fr;
  }

  .ts-rites-stage.is-chamber .ts-rites-storystep .ts-rites-storycard,
  .ts-rites-stage.is-chamber .ts-rites-storystep .ts-rites-storycopy {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .ts-rites-stage.is-chamber .ts-rites-storycard {
    width: min(100%, 14rem);
  }

  .ts-rites-stage.is-chamber .ts-rites-storystep[data-step="bridge"] .ts-rites-storycard {
    width: min(100%, 18rem);
  }

  .ts-rites-stage.is-chamber .ts-rites-toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }

  .ts-rites-stage.is-chamber .ts-rites-toolbar-left > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-rites-present-sprinkle span {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* MR Chamber v1.1 tuning: remove internal card labels, center preview modal, restore visible chooser mosaic. */

/* Card-bottom station labels are internal/debug-facing; the image and determination panel carry the user-facing meaning. */
.ts-rites-stage.is-chamber .ts-rites-storycard-value {
  display: none !important;
}

/* Keep the Present Rite chooser's image transition legible after the clean Chamber rebuild. */
.ts-rites-stage.is-chamber .ts-rites-present-viewport {
  background: linear-gradient(180deg, rgba(7, 16, 36, 0.94), rgba(3, 7, 18, 0.98));
  overflow: hidden;
}

.ts-rites-stage.is-chamber .ts-rites-present-image {
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: scale(1);
  filter: none;
  transition: opacity 0.34s ease, transform 0.34s ease, filter 0.34s ease;
  will-change: opacity, transform, filter;
}

.ts-rites-stage.is-chamber .ts-rites-present-viewport.is-swapping .ts-rites-present-image {
  opacity: 0.34;
  transform: scale(0.986);
  filter: brightness(0.72) saturate(0.9) blur(0.4px);
}

.ts-rites-present-sprinkle {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.ts-rites-present-sprinkle span {
  position: absolute;
  width: 25%;
  height: 25%;
  background-image: var(--next-image);
  background-size: 400% 400%;
  opacity: 0;
  transform: translateY(0.28rem) scale(0.66) rotate(var(--tile-rot, 0deg));
  transform-origin: center center;
  animation: ts-present-sprinkle 0.78s cubic-bezier(.2,.78,.24,1) both;
  animation-delay: var(--tile-delay, 0s);
  box-shadow: 0 0 18px rgba(245, 215, 151, 0.08);
  will-change: opacity, transform, filter;
}

@keyframes ts-present-sprinkle {
  0% {
    opacity: 0;
    transform: translateY(0.36rem) scale(0.58) rotate(var(--tile-rot, 0deg));
    filter: brightness(1.35) saturate(1.16) blur(1px);
  }
  42% {
    opacity: 1;
    transform: translateY(-0.03rem) scale(1.035) rotate(0deg);
    filter: brightness(1.08) saturate(1.04) blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: none;
  }
}

/* Present preview modal: force true viewport centering even when opened from a scrolled Chamber. */
.ts-rites-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.ts-rites-modal[hidden] {
  display: none !important;
}

.ts-rites-modal-backdrop {
  position: fixed;
  inset: 0;
}

.ts-rites-modal-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 31rem);
  max-height: min(92vh, 56rem);
  overflow: auto;
  margin: 0;
}

.ts-rites-modal-image {
  width: auto;
  max-width: 100%;
  max-height: min(70vh, 45rem);
  margin: 1.25rem auto 0;
  object-fit: contain;
}

@media (max-width: 680px) {
  .ts-rites-modal-dialog {
    width: min(96vw, 30rem);
    max-height: 94vh;
  }

  .ts-rites-modal-image {
    max-height: 66vh;
  }
}

/* MR Chamber v1.2 tuning: selector mechanics, viewport modal, no dialog scrollbar. */

/* Hold button now freezes the rite in JS; image click alone opens the preview. */
.ts-rites-stage.is-chamber .ts-rites-present-actions .ts-rites-ghost {
  cursor: pointer;
}

/* Slow and soften the selector's mosaic handoff so it reads as one transition. */
.ts-rites-present-sprinkle span {
  animation-duration: 0.9s !important;
  animation-timing-function: cubic-bezier(.18,.74,.2,1) !important;
}

@keyframes ts-present-sprinkle {
  0% {
    opacity: 0;
    transform: translateY(0.34rem) scale(0.62) rotate(var(--tile-rot, 0deg));
    filter: brightness(1.24) saturate(1.08) blur(0.8px);
  }
  48% {
    opacity: 1;
    transform: translateY(-0.02rem) scale(1.018) rotate(0deg);
    filter: brightness(1.04) saturate(1.02) blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: none;
  }
}

/* The preview modal is moved to document.body by JS; these rules keep it centred on the viewport. */
.ts-rites-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(0.75rem, 2vw, 1.25rem) !important;
  box-sizing: border-box !important;
}

.ts-rites-modal[hidden] {
  display: none !important;
}

.ts-rites-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(2, 5, 14, 0.82) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.ts-rites-modal-dialog {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: min(92vw, 31rem) !important;
  max-height: calc(100dvh - 2rem) !important;
  margin: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
}

.ts-rites-modal-dialog::-webkit-scrollbar {
  display: none !important;
}

.ts-rites-modal-close {
  flex: 0 0 auto !important;
}

.ts-rites-modal-title {
  display: none !important;
}

.ts-rites-modal-image {
  flex: 0 1 auto !important;
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: calc(100dvh - 14.6rem) !important;
  min-height: 0 !important;
  margin: 0.85rem auto 0 !important;
  object-fit: contain !important;
}

.ts-rites-modal-caption {
  flex: 0 0 auto !important;
  margin-top: 0.75rem !important;
  font-size: 0.92rem !important;
  line-height: 1.38 !important;
}

.ts-rites-modal-actions {
  flex: 0 0 auto !important;
  margin-top: 0.75rem !important;
  gap: 0.55rem !important;
}

.ts-rites-modal-actions .ts-primary-btn,
.ts-rites-modal-actions .ts-rites-ghost {
  min-height: 2.75rem !important;
  padding: 0.65rem 0.95rem !important;
  font-size: 0.76rem !important;
}

@media (max-height: 760px) {
  .ts-rites-modal-dialog {
    width: min(92vw, 27rem) !important;
    padding: 0.9rem !important;
  }

  .ts-rites-modal-image {
    max-height: calc(100dvh - 12.8rem) !important;
  }

  .ts-rites-modal-caption {
    font-size: 0.84rem !important;
    line-height: 1.32 !important;
  }
}

@media (max-width: 680px) {
  .ts-rites-modal-dialog {
    width: min(96vw, 29rem) !important;
  }
}

/* MR selector close-of-day stabilization: resume + non-blinking handoff. */
.ts-rites-stage.is-chamber .ts-rites-present-viewport.is-swapping .ts-rites-present-image {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.ts-rites-present-sprinkle {
  opacity: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: opacity 0.18s ease;
}

.ts-rites-present-sprinkle.is-fading-out {
  opacity: 0;
}

.ts-rites-present-sprinkle span {
  animation-duration: 0.82s !important;
  backface-visibility: hidden;
}


/* MR modal quarantine patch: true viewport overlay, no page bleed, no mid-page jump. */
body.ts-rites-modal-open {
  position: fixed !important;
  overflow: hidden !important;
  inset: 0 !important;
  width: 100% !important;
}

.ts-rites-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: clamp(0.75rem, 2vw, 1.25rem) !important;
  padding-top: clamp(1rem, 3vh, 1.75rem) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.ts-rites-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(2, 5, 14, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.ts-rites-modal-dialog {
  position: relative !important;
  z-index: 1 !important;
  width: min(92vw, 31rem) !important;
  max-height: calc(100dvh - clamp(1.5rem, 5vh, 3rem)) !important;
  margin: 0 !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52) !important;
}

.ts-rites-modal-image {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(72dvh, 48rem) !important;
  margin: 0.85rem auto 0 !important;
  object-fit: contain !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42) !important;
}

@media (max-width: 680px) {
  .ts-rites-modal {
    padding: 0.75rem !important;
    padding-top: max(0.75rem, env(safe-area-inset-top)) !important;
  }

  .ts-rites-modal-dialog {
    width: min(96vw, 29rem) !important;
    max-height: calc(100dvh - 1.5rem) !important;
  }
}


/* MR chamber correction: keep final shell kickers, but do not surface semantic trace lines inside image cards after continuation. */
.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-storycard-value,
.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-storycard--chooser > .ts-rites-storycard-value {
  display: none !important;
}

.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-strip-image,
.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-strip-video,
.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-present-viewport,
.ts-rites-stage.is-chamber[data-chamber-phase="continued"] .ts-rites-door-image {
  order: unset;
  max-height: none;
}


/* MR beta testing: Rite State block opens the Two-Rite Sevenfold Act Player. */
.ts-rites-mini-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.ts-rites-mini-link:hover,
.ts-rites-mini-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(231, 202, 132, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.035),
    0 14px 34px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(219, 176, 90, 0.16);
  filter: brightness(1.04);
  outline: none;
}

.ts-rites-mini-link:focus-visible {
  outline: 2px solid rgba(231, 202, 132, 0.42);
  outline-offset: 4px;
}


/* MR Hub Entry v01: Rite Field strip and backend-ready packet debug. */
.ts-rites-drawer[aria-label="Chambers"] .ts-rites-kicker {
  letter-spacing: 0.2em;
}

.ts-rites-fieldlabel,
.ts-rites-fieldstage {
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.68);
}

.ts-rites-fieldlabel {
  margin-top: 0.36rem;
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(244, 224, 178, 0.96);
}

.ts-rites-fieldstage {
  margin-top: 0.12rem;
  font-family: "EB Garamond", serif;
  font-size: 0.98rem;
  line-height: 1.05;
  color: rgba(232, 235, 244, 0.82);
}

.ts-rites-fragbtn[data-rite-field="lightwater"].is-active,
.ts-rites-fragbtn[data-rite-field="lightwater"]:hover,
.ts-rites-fragbtn[data-rite-field="lightwater"]:focus-visible {
  border-color: rgba(190, 218, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(190, 218, 255, 0.18), 0 8px 20px rgba(0,0,0,0.25), 0 0 24px rgba(134, 184, 255, 0.16);
}

.ts-rites-fragbtn[data-rite-field="emerald-vessel"].is-active,
.ts-rites-fragbtn[data-rite-field="emerald-vessel"]:hover,
.ts-rites-fragbtn[data-rite-field="emerald-vessel"]:focus-visible {
  border-color: rgba(130, 230, 186, 0.42);
  box-shadow: 0 0 0 1px rgba(130, 230, 186, 0.15), 0 8px 20px rgba(0,0,0,0.25), 0 0 24px rgba(101, 210, 158, 0.14);
}

.ts-rites-fragbtn[data-rite-field="fire-alchemy"].is-active,
.ts-rites-fragbtn[data-rite-field="fire-alchemy"]:hover,
.ts-rites-fragbtn[data-rite-field="fire-alchemy"]:focus-visible {
  border-color: rgba(255, 186, 107, 0.46);
  box-shadow: 0 0 0 1px rgba(255, 186, 107, 0.18), 0 8px 20px rgba(0,0,0,0.25), 0 0 24px rgba(255, 158, 73, 0.16);
}

.ts-rites-fragbtn[data-rite-field="silver-sacra"].is-active,
.ts-rites-fragbtn[data-rite-field="silver-sacra"]:hover,
.ts-rites-fragbtn[data-rite-field="silver-sacra"]:focus-visible {
  border-color: rgba(232, 232, 255, 0.48);
  box-shadow: 0 0 0 1px rgba(232, 232, 255, 0.18), 0 8px 20px rgba(0,0,0,0.25), 0 0 24px rgba(210, 212, 255, 0.14);
}

.ts-rites-fieldmeta {
  margin-top: 0.72rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(177, 196, 255, 0.11);
  border-radius: 0.95rem;
  background: rgba(5, 12, 30, 0.46);
  color: rgba(232, 235, 244, 0.84);
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
  line-height: 1.24;
}

.ts-rites-packet-toggle {
  margin-top: 0.64rem;
  width: fit-content;
  padding: 0.52rem 0.82rem;
  border: 1px solid rgba(231, 202, 132, 0.24);
  border-radius: 999px;
  background: rgba(7, 17, 41, 0.62);
  color: rgba(244, 238, 226, 0.84);
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  cursor: pointer;
}

.ts-rites-packet-view {
  margin: 0.62rem 0 0;
  max-height: 18rem;
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid rgba(177, 196, 255, 0.13);
  border-radius: 0.9rem;
  background: rgba(1, 4, 13, 0.82);
  color: rgba(232, 235, 244, 0.88);
  font-size: 0.75rem;
  line-height: 1.42;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .ts-rites-fieldlabel { font-size: 0.62rem; }
  .ts-rites-fieldstage { font-size: 0.84rem; }
}


/* MR Hub Entry v02: Chamber routing now hands off to /mr-chamber-vnext/.
   This CSS file is kept versioned with the matching rites.html/js deploy set. */


/* MR Hub v03: lower status blocks are informational only until their future role is decided. */
.ts-rites-mini-inactive {
  cursor: default;
}

.ts-rites-mini-inactive:hover,
.ts-rites-mini-inactive:focus-visible {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}


/* ==========================================================
   MR Full Lightwater Beta v06 — authoritative Hub circuit
   ========================================================== */

.ts-rites-seal-residue-video,
.ts-rites-seal-residue-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  mix-blend-mode: screen;
  filter: saturate(0.86) brightness(1.08);
  pointer-events: none;
  z-index: 1;
  transition: opacity 800ms ease;
}

.ts-rites-seal-residue-video.is-hidden,
.ts-rites-seal-residue-image.is-hidden {
  display: none;
}

.ts-rites-stage[data-seal-residue="available"] .ts-rites-mainhalo {
  opacity: 1;
  filter: brightness(1.22);
}

.ts-rites-viewerpanel {
  grid-template-rows: minmax(20rem, 1fr) auto auto;
}

.ts-rites-continuity-passage {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(177, 196, 255, 0.13);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(210, 180, 126, 0.09), transparent 45%),
    linear-gradient(180deg, rgba(5, 13, 31, 0.78), rgba(3, 8, 21, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.018);
  min-width: 0;
}

.ts-rites-circuit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ts-rites-circuit-cue {
  margin: 0.3rem 0 0;
  color: rgba(232, 235, 244, 0.82);
  font-size: 1.02rem;
  line-height: 1.35;
}

.ts-rites-circuit-status {
  flex: 0 0 auto;
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(231, 202, 132, 0.22);
  border-radius: 999px;
  color: rgba(244, 224, 178, 0.92);
  background: rgba(7, 17, 41, 0.62);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ts-rites-circuit-phase[hidden] {
  display: none !important;
}

.ts-rites-station-presences,
.ts-rites-present-candidates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.ts-rites-present-candidates {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ts-rites-presence,
.ts-rites-present-candidate {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(178, 197, 242, 0.16);
  border-radius: 1.1rem;
  background: rgba(5, 12, 30, 0.7);
  color: rgba(244, 238, 226, 0.94);
  cursor: pointer;
  isolation: isolate;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.ts-rites-presence-media,
.ts-rites-candidate-media {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #02050d;
}

.ts-rites-presence::after,
.ts-rites-present-candidate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 18, 0.82));
  z-index: 1;
}

.ts-rites-presence-label,
.ts-rites-candidate-label {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.52rem;
  z-index: 2;
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
}

.ts-rites-presence:hover,
.ts-rites-presence:focus-visible,
.ts-rites-presence.is-attending,
.ts-rites-present-candidate:hover,
.ts-rites-present-candidate:focus-visible,
.ts-rites-present-candidate.is-recognised {
  transform: translateY(-2px);
  border-color: rgba(231, 202, 132, 0.48);
  box-shadow: 0 0 0 1px rgba(231, 202, 132, 0.12), 0 12px 28px rgba(0,0,0,0.34), 0 0 26px rgba(219,176,90,0.18);
  outline: none;
}

.ts-rites-presence.is-attending::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 2px solid rgba(244, 217, 157, 0.72);
  border-radius: inherit;
  box-shadow: inset 0 0 34px rgba(231, 202, 132, 0.18), 0 0 28px rgba(231, 202, 132, 0.18);
  animation: mrStationRecognition 3.2s ease-out forwards;
}

@keyframes mrStationRecognition {
  0% { opacity: 0.1; transform: scale(0.985); }
  58% { opacity: 0.62; }
  100% { opacity: 1; transform: scale(1); }
}

.ts-rites-presence.is-locked {
  border-color: rgba(244, 217, 157, 0.72);
  box-shadow: 0 0 0 1px rgba(244,217,157,0.18), 0 0 34px rgba(219,176,90,0.28);
}

.ts-rites-presence.is-muted,
.ts-rites-present-candidate.is-muted {
  opacity: 0.38;
  pointer-events: none;
  filter: saturate(0.7);
}

.ts-rites-gate-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.ts-rites-gate {
  min-height: 5.4rem;
  padding: 0.85rem 0.8rem;
  border: 1px solid rgba(177, 196, 255, 0.16);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 50% 10%, rgba(231, 202, 132, 0.11), transparent 48%),
    rgba(6, 15, 36, 0.74);
  color: rgba(244, 238, 226, 0.93);
  font-family: "Cinzel", serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.ts-rites-gate small {
  display: block;
  margin-top: 0.32rem;
  font-family: "EB Garamond", serif;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(232, 235, 244, 0.72);
}

.ts-rites-gate:hover,
.ts-rites-gate:focus-visible,
.ts-rites-gate.is-open,
.ts-rites-gate.is-selected {
  transform: translateY(-1px);
  border-color: rgba(231, 202, 132, 0.46);
  box-shadow: 0 0 0 1px rgba(231,202,132,0.13), 0 0 28px rgba(219,176,90,0.16);
  outline: none;
}

.ts-rites-gate.is-open {
  background: radial-gradient(circle at 50% 8%, rgba(244,217,157,0.2), transparent 58%), rgba(7,18,42,0.86);
}

.ts-rites-gate.is-selected {
  border-color: rgba(244, 217, 157, 0.7);
  box-shadow: 0 0 0 1px rgba(244,217,157,0.18), 0 0 34px rgba(219,176,90,0.26);
}

.ts-rites-confirm-present {
  width: min(100%, 19rem);
  margin: 0.78rem auto 0;
}

.ts-rites-confirm-present:disabled {
  opacity: 0.42;
  cursor: default;
}

.ts-rites-stance-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.ts-rites-stance {
  padding: 0.78rem 0.86rem;
  border: 1px solid rgba(177,196,255,0.16);
  border-radius: 1rem;
  background: rgba(6,15,36,0.72);
  color: rgba(244,238,226,0.94);
  text-align: left;
  cursor: pointer;
}

.ts-rites-stance strong {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244,224,178,0.96);
}

.ts-rites-stance span {
  display: block;
  margin-top: 0.28rem;
  color: rgba(232,235,244,0.76);
  font-size: 0.96rem;
  line-height: 1.25;
}

.ts-rites-stance:hover,
.ts-rites-stance:focus-visible,
.ts-rites-stance.is-selected {
  border-color: rgba(231,202,132,0.46);
  box-shadow: 0 0 0 1px rgba(231,202,132,0.12), 0 0 24px rgba(219,176,90,0.15);
  outline: none;
}

.ts-rites-stage[data-passage-locked="true"] .ts-rites-node-orbit:not(.is-active),
.ts-rites-stage[data-passage-locked="true"] .ts-rites-fragbtn:not(.is-active) {
  opacity: 0.38;
  pointer-events: none;
}

.ts-rites-stage[data-seal-residue="available"] .ts-rites-gate::before {
  content: "";
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  margin: 0 auto 0.42rem;
  border-radius: 50%;
  background: rgba(244,217,157,0.92);
  box-shadow: 0 0 18px rgba(244,217,157,0.72);
}

.ts-rites-fragbtn.is-dormant {
  opacity: 0.46;
  cursor: default;
  filter: saturate(0.62);
}

@media (max-width: 1100px) {
  .ts-rites-station-presences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .ts-rites-circuit-head { flex-direction: column; }
  .ts-rites-circuit-status { align-self: flex-start; }
  .ts-rites-station-presences,
  .ts-rites-present-candidates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-rites-present-candidates > :last-child { grid-column: 1 / -1; width: min(50%, 12rem); justify-self: center; }
  .ts-rites-gate-list,
  .ts-rites-stance-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-rites-presence.is-attending::before { animation: none; }
}

/* v06.1 — the four Station presences are a field, not a selector grid. */
.ts-rites-station-presences {
  position: relative;
  display: block;
  min-height: clamp(30rem, 53vw, 43rem);
  overflow: hidden;
  border-radius: 1.15rem;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 45%, rgba(231, 202, 132, 0.10), transparent 25%),
    radial-gradient(ellipse at 50% 55%, rgba(94, 118, 184, 0.10), transparent 62%),
    linear-gradient(180deg, rgba(2, 7, 19, 0.56), rgba(2, 6, 16, 0.20));
}

.ts-rites-station-presences::before,
.ts-rites-station-presences::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(199, 214, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.ts-rites-station-presences::before {
  width: 84%;
  height: 58%;
}

.ts-rites-station-presences::after {
  width: 62%;
  height: 43%;
  transform: translate(-50%, -50%) rotate(11deg);
}

.ts-rites-station-presences .ts-rites-presence {
  --mr-presence-tilt: 0deg;
  position: absolute;
  z-index: 1;
  width: clamp(8.4rem, 22%, 13.4rem);
  border-color: rgba(178, 197, 242, 0.12);
  background: rgba(3, 9, 23, 0.58);
  box-shadow: 0 18px 40px rgba(0,0,0,0.32), 0 0 24px rgba(91,116,185,0.06);
  transform: rotate(var(--mr-presence-tilt));
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease, opacity 260ms ease, filter 260ms ease;
}

.ts-rites-station-presences .ts-rites-presence:nth-child(1) {
  --mr-presence-tilt: -3deg;
  left: 4%;
  top: 21%;
}

.ts-rites-station-presences .ts-rites-presence:nth-child(2) {
  --mr-presence-tilt: 1.4deg;
  left: 27%;
  top: 4%;
}

.ts-rites-station-presences .ts-rites-presence:nth-child(3) {
  --mr-presence-tilt: -1.4deg;
  right: 27%;
  top: 4%;
}

.ts-rites-station-presences .ts-rites-presence:nth-child(4) {
  --mr-presence-tilt: 3deg;
  right: 4%;
  top: 21%;
}

.ts-rites-station-presences .ts-rites-presence:hover,
.ts-rites-station-presences .ts-rites-presence:focus-visible,
.ts-rites-station-presences .ts-rites-presence.is-attending,
.ts-rites-station-presences .ts-rites-presence.is-locked {
  z-index: 3;
  transform: rotate(var(--mr-presence-tilt)) translateY(-0.42rem) scale(1.025);
}

.ts-rites-station-presences .ts-rites-presence.is-muted {
  transform: rotate(var(--mr-presence-tilt)) scale(0.975);
  opacity: 0.24;
}

.ts-rites-presence-label {
  color: rgba(244, 238, 226, 0.88);
  letter-spacing: 0.025em;
}

#btnRitesUnseal:disabled {
  opacity: 0.3;
  filter: saturate(0.35);
  box-shadow: none;
  cursor: default;
  transform: none;
}

@media (max-width: 1100px) and (min-width: 681px) {
  .ts-rites-station-presences {
    min-height: clamp(28rem, 70vw, 40rem);
  }

  .ts-rites-station-presences .ts-rites-presence {
    width: clamp(8rem, 24%, 12.5rem);
  }

  .ts-rites-station-presences .ts-rites-presence:nth-child(1) { left: 2%; }
  .ts-rites-station-presences .ts-rites-presence:nth-child(2) { left: 25%; }
  .ts-rites-station-presences .ts-rites-presence:nth-child(3) { right: 25%; }
  .ts-rites-station-presences .ts-rites-presence:nth-child(4) { right: 2%; }
}

@media (max-width: 680px) {
  .ts-rites-station-presences {
    display: flex;
    min-height: 0;
    gap: 0.8rem;
    padding: 0.6rem 0.45rem 0.9rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(231,202,132,0.34) transparent;
  }

  .ts-rites-station-presences::before,
  .ts-rites-station-presences::after {
    display: none;
  }

  .ts-rites-station-presences .ts-rites-presence,
  .ts-rites-station-presences .ts-rites-presence:nth-child(n) {
    position: relative;
    inset: auto;
    flex: 0 0 min(68vw, 14rem);
    width: auto;
    transform: none;
    scroll-snap-align: center;
  }

  .ts-rites-station-presences .ts-rites-presence:hover,
  .ts-rites-station-presences .ts-rites-presence:focus-visible,
  .ts-rites-station-presences .ts-rites-presence.is-attending,
  .ts-rites-station-presences .ts-rites-presence.is-locked {
    transform: translateY(-0.22rem) scale(1.012);
  }

  .ts-rites-station-presences .ts-rites-presence.is-muted {
    transform: scale(0.98);
  }
}


/* v07 — Mystery Rites public register and visual reference. */
.ts-rites-node-orbit.is-active {
  outline: 2px solid rgba(247, 222, 170, 0.92);
  outline-offset: 2px;
  border-color: rgba(247, 222, 170, 0.88) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 208, 0.22),
    0 10px 34px rgba(0, 0, 0, 0.36),
    0 0 22px rgba(236, 203, 137, 0.34) !important;
  scale: 1.025;
  filter: brightness(1.08);
  animation: none !important;
}

.ts-rites-node-orbit.is-active .ts-rites-node-name {
  color: rgba(255, 244, 216, 0.98);
  text-shadow: 0 2px 12px rgba(0,0,0,0.84), 0 0 12px rgba(236,203,137,0.26);
}

.ts-rites-phase-head {
  margin: 0 0 0.72rem;
}

.ts-rites-phase-cue {
  margin: 0.3rem 0 0;
  color: rgba(232, 235, 244, 0.82);
  font-size: 1.02rem;
  line-height: 1.35;
}

.ts-rites-gate-field {
  padding-top: 0.15rem;
}

.ts-rites-station-presences.is-single {
  display: grid;
  place-items: center;
  min-height: clamp(18rem, 32vw, 25rem);
}

.ts-rites-station-presences.is-single::before {
  width: 58%;
  height: 56%;
}

.ts-rites-station-presences.is-single::after {
  width: 42%;
  height: 40%;
}

.ts-rites-station-presences.is-single .ts-rites-presence,
.ts-rites-station-presences.is-single .ts-rites-presence:nth-child(n) {
  position: relative;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: auto;
  width: clamp(10rem, 30%, 15rem);
  transform: translateY(-0.15rem) scale(1.025);
}

.ts-rites-station-presences.is-single .ts-rites-presence.is-locked {
  border-color: rgba(247, 222, 170, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 208, 0.16),
    0 18px 42px rgba(0,0,0,0.38),
    0 0 36px rgba(236,203,137,0.28);
}

.ts-rites-bottomgrid[hidden],
.ts-rites-toolbar-right[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .ts-rites-station-presences.is-single {
    display: grid;
    min-height: 20rem;
    overflow: hidden;
    padding: 0.8rem;
  }

  .ts-rites-station-presences.is-single .ts-rites-presence,
  .ts-rites-station-presences.is-single .ts-rites-presence:nth-child(n) {
    flex: none;
    width: min(68vw, 14rem);
    transform: translateY(-0.1rem) scale(1.015);
  }
}

/* Keep the one recognised Rite visually centred after the quartet resolves. */
.ts-rites-station-presences.is-single,
.ts-rites-station-presences[aria-label="The Rite Recognised"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.ts-rites-station-presences.is-single .ts-rites-presence,
.ts-rites-station-presences[aria-label="The Rite Recognised"] .ts-rites-presence {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 auto !important;
}


/* ==========================================================
   MR Full Lightwater Beta v08 — integrated final Hub polish
   ========================================================== */

/* The Chamber cards are neutral until the player explicitly enters one. */
.ts-rites-fragbtn:not(.is-dormant):not(.is-mr-chamber-selected) {
  border-color: rgba(177, 196, 255, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015) !important;
  filter: brightness(0.88) saturate(0.9) !important;
}

.ts-rites-fragbtn:not(.is-dormant):hover,
.ts-rites-fragbtn:not(.is-dormant):focus-visible {
  transform: translateY(-3px) !important;
  filter: brightness(1.04) saturate(1) !important;
  border-color: rgba(238, 207, 139, 0.52) !important;
  box-shadow:
    0 0 0 1px rgba(238, 207, 139, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(226, 184, 112, 0.16) !important;
}

.ts-rites-fragbtn.is-mr-chamber-selected {
  outline: 2px solid rgba(255, 224, 160, 0.88);
  outline-offset: 2px;
  filter: brightness(1.08) saturate(1.04) !important;
  border-color: rgba(255, 224, 160, 0.86) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 208, 0.22),
    0 14px 36px rgba(0, 0, 0, 0.40),
    0 0 38px rgba(231, 188, 98, 0.34) !important;
}

/* The right-hand state pill has been removed; the heading now owns the full line. */
.ts-rites-circuit-head {
  display: block;
}

/* The recognised Rite is concentration, not another control. */
.ts-rites-presence.is-locked,
.ts-rites-presence.is-locked * {
  cursor: default !important;
}

.ts-rites-presence.is-locked {
  pointer-events: none !important;
  opacity: 1 !important;
}

/* One opened Gate remains as a compact luminous marker, not a continue button. */
.ts-rites-gate-list.is-single {
  display: flex;
  justify-content: flex-start;
}

.ts-rites-gate-marker {
  width: fit-content;
  min-width: 0;
  min-height: 0;
  padding: 0.68rem 1.12rem;
  border-radius: 999px;
  cursor: default;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 205, 119, 0.14), transparent 70%),
    rgba(7, 17, 41, 0.78);
  box-shadow:
    0 0 0 1px rgba(238, 207, 139, 0.12),
    0 0 26px rgba(226, 184, 112, 0.16);
}

/* Present recognition resolves in one deliberate choice. */
.ts-rites-present-candidates.is-single {
  display: flex;
  justify-content: center;
  min-height: clamp(18rem, 32vw, 25rem);
}

.ts-rites-present-candidates.is-single .ts-rites-present-candidate {
  width: clamp(10rem, 30%, 15rem);
  cursor: default;
  pointer-events: none;
  opacity: 1;
  border-color: rgba(247, 222, 170, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 208, 0.16),
    0 18px 42px rgba(0,0,0,0.38),
    0 0 36px rgba(236,203,137,0.28);
}

/* Entry awakens only after the immutable Hub entry has committed. */
.ts-rites-toolbar-left {
  align-items: center;
  gap: 0.7rem;
}

.ts-rites-entry-button {
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 220ms ease,
    filter 180ms ease,
    transform 180ms ease !important;
}

.ts-rites-entry-button:disabled {
  cursor: default !important;
  opacity: 0.46 !important;
  filter: saturate(0.65) brightness(0.78) !important;
  box-shadow: none !important;
}

.ts-rites-entry-button.is-gathering:disabled {
  opacity: 0.72 !important;
  border-color: rgba(224, 198, 140, 0.34) !important;
  box-shadow: 0 0 24px rgba(226, 184, 112, 0.10) !important;
}

.ts-rites-entry-button.is-ready {
  cursor: pointer !important;
  opacity: 1 !important;
  color: #fff4d3 !important;
  border-color: rgba(255, 218, 136, 0.88) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 222, 145, 0.20), transparent 72%),
    linear-gradient(180deg, rgba(25, 36, 68, 0.96), rgba(8, 19, 48, 0.98)) !important;
  box-shadow:
    0 0 0 1px rgba(255, 234, 188, 0.24),
    0 0 36px rgba(240, 190, 92, 0.30),
    inset 0 0 24px rgba(255, 226, 157, 0.09) !important;
  filter: brightness(1.09) !important;
  animation: mrEntryReadyPulse 3.8s ease-in-out infinite;
}

.ts-rites-entry-button.is-ready:hover,
.ts-rites-entry-button.is-ready:focus-visible {
  transform: translateY(-2px) !important;
  box-shadow:
    0 0 0 1px rgba(255, 240, 204, 0.32),
    0 0 44px rgba(245, 194, 94, 0.40),
    inset 0 0 30px rgba(255, 230, 169, 0.11) !important;
}

.ts-rites-entry-status {
  color: rgba(244, 224, 178, 0.90);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  line-height: 1.25;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ts-rites-entry-status[data-state="gathering"] {
  text-shadow: 0 0 18px rgba(236, 203, 137, 0.34);
  animation: mrEntryStatusGathering 2.8s ease-in-out infinite;
}

.ts-rites-entry-status[data-state="idle"] {
  color: rgba(232, 235, 244, 0.74);
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-transform: none;
}

@keyframes mrEntryStatusGathering {
  0%, 100% { opacity: 0.66; }
  50% { opacity: 1; }
}

@keyframes mrEntryReadyPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 234, 188, 0.18), 0 0 24px rgba(240, 190, 92, 0.20), inset 0 0 18px rgba(255, 226, 157, 0.06); }
  50% { box-shadow: 0 0 0 1px rgba(255, 240, 204, 0.28), 0 0 40px rgba(240, 190, 92, 0.36), inset 0 0 26px rgba(255, 226, 157, 0.10); }
}

@media (max-width: 680px) {
  .ts-rites-present-candidates.is-single {
    min-height: 20rem;
  }

  .ts-rites-present-candidates.is-single .ts-rites-present-candidate {
    width: min(68vw, 14rem);
  }

  .ts-rites-toolbar-left {
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-rites-entry-button,
  .ts-rites-fragbtn {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================
   MR Full Lightwater Beta v10 — entry awakening
   ========================================================== */

.ts-rites-resolved-passage {
  padding: 0.15rem 0 0.2rem;
}

.ts-rites-resolved-head {
  text-align: center;
  margin-bottom: 1rem;
}

.ts-rites-resolved-head .ts-rites-phase-cue {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.ts-rites-passage-relation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(2.5rem, 0.18fr) minmax(8rem, 0.64fr) minmax(2.5rem, 0.18fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(190, 205, 245, 0.13);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 197, 126, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(4, 11, 28, 0.70), rgba(2, 7, 19, 0.88));
}

.ts-rites-passage-part {
  min-width: 0;
  text-align: center;
}

.ts-rites-passage-part--rite {
  display: grid;
  justify-items: center;
}

.ts-rites-passage-media {
  width: clamp(9rem, 18vw, 13rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(247, 222, 170, 0.68);
  border-radius: 1rem;
  background: #02050d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 208, 0.12),
    0 18px 42px rgba(0,0,0,0.38),
    0 0 30px rgba(236,203,137,0.20);
}

.ts-rites-passage-media-asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ts-rites-passage-role {
  margin-top: 0.72rem;
  color: rgba(222, 194, 132, 0.92);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ts-rites-passage-name {
  display: block;
  margin-top: 0.3rem;
  color: rgba(250, 244, 232, 0.97);
  font-family: "EB Garamond", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.12;
}

.ts-rites-passage-part--gate {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 12rem;
  padding: 1rem 0.5rem;
}

.ts-rites-passage-gate-sigil {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  border: 1px solid rgba(247, 222, 170, 0.64);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 230, 169, 0.24), rgba(15, 28, 57, 0.50) 52%, rgba(3, 9, 24, 0.94) 74%);
  box-shadow:
    inset 0 0 22px rgba(255, 226, 157, 0.12),
    0 0 30px rgba(236,203,137,0.22);
}

.ts-rites-passage-gate-sigil::before,
.ts-rites-passage-gate-sigil::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(247, 222, 170, 0.84);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(247,222,170,0.55);
}

.ts-rites-passage-gate-sigil::before {
  width: 2.35rem;
  height: 1px;
}

.ts-rites-passage-gate-sigil::after {
  width: 1px;
  height: 2.35rem;
}

.ts-rites-passage-thread {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 222, 170, 0.58), transparent);
  box-shadow: 0 0 12px rgba(236,203,137,0.24);
}

/* The commit proceeds quietly. Public failure language appears only after all automatic retries. */
.ts-rites-entry-status[hidden],
.ts-rites-entry-button[hidden] {
  display: none !important;
}

.ts-rites-entry-button.is-gathering:disabled {
  animation: mrEntryGathering 2.8s ease-in-out infinite;
}

@keyframes mrEntryGathering {
  0%, 100% { box-shadow: 0 0 18px rgba(226, 184, 112, 0.08) !important; }
  50% { box-shadow: 0 0 30px rgba(226, 184, 112, 0.18) !important; }
}

@media (max-width: 760px) {
  .ts-rites-passage-relation {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .ts-rites-passage-thread {
    width: 1px;
    height: 2.4rem;
    justify-self: center;
    background: linear-gradient(180deg, transparent, rgba(247, 222, 170, 0.58), transparent);
  }

  .ts-rites-passage-part--gate {
    min-height: 0;
    padding: 0.3rem 0;
  }

  .ts-rites-passage-media {
    width: min(62vw, 13rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-rites-entry-button.is-gathering:disabled,
  .ts-rites-entry-status[data-state="gathering"] {
    animation: none !important;
  }
}


/* ==========================================================
   MR Full Lightwater Beta v11 — trace-aligned entry
   ========================================================== */

.ts-rites-stage.is-chamber .ts-rites-toolbar-left {
  justify-content: center;
  text-align: center;
}

.ts-rites-entry-status {
  width: 100%;
  text-align: center;
}

.ts-rites-entry-status[data-state="gathering"] {
  color: rgba(238, 229, 212, 0.88);
  font-family: "EB Garamond", serif;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: none;
  animation: none;
}

.ts-rites-entry-status[data-state="gathering"]::after {
  display: inline-block;
  width: 1.5em;
  content: "";
  text-align: left;
  animation: mrGatheringEllipsis 1.35s steps(1, end) infinite;
}

@keyframes mrGatheringEllipsis {
  0%, 20% { content: ""; }
  40% { content: "."; }
  60% { content: ".."; }
  80%, 100% { content: "..."; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-rites-entry-status[data-state="gathering"]::after {
    content: "...";
    animation: none;
  }
}
