.story-page{
  width:100%;
  max-width:100vw;
  min-height:100%;
  color:#fff;
  background:
    radial-gradient(680px 420px at 18% 10%, rgba(158,86,255,.25), transparent 64%),
    radial-gradient(760px 460px at 86% 18%, rgba(255,130,87,.18), transparent 68%),
    radial-gradient(520px 360px at 50% 88%, rgba(255,82,170,.12), transparent 70%),
    linear-gradient(155deg,#030817 0%,#080923 50%,#13071f 100%);
  padding:0;
  overflow-x:hidden;
}

html:has(body.story-page){
  height:auto;
  min-height:100%;
  background:#030817;
  overflow-x:hidden;
}

body.story-page{
  height:auto;
  min-height:100vh;
}

.story-page *,
.story-page *::before,
.story-page *::after{box-sizing:border-box}

.story-page::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.62) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 18%, rgba(255,179,112,.62) 0 1px, transparent 1.5px),
    radial-gradient(circle at 48% 72%, rgba(214,110,255,.52) 0 1px, transparent 1.5px);
  background-size:270px 270px,330px 330px,390px 390px;
  opacity:.38;
}

.form-shell{
  position:relative;
  z-index:1;
  width:calc(100% - 48px);
  max-width:min(820px, calc(100vw - 48px));
  min-height:100vh;
  margin:0 auto;
  padding:30px 0 58px;
  display:grid;
  grid-template-rows:auto auto 1fr;
  align-items:start;
  overflow-x:clip;
  min-width:0;
}

.form-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  min-height:54px;
  margin-bottom:42px;
}

.brand-link{
  display:inline-flex;
  align-items:center;
  gap:12px;
  color:#fff;
  text-decoration:none;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.18em;
}

.brand-link span{
  color:#ffd7ad;
  font-size:1.8rem;
  text-shadow:0 0 20px rgba(255,148,91,.75);
}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 16px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.78);
  font-size:.9rem;
  font-weight:900;
}

.form-card{
  width:100%;
  max-width:100%;
  min-width:0;
  align-self:center;
  border:1px solid rgba(255,255,255,.13);
  border-radius:30px;
  background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.05));
  box-shadow:0 30px 90px rgba(0,0,0,.32);
  backdrop-filter:blur(20px);
  padding:34px;
  overflow-x:clip;
}

.form-card__head{
  max-width:720px;
  min-width:0;
}

.kicker{
  margin:0 0 10px;
  color:#ff75c9;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:.78rem;
}

.form-card__head h1{
  margin:0;
  color:#fff;
  font-size:clamp(2.2rem,5vw,4.4rem);
  line-height:.98;
  letter-spacing:0;
}

.form-card__head p:not(.kicker){
  max-width:620px;
  margin:18px 0 0;
  color:rgba(255,255,255,.76);
  font-size:1.08rem;
  line-height:1.55;
}

.progress-line{
  height:10px;
  margin:30px 0 34px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.09);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.22);
}

.progress-line span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#b63cff,#ff4fa4 52%,#ff914d);
  box-shadow:0 0 22px rgba(255,91,180,.36);
  transition:width .25s ease;
}

.story-form,
.wizard{
  width:100%;
  max-width:100%;
  min-width:0;
}

.wizstep{
  display:grid;
  gap:24px;
  width:100%;
  min-width:0;
}

.wizstep[hidden]{
  display:none;
}

.wizstep--stack{
  gap:26px;
}

.field{
  display:grid;
  gap:10px;
  width:100%;
  max-width:100%;
  min-width:0;
}

.field__prompt{
  display:grid;
  gap:10px;
  min-width:0;
}

.field__label{
  color:#fff;
  font-size:1.16rem;
  line-height:1.35;
  font-weight:900;
}

.field__hint{
  color:rgba(255,255,255,.64);
  font-size:.95rem;
  line-height:1.45;
}

.field__input{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:58px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:18px;
  background:rgba(255,255,255,.09);
  color:#fff;
  padding:0 18px;
  font:inherit;
  font-weight:800;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.field__input::placeholder{color:rgba(255,255,255,.42)}

.field__input:focus{
  border-color:rgba(255,117,201,.72);
  background:rgba(255,255,255,.12);
  box-shadow:0 0 0 4px rgba(194,60,255,.14);
}

.ac-wrap{
  position:relative;
  width:100%;
  max-width:100%;
  min-width:0;
}

.ac-list{
  position:absolute;
  left:0;
  right:0;
  top:100%;
  margin-top:8px;
  max-height:250px;
  overflow:auto;
  z-index:50;
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  background:#15122b;
  box-shadow:0 22px 42px rgba(0,0,0,.34);
}

.ac-item{
  display:block;
  width:100%;
  border:0;
  background:transparent;
  color:#fff;
  text-align:left;
  padding:12px 14px;
  font:inherit;
  font-size:.96rem;
  cursor:pointer;
}

.ac-item:hover,
.ac-item.active{background:rgba(255,255,255,.1)}

.ac-mark{
  color:#ff91dd;
  font-weight:900;
}

.teaser-card{
  display:grid;
  gap:18px;
  padding:26px;
  border:1px solid rgba(255,122,215,.28);
  border-radius:26px;
  background:
    radial-gradient(520px 240px at 88% 0%, rgba(255,145,77,.22), transparent 66%),
    linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.055));
  box-shadow:0 24px 70px rgba(0,0,0,.24);
}

