.rks-splash-host {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
}

.rks-splash,
.rks-splash * {
  box-sizing: border-box;
}

.rks-splash {
  --rks-paper: #faf8f4;
  --rks-paper-2: #f3efe7;
  --rks-surface: #fff;
  --rks-ink: #2b2a26;
  --rks-ink-soft: #6e6a61;
  --rks-ink-muted: #9b958a;
  --rks-line: #e7e1d6;
  --rks-emerald: #0fa47e;
  --rks-emerald-hover: #0c8a6a;
  --rks-emerald-soft: #e3f3ec;
  --rks-cursor-x: 50%;
  --rks-cursor-y: 50%;
  --rks-cursor-visible: 0;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  color: var(--rks-ink);
  background: rgba(48, 52, 50, 0.58);
  font-family: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  isolation: isolate;
}

.rks-showcase-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, auto) 3px minmax(150px, auto);
  width: min(96vw, 1760px, calc((100dvh - 185px) * 2.15));
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 26px;
  background: var(--rks-surface);
  box-shadow: 0 30px 90px -34px rgba(13, 16, 15, 0.58);
  isolation: isolate;
}

.rks-progress {
  position: relative;
  z-index: 86;
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: var(--rks-line);
  pointer-events: none;
  user-select: none;
}

.rks-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--rks-emerald);
  transform: scaleX(var(--rks-progress-value, 0));
  transform-origin: left center;
  will-change: transform;
}

.rks-splash[data-rtl="true"] .rks-progress-fill {
  transform-origin: right center;
}

.rks-stage-actions {
  position: absolute;
  z-index: 90;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.rks-sound-toggle,
.rks-close,
.rks-segment-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rks-line);
  border-radius: 999px;
  color: var(--rks-ink);
  background: var(--rks-surface);
  font: 800 13px/1 "Nunito", sans-serif;
  cursor: pointer;
}

.rks-sound-toggle,
.rks-close {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  padding: 0;
}

.rks-sound-control {
  position: relative;
  display: flex;
}

.rks-sound-toggle,
.rks-sound-toggle[aria-pressed="true"] {
  border-color: var(--rks-emerald);
  color: var(--rks-surface);
  background: var(--rks-emerald);
  box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--rks-emerald) 72%, transparent);
}

.rks-close {
  border-color: color-mix(in srgb, var(--rks-line) 78%, transparent);
  color: var(--rks-ink-muted);
  background: color-mix(in srgb, var(--rks-surface) 78%, transparent);
  box-shadow: none;
}

.rks-sound-hint {
  position: absolute;
  inset-block-start: calc(100% + 12px);
  inset-inline-end: -8px;
  width: max-content;
  max-width: min(260px, calc(100cqw - 32px));
  margin: 0;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--rks-emerald) 36%, var(--rks-line));
  border-radius: 12px;
  color: var(--rks-ink);
  background: var(--rks-surface);
  box-shadow: 0 16px 34px -24px color-mix(in srgb, var(--rks-ink) 34%, transparent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 220ms ease, visibility 0s linear 220ms;
  visibility: hidden;
}

.rks-sound-hint::before {
  content: "";
  position: absolute;
  inset-block-start: -6px;
  inset-inline-end: 25px;
  width: 10px;
  height: 10px;
  border-block-start: 1px solid color-mix(in srgb, var(--rks-emerald) 36%, var(--rks-line));
  border-inline-start: 1px solid color-mix(in srgb, var(--rks-emerald) 36%, var(--rks-line));
  background: var(--rks-surface);
  transform: rotate(45deg);
}

.rks-splash[data-sound-hint="visible"] .rks-sound-hint {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 260ms;
  visibility: visible;
}

.rks-sound-toggle .is-on { display: none; }
.rks-sound-toggle[aria-pressed="true"] .is-on { display: inline-flex; }
.rks-sound-toggle[aria-pressed="true"] .is-off { display: none; }
.rks-splash[data-reduced="true"] .rks-sound-toggle { display: none; }

.rks-sound-toggle:hover,
.rks-sound-toggle[aria-pressed="true"]:hover {
  border-color: var(--rks-emerald-hover);
  color: var(--rks-surface);
  background: var(--rks-emerald-hover);
}

.rks-close:hover {
  border-color: var(--rks-line);
  color: var(--rks-ink-soft);
  background: var(--rks-surface);
}

.rks-sound-toggle:focus-visible,
.rks-close:focus-visible,
.rks-segment-action:focus-visible {
  outline: 3px solid rgba(15, 164, 126, 0.28);
  outline-offset: 3px;
}

.rks-sound-toggle svg,
.rks-close svg,
.rks-segment-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rks-stage {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 2.15 / 1;
  overflow: hidden;
  background: var(--rks-paper);
  container: rks-stage / size;
}

.rks-welcome,
.rks-product-demo,
.rks-world-sequence,
.rks-bookfx-layer,
.rks-creation-choice,
.rks-finale,
.rks-static-summary {
  position: absolute;
  inset: 0;
}

.rks-welcome {
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(42px, 8cqw, 132px);
  padding: clamp(32px, 6cqw, 96px) clamp(30px, 9cqw, 160px);
  opacity: 0;
  transform: scale(1.018);
  pointer-events: none;
  transition: opacity 420ms ease, transform 620ms cubic-bezier(.2,.9,.3,1.1);
}

.rks-splash[data-phase="welcome"] .rks-welcome {
  opacity: 1;
  transform: scale(1);
}

.rks-welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

.rks-welcome-copy > span,
.rks-static-copy > span,
.rks-film-caption > span {
  display: block;
  margin-bottom: 10px;
  color: var(--rks-emerald);
  font-size: 13px;
  font-weight: 900;
}

/* 82px was wide enough for ~7 CJK glyphs per line in the right-hand column, so an 18-character
   Chinese headline broke into three lines with a single orphaned glyph on the last one. The cap is
   sized so every locale settles on two full lines; `text-wrap: pretty` then keeps the last line from
   collapsing to one word (it fills each line first, unlike `balance`, which evens them out). */
.rks-welcome-copy h1,
.rks-static-copy h2 {
  margin: 0;
  max-width: 760px;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(38px, 4.4cqw, 68px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: pretty;
}

.rks-welcome-copy h1 {
  line-height: 1.1;
}

/* The support line is one or two lines long, which is exactly the case `balance` exists for: with
   `pretty` the machine translations kept ending on a stub (ja 29+3, ko 36+8, th 62+7 glyphs), while
   `balance` renders two evenly filled lines in every locale and one line where the text is short. */
.rks-welcome-copy p,
.rks-static-copy p {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--rks-ink-soft);
  font-size: clamp(17px, 1.4cqw, 21px);
  line-height: 1.55;
  text-wrap: balance;
}

.rks-welcome-object {
  position: relative;
  justify-self: center;
  width: clamp(240px, 28cqw, 450px);
  aspect-ratio: 0.82;
  perspective: 1100px;
  transform-style: preserve-3d;
  animation: rksWelcomeBook 2.2s cubic-bezier(.2,.9,.3,1.1) both;
}

