/* ───────── Шар воспоминаний · дизайн-токены ───────── */
:root {
  --milk: #fff7f9;
  --powder: #fbe3ea;
  --blush: #f7c6d6;
  --peony: #ee5e92;
  --raspberry: #b7325f;
  --plum: #3a1d2b;
  --plum-2: #6e4a5b;
  --plum-3: #9c7b8a;
  --line: rgba(58, 29, 43, 0.12);
  --white: #fff;
  --tiffany: #81d8d0;
  --tiffany-deep: #2f9e94;
  --gold: #c99a57;

  --f-script: 'Marck Script', 'Segoe Script', cursive;
  --f-display: 'Prata', Georgia, 'Times New Roman', serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --top: calc(64px + env(safe-area-inset-top));
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --shadow: 0 14px 34px -16px rgba(183, 50, 95, 0.35);
  --shadow-soft: 0 6px 20px -10px rgba(58, 29, 43, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--milk);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--milk);
  color: var(--plum);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--peony);
  outline-offset: 3px;
  border-radius: 10px;
}

::selection {
  background: var(--blush);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ───────── Плёнка сверху ───────── */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--top);
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 10px;
  background: linear-gradient(var(--milk) 70%, rgba(255, 247, 249, 0));
}

.film-strip {
  flex: 1;
  min-width: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background-color: var(--plum);
  background-image: radial-gradient(circle at 50% 50%, var(--milk) 0 2px, transparent 2.6px), radial-gradient(circle at 50% 50%, var(--milk) 0 2px, transparent 2.6px);
  background-size: 11px 8px, 11px 8px;
  background-position: 0 0, 0 100%;
  background-repeat: repeat-x;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.film-strip::-webkit-scrollbar {
  display: none;
}

.frame {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 32px;
  border: 0;
  padding: 0;
  border-radius: 3px;
  overflow: hidden;
  background: #57303f;
  opacity: 0.55;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(0.9) brightness(0.7);
  transition: filter 0.5s;
}

.frame span {
  position: absolute;
  inset: auto 0 1px 0;
  font: 500 8.5px/1 var(--f-mono);
  color: var(--milk);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.frame.seen {
  opacity: 0.9;
}

.frame.seen img {
  filter: none;
}

.frame.current {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--peony);
}

.frame:disabled {
  cursor: default;
}

.sound-toggle {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--plum-3);
  display: grid;
  place-items: center;
}

.sound-toggle svg {
  width: 20px;
  height: 20px;
}

.sound-toggle .waves {
  opacity: 0.25;
}

.sound-toggle[aria-pressed='true'] {
  color: var(--raspberry);
}

.sound-toggle[aria-pressed='true'] .waves {
  opacity: 1;
}

/* ───────── Сцена ───────── */
.stage {
  position: relative;
  z-index: 1;
  outline: none;
}

.scene {
  max-width: 580px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--top) + 26px) 22px calc(130px + env(safe-area-inset-bottom));
  animation: scene-in 0.7s var(--ease) both;
}

.scene.leaving {
  animation: scene-out 0.35s ease both;
}

@keyframes scene-in {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(4px);
  }
}

@keyframes scene-out {
  to {
    opacity: 0;
    transform: translateY(-12px);
    filter: blur(3px);
  }
}

.scene.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.chapter-frame {
  width: min(72vw, 300px);
  margin: 0 auto 14px;
  padding: 16px 9px;
  border-radius: 6px;
  background-color: var(--plum);
  background-image: radial-gradient(circle, var(--milk) 0 3px, transparent 3.6px), radial-gradient(circle, var(--milk) 0 3px, transparent 3.6px);
  background-size: 17px 11px;
  background-position: 3px 2px, 3px calc(100% - 2px);
  background-repeat: repeat-x;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.chapter-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.frame-num {
  margin: 0 0 18px;
  font: 500 11px var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plum-3);
}

.kicker {
  margin: 0 0 10px;
  font: 500 12px/1.4 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--raspberry);
}

.title {
  margin: 0 0 22px;
  font: 400 clamp(30px, 8.2vw, 42px) / 1.12 var(--f-display);
  letter-spacing: -0.01em;
  color: var(--plum);
  text-wrap: balance;
}

.scene.card .title {
  font-size: clamp(38px, 11vw, 58px);
}

.block {
  margin: 0 0 18px;
}

.reveal {
  animation: reveal 0.6s var(--ease) both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.p {
  color: var(--plum-2);
  text-wrap: pretty;
}

.script {
  font: 400 clamp(26px, 7.4vw, 34px) / 1.25 var(--f-script);
  color: var(--raspberry);
  text-wrap: balance;
}

.small {
  font-size: 14px;
  color: var(--plum-3);
}

.quote {
  position: relative;
  margin: 0 0 18px;
  padding: 18px 20px 16px 22px;
  background: var(--white);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-soft);
  border-left: 3px solid var(--peony);
}

.quote blockquote {
  margin: 0;
  font: 400 19px/1.5 var(--f-display);
  color: var(--plum);
}

.quote blockquote::before {
  content: '«';
  color: var(--peony);
}

.quote blockquote::after {
  content: '»';
  color: var(--peony);
}

.quote figcaption {
  margin-top: 8px;
  font: 500 12px/1.3 var(--f-mono);
  color: var(--plum-3);
}

.letter {
  position: relative;
  padding: 26px 22px 22px;
  background: var(--white) repeating-linear-gradient(transparent 0 37px, rgba(238, 94, 146, 0.12) 37px 38px);
  background-position: 0 14px;
  border-radius: 6px var(--r-m) var(--r-m) var(--r-m);
  box-shadow: var(--shadow);
  font: 400 clamp(22px, 6vw, 26px) / 38px var(--f-script);
  color: var(--plum);
}

.letter p {
  margin: 0 0 4px;
}

.letter .sign {
  margin-top: 14px;
  text-align: right;
  color: var(--raspberry);
}

/* ───────── Фото ───────── */
.photo {
  margin: 0 0 20px;
  padding: 10px 10px 12px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, -1.2deg));
}

.photo img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  background: var(--powder);
}

.photo figcaption {
  padding: 10px 4px 0;
  font: 400 21px/1.25 var(--f-script);
  color: var(--plum-2);
}

.photo-trio {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6px 0 4px;
}

.photo-trio .photo {
  flex: 0 0 38%;
  margin: 0 -2.5%;
  padding: 6px 6px 8px;
}

.photo-trio .photo:nth-child(2) {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.photo-trio .photo img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.photo-trio .photo figcaption {
  padding-top: 6px;
  font-size: 17px;
  text-align: center;
}

.video {
  position: relative;
  margin: 0 auto 20px;
  max-width: 340px;
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--powder);
}

.video video {
  display: block;
  width: 100%;
  height: auto;
}

.video.wide {
  max-width: none;
  margin-inline: 0;
  border-radius: 10px;
  padding: 8px 8px 0;
  background: var(--white);
}

.video.wide video {
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  background: var(--plum);
}

