@charset "utf-8";
/* CSS Document */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            min-height: 100svh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0px;
            color: #fff;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            letter-spacing: -1px;
        }

        .subtitle {
            font-size: 1rem;
            opacity: 0.9;
            margin-bottom: 30px;
        }

        .container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            max-width: 1200px;
            width: 100%;
        }

        .controls {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
            justify-content: center;
            flex-wrap: wrap; position: fixed; bottom: 0; left: 0; width: 100%;
        }

        button {
            padding: 14px 30px;
            font-size: 16px;
            font-weight: 600;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        #shutterBtn {
            width: 80px;
            height: 80px;
            padding: 0;
            border-radius: 50%;
            border: 10px solid #000;
            background: #fff;
            box-sizing: border-box;
        }

        #shutterBtn:hover:not(:disabled) {
            transform: translateY(-2px);
        }

        #shutterBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* アイコンボタン共通（背景なし・テキストなし） */
        .btn-icon {
            background: none;
            color: #000;
            padding: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .btn-icon .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
        }

        #resetBtn {
            position: fixed;
            top: 12px;
            left: 12px;
            z-index: 100;
        }

        #resetBtn:hover {
            transform: translateY(-2px);
        }

        #downloadBtn {
            position: fixed;
            top: 12px;
            right: 12px;
            z-index: 100;
        }

        #downloadBtn:hover {
            transform: translateY(-2px);
        }

        #musicBtn {
            width: 80px;
            height: 80px;
            padding: 0;
            border-radius: 50%;
            background: #fff;
            color: #000;
            font-size: 60px;
            box-sizing: border-box;
        }
        #musicBtn .material-symbols-outlined {
            font-size: 60px;
        }

        #musicBtn:hover:not(:disabled) {
            transform: translateY(-2px);
        }

        #musicBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        #musicStopBtn {
            width: 80px;
            height: 80px;
            padding: 0;
            border-radius: 50%;
            background: #fff;
            color: #000;
            font-size: 60px;
            box-sizing: border-box;
        }
        #musicStopBtn .material-symbols-outlined {
            font-size: 60px;
        }

        #musicStopBtn:hover {
            transform: translateY(-2px);
        }

        .video-container {
            position: relative;
            justify-content: center;
            margin-bottom: 25px;
            background: #000;
            overflow: hidden;
            display: none; position: fixed; top:50%; left: 0; transform: translateY(-50%); width: 100%;
        }

        .video-container.active {
            display: flex;
        }

        .canvas-container {
            display: none; position: fixed; top:50%; left: 0; transform: translateY(-50%); width: 100%;
        }

        .canvas-container.active {
            display: flex;
        }

        #video {
            max-width: 100%;
            display: block;
        }

        #overlay {
            position: absolute;
            top: 0;
            left: 0;
            pointer-events: none;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .canvas-container {
            display: flex;
            justify-content: center;
            background: #ffffff;
            border-radius: 0px;
            overflow: hidden;
            min-height: 400px;
            align-items: center;
        }

        #canvasA {
            max-width: 100%;
            display: block;
        }

        .status {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 68px;
            z-index: 1;
            margin: 0;
            padding: 0 68px;
            box-sizing: border-box;
            background: #fff;
            color: #000;
            font-weight: 600;
            font-size: 80%;
            border-radius: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .status__text {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        /* 処理中: status下部の横方向ローディングバー */
        .status-loading {
            display: none;
            position: fixed;
            top: 68px;
            left: 0;
            width: 100%;
            height: 4px;
            background: rgba(0, 0, 0, 0.08);
            z-index: 1;
            overflow: hidden;
        }
        .status-loading.active {
            display: block;
        }
        .status-loading__bar {
            height: 100%;
            width: 40%;
            background: #000;
            animation: status-loading 1.5s ease-in-out infinite;
        }
        @keyframes status-loading {
            0% { transform: translateX(-100%); }
            50% { transform: translateX(350%); }
            100% { transform: translateX(-100%); }
        }

        .loading {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 9999;
            text-align: center;
            padding: 20px;
            color: #fff;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .loading.active {
            display: flex;
        }

        .spinner {
            border: 4px solid rgba(255, 255, 255, 0.1);
            border-left-color: #FFF;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