.rks-welcome-confetti {
  position: absolute;
  z-index: -1;
  top: -65%;
  left: -60%;
  width: 220%;
  height: 220%;
  pointer-events: none;
}

.rks-welcome-cover,
.rks-welcome-pages,
.rks-welcome-back {
  position: absolute;
  border-radius: 12px 24px 24px 12px;
  transform-origin: 3% 50%;
}

.rks-welcome-pages {
  z-index: 1;
  inset: 7.7% 9.5% 8.2% 11.5%;
  border: 1px solid #d7cebf;
  background: var(--rks-surface);
  transform: rotateY(-7deg) rotateX(3deg);
}

.rks-welcome-back {
  z-index: 0;
  inset: 7.2% 5.8% 8.4% 12%;
  border: 1px solid rgba(43, 42, 38, 0.24);
  background: color-mix(in srgb, var(--rks-emerald) 62%, var(--rks-ink));
  box-shadow: 0 28px 48px rgba(43, 42, 38, 0.18);
  transform: rotateY(-7deg) rotateX(3deg);
}

.rks-welcome-cover {
  z-index: 2;
  inset: 7% 8%;
  overflow: hidden;
  border: 1px solid rgba(43, 42, 38, 0.16);
  background: var(--rks-paper);
  box-shadow: 0 24px 54px rgba(43, 42, 38, 0.18);
  transform: rotateY(-28deg) rotateX(3deg);
}

.rks-welcome-cover::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 4%;
  border: 1px solid rgba(43, 42, 38, 0.18);
  border-radius: 8px 18px 18px 8px;
  pointer-events: none;
}

.rks-welcome-cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: rksWelcomeCoverArt 2.8s cubic-bezier(.2,.8,.3,1) both;
}

@keyframes rksWelcomeBook {
  from { opacity: 0; transform: translateY(40px) scale(0.96) rotate(-1.5deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes rksWelcomeCoverArt {
  from { transform: scale(1.055); }
  to { transform: scale(1); }
}

.rks-product-demo {
  z-index: 24;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.rks-splash:is([data-phase="composer"], [data-phase="story"], [data-phase="style"]) .rks-product-demo {
  opacity: 1;
}

.rks-shot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(36px, 5cqw, 84px);
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.985);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(.2,.9,.3,1.05);
}

.rks-shot-composer {
  opacity: var(--rks-composer-opacity, 0);
  transform: translate3d(var(--rks-composer-x, 0), 0, 0) scale(var(--rks-composer-scale, .985));
}

.rks-shot-story {
  opacity: var(--rks-story-opacity, 0);
  transform: translate3d(var(--rks-story-x, 48px), 0, 0) scale(var(--rks-story-scale, .985));
}

.rks-shot-style {
  z-index: 3;
  display: block;
  padding: 0;
  opacity: var(--rks-style-opacity, 0);
  transform: none;
}

.rks-shot-composer { align-content: center; }

.rks-demo-composer-stack {
  display: grid;
  width: min(830px, 84cqw);
  justify-items: center;
  gap: 16px;
}

.rks-demo-mode-tabs {
  max-width: 100%;
  margin: 0;
}

.rks-demo-mode-tabs .sb-mode-tab.is-active {
  border: 1px solid color-mix(in srgb, var(--rk-emerald) 46%, transparent);
  background: var(--rk-emerald-soft);
  color: var(--rk-emerald-hover);
  box-shadow: 0 8px 20px rgb(10 126 96 / 14%);
}

.rks-demo-mode-tabs svg,
.rks-demo-composer svg,
.rks-demo-style-field svg,
.rks-demo-cursor svg,
.rks-demo-story-meta svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rks-demo-composer {
  width: 100%;
  margin: 0;
}

.rks-demo-composer .sb-composer-input {
  position: relative;
}

.rks-demo-premise {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 4px 2px 8px;
  color: var(--rks-ink);
  font-family: var(--rk-font-display);
  font-size: 1.3rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rks-type-caret {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  margin-inline-start: 2px;
  background: var(--rks-emerald);
  vertical-align: -0.2em;
  opacity: 0;
  animation: rksCaret 760ms steps(2, end) infinite;
}

.rks-splash[data-composer-focused="true"] .rks-type-caret { opacity: 1; }

.rks-splash[data-composer-focused="true"] .rks-demo-composer {
  border-color: var(--rks-emerald);
  box-shadow: 0 0 0 3px rgba(15, 164, 126, 0.12);
}

@keyframes rksCaret { 50% { opacity: 0; } }

.rks-demo-image-button { transform: scale(calc(1 - var(--rks-image-press, 0) * .09)); }
.rks-demo-send-button { transform: scale(calc(1 - var(--rks-send-press, 0) * .1)); }

.rks-demo-attachments {
  position: static;
  width: 100%;
  min-height: 220px;
  margin-block-start: 0;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
}

.rks-demo-attachments .rks-demo-attachment {
  position: relative;
  display: grid;
  grid-template-rows: 176px minmax(22px, auto);
  align-items: start;
  gap: 8px;
  flex: 0 0 152px;
  width: 152px;
  min-height: 0;
  padding: 6px 6px 9px;
  overflow: hidden;
  border-radius: var(--rk-radius);
  background: var(--rk-surface);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.96);
  transition: opacity 360ms ease, transform 430ms cubic-bezier(.2,.9,.3,1.15);
}

.rks-demo-attachments .rks-demo-attachment-image {
  width: 100%;
  height: 176px;
  border-radius: calc(var(--rk-radius) - 4px);
  object-fit: cover;
  object-position: center;
}

.rks-demo-attachments .rks-demo-attachment > span {
  width: 100%;
  max-width: none;
  padding-inline: 4px;
  overflow: hidden;
  color: var(--rk-ink);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rks-demo-attachments .rks-demo-attachment > button {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--rk-line);
  border-radius: 999px;
  background: var(--rk-surface);
  box-shadow: var(--rk-shadow-card);
}

.rks-demo-attachment:nth-child(2) { transition-delay: 70ms; }
.rks-splash[data-composer-attachments="ready"] .rks-demo-attachment {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.rks-demo-story-page {
  width: min(1440px, 92cqw);
  height: min(680px, calc(100cqh - 72px));
  min-height: 0;
  padding: 0;
  overflow: hidden;
  transform: scale(0.9);
  transform-origin: center;
}

.rks-demo-story-page .sb-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  width: 100%;
  height: 100%;
  gap: 0;
  margin: 0;
}

.rks-demo-story-page .sb-prose-panel,
.rks-demo-story-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rks-line);
  border-radius: 20px;
  background: var(--rks-surface);
  box-shadow: 0 18px 44px -34px rgba(43, 42, 38, 0.36);
}

