.project-detail:has(.tarot-world) .detail-hero {
  padding-bottom: 38px;
}

body:has(.tarot-world) {
  overflow-x: hidden;
}

.project-detail:has(.tarot-world) {
  overflow-x: clip;
}

.project-detail:has(.tarot-world) .project-story {
  padding-bottom: 36px;
}

.tarot-world,
.tarot-loop,
.tarot-masters,
.tarot-decks,
.tarot-retention,
.tarot-archive {
  --tarot-ink: #f7f1e7;
  --tarot-muted: #b9b1bb;
  --tarot-dim: #7f7885;
  --tarot-gold: #d8bd78;
  --tarot-gold-soft: rgba(216, 189, 120, 0.2);
  --tarot-teal: #75d2c6;
  --tarot-rose: #d99098;
  --tarot-panel: rgba(15, 17, 26, 0.94);
  --tarot-line: rgba(255, 255, 255, 0.12);
  color: var(--tarot-ink);
}

.tarot-world {
  padding: 54px 42px 74px;
}

.tarot-hero-panel {
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(600px, 1.14fr);
  gap: 48px;
  align-items: center;
  min-height: 720px;
  overflow: hidden;
  padding: 46px;
  border: 1px solid rgba(216, 189, 120, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 13, 20, 0.98), rgba(20, 23, 34, 0.94) 56%, rgba(11, 13, 19, 0.98));
  box-shadow: 0 38px 92px rgba(16, 21, 31, 0.28);
}

.tarot-hero-copy h2,
.tarot-loop-copy h2,
.tarot-section-copy h2,
.tarot-retention h2 {
  max-width: 760px;
  color: var(--tarot-ink);
  font-size: clamp(44px, 5.8vw, 82px);
  line-height: 0.96;
}

.tarot-hero-copy p:not(.eyebrow),
.tarot-loop-copy p:not(.eyebrow),
.tarot-section-copy p,
.tarot-retention p {
  max-width: 620px;
  margin-top: 20px;
  color: var(--tarot-muted);
  font-size: 19px;
  line-height: 1.58;
}

.tarot-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.tarot-hero-points span,
.tarot-tabs button,
.tarot-loop-step span,
.tarot-master-roster button {
  border: 1px solid var(--tarot-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.tarot-hero-points span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  color: var(--tarot-gold);
  font-size: 12px;
  font-weight: 900;
}

.tarot-hero-stage {
  position: relative;
  min-height: 650px;
}

.tarot-master-bg {
  position: absolute;
  right: -26px;
  bottom: 4px;
  width: min(48vw, 430px);
  opacity: 0.48;
  filter: saturate(0.95) contrast(0.94);
}

.tarot-phone-main {
  position: absolute;
  left: 50%;
  top: 28px;
  width: min(330px, 40vw);
  transform: translateX(-50%) rotate(-2deg);
  z-index: 3;
}

.tarot-phone-main .phone-frame,
.tarot-loop-screen .phone-frame,
.tarot-retention-phones .phone-frame,
.tarot-archive-grid .phone-frame {
  background: #080a10;
  box-shadow: 0 32px 86px rgba(0, 0, 0, 0.48);
}

.tarot-card-float,
.tarot-orbit-card {
  position: absolute;
  z-index: 4;
  border-radius: 8px;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.45);
}

.tarot-card-float {
  width: min(150px, 18vw);
}

.tarot-card-float.card-a {
  left: 24px;
  top: 86px;
  transform: rotate(-11deg);
}

.tarot-card-float.card-b {
  right: 48px;
  top: 80px;
  transform: rotate(10deg);
}

.tarot-orbit-card {
  left: 20px;
  bottom: 86px;
  width: 92px;
  transform: rotate(8deg);
}

.tarot-loop {
  position: relative;
  min-height: 390vh;
  padding: 0 42px 96px;
  overflow: clip;
  background:
    linear-gradient(180deg, rgba(16, 21, 31, 0), rgba(16, 21, 31, 0.05));
}

