        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --accent: #f43f5e;
            --success: #10b981;
            --bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --bg-light: #f8fafc;
            --text: #1e293b;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        * {
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-light);
            color: var(--text);
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }

        .hidden {
            display: none !important;
        }

        /* ========== ヘッダー ========== */
        header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 16px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 4px 30px rgba(102, 126, 234, 0.4);
        }

        .logo-link {
            font-weight: 800;
            color: white;
            font-size: 1.5rem;
            text-decoration: none;
            letter-spacing: -0.5px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        #headerActions {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        #userEmail {
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.85rem;
            background: rgba(255, 255, 255, 0.15);
            padding: 6px 12px;
            border-radius: 20px;
        }

        .btn-header {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 8px 18px;
            color: white;
            text-decoration: none;
            display: inline-block;
            border-radius: 25px;
            font-size: 0.85rem;
            font-weight: 600;
            transition: all 0.2s;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .btn-header:hover {
            background: rgba(255, 255, 255, 0.35);
            transform: translateY(-1px);
        }

        /* ========== コンテナ ========== */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 30px 20px 120px;
        }

        h2 {
            font-size: 1.6rem;
            margin: 30px 0 20px;
            font-weight: 800;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        h2::before {
            content: '🛍️';
            font-size: 1.4rem;
        }

        /* ========== 管理者パネル（折りたたみ式） ========== */
        #adminPanel {
            display: none;
            margin-bottom: 20px;
        }

        .admin-toggle {
            background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
            color: white;
            padding: 10px 20px;
            border-radius: 25px;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
            transition: all 0.2s;
            border: none;
        }

        .admin-toggle:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
        }

        .admin-toggle .arrow {
            transition: transform 0.3s;
        }

        .admin-toggle.open .arrow {
            transform: rotate(180deg);
        }

        .admin-content {
            background: white;
            border-radius: 16px;
            padding: 0;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
            box-shadow: var(--card-shadow);
            margin-top: 0;
        }

        .admin-content.open {
            max-height: 2000px;
            padding: 20px;
            margin-top: 15px;
        }

        .admin-form-group {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
        }

        .admin-form-group input,
        .admin-form-group select,
        .admin-form-group textarea {
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 0.9rem;
            background: #f8fafc;
            transition: all 0.2s;
        }

        .admin-form-group input:focus,
        .admin-form-group select:focus,
        .admin-form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .admin-form-group textarea {
            grid-column: 1 / -1;
        }

        #btnAddProduct {
            background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
            color: white;
            padding: 12px 20px;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }

        #btnAddProduct:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
        }

        .upload-section {
            grid-column: 1 / -1;
            padding: 12px;
            border-radius: 10px;
            font-size: 0.85rem;
        }

        #audioUploadSection {
            background: #eff6ff;
            border: 1px dashed #3b82f6;
        }

        #sampleUploadSection {
            background: #fef2f2;
            border: 1px dashed #ef4444;
        }

        /* ========== 検索バー ========== */
        .search-filter-area {
            background: white;
            padding: 15px;
            border-radius: 50px;
            box-shadow: var(--card-shadow);
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .search-icon {
            font-size: 1.2rem;
            margin-left: 10px;
        }

        .search-box {
            flex: 1;
            padding: 10px 15px;
            border: none;
            font-size: 1rem;
            background: transparent;
        }

        .search-box:focus {
            outline: none;
        }

        /* 検索ボックス下のヘッダーエリア */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 30px 0 20px;
        }

        .section-header h2 {
            margin: 0;
            /* h2のデフォルトマージンをリセット */
        }

        .btn-section-favorite {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: white;
            color: #f43f5e;
            padding: 8px 16px;
            border-radius: 20px;
            text-decoration: none;
            font-weight: 700;
            font-size: 0.9rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: all 0.2s;
            border: 1px solid #ffe4e6;
        }

        .btn-section-favorite:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2);
            background: #fff1f2;
        }

        .search-box::placeholder {
            color: var(--text-muted);
        }

        /* ========== 商品グリッド ========== */
        .product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 25px;
        }

        .product-card {
            background: white;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            cursor: pointer;
        }

        .product-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        }

        .product-img-wrapper {
            position: relative;
            overflow: hidden;
        }

        .product-img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            transition: transform 0.4s ease;
        }

        .product-card:hover .product-img {
            transform: scale(1.08);
        }

        .product-info {
            padding: 20px;
        }

        .product-info h3 {
            margin: 0 0 8px;
            font-size: 1.05rem;
            font-weight: 700;
            line-height: 1.4;
            color: var(--text);
        }

        .price {
            font-weight: 800;
            color: var(--primary);
            font-size: 1.3rem;
        }

        .stock-info {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 6px;
        }

        /* ========== バッジ類 ========== */
        .digital-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.7rem;
            z-index: 10;
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
        }

        .physical-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.7rem;
            z-index: 10;
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
        }

        .sold-out-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.7rem;
            z-index: 10;
        }

        .archived-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.7rem;
            z-index: 10;
        }

        .product-card.archived {
            opacity: 0.7;
        }

        .product-card.archived .product-img {
            filter: grayscale(50%);
        }

        /* 管理者用ボタン */
        .admin-actions {
            position: absolute;
            top: 50px;
            right: 8px;
            display: flex;
            gap: 6px;
            z-index: 20;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .product-card:hover .admin-actions {
            opacity: 1;
        }

        .btn-admin-action {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .btn-admin-action:hover {
            transform: scale(1.1);
        }

        .btn-delete-product {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
        }

        .btn-archive-product {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
        }

        .btn-unarchive-product {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
        }

        .liver-badge {
            display: inline-block;
            background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 0.7rem;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .product-card.sold-out .product-img {
            filter: grayscale(100%);
            opacity: 0.6;
        }

        /* ========== ボタン ========== */
        button {
            cursor: pointer;
            border: none;
            font-family: inherit;
        }

        .btn-add-cart {
            background: var(--primary);
            color: white;
            padding: 12px;
            width: 100%;
            margin-top: 12px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 0.9rem;
            transition: all 0.2s;
        }

        .btn-add-cart:hover:not(:disabled) {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
        }

        .btn-add-cart:disabled {
            background: #e2e8f0;
            color: #94a3b8;
            cursor: not-allowed;
        }

        .btn-sample-play {
            background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
            color: white;
            padding: 8px 14px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin-top: 10px;
            transition: all 0.2s;
        }

        .btn-sample-play:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        }

        .btn-sample-play.playing {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        }

        /* ========== お気に入りボタン ========== */
        .btn-favorite {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(4px);
            border: none;
            border-radius: 20px;
            height: 32px;
            padding: 0 10px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.1rem;
            cursor: pointer;
            z-index: 20;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s, background 0.2s;
            color: #d1d5db;
            gap: 4px;
        }

        .btn-favorite.active {
            color: #e11d48;
            background: white;
        }

        .btn-favorite:hover {
            transform: scale(1.05);
        }

        .fav-count {
            font-size: 0.8rem;
            font-weight: 700;
            color: #64748b;
        }

        .btn-favorite.active .fav-count {
            color: #e11d48;
        }

        /* ========== カートFAB ========== */
        #cartFab {
            position: fixed;
            bottom: 25px;
            right: 25px;
            background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 200;
            transition: all 0.3s;
        }

        #cartFab:hover {
            transform: scale(1.1) rotate(-5deg);
            box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
        }

        #cartBadge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--accent);
            color: white;
            font-size: 0.75rem;
            font-weight: 700;
            min-width: 22px;
            height: 22px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 2px solid white;
        }

        /* ========== モーダル共通 ========== */
        #cartModal,
        #productDetailModal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(8px);
            z-index: 300;
            display: none;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        @keyframes modalPop {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(10px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .cart-content,
        .detail-content {
            background: white;
            width: 100%;
            max-width: 480px;
            border-radius: 24px;
            padding: 25px;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
            animation: modalPop 0.3s ease-out;
        }

        .modal-header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .detail-image {
            display: block;
            margin: 0 auto 15px auto;
            max-width: 100%;
            max-height: 400px;
            width: auto;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            object-fit: contain;
        }

        /* ========== カート内アイテム & モーダル内パーツ ========== */
        .cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f1f5f9;
        }

        .cart-item:last-child {
            border-bottom: none;
        }

        .cart-item span:first-child {
            font-weight: 500;
            color: #334155;
            flex: 1;
            padding-right: 15px;
        }

        .cart-item span:last-child {
            font-weight: 700;
            color: #0f172a;
            white-space: nowrap;
            display: flex;
            align-items: center;
        }

        .cart-total {
            margin-top: 20px;
            text-align: right;
            font-size: 1.25rem;
            font-weight: 800;
            color: #0f172a;
            padding-top: 15px;
            border-top: 2px dashed #e2e8f0;
        }

        .btn-checkout {
            display: block;
            width: 100%;
            padding: 16px;
            margin-top: 25px;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            font-weight: 700;
            font-size: 1.1rem;
            border-radius: 16px;
            text-align: center;
            border: none;
            transition: all 0.2s;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }

        .btn-checkout:disabled {
            background: #cbd5e1;
            cursor: not-allowed;
            box-shadow: none;
        }

        .btn-checkout:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
        }

        /* ========== 画像トリミングモーダル ========== */
        #cropModal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            display: none;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding: 20px;
        }

        .crop-container {
            max-width: 90%;
            max-height: 80vh;
            overflow: hidden;
            background: #333;
        }

        #cropImage {
            max-width: 100%;
            display: block;
        }

        .crop-actions {
            margin-top: 20px;
            display: flex;
            gap: 15px;
        }

        .btn-crop-confirm {
            background: #10b981;
            color: white;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: bold;
            border: none;
            cursor: pointer;
        }

        .btn-crop-cancel {
            background: #64748b;
            color: white;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: bold;
            border: none;
            cursor: pointer;
        }

        /* 画像リスト用スタイル */
        .img-thumb-wrapper {
            position: relative;
            width: 80px;
            height: 80px;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #e2e8f0;
        }

        .img-thumb-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .btn-remove-img {
            position: absolute;
            top: 2px;
            right: 2px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .btn-remove-img:hover {
            background: #ef4444;
        }

        /* ========== フィルタバッジ ========== */
        .filter-status-container {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
        }

        .filter-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #e0f2fe;
            color: #0369a1;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 700;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            transition: all 0.2s;
            animation: fadeIn 0.3s ease;
        }

        .filter-badge:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .filter-badge .btn-close {
            border: none;
            background: rgba(255, 255, 255, 0.5);
            color: currentColor;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            font-size: 14px;
            line-height: 1;
            padding: 0;
            transition: all 0.2s;
        }

        .filter-badge .btn-close:hover {
            background: rgba(255, 255, 255, 0.8);
            transform: scale(1.1);
        }

        .filter-badge.type-pink {
            background: #ffe4e6;
            color: #e11d48;
        }

        .filter-badge.type-purple {
            background: #f3e8ff;
            color: #9333ea;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ========== 画像拡大モーダル ========== */
        .zoom-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            padding-top: 50px;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgb(0, 0, 0);
            background-color: rgba(0, 0, 0, 0.9);
            align-items: center;
            justify-content: center;
        }

        .zoom-modal-content {
            margin: auto;
            display: block;
            width: 80%;
            max-width: 700px;
            max-height: 90%;
            object-fit: contain;
            animation-name: zoom;
            animation-duration: 0.6s;
        }

        @keyframes zoom {
            from {
                transform: scale(0)
            }

            to {
                transform: scale(1)
            }
        }

        .zoom-close {
            position: absolute;
            top: 15px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
            cursor: pointer;
            z-index: 2001;
        }

        .zoom-close:hover,
        .zoom-close:focus {
            color: #bbb;
            text-decoration: none;
            cursor: pointer;
        }

        @media only screen and (max-width: 700px) {
            .zoom-modal-content {
                width: 95%;
            }

            /* ========== 編集モード ========== */
            .admin-content.editing {
                border: 2px solid #f59e0b;
                background: #fffbeb;
            }

            .admin-content.editing::before {
                content: '📝 編集中';
                display: block;
                background: #f59e0b;
                color: white;
                padding: 5px 10px;
                font-weight: bold;
                font-size: 0.8rem;
                border-radius: 4px;
                width: fit-content;
                margin-bottom: 10px;
            }

            .img-thumb-wrapper.existing {
                border-color: #f59e0b;
            }
        }