.rks-demo-story-page .sb-prose-panel {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.rks-demo-story-card {
  border-inline-start: 0;
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.rks-demo-story-page .sb-prose-scroll {
  height: 100%;
  padding: clamp(30px, 4cqh, 48px) clamp(34px, 4cqw, 66px);
  overflow: hidden;
}

.rks-demo-story-page .sb-prose-title {
  min-height: 1.15em;
  margin: 0 0 22px;
  font: 800 clamp(28px, 2.5cqw, 42px)/1.12 "Baloo 2", "Nunito", sans-serif;
  letter-spacing: -0.035em;
  opacity: clamp(0, calc(var(--rks-stream-progress, 0) * 5), 1);
  transform: translateY(clamp(0px, calc((1 - var(--rks-stream-progress, 0)) * 10px), 10px));
}

.rks-demo-story-page .sb-prose-p {
  min-height: 1.62em;
  margin: 0 0 10px;
  color: var(--rks-ink-soft);
  font-size: clamp(13px, 1.08cqw, 17px);
  line-height: 1.66;
  opacity: clamp(0, calc(var(--rks-stream-progress, 0) * 5), 1);
  transform: translateY(clamp(0px, calc((1 - var(--rks-stream-progress, 0)) * 10px), 10px));
}

[data-rks-story-left-stream][data-rks-stream-active="true"]::after,
[data-rks-story-right-stream][data-rks-stream-active="true"]::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 3px;
  vertical-align: -0.12em;
  background: var(--rks-emerald);
  animation: rks-caret 720ms steps(1, end) infinite;
}

.rks-demo-story-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--rks-line);
}

.rks-demo-story-card-head h2 {
  min-height: 1.35em;
  margin: 0;
  font-size: clamp(17px, 1.45cqw, 22px);
  line-height: 1.3;
}

.rks-demo-age {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--rks-emerald);
  background: rgba(15, 164, 126, 0.1);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.rks-demo-story-card-body {
  padding: 12px 20px 18px;
}

.rks-demo-story-detail > strong,
.rks-demo-setting > strong {
  color: var(--rks-ink-soft);
  font-size: 11px;
  font-weight: 900;
}

.rks-demo-story-meta {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 5px;
}

.rks-demo-cast-avatar {
  width: 34px;
  height: 34px;
  margin-inline-end: -5px;
  border: 2px solid var(--rks-surface);
  border-radius: 50%;
  object-fit: cover;
}

.rks-demo-story-meta > span {
  margin-inline-start: 14px;
  font-size: 12px;
  font-weight: 800;
}

.rks-demo-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 9px 0 10px;
  color: var(--rks-ink-soft);
  font-size: 11px;
}

.rks-demo-setting span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rks-demo-setting svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.rks-demo-page-count {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.rks-demo-beats {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rks-demo-beats li {
  display: grid;
  grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--rks-line);
  border-radius: 8px;
  opacity: clamp(0, calc(var(--rks-stream-progress, 0) * 5), 1);
  transform: translateX(clamp(0px, calc((1 - var(--rks-stream-progress, 0)) * 12px), 12px));
}

.rks-demo-beats li > span {
  color: var(--rks-ink-soft);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.rks-demo-beats li > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rks-demo-style-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1200px;
}

.rks-demo-style-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .32em;
  width: min(1160px, calc(100% - 112px));
  margin: 0 auto;
  padding-block: clamp(18px, 2.4cqh, 30px) clamp(10px, 1.3cqh, 16px);
  color: var(--rks-ink);
  font-size: clamp(24px, 2.05cqw, 34px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.025em;
  opacity: var(--rks-style-title-opacity, 0);
  transform: translateY(var(--rks-style-title-y, -14px));
  will-change: transform, opacity;
}

.rks-demo-style-title strong {
  color: var(--rks-emerald);
  font-size: 1.12em;
  font-weight: 950;
}

.rks-demo-style-catalog {
  width: 100%;
  height: calc(100% - clamp(72px, 8.5cqh, 96px));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
}

.rks-demo-style-waterfall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, .9cqw, 14px);
  align-content: start;
  align-items: start;
  width: min(1160px, calc(100% - 112px));
  margin-inline: auto;
  padding-block: clamp(30px, 3.6cqh, 42px) clamp(34px, 5cqh, 58px);
}

.rks-demo-style-card {
  appearance: none;
  position: relative;
  z-index: 1;
  min-width: 0;
  aspect-ratio: auto;
  height: auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--rks-line);
  border-radius: clamp(7px, .65cqw, 10px);
  color: var(--rks-ink);
  background: var(--rks-surface);
  box-shadow: 0 18px 44px -30px rgba(43, 42, 38, 0.48);
  opacity: var(--rks-style-card-opacity, 0);
  text-align: start;
  transform: translate3d(var(--rks-style-card-x, 0), var(--rks-style-card-y, -120cqh), 0)
    rotate(var(--rks-style-card-rotate, 0deg)) scale(var(--rks-style-card-scale, 1));
  transform-origin: center;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  will-change: transform, opacity;
}

.rks-splash[data-style-picked="false"] .rks-demo-style-card.is-active {
  border-color: var(--rks-line);
}

.rks-splash[data-style-picked="false"] .rks-demo-style-card.is-active .sb-style-thumb-name {
  color: var(--rks-ink);
}

.rks-splash[data-style-picked="true"] .rks-demo-style-card.is-active {
  z-index: 2;
  border: 2px solid var(--rks-emerald);
  box-shadow: 0 18px 48px -26px rgba(15, 164, 126, 0.48);
}

.rks-demo-style-card .sb-style-thumb-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
}

.rks-demo-style-card .sb-style-thumb-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rks-demo-style-card .sb-style-thumb-chip {
  position: absolute;
  inset: auto;
  inset-block-end: 7px;
  inset-inline-start: 7px;
  width: max-content;
  height: auto;
  max-width: calc(100% - 14px);
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--rks-ink);
  background: var(--rks-paper);
  font-size: 8px;
  font-weight: 900;
}

.rks-demo-style-card .sb-style-thumb-caption {
  display: flex;
  align-items: center;
  height: 28px;
  padding-inline: 9px;
  font-size: 10px;
  font-weight: 900;
}

.rks-demo-style-card .sb-style-thumb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rks-demo-style-check {
  position: absolute;
  inset-block-start: 7px;
  inset-inline-end: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--rks-emerald);
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(.2,.9,.3,1.2);
}

.rks-splash[data-style-picked="true"] .rks-demo-style-card.is-active .rks-demo-style-check {
  opacity: 1;
  transform: scale(1);
}

.rks-demo-cursor {
  position: absolute;
  z-index: 60;
  top: var(--rks-cursor-y);
  left: var(--rks-cursor-x);
  width: 32px;
  height: 40px;
  color: var(--rks-ink);
  filter: drop-shadow(0 3px 4px rgba(43, 42, 38, 0.24));
  opacity: var(--rks-cursor-visible);
  transform: translate(-3px, -3px);
  transition: opacity 140ms ease;
}

.rks-demo-cursor svg { width: 100%; height: 100%; fill: var(--rks-paper); stroke: currentColor; stroke-width: 2; }

.rks-demo-cursor [data-rks-cursor-ring] {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 32px;
  height: 32px;
  border: 2.5px solid #08745c;
  border-radius: 50%;
  opacity: calc(var(--rks-cursor-click, 0) * .85);
  transform: translate(-50%, -50%) scale(calc(.32 + var(--rks-cursor-click, 0) * 1.42));
  transform-origin: center;
}