.tarot-loop-pin {
  position: sticky;
  top: 72px;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(330px, 0.42fr) minmax(620px, 1fr);
  gap: 52px;
  align-items: center;
}

.tarot-loop-copy {
  transition: opacity 260ms ease, transform 260ms ease;
}

.tarot-loop.is-reading .tarot-loop-copy {
  opacity: 0.12;
  transform: translateY(-18px);
}

.tarot-loop-stage {
  position: relative;
  min-height: min(78vh, 760px);
  display: grid;
  place-items: center;
}

.tarot-loop-stage::before {
  content: "";
  position: absolute;
  width: min(560px, 58vw);
  aspect-ratio: 1;
  border: 1px solid rgba(216, 189, 120, 0.18);
  border-radius: 50%;
  transform: rotate(14deg);
}

.tarot-loop-screen {
  position: absolute;
  width: min(320px, 32vw);
  margin: 0;
  opacity: 0;
  transform: translateY(46px) scale(0.88) rotate(-3deg);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.tarot-loop-screen.is-active {
  z-index: 4;
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
  pointer-events: auto;
}

.tarot-loop-screen:not(.is-active):nth-child(2) {
  opacity: 0.2;
  transform: translate(-215px, 54px) scale(0.68) rotate(-10deg);
}

.tarot-loop-screen:not(.is-active):nth-child(3) {
  opacity: 0.18;
  transform: translate(215px, 62px) scale(0.68) rotate(10deg);
}

.tarot-loop-screen figcaption,
.tarot-retention-phones figcaption,
.tarot-archive-grid figcaption {
  margin-top: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.tarot-loop-steps {
  position: relative;
  z-index: 5;
  width: min(460px, calc(100% - 84px));
  margin-top: 10vh;
  margin-left: 42px;
  display: grid;
  gap: 42vh;
  padding-bottom: 72vh;
}

.tarot-loop-step {
  min-height: 280px;
  padding: 24px;
  border: 1px solid rgba(216, 189, 120, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(255, 253, 250, 0.9));
  box-shadow: 0 30px 70px rgba(16, 21, 31, 0.16);
  opacity: 0.62;
  transform: translateY(18px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.tarot-loop-step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.tarot-loop-step span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: #9a6a12;
  font-size: 12px;
  font-weight: 930;
}

.tarot-loop-step p {
  margin: 18px 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 930;
  text-transform: uppercase;
}

.tarot-loop-step h3 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
}

.tarot-loop-step small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.52;
}

.tarot-masters,
.tarot-decks,
.tarot-retention,
.tarot-archive {
  padding: 86px 42px;
}

.tarot-masters,
.tarot-retention {
  background: linear-gradient(180deg, rgba(15, 17, 26, 0.96), rgba(22, 25, 36, 0.94));
}

.tarot-section-copy {
  max-width: 880px;
  margin-bottom: 34px;
}

.tarot-decks .tarot-section-copy h2,
.tarot-archive .tarot-section-copy h2 {
  color: var(--ink);
}

.tarot-decks .tarot-section-copy p,
.tarot-archive .tarot-section-copy p {
  color: var(--muted);
}

.tarot-master-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
}

.tarot-master-feature {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(260px, 0.68fr);
  gap: 18px;
  align-items: end;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(216, 189, 120, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 12, 18, 0.96), rgba(24, 28, 40, 0.94));
}

.tarot-master-feature span {
  color: var(--tarot-gold);
  font-size: 14px;
  font-weight: 930;
}

.tarot-master-feature h3 {
  max-width: 470px;
  margin-top: 14px;
  color: var(--tarot-ink);
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.02;
}

.tarot-master-feature img {
  align-self: end;
  justify-self: end;
  width: min(100%, 330px);
  max-height: 440px;
  object-fit: contain;
  object-position: center bottom;
  transition: opacity 180ms ease, transform 220ms ease;
}

