:root {
            --bg: #f8f6f1;
            --bg-card: #ffffff;
            --text: #1a1a1a;
            --text-secondary: #6b6b6b;
            --text-muted: #9a9a9a;
            --accent: #c45d2c;
            --accent-light: #f0ddd0;
            --accent-hover: #a84b22;
            --border: #e8e4de;
            --surface: #f0ece5;
            --header-bg: #1a1a1a;
            --radius: 16px;
            --radius-sm: 10px;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
            --shadow-md: 0 8px 30px rgba(0,0,0,0.06);
            --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
            --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Space Grotesk', sans-serif;
            background-color: var(--bg);
            color: var(--text);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
        }

        /* Scroll reveal animation */
        .reveal {
            opacity: 0;
            transform: translateY(24px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }
        .reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Верхняя панель магазинов — только узкие экраны (явно скрываем на десктопе) */
        .mobile-store-bar {
            display: none !important;
        }

        @media (max-width: 768px) {
            .mobile-store-bar {
                display: flex !important;
                flex-direction: row;
                flex-wrap: nowrap;
                align-items: center;
                justify-content: center;
                gap: 8px;
                padding: 8px 10px;
                max-width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
                border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            }

            .mobile-store-bar::-webkit-scrollbar {
                display: none;
            }

            .mobile-store-bar-tagline {
                display: inline-flex;
                align-items: center;
                gap: 5px;
                flex-shrink: 0;
                font-size: 11px;
                font-weight: 600;
                color: rgba(255, 255, 255, 0.96);
                letter-spacing: 0.02em;
                white-space: nowrap;
            }

            .mobile-store-bar-tagline i {
                font-size: 12px;
                opacity: 0.92;
            }

            .mobile-store-bar-btn {
                display: inline-flex;
                align-items: center;
                gap: 5px;
                flex-shrink: 0;
                padding: 6px 10px;
                border-radius: 8px;
                background: rgba(255, 255, 255, 0.96);
                color: var(--text) !important;
                text-decoration: none !important;
                font-size: 11px;
                font-weight: 700;
                font-family: 'Space Grotesk', sans-serif;
                transition: transform var(--transition), box-shadow var(--transition);
            }

            .mobile-store-bar-btn:hover {
                transform: translateY(-1px);
                box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
            }

            .mobile-store-bar-btn:active {
                transform: translateY(0);
            }

            .mobile-store-bar-btn i {
                font-size: 13px;
                color: var(--accent);
            }
        }

        /* Header */
        .header {
            background: var(--header-bg);
            padding: 0 24px;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }

        .header-inner {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 64px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
        }

        .logo-img {
            height: 38px;
            width: auto;
            max-width: 120px;
            display: block;
            object-fit: contain;
            border-radius: var(--radius-sm);
            transition: transform var(--transition);
        }

        .logo:hover .logo-img {
            transform: rotate(-4deg) scale(1.04);
        }

        .logo-text {
            font-family: 'DM Serif Display', serif;
            font-size: 21px;
            font-weight: 400;
            color: #fff;
            letter-spacing: -0.3px;
        }

        .nav {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .nav a {
            color: rgba(255, 255, 255, 0.55);
            text-decoration: none;
            font-size: 13.5px;
            font-weight: 500;
            padding: 7px 14px;
            border-radius: 8px;
            transition: all var(--transition);
            letter-spacing: 0.1px;
        }

        .nav a:hover {
            color: rgba(255, 255, 255, 0.9);
        }

        .nav a.active {
            color: #fff;
            background: rgba(255, 255, 255, 0.1);
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: background var(--transition);
        }

        .mobile-menu-btn:hover {
            background: rgba(255,255,255,0.1);
        }

        /* Hero section */
        .hero {
            background: var(--header-bg);
            padding: 36px 24px 40px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(ellipse at 50% 0%, rgba(196, 93, 44, 0.12) 0%, transparent 60%);
            pointer-events: none;
        }

        .hero-inner {
            max-width: 640px;
            margin: 0 auto;
            position: relative;
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 16px;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 100px;
            margin-bottom: 28px;
            font-size: 12.5px;
            color: rgba(255,255,255,0.7);
            font-weight: 500;
            letter-spacing: 0.3px;
        }

        .hero-badge i {
            color: var(--accent);
            font-size: 11px;
        }

        .hero h1 {
            font-family: 'DM Serif Display', serif;
            font-size: 34px;
            font-weight: 400;
            color: #fff;
            margin-bottom: 14px;
            letter-spacing: -0.5px;
            line-height: 1.15;
        }

        .hero h1 span {
            color: var(--accent);
        }

        .hero p {
            display: none;
        }

        .search-bar {
            display: flex;
            max-width: 500px;
            margin: 0 auto;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 14px;
            overflow: hidden;
            transition: all var(--transition);
        }

        .search-bar:focus-within {
            background: rgba(255,255,255,0.12);
            border-color: rgba(255,255,255,0.2);
            box-shadow: 0 0 0 4px rgba(196, 93, 44, 0.15);
        }

        .search-bar input {
            flex: 1;
            border: none;
            padding: 12px 18px;
            font-size: 14px;
            font-family: 'Space Grotesk', sans-serif;
            color: #fff;
            outline: none;
            background: transparent;
        }

        .search-bar input::placeholder {
            color: rgba(255,255,255,0.35);
        }

        .search-bar button {
            background: var(--accent);
            border: none;
            padding: 12px 20px;
            cursor: pointer;
            transition: background var(--transition);
            color: #fff;
            font-size: 13px;
        }

        .search-bar button:hover {
            background: var(--accent-hover);
        }

        /* Stats bar */
        .stats-bar {
            display: none;
        }

        .stat-item {
            text-align: center;
        }

        .stat-value {
            font-size: 20px;
            font-weight: 700;
            color: #fff;
            letter-spacing: -0.5px;
        }

        .stat-label {
            font-size: 11px;
            color: rgba(255,255,255,0.4);
            font-weight: 500;
            margin-top: 2px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* Main content */
        .main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 56px 24px 96px;
        }

        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 28px;
        }

        .section-header-spaced {
            margin-top: 48px;
        }

        a.btn-roulette {
            text-decoration: none;
        }

        .section-title {
            font-family: 'DM Serif Display', serif;
            font-size: 32px;
            font-weight: 400;
            color: var(--text);
            letter-spacing: -0.5px;
        }

        .recipe-count {
            font-size: 13px;
            color: var(--text-muted);
            font-weight: 500;
            margin-left: 12px;
        }

        .btn-all,
        a.btn-all {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-sm);
            color: var(--text);
            text-decoration: none;
            font-size: 13px;
            font-weight: 600;
            transition: all var(--transition);
            background: transparent;
            cursor: pointer;
            font-family: 'Space Grotesk', sans-serif;
        }

        .btn-all:hover {
            background: var(--text);
            color: #fff;
            border-color: var(--text);
        }

        /* Filter tags */
        .filters {
            display: flex;
            gap: 8px;
            margin-bottom: 36px;
            flex-wrap: wrap;
        }

        .filter-tag {
            padding: 8px 18px;
            border-radius: 100px;
            border: 1.5px solid var(--border);
            background: var(--bg-card);
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition);
            font-family: 'Space Grotesk', sans-serif;
            position: relative;
            overflow: hidden;
        }

        .filter-tag::after {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--text);
            opacity: 0;
            transition: opacity var(--transition);
            border-radius: inherit;
            z-index: 0;
        }

        .filter-tag span {
            position: relative;
            z-index: 1;
        }

        .filter-tag:hover {
            border-color: var(--text-secondary);
            color: var(--text);
        }

        .filter-tag.active {
            background: var(--text);
            color: #fff;
            border-color: var(--text);
        }

        /* Recipe grid */
        .recipe-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
        }

        .recipe-card {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 0;
            transition: all var(--transition);
            cursor: pointer;
            border: 1px solid var(--border);
            position: relative;
            overflow: hidden;
        }

        .recipe-card:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-4px);
            border-color: transparent;
        }

        .recipe-card-top {
            padding: 28px 28px 0;
            display: flex;
            align-items: flex-start;
            gap: 16px;
        }

        .recipe-emoji {
            width: 52px;
            height: 52px;
            background: var(--surface);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            flex-shrink: 0;
            transition: transform var(--transition);
        }

        .recipe-card:hover .recipe-emoji {
            transform: scale(1.1) rotate(-4deg);
        }

        .recipe-card-info {
            flex: 1;
            min-width: 0;
        }

        .recipe-card-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 6px;
        }

        .recipe-title {
            font-family: 'DM Serif Display', serif;
            font-size: 18px;
            font-weight: 400;
            color: var(--text);
            line-height: 1.3;
            flex: 1;
            margin-right: 12px;
        }

        .recipe-title a {
            color: inherit;
            text-decoration: none;
        }

        .recipe-title a:hover {
            color: var(--accent);
        }

        .recipe-tag--link {
            text-decoration: none;
            cursor: pointer;
        }

        .recipe-tag--link:hover {
            background: var(--accent-light);
            color: var(--accent-hover);
        }

        .recipe-bookmark--static {
            pointer-events: none;
            opacity: 0.4;
        }

        .recipe-bookmark {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 16px;
            cursor: pointer;
            padding: 4px;
            transition: all var(--transition);
            flex-shrink: 0;
            border-radius: 6px;
        }

        .recipe-bookmark:hover {
            color: var(--accent);
            background: var(--accent-light);
        }

        .recipe-bookmark.saved {
            color: var(--accent);
        }

        .recipe-desc {
            font-size: 13.5px;
            color: var(--text-muted);
            line-height: 1.55;
        }

        .recipe-card-body {
            padding: 20px 28px 24px;
        }

        /* Nutrition */
        .nutrition {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-bottom: 18px;
        }

        .nutrition-item {
            text-align: center;
            padding: 12px 6px;
            background: var(--surface);
            border-radius: var(--radius-sm);
            position: relative;
            overflow: hidden;
        }

        .nutrition-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--border);
            border-radius: 0 0 var(--radius-sm) var(--radius-sm);
        }

        .nutrition-bar-fill {
            height: 100%;
            border-radius: inherit;
            transition: width 0.8s ease;
        }

        .nutrition-item.kcal .nutrition-bar-fill { background: var(--accent); }
        .nutrition-item.protein .nutrition-bar-fill { background: #4a9e6f; }
        .nutrition-item.fat .nutrition-bar-fill { background: #d4a843; }
        .nutrition-item.carbs .nutrition-bar-fill { background: #5b7ec4; }

        .nutrition-label {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 4px;
        }

        .nutrition-value {
            font-size: 17px;
            font-weight: 700;
            color: var(--text);
        }

        .nutrition-unit {
            font-size: 11px;
            font-weight: 500;
            color: var(--text-muted);
        }

        .nutrition-item.kcal .nutrition-value {
            color: var(--accent);
        }

        /* Tags */
        .recipe-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .recipe-tag {
            padding: 4px 10px;
            border-radius: 6px;
            background: var(--surface);
            color: var(--text-secondary);
            font-size: 11.5px;
            font-weight: 500;
            letter-spacing: 0.2px;
        }

        .recipe-time {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 6px;
            background: var(--accent-light);
            color: var(--accent);
            font-size: 11.5px;
            font-weight: 600;
        }

        .recipe-time i {
            font-size: 10px;
            color: var(--accent);
        }

        /* Roulette section */
        .roulette-section {
            margin-top: 64px;
            background: var(--text);
            border-radius: 24px;
            padding: 56px 48px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .roulette-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(ellipse at 30% 20%, rgba(196, 93, 44, 0.15) 0%, transparent 50%),
                        radial-gradient(ellipse at 70% 80%, rgba(196, 93, 44, 0.08) 0%, transparent 50%);
            pointer-events: none;
        }

        .roulette-section h2 {
            font-family: 'DM Serif Display', serif;
            font-size: 32px;
            font-weight: 400;
            color: #fff;
            margin-bottom: 12px;
            position: relative;
        }

        .roulette-section p {
            color: rgba(255, 255, 255, 0.45);
            font-size: 15px;
            margin-bottom: 32px;
            position: relative;
        }

        .btn-roulette {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 14px 36px;
            background: var(--accent);
            color: #fff;
            border: none;
            border-radius: 12px;
            font-size: 14.5px;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition);
            font-family: 'Space Grotesk', sans-serif;
            position: relative;
            letter-spacing: 0.2px;
        }

        .btn-roulette:hover {
            background: var(--accent-hover);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(196, 93, 44, 0.3);
        }

        .btn-roulette:active {
            transform: translateY(0);
        }

        .btn-roulette i {
            font-size: 15px;
            color: #fff;
            transition: transform 0.3s ease;
        }

        /* Roulette result */
        .roulette-result {
            margin-top: 32px;
            display: none;
        }

        .roulette-result.show {
            display: block;
            animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .roulette-result .recipe-card {
            max-width: 440px;
            margin: 0 auto;
            text-align: left;
        }

        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(20px) scale(0.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(720deg); }
        }

        .spinning .btn-roulette-icon {
            animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Card appear animation */
        @keyframes cardAppear {
            from { opacity: 0; transform: translateY(16px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .recipe-card {
            animation: cardAppear 0.4s ease backwards;
        }

        .recipe-card:nth-child(1) { animation-delay: 0.05s; }
        .recipe-card:nth-child(2) { animation-delay: 0.1s; }
        .recipe-card:nth-child(3) { animation-delay: 0.15s; }
        .recipe-card:nth-child(4) { animation-delay: 0.2s; }
        .recipe-card:nth-child(5) { animation-delay: 0.25s; }
        .recipe-card:nth-child(6) { animation-delay: 0.3s; }
        .recipe-card:nth-child(7) { animation-delay: 0.35s; }
        .recipe-card:nth-child(8) { animation-delay: 0.4s; }

        /* Footer */
        /* App promo section */
        .app-promo {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px 96px;
        }

        .app-promo-inner {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 40px 48px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 32px;
            position: relative;
            overflow: hidden;
        }

        .app-promo-inner::before {
            content: '';
            position: absolute;
            top: -60px;
            left: -60px;
            width: 180px;
            height: 180px;
            background: radial-gradient(circle, rgba(196, 93, 44, 0.08) 0%, transparent 70%);
            pointer-events: none;
        }

        .app-promo-inner::after {
            content: '';
            position: absolute;
            bottom: -40px;
            right: -40px;
            width: 140px;
            height: 140px;
            background: radial-gradient(circle, rgba(196, 93, 44, 0.06) 0%, transparent 70%);
            pointer-events: none;
        }

        .app-promo-left {
            display: flex;
            align-items: center;
            gap: 20px;
            position: relative;
            flex: 1;
        }

        .app-promo-icon {
            width: 56px;
            height: 56px;
            background: var(--accent);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .app-promo-icon i {
            color: #fff;
            font-size: 22px;
        }

        .app-promo-text h3 {
            font-family: 'DM Serif Display', serif;
            font-size: 20px;
            font-weight: 400;
            color: var(--text);
            margin-bottom: 4px;
        }

        .app-promo-text p {
            font-size: 13.5px;
            color: var(--text-muted);
            line-height: 1.5;
            max-width: 380px;
        }

        .app-promo-badges {
            display: flex;
            gap: 12px;
            flex-shrink: 0;
            position: relative;
        }

        .store-badge {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 20px;
            background: var(--text);
            border-radius: 12px;
            text-decoration: none;
            transition: all var(--transition);
            border: 1px solid transparent;
        }

        .store-badge:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        }

        .store-badge-icon {
            font-size: 22px;
            line-height: 1;
        }

        .store-badge-text {
            display: flex;
            flex-direction: column;
        }

        .store-badge-label {
            font-size: 9.5px;
            color: rgba(255,255,255,0.55);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            line-height: 1.2;
        }

        .store-badge-name {
            font-size: 15px;
            color: #fff;
            font-weight: 600;
            line-height: 1.3;
        }

        @media (max-width: 768px) {
            .app-promo-inner {
                flex-direction: column;
                padding: 32px 24px;
                text-align: center;
            }

            .app-promo-left {
                flex-direction: column;
                text-align: center;
            }

            .app-promo-text p {
                max-width: none;
            }

            .app-promo-badges {
                flex-wrap: wrap;
                justify-content: center;
            }
        }

        /* Footer */
        .footer {
            background: var(--header-bg);
            padding: 48px 24px;
            text-align: center;
        }

        .footer-inner {
            max-width: 1200px;
            margin: 0 auto;
        }

        .footer p {
            color: rgba(255, 255, 255, 0.3);
            font-size: 13px;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 28px;
            margin-bottom: 20px;
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.5);
            text-decoration: none;
            font-size: 13.5px;
            font-weight: 500;
            transition: color var(--transition);
        }

        .footer-links a:hover {
            color: var(--accent);
        }

        .footer-divider {
            width: 40px;
            height: 2px;
            background: rgba(255,255,255,0.1);
            margin: 0 auto 20px;
            border-radius: 1px;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .nav {
                display: none;
                position: absolute;
                top: 64px;
                left: 0;
                right: 0;
                background: var(--header-bg);
                flex-direction: column;
                padding: 12px 16px;
                gap: 2px;
                box-shadow: 0 12px 32px rgba(0,0,0,0.3);
                border-top: 1px solid rgba(255,255,255,0.06);
            }

            .nav.open {
                display: flex;
            }

            .nav a {
                padding: 12px 16px;
                width: 100%;
                text-align: left;
                border-radius: 10px;
            }

            .mobile-menu-btn {
                display: block;
            }

            .hero h1 {
                font-size: 26px;
            }

            .hero {
                padding: 28px 24px 32px;
            }

            .stats-bar {
                gap: 24px;
            }

            .stat-value {
                font-size: 18px;
            }

            .recipe-grid {
                grid-template-columns: 1fr;
            }

            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 16px;
            }

            .roulette-section {
                padding: 40px 24px;
                border-radius: 20px;
            }

            .roulette-section h2 {
                font-size: 24px;
            }

            .section-title {
                font-size: 26px;
            }
        }

        @media (max-width: 420px) {
            .hero h1 {
                font-size: 22px;
            }

            .stats-bar {
                flex-direction: column;
                gap: 16px;
            }

            .recipe-card-top {
                padding: 20px 20px 0;
            }

            .recipe-card-body {
                padding: 16px 20px 20px;
            }

            .nutrition {
                grid-template-columns: repeat(2, 1fr);
            }
        }

/* Inner pages (Django) — complements app core tokens */

:root {
  --primary: var(--accent);
  --white: #ffffff;
}

/* Light page title (replaces old .hero on list/detail pages) */
.page-intro {
  padding: 8px 0 20px;
  margin-bottom: 4px;
}

.page-intro .h1 {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--text);
  letter-spacing: -0.4px;
}

.page-intro .subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* Recipe list filter form — not .filters (reserved for tag row in mockup) */
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 0 28px;
  box-shadow: var(--shadow-sm);
}

.filter-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.filter-form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-form-grid .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-form-grid .input {
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 0 12px;
  font-size: 14px;
  font-family: "Space Grotesk", sans-serif;
  outline: none;
  background: var(--bg-card);
  color: var(--text);
}

.filter-form-grid .input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 93, 44, 0.15);
}

