        :root {
            --primary-color: #E53935;
            /* Appetizing Red */
            --secondary-color: #FBC02D;
            /* Deep Yellow */
            --accent-color: #FFC107;
            /* Amber */
            --text-color: #3E2723;
            /* Dark Brown */
            --bg-color: #FFFDE7;
            /* Warm Cream */
            --card-bg: #FFFAFA;
            /* Warm White */
            --fresh-color: #66BB6A;
            /* Soft Green */
            --warm-orange: #EF6C00;
            /* Appetizing Orange */
            --ocean-color: #42A5F5;
            /* Fresh Blue */
            --shadow: 0 8px 16px rgba(229, 57, 53, 0.15);
            --radius: 16px;
            --light-highlight: #FFF8E1;
        }



        * {
            box-sizing: border-box;
            margin: 0;
            margin: 0;
            padding: 0;
            font-family: 'Noto Sans KR', 'Noto Sans JP', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            /* Center on large screens */
            min-height: 100vh;
            padding: min(2vw, 20px);
        }

        .container {
            width: 100%;
            max-width: 420px;
            /* Mobile default */
            background: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
            transition: max-width 0.3s ease;
        }

        /* PC / Tablet Response */
        @media (min-width: 768px) {
            .container {
                max-width: 800px;
                /* Wider on PC */
            }

            /* Ensure content fills the width */
            .content {
                display: block;
                padding: 40px !important;
            }

            header {
                padding: 40px 20px;
            }

            header h1 {
                font-size: 2rem;
            }
        }

        header {
            background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
            color: white;
            text-align: center;
            padding: 40px 20px;
        }


        .share-btn {
            position: absolute;
            top: 15px;
            left: 15px;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.4);
            color: white;
            padding: 4px 12px 4px 10px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
            display: none;
            align-items: center;
            justify-content: center;
            gap: 5px;
            font-size: 0.8rem;
            font-weight: 600;
            z-index: 10;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        .share-btn:hover {
            background: rgba(255, 255, 255, 0.9);
            color: var(--primary-color);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            text-shadow: none;
        }

        .share-btn .share-icon {
            font-size: 1rem;
            line-height: 1;
        }

        @media (max-width: 767px) {
            header {
                padding: 60px 20px 25px;
            }

        }

        header h1 {
            font-size: 1.5rem;
            margin-bottom: 5px;
            font-weight: 700;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        header p {
            font-size: 0.9rem;
            opacity: 0.9;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
        }

        .lang-switch {
            position: absolute;
            top: 15px;
            right: 15px;
            display: flex;
            gap: 5px;
        }

        .lang-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.4);
            color: white;
            padding: 4px 8px;
            border-radius: 15px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .lang-btn:hover,
        .lang-btn.active {
            background: rgba(255, 255, 255, 0.9);
            color: var(--primary-color);
            font-weight: 700;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .content {
            padding: 20px;
            flex: 1;
            overflow-y: auto;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 12px;
            margin-top: 20px;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .section-title:first-child {
            margin-top: 0;
        }

        /* Autocomplete Styles */
        .input-group {
            position: relative;
            margin-bottom: 15px;
        }

        .input-field {
            width: 100%;
            padding: 14px 15px;
            border: 2px solid #eee;
            border-radius: var(--radius);
            font-size: 1rem;
            transition: border-color 0.3s;
            background-color: #ffffff;
        }

        .input-field:focus {
            border-color: var(--primary-color);
            outline: none;
            background-color: #fff;
            box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
        }

        .autocomplete-items {
            position: absolute;
            border-bottom: none;
            border-top: none;
            z-index: 99;
            top: 100%;
            left: 0;
            right: 0;
            background-color: white;
            border-radius: 0 0 var(--radius) var(--radius);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-height: 200px;
            overflow-y: auto;
        }

        .autocomplete-items div {
            padding: 12px;
            cursor: pointer;
            background-color: #fff;
            border-bottom: 1px solid #f0f0f0;
            color: var(--primary-color);
        }

        .autocomplete-items div:hover {
            background-color: #fff9f0;
            color: var(--primary-color);
        }

        /* Selected Items Tags */
        .selected-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 20px;
            min-height: 30px;
        }

        .tag {
            background-color: var(--light-highlight);
            color: var(--primary-color);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            border: 1px solid rgba(229, 57, 53, 0.2);
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .tag button {
            border: none;
            background: none;
            color: var(--primary-color);
            cursor: pointer;
            font-weight: 900;
            font-size: 1.1rem;
            line-height: 1;
            opacity: 0.7;
        }

        .tag button:hover {
            opacity: 1;
        }

        /* Category Group Styles */
        .category-group {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 35px;
        }

        .category-option {
            position: relative;
        }

        .category-option input {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            width: 100%;
            height: 100%;
            z-index: 10;
        }

        .category-label {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 14px 10px;
            background: linear-gradient(135deg, #ffffff 0%, #FFF8E1 100%);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            border: 1px solid #e0e0e0;
            color: #555;
            /* font-weight: 600; Removed */
            font-size: 0.95rem;
            height: 100%;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            text-align: center;
        }

        .category-label:hover {
            background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            color: var(--primary-color);
        }

        .category-option input:checked+.category-label {
            background: linear-gradient(135deg, var(--primary-color) 0%, #D32F2F 100%);
            border-color: #D32F2F;
            color: white;
            /* font-weight: 700; Removed */
            box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
            transform: translateY(-2px);
        }



        /* Radio Group Styles */
        .radio-group {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 35px;
        }

        .radio-option {
            position: relative;
        }

        .radio-option input {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            width: 100%;
            height: 100%;
            z-index: 10;
        }

        .radio-label {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 15px 5px;
            background: rgba(255, 248, 225, 0.3);
            /* Light Orange */
            border-radius: var(--radius);
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
            border: 2px solid transparent;
            height: 100%;
            color: #666;
        }

        .radio-label:hover {
            background: #fff9f2;
            transform: translateY(-2px);
        }

        .radio-label span.icon {
            font-size: 1.8rem;
            margin-bottom: 6px;
        }

        .radio-label span.text {
            font-size: 0.85rem;
            font-weight: 500;
        }

        /* Style when radio is checked */
        .radio-option input:checked+.radio-label {
            background: var(--light-highlight);
            border-color: var(--primary-color);
            /* Red Border on Active */
            color: var(--primary-color);
            font-weight: 800;
            box-shadow: 0 4px 6px rgba(229, 57, 53, 0.15);
            transform: translateY(-2px);
        }

        /* Action Button */
        .btn-main {
            width: 100%;
            padding: 18px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--radius);
            font-size: 1.2rem;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 10px;
            box-shadow: 0 6px 15px rgba(229, 57, 53, 0.3);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .btn-main:hover {
            background: #C62828;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(198, 40, 40, 0.4);
        }

        .btn-main:active {
            transform: scale(0.98);
        }

        .btn-main:disabled {
            background: #ccc;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        /* Result Section */
        #result-section {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 15px;
        }

        .result-card {
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(10px);
            padding: min(6.5vw, 40px) min(5vw, 40px);
            border-radius: 20px;
            text-align: center;
            width: 94vw;
            max-width: 600px;
            max-height: 87vh;
            /* Limit height */
            overflow-y: auto;
            /* Enable internal scrolling */
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
            animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            /* For X button positioning */
        }

        /* Prevent body scroll when popup is open */
        body.no-scroll {
            overflow: hidden;
        }

        @keyframes popIn {
            from {
                transform: scale(0.8);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .result-title {
            color: #888;
            font-weight: 600;
            font-size: 0.95rem;
            margin-bottom: min(2vw, 20px);
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .menu-name {
            font-size: min(8vw, 2.5rem);
            font-weight: 900;
            color: var(--primary-color);
            margin-bottom: 15px;
            word-break: keep-all;
            line-height: 1.2;
            background: linear-gradient(45deg, var(--primary-color), #D32F2F);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .menu-reason {
            background: var(--light-highlight);
            color: var(--primary-color);
            padding: min(1.6vw, 12px) min(2.5vw, 18px);
            border-radius: 12px;
            font-size: min(3.7vw, 1rem);
            margin-bottom: min(2vw, 15px);
            display: inline-block;
            font-weight: 600;
            line-height: 1.5;
            text-align: left;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(229, 57, 53, 0.1);
            position: relative;
            /* For speech bubble tail */
        }

        /* Speech Bubble Tail */
        .menu-reason::after {
            content: '';
            position: absolute;
            top: -10px;
            left: 20px;
            border-width: 0 10px 10px 10px;
            border-style: solid;
            border-color: transparent transparent var(--light-highlight) transparent;
            display: block;
            width: 0;
            z-index: 1;
        }

        /* Speech Bubble Tail Border */
        .menu-reason::before {
            content: '';
            position: absolute;
            top: -11px;
            left: 19px;
            border-width: 0 11px 11px 11px;
            border-style: solid;
            border-color: transparent transparent rgba(229, 57, 53, 0.1) transparent;
            display: block;
            width: 0;
            z-index: 0;
        }

        .other-ranks {
            text-align: left;
            padding-top: min(0.3vw, 15px);
        }

        .rank-item {
            display: flex;
            justify-content: left;
            padding: 10px 0 5px;
            font-size: min(3.6vw, 0.95rem);
            color: #666;
            transition: background 0.2s;
            border-radius: 8px;
        }

        .rank-item:hover {
            background: #f9f9f9;
            padding-left: 5px;
            padding-right: 5px;
        }

        .rank-label {
            font-weight: 700;
            color: var(--secondary-color);
            min-width: 40px;
        }

        .close-btn {
            margin-top: min(2.5vw, 20px);
            padding: 15px;
            width: 100%;
            border: none;
            background: var(--secondary-color);
            /* Yellow/Amber Background */
            border-radius: 12px;
            font-weight: 700;
            font-size: 1rem;
            color: #3E2723;
            /* Dark Brown Text */
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 10px rgba(251, 192, 45, 0.3);
        }

        .btn-secondary {
            margin-top: 10px;
            padding: 15px;
            width: 100%;
            border: none;
            background: var(--warm-orange);
            /* Appetizing Orange */
            border-radius: 12px;
            font-weight: 700;
            font-size: 1rem;
            color: white;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 10px rgba(239, 108, 0, 0.3);
            margin-bottom: 10px;
        }

        .btn-secondary:hover {
            background: #E65100;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(230, 81, 0, 0.4);
        }

        .close-btn:hover {
            background: #F9A825;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(249, 168, 37, 0.4);
        }

        .close-x-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 1.5rem;
            color: #aaa;
            cursor: pointer;
            line-height: 1;
            padding: 5px;
            transition: color 0.2s;
        }

        .close-x-btn:hover {
            color: #555;
        }

        /* Loading Animation */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-color);
            z-index: 9999;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }


        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(229, 57, 53, 0.2);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

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

        .loading-text {
            margin-top: 15px;
            font-weight: 700;
            font-size: 1.1rem;
            color: var(--primary-color);
            animation: pulse 1s infinite;
        }



        @keyframes pulse {
            0% {
                opacity: 0.6;
            }

            50% {
                opacity: 1;
            }

            100% {
                opacity: 0.6;
            }
        }

        /* Footer & Disclaimer */
        .copyright-footer {
            text-align: center;
            font-size: 0.75rem;
            color: #999;
            padding: 20px 0;
            width: 100%;
            margin-top: 30px;
        }

        .disclaimer-text {
            font-size: min(3.2vw, 0.75rem);
            color: #888;
            background-color: #f9f9f9;
            padding: 10px;
            border-radius: 8px;
            margin-top: min(1.4vw, 15px);
            margin-bottom: 5px;
            line-height: 1.4;
            text-align: left;
            border: 1px solid #eee;
        }

        /* 404 Error Page Styles */
        .error-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            text-align: center;
            height: 100%;
        }

        .error-code {
            font-size: min(18vw, 6rem);
            font-weight: 900;
            color: var(--primary-color);
            line-height: 1;
            margin-bottom: 10px;
            text-shadow: 4px 4px 0px rgba(229, 57, 53, 0.1);
        }

        .error-message {
            font-size: min(4.5vw, 1.2rem);
            color: #555;
            margin-bottom: 30px;
            font-weight: 500;
        }

        .error-icon {
            font-size: 4rem;
            margin-bottom: 20px;
        }