/* Aurora Bloom states for the existing gift generation flow. */
.gift-wizard-screen[hidden],
.gift-wizard-step[hidden] { display: none !important; }

.gift-wizard-screen[data-gift-screen="lyrics-loading"] {
  min-height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
}
.gift-wizard-screen[data-gift-screen="lyrics-loading"]::before {
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  border: 1px solid rgba(245,87,121,.22);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 42%, rgba(245,87,121,.7) 43% 48%, transparent 49%) 50% 50% / 12px 36px no-repeat,
    linear-gradient(90deg, transparent 42%, rgba(217,157,232,.75) 43% 48%, transparent 49%) 26% 57% / 12px 25px no-repeat,
    radial-gradient(circle at 50% 50%, #fff 0 35%, #fff0eb 36% 56%, #f9edff 57% 100%);
  box-shadow: 0 0 0 12px rgba(255,172,157,.08), 0 0 30px rgba(225,139,184,.23);
  content: "";
  animation: aurora-pulse 2.1s ease-in-out infinite;
}
.gift-wizard-screen[data-gift-screen="lyrics-loading"] .gift-wizard__heading { margin: 0 auto; }
.gift-wizard-screen[data-gift-screen="lyrics-loading"] .gift-eyebrow { justify-content: center; }

.gift-lyrics-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 30px; }
.gift-lyrics-option {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  padding: 27px 26px 23px;
  border: 1px solid rgba(139,94,110,.13);
  border-radius: 16px;
  background: linear-gradient(140deg,#fffdfb,#fff7f2 68%,#fbf6ff);
  box-shadow: 0 7px 18px rgba(122,77,97,.05);
}
.gift-lyrics-option::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg,#ff8a73,#f55779,#d59de9); content: ""; }
.gift-lyrics-option h3 { font-family: "Playfair Display",Georgia,serif; font-size: 25px; font-weight: 600; }
.gift-lyrics-option pre { flex: 1; overflow: visible; max-height: none; margin: 17px 0 23px; white-space: pre-wrap; color: #65545f; font-family: Manrope,Arial,sans-serif; font-size: 14px; line-height: 1.78; }
.gift-lyrics-option .gift-button { align-self: flex-start; min-height: 43px; font-size: 13px; }

.gift-lyrics-editor { min-height: 460px !important; border-radius: 15px !important; background: #fffbf6 !important; font-family: Manrope,Arial,sans-serif !important; font-size: 15px !important; line-height: 1.75 !important; }
.gift-submit-status.is-loading { color: #bd5b74; }.gift-submit-status.is-error { color: #bc4664; font-weight: 700; }.gift-submit-status.is-success { color: #477d65; font-weight: 700; }.gift-submit-status a { color: #d35073; text-decoration: underline; }

.gift-package-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.gift-package-choice { position: relative; display: block; cursor: pointer; }
.gift-package-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gift-package-choice__body { position: relative; display: grid; min-height: 126px; align-content: center; gap: 10px; padding: 21px 22px; border: 1px solid rgba(154,105,123,.17); border-radius: 16px; background: #fffdfb; box-shadow: 0 8px 20px rgba(124,74,95,.04); transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.gift-package-choice__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.gift-package-choice__head strong { color: var(--aurora-ink); font-family: "Playfair Display",Georgia,serif; font-size: 21px; font-weight: 600; }
.gift-package-choice__head b { flex: 0 0 auto; color: #c64e6d; font-size: 18px; }
.gift-package-choice__body small { color: #806c76; font-size: 12px; line-height: 1.55; }
.gift-package-choice__body em { position: absolute; top: -10px; right: 16px; padding: 5px 10px; border-radius: 999px; background: linear-gradient(100deg,#f4677d,#c98edc); color: #fff; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.gift-package-choice > input:checked + .gift-package-choice__body { border-color: rgba(226,91,123,.58); background: linear-gradient(135deg,#fffaf6,#fff5f5 66%,#fbf3ff); box-shadow: 0 0 0 3px rgba(239,100,128,.1),0 12px 26px rgba(136,76,101,.08); transform: translateY(-1px); }
.gift-package-choice > input:focus-visible + .gift-package-choice__body { outline: 3px solid rgba(218,89,120,.27); outline-offset: 3px; }
.gift-package-choice:hover .gift-package-choice__body { border-color: rgba(214,99,128,.42); }

.gift-commercial-summary { display: grid; grid-template-columns: minmax(170px,.9fr) minmax(260px,1.15fr); gap: 18px 34px; margin-top: 25px; padding: 25px 27px; border: 1px solid rgba(194,112,137,.17); border-radius: 17px; background: linear-gradient(125deg,rgba(255,248,242,.94),rgba(255,252,251,.96) 55%,rgba(249,243,255,.9)); box-shadow: 0 9px 22px rgba(135,81,102,.05); }
.gift-commercial-summary .gift-eyebrow { margin-bottom: 9px; }
.gift-commercial-summary h2 { font-family: "Playfair Display",Georgia,serif; font-size: 27px; font-weight: 600; line-height: 1.08; }
.gift-commercial-summary__package { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid rgba(205,103,131,.17); border-radius: 13px; background: rgba(255,255,255,.72); }
.gift-commercial-summary__package strong { color: var(--aurora-ink); font-family: "Playfair Display",Georgia,serif; font-size: 19px; font-weight: 600; }
.gift-commercial-summary__package span { flex: 0 0 auto; color: #c64e6d; font-size: 17px; font-weight: 800; }
.gift-commercial-summary ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; align-content: center; margin: 0; padding: 0; list-style: none; }
.gift-commercial-summary li { position: relative; padding-left: 18px; color: #604f59; font-size: 12px; font-weight: 700; }
.gift-commercial-summary li::before { position: absolute; top: .48em; left: 0; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg,#ff8a73,#f55779); box-shadow: 0 0 0 4px rgba(245,87,121,.08); content: ""; }
.gift-commercial-summary__price { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; padding-top: 17px; border-top: 1px solid rgba(128,94,109,.11); color: #7a6570; font-size: 13px; font-weight: 700; }
.gift-commercial-summary__price strong { color: var(--aurora-ink); font-family: "Playfair Display",Georgia,serif; font-size: 25px; font-weight: 600; }
.gift-commercial-summary__note { grid-column: 1 / -1; margin: 0; padding-top: 15px; border-top: 1px solid rgba(128,94,109,.1); color: #917b84; font-size: 11px; line-height: 1.55; }
.gift-commercial-summary [hidden] { display: none !important; }
.gift-submit-status--balance { display: grid; justify-items: start; gap: 8px; margin-top: 18px; padding: 18px; border: 1px solid rgba(204,103,129,.2); border-radius: 14px; background: #fff7f4; color: #6d5661; line-height: 1.55; }
.gift-submit-status--balance strong { color: #a84562; font-size: 14px; }
.gift-submit-status--balance span { font-size: 12px; }
.gift-submit-status--balance .gift-button { margin-top: 4px; text-decoration: none; }

.gift-result-card { position: relative; overflow: hidden; max-width: 980px; min-height: 560px; margin: 0 auto; }
.gift-result-card::before { position: absolute; width: 440px; height: 440px; right: -190px; top: -220px; border-radius: 50%; background: radial-gradient(circle,rgba(255,194,169,.66),rgba(242,232,255,.18) 63%,transparent 72%); content: ""; }
.gift-result-card .gift-eyebrow { position: relative; }.gift-result-card h1 { max-width: 620px; margin-top: 16px; font-size: clamp(46px,5vw,69px); line-height: 1.04; }.gift-result-card > p:not(.gift-eyebrow) { max-width: 530px; margin-top: 17px; font-size: 15px; line-height: 1.7; }.gift-result-card .gift-eyebrow + .gift-result-card__cover + h1 { max-width: 570px; }
.gift-result-card__cover { position: absolute; top: 42px; right: 42px; display: grid; width: 220px; height: 220px; place-items: center; padding: 26px; border: 1px solid rgba(255,255,255,.74); border-radius: 24px; background: linear-gradient(145deg,#ffd0b8,#ff98a4 57%,#d4b2ed); box-shadow: 0 16px 31px rgba(155,88,116,.13); color: #fff; text-align: center; }
.gift-result-card__cover::before { position: absolute; width: 84px; height: 84px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; content: ""; }.gift-result-card__cover strong { position: relative; z-index: 1; color: #fff; font-family: "Playfair Display",Georgia,serif; font-size: 20px; font-weight: 600; line-height: 1.1; }
.gift-result-audio { display: block; width: min(570px,100%); margin-top: 29px; padding: 8px; border: 1px solid rgba(173,111,134,.15); border-radius: 14px; background: linear-gradient(100deg,rgba(255,248,243,.94),rgba(252,247,255,.88)); }.gift-result-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }.gift-result-lyrics { display: block; max-width: 700px; margin: 45px 0 0; padding: 0; border: 0; background: transparent; color: #604e59; font-family: Manrope,Arial,sans-serif; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }.gift-result-lyrics::before { display: block; margin-bottom: 17px; color: var(--aurora-ink); font-family: "Playfair Display",Georgia,serif; font-size: 32px; font-weight: 600; line-height: 1.1; content: "Текст песни"; }
.gift-result-card--empty { min-height: 430px; }.gift-result-card--empty .gift-result-card__cover { top: 46px; }.gift-result-card--empty h1 { max-width: 490px; }

@keyframes aurora-pulse { 0%,100% { transform: scale(.96); box-shadow: 0 0 0 12px rgba(255,172,157,.07),0 0 30px rgba(225,139,184,.17); } 50% { transform: scale(1.03); box-shadow: 0 0 0 18px rgba(255,172,157,.03),0 0 38px rgba(225,139,184,.3); } }
@media (max-width: 760px) { .gift-wizard-screen[data-gift-screen="lyrics-loading"] { min-height: 260px; }.gift-package-choice-grid { grid-template-columns: 1fr; }.gift-package-choice__body { min-height: 112px; padding: 19px 18px; }.gift-commercial-summary { grid-template-columns: 1fr; padding: 22px 19px; }.gift-commercial-summary ul { grid-template-columns: 1fr; }.gift-lyrics-options { grid-template-columns: 1fr; }.gift-lyrics-option { min-height: 320px; padding: 23px 20px 20px; }.gift-lyrics-option pre { font-size: 14px; }.gift-lyrics-editor { min-height: 390px !important; font-size: 14px !important; }.gift-result-card { min-height: 0; }.gift-result-card__cover { position: relative; top: auto; right: auto; width: 166px; height: 166px; margin: 27px 0 10px; }.gift-result-card h1 { font-size: 42px; }.gift-result-card--empty .gift-result-card__cover { top: auto; }.gift-result-lyrics { margin-top: 36px; font-size: 14px; }.gift-result-lyrics::before { font-size: 29px; } }
@media (prefers-reduced-motion: reduce) { .gift-wizard-screen[data-gift-screen="lyrics-loading"]::before { animation: none; } }

/* Finished-song presentation shell: native audio remains untouched and accessible. */
.gift-result-card h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.gift-result-title-icon { display: inline-flex; width: 23px; height: 23px; flex: 0 0 auto; color: #d66c87; }
.gift-result-title-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.55; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gift-result-card__cover strong svg { width: 37px; height: 37px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gift-result-player { width: min(570px,100%); margin-top: 29px; padding: 14px 15px 12px; border: 1px solid rgba(173,111,134,.15); border-radius: 18px; background: linear-gradient(105deg,rgba(255,248,243,.96),rgba(255,249,252,.94) 54%,rgba(249,244,255,.92)); box-shadow: 0 10px 24px rgba(153,91,114,.06); }
.gift-result-player__wave { display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 4px; }
.gift-result-player__wave i { width: 3px; height: 9px; flex: 0 0 3px; border-radius: 20px; background: linear-gradient(180deg,#ff8a73,#f55779 64%,#c99deb); }
.gift-result-player__wave i:nth-child(2n) { height: 17px; }.gift-result-player__wave i:nth-child(3n) { height: 25px; }.gift-result-player__wave i:nth-child(5n) { height: 13px; }.gift-result-player__wave i:nth-child(7n) { height: 20px; }
.gift-result-player .gift-result-audio { width: 100%; margin-top: 8px; padding: 0; border: 0; border-radius: 10px; background: transparent; }
.gift-result-player + .gift-result-actions { margin-top: 18px; }

@media (max-width: 760px) {
  .gift-result-title-icon { width: 20px; height: 20px; }
  .gift-result-player { width: 100%; margin-top: 24px; padding: 12px; border-radius: 15px; }
  .gift-result-player + .gift-result-actions { display: grid; grid-template-columns: 1fr; margin-top: 16px; }
  .gift-result-player + .gift-result-actions .gift-button { width: 100%; }
}

/* Commercial result: a finished gift, not a technical task response. */
.gift-result-card--ready { overflow: hidden; max-width: 1040px; padding: 54px; }
.gift-result-card--ready::before { right: -150px; top: -190px; opacity: .7; }
.gift-result-ready__header { max-width: 720px; }
.gift-result-ready__header h1 { display: block; max-width: 720px; margin-top: 14px; overflow-wrap: anywhere; }
.gift-result-ready__header > p:last-child { margin-top: 14px; color: #76616c; font-size: 16px; line-height: 1.65; }
.gift-result-ready__media { display: grid; grid-template-columns: 230px minmax(0,1fr); align-items: end; gap: 28px; margin-top: 35px; }
.gift-result-card--ready .gift-result-card__cover { position: relative; top: auto; right: auto; width: 230px; height: 230px; overflow: hidden; padding: 27px; }
.gift-result-card__cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gift-result-card__cover:has(.gift-result-card__cover-image)::after { position: absolute; inset: 40% 0 0; background: linear-gradient(transparent,rgba(71,35,52,.54)); content: ""; }
.gift-result-card__cover:has(.gift-result-card__cover-image) strong { align-self: end; text-shadow: 0 2px 12px rgba(64,29,44,.38); }
.gift-result-card--ready .gift-result-player { width: 100%; margin-top: 0; }
.gift-result-lyrics-block { max-width: 760px; margin-top: 33px; border-top: 1px solid rgba(128,94,109,.12); border-bottom: 1px solid rgba(128,94,109,.12); }
.gift-result-lyrics-block summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 2px; color: var(--aurora-ink); cursor: pointer; font-family: "Playfair Display",Georgia,serif; font-size: 27px; font-weight: 600; list-style: none; }
.gift-result-lyrics-block summary::-webkit-details-marker { display: none; }
.gift-result-lyrics-block summary span { color: #b85c75; font-family: Manrope,Arial,sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.gift-result-lyrics-block[open] summary span { font-size: 0; }
.gift-result-lyrics-block[open] summary span::after { font-size: 11px; content: "Скрыть"; }
.gift-result-lyrics-block .gift-result-lyrics { margin: 0; padding: 4px 2px 28px; }
.gift-result-lyrics-block .gift-result-lyrics::before { display: none; }
.gift-result-actions--primary { margin-top: 25px; }
.gift-result-gifting { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(128,94,109,.12); }
.gift-result-gifting__head { display: flex; align-items: end; flex-wrap: wrap; gap: 9px 28px; }
.gift-result-gifting__head .gift-eyebrow { width: 100%; }
.gift-result-gifting__head h2 { flex: 1; font-size: clamp(36px,4.1vw,49px); line-height: 1.04; }
.gift-result-gifting__actions { flex: 0 0 auto; }
.gift-result-clip-offer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 28px; margin-top: 28px; padding: 31px 33px; border: 1px solid rgba(207,116,139,.17); border-radius: 19px; background: radial-gradient(circle at 88% 15%,rgba(225,201,251,.42),transparent 33%),linear-gradient(125deg,#fff6ef,#fff9f7 56%,#f8f1ff); box-shadow: 0 12px 27px rgba(134,82,102,.06); }
.gift-result-clip-offer h3 { max-width: 680px; margin-top: 10px; font-family: "Playfair Display",Georgia,serif; font-size: clamp(29px,3.3vw,40px); font-weight: 600; line-height: 1.08; }
.gift-result-clip-offer div > p:last-child { max-width: 680px; margin-top: 13px; color: #76616c; font-size: 13px; line-height: 1.7; }
.gift-result-clip-offer .gift-button { min-width: 150px; }

@media (max-width: 760px) {
  .gift-commercial-summary { grid-template-columns: 1fr; gap: 18px; padding: 22px 20px; }
  .gift-commercial-summary ul { grid-template-columns: 1fr 1fr; }
  .gift-result-card--ready { padding: 30px 20px; }
  .gift-result-ready__header h1 { font-size: clamp(39px,11vw,48px); }
  .gift-result-ready__header > p:last-child { font-size: 14px; }
  .gift-result-ready__media { grid-template-columns: 1fr; gap: 18px; margin-top: 27px; }
  .gift-result-card--ready .gift-result-card__cover { width: min(210px,70vw); height: min(210px,70vw); margin: 0; }
  .gift-result-card--ready .gift-result-player { margin-top: 0; }
  .gift-result-actions--primary { display: grid; grid-template-columns: 1fr; }
  .gift-result-actions--primary .gift-button { width: 100%; }
  .gift-result-gifting { margin-top: 39px; padding-top: 31px; }
  .gift-result-gifting__head { display: block; }
  .gift-result-gifting__head h2 { font-size: 38px; }
  .gift-result-gifting__actions { margin-top: 18px; }
  .gift-result-gifting__actions .gift-button { width: 100%; }
  .gift-result-clip-offer { grid-template-columns: 1fr; align-items: start; gap: 22px; padding: 25px 21px; }
  .gift-result-clip-offer h3 { font-size: 31px; }
  .gift-result-clip-offer .gift-button { width: 100%; }
}

@media (max-width: 430px) {
  .gift-commercial-summary ul { grid-template-columns: 1fr; }
  .gift-commercial-summary__price { align-items: baseline; }
  .gift-result-ready__header h1 { font-size: 39px; }
  .gift-result-lyrics-block summary { font-size: 25px; }
  .gift-result-gifting__head h2 { font-size: 35px; }
  .gift-result-clip-offer h3 { font-size: 29px; }
}

/* Stage 5.10: the finished-song waveform follows native audio playback. */
.gift-result-player.is-playing .gift-result-player__wave i {
  animation: gift-result-wave-live .88s ease-in-out infinite;
  transform-origin: center;
}

.gift-result-player.is-playing .gift-result-player__wave i:nth-child(2n) { animation-delay: -.2s; }
.gift-result-player.is-playing .gift-result-player__wave i:nth-child(3n) { animation-delay: -.42s; }

@keyframes gift-result-wave-live {
  0%,100% { opacity: .7; transform: scaleY(.68); }
  42% { opacity: 1; transform: scaleY(1.16); }
  74% { opacity: .86; transform: scaleY(.9); }
}

@media (prefers-reduced-motion: reduce) {
  .gift-result-player.is-playing .gift-result-player__wave i {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