.filter-form-grid .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Buttons (inner pages) */
.btnPrimary,
.btnGhost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
}

.btnPrimary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btnPrimary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btnGhost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btnGhost:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* Legacy content cards & grids */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.recipeCard {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cardLink {
  color: var(--text);
  text-decoration: none;
  font-family: "DM Serif Display", serif;
}

.cardLink:hover {
  color: var(--accent);
}

.desc {
  margin: 6px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 14px;
}

.pillRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
}

.pillSoft {
  background: var(--bg);
  border: 1px solid var(--border);
}

.pillLink {
  text-decoration: none;
  color: inherit;
}

.pillLink:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.infoRow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.infoRowBig {
  margin-top: 14px;
}

.infoItem {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.infoItem .muted {
  color: var(--text-muted);
  font-size: 12px;
}

.infoItem .strong {
  font-weight: 700;
  color: var(--text);
}

.metaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.reactionsPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.reactionMini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.emojiMini {
  font-size: 14px;
  line-height: 1;
}

.countMini {
  font-weight: 700;
  color: var(--accent);
}

.emptyState {
  padding: 28px;
  text-align: center;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 16px;
}

.sectionHeaderTop {
  margin-top: 36px;
}

.sectionHeaderInline {
  margin: 0 0 12px;
}

.sectionHeader .h2 {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  font-weight: 400;
  margin: 0;
}

.storeBadgeLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--transition);
}

