.demo-page {
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(196, 92, 38, 0.14), transparent 58%),
    linear-gradient(180deg, #fbf7f2 0%, var(--paper) 100%);
}

.demo-main {
  min-height: calc(100dvh - var(--head-h));
  display: grid;
  place-items: center;
  padding: 0.85rem var(--page-pad) calc(1.25rem + env(safe-area-inset-bottom));
}

.demo-stage { width: min(40rem, 100%); }

.demo-beats {
  display: flex;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
}

.demo-beats li {
  position: relative;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(20, 18, 26, 0.34);
  transition: color 0.35s ease;
}

.demo-beats li + li::before {
  content: "";
  position: absolute;
  right: calc(100% + 0.28rem);
  top: 0.42em;
  width: 0.35rem;
  height: 1px;
  background: rgba(20, 18, 26, 0.18);
}

.demo-beats li.is-on { color: var(--accent); }
.demo-beats li.is-done { color: var(--ink); }

.demo-card {
  position: relative;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 22px 60px rgba(20, 18, 26, 0.07);
}

.demo-scene[hidden] { display: none !important; }

.demo-scene.is-on {
  animation: demoRise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes demoRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.demo-scene .display {
  font-size: clamp(1.85rem, 4.6vw, 2.55rem);
  margin-bottom: 0.35rem;
}

.demo-slate,
.demo-build-note,
.demo-pay-lede,
.demo-facts,
.demo-submit-hint {
  margin: 0 0 0.95rem;
  color: rgba(20, 18, 26, 0.58);
  font-size: 0.95rem;
  line-height: 1.5;
}

.demo-personas,
.demo-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }

