@charset "UTF-8";

/* =========================================
   配色設定（シック＆モダン）
   ========================================= */
:root {
    /* メインカラー: 知的なダークネイビー */
    --primary: #3b82f6;       /* 明るめのロイヤルブルー */
    --primary-light: #dbeafe; /* 極薄いブルー */
    
    /* セカンダリ: アクセント（オレンジ） */
    --secondary: #f97316;     /* 鮮やかなオレンジ */
    --secondary-light: #ffedd5; 

    /* テキストカラー */
    --text: #1e293b;          /* ほぼ黒に近いダークネイビー */
    --text-light: #64748b;    /* 落ち着いたグレー */
    
    /* 背景色 */
    --bg: #f0f2f5;            /* 清潔感のあるソフトグレー */
    --white: #ffffff;
    
    /* ボーダー */
    --border: #e2e8f0;        /* 薄いグレー */
    
    /* 状態色 */
    --success: #10b981;       /* エメラルドグリーン */
    --danger: #ef4444;        /* ソフトレッド */
    
    /* 影（少し濃くして浮遊感を出す） */
    --shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
}

html, body {
    height: 100%; margin: 0; padding: 0;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
    background-color: #e2e8f0; /* PC背景色 */
    color: var(--text); 
    overflow: hidden;
}

/* スマホ枠 (基準) */
.mobile-wrapper {
    width: 100%; max-width: 480px; height: 100%;
    background: var(--bg); margin: 0 auto;
    display: flex; flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    overflow: hidden;
}
body.admin-mode .mobile-wrapper { border-left: 1px solid #cbd5e1; border-right: 1px solid #cbd5e1; }

/* 認証画面 */
.auth-layout { 
    background: var(--bg); /* シンプルなグレー背景 */
    justify-content: center; align-items: center; 
}
.auth-card { 
    width: 85%; max-width: 340px; 
    background: white; 
    padding: 30px 25px; 
    border-radius: 20px; 
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05); 
    text-align: center; 
    border: 1px solid white;
}
.auth-logo { width: 60px; margin-bottom: 15px; border-radius: 12px; }
.auth-title { font-size: 20px; font-weight: bold; margin-bottom: 5px; color: var(--text); }
.auth-sub { font-size: 12px; color: var(--text-light); margin-bottom: 30px; }