.storeBadgeLink:hover {
  transform: translateY(-2px);
}

.storeBadge {
  height: 52px;
  width: auto;
  display: block;
  border-radius: 10px;
}

.ctaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Museum */
.museumTabsCard {
  padding: 14px;
  margin: 0 0 22px;
}

.museumTabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.museumCard {
  overflow: hidden;
  padding: 0;
}

.museumCoverLink {
  display: block;
  text-decoration: none;
}

.museumCover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--surface);
}

.museumBody {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.museumMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.museumDetailCard {
  padding: 20px;
}

.museumPhotos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.museumPhotoLink {
  display: block;
  text-decoration: none;
}

.museumPhoto {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.museumText {
  margin-top: 14px;
}

.museumDetailMeta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.museumActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Recipe detail */
.detailCard {
  padding: 22px;
}

.detailCard .h1 {
  font-family: "DM Serif Display", serif;
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.4px;
}

.detailCard .subtitle {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 12px;
}

.detailHeader {
  margin-bottom: 14px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

.col {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.col .h2 {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  margin: 0 0 12px;
  font-weight: 400;
}

.list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
  color: var(--text);
}

.reactionsBlock {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.reactionsGrid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}

.roulettePromo {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.roulettePromoLink {
  display: block;
  margin-top: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid var(--border);
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-hover);
  line-height: 1.3;
}

.roulettePromoLink:hover {
  filter: brightness(0.97);
}

.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.reactionPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.reactionPill .emoji {
  font-size: 18px;
}

.reactionPill .count {
  font-weight: 700;
  color: var(--accent);
}

.commentsBlock {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.commentsInstallCard {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.commentsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.commentCard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.commentHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.commentAuthorMeta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.commentAvatarWrap {
  flex: 0 0 auto;
  width: 38px;
}

.commentAuthorLink {
  display: inline-flex;
  text-decoration: none;
}

.commentAuthorLinkText {
  color: var(--accent);
  text-decoration: none;
}

.commentAuthorLinkText:hover {
  text-decoration: underline;
}

.commentAvatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
}

.commentAvatarSm {
  width: 32px !important;
  height: 32px !important;
}

.commentAvatarFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.commentContent {
  margin-top: 10px;
  line-height: 1.45;
  word-break: break-word;
}

.commentReplies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.commentReply {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.publicProfileCard {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.publicProfileHeader {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.publicProfileIdentity {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.publicProfileAvatar {
  width: 72px !important;
  height: 72px !important;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
}

.publicProfileAvatarFallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.publicProfileName {
  font-size: 24px;
  font-weight: 700;
  font-family: "DM Serif Display", serif;
  color: var(--text);
}

.publicProfileStats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.publicProfileSection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.publicProfileCard .grid {
  grid-template-columns: 1fr;
}

.detailFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.shareBtn {
  min-height: 44px;
}

.similarBlock {
  margin-top: 28px;
}

/* Roulette page */
.rouletteCard {
  padding: 20px;
}

.rouletteWrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 22px;
  align-items: start;
}

.rouletteStage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.rouletteCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.rouletteCanvas.isSpinning {
  cursor: progress;
}

.roulettePointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid var(--accent);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.roulettePointer.isTicking {
  animation: roulettePointerTick 120ms ease-out;
}

@keyframes roulettePointerTick {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }
  45% {
    transform: translateX(-50%) rotate(-10deg) translateY(1px);
  }
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

.rouletteSide {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rouletteBtn {
  width: 100%;
}

.rouletteResult {
  padding: 18px;
}

.roulettePicked {
  font-weight: 700;
  font-size: 17px;
  margin-top: 8px;
  font-family: "DM Serif Display", serif;
}

.rouletteActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 13px;
}

.strong {
  font-weight: 700;
}

.h2 {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 8px;
}

@media (max-width: 820px) {
  .filter-form-grid {
    grid-template-columns: 1fr;
  }

  .filter-form-grid .actions {
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .columns {
    grid-template-columns: 1fr;
  }

  .page-intro .h1 {
    font-size: 24px;
  }

  .rouletteWrap {
    grid-template-columns: 1fr;
  }

  .reactionsGrid {
    grid-template-columns: 1fr;
  }

  .publicProfileStats {
    grid-template-columns: 1fr;
  }

  .commentsInstallCard {
    align-items: flex-start;
  }
}