.rks-world-sequence {
  z-index: 28;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.rks-splash[data-style-bridge="true"] .rks-world-sequence,
.rks-splash[data-phase="storyboards"] .rks-world-sequence { opacity: 1; }

.rks-splash[data-style-bridge="true"] .rks-product-demo { z-index: 30; }

.rks-splash[data-style-bridge="true"] .rks-demo-style-card.is-active { opacity: 0; }

.rks-selected-style-object,
.rks-world-card,
.rks-storyboard-card {
  overflow: hidden;
  border: 1px solid var(--rks-line);
  background: var(--rks-surface);
  box-shadow: 0 18px 42px -28px rgba(43, 42, 38, 0.35);
}

.rks-selected-style-object {
  position: absolute;
  z-index: 4;
  border: 3px solid var(--rks-emerald);
  border-radius: 18px;
  opacity: calc(1 - var(--rks-world-dissolve, 0));
  perspective: 1100px;
  transform-style: preserve-3d;
  will-change: left, top, width, height, opacity;
}

.rks-style-bridge-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.rks-style-bridge-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--rks-surface);
  backface-visibility: hidden;
}

.rks-style-bridge-back { transform: rotateY(180deg); }
.rks-style-bridge-face img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.rks-style-bridge-back img { object-fit: contain; background: var(--rks-paper-2); }
.rks-style-bridge-face figcaption { min-height: 42px; padding: 11px 13px; font-size: 13px; font-weight: 900; }

.rks-world-deck {
  position: absolute;
  z-index: 2;
  inset: 11% 8%;
  perspective: 1000px;
}

.rks-world-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(330px, 25cqw);
  aspect-ratio: 0.78;
  margin: 0;
  border-radius: 16px;
  opacity: var(--rks-world-opacity, 0);
  transform: translate(calc(-50% + var(--rks-world-x, 0px)), calc(-50% + var(--rks-world-y, 0px))) rotate(var(--rks-world-rotate, 0deg));
  will-change: transform, opacity;
}

.rks-world-card-image { width: 100%; height: 86%; object-fit: cover; }
.rks-world-card[data-rks-world="dog"] .rks-world-card-image { object-fit: contain; background: var(--rks-paper-2); }
.rks-world-card figcaption { padding: 10px 13px; color: var(--rks-ink-soft); font-size: 13px; font-weight: 900; }

.rks-world-deck { opacity: calc(1 - var(--rks-world-dissolve, 0)); }

.rks-storyboard-strip {
  position: absolute;
  inset: 13% 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1cqw, 18px);
}

.rks-storyboard-card {
  position: relative;
  flex: 0 1 240px;
  aspect-ratio: 0.78;
  margin: 0;
  border-radius: 14px;
  opacity: var(--rks-board-opacity, 0);
  transform: translate3d(var(--rks-board-collapse-x, 0px), var(--rks-board-enter-y, 110px), 0) scale(var(--rks-board-scale, 1)) rotate(var(--rks-board-rotate, 0deg));
  will-change: transform, opacity;
}

.rks-storyboard-image { display: block; width: 100%; height: 100%; object-fit: cover; }

.rks-storyboard-copy {
  position: absolute;
  inset-inline: 12px;
  bottom: 32px;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: clamp(11px, 0.82cqw, 14px);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    -1px -1px 0 var(--rks-ink),
    1px -1px 0 var(--rks-ink),
    -1px 1px 0 var(--rks-ink),
    1px 1px 0 var(--rks-ink),
    0 2px 4px rgba(43, 42, 38, 0.72);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.rks-storyboard-page {
  position: absolute;
  inset-inline-end: 9px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--rks-ink);
  background: var(--rks-paper);
  font-size: 10px;
  font-weight: 900;
}

.rks-data-stream {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: var(--rks-data-rise, 0);
}

.rks-data-stream i {
  position: absolute;
  left: calc(4% + var(--rks-stream-index) * 5.4%);
  bottom: -18%;
  width: 2px;
  height: calc(24% + var(--rks-stream-index) * 1.45%);
  background: var(--rks-emerald);
  opacity: var(--rks-stream-opacity, 0);
  transform: translateY(var(--rks-stream-y, 0px));
  will-change: transform, opacity;
}

.rks-bookfx-layer {
  z-index: 32;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 320ms ease, transform 580ms cubic-bezier(.2,.9,.3,1.05);
}

.rks-splash[data-bookfx-active="true"] .rks-bookfx-layer {
  opacity: calc(1 - var(--rks-bookfx-exit, 0));
  transform: scale(1);
}

.rks-splash[data-bookfx-replay-ready="true"] .rks-bookfx-layer {
  pointer-events: auto;
}

.rks-bookfx-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.rks-splash img[data-rks-load-state="loading"],
.rks-splash img[data-rks-load-state="error"] {
  visibility: hidden;
}

/* 96px is free headroom: the footer reserves a 102px content box (150px minus its 24px padding), so
   a two-line caption at the largest type size (22px on a 1920 viewport) stops grazing the edge. */
.rks-film-captions {
  position: relative;
  min-width: 0;
  min-height: 96px;
  overflow: hidden;
  pointer-events: none;
}

.rks-film-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  color: var(--rks-ink);
  text-align: start;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms ease, transform 380ms cubic-bezier(.2,.9,.3,1.05);
}

.rks-film-caption.is-active { opacity: 1; transform: translateY(0); }
.rks-film-caption > span { margin-bottom: 5px; font-size: clamp(14px, .9vw, 16px); line-height: 1.3; }
/* Narration, not a headline: regular weight, and clamped to two lines. The clamp is what keeps the
   Continue button reachable — the caption is absolutely positioned inside the fixed-height box
   above, so an over-long locale used to spill past the footer, which the shell (overflow: hidden,
   height derived from 100dvh - 198px) then cut off, button included. */
