* {
    box-sizing: border-box;
}

:root {
    --font-soft: "Trebuchet MS", "Segoe UI Rounded", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-soft);
    font-weight: 500;
    line-height: 1.55;
    background: #fff0f5;
    color: #333;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: auto;
}

h1,
h2,
h3,
button,
input,
textarea,
select {
    font-family: inherit;
}

textarea,
select {
    width: 100%;
    border: 1px solid #ffd1dc;
    border-radius: 16px;
    background: #fff7fa;
    color: #333;
    font: inherit;
    outline: none;
}

textarea {
    min-height: 112px;
    padding: 14px 16px;
    resize: none;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #d79aae #fff7fa;
}

textarea::-webkit-scrollbar,
.card::-webkit-scrollbar,
.payment-card::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

textarea::-webkit-scrollbar-track,
.card::-webkit-scrollbar-track,
.payment-card::-webkit-scrollbar-track {
    background: #fff7fa;
    border-radius: 999px;
}

textarea::-webkit-scrollbar-thumb,
.card::-webkit-scrollbar-thumb,
.payment-card::-webkit-scrollbar-thumb {
    background: #d79aae;
    border-radius: 999px;
    border: 2px solid #fff7fa;
}

textarea::-webkit-resizer {
    display: none;
}

textarea:focus,
select:focus {
    border-color: #ff6f91;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 111, 145, 0.14);
}

.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ffb6c1, #ffc0cb);
    color: white;
}

.hero,
.about,
.contact,
.materials,
.services-nav,
.viewer-section {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    min-width: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    background: #f35e8a; /* admin-button-color */
    color: white;
    border-radius: 12px;
    text-decoration: none;
    margin: 5px;
    border: 0;
    transition: 0.3s;
    font-weight: 700;
    text-align: center;
}

.btn:hover {
    background: #6f243b; /* admin-button-hover-color */
    transform: scale(1.05);
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f35e8a; /* admin-button-color */
}

.btn-secondary:hover {
    background: #6f243b; /* admin-button-hover-color */
}

.admin-pencil {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f35e8a; /* admin-button-color */
    color: #fff;
    text-decoration: none;
    font-family: var(--font-soft);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.admin-pencil:hover {
    background: #6f243b; /* admin-button-hover-color */
    transform: translateY(-1px);
}

.hero-actions,
.photo-button,
.viewer-actions,
.nav-card,
.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}

.hero-actions {
    margin-top: 18px;
}

.hero-actions .btn {
    min-width: min(340px, 100%);
    padding: 16px 34px;
    font-size: 18px;
    border-radius: 16px;
}

.photo-button {
    margin-top: 24px;
}

.btn-services {
    min-width: 0;
    width: auto;
    padding: 14px 24px;
    font-size: 19px;
    border-radius: 16px;
}

.btn-with-icon {
    gap: 8px;
    padding-left: 14px;
}

.button-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.photo {
    --photo-size: min(260px, 70vw);
    display: block;
    width: var(--photo-size);
    height: var(--photo-size);
    margin: 20px auto 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    border: 6px solid #fff0f5;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.materials-note {
    margin: 0 0 18px;
    text-align: center;
    font-size: 18px;
}

.materials-grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin-top: 25px;
}

.material,
.service-card {
    background: #fff5f8;
    border: 1px solid #ffd1dc;
    border-radius: 14px;
    padding: 18px;
    transition: 0.2s;
}

.material:hover,
.service-card:hover,
.consult-card:hover {
    transform: translateY(-3px);
    background: #ffe1ea;
}

.material h3,
.service-card h3,
.consult-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.material-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.material-buttons .btn {
    margin: 0;
}

.label-paid {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    background: #fff0d9;
    color: #a96700;
    margin-bottom: 8px;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: #ff4d7a;
    margin: 8px 0 12px;
}

.muted {
    color: #666;
}

.strong-line {
    font-weight: bold;
}

.consult-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 25px;
}

