        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --accent: #f43f5e;
            --text: #1e293b;
            --text-muted: #64748b;
            --border: #e2e8f0;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
            color: var(--text);
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 30px 20px;
        }

        .container {
            max-width: 1100px;
            margin: 0 auto;
        }

        /* ヘッダー */
        .page-header {
            background: white;
            padding: 25px 30px;
            border-radius: 20px;
            margin-bottom: 25px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }

        .page-title {
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .page-title::before {
            content: '👥';
            font-size: 1.4rem;
        }

        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: white;
            text-decoration: none;
            background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
            padding: 10px 20px;
            border-radius: 25px;
            font-size: 0.9rem;
            font-weight: 600;
            transition: all 0.2s;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        }

        .back-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
        }

        /* 管理者パネル */
        #adminPanel {
            background: white;
            padding: 0;
            margin-bottom: 25px;
            border-radius: 20px;
            display: none;
            overflow: hidden;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        }

        .admin-toggle {
            background: linear-gradient(135deg, var(--accent) 0%, #ec4899 100%);
            color: white;
            padding: 15px 25px;
            width: 100%;
            border: none;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .admin-toggle .arrow {
            transition: transform 0.3s;
        }

        .admin-toggle.open .arrow {
            transform: rotate(180deg);
        }

        .admin-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease, padding 0.4s ease;
        }

        .admin-content.open {
            max-height: 500px;
            padding: 20px;
        }

        .admin-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 12px;
        }

        .admin-form input {
            padding: 12px 15px;
            border: 2px solid var(--border);
            border-radius: 10px;
            font-size: 0.95rem;
            background: #f8fafc;
            transition: all 0.2s;
        }

        .admin-form input:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .btn-add {
            background: linear-gradient(135deg, var(--accent) 0%, #ec4899 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 700;
            transition: all 0.2s;
        }

        .btn-add:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
        }

        #uploadStatus {
            grid-column: 1 / -1;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        /* グリッド */
        .grid-container {
            display: grid;
            gap: 20px;
            grid-template-columns: repeat(2, 1fr);
        }

        @media (min-width: 640px) {
            .grid-container {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        @media (min-width: 1024px) {
            .grid-container {
                grid-template-columns: repeat(5, 1fr);
            }
        }

        /* メンバーカード */
        .member-card {
            display: block;
            position: relative;
            text-decoration: none;
            aspect-ratio: 1 / 1;
            background: white;
            border-radius: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .member-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
        }

        .member-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
        }

        .member-card:hover img {
            transform: scale(1.1);
        }

        .member-name-tag {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
            color: #fff;
            font-size: 0.85rem;
            font-weight: 700;
            padding: 25px 12px 10px;
            text-align: center;
        }

        .btn-delete {
            position: absolute;
            top: 8px;
            right: 8px;
            background: var(--accent);
            color: white;
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 14px;
            opacity: 0;
            transition: opacity 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .member-card:hover .btn-delete {
            opacity: 1;
        }

        /* 管理者用ボタン */
        .admin-actions {
            position: absolute;
            top: 8px;
            right: 8px;
            display: flex;
            gap: 6px;
            z-index: 20;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .member-card:hover .admin-actions {
            opacity: 1;
        }

        .btn-admin-action {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            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-liver {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
        }

        .btn-archive-liver {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
        }

        .btn-unarchive-liver {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
        }

        .archived-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 15px;
            font-weight: 700;
            font-size: 0.65rem;
            z-index: 10;
        }

        .member-card.archived {
            opacity: 0.65;
        }

        .member-card.archived img {
            filter: grayscale(50%);
        }

        .loading {
            text-align: center;
            color: white;
            font-size: 1rem;
            padding: 40px;
            grid-column: 1 / -1;
        }

        /* フッター余白 */
        .footer-space {
            height: 50px;
        }

        @media (max-width: 639px) {
            .page-header {
                padding: 20px;
            }

            .page-title {
                font-size: 1.2rem;
            }

            .back-btn {
                padding: 8px 16px;
                font-size: 0.85rem;
            }

            .grid-container {
                gap: 12px;
            }

            .member-name-tag {
                font-size: 0.75rem;
                padding: 20px 8px 8px;
            }
        }