.video figcaption {
  padding: 10px 6px 12px;
  font: 400 21px/1.25 var(--f-script);
  color: var(--plum-2);
  background: var(--white);
}

.notes-card {
  max-width: 320px;
  margin: 0 auto 18px;
  padding: 14px 16px 18px;
  background: #fffdf6;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  font-size: 16px;
}

.notes-card .bar {
  display: flex;
  justify-content: space-between;
  font: 600 13px var(--f-body);
  color: #d99a1f;
  margin-bottom: 10px;
}

/* ───────── Чат ───────── */
.chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 20px;
}

.chat-date {
  align-self: center;
  margin: 2px 0 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--powder);
  font: 500 11.5px/1.4 var(--f-mono);
  color: var(--raspberry);
}

.bubble {
  max-width: 84%;
  padding: 9px 13px 7px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.42;
  animation: bubble 0.45s var(--ease) both;
  word-wrap: break-word;
}

.bubble time {
  display: block;
  margin-top: 2px;
  text-align: right;
  font: 500 10.5px/1 var(--f-mono);
  color: var(--plum-3);
}

.bubble.n {
  align-self: flex-start;
  background: var(--white);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.bubble.s {
  align-self: flex-end;
  background: var(--powder);
  border-bottom-right-radius: 6px;
}

.bubble.s time {
  color: var(--raspberry);
  opacity: 0.7;
}

.who {
  display: block;
  margin-bottom: 1px;
  font: 700 12px/1.3 var(--f-body);
  color: var(--raspberry);
}

.bubble.s .who {
  color: var(--plum-2);
}

@keyframes bubble {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.typing.s {
  align-self: flex-end;
  background: var(--powder);
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--plum-3);
  animation: dot 1s infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.skip-hint {
  display: block;
  margin: -6px auto 14px;
  font: 500 11px var(--f-mono);
  color: var(--plum-3);
  text-align: center;
  opacity: 0.8;
}

/* ───────── Вопросы ───────── */
.question {
  margin: 8px 0 0;
}

.q-text {
  margin: 0 0 14px;
  font: 400 21px/1.35 var(--f-display);
  color: var(--plum);
  text-wrap: balance;
}

.options {
  display: grid;
  gap: 10px;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.opt:hover {
  border-color: var(--blush);
}

.opt:active {
  transform: scale(0.985);
}

.opt .mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--blush);
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s;
}

.opt.multi .mark {
  border-radius: 7px;
}

.opt .mark svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  color: var(--white);
}

.opt[aria-pressed='true'] {
  border-color: var(--peony);
  background: var(--powder);
}

.opt[aria-pressed='true'] .mark {
  background: var(--peony);
  border-color: var(--peony);
}

.opt[aria-pressed='true'] .mark svg {
  opacity: 1;
}

.options.big .opt {
  min-height: 66px;
  font-size: 18px;
  font-weight: 600;
  justify-content: center;
  text-align: center;
}

.options.big .opt .mark {
  display: none;
}

.options.big .opt:first-child {
  background: var(--peony);
  border-color: var(--peony);
  color: var(--white);
  box-shadow: var(--shadow);
}

.options.big .opt:first-child[aria-pressed='true'] {
  background: var(--raspberry);
}

.text-answer {
  display: grid;
  gap: 10px;
}

.textarea {
  width: 100%;
  min-height: 108px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  font-size: 16.5px;
  line-height: 1.45;
  resize: vertical;
}

.textarea:focus {
  outline: none;
  border-color: var(--peony);
  box-shadow: 0 0 0 4px rgba(238, 94, 146, 0.15);
}

.input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  font-size: 17px;
}

.input:focus {
  outline: none;
  border-color: var(--peony);
  box-shadow: 0 0 0 4px rgba(238, 94, 146, 0.15);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}