.demo-persona,
.demo-pack {
  border: 1px solid rgba(20, 18, 26, 0.14);
  background: #fff;
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-persona {
  flex: 1 1 9.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
}

.demo-persona strong { display: block; font-size: 1.35rem; font-weight: 400; }
.demo-persona span,
.demo-pack small { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: rgba(20, 18, 26, 0.5); }

.demo-persona.is-on,
.demo-pack.is-on {
  border-color: var(--accent);
  background: rgba(196, 92, 38, 0.08);
  box-shadow: 0 0 0 4px rgba(196, 92, 38, 0.08);
}

.demo-chip {
  padding: 0.42rem 0.82rem;
  border: 1px solid rgba(20, 18, 26, 0.14);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.92);
  color: rgba(20, 18, 26, 0.7);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.demo-drop {
  margin-bottom: 0.9rem;
  padding: 1rem 0.9rem;
  border: 1px dashed rgba(20, 18, 26, 0.28);
  border-radius: 0.95rem;
  text-align: center;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.demo-drop.is-hot {
  border-color: rgba(196, 92, 38, 0.5);
  box-shadow: 0 0 0 4px rgba(196, 92, 38, 0.08);
}

.demo-drop.is-filled {
  border-style: solid;
  border-color: rgba(20, 18, 26, 0.12);
  text-align: left;
}

.demo-drop-copy { margin: 0; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.demo-drop.is-filled .demo-drop-copy { color: var(--ink); text-decoration: none; }
.demo-drop-meta { margin: 0.28rem 0 0; font-size: 0.78rem; color: rgba(20, 18, 26, 0.45); }

.demo-film { display: flex; gap: 0.55rem; margin-bottom: 0.7rem; }

.demo-film figure {
  margin: 0;
  width: 4.5rem;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
}

.demo-film figure.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-film img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #efe8df;
}

.demo-film figcaption {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(20, 18, 26, 0.45);
}

.demo-submit {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 0.15rem;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, background 0.3s ease, opacity 0.3s ease;
}

.demo-submit:disabled { opacity: 0.38; }
.demo-submit.is-pressed { transform: scale(0.975); }
.demo-submit.is-paid { background: #1f6b45; }

.demo-build-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.demo-clock { margin: 0.15rem 0 0; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1; color: var(--accent); }

.demo-rail {
  display: flex;
  gap: 0.35rem;
  margin: 0.35rem 0 0.85rem;
  padding: 0;
  list-style: none;
}

.demo-rail li {
  position: relative;
  flex: 1;
  padding-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(20, 18, 26, 0.35);
  text-align: center;
}

.demo-rail li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: -0.3rem;
  border-radius: 50%;
  background: rgba(20, 18, 26, 0.16);
  transition: background 0.35s ease, transform 0.35s ease;
}

.demo-rail li.is-on { color: var(--ink); }
.demo-rail li.is-on::before { background: var(--accent); transform: scale(1.15); }
.demo-rail li.is-done { color: rgba(20, 18, 26, 0.72); }
.demo-rail li.is-done::before { background: var(--accent); }

.demo-track { height: 0.4rem; border-radius: 999px; background: rgba(20, 18, 26, 0.08); overflow: hidden; }
.demo-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #e39a62);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-source { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.05rem; }
.demo-source img { width: 3.3rem; height: 4.4rem; object-fit: cover; border-radius: 0.45rem; }
.demo-source p { margin: 0; font-size: 0.92rem; }

.demo-packs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0 0 0.95rem;
}

.demo-pack { padding: 0.7rem 0.85rem; border-radius: 0.9rem; }
.demo-pack span { font-weight: 700; }
.demo-pack strong {
  display: block;
  margin-top: 0.15rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1;
}
.demo-pack.is-paid { border-color: #1f6b45; background: rgba(31, 107, 69, 0.08); box-shadow: none; }

.demo-paid {
  margin: 0.75rem 0 0;
  text-align: center;
  font-weight: 700;
  color: #1f6b45;
}

.demo-ready { display: grid; gap: 0.85rem; }
.demo-result {
  width: min(16rem, 78%);
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  max-height: min(58dvh, 32rem);
  border-radius: 0.95rem;
  overflow: hidden;
  background: #14121a;
  box-shadow: 0 16px 40px rgba(20, 18, 26, 0.16);
}
.demo-result video,
.demo-result img { display: block; width: 100%; height: 100%; object-fit: cover; }
.demo-end {
  text-align: center;
  padding: 0.4rem 0.2rem 0.2rem;
}
.demo-end .display { margin-inline: auto; max-width: 16ch; }
.demo-end-lede {
  max-width: 28rem;
  margin: 0.35rem auto 1.25rem;
  color: rgba(20, 18, 26, 0.62);
  font-size: 1.02rem;
  line-height: 1.55;
}
.demo-end-cta {
  display: inline-flex;
  justify-content: center;
  min-width: min(100%, 16rem);
  min-height: 3.1rem;
}
.demo-again {
  display: block;
  margin: 0.9rem auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(20, 18, 26, 0.62);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.demo-again:hover { color: var(--ink); }

.demo-caption {
  min-height: 1.45em;
  margin: 0.8rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(20, 18, 26, 0.62);
}

.demo-pointer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  overflow: visible;
}
.demo-pointer[hidden] { display: none !important; }

.demo-cluster {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  pointer-events: none;
}

.demo-ripple {
  position: fixed;
  z-index: 69;
  width: 0.8rem;
  height: 0.8rem;
  margin: -0.4rem 0 0 -0.4rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  animation: demoRipple 0.65s ease-out forwards;
}

@keyframes demoRipple {
  to { transform: scale(5); opacity: 0; }
}

@media (min-width: 800px) {
  .demo-stage { width: min(52rem, 100%); }
  .demo-scene[data-scene="create"] {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0.4rem 1.75rem;
    align-items: start;
  }
  .demo-create-side { padding-top: 0.15rem; }
  .demo-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .demo-pack { min-height: 8.2rem; }
  .demo-ready {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem 2rem;
  }
  .demo-result { width: min(18rem, 34vw); margin: 0; grid-column: 2; grid-row: 1; }
  .demo-ready-copy { grid-column: 1; grid-row: 1; }
}

@media (max-width: 720px) {
  .demo-page .site-head-inner,
  .demo-page .site-nav { flex-wrap: nowrap; }
  .demo-page .site-nav a { white-space: nowrap; }
  .demo-page .site-logo img { height: 1.85rem; max-width: 9.2rem; }
  .demo-main { padding-top: 0.4rem; padding-bottom: 0.7rem; }
  .demo-beats { margin-bottom: 0.45rem; }
  .demo-card { padding: 0.75rem 0.75rem 0.8rem; }
  .demo-scene .display { font-size: 1.65rem; margin-bottom: 0.2rem; }
  .demo-slate,
  .demo-build-note,
  .demo-pay-lede,
  .demo-facts,
  .demo-submit-hint { margin-bottom: 0.55rem; }
  .demo-personas,
  .demo-chips { margin-bottom: 0.65rem; gap: 0.4rem; }
  .demo-persona { flex-basis: calc(50% - 0.25rem); padding: 0.55rem 0.65rem; }
  .demo-persona strong { font-size: 1.15rem; }
  .demo-persona span { font-size: 0.7rem; }
  .demo-drop { padding: 0.7rem 0.65rem; margin-bottom: 0.6rem; }
  .demo-submit { min-height: 2.7rem; }
}

@media (max-height: 740px) and (max-width: 799px) {
  .demo-slate { display: none; }
  .demo-result { width: min(12.5rem, 62%); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-scene.is-on,
  .demo-film figure,
  .demo-track span,
  .demo-persona,
  .demo-chip,
  .demo-pack,
  .demo-pointer,
  .demo-ripple { animation: none; transition: none; }
  .demo-pointer { display: none !important; }
}
