        :root {
            --primary: #6366f1;
            --accent: #8b5cf6;
            --text: #1e293b;
            --text-muted: #64748b;
            --danger: #ef4444;
            --success: #10b981;
        }

        * {
            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: 800px;
            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%, var(--accent) 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);
        }

        /* 管理者用追加ボタン */
        #btnAddMessage {
            display: none;
            background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
            transition: all 0.2s;
            align-items: center;
            gap: 8px;
        }

        #btnAddMessage:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
        }

        /* メッセージボックス */
        .message-box {
            background: white;
            padding: 35px;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
            animation: fadeUp 0.5s ease-out both;
        }

        @keyframes fadeUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
        }

        .message-title {
            font-size: 1.2rem;
            font-weight: 800;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #f1f5f9;
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: space-between;
            /* 編集ボタン用 */
            gap: 8px;
        }

        .message-body {
            font-size: 1rem;
            line-height: 2;
            margin-bottom: 25px;
            color: var(--text);
            white-space: pre-wrap;
            /* 改行を反映 */
        }

        .message-signature {
            text-align: right;
            font-weight: 800;
            font-size: 1.1rem;
            color: var(--text);
        }

        .message-role {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-right: 8px;
        }

        /* 管理者アクション */
        .admin-actions {
            display: flex;
            gap: 10px;
        }

        .btn-icon {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.1rem;
            transition: transform 0.2s;
            padding: 5px;
        }

        .btn-icon:hover {
            transform: scale(1.2);
        }

        .btn-edit {
            color: var(--primary);
        }

        .btn-delete {
            color: var(--danger);
        }

        /* モーダル */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 20px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
            animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
        }

        @keyframes popIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 700;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 1rem;
            transition: all 0.2s;
            font-family: inherit;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 20px;
        }

        .btn-modal {
            padding: 10px 20px;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
        }

        .btn-cancel {
            background: #f1f5f9;
            color: var(--text-muted);
        }

        .btn-save {
            background: var(--primary);
            color: white;
        }

        .btn-save:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
        }

        /* フッター余白 */
        .footer-space {
            height: 30px;
        }

        @media (max-width: 639px) {
            .page-header {
                padding: 20px;
            }

            .page-title {
                font-size: 1.2rem;
            }

            .message-box {
                padding: 25px 20px;
            }

            .message-body {
                font-size: 0.95rem;
                line-height: 1.9;
            }

            .back-btn {
                padding: 8px 16px;
                font-size: 0.85rem;
            }
        }