/* ---------- Шаг 1: Да / Нет ---------- */
.answer-row { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 28px; min-height: 84px; flex-wrap: wrap; }
.btn-yes {
  position: relative; font-size: calc(1.2rem * var(--yes-scale, 1)); padding: calc(16px * var(--yes-scale, 1)) calc(44px * var(--yes-scale, 1));
  transition: font-size .25s, padding .25s;
}
/* Пульсирующее кольцо вокруг «Да»: сама кнопка не двигается, чтобы её было легко нажать. */
.btn-yes::after {
  content: ''; position: absolute; inset: -4px; border-radius: inherit; pointer-events: none;
  border: 3px solid rgba(255, 111, 145, .7); animation: heartbeat 1.6s ease-out infinite;
}
@keyframes heartbeat { 0% { transform: scale(1); opacity: .9; } 70% { transform: scale(1.28); opacity: 0; } 100% { transform: scale(1.28); opacity: 0; } }
.btn-no {
  background: rgba(58, 39, 64, .08); color: var(--muted); font-size: calc(1.05rem * var(--no-scale, 1));
  padding: 14px 30px; touch-action: none; user-select: none; -webkit-user-select: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.3), font-size .2s, opacity .3s;
}
.btn-no.fleeing { position: fixed; left: 0; top: 0; z-index: 40; margin: 0; }
.emoji-hero { font-size: 4.2rem; line-height: 1; margin-bottom: 8px; display: inline-block; animation: wiggle 3s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* ---------- Полароид ---------- */
.polaroid {
  position: relative; margin: 0 auto 18px; width: min(200px, 56vw); padding: 10px 10px 34px;
  background: #fff; border-radius: 6px; box-shadow: 0 16px 34px -18px rgba(90, 40, 80, .5), 0 2px 6px rgba(90, 40, 80, .08);
  animation: polaroid-in .7s cubic-bezier(.2, .9, .3, 1.2) both;
}
.polaroid.tilt-left { --tilt: -3deg; }
.polaroid.tilt-right { --tilt: 2.5deg; }
.polaroid { transform: rotate(var(--tilt, -3deg)); }
@keyframes polaroid-in { from { opacity: 0; transform: rotate(calc(var(--tilt, -3deg) - 8deg)) translateY(-16px) scale(.9); } to { opacity: 1; transform: rotate(var(--tilt, -3deg)); } }
.polaroid::before {
  content: ''; position: absolute; top: -12px; left: 50%; width: 72px; height: 22px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 214, 102, .75); box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; background: var(--bg2); }
.polaroid-caption {
  position: absolute; left: 0; right: 0; bottom: 6px; text-align: center;
  font-family: var(--font-hand); font-size: 1.35rem; color: var(--ink); transform: rotate(-1deg);
}
.polaroid:hover { transform: rotate(0) scale(1.03); transition: transform .3s; }