.input-group { position: relative; margin-bottom: 15px; text-align: left; }
.input-group i { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #94a3b8; font-size: 14px; pointer-events: none; transition: 0.2s; }
.input-group input { 
    width: 100%; padding: 12px 15px 12px 40px; 
    border: 2px solid var(--bg); /* 背景に馴染ませる */
    border-radius: 10px; 
    font-size: 14px; 
    background: #f8fafc; 
    box-sizing: border-box; 
    transition: 0.2s; 
    outline: none; 
    color: var(--text);
}
.input-group input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.input-group input:focus + i { color: var(--primary); }

/* ヘッダー */
.header { 
    flex: 0 0 auto; height: 56px; 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(10px); 
    border-bottom: 1px solid var(--border); 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0 20px; z-index: 100; 
}
.header h2 { margin: 0; font-size: 16px; color: var(--text); font-weight: bold; }

/* コンテンツ */
.content-view { flex: 1; overflow: hidden; position: relative; background: var(--bg); }
.view-section { width: 100%; height: 100%; display: flex; flex-direction: column; }
.scroll-container { flex: 1; overflow-y: auto; padding: 15px; -webkit-overflow-scrolling: touch; }
.content-scroll { flex: 1; overflow-y: auto; }

.user-info-bar { 
    padding: 12px 20px; background: #fff; 
    border-bottom: 1px solid var(--border); 
    font-size: 12px; color: var(--text-light); 
}
.team-badge { 
    background: #f1f5f9; 
    border: 1px solid #cbd5e1; 
    color: #475569; 
    padding: 2px 8px; border-radius: 10px; margin-left: 5px; font-weight: bold; 
}

.card { 
    background: #fff; border-radius: 12px; 
    box-shadow: var(--shadow); margin-bottom: 15px; overflow: hidden; 
    border: 1px solid rgba(0,0,0,0.02);
}

/* リストアイテム */
.list-item { background: #fff; padding: 15px 20px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: 0.2s; }
.list-item:last-child { border-bottom: none; }
.list-item:active { background: #f8fafc; }
.list-cat { font-size: 10px; color: var(--text-light); margin-bottom: 4px; display: inline-block; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; font-weight: bold; }
.list-title { font-size: 15px; font-weight: bold; margin-bottom: 6px; color: var(--text); }
.list-desc { font-size: 12px; color: var(--text-light); line-height: 1.4; }

.menu-grid { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.menu-card { 
    background: white; border-radius: 16px; padding: 20px; 
    box-shadow: var(--shadow); display: flex; align-items: center; 
    cursor: pointer; transition: 0.2s; border: 1px solid transparent; 
}
.menu-card:active { transform: scale(0.98); background: #f8fafc; }
.menu-icon { 
    width: 48px; height: 48px; border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 20px; color: white; margin-right: 15px; flex-shrink: 0; 
}
.menu-text h3 { margin: 0 0 4px 0; font-size: 16px; color: var(--text); }
.menu-text p { margin: 0; font-size: 12px; color: var(--text-light); }

/* 詳細画面 */
.detail-fixed-header { flex: 0 0 auto; background: #fff; border-bottom: 1px solid var(--border); z-index: 50; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.mode-switch-container { padding: 12px 20px 8px 20px; }
.mode-switch-bg { background: #f1f5f9; border-radius: 12px; display: flex; padding: 4px; width: 100%; }
.mode-option { flex: 1; text-align: center; padding: 8px 0; border-radius: 8px; font-size: 13px; font-weight: bold; color: #94a3b8; cursor: pointer; transition: 0.2s; }
.mode-option.active { background: #fff; color: var(--text); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.mode-switch-bg.record-mode .mode-option.active { background: #1e293b; color: #fff; }

.scenario-header { padding: 5px 20px 15px 20px; }
.key-point-box { 
    background: #fff7ed; /* 薄いオレンジ */
    padding: 12px; border-radius: 12px; font-size: 13px; line-height: 1.6; 
    color: #431407; border: 1px solid #ffedd5; margin-top: 10px; 
}
.kp-label { font-weight: bold; color: #ea580c; margin-right: 5px; background: rgba(255, 255, 255, 0.5); padding: 2px 6px; border-radius: 4px; font-size: 11px; }

.script-scroll-area { flex: 1; overflow-y: auto; padding: 20px 20px 150px; background: #fff; }
.script-row { margin-bottom: 20px; display: flex; flex-direction: column; opacity: 0; animation: slideIn 0.3s forwards; }
.speaker-label { font-size: 11px; margin-bottom: 6px; font-weight: bold; padding: 0 4px; }
.script-text { padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.6; display: inline-block; max-width: 85%; position: relative; word-wrap: break-word; }
.row-folio { align-items: flex-start; }
.row-folio .speaker-label { color: var(--primary); margin-left: 4px; }
.row-folio .script-text { background: var(--primary-light); color: #1e3a8a; border-top-left-radius: 4px; }
.row-prospect { align-items: flex-end; }
.row-prospect .speaker-label { color: #94a3b8; margin-right: 4px; }
.row-prospect .script-text { background: #f1f5f9; color: #475569; border-top-right-radius: 4px; }
.script-hidden-placeholder { margin-top: 50px; height: 200px; display: flex; align-items: center; justify-content: center; border: 2px dashed #e2e8f0; border-radius: 12px; background: #f8fafc; }

/* プレイヤー */
.bottom-player-container { flex: 0 0 auto; background: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,0.05); padding-bottom: max(20px, env(safe-area-inset-bottom)); z-index: 100; border-top: 1px solid var(--border); }
.seek-bar { width: 100%; margin: 0; cursor: pointer; height: 4px; -webkit-appearance: none; background: #e2e8f0; }
.seek-bar::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.controls-row { display: flex; justify-content: space-between; align-items: flex-end; padding: 10px 25px 5px 25px; }
.ctrl-btn { display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.1s; cursor: pointer; }
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn.small { width: 40px; height: 40px; color: #64748b; font-size: 16px; background: #f1f5f9; }
.ctrl-btn.large.play { width: 64px; height: 64px; background: var(--primary); color: white; font-size: 26px; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
.ctrl-btn.large.rec { width: 64px; height: 64px; background: var(--danger); color: white; font-size: 26px; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); border: 3px solid #fff; outline: 2px solid var(--danger); }
.ctrl-label { font-size: 10px; color: #94a3b8; margin-top: 6px; font-weight: bold; text-align: center; }

/* Admin */
.admin-tabs { display: flex; background: #1e293b; padding: 0 10px; }
.admin-tab { flex: 1; text-align: center; padding: 12px 0; color: #94a3b8; font-size: 12px; cursor: pointer; border-bottom: 3px solid transparent; transition: 0.2s; }
.admin-tab.active { color: #fff; border-bottom-color: var(--primary); font-weight: bold; }
.filter-bar { display: flex; gap: 8px; overflow-x: auto; }
.filter-chip { font-size: 12px; padding: 6px 12px; border-radius: 20px; background: #fff; border: 1px solid #e2e8f0; color: #64748b; cursor: pointer; white-space: nowrap; }
.filter-chip.active { background: #1e293b; color: #fff; border-color: #1e293b; }
.admin-card { background: white; border-radius: 10px; padding: 15px; box-shadow: var(--shadow); margin-bottom: 10px; border-left: 4px solid transparent; cursor: pointer; }
.admin-card.unchecked { border-left-color: var(--secondary); }
.admin-card.checked { border-left-color: var(--success); }

.status-badge { font-size: 10px; padding: 3px 8px; border-radius: 4px; color: white; font-weight: bold; }
.st-draft { background: #94a3b8; }
.st-submitted { background: var(--secondary); }
.st-reviewed { background: var(--success); }

/* ボタン */
button { width: 100%; padding: 12px; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
button:active { opacity: 0.8; }
.btn-main { 
    background: var(--primary); color: white; 
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); 
}
.btn-success { background: var(--success); color: white; }
.btn-outline { background: white; border: 1px solid #e2e8f0; color: #64748b; }
.btn-sm { padding: 6px 12px; font-size: 12px; width: auto; }

/* モーダル共通 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-overlay.show { display: flex; animation: fadeIn 0.2s; }
.modal-box { background: white; width: 85%; max-width: 320px; padding: 25px; border-radius: 16px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2); position: relative; }
.modal-title { font-weight: bold; margin-bottom: 20px; font-size: 18px; color: var(--text); }
.modal-close-btn { position: absolute; top: 10px; right: 15px; font-size: 20px; color: #cbd5e1; cursor: pointer; padding: 5px; transition: 0.2s; }
.modal-close-btn:hover { color: #64748b; }

/* Highlight */
.hl-good { background-color: #d1fae5; color: #047857; border-bottom: 2px solid #10b981; cursor: pointer; border-radius: 4px; padding: 0 2px; transition: 0.2s; }
.hl-bad { background-color: #fee2e2; color: #b91c1c; border-bottom: 2px solid #ef4444; cursor: pointer; border-radius: 4px; padding: 0 2px; transition: 0.2s; }
.hl-good:hover, .hl-bad:hover { opacity: 0.8; }

/* ポップアップ吹き出し */
.feedback-popup { position: absolute; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 15px; width: 280px; z-index: 5000; font-size: 13px; color: #333; opacity: 0; transform: translateY(10px) scale(0.95); transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: none; border: 1px solid #f1f5f9; }
.feedback-popup.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fb-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; color: white; margin-bottom: 8px; white-space: nowrap; max-width: 100%; box-sizing: border-box; }
.fb-good .fb-badge { background: var(--success); }
.fb-bad .fb-badge { background: var(--danger); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.action-bar-container { padding: 10px 20px; background: #fff; border-top: 1px solid #e2e8f0; display: flex; gap: 10px; align-items: center; box-shadow: 0 -2px 10px rgba(0,0,0,0.03); z-index: 100; }

.toast-notification { position: fixed; top: 15px; left: 50%; transform: translateX(-50%) translateY(-150%); background: rgba(30, 41, 59, 0.9); color: #fff; padding: 8px 20px; border-radius: 50px; font-size: 11px; font-weight: 500; letter-spacing: 0.05em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; z-index: 10000; opacity: 0; pointer-events: none; transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); backdrop-filter: blur(8px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-notification i { font-size: 12px; color: #fbbf24; }

.custom-dialog-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.2s; }
.custom-dialog-overlay.show { display: flex; opacity: 1; }
.custom-dialog-box { background: #fff; width: 85%; max-width: 320px; padding: 25px; border-radius: 16px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.3); transform: scale(0.9); transition: transform 0.2s; }
.custom-dialog-overlay.show .custom-dialog-box { transform: scale(1); }
.dialog-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; color: var(--text); }
.dialog-msg { font-size: 14px; color: var(--text-light); margin-bottom: 25px; line-height: 1.5; }
.dialog-actions { display: flex; gap: 10px; justify-content: center; }
.dialog-btn { flex: 1; padding: 12px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; font-size: 14px; }
.btn-cancel { background: #f1f5f9; color: #64748b; }
.btn-confirm { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }

/* ボトムナビゲーション */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 60px; background: #fff; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-around; align-items: center; z-index: 800; padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box; }
.nav-item { text-decoration: none; color: #94a3b8; font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.nav-item.active { color: var(--primary); font-weight: bold; }
.nav-item i { font-size: 20px; margin-bottom: 2px; }

/* フローティングタイマーボタン */
.floating-timer-btn { position: absolute; right: 0; bottom: 150px; background: var(--secondary); color: white; padding: 12px 16px; border-radius: 30px 0 0 30px; box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4); z-index: 900; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.floating-timer-btn:active { transform: scale(0.95); }
.ft-icon { font-size: 20px; }
.ft-time { display: none; }

/* 円形アクションボタン */
.btn-circle-action { width: 80px; height: 80px; border-radius: 50%; border: none; color: white; font-weight: bold; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); line-height: 1.2; }
.btn-circle-action i { font-size: 24px; margin-bottom: 4px; }
#btn-pause-study { background: #f59e0b; }
#btn-resume-study { background: #10b981; }

/* タイムライン */
.timeline-container { padding: 10px 0; }
.timeline-item { background: #fff; border-radius: 12px; padding: 15px; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); display: flex; align-items: center; position: relative; border: 1px solid #f1f5f9; }
.timeline-item::before { content: ""; position: absolute; left: 20px; top: -20px; bottom: 100%; width: 2px; background: #e2e8f0; z-index: 0; }
.tl-icon { width: 40px; height: 40px; border-radius: 50%; background: #94a3b8; color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-right: 15px; flex-shrink: 0; z-index: 1; }
.tl-time { font-size: 12px; color: #94a3b8; margin-bottom: 4px; font-family: monospace; }
.tl-title { font-weight: bold; font-size: 14px; color: var(--text); }
.tl-cat { font-size: 10px; color: var(--primary); background: var(--primary-light); padding: 2px 6px; border-radius: 4px; margin-top: 4px; display: inline-block; }

.start-sheet-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); z-index: 5000; align-items: flex-end; justify-content: center; }
.start-sheet-overlay.show { display: flex; animation: fadeIn 0.2s; }
.start-sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 30px 20px 40px 20px; box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15); transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.start-sheet-overlay.show .start-sheet { transform: translateY(0); }
.ss-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }
.ss-title { font-size: 22px; font-weight: bold; color: var(--text); margin-bottom: 5px; }
.ss-sub { font-size: 13px; color: var(--text-light); }
.ss-close { font-size: 24px; color: #ccc; cursor: pointer; padding: 5px; }
.ss-info-box { background: #f8fafc; border-radius: 12px; padding: 15px; margin-bottom: 25px; border: 1px solid #f1f5f9; }
.ss-row { display: flex; margin-bottom: 10px; font-size: 13px; }
.ss-label { width: 100px; color: #94a3b8; display: flex; align-items: center; gap: 5px; }
.ss-val { font-weight: bold; color: var(--text); }
.ss-actions { display: flex; gap: 10px; margin-top: 10px; }
.btn-start-lg { flex: 1; background: var(--secondary); color: white; border: none; padding: 16px; border-radius: 30px; font-size: 16px; font-weight: bold; box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4); cursor: pointer; text-align: center; }

/* トップ切り替えタブ */
.top-tabs { display: flex; background: white; padding: 0 20px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.top-tab { flex: 1; text-align: center; padding: 15px 0 10px 0; font-weight: bold; color: #94a3b8; border-bottom: 3px solid transparent; cursor: pointer; }
.top-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.notification-btn { position: relative; color: var(--text); font-size: 20px; margin-right: 15px; cursor: pointer; text-decoration: none; }
.badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; display: flex; align-items: center; justify-content: center; border: 2px solid white; display: none; }

/* スイッチトグル */
.pick-switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.pick-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* ピン留めアイコン */
.pin-icon { color: #cbd5e1; cursor: pointer; transition: 0.2s; font-size: 16px; padding: 5px; }
.pin-icon.pinned { color: #f59e0b; }

/* 1000本ノック プレイ画面用 */
#play-view { display: flex; flex-direction: column; }

/* --- AIロープレ用スタイル --- */
#rp-chat-container { flex: 1; overflow-y: auto; padding: 15px; background: #f0f2f5; display: flex; flex-direction: column; gap: 15px; }

/* ロープレ専用コントロールバー */
.rp-controls {
    position: absolute; bottom: 0; left: 0; width: 100%; min-height: 120px;
    background: white; border-top: 1px solid #e2e8f0; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 100; box-shadow: 0 -4px 20px rgba(0,0,0,0.05); padding-bottom: env(safe-area-inset-bottom);
}
.ctrl-group { display: none; width: 100%; align-items: center; justify-content: center; gap: 20px; padding: 10px; }
.ctrl-group.active { display: flex; }

.btn-mic-lg {
    width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: white; border: none;
    font-size: 28px; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); 
    display: flex; align-items: center; justify-content: center; transition: all 0.2s; cursor: pointer;
}
.btn-mic-lg:active { transform: scale(0.95); }
.btn-mic-lg.recording { animation: pulse 1.5s infinite; background: var(--danger); }

.btn-stop-lg {
    width: 72px; height: 72px; border-radius: 50%; background: #fff; color: var(--danger); border: 2px solid var(--danger);
    font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.btn-retry {
    position: absolute; left: 20px; bottom: 30px;
    width: 44px; height: 44px; border-radius: 50%; background: #f1f5f9; color: #64748b; border: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* 再生プレイヤー */
.audio-player-box {
    width: 90%; background: #f8fafc; padding: 15px; border-radius: 12px;
    display: flex; align-items: center; gap: 10px;
}
.play-btn-sm {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: white;
    border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}

@keyframes slideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* --- 追加分 --- */

/* 添削詳細ボトムシート */
.sheet-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); z-index: 6000;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.sheet-overlay.show { opacity: 1; visibility: visible; }

.bottom-sheet {
    position: absolute; bottom: 0; left: 0; width: 100%; max-height: 85%;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex; flex-direction: column;
    max-width: 480px; margin: 0 auto; right: 0; 
}
.sheet-overlay.show .bottom-sheet { transform: translateY(0); }

.sheet-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
    background: white; border-radius: 20px 20px 0 0;
}
.sheet-title { font-weight: bold; font-size: 16px; color: var(--text); }
.sheet-close { font-size: 24px; color: #ccc; cursor: pointer; padding: 5px; }

.sheet-content {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 添削リストアイテム */
.fb-list-group-title {
    font-size: 14px; font-weight: bold; color: var(--text-light); margin-top: 15px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
}
.fb-list-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}
.fb-badge-icon {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: bold; color: white;
    margin-bottom: 10px;
}
.fb-badge-icon.good { background: var(--success); box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3); }
.fb-badge-icon.bad { background: var(--danger); box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3); }

.fb-list-text {
    font-size: 14px; color: var(--text); line-height: 1.6;
}

/* 「添削内容を見る」ボタン */
.btn-check-feedback {
    display: inline-flex; align-items: center; gap: 6px;
    background: white; color: var(--text);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: 0.2s;
}
.btn-check-feedback:active { transform: scale(0.95); background: #f8fafc; }
.btn-check-feedback i { color: var(--secondary); }

/* 通知バッジのデザイン */
.notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    background-color: var(--danger);
    color: white;
    font-size: 10px; font-weight: bold;
    min-width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    line-height: 1; padding: 0 4px; box-sizing: border-box;
}








/* =========================================
   Study Tracker (開始シート) デザイン修正
   ========================================= */

/* シート全体 */
.st-sheet-card {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #fff; /* ベースは白 */
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
    z-index: 6000;
    display: flex; flex-direction: column;
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-width: 480px; margin: 0 auto; right: 0; /* スマホ幅制限 */
}
.st-sheet-card.visible { transform: translateY(0); }

/* ヘッダー（閉じるボタン） */
.st-sheet-header {
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.st-sheet-close {
    font-size: 24px; color: #cbd5e1; cursor: pointer; padding: 5px;
    transition: 0.2s;
}
.st-sheet-close:hover { color: #64748b; }

/* ボディ（アイコン・メッセージ） */
.st-sheet-body {
    padding: 10px 30px 30px 30px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
}

/* アイコン（再生マーク） */
.st-start-icon {
    font-size: 60px; 
    color: var(--primary); /* ロイヤルブルー */
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* メッセージ */
.st-start-msg {
    font-size: 20px; font-weight: bold; 
    color: var(--text); /* ダークネイビー */
    margin-bottom: 5px;
}
.st-start-sub {
    font-size: 12px; font-weight: bold; 
    color: var(--text-light); /* グレー */
    margin-bottom: 25px;
}

/* モジュール情報ボックス */
.st-module-box {
    background: #f8fafc; /* 薄いグレー */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}
.st-module-label {
    font-size: 10px; font-weight: bold; 
    color: var(--text-light); 
    margin-bottom: 4px;
}
.st-module-name {
    font-size: 14px; font-weight: bold; 
    color: var(--text); 
    line-height: 1.4;
}

/* フッター（開始ボタン） */
.st-footer {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
}
.st-btn-main {
    width: 100%; padding: 16px; 
    border: none; border-radius: 30px;
    /* オレンジグラデーション（FABと同じ） */
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white; 
    font-size: 16px; font-weight: bold; 
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    cursor: pointer; transition: 0.2s;
}
.st-btn-main:active { transform: scale(0.98); opacity: 0.9; }








/* --- Sticky Slide Animation (クローン分身版) --- */

/* 1. メイン画像（いじらない） */
.sticky-slide-wrapper {
    width: 100%;
    margin: 20px 0;
    position: relative;
    z-index: 10;
}

.slide-content {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 95%;
    margin: 0 auto;
}

.slide-img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

.slide-caption {
    padding: 8px 12px;
    font-size: 12px;
    color: #333;
    background: #f8fafc;
    border-top: 1px solid #eee;
}

/* 2. ミニスライド（右下に常駐する分身用の箱） */
#mini-slide-viewer {
    position: fixed;
    bottom: 150px;       /* プレイヤーの上 */
    right: 20px;         /* 右端 */
    width: 160px;
    height: 90px;
    
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    
    overflow: hidden;
    
    /* 初期状態は非表示 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* PC幅調整 */
@media (min-width: 480px) {
    #mini-slide-viewer {
        right: calc(50% - 240px + 20px);
    }
}

/* 表示状態（JSでつける） */
#mini-slide-viewer.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#mini-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* プレースホルダーはもう不要なのでスタイルだけ残して機能させない */
.placeholder-box { display: none; }














/* --- 無効化（Coming Soon）用スタイル --- */
.locked-card {
    /* クリックを物理的に無効化 */
    pointer-events: none;
    
    /* 見た目の変更 */
    opacity: 0.6;              /* 全体を薄くする */
    filter: grayscale(100%);   /* モノクロにする（お好みで） */
    cursor: not-allowed;       /* カーソルを禁止マークに */
    position: relative;        /* バッジ表示の基準位置 */
    background-color: #f9f9f9; /* 背景を少し暗く */
    box-shadow: none;          /* 影を消す */
}

/* "Coming Soon" という文字を真ん中に乗せる */
.locked-card::after {
    content: "Coming Soon";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg); /* ちょっと傾けるとかっこいい */
    
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 10;
}