:root {
            --color-primary: #208080;
            --color-primary-hover: #1a6666;
            --color-bg: #f5f5f5;
            --color-surface: #ffffff;
            --color-text: #1f2933;
            --color-muted: #6b7b8c;
            --color-danger: #d64545;
            --color-border: #d0d7de;
            --radius-lg: 18px;
            --radius-md: 12px;
            --radius-sm: 8px;
            --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
        }

        * {
            box-sizing: border-box;
        }
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);

    background:
        radial-gradient(circle at 0% 0%, #24caa5 0, rgba(31,174,146,0) 45%),
        radial-gradient(circle at 100% 100%, #11856b 0, rgba(0,0,0,0) 50%),
        linear-gradient(135deg, #f6fbfa 0%, #e9f5f1 35%, #e2f1ee 100%);
    background-attachment: fixed;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 24px;
}

        .card {
            background: rgba(255, 255, 255, 0.96);
            border-radius: 22px;
            padding: 18px 14px 18px;
            box-shadow: var(--shadow-soft);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.8);
        }

        .header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

        .logo-circle {
            width: 40px;
            height: 40px;
            border-radius: 16px;
            background: radial-gradient(circle at 30% 20%, #e0f7fa, #006064);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #e0f2f1;
            font-weight: 800;
            font-size: 20px;
            letter-spacing: 0.04em;
            box-shadow: 0 10px 25px rgba(0, 96, 100, 0.35);
        }

        .header-text {
    display: flex;
    align-items: flex-start;
    padding-top: 0px;
}

.header-text .title {
    margin: 0;
    transform: translateY(-5px);
}

        .title {
    margin: 0;
    font-size: 29px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary);
}

/* только для Telegram Mini App — уменьшаем шрифт */
.is-telegram-miniapp .title {
    font-size: 28px;
}

        .form-grid {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin: 10px 0 8px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        label {
            font-size: 12px;
            color: var(--color-muted);
        }

        .input, .select {
            border-radius: 10px;
            border: 1px solid var(--color-border);
            padding: 7px 10px;
            font-size: 14px;
            background: #f9fafb;
            transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
        }

        .input:focus, .select:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 1px rgba(32,128,128,0.25);
            background: #ffffff;
        }

        .input::placeholder {
            color: #9aa5b1;
        }

        .toggle-row {
            display: flex;
            gap: 8px;
            margin-top: 4px;
        }

        .toggle-chip {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 7px 8px;
            font-size: 12px;
            border-radius: 999px;
            border: 1px solid var(--color-border);
            background: #f9fafb;
            cursor: pointer;
            user-select: none;
            transition: all 0.15s ease;
            text-align: center;
        }

        .toggle-chip.active {
    background: linear-gradient(135deg, #208080, #26a69a);
    color: #ffffff;
    border-color: #208080;
    box-shadow: 0 3px 8px rgba(32,128,128,0.35);
}

        .toggle-chip span {
            font-size: 13px;
            font-weight: 600;
            line-height: 1.2;
        }

        .row-inline {
            display: flex;
            gap: 8px;
        }

        .row-inline > .form-group {
            flex: 1;
        }

        .section-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent 0, #e1e7ef 25%, #e1e7ef 75%, transparent 100%);
            margin: 10px 0 10px;
        }

        .section-title {
            font-size: 13px;
            font-weight: 600;
            color: #4b5563;
            margin-bottom: 6px;
        }

        .footer-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .footer-row > .form-group {
            flex: 1;
        }

        .qty-input-wrapper {
            width: 90px;
        }

        .btn-row {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .btn {
            flex: 1;
            border-radius: 12px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            padding: 10px 12px;
            cursor: pointer;
            transition: transform 0.08s ease, box-shadow 0.1s ease, background 0.1s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background: linear-gradient(135deg, #208080, #26a69a);
            color: #ffffff;
            box-shadow: 0 8px 20px rgba(32, 128, 128, 0.45);
        }

        .btn-primary:active {
            transform: translateY(1px);
            box-shadow: 0 4px 10px rgba(32,128,128,0.35);
        }

        .btn-secondary {
    background: linear-gradient(135deg, #208080, #26a69a);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 20px rgba(32, 128, 128, 0.45);
}

.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(32,128,128,0.35);
}

        .btn span.emoji {
            font-size: 16px;
        }

        .accumulated-counter {
            margin-top: 6px;
            font-size: 12px;
            color: var(--color-muted);
            text-align: left;
        }

        .accumulated-counter strong {
            color: var(--color-primary);
        }

        .accumulated-counter.flash {
            animation: flashCount 0.4s ease;
        }

        @keyframes flashCount {
            0% { color: var(--color-primary); transform: scale(1.0); }
            50% { color: #0d9488; transform: scale(1.05); }
            100% { color: var(--color-primary); transform: scale(1.0); }
        }

        .message-box {
            margin-top: 10px;
            font-size: 13px;
            line-height: 1.4;
            min-height: 16px;
        }

        .message-box.error {
            color: var(--color-danger);
        }

        .message-box.success {
            color: #166534;
        }

        @media (max-width: 400px) {
            .card {
                border-radius: 20px;
                padding: 16px 12px 16px;
            }
        }
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(240, 253, 250, 0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .modal-window {
            background: rgba(255, 255, 255, 0.96);
            border-radius: 22px;
            padding: 18px 16px 16px;
            max-width: 360px;
            width: calc(100% - 40px);
            box-shadow: var(--shadow-soft);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.8);
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        .modal-text {
            font-size: 14px;
            line-height: 1.4;
            color: #222;
            margin-bottom: 14px;
        }

        .modal-button {
            width: 100%;
            padding: 9px 0;
            border: none;
            border-radius: 12px;
            background: linear-gradient(135deg, #208080, #26a69a);
            color: #ffffff;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 8px 20px rgba(32, 128, 128, 0.35);
        }

        .modal-button:active {
            transform: translateY(1px);
            box-shadow: 0 4px 10px rgba(32,128,128,0.35);
            opacity: 0.95;
        }

.app-bg-logos {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.09; /* если слишком ярко — 0.07–0.09 */
}

.app-bg-logos-inner {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;     /* было 180px */
    gap: 40px;                 /* чуть больше расстояние */
    padding: 48px 32px 64px;   /* нижний паддинг побольше */
    transform: translate3d(0,0,0);
}

.app-bg-logo {
    width: 240px;
    max-width: 82%;
    justify-self: center;
    align-self: center;
    object-fit: contain;
}

.app-bg-logo--furk {
    transform: translateY(-6px) scale(1.18);
    opacity: 1;
    filter: contrast(1.45) brightness(0.72) saturate(1.15);
}

.app-bg-logo--kng {
    transform: translateY(0) scale(1.02);
    opacity: 0.92;
    filter: contrast(1.08) brightness(0.88);
}

.app-bg-logos-inner > div:nth-child(1) {
    justify-self: start;
    transform: translateX(8px) translateY(10px);
}

.app-bg-logos-inner > div:nth-child(2) {
    justify-self: center;
    transform: translateX(30px) translateY(26px);
}

.app-bg-logos-inner > div:nth-child(3) {
    justify-self: end;
    transform: translateX(-12px) translateY(8px);
}

.app-bg-logos-inner > div:nth-child(4) {
    justify-self: center;
    transform: translateX(18px) translateY(12px);
}

.app-bg-logos-inner > div:nth-child(5) {
    justify-self: start;
    transform: translateX(0) translateY(-12px);
}

.app-bg-logos-inner > div:nth-child(6) {
    justify-self: end;
    transform: translateX(-22px) translateY(-18px);
}

.saved-windows-wrap {
    margin-top: 16px;
}

.saved-windows-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}

.saved-windows-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.saved-window-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fb;
    border: 1px solid #dbe2ea;
}

.saved-window-text {
    font-size: 14px;
    color: #1f2937;
}

.saved-window-check {
    font-size: 16px;
    font-weight: 700;
    color: #22c55e;
}

.brand-logo {
    width: 96px;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

.support-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 16px;
    text-decoration: none;
}