.consult-card {
    background: #fff5f8;
    border: 1px solid #ffd1dc;
    border-radius: 18px;
    overflow: hidden;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.consult-content {
    padding: 18px;
}

.service-image {
    display: block;
    width: calc(100% - 28px);
    height: auto;
    max-height: none;
    margin: 14px auto 0;
    border-radius: 14px;
    background: transparent;
}

.viewer-frame,
.pdf-viewer {
    width: 100%;
    height: 82vh;
    min-height: 620px;
    border: 0;
    border-radius: 16px;
    background: #fff7fa;
    box-shadow: inset 0 0 0 1px #ffd1dc;
}

.viewer-text h2 {
    text-align: center;
    margin-top: 0;
}

.viewer-actions {
    margin-top: 18px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #777;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    margin: 0 10px;
    color: #ff6f91;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.disclaimer {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.disclaimer .card {
    font-size: 14px;
    color: #666;
    background: #fff7fa;
    border: 1px solid #ffd1dc;
}

[hidden] {
    display: none !important;
}

.payment-access .payment-card {
    max-width: 780px;
}

.payment-card h2 {
    margin-top: 0;
}

.payment-state {
    margin: 16px 0;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #ffd1dc;
    background: #fff7fa;
}

.payment-state p {
    margin: 8px 0 0;
}

.payment-state-success {
    border-color: #bce6c8;
    background: #edf9f1;
    color: #276738;
}

.payment-state-pending {
    border-color: #ffe0a6;
    background: #fff8e8;
    color: #785600;
}

.payment-state-warning {
    border-color: #ffc6c6;
    background: #fff0f0;
    color: #9b2c2c;
}

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
}

.payment-actions .btn {
    margin: 0;
    flex: 1 1 170px;
}

.payment-actions-secondary {
    margin-bottom: 0;
}

.payment-confirm .payment-card {
    max-width: 760px;
}

.payment-confirm-form {
    display: grid;
    gap: 18px;
}

.payment-methods {
    display: grid;
    gap: 12px;
}

.payment-method {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid #ffd1dc;
    border-radius: 14px;
    background: #fff7fa;
    cursor: pointer;
}

.payment-method input {
    width: 18px;
    height: 18px;
    accent-color: #8b2f4a;
}

.payment-method span {
    display: grid;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.payment-method strong {
    font-size: 17px;
    line-height: 1.25;
}

.payment-method-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
}

.payment-icon-sbp {
    background: linear-gradient(135deg, #1aa2e8, #6cc24a 52%, #f15a24);
}

.payment-icon-sberpay {
    background: #159947;
}

.payment-method em {
    color: #666;
    font-style: normal;
    font-weight: 700;
    line-height: 1.3;
}

.payment-method-disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.payment-method-disabled input {
    cursor: not-allowed;
}

.payment-terms {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #fff7fa;
    border: 1px solid #ffd1dc;
}

.payment-terms label {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.payment-terms input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #8b2f4a;
}

.payment-terms a {
    color: #8b2f4a;
    font-weight: 800;
}

@media (max-width: 700px) {
    .payment-method {
        padding: 14px;
        grid-template-columns: 20px minmax(0, 1fr);
        align-items: start;
    }

    .payment-method strong {
        font-size: 16px;
    }

    .payment-terms {
        padding: 12px;
    }
}

.secret-panel {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #ffd1dc;
}

.secret-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.help-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f35e8a; /* admin-button-color */
    color: white;
    font-size: 15px;
    font-weight: 800;
    cursor: help;
}

.help-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 10;
    width: min(340px, 82vw);
    padding: 12px 14px;
    border-radius: 12px;
    background: #333;
    color: white;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.help-badge:hover::after,
.help-badge:focus::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.secret-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.secret-row code {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #ffd1dc;
    background: #fff7fa;
    color: #333;
    font-size: 18px;
    font-weight: 800;
    word-break: break-word;
}

.secret-row .btn {
    margin: 0;
}

.bot-instruction {
    margin: 0;
    color: #555;
    line-height: 1.55;
}

