:root {
            --primary-color: #4a90e2;
            --record-color: #e67e22;
            --bg-color: #f5f7fa;
            --panel-color: #ffffff;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--bg-color);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            margin: 0;
            color: #333;
        }

        .container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
            max-width: 1000px;
        }

        .controls {
            background: var(--panel-color);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            width: 350px;
        }

        .image-slot {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            padding: 10px;
            background: #f9f9f9;
            border-radius: 8px;
            border: 1px solid #eee;
            gap: 10px;
        }

        .image-drop-panel {
            margin-bottom: 14px;
        }

        .image-list {
            display: grid;
            gap: 8px;
        }

        .slot-info {
            font-size: 0.8rem;
            font-weight: bold;
        }

        .thumbnail {
            width: 50px;
            height: 50px;
            background: #ddd;
            border-radius: 4px;
            object-fit: contain;
        }

        .drop-zone {
            border: 2px dashed #b9c4d2;
            border-radius: 8px;
            padding: 18px 14px;
            transition: 0.3s;
            background: #fafafa;
            cursor: pointer;
            text-align: center;
        }

        .drop-zone.drag-over {
            border-color: var(--primary-color);
            background: #eef6ff;
        }

        .drop-title {
            font-size: 0.95rem;
            font-weight: bold;
            margin-bottom: 6px;
        }

        .drop-text {
            color: #58606b;
            font-size: 0.78rem;
            line-height: 1.5;
            margin-bottom: 12px;
        }

        .slider-group {
            margin: 15px 0;
        }

        .slider-group label {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
        }

        .buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 10px;
        }

        button {
            padding: 10px;
            border: none;
            border-radius: 6px;
            background: var(--primary-color);
            color: white;
            font-weight: bold;
            cursor: pointer;
        }

        button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        button.secondary {
            background: #6c757d;
            font-size: 0.75rem;
            width: 150px;
        }

        #stopBtn {
            background: #e74c3c;
        }

        #recordBtn {
            background: var(--record-color);
            grid-column: span 2;
        }

        .preview-area {
            background: var(--panel-color);
            padding: 10px;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        /* キャンバス背景を透明に配慮（チェッカー柄などはCSSで可能） */
        canvas {
            background: #eee;
            border-radius: 8px;
            max-width: 100%;
        }

        .status {
            font-size: 1.3rem;
            text-align: center;
            margin-top: 10px;
            font-weight: bold;
            color: var(--record-color);
            max-width: 512px;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .ad {
            height: 100px!important;
        }
