        :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;
        }

        /* ========== ヘッダー ========== */
        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: 800px;
            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;
        }

        .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);
        }

        .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: 8px;
            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: white;
            border: none;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.2rem;
            cursor: pointer;
            z-index: 20;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s;
            color: #d1d5db;
        }

        .btn-favorite.active {
            color: #e11d48;
        }

        .btn-favorite:hover {
            transform: scale(1.1);
        }

        /* ========== カート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;
        }

        .modal-header-row h3 {
            margin: 0;
            font-size: 1.3rem;
            font-weight: 800;
        }

        .btn-close {
            background: #f1f5f9;
            padding: 8px 16px;
            font-size: 0.85rem;
            border-radius: 20px;
            color: var(--text-muted);
            font-weight: 600;
            transition: all 0.2s;
        }

        .btn-close:hover {
            background: #e2e8f0;
            color: var(--text);
        }

        .cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 0;
            border-bottom: 1px solid #f1f5f9;
        }

        .cart-total {
            font-size: 1.3rem;
            font-weight: 800;
            text-align: right;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 2px solid #f1f5f9;
        }

        .btn-checkout {
            background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
            color: white;
            width: 100%;
            padding: 16px;
            margin-top: 15px;
            border-radius: 14px;
            font-size: 1rem;
            font-weight: 700;
            box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
            transition: all 0.2s;
        }

        .btn-checkout:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
        }

        .btn-checkout:disabled {
            background: #cbd5e1;
            box-shadow: none;
            cursor: not-allowed;
        }

        /* ========== 詳細モーダル ========== */
        #productDetailModal {
            z-index: 400;
        }

        .detail-content {
            max-width: 550px;
            padding: 0;
            overflow: hidden;
        }

        .detail-image {
            width: 100%;
            height: 280px;
            object-fit: cover;
        }

        .detail-body {
            padding: 25px;
        }

        .detail-body h3 {
            margin: 0 0 10px;
            font-size: 1.4rem;
            font-weight: 800;
        }

        .detail-price {
            font-size: 1.6rem;
            font-weight: 800;
            color: var(--primary);
            margin-bottom: 15px;
        }

        .detail-description {
            color: var(--text-muted);
            line-height: 1.7;
            margin-bottom: 20px;
            white-space: pre-wrap;
            font-size: 0.95rem;
        }

        .detail-actions {
            display: flex;
            gap: 10px;
        }

        .detail-actions .btn-add-cart {
            flex: 1;
            margin: 0;
        }

        /* ========== 履歴セクション ========== */
        #historySection {
            margin-top: 50px;
            padding-top: 30px;
            border-top: 1px solid var(--border);
        }

        #historySection h2::before {
            content: '📋';
        }

        #orderList {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        #orderList li {
            background: white;
            padding: 18px;
            border-radius: 14px;
            margin-bottom: 12px;
            box-shadow: var(--card-shadow);
        }

        /* ========== ユーティリティ ========== */
        .hidden {
            display: none !important;
        }

        /* ========== レスポンシブ ========== */
        @media (max-width: 639px) {
            header {
                padding: 12px 16px;
            }

            .logo-link {
                font-size: 1.2rem;
            }

            .btn-header {
                padding: 6px 14px;
                font-size: 0.8rem;
            }

            #userEmail {
                display: none;
            }

            .container {
                padding: 20px 15px 100px;
            }

            h2 {
                font-size: 1.3rem;
                margin: 20px 0 15px;
            }

            .product-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }

            .product-img {
                height: 150px;
            }

            .product-info {
                padding: 14px;
            }

            .product-info h3 {
                font-size: 0.9rem;
            }

            .price {
                font-size: 1.1rem;
            }

            .btn-add-cart {
                padding: 10px;
                font-size: 0.8rem;
            }

            .search-filter-area {
                padding: 12px 15px;
                margin-bottom: 20px;
            }

            .search-box {
                font-size: 0.9rem;
            }

            .admin-form-group {
                grid-template-columns: 1fr;
            }

            .admin-content.open {
                max-height: 1200px;
            }

            #cartFab {
                width: 55px;
                height: 55px;
                font-size: 1.3rem;
            }
        }

        /* ========== 画像拡大モーダル ========== */
        .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%;
            }
        }
/* [_irQ[V */
.zoom-modal .prev, .zoom-modal .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
  background-color: rgba(0,0,0,0.3);
}
.zoom-modal .next {
  right: 0;
  border-radius: 3px 0 0 3px;
}
.zoom-modal .prev {
  left: 0;
  border-radius: 3px 0 0 3px;
}
.zoom-modal .prev:hover, .zoom-modal .next:hover {
  background-color: rgba(0,0,0,0.8);
}


/* M[irQ[V */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0,0,0,0.3);
    z-index: 2002;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.gallery-counter {
    color: #f2f2f2;
    font-size: 14px;
    padding: 8px 12px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    border-radius: 15px;
    z-index: 2002;
    font-weight: bold;
}