.tarot-master-roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tarot-master-roster button {
  min-height: 160px;
  padding: 12px;
  color: var(--tarot-muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.tarot-master-roster button.is-active {
  border-color: rgba(216, 189, 120, 0.58);
  color: var(--tarot-gold);
  background: rgba(216, 189, 120, 0.1);
}

.tarot-master-roster img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  object-position: center bottom;
}

.tarot-master-roster strong {
  display: block;
  margin-top: 8px;
}

.tarot-decks {
  overflow: hidden;
}

.tarot-deck-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tarot-deck-pair article {
  min-height: 520px;
  padding: 22px;
  border: 1px solid rgba(216, 208, 194, 0.86);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.72);
}

.tarot-mini-fan {
  position: relative;
  height: 340px;
  margin-bottom: 18px;
}

.tarot-mini-fan img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(150px, 30%);
  border-radius: 8px;
  box-shadow: 0 26px 68px rgba(16, 21, 31, 0.24);
}

.tarot-mini-fan img:nth-child(1) {
  transform: translateX(-118%) rotate(-11deg);
}

.tarot-mini-fan img:nth-child(2) {
  z-index: 2;
  width: min(172px, 35%);
  transform: translateX(-50%) translateY(-26px);
}

.tarot-mini-fan img:nth-child(3) {
  transform: translateX(18%) rotate(11deg);
}

.tarot-deck-pair h3 {
  color: var(--ink);
  font-size: 28px;
}