/* ---------- Шаг 2: дата и время ---------- */
.days {
  display: flex; gap: 10px; overflow-x: auto; padding: 8px 4px 14px; margin: 0 -4px; min-width: 0; max-width: 100%;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.days::-webkit-scrollbar { display: none; }
.day {
  position: relative; flex: 0 0 84px; scroll-snap-align: start;
  display: grid; gap: 2px; place-items: center; padding: 12px 8px 10px;
  border-radius: 20px; background: rgba(255, 255, 255, .7); border: 2px solid transparent;
  transition: transform .18s, border-color .18s, background .18s, box-shadow .18s;
}
.day:hover { transform: translateY(-3px); }
.day .wd { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.day .num { font-family: var(--font-hand); font-size: 2rem; font-weight: 700; line-height: 1; }
.day .mon { font-size: .8rem; color: var(--muted); }
.day.weekend .wd { color: var(--accent); }
.day.selected { border-color: var(--accent); background: #fff; box-shadow: 0 12px 24px -14px rgba(255, 111, 145, .8); transform: translateY(-3px) scale(1.04); }
.time-field {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin-top: 6px; padding: 12px 16px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .7); border: 2px solid transparent; cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.time-field:focus-within { border-color: var(--accent); background: #fff; }
.time-field.selected { border-color: var(--accent); background: #fff; box-shadow: 0 12px 24px -14px rgba(255, 111, 145, .8); }
.time-field .time-label { font-weight: 800; font-size: .85rem; color: var(--muted); }
.time-field input { width: 100%; min-width: 0; border: 0; background: transparent; font-family: var(--font-hand); font-size: 2rem; font-weight: 700; padding: 0; color: var(--ink); }
.time-field input:focus { outline: none; }
.time-field input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.section-label { font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }

/* ---------- Шаг 3: формат ---------- */
.types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 6px; }
@media (min-width: 520px) { .types { grid-template-columns: repeat(3, 1fr); } }
.type {
  position: relative; display: grid; gap: 6px; justify-items: start; text-align: left;
  padding: 16px 14px 14px; border-radius: 22px; min-height: 112px;
  background: rgba(255, 255, 255, .7); border: 2px solid transparent;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.type .em { font-size: 2.1rem; line-height: 1; transition: transform .25s; }
.type .tt { font-weight: 800; line-height: 1.2; }
.type:hover, .type:focus-visible { transform: translateY(-4px); background: #fff; }
.type:hover .em, .type.selected .em { transform: scale(1.15) rotate(-6deg); }
.type.selected { border-color: var(--accent); background: #fff; box-shadow: 0 16px 30px -16px rgba(255, 111, 145, .8); }
.type.sunny.selected, .type.sunny:hover { border-color: #ffb703; box-shadow: 0 16px 40px -14px rgba(255, 183, 3, .9); }
.weather-rain .type { background: rgba(255, 255, 255, .55); }

/* ---------- Шаг 4: собака ---------- */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.choice {
  display: grid; place-items: center; gap: 8px; padding: 22px 12px; border-radius: 24px;
  background: rgba(255, 255, 255, .7); border: 2px solid transparent; font-weight: 800; font-size: 1.2rem;
  transition: transform .18s, border-color .18s, background .18s, box-shadow .18s;
}
.choice .em { font-size: 2.6rem; line-height: 1; }
.choice:hover { transform: translateY(-3px); background: #fff; }
.choice.selected { border-color: var(--accent); background: #fff; box-shadow: 0 16px 30px -16px rgba(255, 111, 145, .8); }
.dog-run { position: absolute; bottom: 4vh; left: -20vw; font-size: 4rem; animation: dog-run 3.2s linear forwards; }
.dog-run span { display: inline-block; animation: dog-bounce .35s ease-in-out infinite alternate; }
@keyframes dog-run { to { left: 110vw; } }
@keyframes dog-bounce { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-14px) rotate(6deg); } }
.dog-sad { position: absolute; right: 6vw; bottom: -20px; font-size: 4rem; animation: dog-peek 1.2s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.dog-sad::after { content: '💧'; position: absolute; left: 62%; top: 38%; font-size: 1.1rem; animation: tear 1.6s ease-in infinite; }
@keyframes dog-peek { from { transform: translateY(110%); } to { transform: translateY(20%); } }
@keyframes tear { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(30px); } }
.paw { position: absolute; font-size: 1.5rem; animation: paw-fade 2.2s ease-out forwards; }
@keyframes paw-fade { from { opacity: 0; transform: scale(.4); } 25% { opacity: .9; transform: scale(1); } to { opacity: 0; } }

/* ---------- Шаг 5: договор ---------- */
.contract {
  position: relative; margin-top: 6px; padding: 22px 20px 18px; border-radius: 6px;
  background: repeating-linear-gradient(#fffdf7 0 31px, rgba(58, 39, 64, .08) 31px 32px);
  background-color: #fffdf7; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(58, 39, 64, .06);
  transform: rotate(-.6deg);
}
.contract::before { content: '📎'; position: absolute; top: -16px; left: 18px; font-size: 1.6rem; transform: rotate(-30deg); }
.contract h3 { font-family: var(--font-hand); font-size: 1.7rem; margin: 0 0 12px; text-align: center; letter-spacing: .04em; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; line-height: 1.45; font-weight: 600; }
.rule input { position: absolute; opacity: 0; width: 0; height: 0; }
.rule .box {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); background: #fff;
  display: grid; place-items: center; font-size: 1.1rem; transition: background .2s, transform .2s; margin-top: 1px;
}
.rule input:checked + .box { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(-8deg) scale(1.08); }
.rule input:checked + .box::after { content: '✓'; font-weight: 900; }
.rule input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }
.signature { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; padding-top: 8px; }
.signature .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.signature .line { flex: 1; border-bottom: 2px solid var(--ink); min-height: 2.2rem; position: relative; }
.signature .name {
  position: absolute; left: 6px; bottom: 2px; font-family: var(--font-hand); font-size: 2rem; color: #2f4bd8; white-space: nowrap;
  overflow: hidden; width: 0; transform: rotate(-3deg); transition: width 1.1s ease-out;
}
.signature.signed .name { width: 100%; }
.sending { display: inline-block; width: 16px; height: 16px; border: 3px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Шаг 6: билет ---------- */
.ticket {
  --notch: 18px; position: relative; margin-top: 10px; border-radius: 18px; overflow: hidden;
  background: #fff; box-shadow: 0 20px 40px -22px rgba(90, 40, 80, .45);
  animation: ticket-in .7s cubic-bezier(.2, .9, .3, 1.2) both;
  transform-origin: center;
}
@keyframes ticket-in { from { opacity: 0; transform: rotate(-6deg) translateY(30px) scale(.9); } to { opacity: 1; transform: rotate(-1.2deg); } }
.ticket .head { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.ticket .head .brand { font-family: var(--font-hand); font-size: 1.6rem; font-weight: 700; }
.ticket .head .seat { font-size: .75rem; font-weight: 800; letter-spacing: .12em; opacity: .9; }
.ticket .body { padding: 18px 20px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ticket .field .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.ticket .field .v { font-weight: 800; font-size: 1.05rem; line-height: 1.25; margin-top: 2px; }
.ticket .field.wide { grid-column: 1 / -1; }
.ticket .tear {
  position: relative; height: 0; border-top: 2px dashed rgba(58, 39, 64, .2); margin: 0 var(--notch);
}
.ticket .tear::before, .ticket .tear::after {
  content: ''; position: absolute; top: calc(var(--notch) * -1); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2); border-radius: 50%; background: var(--card, #f6eef7);
}
.ticket .tear::before { left: calc(var(--notch) * -2); }
.ticket .tear::after { right: calc(var(--notch) * -2); }
.ticket .stub { padding: 14px 20px 18px; min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ticket .stub .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--muted); letter-spacing: .1em; }
.ticket .stub .barcode { height: 34px; flex: 1; max-width: 180px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px, var(--ink) 9px 12px, transparent 12px 14px); opacity: .8; }
.stamp {
  position: absolute; right: 12px; bottom: 6px; padding: 6px 12px; border: 3px solid #d62839; color: #d62839; border-radius: 8px;
  font-weight: 900; letter-spacing: .14em; font-size: .85rem; transform: rotate(-14deg); opacity: 0;
  animation: stamp-in .45s cubic-bezier(.2, 1.4, .3, 1) .9s forwards; mix-blend-mode: multiply;
  -webkit-mask: radial-gradient(circle at 30% 40%, #000 60%, transparent 62%), linear-gradient(#000, #000);
  -webkit-mask-composite: source-over; mask-composite: add;
}
@keyframes stamp-in { from { opacity: 0; transform: rotate(-14deg) scale(2.2); } to { opacity: .92; transform: rotate(-14deg) scale(1); } }
.farewell { text-align: center; font-family: var(--font-hand); font-size: 2rem; margin: 18px 0 0; }
.send-status { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 183, 3, .18); font-size: .95rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.send-status.ok { background: rgba(76, 175, 130, .15); }

/* Записка к треку */
.track-note {
  margin-top: 16px; padding: 12px 16px 10px; border-radius: 6px 18px 6px 18px;
  background: #fff8d6; color: #4a3a1e; box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .4);
  transform: rotate(.6deg); position: relative;
}
.track-note::before { content: '📌'; position: absolute; top: -12px; right: 14px; font-size: 1.3rem; }
.track-note { margin-bottom: 0; font-family: var(--font-hand); font-size: 1.55rem; font-weight: 700; line-height: 1.2; }

/* Плеер */
.player { margin-top: 18px; border-radius: 18px; overflow: hidden; position: relative; aspect-ratio: 16 / 9; background: #1a1220; box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .6); }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: .75; display: block; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .play {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 8px; align-content: center; color: #fff; width: 100%;
  background: #1a1220; z-index: 2; animation: pop-in .35s both;
}
.player .play .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.player .play .disc, .player .play .cap, .player .play .sub { position: relative; }
.player .play .disc { width: 78px; height: 78px; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); display: grid; place-items: center; font-size: 2rem; border: 2px solid rgba(255, 255, 255, .6); transition: transform .2s, background .2s; }
.player .play:hover .disc { transform: scale(1.08); background: rgba(255, 111, 145, .7); }
.player .play .cap { font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.player .play .sub { font-size: .8rem; opacity: .85; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.notes { position: absolute; font-size: 1.4rem; animation: note-fly 2.4s ease-out forwards; pointer-events: none; }
@keyframes note-fly { from { opacity: 0; transform: translateY(0) rotate(0); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-120px) rotate(30deg); } }