.rks-film-caption > strong {
  display: -webkit-box;
  overflow: hidden;
  font: 500 clamp(17px, 1.15vw, 22px)/1.38 "Baloo 2", "Nunito", sans-serif;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.rks-film-caption > p {
  display: -webkit-box;
  max-width: 880px;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--rks-ink-soft);
  font-size: clamp(12px, .9vw, 15px);
  font-weight: 650;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rks-showcase-footer {
  position: relative;
  z-index: 84;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 150px;
  padding: 24px 32px;
  background: var(--rks-surface);
}

@media (min-width: 901px) {
  .rks-film-caption > strong {
    max-width: 1040px;
  }
}

.rks-segment-action {
  align-self: center;
  flex: 0 0 auto;
  min-width: 118px;
  max-width: 240px;
  padding-block: 8px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  color: var(--rks-surface);
  border-color: var(--rks-emerald);
  background: var(--rks-emerald);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.rks-splash.is-segment-held .rks-segment-action {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.rks-segment-action:not(:disabled):hover {
  border-color: var(--rks-emerald-hover);
  color: var(--rks-surface);
  background: var(--rks-emerald-hover);
}

.rks-splash.is-segment-held .rks-segment-action:disabled {
  border-color: color-mix(in srgb, var(--rks-ink-muted) 20%, var(--rks-line));
  color: color-mix(in srgb, var(--rks-ink-muted) 76%, var(--rks-surface));
  background: color-mix(in srgb, var(--rks-ink-muted) 12%, var(--rks-surface));
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.rks-segment-action-icon {
  display: inline-flex;
}

.rks-segment-action[data-rks-segment-mode="continue"] .is-replay,
.rks-segment-action[data-rks-segment-mode="replay"] .is-continue {
  display: none;
}

.rks-splash[data-rtl="true"] .rks-segment-action[data-rks-segment-mode="continue"] svg {
  transform: scaleX(-1);
}

.rks-ktv-line {
  display: none;
  align-items: center;
  gap: 8px;
  max-width: min(560px, 80cqw);
  padding: 10px 14px;
  border: 1px solid var(--rks-line);
  border-radius: 999px;
  color: var(--rks-ink);
  background: var(--rks-paper);
  box-shadow: 0 14px 34px -24px rgba(43, 42, 38, 0.5);
  font-size: 13px;
  font-weight: 900;
}

.rks-splash[data-phase="formats"] .rks-live-ktv-line { display: inline-flex; }
.rks-ktv-line { border-color: var(--rks-emerald); color: var(--rks-emerald); }

.rks-creation-choice {
  z-index: 50;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: clamp(28px, 5cqh, 52px);
  padding: clamp(70px, 10cqh, 104px) clamp(28px, 8cqw, 132px) clamp(32px, 6cqh, 68px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc((1 - var(--rks-choice-portal, 0)) * 18px + var(--rks-choice-exit, 0) * -12px));
  isolation: isolate;
}

.rks-creation-choice::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--rks-paper);
  opacity: var(--rks-choice-background, 0);
}

.rks-splash[data-choice-portal="true"] .rks-creation-choice {
  opacity: var(--rks-choice-portal, 1);
}

.rks-splash[data-choice-ready="true"] .rks-creation-choice {
  pointer-events: auto;
}

.rks-choice-copy {
  width: min(980px, 86cqw);
  text-align: center;
  opacity: var(--rks-choice-copy, 0);
}

.rks-choice-copy > span {
  display: block;
  margin-bottom: 10px;
  color: var(--rks-emerald);
  font-size: clamp(13px, 1cqw, 16px);
  font-weight: 900;
}

.rks-choice-copy h2 {
  margin: 0;
  color: var(--rks-ink);
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(32px, 3.5cqw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.rks-choice-cards {
  position: relative;
  inset-block-start: clamp(18px, 3cqh, 26px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2cqw, 28px);
  width: min(980px, 86cqw);
  opacity: var(--rks-choice-copy, 0);
}

.rks-choice-card {
  --rks-choice-wave-scale: 1.07;
  position: relative;
  display: grid;
  z-index: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: clamp(178px, 24cqh, 218px) auto;
  align-items: stretch;
  gap: clamp(13px, 1.4cqw, 18px);
  min-height: clamp(288px, 40cqh, 340px);
  overflow: visible;
  padding: clamp(14px, 1.5cqw, 20px);
  border: 1px solid var(--rks-line);
  border-radius: 22px;
  color: var(--rks-ink);
  background: var(--rks-surface);
  box-shadow: 0 20px 48px -42px rgba(43, 42, 38, 0.55);
  font: inherit;
  text-align: start;
  cursor: pointer;
  isolation: isolate;
  will-change: transform;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 380ms cubic-bezier(0.2, 0.9, 0.3, 1.2),
    transform 380ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.rks-choice-card::before,
.rks-choice-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 2px solid var(--rks-emerald);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transform: scale(1);
}

.rks-choice-card[aria-pressed="true"] {
  border-color: var(--rks-emerald);
  background: color-mix(in srgb, var(--rks-emerald) 7%, var(--rks-surface));
  box-shadow:
    0 26px 58px -34px color-mix(in srgb, var(--rks-ink) 34%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--rks-emerald) 22%, transparent);
  transform: translateY(-4px) scale(1.012);
}

.rks-choice-card[aria-pressed="true"]::before {
  animation: rks-choice-border-wave 1.45s ease-out 0s 2;
}

.rks-choice-card[aria-pressed="true"]::after {
  animation: rks-choice-border-wave 1.45s ease-out 320ms 2;
}

.rks-choice-card:focus-visible {
  outline: 3px solid rgba(15, 164, 126, 0.28);
  outline-offset: 3px;
}

.rks-choice-card-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rks-line) 74%, transparent);
  border-radius: 18px;
  background: var(--rks-paper);
  transition:
    border-color 220ms ease,
    transform 380ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.rks-choice-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.08);
  user-select: none;
}

.rks-choice-card[aria-pressed="true"] .rks-choice-card-art {
  border-color: color-mix(in srgb, var(--rks-emerald) 44%, var(--rks-line));
}

.rks-choice-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding-inline: 4px;
  padding-block-end: 2px;
}

.rks-choice-card-copy strong {
  font: 800 clamp(21px, 2cqw, 30px)/1.1 "Baloo 2", "Nunito", sans-serif;
  letter-spacing: -0.025em;
}

.rks-choice-card-copy > span {
  color: var(--rks-ink-soft);
  font-size: clamp(13px, 1.1cqw, 16px);
  font-weight: 700;
  line-height: 1.4;
}