.tarot-deck-pair p {
  max-width: 560px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.tarot-retention {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(620px, 1.28fr);
  gap: 34px;
  align-items: center;
}

.tarot-mood-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tarot-mood-icons img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid var(--tarot-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.tarot-retention-phones {
  position: relative;
  min-height: 620px;
}

.tarot-retention-phones figure {
  position: absolute;
  margin: 0;
  width: min(260px, 28vw);
}

.tarot-retention-phones figure:nth-child(1) {
  left: 0;
  top: 120px;
  transform: rotate(-7deg);
}

.tarot-retention-phones figure:nth-child(2) {
  left: 50%;
  top: 0;
  z-index: 3;
  width: min(310px, 32vw);
  transform: translateX(-50%);
}

.tarot-retention-phones figure:nth-child(3) {
  right: 0;
  top: 136px;
  transform: rotate(7deg);
}

.tarot-archive {
  padding-bottom: 96px;
}

.tarot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tarot-tabs button {
  min-height: 40px;
  padding: 0 15px;
  color: #344054;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.tarot-tabs button.is-active {
  border-color: rgba(8, 124, 122, 0.46);
  color: var(--teal);
  background: rgba(8, 124, 122, 0.08);
}

.tarot-archive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.tarot-archive-grid figure {
  margin: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.tarot-archive-grid figure.is-hidden {
  display: none;
}

.tarot-archive-grid .phone-frame {
  padding: 7px;
  border-radius: 24px;
}

.tarot-archive-grid .phone-speaker {
  width: 44px;
  height: 4px;
  margin-bottom: 6px;
}

.tarot-archive-grid .phone-screen {
  border-radius: 17px;
}

@media (max-width: 1120px) {
  .tarot-hero-panel,
  .tarot-master-grid,
  .tarot-retention {
    grid-template-columns: 1fr;
  }

  .tarot-hero-stage {
    min-height: 610px;
  }

  .tarot-loop-pin {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    padding-top: 52px;
  }

  .tarot-loop-stage {
    min-height: 560px;
  }

  .tarot-loop-steps {
    width: min(520px, calc(100% - 48px));
    margin-top: -42vh;
    margin-left: 24px;
  }

  .tarot-archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body:has(.tarot-world):not(.nav-open) .site-nav {
    display: none;
  }

  body:has(.tarot-world).nav-open .site-nav {
    display: grid;
  }

  .project-detail:has(.tarot-world) .detail-hero {
    padding-bottom: 30px;
  }

  .tarot-world,
  .tarot-masters,
  .tarot-decks,
  .tarot-retention,
  .tarot-archive {
    padding: 54px 20px;
  }

  .tarot-hero-panel {
    min-height: 0;
    padding: 22px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .tarot-hero-copy h2,
  .tarot-loop-copy h2,
  .tarot-section-copy h2,
  .tarot-retention h2 {
    font-size: clamp(40px, 12vw, 56px);
    line-height: 0.98;
  }

  .tarot-hero-copy p:not(.eyebrow),
  .tarot-loop-copy p:not(.eyebrow),
  .tarot-section-copy p,
  .tarot-retention p {
    font-size: 17px;
  }

  .tarot-hero-stage {
    min-height: 470px;
  }

  .tarot-phone-main {
    top: 20px;
    width: min(230px, 64vw);
  }

  .tarot-master-bg {
    right: -54px;
    bottom: 8px;
    width: 280px;
  }

  .tarot-card-float {
    width: 72px;
  }

  .tarot-card-float.card-a {
    left: -2px;
    top: 54px;
  }

  .tarot-card-float.card-b {
    right: -2px;
    top: 70px;
  }

  .tarot-orbit-card {
    left: 6px;
    bottom: 54px;
    width: 58px;
  }

  .tarot-loop {
    min-height: 0;
    padding: 42px 20px 58px;
    overflow: visible;
  }

  .tarot-loop-pin {
    display: contents;
  }

  .tarot-loop-stage {
    position: sticky;
    top: 58px;
    z-index: 2;
    min-height: 360px;
    margin: 22px -20px 0;
    background:
      linear-gradient(180deg, rgba(244, 241, 234, 0.96), rgba(244, 241, 234, 0.8) 72%, rgba(244, 241, 234, 0));
  }

  .tarot-loop-stage::before {
    width: 300px;
  }

  .tarot-loop-screen {
    width: min(170px, 48vw);
  }

  .tarot-loop-screen.is-active {
    transform: translateY(18px) scale(1) rotate(0deg);
  }

  .tarot-loop-screen:not(.is-active):nth-child(2) {
    transform: translate(-58px, 68px) scale(0.64) rotate(-9deg);
  }

  .tarot-loop-screen:not(.is-active):nth-child(3) {
    transform: translate(58px, 74px) scale(0.64) rotate(9deg);
  }

  .tarot-loop-steps {
    z-index: 3;
    width: 100%;
    margin: 18px 0 0;
    gap: 18px;
    padding-bottom: 28px;
  }

  .tarot-loop-step {
    min-height: 0;
    padding: 18px;
    opacity: 0.96;
    transform: none;
  }

  .tarot-loop-step h3 {
    font-size: 28px;
  }

  .tarot-loop-step small {
    font-size: 16px;
  }

  .tarot-master-feature {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .tarot-master-feature img {
    justify-self: center;
    width: min(270px, 78vw);
  }

  .tarot-master-roster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .tarot-master-roster button {
    min-height: 118px;
    padding: 8px;
  }

  .tarot-master-roster img {
    height: 78px;
  }

  .tarot-deck-pair {
    grid-template-columns: 1fr;
  }

  .tarot-deck-pair article {
    min-height: 0;
  }

  .tarot-mini-fan {
    height: 250px;
  }

  .tarot-mini-fan img {
    width: 112px;
  }

  .tarot-mini-fan img:nth-child(2) {
    width: 130px;
  }

  .tarot-retention {
    grid-template-columns: 1fr;
  }

  .tarot-retention-phones {
    min-height: 500px;
  }

  .tarot-retention-phones figure {
    width: min(150px, 40vw);
  }

  .tarot-retention-phones figure:nth-child(1) {
    left: 0;
    top: 128px;
  }

  .tarot-retention-phones figure:nth-child(2) {
    width: min(190px, 52vw);
  }

  .tarot-retention-phones figure:nth-child(3) {
    right: 0;
    top: 144px;
  }

  .tarot-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .tarot-tabs {
    gap: 6px;
  }

  .tarot-tabs button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .tarot-archive-grid figcaption {
    font-size: 12px;
  }
}