/* <style> */
/* sns_imakun.css */
        /* CSSは変更なし */
        body {
            margin: 0;
            background: #0f0f0f;
            font-family: 'Segoe UI', sans-serif;
            overflow: hidden;
            color: #fff;
        }

        #waveCanvas {
            position: fixed;
            top: 0; 
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 0;
        }

        /* UIコンテナ（スマホ縦横対応） */
        #ui {
            position: absolute;
            bottom: calc(4% + env(safe-area-inset-bottom));
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 600px;
            z-index: 10;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* メッセージ表示エリア */
        #chat-log {
            max-height: 40vh;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 10px;
            background: rgba(0, 0, 0, 0.4);
            border-radius: 12px;
            backdrop-filter: blur(5px);
            margin-bottom: 10px;
        }

        .chat-message {
            padding: 8px 12px;
            border-radius: 10px;
            max-width: 80%;
            line-height: 1.4;
        }

        .user-message {
            align-self: flex-end;
            background-color: #007bff;
            color: white;
            border-bottom-right-radius: 2px;
        }

        .ai-message {
            align-self: flex-start;
            background-color: #2c2c2c;
            color: white;
            border-bottom-left-radius: 2px;
        }

        /* 入力エリア */
        #input-area {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        #voice-input {
            flex-grow: 1;
            padding: 12px;
            border-radius: 25px;
            border: none;
            background: #333;
            color: white;
            font-size: 16px;
            outline: none;
        }
        #voice-input::placeholder {
            color: #aaa;
        }

        /* ボタン共通 */
        .control-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
            flex-shrink: 0; /* 縮小防止 */
        }
        .control-btn:active {
            box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
            transform: translateY(1px);
        }

        /* マイク/送信ボタン */
        #send-btn {
            background-color: #1a73e8;
            color: white;
            font-size: 24px;
        }
        #send-btn.listening {
            background-color: #d93025; /* 赤色で録音中 */
        }
        #send-btn:disabled {
            background-color: #555;
            cursor: not-allowed;
        }
        
        /* ログボタン */
        #log-btn {
            background-color: #28a745; /* 緑色 */
            color: white;
            font-size: 14px;
            padding: 0 10px;
            width: auto;
            border-radius: 25px;
            height: 50px;
            line-height: 50px;
            font-weight: bold;
        }

        /* ステータス表示 */
        #status {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #ddd;
            font-size: 1.5em;
            background: rgba(0, 0, 0, 0.5);
            padding: 10px 20px;
            border-radius: 15px;
            transition: opacity 0.5s;
            pointer-events: none;
            white-space: nowrap;
        }
        /* --- 追加：タイムライン表示エリア --- */
        #timeline-container {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 15px;
            margin-bottom: 10px;
            max-height: 25vh; /* 画面の1/4程度に収める */
            overflow-y: auto;
            border: 1px solid rgba(255, 255, 255, 0.1);
}
#timeline-container h3 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#timeline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    animation: fadeIn 0.5s ease-out;
}

.post-content {
    font-size: 0.95em;
    line-height: 1.4;
    margin-bottom: 4px;
}

.post-date {
    font-size: 0.75em;
    color: #777;
    text-align: right;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* スクロールバーのカスタマイズ */
#timeline-container::-webkit-scrollbar,
#chat-log::-webkit-scrollbar {
    width: 4px;
}
#timeline-container::-webkit-scrollbar-thumb,
#chat-log::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* チャットログの高さを調整（タイムラインがあるため） */
#chat-log {
    max-height: 30vh;
}
        /* メッセージボックス */
        #message-box {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #333;
            color: white;
            padding: 15px 30px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
            pointer-events: none;
            text-align: center;
        }
        #message-box.visible {
            opacity: 1;
        }
    /* </style> */