

@property --rb3d-progress { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --rb3d-px { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --rb3d-py { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --i { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --x { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --y { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --rot { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --dir { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --dz { syntax: "<number>"; inherits: false; initial-value: 0; }

@property --z { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --push { syntax: "<number>"; inherits: false; initial-value: 0; }

@property --rb3d-reveal { syntax: "<number>"; inherits: true; initial-value: 1; }

@property --rb3d-core-dim { syntax: "<number>"; inherits: true; initial-value: 0.08; }

.rb3d {
  --rb3d-ink: #08080c;
  --rb3d-gold: #ba9f53;
  --rb3d-line: rgba(186, 159, 83, 0.34);
  --rb3d-fighters: #16324f;
  --rb3d-buffaloes: #000121;
  --rb3d-hawks: #3b3218;
  --rb3d-marines: #16336b;
  position: relative;
  background: var(--rb3d-ink);
}

.rb3d__viewport {
  position: relative;
  padding: 2rem 1rem 2.5rem;
}

.rb3d__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.rb3d__bg::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: url("../static/top/img/reviewbook-main-kv.jpg") center / cover no-repeat;
  filter: blur(24px) grayscale(1) sepia(1) saturate(1.6) hue-rotate(5deg)
    brightness(0.96) contrast(1.12);
  opacity: calc(0.78 * var(--rb3d-reveal, 1));
  transform-origin: 50% 50%;
}

.rb3d__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--rb3d-reveal, 1);
  background:
    radial-gradient(
      ellipse 76% 66% at 50% 46%,
      rgba(8, 8, 12, var(--rb3d-core-dim, 0.08)),
      rgba(8, 8, 12, 0.74) 78%
    ),
    linear-gradient(180deg, rgba(8, 8, 12, 0.42), rgba(8, 8, 12, 0.06) 44%, rgba(8, 8, 12, 0.82));
}

@media (max-width: 1024px) {
  .rb3d__bg::before {
    background-image: url("../static/top/img/reviewbook-main-kv-sp.jpg");
  }
}

.rb3d__world {
  position: relative;
  z-index: 1;
}

.rb3d__world {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.rb3d__plate {
  display: block;
  color: #fff;
  text-decoration: none;
}

.rb3d__face {
  position: relative;
  display: block;
  aspect-ratio: 210 / 297;
  background: var(--plate-color, #222);
  border: 1px solid var(--rb3d-line);
  overflow: hidden;
}

.rb3d__plate--spread .rb3d__face {
  aspect-ratio: 420 / 297;
}

.rb3d__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rb3d__face.is-filled .rb3d__stub {
  display: none;
}

.rb3d__stub {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-align: center;
}

.rb3d__stub b {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.rb3d__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rb3d__meta {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
  color: var(--rb3d-gold);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.rb3d__hud,
.rb3d__cue {
  display: none;
}

.rb3d__plate--say {
  grid-column: 1 / -1;
  padding: 0.5rem 0 1rem;
}

.rb3d__jp {
  display: block;
  color: #fff;
  font-size: var(--fs-lg, 1.125rem);
  line-height: 1.5;
}

.rb3d__en {
  display: block;
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.rb3d__jp::before {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin-bottom: 1.1rem;
  background: var(--rb3d-line);
}

@media (prefers-reduced-motion: no-preference) {
  .rb3d[data-rb3d="ready"] {

    height: calc(100vh - var(--rb3d-top, 60px) - var(--rb3d-cd, 0px));
    height: calc(100svh - var(--rb3d-top, 60px) - var(--rb3d-cd, 0px));
    
    height: calc(var(--rb3d-vh, 100svh) - var(--rb3d-top, 60px) - var(--rb3d-cd, 0px));
    min-height: 360px;
    overflow: hidden;

    width: var(--rb3d-vw, 100%);
    margin-inline: calc(50% - var(--rb3d-vw, 100%) / 2);

    --spread: 1;
    --exit: 1150;
    --gap: 1250;
    --travel: 6400;
    --znear: 700;
    --zcap: 560;
  }

  .rb3d[data-rb3d="ready"][data-clubs="2"] {
    --travel: 3400;
  }

  .rb3d[data-rb3d="ready"][data-clubs="3"] {
    --travel: 4900;
  }

  .rb3d[data-rb3d="ready"] .rb3d__viewport {
    position: relative;
    height: 100%;
    padding: 0;
    perspective: 1500px;
    perspective-origin: 50% 48%;
    
    background:
      radial-gradient(ellipse 72% 58% at 50% 44%,
        rgba(186, 159, 83, 0.22) 0%,
        rgba(186, 159, 83, 0.10) 45%,
        rgba(186, 159, 83, 0) 72%),
      radial-gradient(ellipse 120% 70% at 50% 108%,
        rgba(186, 159, 83, 0.10) 0%,
        rgba(186, 159, 83, 0) 55%);
  }

  .rb3d[data-rb3d="ready"] {
    transition:
      --rb3d-reveal 1.2s cubic-bezier(0.33, 0, 0.2, 1),
      --rb3d-core-dim 2s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .rb3d[data-rb3d="ready"].is-loading {
    --rb3d-reveal: 0;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open {
    --rb3d-reveal: 1;
  }

  .rb3d[data-rb3d="ready"] .rb3d__hud,
  .rb3d[data-rb3d="ready"] .rb3d__cue,
  .rb3d[data-rb3d="ready"] .rb3d__skip {
    --rb3d-reveal: 1;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp,
  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__en {
    animation: rb3d-say-in 1s cubic-bezier(0.33, 0, 0.2, 1) both;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__en {
    animation-delay: 0.25s;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp::before {
    transition: width 0.9s cubic-bezier(0.33, 0, 0.2, 1);
  }

  .rb3d[data-rb3d="ready"].is-loading .rb3d__plate--open .rb3d__jp::before {
    width: 180px;
    animation: rb3d-load 2.4s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  @keyframes rb3d-say-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes rb3d-load {
    from {
      width: 0;
    }
    to {
      width: 180px;
    }
  }

  .rb3d[data-rb3d="ready"] .rb3d__viewport::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
      180deg,
      transparent,
      var(--rb3d-line) 28%,
      var(--rb3d-line) 72%,
      transparent
    );
    opacity: var(--rb3d-reveal, 1);
    transform: translateX(-50%);
  }

  .rb3d[data-rb3d="ready"] .rb3d__bg::before {
    
    transform: scale(calc(1 + var(--rb3d-progress) * 0.09));
    will-change: transform;
  }

  .rb3d[data-rb3d="ready"] {
    --rb3d-open: clamp(0, calc((var(--rb3d-progress) - 0.048) / 0.064), 1);
  }
  .rb3d[data-rb3d="ready"] .rb3d__bg {
    opacity: var(--rb3d-open, 1);
  }

  .rb3d[data-rb3d="ready"] .rb3d__world {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    max-width: none;
    margin: 0;
    gap: 0;
    transform-style: preserve-3d;
    transform: rotateX(calc(var(--rb3d-py) * -2deg)) rotateY(calc(var(--rb3d-px) * 2.6deg));
    will-change: transform;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate {
    
    --z: calc(
      var(--rb3d-progress) * var(--travel) - var(--i) * var(--gap) - var(--znear) + var(--dz)
    );
    --push: clamp(0, calc((var(--z) + 160) / 680), 1);
    
    --fade-in: clamp(0, calc((var(--z) + 2200) / 1200), 1);
    
    --fade-out: clamp(0, calc((640 - var(--z)) / 640), 1);

    position: absolute;
    left: 50%;
    top: 50%;
    
    width: clamp(150px, 20vw, 330px);
    transform:
      translate3d(
        calc(
          (var(--x) * var(--spread) + var(--push) * var(--push) * var(--dir) * var(--exit)) * 1px
          - 50%
        ),
        calc(var(--y) * var(--spread) * 1px - 50%),
        calc(min(var(--z), var(--zcap)) * 1px)
      )
      rotateY(calc((var(--rot) + var(--push) * var(--dir) * 14) * 1deg));
    
    opacity: calc(
      min(var(--fade-in), var(--fade-out))
      * var(--rb3d-open, 1)
      * var(--rb3d-reveal, 1)
    );
    transform-style: preserve-3d;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--spread {
    
    width: clamp(340px, 48vw, 800px);
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--say {
    width: clamp(320px, 38vw, 500px);
    padding: 0;
    
    --fade-in: clamp(0, calc((var(--z) + 2400) / 1000), 1);
    --fade-out: clamp(0, calc((300 - var(--z)) / 420), 1);
    
    --exit: 620;
  }

  .rb3d[data-rb3d="ready"] .rb3d__jp {
    font-size: var(--fs-d2, 1.75rem);
    line-height: 1.45;
  }

  .rb3d[data-rb3d="ready"] .rb3d__en {
    margin-top: 0.9rem;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open {
    width: min(80vw, 800px);
    text-align: center;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp {
    font-size: var(--fs-d1, 2rem);
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp::before {
    margin-inline: auto;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--final {
    width: min(88vw, 900px);
    text-align: center;
    
    --dz: -100;
    
    --fade-in: clamp(0, calc((var(--z) + 225) / 225), 1);
    
    --fade-out: clamp(0, calc((520 - var(--z)) / 520), 1);
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--final .rb3d__jp {
    font-size: var(--fs-d1, 2rem);
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp br,
  .rb3d[data-rb3d="ready"] .rb3d__plate--final .rb3d__jp br {
    display: none;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate--final .rb3d__jp::before {
    margin-inline: auto;
  }

  .rb3d[data-rb3d="ready"] .rb3d__face::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--rb3d-ink);
    opacity: clamp(0, calc((0 - var(--z) - 240) / 1500), 0.85);
    pointer-events: none;
  }

  .rb3d[data-rb3d="ready"] .rb3d__strobes {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    
    opacity: 1;
    mix-blend-mode: screen;
  }

  .rb3d[data-rb3d="ready"] .rb3d__spark {
    position: absolute;
    width: var(--s, 120px);
    height: var(--s, 120px);
    margin: calc(var(--s, 120px) / -2) 0 0 calc(var(--s, 120px) / -2);
    border-radius: 50%;
    opacity: 0;
    
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.42) 26%,
      rgba(255, 255, 255, 0) 68%
    );
  }

  .rb3d[data-rb3d="ready"] .rb3d__spark.is-pop {
    animation: rb3d-spark var(--life, 170ms) linear both;
  }

  @keyframes rb3d-spark {
    0% { opacity: 0; transform: scale(0.72); }
    9% { opacity: var(--peak, 0.85); transform: scale(1); }
    100% { opacity: 0; transform: scale(1.06); }
  }

  .rb3d[data-rb3d="ready"] .rb3d__bg::before {
    transition:
      filter 2s cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 2s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 2.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .rb3d[data-rb3d="ready"].is-finale {
    --rb3d-core-dim: 0.24;
  }

  .rb3d[data-rb3d="ready"].is-finale .rb3d__bg::before {
    filter: blur(20px) grayscale(1) sepia(1) saturate(1.6) hue-rotate(5deg)
      brightness(0.96) contrast(1.12);
    opacity: calc(0.88 * var(--rb3d-reveal, 1));
    
    transform: scale(0.92);
  }

  .rb3d[data-rb3d="ready"] .rb3d__flash {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #fff;
    opacity: 0;
    pointer-events: none;
  }

  .rb3d[data-rb3d="ready"].is-flash .rb3d__flash {
    animation: rb3d-flash 220ms linear both;
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate.is-flash .rb3d__face img {
    animation: rb3d-flash-blowout 220ms linear both;
  }

  @keyframes rb3d-flash {
    0% { opacity: 0; }
    6% { opacity: calc(0.5 * var(--rb3d-flash-bloom, 1)); }
    24% { opacity: calc(0.16 * var(--rb3d-flash-bloom, 1)); }
    100% { opacity: 0; }
  }

  @keyframes rb3d-flash-blowout {
    0% { filter: none; }
    6% { filter: brightness(var(--lit-a, 1.6)) contrast(0.94); }
    24% { filter: brightness(var(--lit-b, 1.18)) contrast(0.98); }
    100% { filter: none; }
  }

  .rb3d[data-rb3d="ready"] .rb3d__plate:focus-visible {
    transform: translate3d(-50%, -50%, -280px);
    opacity: 1;
    z-index: 2;
    outline: 1px solid var(--rb3d-gold);
    outline-offset: 6px;
  }

  .rb3d[data-rb3d="ready"] .rb3d__hud,
  .rb3d[data-rb3d="ready"] .rb3d__cue {
    position: absolute;
    
    bottom: calc(clamp(14px, 3vw, 34px) + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    display: block;
    color: var(--rb3d-gold);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    opacity: var(--rb3d-reveal, 1);
    pointer-events: none;
  }

  .rb3d[data-rb3d="ready"] .rb3d__hud {
    left: clamp(14px, 4vw, 56px);
    display: grid;
    gap: 5px;
  }

  .rb3d[data-rb3d="ready"] .rb3d__hud span:not(:first-child) {
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: 0.18em;
  }

  .rb3d[data-rb3d="ready"] .rb3d__cue {
    right: clamp(14px, 4vw, 56px);
    display: grid;
    justify-items: center;
    gap: 8px;
    
    opacity: calc(clamp(0, calc((0.94 - var(--rb3d-progress)) / 0.1), 1) * var(--rb3d-reveal, 1));
  }

  @media (max-width: 1599px) {
    .rb3d[data-rb3d="ready"] {
      --spread: 0.86;
    }
  }

  @media (max-width: 1366px) {
    .rb3d[data-rb3d="ready"] {
      --spread: 0.72;
    }
  }

  @media (max-width: 1180px) {
    .rb3d[data-rb3d="ready"] {
      --spread: 0.6;
    }
  }

  .rb3d[data-rb3d="ready"] .rb3d__cue-arrow {
    display: block;
    width: 14px;
    height: 40px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: square;
  }

  .rb3d[data-rb3d="ready"] .rb3d__cue-rail {
    opacity: 0.28;
  }

  .rb3d[data-rb3d="ready"] .rb3d__cue-run {
    stroke-dasharray: 9 31;
    animation: rb3d-cue-run 1.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .rb3d[data-rb3d="ready"] .rb3d__cue-head {
    transform-origin: 50% 100%;
    animation: rb3d-cue-head 1.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  @keyframes rb3d-cue-run {
    0% {
      stroke-dashoffset: 27;
      opacity: 0;
    }
    18% {
      opacity: 1;
    }
    72% {
      opacity: 1;
    }
    100% {
      stroke-dashoffset: -13;
      opacity: 0;
    }
  }

  @keyframes rb3d-cue-head {
    0%,
    100% {
      transform: translateY(0);
      opacity: 0.5;
    }
    62% {
      transform: translateY(4px);
      opacity: 1;
    }
  }

  @media (max-width: 1024px) {
    .rb3d[data-rb3d="ready"] {
      
      --spread: 0.22;
      --exit: 140;
      --gap: 1068;
      --travel: 5468;
      --znear: 595;
      --zcap: 230;
    }

    .rb3d[data-rb3d="ready"][data-clubs="2"] {
      --travel: 2900;
    }

    .rb3d[data-rb3d="ready"][data-clubs="3"] {
      --travel: 4200;
    }

    @media (pointer: coarse) {
      .rb3d[data-rb3d="ready"][data-clubs="2"] {
        --travel: 2200;
      }
      
      .rb3d[data-rb3d="ready"][data-clubs="3"] {
        --travel: 3650;
      }
    }

    .rb3d[data-rb3d="ready"] .rb3d__viewport {
      perspective: 880px;
    }

    .rb3d[data-rb3d="ready"] .rb3d__world {
      
      transform: none;
    }

    .rb3d[data-rb3d="ready"] .rb3d__plate {
      width: clamp(120px, 34vw, 190px);
      
      --fade-out: clamp(0, calc((300 - var(--z)) / 420), 1);
    }

    .rb3d[data-rb3d="ready"] .rb3d__plate--spread {
      width: clamp(240px, 68vw, 380px);
    }

    .rb3d[data-rb3d="ready"] .rb3d__plate--say {
      
      width: min(86vw, 360px);
      --exit: 90;
    }

    .rb3d[data-rb3d="ready"] {
      --say-y-up: -760;
      --say-y-down: 800;
      
      --s1-left: -380;
      --s1-right: 380;
    }

    .rb3d[data-rb3d="ready"] .rb3d__jp {
      font-size: var(--fs-d3, 1.5rem);
      line-height: 1.4;
    }

    .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp,
    .rb3d[data-rb3d="ready"] .rb3d__plate--final .rb3d__jp {
      font-size: var(--fs-d2, 1.75rem);
    }

    .rb3d[data-rb3d="ready"] .rb3d__plate--open .rb3d__jp br,
    .rb3d[data-rb3d="ready"] .rb3d__plate--final .rb3d__jp br {
      display: revert;
    }

    .rb3d[data-rb3d="ready"] .rb3d__plate--final {
      --dz: -85;
      --fade-out: clamp(0, calc((430 - var(--z)) / 430), 1);
    }
  }
}

.rb3d__lede {
  
  text-align: center;
  padding: 2rem 1.2rem;
  color: #fff;
}
.rb3d__lede-logo {
  width: min(38vw, 150px);
  height: auto;
  margin: 0 auto 1.4rem;
  display: block;
}
.rb3d__lede-main {
  font-size: var(--fs-d2, 1.6rem);
  line-height: 1.5;
  font-weight: 700;
  margin: 0 0 0.9rem;
}
.rb3d__lede-sub {
  font-size: var(--fs-md, 0.95rem);
  line-height: 1.8;
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.86);
}

@media (prefers-reduced-motion: no-preference) {
  .rb3d[data-rb3d="ready"] .rb3d__lede {
    position: absolute;
    z-index: 2;                       
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    padding: 0 1.2rem clamp(64px, 11vh, 104px);
    pointer-events: none;             
    opacity: var(--rb3d-reveal, 1);
  }

  .rb3d[data-rb3d="ready"] .rb3d__lede::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse 78% 72% at 50% 50%,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.55) 42%,
      rgba(0, 0, 0, 0) 78%
    );
    opacity: var(--rb3d-reveal, 1);
  }

  .rb3d[data-rb3d="ready"] .rb3d__lede > * {
    position: relative;               
    margin-left: 0;
    margin-right: 0;
  }

  .rb3d[data-rb3d="ready"] .rb3d__lede {
    --lede-in: clamp(0, calc((0.113 - var(--rb3d-progress)) / 0.113), 1);
    
    --rb3d-reveal: 1;
  }
  .rb3d[data-rb3d="ready"] .rb3d__lede-logo {
    
    width: calc(min(34vw, 250px, 34vh) + var(--lede-in) * min(16vw, 95px));
    margin-bottom: clamp(1rem, 2.5vh, 1.8rem);
    translate: 0 calc(var(--lede-in) * min(14vh, 116px));
    opacity: var(--rb3d-reveal, 1);
  }

  .rb3d[data-rb3d="ready"] .rb3d__lede-main {
    font-size: var(--fs-d1, 2rem);
    margin-bottom: 0;
    opacity: clamp(0, calc((var(--rb3d-progress) - 0.05) / 0.067), 1);
    translate: 0 calc(clamp(0, calc((0.113 - var(--rb3d-progress)) / 0.064), 1) * 14px);
  }

  .rb3d[data-rb3d="ready"] .rb3d__lede-sub {
    font-size: var(--fs-lg, 1.05rem);
    line-height: 1.25;
    margin-top: 0.5rem;
  }
  .rb3d[data-rb3d="ready"] .rb3d__lede-sub1 {
    margin-top: 1.5rem;
    opacity: clamp(0, calc((var(--rb3d-progress) - 0.322) / 0.064), 1);
    translate: 0 calc(clamp(0, calc((0.386 - var(--rb3d-progress)) / 0.064), 1) * 10px);
  }
  .rb3d[data-rb3d="ready"] .rb3d__lede-sub2 {
    opacity: clamp(0, calc((var(--rb3d-progress) - 0.579) / 0.064), 1);
    translate: 0 calc(clamp(0, calc((0.644 - var(--rb3d-progress)) / 0.064), 1) * 10px);
  }

  .rb3d[data-rb3d="ready"] .rb3d__skip {
    position: absolute;
    z-index: 3;
    right: clamp(14px, 4vw, 56px);
    bottom: calc(clamp(14px, 3vw, 34px) + env(safe-area-inset-bottom, 0px));
    display: inline-flex;
    align-items: center;
    
    gap: 0.68rem;
    padding: 0.75rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.34);
    color: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    font-size: 1.03rem;
    letter-spacing: 0.16em;
    cursor: pointer;
    opacity: var(--rb3d-reveal, 1);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }
  .rb3d[data-rb3d="ready"] .rb3d__skip:hover,
  .rb3d[data-rb3d="ready"] .rb3d__skip:focus-visible {
    background: rgba(0, 0, 0, 0.62);
    border-color: var(--rb3d-gold);
    color: #fff;
  }
  .rb3d[data-rb3d="ready"] .rb3d__skip svg {
    width: 18px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .rb3d[data-rb3d="ready"] .rb3d__cue {
    right: auto;
    left: 50%;
    translate: -50% 0;
  }

}

.rb3d__skip {
  display: none;
}

.rb3d__note {
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
@media (prefers-reduced-motion: no-preference) {
  .rb3d[data-rb3d="ready"] .rb3d__note {
    margin-top: 0.5rem;
    max-width: min(62vw, 340px);
  }
}

@media (max-width: 640px) {
  
  .rb3d[data-rb3d="ready"] .rb3d__lede-main {
    font-size: 1.5rem;
    line-height: 1.4 !important;
  }
  .rb3d[data-rb3d="ready"] .rb3d__lede-sub {
    font-size: 0.85rem;
    line-height: 1.3 !important;
  }
  .rb3d[data-rb3d="ready"] .rb3d__lede-logo {
    width: calc(min(40vw, 170px) + var(--lede-in) * 18vw);
  }

  .rb3d[data-rb3d="ready"] .rb3d__hud span:nth-child(2),
  .rb3d[data-rb3d="ready"] .rb3d__hud span:nth-child(3) {
    display: none;
  }
  .rb3d[data-rb3d="ready"] .rb3d__hud {
    max-width: 38vw;
    gap: 3px;
  }
  .rb3d[data-rb3d="ready"] .rb3d__hud span:first-child {
    font-size: 0.6rem;
  }
  .rb3d__note {
    font-size: 0.62rem;
    line-height: 1.5;
  }
  @media (prefers-reduced-motion: no-preference) {
    .rb3d[data-rb3d="ready"] .rb3d__note {
      max-width: 38vw;
    }
  }

  .rb3d[data-rb3d="ready"] .rb3d__lede-logo {
    translate: 0 calc(var(--lede-in) * min(6vh, 48px));
  }
  
  .rb3d[data-rb3d="ready"] .rb3d__cue {
    bottom: auto;
    top: calc(50% + min(6vh, 48px) + 72px);
    opacity: calc(clamp(0, calc((0.097 - var(--rb3d-progress)) / 0.064), 1) * var(--rb3d-reveal, 1));
  }

  .rb3d[data-rb3d="ready"] .rb3d__skip {
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    font-size: 0.8rem;
  }
  .rb3d[data-rb3d="ready"] .rb3d__skip svg {
    width: 14px;
    height: 11px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rb3d[data-rb3d="ready"] .rb3d__lede-main {
    font-size: 1.75rem;
  }
  .rb3d[data-rb3d="ready"] .rb3d__lede-logo {
    width: calc(min(30vw, 220px) + var(--lede-in) * min(14vw, 85px));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rb3d[data-rb3d="ready"][data-motion="flat"] .rb3d__plate--spread {
    
    --fade-in: clamp(0, calc((var(--z) + 940) / 560), 1);
    --fade-out: clamp(0, calc((440 - var(--z)) / 440), 1);
    
    --split: clamp(0, calc(var(--z) / 440), 1);

    width: clamp(300px, 40vw, 620px);
    transform: translate3d(
      calc((var(--dir) * clamp(150px, 19vw, 300px) + var(--split) * var(--dir) * 550px) - 50%),
      -50%,
      0
    );
  }

  .rb3d[data-rb3d="ready"][data-motion="flat"] .rb3d__face::after {
    opacity: 0;
  }

  @media (max-width: 1024px) {
    .rb3d[data-rb3d="ready"][data-motion="flat"] .rb3d__plate--spread {
      
      --fade-in: clamp(0, calc((var(--z) + 800) / 480), 1);
      --fade-out: clamp(0, calc((374 - var(--z)) / 374), 1);
      --split: clamp(0, calc(var(--z) / 374), 1);
      width: clamp(260px, 72vw, 460px);
      transform: translate3d(
        calc((var(--dir) * clamp(40px, 11vw, 90px) + var(--split) * var(--dir) * 310px) - 50%),
        -50%,
        0
      );
    }
  }
}
