/* Заявка в модеры sashawaify. Образ: девичья анкета в розовой тетрадке, а сверху — чёрная сцена её стрима
   с блёстками и розовой полосой сбора, которая здесь считает ответы. */
:root {
  --vata: #ffd3e6;        /* сахарная вата: фон страницы */
  --vata-deep: #ffb5d3;
  --paper: #fffafc;       /* лист анкеты */
  --malina: #e23d8b;      /* розовый её полосы сбора */
  --malina-deep: #b3246a;
  --malina-soft: #f7a8cb;
  --sliva: #3d0f2b;       /* текст */
  --dusty: #a2577a;       /* приглушённый текст */
  --track: #4b4b50;       /* пустая часть полосы, как на стриме */
  --hand: "Shantell Sans", "Comic Sans MS", "Segoe Print", cursive;
  --bar: "Montserrat", "Arial Black", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--hand);
  font-size: 17px;
  line-height: 1.5;
  color: var(--sliva);
  background-color: var(--vata);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23fff'%3E%3Cpath d='M40 20c1 7 5 11 12 12-7 1-11 5-12 12-1-7-5-11-12-12 7-1 11-5 12-12z' opacity='.75'/%3E%3Cpath d='M170 120c.6 4 3 6.400 7 7-4 .6-6.400 3-7 7-.6-4-3-6.400-7-7 4-.6 6.400-3 7-7z' opacity='.6'/%3E%3Cpath d='M96 170c.5 3 2.200 4.500 5 5-2.800.5-4.500 2.200-5 5-.5-2.800-2.200-4.500-5-5 2.800-.5 4.500-2.200 5-5z' opacity='.7'/%3E%3Ccircle cx='140' cy='40' r='1.600' opacity='.8'/%3E%3Ccircle cx='24' cy='130' r='1.400' opacity='.7'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--vata) 0%, #ffc4dc 100%);
  background-attachment: scroll, fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- сцена стрима ---------- */
.scene {
  position: relative;
  margin: 16px auto 0;
  width: min(100% - 32px, 760px);
  background: #000;
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--malina-soft), 0 18px 40px -18px rgba(179, 36, 106, .55);
}
.scene-in { position: relative; padding: 44px 28px 34px; text-align: center; }
.sky { position: absolute; inset: 0; }
.sky i {
  position: absolute; width: var(--s); height: var(--s); left: var(--x); top: var(--y);
  background: #fff;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  opacity: .9;
  animation: twinkle var(--d) ease-in-out var(--w) infinite;
}
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.35); opacity: .25; } }
.deco { position: absolute; pointer-events: none; }
.star { width: 54px; height: 54px; filter: drop-shadow(0 0 10px rgba(255, 127, 184, .55)); }
.star.s1 { left: 5%; top: 14%; transform: rotate(-16deg); }
.star.s2 { right: 6%; top: 9%; width: 40px; height: 40px; transform: rotate(14deg); }
.star.s3 { right: 11%; bottom: 30%; width: 30px; height: 30px; transform: rotate(-8deg); }

