*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.view-page {
    max-width: 960px;
}

/* ===== Landing ===== */

.landing {
    background: #fff;
}

.hero {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: #fff;
    text-align: center;
    padding: 3.5rem 1.5rem 3rem;
}

.hero .container {
    max-width: 800px;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.hero-accent {
    color: #5dade2;
}

.hero-sub {
    font-size: 1.1rem;
    color: #b0c4d8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Upload section */

.upload-section {
    background: #f5f7fa;
    padding: 2.5rem 0;
}

.upload-section .container {
    max-width: 640px;
}

.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    margin-bottom: 1rem;
}

.upload-area.drag-over {
    border-color: #3498db;
    background: #ebf5fb;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.upload-area p {
    margin-bottom: 0.75rem;
    color: #7f8c8d;
}

.upload-area input[type="file"] {
    display: none;
}

.file-info {
    font-size: 0.9rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

.drawing-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.types-col {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #ecf0f1;
}

.types-col h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.types-good h3 { color: #27ae60; }
.types-bad h3 { color: #c0392b; }

.types-col ul {
    list-style: none;
    padding: 0;
}

.types-col li {
    font-size: 0.82rem;
    padding: 0.2rem 0;
    color: #555;
}

.types-good li::before {
    content: "\2713\00a0";
    color: #27ae60;
    font-weight: 700;
}

.types-bad li::before {
    content: "\2717\00a0";
    color: #c0392b;
    font-weight: 700;
}

/* How it works */

.how-it-works {
    padding: 3rem 0;
    text-align: center;
    background: #fff;
}

.how-it-works .container {
    max-width: 820px;
}

.how-it-works h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.how-it-works h2 strong {
    color: #3498db;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.hw-step {
    position: relative;
}

.hw-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.hw-step h3 {
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 0.35rem;
}

.hw-step p {
    font-size: 0.82rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Features */

.features {
    padding: 3rem 0;
    background: #f5f7fa;
}

.features .container {
    max-width: 820px;
}

.features h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 0.5rem;
}

.features-sub {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.feature {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    border: 1px solid #ecf0f1;
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.feature h3 {
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.feature p {
    font-size: 0.82rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* FAQ */

.faq-section {
    padding: 3rem 0;
    background: #f5f7fa;
}

.faq-section .container {
    max-width: 720px;
}

.faq-section h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.faq-item {
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(44, 62, 80, 0.06);
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.1);
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: #3498db;
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
    line-height: 1;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item[open] summary {
    border-bottom: 1px solid #dde3ea;
}

.faq-item p {
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* CTA */

.cta-section {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(135deg, #2c3e50 0%, #1a2a3a 100%);
    color: #fff;
}

.cta-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: #b0c4d8;
    margin-bottom: 1.5rem;
}

.btn-cta {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-cta:hover {
    background: #219a52;
}

/* ===== Shared buttons ===== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdb;
}

.btn-generate {
    display: block;
    width: 100%;
    background: #27ae60;
    color: #fff;
    font-size: 1.1rem;
    padding: 1rem;
}

.btn-generate:hover {
    background: #219a52;
}

.btn-generate:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.error-msg {
    background: #fdecea;
    color: #c0392b;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

/* ===== Wait page ===== */

.wait-page header {
    text-align: center;
    margin-bottom: 2rem;
}

.wait-page header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.wait-page header h1 a {
    color: inherit;
    text-decoration: none;
}

.wait-block {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wait-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #ecf0f1;
}

.wait-header h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.wait-hint {
    font-size: 0.85rem;
    text-align: center;
    color: #95a5a6;
    margin-top: 0.75rem;
}

.wait-elapsed {
    text-align: center;
    font-size: 0.9rem;
    color: #7f8c8d;
    font-variant-numeric: tabular-nums;
    margin-top: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 3px solid #ecf0f1;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-error {
    animation: none;
    border-top-color: #e74c3c;
    border-color: #e74c3c;
    opacity: 0.4;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pipeline steps timeline */

.pipeline-steps {
    position: relative;
    padding: 0;
    margin: 0 0 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.3s;
}

.step-optional {
    display: none;
}

.step-active,
.step-done,
.step-skipped,
.step-error {
    opacity: 1;
}

.step-active {
    transform: translateX(4px);
}

.step-skipped {
    opacity: 0.3;
}

.step-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ecf0f1;
    z-index: 1;
    transition: background 0.3s, box-shadow 0.3s;
}

.step-icon {
    font-size: 0.7rem;
    color: #95a5a6;
    line-height: 1;
    transition: color 0.3s;
}

.step-active .step-marker {
    background: #ebf5fb;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.step-active .step-icon {
    color: #3498db;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.step-done .step-marker {
    background: #d5f5e3;
}

.step-done .step-icon {
    color: #27ae60;
    font-size: 0.85rem;
}

.step-error .step-marker {
    background: #fdecea;
}

.step-error .step-icon {
    color: #e74c3c;
    font-size: 0.85rem;
}

.step-skipped .step-marker {
    background: #f5f5f5;
}

.step-skipped .step-icon {
    color: #ccc;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 13px;
    top: 36px;
    bottom: -8px;
    width: 2px;
    background: #ecf0f1;
    z-index: 0;
}

.step-done:not(:last-child)::after {
    background: #a9dfbf;
}

.step-active:not(:last-child)::after {
    background: linear-gradient(to bottom, #a9dfbf, #ecf0f1);
}

.step-body {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    transition: color 0.3s;
}

.step-active .step-label {
    color: #2c3e50;
}

.step-done .step-label {
    color: #27ae60;
}

.step-error .step-label {
    color: #e74c3c;
}

.step-time {
    font-size: 0.78rem;
    color: #b0b0b0;
    font-variant-numeric: tabular-nums;
    padding-top: 5px;
    min-width: 3rem;
    text-align: right;
}

.step-active .step-time {
    color: #3498db;
    font-weight: 500;
}

.step-done .step-time {
    color: #7f8c8d;
}

.drawing-remarks {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    background: #fff9e6;
    border: 1px solid #f0d78c;
    border-radius: 8px;
}

.drawing-remarks--hidden {
    display: none;
}

.drawing-remarks__title {
    font-weight: 600;
    color: #7d6608;
    margin: 0 0 0.5rem;
}

.drawing-remarks__intro {
    font-size: 0.9rem;
    color: #6b5a2e;
    margin: 0 0 0.75rem;
}

.drawing-remarks__list {
    margin: 0;
    padding-left: 1.25rem;
    color: #4a4020;
}

.drawing-remarks__list li {
    margin: 0.35rem 0;
}

.drawing-remarks--result {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .drawing-remarks {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .drawing-remarks__list {
        font-size: 0.9rem;
    }
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #ecf0f1;
    border-radius: 2px;
    margin-top: 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ===== View page ===== */

.view-page header {
    text-align: center;
    margin-bottom: 2rem;
}

.view-page header h1 {
    font-size: 2rem;
    color: #2c3e50;
}

.view-page header h1 a {
    color: inherit;
    text-decoration: none;
}

.model-intro {
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    text-align: center;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.55;
}

.viewer-wrapper {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

#viewer3d {
    width: 100%;
    height: 500px;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.actions .btn {
    min-width: 180px;
}

.rating-block {
    width: 100%;
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
}

.rating-row {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 3.25rem;
    gap: 1rem;
    flex-wrap: nowrap;
}

.rating-title {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.2;
    color: #2c3e50;
    font-weight: 600;
    white-space: nowrap;
}

.rating-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 auto;
}

.rating-star {
    border: none;
    background: transparent;
    font-size: 3.25rem;
    line-height: 1;
    color: #d6dbe1;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, color 0.15s ease, text-shadow 0.15s ease;
}

.rating-star-active {
    color: #f6c800;
    text-shadow: 0 2px 8px rgba(246, 200, 0, 0.35);
}

.rating-star:hover,
.rating-star:focus-visible {
    color: #f6c800;
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(246, 200, 0, 0.35);
    outline: none;
}

.rating-msg {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #e74c3c;
    text-align: center;
}

.rating-msg:empty {
    display: none;
}

.download-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    width: 100%;
}

.btn-dl {
    display: inline-block;
    width: auto;
    min-width: 0;
    flex: 1;
    max-width: 200px;
    font-size: 1rem;
    padding: 0.85rem 1rem;
}

.btn-pay {
    background: #27ae60;
    color: #fff;
    width: 100%;
    font-size: 1.05rem;
    padding: 1rem;
    text-align: center;
}

.btn-pay:hover {
    background: #219150;
}

.purchase-hint {
    width: 100%;
    margin: 0.45rem 0 0;
    text-align: center;
    color: #27ae60;
    font-size: 0.95rem;
    line-height: 1.4;
}

.actions-secondary {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-share {
    background: #8e44ad;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-share:hover {
    background: #7d3c98;
}

.share-hint {
    text-align: center;
    font-size: 0.85rem;
    color: #27ae60;
    margin-top: 0.5rem;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s;
}

.share-hint-visible {
    opacity: 1;
}

/* ===== Oferta page ===== */

.oferta-page {
    background: #fff;
}

.oferta-container {
    max-width: 800px;
}

.oferta-header {
    text-align: center;
    margin-bottom: 2rem;
}

.oferta-header h1 {
    font-size: 2rem;
    color: #2c3e50;
}

.oferta-header h1 a {
    color: inherit;
    text-decoration: none;
}

.oferta-content h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 0.25rem;
}

.oferta-subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.oferta-date {
    text-align: center;
    color: #b0b0b0;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.oferta-content section {
    margin-bottom: 1.75rem;
}

.oferta-content h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #ecf0f1;
}

.oferta-content p {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.oferta-content ul {
    margin: 0.5rem 0 0.75rem 1.5rem;
    padding: 0;
}

.oferta-content li {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0.3rem;
}

.oferta-content a:not(.btn) {
    color: #3498db;
    text-decoration: none;
}

.oferta-content a:not(.btn):hover {
    text-decoration: underline;
}

.oferta-back {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

/* ===== Upload agree checkbox ===== */

.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: #f0f7ff;
    border: 1px solid #d0e8f8;
    border-radius: 8px;
}

.agree-row input[type="checkbox"] {
    margin-top: 0.15rem;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: #3498db;
    cursor: pointer;
}

.agree-row label {
    font-size: 0.85rem;
    color: #2c3e50;
    line-height: 1.5;
    cursor: pointer;
}

.agree-row a {
    color: #3498db;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.agree-row a:hover {
    color: #2980b9;
}

.generation-time-hint {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: #607080;
    line-height: 1.4;
}

/* ===== Footer ===== */

footer {
    text-align: center;
    padding: 1.5rem 0;
    color: #95a5a6;
    font-size: 0.85rem;
}

.landing footer {
    background: #1a2a3a;
    color: #7f8c8d;
}

.footer-links {
    margin-top: 0.35rem;
}

.footer-links a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.82rem;
}

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

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero-sub {
        font-size: 0.95rem;
    }
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }
    .hero {
        padding: 2.5rem 1rem 2rem;
    }
    .hero h1 {
        font-size: 1.4rem;
    }
    .steps-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    .drawing-types {
        grid-template-columns: 1fr;
    }
    .wait-block {
        padding: 1.25rem 1rem 1rem;
    }
    .wait-header {
        gap: 0.75rem;
    }
    .wait-header h2 {
        font-size: 1.1rem;
    }
    .step-time {
        display: none;
    }
    #viewer3d {
        height: 350px;
    }
    .actions {
        flex-direction: column;
    }
    .actions .btn {
        width: 100%;
    }
    .download-group {
        flex-direction: row;
    }
    .rating-star {
        font-size: 2.4rem;
    }
    .rating-row {
        flex-direction: column;
        align-items: center;
        min-height: auto;
        gap: 0.5rem;
    }
    .rating-title {
        text-align: center;
    }
    .rating-stars {
        justify-content: center;
    }
    .download-group .btn-dl {
        width: auto;
        max-width: none;
    }
    .actions-secondary {
        flex-direction: column;
    }
    .btn-pay {
        font-size: 0.95rem;
        padding: 0.9rem 0.75rem;
    }
}

/* Страница-заглушка: задача истекла по TTL */
.expired-page {
    text-align: center;
    max-width: 640px;
    margin: 3rem auto 2rem;
    padding: 2rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.expired-title {
    color: #c0392b;
    font-size: 1.6rem;
    margin: 0 0 1rem;
}

.expired-text {
    color: #34495e;
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0.75rem 0;
}

.expired-text a {
    color: #3498db;
    text-decoration: underline;
}

.expired-meta {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0.5rem 0 1rem;
}

.expired-actions {
    margin-top: 1.75rem;
}

.expired-actions .btn {
    display: inline-block;
    padding: 0.9rem 1.75rem;
    font-size: 1.05rem;
}

/* Плашка TTL на странице результата */
.ttl-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin: 0.75rem 0 1rem;
    padding: 0.7rem 1rem;
    background: #eef4fb;
    border: 1px solid #d6e4f0;
    border-radius: 8px;
    color: #34495e;
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.ttl-banner__label strong {
    white-space: nowrap;
    color: #2c3e50;
}

.ttl-banner__timer {
    display: none;
    font-family: "Menlo", "Consolas", monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: inherit;
}

.ttl-banner--urgent {
    background: #fdecea;
    border-color: #f5b7b1;
    color: #922b21;
    animation: ttl-pulse 2s ease-in-out infinite;
}

.ttl-banner--urgent .ttl-banner__label strong {
    color: #922b21;
}

.ttl-banner--urgent .ttl-banner__timer {
    display: inline-block;
    color: #c0392b;
}

.ttl-banner--expired {
    background: #fdecea;
    border-color: #f5b7b1;
    color: #922b21;
    animation: none;
}

@keyframes ttl-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.0); }
    50%      { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.08); }
}

@media (max-width: 640px) {
    .ttl-banner {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }
    .ttl-banner__timer {
        font-size: 1.2rem;
        width: 100%;
    }
}

/* Переверстанная CTA-кнопка оплаты: главная надпись + подстрочник */
.btn-pay--stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.95rem 1rem;
    line-height: 1.25;
}

.btn-pay__main {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-pay__sub {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

/* Булеты «что вы получаете» под кнопкой оплаты */
.cta-benefits {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: #2c3e50;
}

.cta-benefits li {
    position: relative;
    padding-left: 1.6rem;
    line-height: 1.4;
}

.cta-benefits li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.35rem;
    width: 0.45rem;
    height: 0.8rem;
    border-right: 2px solid #27ae60;
    border-bottom: 2px solid #27ae60;
    transform: rotate(45deg);
}

@media (max-width: 640px) {
    .btn-pay__main { font-size: 1.05rem; }
    .btn-pay__sub  { font-size: 0.8rem; }
    .cta-benefits  { font-size: 0.9rem; }
}

/* Fallback-блок при ошибке сборки ZIP: уведомление + три отдельные кнопки */
.download-fallback {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.download-fallback__notice {
    margin: 0;
    padding: 0.7rem 0.9rem;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    color: #664d03;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.download-fallback .download-group {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.download-fallback__retry {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.download-fallback__retry a {
    color: #3498db;
    text-decoration: underline;
}

.download-fallback__retry a:hover {
    color: #2980b9;
}

.review-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.review-modal[hidden] {
    display: none;
}

.review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.review-modal__card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.review-modal__title {
    margin: 0 0 1rem;
    line-height: 1.45;
    color: #2c3e50;
}

#reviewInput {
    width: 100%;
    box-sizing: border-box;
    min-height: 96px;
    padding: 0.65rem;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    font: inherit;
}

.review-modal__msg {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #e74c3c;
}

.review-modal__msg:empty {
    display: none;
}

.review-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}