.chip[aria-pressed='true'] {
  background: var(--peony);
  border-color: var(--peony);
  color: var(--white);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.link-btn {
  background: none;
  border: 0;
  padding: 8px 4px;
  color: var(--plum-3);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reply {
  margin-top: 14px;
  scroll-margin-bottom: 150px;
}

/* ───────── Кнопки ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  border: 0;
  background: var(--peony);
  color: var(--white);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), background 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn:hover {
  background: var(--raspberry);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn.ghost {
  background: transparent;
  color: var(--raspberry);
  box-shadow: inset 0 0 0 1.5px var(--blush);
}

.btn.ghost:hover {
  background: var(--powder);
}

.btn.block {
  width: 100%;
}

.btn.tiffany {
  background: var(--tiffany-deep);
}

.cta-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 26px 22px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255, 247, 249, 0), var(--milk) 45%);
  transform: translateY(110%);
  transition: transform 0.5s var(--ease);
  pointer-events: none;
}

.cta-bar.show {
  transform: none;
  pointer-events: auto;
}

.cta-bar .btn {
  width: min(100%, 420px);
}

/* ───────── Шар воспоминаний ───────── */
.globe-wrap {
  display: grid;
  justify-items: center;
  margin: 6px auto 22px;
}

.globe-wrap.small {
  margin: -6px auto 8px;
}

.globe-wrap.small .globe {
  width: min(46vw, 190px);
}

.globe {
  position: relative;
  width: min(74vw, 330px);
  aspect-ratio: 1 / 1.16;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.globe-glass {
  position: absolute;
  inset: 0 0 auto 0;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, #fff 0%, var(--powder) 70%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8), inset -14px -22px 40px rgba(183, 50, 95, 0.2), inset 18px 18px 40px rgba(255, 255, 255, 0.7), 0 30px 60px -28px rgba(183, 50, 95, 0.55);
  z-index: 2;
}

.globe-glass img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
  mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
  transform: scale(0.94);
}

.globe-glass canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.globe-glass::after {
  content: '';
  position: absolute;
  inset: 7% 46% 52% 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 40%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%);
  transform: rotate(-28deg);
  pointer-events: none;
}

.globe-minis {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.globe-minis span {
  position: absolute;
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(58, 29, 43, 0.2);
  animation: float 6s ease-in-out infinite;
  background: var(--powder);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.globe-minis img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes float {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

.globe-base {
  position: absolute;
  left: 13%;
  right: 13%;
  bottom: 0;
  height: 22%;
  z-index: 1;
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, var(--raspberry), #7d2346 70%, var(--plum));
  border-radius: 0 0 14px 14px;
  display: grid;
  place-items: center;
}

.globe-base b {
  margin-top: 8%;
  padding: 3px 14px 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f3d9a6, var(--gold));
  font: 400 clamp(15px, 4.4vw, 19px) / 1 var(--f-script);
  color: var(--plum);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.globe.shake {
  animation: shake 0.9s var(--ease);
}

@keyframes shake {
  15% {
    transform: rotate(-9deg) translateX(-8px);
  }
  35% {
    transform: rotate(8deg) translateX(8px);
  }
  55% {
    transform: rotate(-5deg) translateX(-4px);
  }
  75% {
    transform: rotate(3deg);
  }
}

.globe.glow .globe-glass {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 0 10px rgba(238, 94, 146, 0.12), 0 0 80px 10px rgba(238, 94, 146, 0.35);
}

.intro {
  text-align: center;
}

.intro .script {
  font-size: clamp(36px, 10vw, 46px);
  margin-bottom: 0;
}

.intro .title {
  margin-bottom: 12px;
}

.intro .p {
  max-width: 420px;
  margin-inline: auto;
}

.resume {
  margin: 0 auto 18px;
  max-width: 420px;
  padding: 16px 18px;
  border-radius: var(--r-m);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.resume p {
  margin: 0 0 12px;
}

/* ───────── Виджеты ───────── */
.widget {
  margin: 4px 0 22px;
}

.hint {
  display: block;
  margin: 10px 0 0;
  text-align: center;
  font: 500 12px var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--plum-3);
}

/* код */
.code {
  border-radius: var(--r-m);
  background: var(--plum);
  color: #f6dfe7;
  padding: 16px 18px;
  font: 500 14px/1.7 var(--f-mono);
  font-variant-ligatures: none;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.code .c {
  color: #b48a9c;
}

.code .tg {
  color: #ff8fb8;
}

.code .tx {
  color: #fff;
}

.code-run {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.render {
  display: grid;
  place-items: center;
  margin-top: 18px;
  padding: 22px 16px 18px;
  border-radius: var(--r-m);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.render svg {
  width: 120px;
  height: 120px;
  color: var(--peony);
  animation: beat 1.4s ease-in-out infinite;
}

.render b {
  display: block;
  margin-top: 6px;
  font: 400 30px/1.2 var(--f-script);
  color: var(--raspberry);
}

@keyframes beat {
  14%,
  42% {
    transform: scale(1.12);
  }
  28%,
  70% {
    transform: scale(1);
  }
}

/* снежинки */
.snowfield {
  position: relative;
  height: min(46vh, 340px);
  border-radius: var(--r-l);
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #f9d2df 0%, #fbe8ef 55%, var(--white) 100%);
  box-shadow: var(--shadow-soft);
  touch-action: manipulation;
}

.flake {
  position: absolute;
  top: -50px;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--peony);
  animation: fall linear forwards;
}

.flake svg {
  width: 30px;
  height: 30px;
  margin: auto;
  filter: drop-shadow(0 2px 4px rgba(183, 50, 95, 0.3));
}

.flake.got {
  animation: none;
  transform: scale(1.6);
  opacity: 0;
  transition: all 0.4s;
}

@keyframes fall {
  to {
    transform: translateY(calc(min(46vh, 340px) + 100px)) rotate(200deg);
  }
}

.words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  min-height: 46px;
  margin-top: 14px;
  font: 400 28px/1.3 var(--f-script);
  color: var(--raspberry);
}

.words span {
  animation: reveal 0.5s var(--ease) both;
}

.words .ghostw {
  color: var(--blush);
}

/* икея */
.ikea {
  position: relative;
  height: 290px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: linear-gradient(#f6e6dc 0 62%, #e9cdbd 62%);
  box-shadow: var(--shadow-soft);
}

.ikea svg.room {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ikea .dark {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--fx, 20%) 40%, rgba(255, 244, 200, 0.55), rgba(40, 18, 30, 0.72) 22%);
  animation: sweep 5s ease-in-out infinite alternate;
  transition: opacity 1s;
}

.ikea.lit .dark {
  opacity: 0;
}

@keyframes sweep {
  from {
    --fx: 10%;
  }
  to {
    --fx: 90%;
  }
}

@property --fx {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 20%;
}

.ikea .kiss {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 70px;
  height: 70px;
  margin-left: -35px;
  color: var(--peony);
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.8s var(--ease);
}

.ikea.lit .kiss {
  opacity: 1;
  transform: scale(1);
}

.ikea .kiss svg {
  width: 100%;
  height: 100%;
}

.hold {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hold::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--raspberry);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.center {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* карточки-перевёртыши */
.flips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.flip {
  flex: 0 0 calc(50% - 6px);
  position: relative;
  aspect-ratio: 1 / 1.12;
  perspective: 900px;
  border: 0;
  padding: 0;
  background: none;
}

.flip-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.7s var(--ease);
  transform-style: preserve-3d;
}

.flip.on .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--r-m);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-soft);
}

.flip-front {
  background: var(--white);
  font: 400 22px/1.2 var(--f-display);
}

.flip-front i {
  font-style: normal;
  font-size: 34px;
}

.flip-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(58, 29, 43, 0.18);
}

.flip-back {
  background: var(--powder);
  transform: rotateY(180deg);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--plum);
  text-align: left;
}

/* ожидание */
.wait {
  padding: 20px 18px 16px;
  border-radius: var(--r-l);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.wait-value {
  text-align: center;
  font: 400 44px/1.1 var(--f-display);
  color: var(--raspberry);
  min-height: 52px;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: transparent;
  margin: 10px 0 0;
}

.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--peony) var(--fill, 0%), var(--powder) var(--fill, 0%));
}

.range::-moz-range-track {
  height: 6px;
  border-radius: 6px;
  background: var(--powder);
}

.range::-moz-range-progress {
  height: 6px;
  border-radius: 6px;
  background: var(--peony);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -13px;
  border-radius: 50%;
  background: var(--white) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23EE5E92" d="M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.1 0 3.6 1.2 4.3 2.4.7-1.2 2.2-2.4 4.3-2.4 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z"/></svg>') center / 18px no-repeat;
  box-shadow: 0 3px 10px rgba(183, 50, 95, 0.35);
}

.range::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 3px 10px rgba(183, 50, 95, 0.35);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font: 500 11px var(--f-mono);
  color: var(--plum-3);
}