.bot-instruction a {
    color: #ff4d7a;
    font-weight: 800;
}

.bot-beta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    vertical-align: middle;
    white-space: nowrap;
}

.bot-beta-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(139, 47, 74, 0.12);
    color: #6f243b;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.bot-beta .help-badge {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    font-size: 13px;
}

.bot-beta .help-badge::after {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 18px !important;
    z-index: 10000;
    width: min(360px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    transform: translateX(-50%) translateY(8px) !important;
}

.bot-beta .help-badge:hover::after,
.bot-beta .help-badge:focus::after {
    transform: translateX(-50%) translateY(0) !important;
}

@media (max-width: 700px) {
    .hero,
    .about,
    .contact,
    .materials,
    .services-nav,
    .viewer-section,
    .disclaimer {
        padding: 14px;
    }

    .card {
        padding: 18px;
    }

    .materials-grid,
    .services-grid,
    .consult-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .btn {
        width: 100%;
        margin: 0;
    }

    .hero-actions .btn,
    .btn-services {
        width: 100%;
        min-width: 0;
        font-size: 17px;
    }

    .material-buttons,
    .buttons,
    .hero-actions,
    .photo-button,
    .viewer-actions,
    .nav-card {
        align-items: stretch;
    }

    .service-image {
        width: calc(100% - 28px);
        height: auto;
        max-height: none;
    }

    .viewer-frame,
    .pdf-viewer {
        height: 75vh;
        min-height: 520px;
        border-radius: 12px;
    }

    .footer-links a {
        display: block;
        margin: 8px 0;
    }

    .payment-actions,
    .secret-row {
        align-items: stretch;
        flex-direction: column;
    }

    .secret-row .btn {
        width: 100%;
    }

    .help-badge::after {
        left: auto;
        right: -12px;
        transform: translateY(4px);
    }

    .help-badge:hover::after,
    .help-badge:focus::after {
        transform: translateY(0);
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .consult-grid {
        grid-template-columns: 1fr 1fr;
    }
}


.social-buttons {
    margin-top: 18px;
}

/* Фото консультаций полностью, без обрезки. */
.service-image {
    display: block;
    width: calc(100% - 28px);
    height: auto;
    max-height: none;
    margin: 14px auto 0;
    border-radius: 14px;
    background: transparent;
}

@media (max-width: 700px) {
    .service-image {
        width: calc(100% - 28px);
        height: auto;
        max-height: none;
    }
}


/* Страница заявки */
.application-section {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

.application-card {
    max-width: 760px;
}

.application-form {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.form-row {
    display: grid;
    gap: 8px;
}

.form-row label,
.form-title {
    font-weight: 700;
    color: #333;
}

.form-row input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ffd1dc;
    border-radius: 14px;
    background: #fff7fa;
    color: #333;
    font: inherit;
    outline: none;
}

.form-row input:focus {
    border-color: #ff6f91;
    box-shadow: 0 0 0 3px rgba(255, 111, 145, 0.16);
    background: #fff;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.type-grid {
    grid-template-columns: 1fr;
}

.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 14px 16px;
    border: 1px solid #ffd1dc;
    border-radius: 16px;
    background: #fff7fa;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.choice-card:hover {
    border-color: #ff9aae;
    background: #fff0f5;
    transform: translateY(-2px);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card:has(input:checked) {
    border-color: #ff6f91;
    background: #ffe1ea;
    box-shadow: 0 8px 18px rgba(255, 111, 145, 0.16);
}

.choice-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
}

.choice-emoji {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.type-info {
    display: grid;
    gap: 4px;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
}

.type-price {
    color: #ff4d7a;
    font-weight: 800;
}

.form-message {
    display: none;
    padding: 14px 16px;
    border-radius: 14px;
    margin-top: 18px;
    font-weight: 700;
    text-align: center;
}

.form-message.success {
    display: block;
    background: #edf9f1;
    border: 1px solid #bce6c8;
    color: #276738;
}

.form-message.error {
    display: block;
    background: #fff0f0;
    border: 1px solid #ffc6c6;
    color: #9b2c2c;
}

.form-actions {
    margin-top: 6px;
    display: flex;
    justify-content: center;
}

.form-actions .btn {
    min-width: min(360px, 100%);
    padding: 16px 28px;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 700px) {
    .application-section {
        padding: 14px;
    }

    .buttons,
    .hero-actions,
    .photo-button,
    .viewer-actions,
    .nav-card,
    .payment-actions,
    .form-actions {
        gap: 14px;
    }

    .buttons .btn,
    .hero-actions .btn,
    .photo-button .btn,
    .viewer-actions .btn,
    .nav-card .btn,
    .payment-actions .btn,
    .form-actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 50px;
        margin: 0;
        padding: 14px 16px;
        white-space: normal;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .choice-card {
        align-items: flex-start;
        min-height: 0;
        text-align: left;
        white-space: normal;
    }

    .form-actions .btn {
        width: 100%;
    }

    .payment-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .payment-actions .btn,
    .form-actions .btn,
    .payment-card > form[action="/admin/rollback"] .btn,
    .payment-card > form[action="/admin/logout"] .btn {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 14px 16px;
        font-size: 16px;
        white-space: normal;
        flex-basis: auto;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .payment-card > form[action="/admin/rollback"],
    .payment-card > form[action="/admin/logout"] {
        display: grid;
        margin-top: 10px;
    }
}

/* Заявка на консультацию */
.zayavka-section {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

.zayavka-card {
    max-width: 780px;
    border: 1px solid #ffd1dc;
}

.zayavka-head {
    text-align: center;
    margin-bottom: 20px;
}

.zayavka-head h2 {
    margin: 10px 0 8px;
    font-size: 30px;
}

.zayavka-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff0f5;
    color: #ff4d7a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.zayavka-form {
    display: grid;
    gap: 22px;
}

.zayavka-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.z-field {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.z-field-full {
    grid-column: 1 / -1;
}

.z-field input,
.z-field textarea,
.z-field select {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid #ffd1dc;
    border-radius: 16px;
    background: #fff7fa;
    color: #333;
    font: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.z-field textarea {
    min-height: 118px;
    resize: none;
    overflow: auto;
}

.z-field input[type="color"] {
    justify-self: start;
    width: 76px;
    height: 46px;
    min-height: 46px;
    padding: 4px;
    cursor: pointer;
}

.z-field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.z-field input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 10px;
}

.z-field input:focus,
.z-field textarea:focus,
.z-field select:focus {
    border-color: #ff6f91;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 111, 145, 0.14);
}

.z-group {
    display: grid;
    gap: 10px;
}

.z-group-title {
    font-weight: 800;
    color: #333;
}

.z-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.z-type-grid {
    display: grid;
    gap: 12px;
}

.z-choice {
    position: relative;
    display: block;
    cursor: pointer;
}

.z-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.z-choice-body,
.z-type-body {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 62px;
    padding: 14px 16px;
    border: 1px solid #ffd1dc;
    border-radius: 18px;
    background: #fff7fa;
    color: #333;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.2s;
}

.z-choice-body {
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.z-type-body {
    justify-content: space-between;
    gap: 14px;
}

.z-choice:hover .z-choice-body,
.z-choice:hover .z-type-body {
    border-color: #ff9aae;
    background: #fff0f5;
    transform: translateY(-1px);
}

.z-choice-input:checked + .z-choice-body,
.z-choice-input:checked + .z-type-body {
    border-color: #ff6f91;
    background: #ffe1ea;
    box-shadow: 0 10px 22px rgba(255, 111, 145, 0.15);
}

.z-choice-icon {
    display: block;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain;
    border-radius: 7px;
    flex: 0 0 24px;
}

.z-choice-sms {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 24px;
    border-radius: 999px;
    background: #ff6f91;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 34px;
}

.z-type-name,
.z-type-price {
    display: block;
}

.z-type-price {
    color: #ff4d7a;
    font-weight: 900;
    white-space: nowrap;
}

.z-submit-row {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.z-submit {
    width: min(380px, 100%);
    min-height: 56px;
    font-size: 18px;
    cursor: pointer;
}

.zayavka-message {
    display: none;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    text-align: center;
    font-weight: 800;
}

.zayavka-message.is-visible {
    display: block;
}

.zayavka-message-success {
    background: #edf9f1;
    border: 1px solid #bce6c8;
    color: #276738;
}

.zayavka-message-error {
    background: #fff0f0;
    border: 1px solid #ffc6c6;
    color: #9b2c2c;
}

@media (max-width: 700px) {
    .zayavka-section {
        padding: 14px;
    }

    .zayavka-head h2 {
        font-size: 25px;
    }

    .zayavka-fields,
    .z-choice-grid {
        grid-template-columns: 1fr;
    }

    .z-type-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .z-type-price {
        white-space: normal;
    }

    .z-submit {
        width: 100%;
    }
}

/* Dev main-page animation experiments
   v0.2.4: на touch/mobile возвращено лёгкое появление без scale/hover-transform,
   чтобы анимации были видны, но скролл на iPhone не залипал. */
html,
body {
    -webkit-overflow-scrolling: touch;
}

body {
    touch-action: auto;
}

@media (prefers-reduced-motion: no-preference) {
    html.reveal-ready .scroll-reveal {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.46s ease-out, transform 0.46s ease-out;
    }

    html.reveal-ready .scroll-reveal.is-visible {
        opacity: 1;
        transform: none;
    }

    .header {
        animation: devHeaderFadeSoft 0.58s ease-out both;
    }

    @keyframes devHeaderFadeSoft {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) and (min-width: 701px) {
    html.reveal-ready .scroll-reveal {
        transform: translateY(22px);
        transition: opacity 0.62s ease, transform 0.62s ease;
    }

    html.reveal-ready .scroll-reveal.is-visible {
        transform: translateY(0);
    }

    .card {
        transition: box-shadow 0.24s ease;
    }

    .card:hover {
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.11);
    }

    .btn {
        position: relative;
        overflow: hidden;
    }

    .btn::after {
        content: "";
        position: absolute;
        top: 0;
        left: -80%;
        width: 45%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
        transform: skewX(-18deg);
        transition: left 0.45s ease;
        pointer-events: none;
    }

    .btn:hover::after {
        left: 120%;
    }
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
    html,
    body {
        overflow-x: clip;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    html.reveal-ready .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }

    html.reveal-ready .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .btn:hover,
    .btn-secondary:hover,
    .material:hover,
    .service-card:hover,
    .consult-card:hover,
    .choice-card:hover,
    .z-choice:hover .z-choice-body,
    .z-choice:hover .z-type-body,
    .card:hover {
        transform: none;
    }

    .btn::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.reveal-ready .scroll-reveal,
    html.reveal-ready .scroll-reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .header {
        animation: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .header h1,
    .header p {
        animation: softRiseIn 0.52s ease both;
    }

    .header p {
        animation-delay: 0.08s;
    }

    .card,
    .consult-card,
    .service-card,
    .material,
    .choice-card,
    .z-choice-body,
    .z-type-body,
    .payment-state,
    .secret-panel {
        animation: softFadeIn 0.42s ease both;
    }

    .consult-grid > *:nth-child(2),
    .services-grid > *:nth-child(2),
    .materials-grid > *:nth-child(2),
    .z-choice-grid > *:nth-child(2) .z-choice-body,
    .choice-grid > *:nth-child(2) {
        animation-delay: 0.06s;
    }

    .consult-grid > *:nth-child(3),
    .services-grid > *:nth-child(3),
    .materials-grid > *:nth-child(3),
    .z-choice-grid > *:nth-child(3) .z-choice-body,
    .choice-grid > *:nth-child(3) {
        animation-delay: 0.12s;
    }

    .photo,
    .service-image,
    .button-icon {
        animation: softMediaIn 0.5s ease both;
    }

    .price,
    .label-paid,
    .zayavka-badge {
        animation: softPopIn 0.38s ease both;
    }

    .payment-state-success {
        animation: softSuccessIn 0.56s ease both;
    }

    @keyframes softFadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes softRiseIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes softMediaIn {
        from {
            opacity: 0;
            transform: translateY(8px) scale(0.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes softPopIn {
        from {
            opacity: 0;
            transform: scale(0.96);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    @keyframes softSuccessIn {
        0% {
            opacity: 0;
            transform: translateY(8px);
        }
        70% {
            opacity: 1;
            transform: translateY(0);
            box-shadow: 0 0 0 5px rgba(83, 180, 110, 0.12);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
            box-shadow: none;
        }
    }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) and (min-width: 701px) {
    .photo,
    .service-image,
    .button-icon,
    .help-badge {
        transition: transform 0.22s ease, box-shadow 0.22s ease;
    }

    .photo:hover,
    .service-image:hover {
        transform: translateY(-2px) scale(1.015);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
    }

    .button-icon:hover,
    .help-badge:hover {
        transform: translateY(-1px) scale(1.06);
    }
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
    .header,
    .header h1,
    .header p,
    .card,
    .consult-card,
    .service-card,
    .material,
    .choice-card,
    .z-choice-body,
    .z-type-body,
    .payment-state,
    .secret-panel {
        animation: none;
        transform: none;
        will-change: auto;
    }

    .photo,
    .service-image,
    .button-icon,
    .price,
    .label-paid,
    .zayavka-badge {
        animation: none;
        will-change: auto;
    }

    .admin-pencil {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

@supports (-webkit-touch-callout: none) {
    @media (hover: none), (pointer: coarse), (max-width: 900px) {
        html.reveal-ready .scroll-reveal,
        html.reveal-ready .scroll-reveal.is-visible {
            opacity: 1;
            transform: none;
            transition: none;
        }

        .header,
        .card,
        .consult-card,
        .service-card,
        .material,
        .payment-state,
        .secret-panel {
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .header h1,
    .header p,
    .card,
    .consult-card,
    .service-card,
    .material,
    .choice-card,
    .z-choice-body,
    .z-type-body,
    .payment-state,
    .secret-panel,
    .photo,
    .service-image,
    .button-icon,
    .price,
    .label-paid,
    .zayavka-badge {
        animation: none;
    }
}

/* Legal document pages */
.legal-page {
    background: #fff0f5;
}

.legal-header {
    padding: 34px 18px;
}

.legal-header h1 {
    margin: 0 0 8px;
}

.legal-header p {
    max-width: 840px;
    margin: 0 auto;
}

.legal-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 22px;
}

.legal-card {
    max-width: 980px;
    line-height: 1.7;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: #666;
    font-size: 14px;
    font-weight: 700;
}

.legal-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff7fa;
    border: 1px solid #ffd1dc;
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 28px;
}

.legal-actions .btn {
    margin: 0;
}

.legal-actions-bottom {
    margin-top: 30px;
    margin-bottom: 0;
}

.legal-section-block {
    padding: 20px 0;
    border-top: 1px solid #f2d3dc;
}

.legal-section-block h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.legal-section-block p {
    margin: 9px 0;
}

.legal-details {
    border-bottom: 1px solid #f2d3dc;
}

.legal-details a {
    color: #8b2f4a;
    font-weight: 800;
}

@media (max-width: 700px) {
    .legal-header {
        padding: 28px 14px;
    }

    .legal-header h1 {
        font-size: 28px;
    }

    .legal-container {
        padding: 14px;
    }

    .legal-card {
        padding: 18px;
    }

    .legal-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .legal-actions .btn {
        width: 100%;
        min-height: 50px;
    }

    .legal-section-block {
        padding: 18px 0;
    }

    .legal-section-block h2 {
        font-size: 20px;
    }
}