.chan { margin: 0 0 10px; font-size: 15px; color: #ffb9d8; }
.chan a { text-decoration: none; border-bottom: 1px dashed currentColor; }
.chan a:hover { color: #fff; }
h1 {
  margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: clamp(34px, 7.200vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 .bow { flex: none; width: clamp(40px, 8vw, 64px); height: clamp(32px, 6.300vw, 50px); }
h1 .bow:first-child { transform: rotate(-10deg); }
h1 .bow:last-child { transform: rotate(10deg); }
.lead { margin: 16px auto 0; max-width: 30em; color: #f3dbe6; font-size: 17px; }

.goalbox { margin: 28px auto 0; max-width: 460px; }
.goal-title {
  margin: 0 0 8px;
  font-family: var(--bar); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .02em;
}
.goal {
  position: relative; height: 36px; border-radius: 999px; overflow: hidden;
  background: var(--track);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14);
  font-family: var(--bar); font-weight: 800; font-size: 14px; color: #fff; text-transform: uppercase;
}
.goal .fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f97fb6 0%, var(--malina) 55%, #c62f7a 100%);
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.goal span { position: absolute; inset: 0; display: grid; place-items: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }

/* полоса, которая едет за читателем, когда сцена ушла вверх */
.dock {
  position: fixed; z-index: 20; left: 50%; top: 10px;
  width: min(100% - 32px, 380px);
  transform: translate(-50%, -70px);
  transition: transform .3s ease;
  padding: 6px; border-radius: 999px; background: #000;
  box-shadow: 0 0 0 2px #fff, 0 8px 22px -8px rgba(61, 15, 43, .6);
}
.dock.show { transform: translate(-50%, 0); }
.goal.small { height: 26px; font-size: 12px; }

/* ---------- листы анкеты ---------- */
main { width: min(100% - 32px, 680px); margin: 0 auto; padding: 34px 0 20px; }
.sheet {
  position: relative;
  margin: 0 0 40px;
  padding: 44px 28px 26px;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 2px 0 #fff inset, 0 14px 30px -20px rgba(179, 36, 106, .6), 0 0 0 1.500px #ffc0da;
}
.sheet-head {
  position: absolute; left: 22px; top: -17px;
  display: flex; align-items: center; gap: 12px;
}
.tape {
  margin: 0;
  padding: 6px 18px 7px;
  font-size: 20px; font-weight: 800; line-height: 1.2;
  color: #fff;
  background: var(--malina);
  transform: rotate(-1.600deg);
  /* надорванные края скотча */
  clip-path: polygon(0 12%, 3% 0, 6% 12%, 9% 0, 100% 0, 97% 30%, 100% 55%, 97% 80%, 100% 100%, 9% 100%, 6% 88%, 3% 100%, 0 88%, 2.500% 50%);
  padding-left: 26px; padding-right: 24px;
}
.sheet:nth-of-type(even) .tape { transform: rotate(1.200deg); background: #ee5c9f; }
.sheet-note { font-style: italic; font-size: 15px; color: var(--dusty); transform: translateY(14px); }
.sticker {
  position: absolute; right: -10px; top: -22px; width: 54px; height: 54px;
  transform: rotate(12deg);
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 6px 8px rgba(179, 36, 106, .35));
  pointer-events: none;
}
.sticker.heart { color: #ff5fa2; }
.sticker.spark { color: #ff8fc0; width: 46px; height: 46px; }
.sticker.paw { background: #ff8fc0; border-radius: 50%; padding: 6px; }
.sheet:nth-of-type(even) .sticker { transform: rotate(-10deg); }

.q { padding: 18px 0 20px; border-bottom: 2px dotted #ffc6dc; scroll-margin-top: 80px; }
.q:last-child { border-bottom: 0; padding-bottom: 6px; }
.q-label { display: block; margin: 0; font-size: 18.500px; font-weight: 700; line-height: 1.35; text-wrap: pretty; }
.q-hint { display: block; margin-top: 2px; font-size: 15px; font-style: italic; font-weight: 500; color: var(--malina); }
.q-opt { font-size: 14px; font-weight: 500; color: var(--dusty); white-space: nowrap; }

.q input[type="text"], .q input[type="number"], .q textarea {
  display: block; width: 100%;
  margin-top: 10px; padding: 6px 2px 5px;
  font: inherit; font-weight: 500; color: #5a1740;
  background: transparent;
  border: 0; border-bottom: 2px solid var(--malina-soft); border-radius: 0;
  outline: none;
  caret-color: var(--malina);
}
.q input[type="number"] { max-width: 120px; -moz-appearance: textfield; appearance: textfield; }
.q input[type="number"]::-webkit-outer-spin-button, .q input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.q textarea {
  min-height: 96px; resize: vertical;
  line-height: 30px; padding: 0 2px;
  border-bottom: 0;
  /* линейки тетради */
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 28px, var(--malina-soft) 28px, var(--malina-soft) 30px);
  background-attachment: local;
}
.q ::placeholder { color: #d19ab6; opacity: 1; font-weight: 400; }
.q input:focus-visible { border-bottom-color: var(--malina); box-shadow: 0 2px 0 var(--malina); }
.q textarea:focus-visible {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 28px, var(--malina) 28px, var(--malina) 30px);
}
.q-foot { display: flex; justify-content: flex-end; min-height: 18px; margin-top: 2px; font-size: 13px; color: var(--dusty); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0;
  min-height: 44px; padding: 8px 18px;
  font-weight: 600; line-height: 1.25;
  color: var(--malina-deep);
  background: #fff;
  border: 2px solid var(--malina-soft); border-radius: 999px;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.chip span svg { width: 0; height: 16px; margin-right: 0; opacity: 0; transition: width .18s, margin .18s, opacity .18s; }
.chip:hover span { border-color: var(--malina); }
.chip input:checked + span { color: #fff; background: var(--malina); border-color: var(--malina); transform: rotate(-1.500deg); }
.chip input:checked + span svg { width: 16px; margin-right: 8px; opacity: 1; }
.chip input:focus-visible + span { outline: 3px solid var(--sliva); outline-offset: 2px; }

.q.miss .q-label { color: #c21650; }
.q.miss input[type="text"], .q.miss input[type="number"] { border-bottom-color: #e0245e; }
.miss-note { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: #c21650; }

/* ---------- последний лист ---------- */
.last-sheet { padding-top: 28px; text-align: center; }
.agree { display: flex; align-items: flex-start; gap: 12px; text-align: left; font-weight: 600; cursor: pointer; }
.agree input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.agree .box {
  flex: none; width: 30px; height: 30px; margin-top: -2px;
  display: grid; place-items: center;
  border: 2px solid var(--malina); border-radius: 9px; background: #fff; color: #fff;
  transition: background-color .15s;
}
.agree .box svg { width: 18px; height: 18px; transform: scale(0); transition: transform .2s cubic-bezier(.3, 1.600, .5, 1); }
.agree input:checked + .box { background: var(--malina); }
.agree input:checked + .box svg { transform: scale(1); }
.agree input:focus-visible + .box { outline: 3px solid var(--sliva); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.formmsg { margin: 18px 0 0; padding: 10px 14px; border-radius: 14px; background: #ffe1ea; color: #a8103f; font-weight: 600; }
.send {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 22px; padding: 14px 34px 15px;
  font: inherit; font-size: 21px; font-weight: 800; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, #f97fb6 0%, var(--malina) 60%, #c62f7a 100%);
  border: 0; border-radius: 999px;
  box-shadow: 0 5px 0 var(--malina-deep), 0 14px 24px -10px rgba(179, 36, 106, .8);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.send svg { width: 38px; height: 30px; }
.send:hover { transform: translateY(-1px); }
.send:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--malina-deep), 0 6px 12px -8px rgba(179, 36, 106, .8); }
.send:focus-visible { outline: 3px solid var(--sliva); outline-offset: 3px; }
.send[disabled] { filter: saturate(.5); cursor: progress; }
.fine { margin: 18px auto 0; max-width: 34em; font-size: 14px; color: var(--dusty); }

.done { text-align: center; padding-top: 34px; outline: none; }
.done h2 { margin: 6px 0 8px; font-size: 34px; font-weight: 800; line-height: 1.1; }
.done p { margin: 8px auto; max-width: 30em; }
.done-paw { width: 84px; height: 84px; padding: 10px; background: var(--malina); border-radius: 50%; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--malina-soft); }
.done b { overflow-wrap: anywhere; }

footer { padding: 6px 16px 46px; text-align: center; font-size: 14px; color: var(--dusty); }
footer p { margin: 0; }

/* сердечки после отправки */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.burst svg {
  position: absolute; left: var(--x); bottom: -40px; width: var(--s); height: var(--s); color: var(--c);
  animation: rise var(--d) ease-out var(--w) forwards;
}
@keyframes rise {
  0% { transform: translateY(0) rotate(0) scale(.6); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-105vh) rotate(var(--r)) scale(1.150); opacity: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16.500px; }
  .scene { border-radius: 22px; }
  .scene-in { padding: 34px 18px 26px; }
  h1 { gap: 8px; }
  .star.s1 { left: 2%; top: 5%; width: 38px; height: 38px; }
  .star.s2 { right: 3%; top: 4%; width: 30px; height: 30px; }
  .star.s3 { display: none; }
  .sheet { padding: 40px 18px 20px; margin-bottom: 36px; }
  .sheet-head { left: 12px; }
  .tape { font-size: 18px; }
  .sheet-note { display: none; }
  .sticker { right: -6px; top: -20px; width: 44px; height: 44px; }
  .q-label { font-size: 17.500px; }
  .chip span { padding: 8px 15px; }
  .send { width: 100%; font-size: 19px; padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky i, .burst svg { animation: none; }
  .burst { display: none; }
  .goal .fill, .dock, .chip span, .chip span svg, .agree .box svg, .send { transition: none; }
}