/* подъезд */
.podezd {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px 16px;
  border-radius: var(--r-l);
  background: linear-gradient(180deg, #fff, var(--powder));
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.podezd .say {
  min-height: 38px;
  font: 400 28px/1.3 var(--f-script);
  color: var(--raspberry);
}

.podezd .door {
  width: 92px;
  height: 120px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #c9a08d, #b3876f);
  position: relative;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.podezd .door::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 58px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* розовая заметка */
.pink-note {
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.pink-note header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--powder);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pink-note header b {
  display: block;
  font-size: 15px;
}

.pink-note header small {
  font-size: 12.5px;
  color: var(--plum-3);
}

.pink-note .body {
  margin: 0 10px 10px;
  padding: 18px 16px;
  border-radius: 14px;
  min-height: 160px;
  background: linear-gradient(160deg, #ff8ab8, #ef4f8f 55%, #e8478a);
  color: var(--white);
  font-size: 15.5px;
  line-height: 1.5;
  white-space: pre-line;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* заметка под паролем */
.notes-app {
  border-radius: var(--r-l);
  background: #f7f6f2;
  box-shadow: var(--shadow-soft);
  padding: 16px 14px 18px;
  font-family: -apple-system, 'SF Pro Text', var(--f-body);
}

.notes-app h4 {
  margin: 0 0 8px;
  font: 800 26px/1.2 -apple-system, var(--f-body);
}

.notes-app .search {
  height: 34px;
  border-radius: 10px;
  background: #e9e7e2;
  margin-bottom: 12px;
}

.note-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  text-align: left;
}

.note-item b {
  display: block;
  font-size: 16px;
}

.note-item small {
  color: #8a8a8e;
  font-size: 13px;
}

.note-item .lock {
  margin-left: auto;
  font-size: 18px;
}

.lock-sheet {
  margin-top: 12px;
  padding: 18px 16px;
  border-radius: 16px;
  background: var(--white);
  text-align: center;
  animation: reveal 0.4s var(--ease) both;
}

.lock-sheet .p {
  font-size: 15px;
}

.lock-sheet.wrong {
  animation: nope 0.45s;
}

@keyframes nope {
  20%,
  60% {
    transform: translateX(-8px);
  }
  40%,
  80% {
    transform: translateX(8px);
  }
}

.secret {
  margin-top: 12px;
  padding: 18px 16px;
  border-radius: 16px;
  background: #fffdf3;
  white-space: pre-line;
  font: 400 23px/1.4 var(--f-script);
  color: var(--plum);
  animation: reveal 0.6s var(--ease) both;
}

/* кольцо */
.ring-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: var(--r-l);
  background: radial-gradient(circle at 50% 40%, #fff, var(--powder));
  box-shadow: var(--shadow-soft);
  touch-action: none;
}

.ring-stage svg {
  width: min(72vw, 300px);
  height: auto;
}

.sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  color: var(--white);
  pointer-events: none;
  animation: spark 0.9s ease-out forwards;
}

@keyframes spark {
  from {
    transform: scale(0) rotate(0);
    opacity: 1;
  }
  to {
    transform: scale(1.4) rotate(90deg);
    opacity: 0;
  }
}

/* остров */
.island {
  position: relative;
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(#ffe9f0, #fbd7e3);
  border: 0;
  padding: 0;
  width: 100%;
  display: block;
}

.island svg {
  display: block;
  width: 100%;
  height: auto;
}

.island .wave {
  animation: wave 4s ease-in-out infinite alternate;
}

.island .wave.w2 {
  animation-duration: 5.5s;
}

@keyframes wave {
  to {
    transform: translateX(-24px);
  }
}

.island.on .isle {
  filter: drop-shadow(0 0 14px rgba(238, 94, 146, 0.7));
}

/* цвет-викторина */
.color-quiz {
  margin: 0 -22px;
  padding: 26px 22px 24px;
  background: var(--qc, var(--tiffany));
  color: var(--plum);
  min-height: 52vh;
  display: grid;
  align-content: center;
  text-align: center;
  position: relative;
}

.color-quiz .title {
  margin-bottom: 4px;
}

.color-quiz .p {
  color: var(--plum);
  margin: 0 0 18px;
}

.countdown {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
}

.countdown circle {
  fill: none;
  stroke-width: 5;
}

.countdown .bg {
  stroke: rgba(255, 255, 255, 0.45);
}

.countdown .fg {
  stroke: var(--white);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.countdown text {
  font: 500 18px var(--f-mono);
  fill: var(--plum);
}

.color-quiz .options {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.color-quiz .opt {
  background: rgba(255, 255, 255, 0.86);
  border-color: transparent;
}

/* ёжик */
.hedgehog {
  display: grid;
  justify-items: center;
}

.hedgehog button {
  border: 0;
  background: none;
  padding: 0;
  width: min(60vw, 240px);
}

.hedgehog svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hedgehog .body {
  transform-origin: 50% 80%;
  transition: transform 0.35s var(--ease);
}

.hedgehog.squish .body {
  transform: scale(1.08, 0.86);
}

/* плёнка-галерея */
.film {
  margin: 0 -22px;
  padding: 18px 0;
  background-color: var(--plum);
  background-image: radial-gradient(circle, var(--milk) 0 3px, transparent 3.6px), radial-gradient(circle, var(--milk) 0 3px, transparent 3.6px);
  background-size: 18px 12px;
  background-position: 0 3px, 0 calc(100% - 3px);
  background-repeat: repeat-x;
}

.film-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 22px;
  scrollbar-width: none;
}

.film-track::-webkit-scrollbar {
  display: none;
}

.film-frame {
  flex: 0 0 auto;
  width: 64vw;
  max-width: 260px;
  scroll-snap-align: center;
  border: 0;
  padding: 0;
  background: none;
  color: var(--milk);
  text-align: left;
}

.film-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  background: #57303f;
}

.film-frame time {
  display: block;
  margin-top: 6px;
  font: 500 11px var(--f-mono);
  letter-spacing: 0.05em;
  color: #f2c3d4;
}

.film-frame.seen time::after {
  content: ' · пересмотрено';
  color: var(--peony);
}

.film-count {
  margin: 12px 0 0;
  text-align: center;
  font: 500 12px var(--f-mono);
  color: var(--plum-3);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(36, 16, 26, 0.94);
  color: var(--milk);
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  animation: reveal 0.35s var(--ease);
}

.lightbox[hidden] {
  display: none;
}

.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 500 12px var(--f-mono);
  letter-spacing: 0.06em;
  color: #f2c3d4;
}

.lb-close,
.lb-nav {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: var(--milk);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
}

.lb-img {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px 0;
}

.lb-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.lb-bottom {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.lb-cap {
  text-align: center;
  font: 400 22px/1.3 var(--f-script);
  color: var(--milk);
}

/* пазл */
.puzzle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
  aspect-ratio: 1156 / 651;
}

.tile {
  border: 0;
  padding: 0;
  border-radius: 4px;
  background-size: 300% 300%;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.tile.sel {
  transform: scale(0.92);
  box-shadow: 0 0 0 3px var(--peony);
}

.puzzle.done {
  gap: 0;
  transition: gap 0.6s;
}

.puzzle.done .tile {
  border-radius: 0;
}

.moves {
  margin-top: 8px;
  text-align: center;
  font: 500 12px var(--f-mono);
  color: var(--plum-3);
}

/* оставить в шаре */
.keep {
  display: grid;
  gap: 14px;
}

.keep-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 500 12px var(--f-mono);
  color: var(--plum-3);
}

.keep-jar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 60%;
}

.keep-jar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--peony);
  animation: reveal 0.4s var(--ease) both;
}

.keep-card {
  position: relative;
  height: 330px;
  border-radius: var(--r-l);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  touch-action: pan-y;
  user-select: none;
  transition: transform 0.35s var(--ease), opacity 0.35s;
}

.keep-card .art {
  display: grid;
  place-items: center;
  font-size: 84px;
  background: radial-gradient(circle at 50% 40%, #fff, var(--powder));
  overflow: hidden;
}

.keep-card .art {
  position: relative;
  min-height: 0;
}

.keep-card .art .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.25);
  opacity: 0.75;
}