.rks-choice-card-check {
  position: absolute;
  inset-block-start: clamp(18px, 1.8cqw, 24px);
  inset-inline-end: clamp(18px, 1.8cqw, 24px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rks-line);
  border-radius: 50%;
  color: transparent;
  background: var(--rks-surface);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 6px 16px -12px color-mix(in srgb, var(--rks-ink) 38%, transparent);
  transform: scale(0.88);
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.rks-choice-card[aria-pressed="true"] .rks-choice-card-check {
  border-color: var(--rks-emerald);
  color: var(--rks-surface);
  background: var(--rks-emerald);
  animation: rks-choice-check-pop 440ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  transform: scale(1);
}

.rks-splash[data-choice-hint="picture-book"] .rks-choice-card[data-rks-choice-mode="picture-book"],
.rks-splash[data-choice-hint="animation"] .rks-choice-card[data-rks-choice-mode="animation"] {
  z-index: 5;
  border-color: color-mix(in srgb, var(--rks-emerald) 70%, var(--rks-line));
  animation: rks-choice-invitation 500ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@media (hover: hover) and (pointer: fine) {
  .rks-choice-card:hover {
    z-index: 4;
    border-color: color-mix(in srgb, var(--rks-emerald) 62%, var(--rks-line));
    box-shadow: 0 34px 68px -30px color-mix(in srgb, var(--rks-ink) 36%, transparent);
    transform: translateY(-10px) scale(1.04);
  }

  .rks-choice-card:hover .rks-choice-card-art {
    border-color: color-mix(in srgb, var(--rks-emerald) 32%, var(--rks-line));
    transform: translateY(-2px) scale(1.025);
  }

  .rks-choice-card:hover .rks-choice-card-check {
    border-color: color-mix(in srgb, var(--rks-emerald) 62%, var(--rks-line));
    transform: scale(1);
  }

  .rks-choice-card[aria-pressed="true"]:hover {
    transform: translateY(-11px) scale(1.045);
  }
}

@keyframes rks-choice-border-wave {
  0% {
    opacity: 0.62;
    transform: scale(1);
  }
  65% { opacity: 0.2; }
  100% {
    opacity: 0;
    transform: scale(var(--rks-choice-wave-scale));
  }
}

@keyframes rks-choice-check-pop {
  0% { transform: scale(0.64); }
  58% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes rks-choice-invitation {
  0%, 100% {
    box-shadow: 0 18px 44px -34px color-mix(in srgb, var(--rks-ink) 30%, transparent);
    transform: translateY(0) scale(1);
  }
  46% {
    box-shadow: 0 36px 72px -28px color-mix(in srgb, var(--rks-ink) 44%, transparent);
    transform: translateY(-12px) scale(1.055);
  }
}

.rks-finale {
  z-index: 54;
  display: grid;
  grid-template-rows: auto auto auto;
  align-items: center;
  align-content: center;
  gap: clamp(14px, 2.5cqh, 24px);
  padding: clamp(70px, 10cqh, 104px) clamp(24px, 6cqw, 104px) clamp(28px, 5cqh, 54px);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
}

.rks-finale::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--rks-paper);
  opacity: var(--rks-finale-background, 0);
}

.rks-splash[data-finale-portal="true"] .rks-finale {
  opacity: 1;
}

.rks-splash[data-finale-ready="true"] .rks-finale {
  pointer-events: auto;
}

.rks-finale-copy {
  width: min(900px, 82cqw);
  margin: 0 auto clamp(14px, 2.3cqh, 24px);
  text-align: center;
  opacity: var(--rks-finale-copy, 0);
  transform: translateY(calc((1 - var(--rks-finale-copy, 0)) * 16px));
}

.rks-finale-copy > span {
  display: block;
  margin-bottom: 10px;
  color: var(--rks-emerald);
  font-size: clamp(13px, 1cqw, 16px);
  font-weight: 900;
}

.rks-finale-copy h2 {
  margin: 0;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(40px, 4.6cqw, 70px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.rks-finale-copy p {
  margin: 12px 0 0;
  color: var(--rks-ink-soft);
  font-size: clamp(15px, 1.25cqw, 19px);
  font-weight: 700;
  line-height: 1.45;
}

.rks-finale-presets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(930px, 82cqw);
  margin: 0 auto;
  opacity: var(--rks-finale-copy, 0);
  transform: translateY(calc((1 - var(--rks-finale-copy, 0)) * 16px));
}

.rks-finale-preset-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.rks-finale-preset {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 58px;
  overflow: hidden;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--rks-emerald) 22%, var(--rks-line));
  border-radius: 14px;
  color: var(--rks-ink);
  background: var(--rks-surface);
  font-family: inherit;
  font-size: clamp(12px, 0.95cqw, 14px);
  font-weight: 800;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.rks-finale-preset-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: var(--rks-emerald-deep);
  background: color-mix(in srgb, var(--rks-emerald) 12%, var(--rks-surface));
  font-size: 12px;
  line-height: 1;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.rks-finale-preset-copy {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rks-finale-preset-refresh {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding-inline: 14px;
  border: 1px dashed color-mix(in srgb, var(--rks-ink-soft) 48%, var(--rks-line));
  border-radius: 999px;
  color: var(--rks-ink-soft);
  background: transparent;
  font-family: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.rks-finale-preset-refresh svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.rks-finale-preset:hover {
  border-color: color-mix(in srgb, var(--rks-emerald) 65%, var(--rks-line));
  background: color-mix(in srgb, var(--rks-emerald) 6%, var(--rks-surface));
  box-shadow: 0 16px 34px -24px color-mix(in srgb, var(--rks-ink) 52%, transparent);
  transform: translateY(-3px);
}

.rks-finale-preset:hover .rks-finale-preset-mark {
  transform: rotate(8deg) scale(1.08);
}

.rks-finale-preset[aria-pressed="true"] {
  border-color: var(--rks-emerald);
  background: color-mix(in srgb, var(--rks-emerald) 10%, var(--rks-surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rks-emerald) 16%, transparent),
    0 16px 34px -24px color-mix(in srgb, var(--rks-emerald-deep) 48%, transparent);
}

.rks-finale-preset[aria-pressed="true"] .rks-finale-preset-mark {
  color: var(--rks-surface);
  background: var(--rks-emerald);
}

.rks-finale-preset-refresh:hover {
  border-color: color-mix(in srgb, var(--rks-emerald) 58%, var(--rks-line));
  color: var(--rks-emerald-deep);
  background: color-mix(in srgb, var(--rks-emerald) 5%, transparent);
  transform: translateY(-1px);
}

.rks-finale-preset:focus-visible,
.rks-finale-preset-refresh:focus-visible {
  outline: 3px solid rgba(15, 164, 126, 0.26);
  outline-offset: 2px;
}

.rks-finale-composer {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(930px, 82cqw);
  max-height: 100%;
  margin: 0 auto;
  overflow-y: auto;
  padding: 4px;
  opacity: var(--rks-finale-copy, 0);
  transform: translateY(calc((1 - var(--rks-finale-copy, 0)) * 16px));
  scrollbar-width: thin;
}

.rks-finale-composer > .composer,
.rks-finale-composer > .sb-char-chips,
.rks-finale-composer > .sb-attachments,
.rks-finale-composer > .sb-intake-sheet,
.rks-finale-composer > .sb-char-panel,
.rks-finale-composer > .sb-composer-note,
.rks-finale-composer > .sb-premise-count,
.rks-finale-composer > .sb-route-hint,
.rks-finale-composer > .sb-dims {
  width: 100%;
  margin-inline: 0;
}

.rks-finale-composer > .composer {
  flex: none;
  background: color-mix(in srgb, var(--rks-surface) 88%, transparent);
  box-shadow: 0 18px 48px -38px rgba(43, 42, 38, 0.5);
}

.rks-finale-composer > .sb-dims {
  flex: none;
  margin-block-start: 0;
}

.rks-finale-composer > .sb-char-panel,
.rks-finale-composer > .sb-intake-sheet {
  max-height: min(300px, 44cqh);
  overflow-y: auto;
}

.rks-finale-composer .sb-one-click-switch {
  display: none;
}

.rks-static-composer {
  width: min(860px, 100%);
  opacity: 1;
  transform: none;
}

.rks-static-summary {
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 28px clamp(40px, 7cqw, 120px);
  padding: clamp(36px, 5cqw, 76px) clamp(26px, 7cqw, 124px);
  background: var(--rks-paper);
}

.rks-static-summary[hidden] { display: none; }
.rks-static-copy h2 { font-size: clamp(38px, 5cqw, 72px); }
.rks-static-copy ul { display: grid; gap: 9px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--rks-ink-soft); }
.rks-static-copy li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 10px; border-radius: 50%; background: var(--rks-emerald); }

.rks-static-art {
  position: relative;
  justify-self: center;
  width: min(500px, 40cqw);
  aspect-ratio: 1;
}

.rks-static-book { position: absolute; inset: 8%; width: 84%; height: 84%; border-radius: 16px; object-fit: cover; box-shadow: 0 24px 54px rgba(43, 42, 38, 0.18); transform: rotate(4deg); }
.rks-static-daughter { position: absolute; z-index: 2; left: 2%; bottom: 0; width: 37%; height: 60%; object-fit: contain; }
.rks-static-dog { position: absolute; z-index: 3; right: 0; bottom: 1%; width: 32%; height: 42%; object-fit: contain; }
.rks-static-entries { grid-column: 1 / -1; justify-self: center; width: min(420px, 100%); }

.rks-splash[data-rtl="true"] .rks-finale-composer,
.rks-splash[data-rtl="true"] .rks-finale-presets { direction: rtl; }

.rks-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 900px) {
  .rks-splash {
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }
  .rks-showcase-shell {
    grid-template-rows: auto 3px minmax(136px, auto);
    width: min(100%, calc((100dvh - 166px) * 2.15));
    height: auto;
    max-height: calc(100dvh - max(24px, calc(env(safe-area-inset-top) + env(safe-area-inset-bottom))));
    border-radius: 22px;
  }
  .rks-stage { aspect-ratio: 2.15 / 1; }
  .rks-showcase-footer { min-height: 136px; padding: 18px 22px; }
  .rks-welcome { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .rks-welcome-object { width: min(240px, 42cqw); }
  .rks-welcome-copy { margin: 0 auto; }
  .rks-demo-story-page { height: min(690px, 78cqh); }
  .rks-demo-story-page .sb-story-grid { position: relative; display: block; }
  .rks-demo-story-page .sb-prose-panel,
  .rks-demo-story-card {
    position: absolute;
    inset: 0;
    border: 1px solid var(--rks-line);
    border-radius: 20px;
    transition: opacity 220ms ease, transform 220ms ease;
  }
  .rks-demo-story-card {
    display: block;
    opacity: 0;
    transform: translateX(18px);
  }
  .rks-splash:is([data-story-step="pages"], [data-story-step="done"]) .rks-demo-story-page .sb-prose-panel {
    opacity: 0;
    transform: translateX(-18px);
  }
  .rks-splash:is([data-story-step="pages"], [data-story-step="done"]) .rks-demo-story-card {
    opacity: 1;
    transform: translateX(0);
  }
  .rks-demo-story-card-head { min-height: 82px; padding: 14px 16px 11px; }
  .rks-demo-story-card-body { padding: 9px 14px 12px; }
  .rks-demo-story-meta { min-height: 30px; }
  .rks-demo-cast-avatar { width: 30px; height: 30px; }
  .rks-demo-setting { margin-block: 6px 7px; }
  .rks-demo-page-count { margin-bottom: 5px; }
  .rks-demo-beats { gap: 3px; }
  .rks-demo-beats li { min-height: 32px; padding: 5px 8px; }
  .rks-demo-style-waterfall {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(820px, calc(100% - 48px));
  }
  .rks-demo-style-title { width: min(820px, calc(100% - 48px)); }
  .rks-world-card { width: min(280px, 32cqw); }
  .rks-creation-choice { gap: 24px; padding-inline: 32px; }
  .rks-choice-copy,
  .rks-choice-cards { width: min(880px, 90cqw); }
  .rks-finale-composer { width: min(860px, 88cqw); }
  .rks-static-summary { grid-template-columns: 1fr; overflow-y: auto; text-align: center; }
  .rks-static-art { width: min(420px, 72cqw); }
}

@media (max-width: 600px) {
  .rks-splash {
    padding:
      max(6px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
  }
  .rks-showcase-shell {
    grid-template-rows: auto 3px minmax(150px, auto);
    width: min(100%, calc((100dvh - 165px) * 2.15));
    height: auto;
    border-radius: 18px;
  }
  .rks-stage-actions {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
  }
  .rks-sound-toggle,
  .rks-close {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }
  .rks-shot { padding: 18px; }
  .rks-demo-composer-stack { width: 94cqw; }
  .rks-demo-composer { width: 100%; }
  .rks-demo-attachments { min-height: 196px; gap: 8px; }
  .rks-demo-attachments .rks-demo-attachment {
    grid-template-rows: clamp(132px, 42cqw, 164px) minmax(22px, auto);
    flex-basis: calc((100% - 8px) / 2);
    width: calc((100% - 8px) / 2);
    max-width: 152px;
  }
  .rks-demo-attachments .rks-demo-attachment-image {
    height: clamp(132px, 42cqw, 164px);
  }
  .rks-demo-style-field { inset: 0; }
  .rks-demo-style-title {
    width: calc(100% - 24px);
    padding-block: 12px 8px;
    font-size: clamp(19px, 6cqw, 26px);
  }
  .rks-demo-style-catalog { height: calc(100% - 58px); }
  .rks-demo-style-waterfall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: calc(100% - 24px);
    padding-block: 10px;
  }
  .rks-world-deck { inset-inline: 0; }
  .rks-world-card { width: 48cqw; }
  .rks-storyboard-strip { justify-content: flex-start; overflow: hidden; }
  .rks-storyboard-card { flex-basis: 42cqw; min-width: 42cqw; }
  .rks-showcase-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 150px;
    padding: 14px 16px 16px;
  }
  .rks-film-captions { min-height: 164px; }
  /* The kicker is a full sentence in several locales and wraps to three lines at this width, which
     is what used to push the narration out of its box — clamp it too, not just the narration. */
  .rks-film-caption > span {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .rks-film-caption > strong { font-size: clamp(13px, 3.6cqw, 17px); -webkit-line-clamp: 6; }
  .rks-film-caption > p { margin-top: 5px; font-size: 12px; -webkit-line-clamp: 2; }
  .rks-segment-action { min-width: 0; max-width: 112px; min-height: 44px; padding: 0 12px; line-height: 1.15; white-space: normal; }
  .rks-creation-choice { align-content: start; gap: 18px; padding: 68px 14px 18px; }
  .rks-choice-copy,
  .rks-choice-cards { width: 100%; }
  .rks-choice-copy > span { margin-bottom: 5px; font-size: 12px; }
  .rks-choice-copy h2 { font-size: clamp(24px, 7cqw, 34px); }
  .rks-choice-cards { inset-block-start: 6px; grid-template-columns: 1fr; gap: 10px; }
  .rks-choice-card {
    --rks-choice-wave-scale: 1.035;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 118px auto;
    gap: 10px;
    min-height: 200px;
    padding: 10px;
    border-radius: 17px;
  }
  .rks-choice-card-art { border-radius: 13px; }
  .rks-choice-card-copy strong { font-size: 20px; }
  .rks-choice-card-copy > span { font-size: 14px; }
  .rks-choice-card-check {
    inset-block-start: 16px;
    inset-inline-end: 16px;
    width: 30px;
    height: 30px;
  }
  .rks-finale { gap: 20px; padding: 70px 14px 18px; overflow-y: auto; }
  .rks-finale-copy { width: 100%; margin-bottom: 8px; }
  .rks-finale-copy > span { margin-bottom: 6px; font-size: 12px; }
  .rks-finale-copy h2 { font-size: clamp(28px, 8cqw, 38px); }
  .rks-finale-copy p { margin-top: 7px; font-size: 13px; line-height: 1.35; }
  .rks-finale-presets {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 7px;
  }
  .rks-finale-preset-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-block: 2px 4px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
  }
  .rks-finale-preset {
    flex: 0 0 min(250px, 78cqw);
    min-height: 56px;
    scroll-snap-align: start;
  }
  .rks-finale-preset-refresh {
    justify-self: end;
    min-height: 40px;
  }
  .rks-finale-composer { width: 100%; gap: 10px; overflow: visible; padding: 0; }
  .rks-finale-composer .composer { min-height: 104px; padding: 9px 10px 8px; border-radius: 16px; }
  .rks-finale-composer .composer textarea { min-height: 34px; font-size: 16px; }
  .rks-finale-composer .sb-composer-toolbar { min-height: 44px; padding-block-start: 0; }
  .rks-finale-composer .sb-cast-btn { height: 40px; padding-inline: 12px; }
  .rks-finale-composer .sb-tool-btn { width: 40px; height: 40px; }
  .rks-finale-composer .send-button { width: 42px; height: 42px; }
  .rks-finale-composer .sb-dim-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; }
  .rks-finale-composer .sb-dim-label { inline-size: auto; font-size: 13px; }
  .rks-finale-composer .sb-dim-chips {
    inline-size: 100%;
    min-inline-size: 0;
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px;
  }
  .rks-finale-composer .sb-chip { min-height: 32px; padding-inline: 10px; font-size: 13px; }
  .rks-splash:is([data-phase="choice"], [data-phase="finale"]) .rks-showcase-shell {
    grid-template-rows: minmax(360px, 1fr) 3px minmax(150px, auto);
    width: 100%;
    height: calc(100dvh - max(12px, calc(env(safe-area-inset-top) + env(safe-area-inset-bottom))));
  }
  .rks-splash:is([data-phase="choice"], [data-phase="finale"]) .rks-stage { min-height: 360px; aspect-ratio: auto; }
  .rks-static-summary { padding: 24px 18px; }
}