.teaser-card h2{
  margin:0;
  color:#fff;
  font-size:clamp(2rem,4vw,3.25rem);
  line-height:1.04;
  letter-spacing:0;
}

.teaser-card__lead{
  margin:0;
  color:rgba(255,255,255,.82);
  font-size:1.08rem;
  line-height:1.62;
}

.teaser-clues{
  display:grid;
  gap:10px;
}

.teaser-clues p{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:0;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(255,255,255,.07);
  color:rgba(255,255,255,.78);
  line-height:1.45;
}

.teaser-clues span{
  color:#ffd6ad;
  flex:0 0 auto;
}

.teaser-card__cta{
  margin:0;
  color:#ffd6ad;
  font-weight:900;
  line-height:1.45;
}

.teaser-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.teaser-actions .btn{
  min-height:48px;
  min-width:0;
}

.actions{
  display:flex;
  justify-content:flex-end;
  margin-top:34px;
}

.actions .btn{
  min-width:220px;
  min-height:58px;
  border-radius:18px;
  text-decoration:none;
}

.btn[disabled]{
  opacity:.6;
  cursor:progress;
}

.loading-overlay{
  position:fixed;
  inset:0;
  z-index:90;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(3,8,23,.72);
  backdrop-filter:blur(12px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.loading-overlay.visible{
  opacity:1;
  pointer-events:auto;
}

.loading-card{
  width:min(92vw,440px);
  border:1px solid rgba(255,255,255,.16);
  border-radius:28px;
  background:
    radial-gradient(360px 220px at 50% 0%, rgba(255,124,201,.22), transparent 68%),
    linear-gradient(145deg,rgba(28,22,58,.96),rgba(10,11,31,.96));
  box-shadow:0 28px 90px rgba(0,0,0,.42);
  padding:28px 24px 24px;
  text-align:center;
}

.loading-orb{
  display:flex;
  justify-content:center;
  gap:9px;
  margin-bottom:16px;
}

.loading-orb span{
  width:11px;
  height:11px;
  border-radius:999px;
  background:linear-gradient(135deg,#c23cff,#ff914d);
  box-shadow:0 0 18px rgba(255,91,180,.5);
  animation:loading-bounce 1.1s infinite ease-in-out;
}

.loading-orb span:nth-child(2){animation-delay:.15s}
.loading-orb span:nth-child(3){animation-delay:.3s}

.loading-kicker{
  margin-bottom:9px;
  color:#ffb7e7;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.loading-message{
  min-height:3.2em;
  color:#fff;
  font-size:1.12rem;
  line-height:1.42;
  font-weight:900;
}

.loading-hint{
  min-height:1.5em;
  margin-top:9px;
  color:rgba(255,255,255,.66);
  font-size:.94rem;
}

.loading-progress{
  height:10px;
  margin-top:18px;
  border-radius:999px;
  background:rgba(255,255,255,.11);
  overflow:hidden;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.22);
}

.loading-progress-bar{
  display:block;
  width:12%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#b63cff,#ff4fa4 52%,#ff914d);
  transition:width .45s ease;
}

@keyframes loading-bounce{
  0%,80%,100%{transform:translateY(0);opacity:.6}
  40%{transform:translateY(-8px);opacity:1}
}

@media (max-width:720px){
  .form-shell{
    width:calc(100% - 28px);
    max-width:460px;
    padding:18px 0 36px;
  }

  .form-top{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:center;
    gap:10px;
    margin-bottom:26px;
  }

  .form-top .brand-link{
    min-width:0;
  }

  .form-top .language-switch{
    justify-self:end;
  }

  .brand-link{
    gap:8px;
    font-size:.84rem;
    letter-spacing:.13em;
  }

  .pill{
    grid-column:1 / -1;
    justify-self:start;
    min-height:38px;
    padding:0 12px;
    font-size:.82rem;
  }

  .form-card{
    padding:24px;
    border-radius:24px;
  }

  .form-card__head h1{
    font-size:2.36rem;
    line-height:1.02;
  }

  .form-card__head p:not(.kicker){
    font-size:1rem;
  }

  .field__label{
    font-size:1.05rem;
  }

  .field__input{
    min-height:56px;
    border-radius:16px;
  }

  .teaser-card{
    padding:20px;
    border-radius:22px;
  }

  .teaser-actions{
    display:grid;
  }

  .actions{
    justify-content:stretch;
  }

  .actions .btn{
    width:100%;
    min-width:0;
  }
}