.keep-card .art .fg {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 8px 22px -10px rgba(58, 29, 43, 0.45);
}

.keep-card .label {
  padding: 14px 18px 18px;
  font: 400 22px/1.3 var(--f-display);
  text-align: center;
}

.keep-card.out-right {
  transform: translateX(120%) rotate(14deg);
  opacity: 0;
}

.keep-card.out-left {
  transform: translateX(-120%) rotate(-14deg);
  opacity: 0;
}

.keep-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

/* Юми */
.yumi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.yumi-grid button {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--powder);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease);
}

.yumi-grid button:active {
  transform: scale(0.95);
}

.yumi-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yumi-grid .a {
  grid-column: span 3;
  aspect-ratio: 3 / 4;
}

.yumi-grid .b {
  grid-column: span 2;
  aspect-ratio: 3 / 4;
}

.purr {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--raspberry);
  font: 400 22px var(--f-script);
  pointer-events: none;
  animation: purr 1s var(--ease) forwards;
}

@keyframes purr {
  to {
    transform: translate(-50%, -160%);
    opacity: 0;
  }
}

.counter {
  margin-top: 10px;
  text-align: center;
  font: 500 12px var(--f-mono);
  color: var(--plum-3);
}

/* бесконечность */
.forever {
  max-width: 340px;
  margin: 22px auto 8px;
  text-align: center;
}

.forever svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.forever-line {
  fill: none;
  stroke: var(--blush);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: forever-draw 2.4s var(--ease) 0.3s forwards;
}

@keyframes forever-draw {
  to {
    stroke-dashoffset: 0;
  }
}

html.shot .forever-line {
  stroke-dashoffset: 0;
}

.forever figcaption {
  margin-top: 6px;
  font: 400 26px var(--f-script);
  color: var(--raspberry);
}

/* наш будущий альбом */
.album {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.album-cell {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  aspect-ratio: 3 / 4;
  margin: 0;
  padding: 8px 6px;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
}

.album-cell.real {
  align-content: stretch;
  padding: 6px 6px 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transform: rotate(-1.5deg);
}

.album-cell.real + .album-cell.real {
  transform: rotate(1.5deg);
}

.album-cell.real img {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 34px);
  object-fit: cover;
  border-radius: 8px;
}

.album-cell.real figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  font: 400 16px var(--f-script);
  color: var(--raspberry);
}

.album-cell.future {
  border: 1.5px dashed var(--blush);
  background: rgba(255, 255, 255, 0.6);
  color: var(--plum-3);
  font: 600 11px/1.3 var(--f-body);
  transition: transform 0.25s var(--ease), background 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.album-cell.future i {
  font-style: normal;
  font-size: 28px;
  line-height: 1;
  opacity: 0.4;
  filter: grayscale(0.7);
  transition: opacity 0.4s, filter 0.4s, transform 0.4s var(--ease);
}

.album-cell .soon {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--peony);
  color: var(--white);
  font: 600 10px/1.6 var(--f-body);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.album-cell.future.planned {
  border-style: solid;
  border-color: var(--peony);
  background: linear-gradient(160deg, var(--white), var(--powder));
  color: var(--plum);
  box-shadow: var(--shadow-soft);
}

.album-cell.future.planned i {
  opacity: 1;
  filter: none;
  transform: scale(1.12);
}

.album-cell.future.planned .soon {
  opacity: 1;
  transform: none;
}

.album-cell.future:active {
  transform: scale(0.96);
}

.album-cell.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  pointer-events: none;
  animation: album-flash 0.5s ease-out forwards;
}

@keyframes album-flash {
  to {
    opacity: 0;
  }
}

@media (min-width: 560px) {
  .album {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Юми: наш дом */
.yumi-house {
  position: relative;
  margin-top: 34px;
  padding: 10px 12px 12px;
  border-radius: 0 0 var(--r-l) var(--r-l);
  background: linear-gradient(180deg, var(--white), var(--powder));
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.yumi-house::before {
  content: '';
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: 100%;
  height: 34px;
  background: var(--blush);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.yumi-house-name {
  margin: 0 0 8px;
  text-align: center;
  font: 400 22px var(--f-script);
  color: var(--raspberry);
}

.yumi-rooms {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.yumi-room {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 4px 10px;
  border: 1.5px dashed var(--blush);
  border-radius: var(--r-m);
  background: var(--white);
  color: var(--plum-2);
  font: 600 12px var(--f-body);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.yumi-room i {
  font-style: normal;
  font-size: 26px;
  line-height: 1;
}

.yumi-room.seen {
  border-style: solid;
  background: #fff3f7;
}

.yumi-room.here {
  border-color: var(--peony);
  box-shadow: 0 0 0 3px rgba(238, 94, 146, 0.16);
}

.yumi-room:active {
  transform: scale(0.96);
}

.yumi-cat {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  font-size: 30px;
  line-height: 1;
  pointer-events: none;
  transition: transform 0.7s var(--ease);
}

.yumi-cat.no-anim {
  transition: none;
}

.yumi-cat i,
.night-cat i {
  display: block;
  font-style: normal;
  transform: translate(-50%, -50%) scaleX(var(--flip, 1));
  filter: drop-shadow(0 4px 6px rgba(58, 29, 43, 0.25));
}

.yumi-cat.hop i {
  animation: yumi-hop 0.7s var(--ease);
}

@keyframes yumi-hop {
  40% {
    transform: translate(-50%, -100%) scaleX(var(--flip, 1));
  }
}

.yumi-memory {
  margin-top: 12px;
  min-height: 84px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--plum);
  font: 500 15px/1.55 var(--f-body);
  scroll-margin-bottom: 150px;
}

.yumi-memory p {
  margin: 0;
}

.yumi-memory .yumi-memory-title {
  margin-bottom: 4px;
  font: 400 22px var(--f-script);
  color: var(--raspberry);
}

.yumi-memory .yumi-memory-empty {
  color: var(--plum-3);
  text-align: center;
  padding-top: 14px;
}

.yumi-memory.pop {
  animation: memory-pop 0.45s var(--ease);
}

@keyframes memory-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* Юми: ночной тыгыдык */
.night-room {
  position: relative;
  height: 230px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #6b3b5a 0%, #3a1d2b 58%, #2a1420 100%);
  box-shadow: var(--shadow);
}

.night-room::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.night-room.calm {
  background: radial-gradient(120% 90% at 85% 0%, #8c5876 0%, #4b2839 62%, #361b29 100%);
}

.night-moon {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: inset -10px 4px 0 0 #ffe9c7;
  transform: rotate(-12deg);
}

.night-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.25;
  animation: twinkle 2.4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  to {
    opacity: 0.85;
  }
}

.night-caption {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 1;
  max-width: 68%;
  margin: 0;
  color: var(--powder);
  font: 400 22px/1.2 var(--f-script);
}

.night-cat {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  font-size: 32px;
  line-height: 1;
  pointer-events: none;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.3, 0.7, 0.4, 1);
}

.night-cat i {
  animation: night-run 0.3s ease-in-out infinite alternate;
}

@keyframes night-run {
  to {
    transform: translate(-50%, -66%) scaleX(var(--flip, 1));
  }
}

.night-room.calm .night-cat i {
  animation: none;
}

.night-zzz {
  position: absolute;
  z-index: 3;
  color: var(--powder);
  font: 600 13px var(--f-mono);
  opacity: 0;
  pointer-events: none;
}

.night-room.calm .night-zzz {
  animation: zzz 2.6s ease-in-out infinite;
}

@keyframes zzz {
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(14px, -24px);
  }
}

.night-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font: 500 12px var(--f-mono);
  color: var(--plum-3);
}

.night-meter {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--powder);
  overflow: hidden;
}

.night-meter i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--peony), var(--raspberry));
  transition: width 0.6s var(--ease);
}