@media (min-width: 601px) and (max-height: 700px) {
  .rks-splash { padding-block: 12px; }
  .rks-showcase-shell {
    grid-template-rows: auto 3px minmax(124px, auto);
    width: min(100%, calc((100dvh - 151px) * 2.15));
    height: auto;
    max-height: calc(100dvh - 24px);
  }
  .rks-stage { aspect-ratio: 2.15 / 1; }
  .rks-showcase-footer { min-height: 124px; padding-block: 10px; }
  /* 104px is exactly the footer's content box at this height (124px minus its 10px padding), so the
     third line is bought with type size, not with a taller footer the stage would have to give up. */
  .rks-film-captions { min-height: 104px; }
  .rks-film-caption > strong { font-size: 15px; -webkit-line-clamp: 3; }
  .rks-film-caption > p { -webkit-line-clamp: 1; }
  .rks-splash:is([data-phase="choice"], [data-phase="finale"]) .rks-showcase-shell {
    grid-template-rows: minmax(230px, 1fr) 3px minmax(124px, auto);
    height: calc(100dvh - 24px);
  }
  .rks-splash:is([data-phase="choice"], [data-phase="finale"]) .rks-stage { min-height: 230px; aspect-ratio: auto; }
  .rks-splash[data-phase="choice"] .rks-creation-choice { gap: 12px; padding-block: 56px 10px; }
  .rks-splash[data-phase="choice"] .rks-choice-cards { inset-block-start: 10px; }
  .rks-splash[data-phase="choice"] .rks-choice-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 110px auto;
    gap: 10px;
    min-height: 184px;
    padding: 9px 10px;
  }
  .rks-splash[data-phase="choice"] .rks-choice-card-art { border-radius: 12px; }
  .rks-splash[data-phase="finale"] .rks-finale { gap: 12px; padding-block: 58px 10px; }
  .rks-splash[data-phase="finale"] .rks-finale-copy { margin-bottom: 2px; }
  .rks-splash[data-phase="finale"] .rks-finale-copy > span { margin-bottom: 3px; }
  .rks-splash[data-phase="finale"] .rks-finale-copy h2 { font-size: clamp(24px, 4.4cqw, 34px); }
  .rks-splash[data-phase="finale"] .rks-finale-copy p { margin-top: 4px; font-size: 12px; line-height: 1.25; }
  .rks-splash[data-phase="finale"] .rks-finale-presets { gap: 6px; }
  .rks-splash[data-phase="finale"] .rks-finale-preset { min-height: 42px; }
  .rks-splash[data-phase="finale"] .rks-finale-preset-refresh { min-height: 38px; }
  .rks-splash[data-phase="finale"] .rks-finale-preset-copy { -webkit-line-clamp: 1; }
  .rks-splash[data-phase="finale"] .rks-finale-composer { gap: 7px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .composer { min-height: 84px; padding-block: 7px 5px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .composer textarea { min-height: 28px; font-size: 16px; padding-block: 1px 3px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .sb-composer-toolbar { min-height: 38px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .sb-cast-btn,
  .rks-splash[data-phase="finale"] .rks-finale-composer .sb-tool-btn,
  .rks-splash[data-phase="finale"] .rks-finale-composer .send-button { height: 38px; min-height: 38px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .sb-tool-btn,
  .rks-splash[data-phase="finale"] .rks-finale-composer .send-button { width: 38px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .sb-dims { gap: 4px; }
  .rks-splash[data-phase="finale"] .rks-finale-composer .sb-chip { min-height: 29px; }
}

.rks-splash[data-reduced="true"] .rks-choice-card,
.rks-splash[data-reduced="true"] .rks-choice-card::before,
.rks-splash[data-reduced="true"] .rks-choice-card::after,
.rks-splash[data-reduced="true"] .rks-choice-card-art,
.rks-splash[data-reduced="true"] .rks-choice-card-check {
  animation: none !important;
  transition: none !important;
}

.rks-splash[data-reduced="true"] .rks-choice-card,
.rks-splash[data-reduced="true"] .rks-choice-card:hover,
.rks-splash[data-reduced="true"] .rks-choice-card[aria-pressed="true"],
.rks-splash[data-reduced="true"] .rks-choice-card[aria-pressed="true"]:hover,
.rks-splash[data-reduced="true"] .rks-choice-card:hover .rks-choice-card-art {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .rks-welcome-confetti {
    display: none;
  }

  .rks-choice-card,
  .rks-choice-card:hover,
  .rks-choice-card[aria-pressed="true"],
  .rks-choice-card[aria-pressed="true"]:hover,
  .rks-choice-card:hover .rks-choice-card-art {
    transform: none !important;
  }

  .rks-splash *,
  .rks-splash *::before,
  .rks-splash *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
