:root {
    --ink: #0d1830;
    --muted: #65748c;
    --line: #dfe7f1;
    --paper: #ffffff;
    --canvas: #eef3f9;
    --blue: #1267f4;
    --blue-dark: #0748ba;
    --blue-soft: #e8f1ff;
    --mint: #ccefe4;
    --yellow: #ffe89a;
    --rose: #ffd8df;
    --danger: #be334d;
    --radius: 28px;
    color-scheme: light;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.bouquet-app { width: min(1120px, 100%); min-height: 100dvh; margin: 0 auto; padding: 22px 22px calc(118px + env(safe-area-inset-bottom)); }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: #fff; background: var(--blue); font-size: 14px; font-weight: 900; letter-spacing: -.04em; }
.brand span:last-child { display: grid; gap: 2px; }
.brand b { font-size: 15px; }
.brand small { color: var(--muted); font-size: 12px; }
.gift-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--muted); font-size: 13px; font-weight: 750; }
.gift-chip i { width: 8px; height: 8px; border-radius: 50%; background: #18b882; box-shadow: 0 0 0 5px #e3f8f1; }

.app-view { animation: view-in .42s cubic-bezier(.2,.7,.2,1); }
.eyebrow { display: inline-block; color: var(--blue); font-size: 12px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.intro-copy h1, .view-heading h2, .help-card h2 { margin: 9px 0 13px; font-size: clamp(38px, 6vw, 74px); line-height: .98; letter-spacing: -.055em; }
.intro-copy > p, .view-heading > p, .help-card > p { max-width: 590px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.rate-layout { display: grid; grid-template-columns: minmax(0, .84fr) minmax(420px, 1.16fr); align-items: center; gap: 62px; min-height: 570px; }
.care-shortcut { display: grid; gap: 4px; width: min(360px, 100%); margin-top: 30px; padding: 19px 21px; border: 0; border-radius: 22px; background: var(--paper); text-align: left; cursor: pointer; }
.care-shortcut span { color: var(--muted); font-size: 12px; }
.care-shortcut b { font-size: 15px; }

.rating-deck { position: relative; height: 540px; perspective: 1100px; touch-action: pan-y; cursor: grab; user-select: none; }
.rating-deck.is-dragging { cursor: grabbing; }
.rating-card { position: absolute; inset: 0 0 auto; display: grid; align-content: space-between; width: 100%; height: 390px; padding: 28px; border: 0; border-radius: 36px; text-align: left; cursor: inherit; transition: transform .48s cubic-bezier(.2,.78,.22,1), opacity .35s, filter .35s; box-shadow: 0 22px 50px rgba(24,43,75,.12); transform-origin: center bottom; }
.rating-card.deck-slot-0, .rating-deck:not(.is-ready) .rating-card:nth-child(1) { z-index: 3; transform: translateY(0) rotate(-1deg); }
.rating-card.deck-slot-1, .rating-deck:not(.is-ready) .rating-card:nth-child(2) { z-index: 2; transform: translate(24px, 72px) rotate(1.4deg) scale(.975); }
.rating-card.deck-slot-2, .rating-deck:not(.is-ready) .rating-card:nth-child(3) { z-index: 1; transform: translate(-24px, 142px) rotate(-1.4deg) scale(.95); }
.rating-card.deck-slot-1 strong, .rating-card.deck-slot-2 strong { position: absolute; left: 30px; right: 190px; bottom: 20px; overflow: hidden; font-size: 20px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.rating-card.deck-slot-1 small, .rating-card.deck-slot-2 small { display: none; }
.rating-card.deck-slot-1::after, .rating-card.deck-slot-2::after { content: "потяните, чтобы открыть"; position: absolute; right: 28px; bottom: 22px; padding-left: 15px; background: inherit; color: rgba(13,24,48,.58); font-size: 11px; font-weight: 750; }
.rating-card-love { background: #cfe9ff; }
.rating-card-good { background: var(--yellow); }
.rating-card-issue { background: var(--rose); }
.rating-card .card-number { color: rgba(13,24,48,.52); font-size: 14px; font-weight: 800; }
.rating-card i { place-self: center; display: grid; place-items: center; width: 112px; height: 112px; border: 2px solid rgba(13,24,48,.14); border-radius: 50%; font-size: 48px; font-style: normal; }
.rating-card strong { font-size: clamp(29px, 4vw, 47px); letter-spacing: -.045em; }
.rating-card small { margin-top: -8px; font-size: 14px; }
.rating-deck.has-selection .rating-card:not(.is-selected) { opacity: .34; filter: grayscale(.25); transform: translateY(48px) scale(.92); }
.rating-deck.has-selection .rating-card.is-selected { z-index: 6; transform: translateY(-12px) rotate(0) scale(1.02); }
.rating-card:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(18,103,244,.28); outline-offset: 3px; }
.swipe-hint { position: absolute; z-index: 8; top: -28px; right: 10px; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 800; }

.feedback-form { max-width: 880px; margin: 40px auto 0; padding: 34px; border-radius: var(--radius); background: var(--paper); scroll-margin-top: 20px; animation: rise .45s ease both; }
.form-heading { display: flex; align-items: center; gap: 16px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.form-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; border-radius: 20px; background: var(--blue-soft); color: var(--blue); font-size: 25px; }
.form-heading > span:last-child { display: grid; gap: 4px; }
.form-heading small { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.form-heading strong { font-size: 25px; letter-spacing: -.025em; }
fieldset { min-width: 0; }
.tag-fieldset { margin: 28px 0; padding: 0; border: 0; }
.tag-fieldset legend { margin-bottom: 13px; color: var(--muted); font-size: 13px; font-weight: 700; }
.tag-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-grid label { cursor: pointer; }
.tag-grid input { position: absolute; opacity: 0; pointer-events: none; }
.tag-grid span { display: inline-flex; min-height: 44px; align-items: center; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; font-size: 14px; font-weight: 750; transition: .2s ease; }
.tag-grid input:checked + span { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.issue-grid input:checked + span { border-color: var(--danger); color: var(--danger); background: #fff0f3; box-shadow: inset 0 0 0 1px var(--danger); }
.text-field { display: grid; gap: 9px; color: var(--muted); font-size: 13px; font-weight: 700; }
.text-field textarea, .text-field input { width: 100%; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; color: var(--ink); font-size: 16px; font-weight: 600; outline: none; }
.text-field textarea { min-height: 126px; padding: 16px 17px; resize: vertical; line-height: 1.5; }
.text-field input { height: 52px; padding: 0 16px; }
.text-field textarea:focus, .text-field input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(18,103,244,.09); }
.order-reference { margin: 18px 0 6px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 18px; }
.order-reference summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 750; }
.order-reference[open] summary { margin-bottom: 15px; }
.contact-offer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 18px; border-radius: 22px; background: var(--blue-soft); }
.contact-offer > div { display: flex; align-items: center; gap: 13px; }
.contact-offer > div > span:last-child { display: grid; gap: 3px; }
.contact-offer small { color: var(--muted); }
.contact-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: var(--blue); font-size: 20px; }
.contact-offer button { flex: 0 0 auto; min-height: 42px; padding: 0 15px; border: 0; border-radius: 14px; color: #fff; background: var(--blue); font-size: 13px; font-weight: 800; cursor: pointer; }
.contact-fields { padding: 20px 2px 2px; animation: rise .3s ease; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent-field { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.consent-field input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--blue); }
.form-error { margin-top: 18px; padding: 13px 15px; border-radius: 14px; color: #9c2039; background: #fff0f3; font-size: 14px; font-weight: 700; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 62px; margin-top: 24px; padding: 0 22px; border: 0; border-radius: 19px; color: #fff; background: var(--ink); font-weight: 850; cursor: pointer; transition: transform .2s, background .2s; }
.submit-button:hover { background: var(--blue); transform: translateY(-1px); }
.submit-button i { font-size: 24px; font-style: normal; }
.submit-button.is-loading { opacity: .65; pointer-events: none; }
.privacy-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.trap-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.view-heading { max-width: 790px; margin: 36px auto 28px; text-align: center; }
.view-heading h2, .help-card h2 { font-size: clamp(35px, 5vw, 62px); }
.view-heading > p { margin-inline: auto; }
.care-switch { display: grid; grid-template-columns: 1fr 1fr; max-width: 650px; margin: 0 auto 20px; padding: 5px; border-radius: 18px; background: #dfe7f1; }
.care-switch button { min-height: 48px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.care-switch button.is-active { color: #fff; background: var(--blue); }
.care-progress { display: flex; align-items: center; gap: 16px; max-width: 720px; margin: 0 auto 22px; color: var(--muted); font-size: 12px; font-weight: 750; }
.care-progress > i { flex: 1; height: 7px; overflow: hidden; border-radius: 999px; background: #dce5f0; }
.care-progress em { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .35s ease; }
.care-list { display: grid; gap: 10px; max-width: 720px; margin: auto; }
.care-step { position: relative; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 15px; min-height: 92px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); cursor: pointer; transition: border .2s, transform .2s; }
.care-step:hover { transform: translateY(-1px); }
.care-step input { position: absolute; inset: 0; opacity: 0; }
.step-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 900; }
.care-step > span:last-child { display: grid; gap: 5px; }
.care-step strong { font-size: 16px; }
.care-step small { color: var(--muted); line-height: 1.45; }
.care-step:has(input:checked) { border-color: #8ddcc2; background: #f3fcf9; }
.care-step:has(input:checked) .step-number { color: #087958; background: var(--mint); }
.care-step:has(input:checked) strong { text-decoration: line-through; text-decoration-color: #7ba99b; }
.care-note { display: flex; align-items: flex-start; gap: 13px; max-width: 720px; margin: 16px auto 0; padding: 18px; border-radius: 20px; background: #fff9df; }
.care-note > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; color: #8d6700; background: var(--yellow); font-weight: 900; }
.care-note p { margin: 0; color: #665a38; font-size: 13px; line-height: 1.5; }

.help-card { max-width: 760px; margin: 62px auto 18px; padding: 46px; border-radius: 36px; background: var(--paper); text-align: center; }
.help-symbol { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px; color: #fff; background: var(--blue); font-size: 28px; font-weight: 900; }
.help-card > p { margin-inline: auto; }
.help-card > button { display: inline-flex; align-items: center; gap: 30px; min-height: 54px; margin-top: 26px; padding: 0 20px; border: 0; border-radius: 17px; color: #fff; background: var(--ink); font-weight: 800; cursor: pointer; }
.help-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 920px; margin: auto; }
.help-points article { display: grid; gap: 8px; padding: 22px; border-radius: 22px; background: var(--paper); }
.help-points span { color: var(--muted); font-size: 13px; line-height: 1.5; }

.bottom-nav { position: fixed; z-index: 40; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); width: min(470px, calc(100% - 28px)); min-height: 70px; padding: 6px; border: 1px solid rgba(255,255,255,.13); border-radius: 24px; background: #0c172a; box-shadow: 0 16px 42px rgba(13,24,48,.24); transform: translateX(-50%); }
.bottom-nav button { display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 18px; color: #aeb9ca; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.bottom-nav button.is-active { color: #fff; background: var(--blue); }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.success-screen { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10,20,38,.72); backdrop-filter: blur(14px); }
.success-card { position: relative; z-index: 2; width: min(480px, 100%); padding: 38px; border-radius: 34px; background: var(--paper); text-align: center; animation: pop .5s cubic-bezier(.2,.9,.25,1.15); }
.success-check { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 20px; border-radius: 50%; color: #fff; background: #16a878; font-size: 35px; }
.success-card h2 { margin: 8px 0; font-size: 42px; letter-spacing: -.045em; }
.success-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.success-card button { width: 100%; min-height: 54px; margin-top: 23px; border: 0; border-radius: 17px; color: #fff; background: var(--blue); font-weight: 800; cursor: pointer; }
.success-card .success-close { min-height: auto; margin-top: 15px; color: var(--muted); background: transparent; font-size: 13px; }
.success-petals span { position: fixed; top: -50px; width: 16px; height: 25px; border-radius: 80% 15% 80% 15%; background: var(--rose); animation: petal-fall 3.2s ease-in forwards; }

@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { from { opacity: 0; transform: scale(.88) translateY(15px); } }
@keyframes petal-fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(600deg); } }

@media (max-width: 760px) {
    .bouquet-app { padding: 16px 14px calc(105px + env(safe-area-inset-bottom)); }
    .app-header { margin-bottom: 21px; }
    .brand-mark { width: 42px; height: 42px; border-radius: 14px; }
    .brand b { font-size: 13px; }
    .brand small { font-size: 10px; }
    .gift-chip { min-height: 35px; padding-inline: 11px; font-size: 10px; }
    .rate-layout { display: block; min-height: 0; }
    .intro-copy h1 { max-width: 330px; margin-top: 8px; font-size: clamp(43px, 13vw, 61px); }
    .intro-copy > p { font-size: 15px; line-height: 1.5; }
    .care-shortcut { margin-top: 18px; padding: 15px 17px; }
    .rating-deck { height: 460px; margin-top: 28px; }
    .rating-card { height: 312px; padding: 22px; border-radius: 29px; }
    .rating-card.deck-slot-0, .rating-deck:not(.is-ready) .rating-card:nth-child(1) { transform: translateY(0) rotate(-1deg); }
    .rating-card.deck-slot-1, .rating-deck:not(.is-ready) .rating-card:nth-child(2) { transform: translate(18px, 64px) rotate(1.4deg) scale(.975); }
    .rating-card.deck-slot-2, .rating-deck:not(.is-ready) .rating-card:nth-child(3) { transform: translate(-18px, 126px) rotate(-1.4deg) scale(.95); }
    .rating-card.deck-slot-1 strong, .rating-card.deck-slot-2 strong { left: 22px; right: 22px; bottom: 18px; font-size: 16px; }
    .rating-card.deck-slot-1::after, .rating-card.deck-slot-2::after { display: none; }
    .rating-card i { width: 82px; height: 82px; font-size: 36px; }
    .rating-card strong { font-size: 31px; }
    .rating-card small { font-size: 12px; }
    .feedback-form { margin-top: 22px; padding: 20px 16px; border-radius: 25px; }
    .form-heading strong { font-size: 20px; }
    .tag-grid { gap: 8px; }
    .tag-grid span { min-height: 42px; padding-inline: 13px; font-size: 13px; }
    .contact-offer { align-items: stretch; flex-direction: column; }
    .contact-offer button { width: 100%; }
    .field-row { grid-template-columns: 1fr; }
    .view-heading { margin-top: 20px; text-align: left; }
    .view-heading h2 { font-size: 41px; }
    .care-switch { margin-top: 20px; }
    .care-switch button { min-height: 45px; padding: 5px; font-size: 12px; }
    .care-step { grid-template-columns: 39px 1fr; min-height: 86px; padding: 13px; border-radius: 19px; }
    .step-number { width: 38px; height: 38px; }
    .care-step small { font-size: 12px; }
    .help-card { margin-top: 25px; padding: 30px 20px; border-radius: 28px; }
    .help-card h2 { font-size: 42px; }
    .help-card > p { font-size: 15px; }
    .help-points { grid-template-columns: 1fr; }
    .bottom-nav { min-height: 66px; border-radius: 22px; }
    .success-card { padding: 30px 21px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