.night-turn {
  margin: 14px 0 10px;
  text-align: center;
  font: 600 15px var(--f-body);
  color: var(--plum);
}

.night-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.night-actions .btn {
  padding: 0 10px;
  font-size: 15px;
}

.night-log {
  min-height: 1.6em;
  margin: 12px 0 0;
  text-align: center;
}

/* гордость */
.pride {
  display: grid;
  gap: 8px;
}

.pride-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  text-align: left;
  font-size: 15.5px;
  line-height: 1.42;
  color: var(--plum-3);
  transition: all 0.3s;
}

.pride-lead {
  margin: 4px 0 14px;
  font: 400 clamp(28px, 7.6vw, 34px) / 1.2 var(--f-script);
  color: var(--raspberry);
}

.pride-item .mark-heart {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--blush);
  transition: color 0.3s, transform 0.4s var(--ease);
}

.pride-item .mark-heart svg {
  width: 100%;
  height: 100%;
}

.pride-item .mark-heart path {
  fill: currentColor;
}

.pride-item.lit {
  border-color: var(--blush);
  color: var(--plum);
  background: linear-gradient(90deg, var(--powder), var(--white));
}

.pride-item.lit .mark-heart {
  color: var(--peony);
  animation: heart-pop 0.5s var(--ease);
}

@keyframes heart-pop {
  40% {
    transform: scale(1.35);
  }
}

.pride-item .txt {
  filter: blur(4px);
  transition: filter 0.4s;
}

.pride-item.lit .txt {
  filter: none;
}

/* мечта */
.dream {
  display: grid;
  gap: 16px;
}

.dream-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dream-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  text-align: left;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  transition: all 0.2s;
}

.dream-item i {
  font-style: normal;
  font-size: 22px;
}

.dream-item[aria-pressed='true'] {
  border-color: var(--peony);
  background: var(--powder);
}

/* объятия */
.hug-zone {
  position: relative;
  min-height: 260px;
  border-radius: var(--r-l);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px 16px;
}

.hug-btns {
  position: relative;
  width: 100%;
  height: 130px;
}

.hug-btns .btn {
  position: absolute;
  top: 30px;
  transition: left 0.35s var(--ease), top 0.35s var(--ease);
}

.hug-big {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  animation: reveal 0.6s var(--ease) both;
}

.hug-big svg {
  width: 150px;
  height: 150px;
  color: var(--peony);
  animation: hug 1.6s var(--ease) infinite;
}

@keyframes hug {
  50% {
    transform: scale(1.15);
  }
}

/* причины */
.reasons {
  position: relative;
  min-height: 300px;
}

.reason {
  position: relative;
  padding: 26px 22px 22px;
  border-radius: var(--r-l);
  background: var(--white);
  box-shadow: var(--shadow);
  animation: reveal 0.5s var(--ease) both;
}

.reason .num {
  font: 500 12px var(--f-mono);
  color: var(--raspberry);
  letter-spacing: 0.06em;
}

.reason h3 {
  margin: 10px 0 12px;
  font: 400 23px/1.32 var(--f-display);
}

.reason blockquote {
  margin: 0;
  font: 400 24px/1.3 var(--f-script);
  color: var(--raspberry);
}

.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 14px 0;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blush);
}

.dots i.on {
  background: var(--peony);
}

/* подарок */
.scene.tiffany {
  position: relative;
}

.scene.tiffany .kicker {
  color: var(--tiffany-deep);
}

body.tiffany-mode {
  background: radial-gradient(120% 60% at 50% 0%, rgba(129, 216, 208, 0.22), var(--milk) 60%) fixed;
}

body.tiffany-mode .cta-bar .btn {
  background: var(--tiffany-deep);
  box-shadow: 0 14px 34px -16px rgba(47, 158, 148, 0.6);
}

/* ───────── Новый год: сюрприз под ёлкой и салют ───────── */
.surprise-pic {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.surprise-pic img {
  display: block;
  filter: blur(16px) brightness(0.75) saturate(1.2);
  transform: scale(1.08);
  transition: filter 1.4s var(--ease), transform 1.4s var(--ease);
}

.surprise.open .surprise-pic img {
  filter: none;
  transform: none;
}

.surprise-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle, rgba(58, 29, 43, 0.15), rgba(58, 29, 43, 0.5));
  transition: opacity 0.6s ease;
}

.surprise-veil p {
  margin: 0;
  font: 400 26px/1.25 var(--f-script);
  color: #fff;
  text-shadow: 0 2px 12px rgba(58, 29, 43, 0.6);
}

.surprise.open .surprise-veil {
  opacity: 0;
  pointer-events: none;
}

.surprise figcaption {
  animation: reveal 0.8s 0.4s var(--ease) both;
}

.salute {
  position: relative;
  height: min(62vh, 420px);
  overflow: hidden;
  border-radius: var(--r-l);
  background:
    radial-gradient(120% 70% at 50% 110%, rgba(238, 94, 146, 0.35), transparent 60%),
    linear-gradient(#0f0a14, #241526);
  box-shadow: var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.salute canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.salute-hint {
  position: absolute;
  inset: auto 0 22px;
  text-align: center;
  font: 400 24px var(--f-script);
  color: rgba(255, 255, 255, 0.85);
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.salute-hint.gone {
  opacity: 0;
}

.salute-done {
  margin-top: 18px;
  text-align: center;
}

/* ───────── Экран входа по паролю ───────── */
.gate {
  display: grid;
  align-content: center;
  justify-items: center;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 48px 24px calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}

.gate .title {
  margin-bottom: 12px;
}

.gate-lead {
  margin: 0 0 26px;
}

.gate-orb {
  position: relative;
  width: 128px;
  aspect-ratio: 1;
  margin-bottom: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff 0 10%, rgba(255, 255, 255, 0.55) 18%, transparent 40%),
    radial-gradient(circle at 50% 62%, var(--blush), var(--peony) 72%, var(--raspberry));
  box-shadow: 0 24px 60px -24px rgba(183, 50, 95, 0.55), inset 0 -12px 30px rgba(183, 50, 95, 0.3);
  animation: gate-float 4s ease-in-out infinite;
}

.gate-orb::after {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(238, 94, 146, 0.25);
  border-radius: 50%;
}

@keyframes gate-float {
  50% {
    transform: translateY(-8px);
  }
}

.gate-form {
  display: grid;
  gap: 12px;
  width: 100%;
}

.gate-field {
  position: relative;
  display: block;
}

.gate-field input {
  width: 100%;
  height: 56px;
  padding: 0 54px 0 18px;
  border: 1.5px solid var(--blush);
  border-radius: var(--r-m);
  background: var(--white);
  font: 500 17px var(--f-body);
  color: var(--plum);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gate-field input:focus {
  border-color: var(--peony);
  box-shadow: 0 0 0 4px rgba(238, 94, 146, 0.15);
}

.gate-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--plum-3);
  transform: translateY(-50%);
}

.gate-eye[aria-pressed='true'] {
  color: var(--raspberry);
}

.gate-eye svg {
  width: 22px;
  height: 22px;
}

.gate-error {
  min-height: 1.4em;
  margin: 2px 0 0;
  font-size: 14.5px;
  color: var(--raspberry);
}

.gate-form.shake {
  animation: gate-shake 0.4s;
}

@keyframes gate-shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

body.gate-opening .gate {
  animation: gate-out 0.55s var(--ease) forwards;
}

@keyframes gate-out {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* ───────── Трейлер второй части: тёмный кинозал ───────── */
html:has(body.cinema-mode),
body.cinema-mode {
  background: #170d13;
}

body.cinema-mode #ambient {
  opacity: 0.35;
}

body.cinema-mode .topbar {
  background: linear-gradient(#170d13 70%, rgba(23, 13, 19, 0));
}

body.cinema-mode .cta-bar {
  background: linear-gradient(rgba(23, 13, 19, 0), #170d13 45%);
}

.trailer {
  display: grid;
  gap: 22px;
  color: #fbe9ef;
}

@property --sweep {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* Старый киношный отсчёт: кольца, перекрестье и бегущий сектор. */
.leader {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-m);
  background: radial-gradient(circle, #f6e9ec 0 32%, #dcc5cc 72%, #b89ea7);
  color: #2a1520;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  /* по центру экрана, как на большом экране кинотеатра */
  margin-top: max(0px, calc(50dvh - var(--top) - 26px - (min(100vw, 580px) - 44px) * 0.375));
  animation: leader-flicker 0.14s steps(2) infinite;
}

.leader::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(42, 21, 32, 0.4), rgba(42, 21, 32, 0.4)) center / 1px 100% no-repeat,
    linear-gradient(rgba(42, 21, 32, 0.4), rgba(42, 21, 32, 0.4)) center / 100% 1px no-repeat;
}

.leader::after {
  content: '';
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(42, 21, 32, 0.55);
  outline: 2px solid rgba(42, 21, 32, 0.35);
  outline-offset: 12px;
}

.leader-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(rgba(42, 21, 32, 0.22) var(--sweep), transparent 0);
  animation: leader-sweep 1s linear infinite;
}

.leader-num {
  position: relative;
  z-index: 1;
  font: 400 clamp(96px, 30vw, 150px) / 1 var(--f-display);
}

.leader.tick .leader-num {
  animation: leader-tick 0.5s var(--ease);
}

.leader.gone {
  animation: leader-out 0.45s ease forwards;
}

@keyframes leader-sweep {
  to {
    --sweep: 360deg;
  }
}

@keyframes leader-flicker {
  50% {
    filter: brightness(0.93);
  }
}

@keyframes leader-tick {
  from {
    opacity: 0.2;
    transform: scale(1.18);
  }
}

@keyframes leader-out {
  to {
    opacity: 0;
    transform: scale(1.05);
  }
}

/* Её слова — печатной машинкой. */
.tr-words {
  display: grid;
  gap: 18px;
}

.tr-word {
  margin: 0;
}

.tr-word blockquote {
  margin: 0;
  font: 400 clamp(22px, 6.2vw, 27px) / 1.35 var(--f-display);
  color: #fff;
  text-wrap: balance;
}

.tr-quote::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: var(--blush);
  animation: tr-caret 0.9s steps(1) infinite;
}

.tr-word.done .tr-quote::after {
  display: none;
}

.tr-word figcaption {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(251, 233, 239, 0.55);
}

@keyframes tr-caret {
  50% {
    opacity: 0;
  }
}

.tr-script {
  margin: 4px 0 0;
  font: 400 clamp(25px, 6.8vw, 30px) / 1.3 var(--f-script);
  color: var(--blush);
}

/* Часть вторая. */
.tr-head {
  margin-top: 14px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.tr-kicker {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 233, 239, 0.6);
}

.tr-title {
  margin: 8px 0 14px;
  font: 400 clamp(36px, 9.6vw, 48px) / 1.1 var(--f-display);
  color: #fff;
}

.tr-cuts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tr-cut {
  padding: 14px 16px;
  border: 1px solid rgba(247, 198, 214, 0.18);
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, 0.06);
  font-size: 16.5px;
  line-height: 1.45;
  animation: tr-cut-in 0.9s var(--ease) both;
}

.tr-cut.shot {
  border-color: rgba(247, 198, 214, 0.5);
  background: linear-gradient(135deg, rgba(238, 94, 146, 0.38), rgba(183, 50, 95, 0.28));
  font-weight: 600;
  color: #fff;
}

@keyframes tr-cut-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    filter: blur(4px);
  }
}

/* Новая плёнка. */
.tr-final {
  padding-top: 18px;
  text-align: center;
}

.tr-big {
  margin: 0 0 12px;
  font: 400 clamp(32px, 8.8vw, 42px) / 1.2 var(--f-script);
  color: var(--blush);
  text-shadow: 0 0 26px rgba(238, 94, 146, 0.5);
}

.tr-p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(251, 233, 239, 0.86);
  text-wrap: pretty;
}

.tr-after {
  margin: 6px 0 0;
  text-align: center;
  font: 400 24px / 1.3 var(--f-script);
  color: #fff;
}

.giftbox {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.giftbox button {
  border: 0;
  background: none;
  padding: 0;
  width: min(62vw, 250px);
}

.giftbox svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.giftbox .lid {
  transition: transform 0.9s var(--ease);
  transform-origin: 50% 100%;
}

.giftbox.open .lid {
  transform: translateY(-46px) rotate(-12deg);
}

.giftbox .glow {
  opacity: 0;
  transition: opacity 0.9s;
}

.giftbox.open .glow {
  opacity: 1;
}

.gifts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gift-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  background: var(--white);
  text-align: center;
  transition: all 0.2s;
  --m1: #f2c4b3;
  --m2: #c98a74;
  --st: #e9f3ff;
}

.gift-card svg {
  width: 100%;
  max-width: 120px;
  height: auto;
}

.gift-card b {
  font-size: 14.5px;
  line-height: 1.3;
}

.gift-card[aria-pressed='true'] {
  border-color: var(--tiffany-deep);
  background: linear-gradient(180deg, rgba(129, 216, 208, 0.18), var(--white));
  box-shadow: 0 0 0 3px rgba(129, 216, 208, 0.45);
}

.gift-detail {
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: var(--r-l);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  animation: reveal 0.5s var(--ease) both;
  --m1: #f2c4b3;
  --m2: #c98a74;
  --st: #e9f3ff;
}

.gift-detail .preview {
  width: 180px;
  margin: 0 auto 6px;
}

.gift-detail h3 {
  margin: 0 0 6px;
  font: 400 24px/1.25 var(--f-display);
  text-align: center;
}

.gift-detail .p {
  text-align: center;
  font-size: 15.5px;
}

.gift-detail .gift-spec {
  margin: 0 0 4px;
  text-align: center;
  font: 500 12px var(--f-mono);
  color: var(--tiffany-deep);
}

.opt-group {
  margin-top: 16px;
}

.opt-group > b {
  display: block;
  margin-bottom: 8px;
  font: 500 12px var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tiffany-deep);
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.chip.tf[aria-pressed='true'] {
  background: var(--tiffany-deep);
  border-color: var(--tiffany-deep);
}

.sent {
  text-align: center;
  padding-top: 10px;
}

.sent .sky {
  position: relative;
  height: 150px;
  margin: 0 -22px 10px;
  overflow: hidden;
}

.sent .plane {
  position: absolute;
  top: 46px;
  left: -160px;
  width: 150px;
  animation: fly 5.5s ease-in-out infinite;
}

@keyframes fly {
  0% {
    transform: translate(0, 10px) rotate(-2deg);
  }
  45%,
  55% {
    transform: translate(calc(50vw + 80px), -4px) rotate(-4deg);
  }
  100% {
    transform: translate(calc(100vw + 340px), -36px) rotate(-8deg);
  }
}

.sent .trail {
  position: absolute;
  top: 92px;
  left: 0;
  height: 2px;
  opacity: .8;
  width: 0;
  background: repeating-linear-gradient(90deg, var(--blush) 0 10px, transparent 10px 18px);
  animation: trail 5.5s ease-in-out infinite;
}

@keyframes trail {
  to {
    width: 100%;
  }
}

.order-card {
  margin: 18px auto 0;
  max-width: 400px;
  padding: 16px 18px;
  border-radius: var(--r-m);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: left;
  --m1: #f2c4b3;
  --m2: #c98a74;
  --st: #e9f3ff;
}

.order-card .row {
  flex-wrap: nowrap;
}

.order-card svg {
  width: 70px;
  flex: 0 0 auto;
}

.order-status {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  font: 500 11px var(--f-mono);
  color: var(--tiffany-deep);
}

.order-status span {
  flex: 1;
  padding-top: 8px;
  border-top: 3px solid var(--tiffany);
}

.order-status span.todo {
  color: var(--plum-3);
  border-top-color: var(--powder);
}

/* итог */
.summary-head {
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 22px;
}

.stat {
  padding: 12px 6px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.stat b {
  display: block;
  font: 400 26px/1.1 var(--f-display);
  color: var(--raspberry);
}

.stat small {
  font-size: 12px;
  color: var(--plum-3);
}

.sum-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.sum-item {
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.sum-item small {
  display: block;
  margin-bottom: 3px;
  font: 500 11px var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--raspberry);
}

.sum-item p {
  margin: 0;
  font-size: 15.5px;
  white-space: pre-line;
}

.sum-actions {
  display: grid;
  gap: 10px;
}

/* поделиться */
.toggles {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  cursor: pointer;
  font-size: 15.5px;
}

.toggle input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--powder);
  position: relative;
  transition: background 0.2s;
}

.toggle input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s var(--ease);
}

.toggle input:checked {
  background: var(--peony);
}

.toggle input:checked::after {
  transform: translateX(18px);
}

.share-result {
  padding: 16px;
  border-radius: var(--r-m);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  animation: reveal 0.5s var(--ease) both;
}

.share-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--powder);
  font: 500 14px var(--f-mono);
  word-break: break-all;
  color: var(--raspberry);
  margin-bottom: 12px;
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ───────── FX ───────── */
#fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}

.fx-heart {
  position: fixed;
  margin: -10px 0 0 -10px;
  animation: fx-pop ease-out forwards;
  display: grid;
  place-items: center;
  line-height: 1;
}

.fx-heart svg,
.fx-rain svg,
.render svg path,
.ikea .kiss path {
  fill: currentColor;
}

.fx-heart svg,
.fx-rain svg {
  width: 100%;
  height: 100%;
}

@keyframes fx-pop {
  from {
    transform: translate(0, 0) scale(0.4) rotate(0);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r));
    opacity: 0;
  }
}

.fx-rain {
  position: fixed;
  top: -40px;
  animation: rain linear forwards;
}

@keyframes rain {
  to {
    transform: translate(var(--sway), calc(100vh + 80px)) rotate(180deg);
    opacity: 0.6;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--plum);
  color: var(--milk);
  font-size: 14.5px;
  transform: translate(-50%, 30px);
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
  text-align: center;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.noscript {
  padding: 40px 24px;
  text-align: center;
}

/* Полароиды по краям (только широкие экраны) */
.side-photos {
  display: none;
}

@media (min-width: 1180px) {
  .side-photos {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  .polaroid {
    position: absolute;
    width: clamp(110px, min(9.5vw, 17vh), 160px);
    margin: 0;
    padding: 8px 8px 10px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 18px 40px -20px rgba(58, 29, 43, 0.45);
    transform: rotate(var(--rot));
    animation: drift 9s ease-in-out infinite;
    opacity: 0.92;
  }

  .polaroid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
  }

  .polaroid figcaption {
    padding-top: 6px;
    text-align: center;
    font: 400 15px/1.2 var(--f-script);
    color: var(--plum-2);
  }

  @keyframes drift {
    50% {
      transform: rotate(calc(var(--rot) * -0.4)) translateY(-10px);
    }
  }
}

/* ───────── Десктоп ───────── */
@media (min-width: 900px) {
  :root {
    --top: 84px;
  }

  .topbar {
    justify-content: center;
    padding-inline: 24px;
  }

  .film-strip {
    flex: 0 1 auto;
    height: 60px;
  }

  .frame {
    width: 58px;
    height: 40px;
  }

  .frame span {
    font-size: 9.5px;
  }

  .sound-toggle {
    position: absolute;
    right: 24px;
  }

  .film,
  .color-quiz {
    margin: 0;
    border-radius: var(--r-l);
  }

  .film-track {
    padding: 0 18px;
  }

  .film-frame {
    width: 230px;
  }

  .yumi-grid {
    gap: 12px;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 16px;
  }

  .scene {
    padding-inline: 16px;
  }

  .color-quiz,
  .film {
    margin-inline: -16px;
  }

  .dream-grid,
  .gifts {
    grid-template-columns: 1fr;
  }
}

html.shot *,
html.shot *::before,
html.shot *::after {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
